confirmWorkOrder.wxml
9.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!--tabRepairOrder/pages/confirmWorkOrder/index.wxml-->
<wxs src="../../index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="confirm-order">
<view class="item base-info">
<view class="card-title">基本信息</view>
<view class="box">
<block wx:for="{{ baseInfoObj }}" wx:key="index">
<view class="box-item">
<view class="label">{{item.label}}</view>
<view class="value" wx:if="{{ item.subObj }}">{{confirmInfo[item.subObj][item.key] || '-'}}</view>
<view class="value" wx:else>{{confirmInfo[item.key] || '-'}}</view>
<view class="copy" wx:if="{{ item.copy && (confirmInfo[item.subObj][item.key] || confirmInfo[item.key]) }}" bindtap="setCopyData" data-content="{{ item.subObj ? confirmInfo[item.subObj][item.key] : confirmInfo[item.key] }}">
<image src="{{ IMG_URL }}equity/copy.png" class="copy-icon" mode="aspectFit" />
</view>
</view>
</block>
</view>
</view>
<view class="item staff-card">
<view class="staff-header">
<view class="staff-title">
<text>施工人员</text>
<text class="staff-subtitle">占比合计100%</text>
</view>
</view>
<view class="staff-list">
<view class="staff-row border_b {{ canEditTechnician ? 'editable' : '' }}" catchtap="showPopup">
<view class="staff-label">主技师<text class="required">*</text></view>
<view class="staff-right">
<view class="staff-name text-hide {{(!mainSelected[0] && canEditTechnician) ? 'is-placeholder' : ''}}">{{mainSelected[0] && mainSelected[0].staffName || (canEditTechnician ? '请选择' : '-')}}</view>
<view wx:if="{{mainSelected[0] && mainSelected[0].shareRatio !== '' && mainSelected[0].shareRatio !== undefined && mainSelected[0].shareRatio !== null}}" class="staff-rate">{{mainSelected[0].shareRatio + '%'}}</view>
<image wx:if="{{ canEditTechnician }}" class="staff-arrow" src="{{ IMG_URL }}images/arrow-right.png" mode="aspectFit" />
</view>
</view>
<block wx:if="{{ deputySelected && deputySelected.length }}">
<block wx:for="{{ deputySelected }}" wx:key="index">
<view class="staff-row {{ canEditTechnician ? 'editable' : '' }}" catchtap="showPopup" data-type="deputy">
<view class="staff-label">副手技师</view>
<view class="staff-right">
<view class="staff-name text-hide">{{item && item.staffName}}</view>
<view class="staff-rate">{{item && item.shareRatio !== '' && item.shareRatio !== undefined && item.shareRatio !== null ? item.shareRatio + '%' : ''}}</view>
<image wx:if="{{ canEditTechnician }}" class="staff-arrow" src="{{ IMG_URL }}images/arrow-right.png" mode="aspectFit" />
</view>
</view>
</block>
</block>
<block wx:else>
<view class="staff-row {{ canEditTechnician ? 'editable' : '' }}" catchtap="showPopup" data-type="deputy">
<view class="staff-label">副手技师</view>
<view class="staff-right">
<view class="staff-name text-hide {{ canEditTechnician ? 'is-placeholder' : '' }}">{{ canEditTechnician ? '请选择' : '-' }}</view>
<image wx:if="{{ canEditTechnician }}" class="staff-arrow" src="{{ IMG_URL }}images/arrow-right.png" mode="aspectFit" />
</view>
</view>
</block>
</view>
</view>
<view class="tabs">
<view class="tab-item {{ currentTab === 'goods' ? 'active' : '' }}" bindtap="switchTab" data-tab="goods">
施工商品<text style="font-size: 20rpx;">({{confirmInfo.subOrderList.length}})</text>
</view>
<view class="tab-item {{ currentTab === 'service' ? 'active' : '' }}" bindtap="switchTab" data-tab="service">
服务项目<text style="font-size: 20rpx;">({{serviceCount}})</text>
</view>
</view>
<view class="item tab-content">
<block wx:if="{{ currentTab === 'goods' }}">
<view class="section-header">
<view class="section-title">订单商品</view>
<block wx:if="{{ confirmInfo.reworkFlag != 1 && filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}">
<block wx:if="{{ !editGoodsFlag }}">
<view class="edit-btn" bindtap="handleEditGoods">
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" mode="aspectFit" />
编辑
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelGoodsCancel">取消</view>
<view bindtap="handelGoodsConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="order-goods">
<block wx:if="{{ !editGoodsFlag }}">
<view class="goods-box" wx:if="{{ confirmInfo.subOrderList.length }}">
<view class="goods-item" wx:for="{{ confirmInfo.subOrderList }}" wx:key="index">
<view class="goods-text">
<view class="goods-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
<view class="inventory" bindtap="openInventoryPopup" data-inventory="{{item}}">
库存{{item.stock===0||item.stock?item.stock:'-'}}
</view>
</view>
<view class="count">x{{item.number}}</view>
</view>
</view>
</block>
<block wx:else>
<block wx:for="{{ editGoodsList }}" wx:key="index">
<view class="edit-goods-box">
<image bindtap="handleDelgoods" data-index="{{ index }}" src="{{ IMG_URL }}repair-order/del-goods.png" mode="aspectFit" />
<view class="goods-name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || item.packageName||''}}
</view>
</view>
</block>
<view class="btn-box" bindtap="relateGoods">
<image src="{{ IMG_URL }}repair-order/relate-goods.png" mode="aspectFit" />
可选关联客户其他商品
</view>
</block>
</view>
</block>
<block wx:else>
<view class="section-header">
<view class="section-title">服务项目</view>
<block wx:if="{{ filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') }}">
<block wx:if="{{ !editServiceFlag }}">
<view class="edit-btn" bindtap="handleEditService">
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" mode="aspectFit" />
编辑
</view>
</block>
<block wx:else>
<view class="edit-btn">
<view class="cancel" bindtap="handelServicesCancel">取消</view>
<view bindtap="handelServicesConfirm">完成</view>
</view>
</block>
</block>
</view>
<view class="service-box">
<block wx:if="{{ !editServiceFlag }}">
<block wx:for="{{ confirmInfo.serviceItemsList }}" wx:key="index">
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="service-item simple">
<view class="left">
<view class="name">{{i.itemsConfigName}}-{{i.serviceItemsName}}</view>
<view class="bott">
<view class="material">用料标准{{i.materialStandard || '-'}}米/件</view>
<text class="split">|</text>
<view class="cost">施工标准{{i.timeStandard || '-'}}min</view>
</view>
</view>
<view class="count">x{{i.useNum}}</view>
</view>
</block>
</block>
</block>
<block wx:else>
<block wx:for="{{ editServicesList }}" wx:key="index">
<block wx:for="{{ item.detailList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="service-item edit-item simple">
<image bindtap="handleDelServices" data-index="{{ index }}" data-sindex="{{ sindex }}" src="{{ IMG_URL }}repair-order/del-goods.png" mode="aspectFit" />
<view style="flex: 1;display: flex;align-items: center;justify-content: space-between;">
<view class="left">
<view class="name">{{i.itemsConfigName}}-{{i.serviceItemsName}}</view>
<view class="bott">
<view class="material">用料标准{{i.materialStandard || '-'}}米/件</view>
<text class="split">|</text>
<view class="cost">施工标准{{i.timeStandard || '-'}}min</view>
</view>
</view>
<view class="count">x{{i.useNum}}</view>
</view>
</view>
</block>
</block>
<view class="btn-box" bindtap="selectServices">
<image src="{{ IMG_URL }}repair-order/add-service.png" mode="aspectFit" />
可选新增服务项目关联施工单
</view>
</block>
</view>
</block>
</view>
</view>
<view class="bottom-bar {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ filter.btnPermissions(userPermissions, 'SHIGONGQUEREN') }}">
<view class="bottom-bar__con">
<view class="btn cancel text-center" bindtap="handleCancel">取消</view>
<view class="btn primary text-center" bindtap="submit">确认领取施工单</view>
</view>
</view>
<relate-goods-popup show="{{ relateGoodsVisable }}" goodsList="{{ goodsList }}" bindconfirm="handelRelateGoodsConfirm" selected="{{ editGoodsList }}" bindcancel="handelRelateGoodsCancel" baseConfigData="{{ baseConfigData }}" bind:openInventory="openInventory"></relate-goods-popup>
<technician-select-popup show="{{ artificerSelectPopup }}" title="选择技师" copyArtificerList="{{ artificerList }}" multiple="{{ technicianMultiple }}" artificerSelectObj="{{ technicianMultiple ? deputySelected : mainSelected }}" disabledSelectObj="{{ technicianMultiple ? mainSelected : deputySelected }}" bindconfirm="changeArtificer" bindcancel="cancelTechnician" deputyFlag="{{ technicianMultiple }}" idKey="uuid" />
<select-service-popup show="{{ selectServiceVisable }}" bindconfirm="handleSelectServiceConfirm" selectGoodsList="{{ confirmInfo.subOrderList }}" selected="{{ editServicesList }}" bindcancel="handleSelectServiceCancel"></select-service-popup>
<inventory-info show="{{showInventory}}" inventory-data="{{inventoryData}}" title="库存信息" bind:close="onInventoryClose" />