goodsOutbound.wxml
13.9 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="page goods-outbound">
<view class="status-wrap">
<view class="status-item" wx:for="{{ statusList }}" wx:key="index">
<view class="info {{ item.active && item.type==1 ? 'active' : '' }}">
<view class="circle-box">
<view class="circle">
<image wx:if="{{item.active}}" class="status-img" src="{{IMG_URL}}equity/review_icon.png" mode="aspectFit"></image>
<image wx:if="{{item.type==2}}" class="status-img" src="{{IMG_URL}}equity/review_success_icon.png" mode="aspectFit"></image>
<view wx:if="{{!item.active && item.type < 2}}" class="circle_text">{{index + 1}}</view>
</view>
</view>
<view class="name" style="color: {{item.active || item.type > 1 ? '#292D33' : '#999EA8'}}">{{item.name}}</view>
</view>
<view class="line {{item.type == 2 ? 'line_color' : ''}}" wx:if="{{index!=statusList.length-1}}"></view>
</view>
</view>
<view class="content">
<block wx:if="{{ currentStep === 0 }}">
<view class="card goods-card">
<view class="card-title">商品信息</view>
<view class="goods-item">
<view class="goods-item__top">
<view class="bullet"></view>
<view class="goods-title text-hide">{{ goodsInfo.upgradeGoodsAlias || goodsInfo.goodsName || goodsInfo.upgradeGoodsName || goodsInfo.packageName || '-' }}</view>
<view class="goods-multi">x{{ goodsInfo.number || '-' }}</view>
</view>
<view class="goods-item__desc text-hide">
库存{{ goodsInfo.stock !== undefined && goodsInfo.stock !== null && goodsInfo.stock !== '' ? (goodsInfo.stock + '米/件') : '-' }}
</view>
</view>
<view class="box">
<view class="box-item">
<view class="label">UID</view>
<view class="value">{{ goodsInfo.upgradeGoodsCommodityCode || '-' }}</view>
<view class="copy" wx:if="{{ goodsInfo.upgradeGoodsCommodityCode }}" bindtap="setCopyData" data-content="{{ goodsInfo.upgradeGoodsCommodityCode }}">
<image src="{{ IMG_URL }}equity/copy.png" class="copy-icon" mode="aspectFit"></image>
</view>
</view>
<view class="box-item">
<view class="label">产品编码</view>
<view class="value">{{ goodsInfo.upgradeGoodsCustomCode || '-' }}</view>
<view class="copy" wx:if="{{ goodsInfo.upgradeGoodsCustomCode }}" bindtap="setCopyData" data-content="{{ goodsInfo.upgradeGoodsCustomCode }}">
<image src="{{ IMG_URL }}equity/copy.png" class="copy-icon" mode="aspectFit"></image>
</view>
</view>
<view class="box-item">
<view class="label">规格</view>
<view class="value">{{ goodsInfo.specification || '-' }}</view>
<view class="copy" wx:if="{{ goodsInfo.specification }}" bindtap="setCopyData" data-content="{{ goodsInfo.specification }}">
<image src="{{ IMG_URL }}equity/copy.png" class="copy-icon" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<view class="card method-card">
<view class="method-shell">
<view class="method-tabbar" wx:if="{{ showMethodTabs }}">
<view class="method-tabs {{ currentMethod === 'scan' ? 'is-left-active' : 'is-right-active' }}">
<view class="tab {{ currentMethod === 'scan' ? 'active is-left' : '' }}" bindtap="switchMethod" data-method="scan">
<text class="tab-text">扫码出库</text>
</view>
<view class="tab {{ currentMethod === 'manual' ? 'active is-right' : '' }}" bindtap="switchMethod" data-method="manual">
<text class="tab-text">手动输入</text>
</view>
</view>
</view>
<view class="method-panel {{ showMethodTabs ? 'has-tabbar' : '' }}" style="border-radius: {{currentMethod == 'scan' ? '0 24rpx 24rpx 24rpx' : '24rpx 0 24rpx 24rpx'}};">
<block wx:if="{{ currentMethod === 'scan' }}">
<view class="scan-area">
<block wx:if="{{ scanList && scanList.length }}">
<view class="scan-list">
<block wx:for="{{ scanList }}" wx:key="uniqueCode">
<view class="scan-item">
<view class="scan-row">
<view class="scan-label">ID</view>
<view class="scan-value text-hide">{{ item.uniqueCode || '-' }}</view>
<view class="scan-copy" wx:if="{{ item.uniqueCode }}" bindtap="setCopyData" data-content="{{ item.uniqueCode }}">
<image src="{{ IMG_URL }}equity/copy.png" class="icon" mode="aspectFit"></image>
</view>
</view>
<view class="scan-row">
<view class="scan-label">标签库存</view>
<view class="scan-value">{{ item.stock != null ? item.stock : '-' }}</view>
</view>
</view>
</block>
</view>
<view class="scan-action" catchtap="onScan">扫一扫</view>
</block>
<block wx:else>
<view class="scan-circle">
<view class="circle-inner" catch:tap="onScan">
<image src="{{ IMG_URL }}scan-icon.png" mode="aspectFit" />
</view>
</view>
<view class="scan-tip">手机扫描产品标签,并输入出库数据进行出库</view>
<view class="scan-action" catchtap="onScan">扫一扫</view>
</block>
</view>
</block>
<block wx:else>
<view class="inner-section">
<view class="inner-title">出库信息</view>
<view class="outbound-card inner-outbound">
<view class="field">
<view class="field-label">
<text class="required">*</text>
本次出库数量
</view>
<view class="field-control {{ !formEditable ? 'disabled' : '' }}">
<input class="field-input" value="{{ outboundNum }}" placeholder="输入数字" disabled="{{ !formEditable }}" bindinput="onOutboundNumInput" />
<view class="field-unit">米/件</view>
</view>
<view class="field-error" wx:if="{{ outboundNumError }}">{{ outboundNumError }}</view>
</view>
<view class="field">
<view class="field-label">
<text class="required">*</text>
出库备注
</view>
<view class="field-textarea-wrap {{ !formEditable ? 'disabled' : '' }}">
<textarea class="field-textarea" value="{{ remark }}" placeholder="请输入(200字以内)" maxlength="200" disabled="{{ !formEditable }}" bindinput="onOutboundRemarkInput"></textarea>
</view>
</view>
<view class="field">
<view class="field-label">
<text class="required">*</text>
出库时间
</view>
<view class="field-control {{ !formEditable ? 'disabled' : '' }}" bindtap="openOutboundTimePicker">
<view class="field-date {{ outBoundTime ? '' : 'placeholder' }}">{{ outBoundTime || '选择日期' }}</view>
<image class="field-date-icon" src="{{ IMG_URL }}date-time-select-icon.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
<view class="card outbound-card" wx:if="{{ currentMethod === 'scan' }}">
<view class="card-title">出库信息</view>
<view class="field">
<view class="field-label">
<text class="required">*</text>
本次出库数量
</view>
<view class="field-control {{ !formEditable ? 'disabled' : '' }}">
<input class="field-input" value="{{ outboundNum }}" placeholder="输入数字" disabled="{{ !formEditable }}" bindinput="onOutboundNumInput" />
<view class="field-unit">米/件</view>
</view>
<view class="field-error" wx:if="{{ outboundNumError }}">{{ outboundNumError }}</view>
</view>
<view class="field">
<view class="field-label">
<text class="required">*</text>
出库备注
</view>
<view class="field-textarea-wrap {{ !formEditable ? 'disabled' : '' }}">
<textarea class="field-textarea" value="{{ remark }}" placeholder="请输入(200字以内)" maxlength="200" disabled="{{ !formEditable }}" bindinput="onOutboundRemarkInput"></textarea>
</view>
</view>
</view>
</block>
<block wx:elif="{{ currentStep === 1 }}">
<view class="card goods-card">
<view class="card-title">商品信息</view>
<view class="goods-item">
<view class="goods-item__top">
<view class="bullet"></view>
<view class="goods-title text-hide">{{ goodsInfo.upgradeGoodsAlias || goodsInfo.goodsName || goodsInfo.upgradeGoodsName || goodsInfo.packageName || '-' }}</view>
<view class="goods-multi">x{{ goodsInfo.number || '-' }}</view>
</view>
<view class="goods-item__desc text-hide">
库存{{ goodsInfo.stock !== undefined && goodsInfo.stock !== null && goodsInfo.stock !== '' ? (goodsInfo.stock + '米/件') : '-' }}
</view>
</view>
</view>
<view class="card">
<view class="card-title">出库信息</view>
<view class="info-list">
<view class="info-row">
<view class="label">本次出库数量</view>
<view class="value">{{ goodsInfo.materialsUsed }}米/件</view>
</view>
<view class="info-row">
<view class="label">出库备注</view>
<view class="value text-hide">{{ goodsInfo.outboundRemark || '-' }}</view>
</view>
<view class="info-row">
<view class="label">出库时间</view>
<view class="value">{{ goodsInfo.outboundTimeStr }}</view>
</view>
</view>
</view>
<view class="card construction-card">
<view class="card-title">施工信息</view>
<view class="field">
<view class="field-label">
开始施工时间
<text class="required">*</text>
</view>
<view class="field-control" bindtap="openStartTimePicker">
<view class="field-date {{ startConstructionTime ? '' : 'placeholder' }}">{{ startConstructionTime || '选择日期' }}</view>
<image class="field-date-icon" src="{{ IMG_URL }}date-time-select-icon.png" mode="aspectFit"></image>
</view>
</view>
<view class="field">
<view class="field-label">
结束施工时间
</view>
<view class="field-control" bindtap="openEndTimePicker">
<view class="field-date {{ endConstructionTime ? '' : 'placeholder' }}">{{ endConstructionTime || '选择日期' }}</view>
<image class="field-date-icon" src="{{ IMG_URL }}date-time-select-icon.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="card">
<view class="card-title">施工图片 <text class="sub">至少1张,最多9张</text></view>
<view class="image-box">
<block wx:for="{{ pictureList }}" wx:key="index">
<view class="img-item">
<view class="img-wrap" catchtap="onPreviewImg" data-index="{{ index }}">
<image class="img" src="{{ item }}" mode="aspectFill" />
<image class="del" catchtap="onDeleteImg" data-index="{{ index }}" src="{{ IMG_URL }}zy_paf_del_icon.png" mode="aspectFit" />
</view>
</view>
</block>
<view class="img-item add" wx:if="{{ pictureList.length < 9 }}" bindtap="onUploadImg">
<view class="plus">+</view>
<view class="count">({{ pictureList.length }}/9)</view>
</view>
</view>
</view>
</block>
</view>
<view class="bottom-bar">
<block wx:if="{{ currentStep === 0 }}">
<view class="btn ghost" catchtap="onCancel">取消</view>
<view class="btn primary {{ permissionsLoaded && !canOutboundGoods ? 'disabled' : '' }}" catchtap="onConfirmOutbound">确认出库</view>
</block>
<block wx:elif="{{ currentStep === 1 }}">
<view class="btn ghost" catchtap="onPrevStep">上一步</view>
<view class="btn primary {{ permissionsLoaded && !canSubmitConstruction ? 'disabled' : '' }}" catchtap="onSubmitPictures">提交施工图</view>
</block>
<block wx:else>
<view class="btn primary" catchtap="onDone">完成</view>
</block>
</view>
<time-select show="{{ outBoundTimeVisible }}" title="出库时间" defaultTime="{{ outBoundTime }}" isStartTime="{{ true }}" bind:confirm="onOutboundTimeConfirm" bindcancel="onClosePicker" />
<time-select show="{{ startTimeVisible }}" title="开始施工时间" defaultTime="{{ startConstructionTime }}" isStartTime="{{ true }}" endTime="{{ endConstructionTime }}" bind:confirm="onStartTimeConfirm" bindcancel="onClosePicker" />
<time-select show="{{ endTimeVisible }}" title="结束施工时间" defaultTime="{{ endConstructionTime || endConstructionTimePickerDefault }}" isStartTime="{{ false }}" startTime="{{ startConstructionTime }}" bind:confirm="onEndTimeConfirm" bindcancel="onClosePicker" />
</view>