@things-factory/operato-wms 4.3.550 → 4.3.551
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/inbound/{putaway-product.js → putaway/putaway-product.js} +282 -52
- package/client/pages/inbound/{putaway-replenishment-inventory-popup.js → putaway/putaway-replenishment-inventory-popup.js} +4 -4
- package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +192 -0
- package/client/pages/inbound/{putaway-worksheet-generate-popup.js → putaway/putaway-worksheet-generate-popup.js} +39 -50
- package/client/pages/inbound/{undo-putaway-popup.js → putaway/undo-putaway-popup.js} +78 -37
- package/client/pages/inbound/{worksheet-putaway-return.js → putaway/worksheet-putaway-return.js} +1 -1
- package/client/pages/inbound/{worksheet-putaway.js → putaway/worksheet-putaway.js} +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +1 -2
- package/client/pages/inventory-check/cycle-count-report.js +186 -192
- package/client/pages/outbound/picking-product.js +19 -6
- package/client/pages/replenishment/replenishment.js +34 -20
- package/client/route.js +3 -3
- package/package.json +5 -5
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- /package/client/pages/inbound/{putaway-same-carton-popup.js → putaway/putaway-same-carton-popup.js} +0 -0
|
@@ -22,6 +22,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
22
22
|
_reportStatus: String,
|
|
23
23
|
_cycleCountNo: String,
|
|
24
24
|
_enableCartonLabel: Boolean,
|
|
25
|
+
_countData: Array,
|
|
25
26
|
cycleCountType: String,
|
|
26
27
|
customerId: String,
|
|
27
28
|
inventoryAccuracy: String,
|
|
@@ -159,15 +160,166 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
159
160
|
this._cycleCountNo = changes.resourceId
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
this.grist.fetch()
|
|
163
163
|
await this.fetchCycleCountReport()
|
|
164
|
-
this.
|
|
164
|
+
this.config = { ...this.cycleCountConfig }
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
async pageInitialized() {
|
|
169
169
|
this.isUserBelongsDomain = await this._checkUserBelongsDomain()
|
|
170
|
-
this.config =
|
|
170
|
+
this.config = this.cycleCountConfig
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
get cycleCountConfig() {
|
|
174
|
+
let data = this._countData
|
|
175
|
+
const countColumns = data
|
|
176
|
+
? Object.keys(data)
|
|
177
|
+
.filter(key => key.startsWith('count ') && data[key] !== null && data[key] !== undefined)
|
|
178
|
+
.map(key => ({
|
|
179
|
+
type: 'integer',
|
|
180
|
+
name: key,
|
|
181
|
+
header: key,
|
|
182
|
+
width: 120
|
|
183
|
+
}))
|
|
184
|
+
: []
|
|
185
|
+
|
|
186
|
+
let columns = [
|
|
187
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
188
|
+
{
|
|
189
|
+
type: 'gutter',
|
|
190
|
+
gutterName: 'button',
|
|
191
|
+
icon: 'reorder',
|
|
192
|
+
handlers: {
|
|
193
|
+
click: this._showInventoryDetailsPopup.bind(this)
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: 'string',
|
|
198
|
+
name: 'inventoryId',
|
|
199
|
+
hidden: true
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
type: 'string',
|
|
203
|
+
name: 'cartonId',
|
|
204
|
+
header: i18next.t('field.carton_id'),
|
|
205
|
+
width: 120,
|
|
206
|
+
hidden: !this._enableCartonLabel
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: 'string',
|
|
210
|
+
name: 'palletId',
|
|
211
|
+
header: i18next.t('field.lot_id'),
|
|
212
|
+
width: 120,
|
|
213
|
+
hidden: this._enableCartonLabel
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: 'string',
|
|
217
|
+
name: 'sku',
|
|
218
|
+
header: i18next.t('field.sku'),
|
|
219
|
+
width: 150
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
type: 'string',
|
|
223
|
+
name: 'productName',
|
|
224
|
+
header: i18next.t('field.product'),
|
|
225
|
+
width: 350
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
type: 'string',
|
|
229
|
+
name: 'description',
|
|
230
|
+
header: i18next.t('field.description'),
|
|
231
|
+
width: 100
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
type: 'string',
|
|
235
|
+
name: 'brand',
|
|
236
|
+
header: i18next.t('field.brand'),
|
|
237
|
+
width: 100
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
type: 'string',
|
|
241
|
+
name: 'packingType',
|
|
242
|
+
header: i18next.t('field.packing_type'),
|
|
243
|
+
width: 100
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
type: 'boolean',
|
|
247
|
+
name: 'batchNoVariance',
|
|
248
|
+
header: i18next.t('field.batch_no_variance'),
|
|
249
|
+
width: 150,
|
|
250
|
+
renderer: value => {
|
|
251
|
+
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: 'boolean',
|
|
256
|
+
name: 'expirationDateVariance',
|
|
257
|
+
header: i18next.t('field.expiration_date_variance'),
|
|
258
|
+
width: 150,
|
|
259
|
+
renderer: value => {
|
|
260
|
+
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
type: 'boolean',
|
|
265
|
+
name: 'locationVariance',
|
|
266
|
+
header: i18next.t('field.location_variance'),
|
|
267
|
+
width: 150,
|
|
268
|
+
renderer: value => {
|
|
269
|
+
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
type: 'boolean',
|
|
274
|
+
name: 'uomValueVariance',
|
|
275
|
+
header: i18next.t('field.uom_value_variance'),
|
|
276
|
+
width: 150,
|
|
277
|
+
renderer: value => {
|
|
278
|
+
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
279
|
+
},
|
|
280
|
+
hidden: this._enableCartonLabel
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: 'string',
|
|
284
|
+
name: 'uom',
|
|
285
|
+
header: i18next.t('field.uom'),
|
|
286
|
+
width: 80
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
type: 'integer',
|
|
290
|
+
name: 'systemQty',
|
|
291
|
+
header: i18next.t('field.system_qty'),
|
|
292
|
+
width: 100
|
|
293
|
+
},
|
|
294
|
+
...countColumns,
|
|
295
|
+
{
|
|
296
|
+
type: 'string',
|
|
297
|
+
name: 'finalCount',
|
|
298
|
+
header: i18next.t('field.final_count'),
|
|
299
|
+
width: 100
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
type: 'string',
|
|
303
|
+
name: 'countVariance',
|
|
304
|
+
header: i18next.t('field.count_variance'),
|
|
305
|
+
width: 120
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
type: 'string',
|
|
309
|
+
name: 'countStatus',
|
|
310
|
+
header: i18next.t('field.count_status'),
|
|
311
|
+
width: 100
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
|
|
315
|
+
let list = {
|
|
316
|
+
fields: ['cartonId', 'palletId', 'sku', 'productName', 'packingType']
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return {
|
|
320
|
+
columns: columns,
|
|
321
|
+
list,
|
|
322
|
+
pagination: { infinite: true },
|
|
171
323
|
rows: {
|
|
172
324
|
appendable: false,
|
|
173
325
|
classifier: (record, rowIndex) => {
|
|
@@ -176,138 +328,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
176
328
|
record.status === WORKSHEET_STATUS.NOT_TALLY.value || record.status === WORKSHEET_STATUS.ADJUSTED.value
|
|
177
329
|
}
|
|
178
330
|
}
|
|
179
|
-
}
|
|
180
|
-
list: {
|
|
181
|
-
fields: ['cartonId', 'palletId', 'sku', 'productName', 'packingType']
|
|
182
|
-
},
|
|
183
|
-
pagination: { infinite: true },
|
|
184
|
-
columns: [
|
|
185
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
186
|
-
{
|
|
187
|
-
type: 'gutter',
|
|
188
|
-
gutterName: 'button',
|
|
189
|
-
icon: 'reorder',
|
|
190
|
-
handlers: {
|
|
191
|
-
click: this._showInventoryDetailsPopup.bind(this)
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
type: 'string',
|
|
196
|
-
name: 'inventoryId',
|
|
197
|
-
hidden: true
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
type: 'string',
|
|
201
|
-
name: 'cartonId',
|
|
202
|
-
header: i18next.t('field.carton_id'),
|
|
203
|
-
width: 120,
|
|
204
|
-
hidden: !this._enableCartonLabel
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
type: 'string',
|
|
208
|
-
name: 'palletId',
|
|
209
|
-
header: i18next.t('field.lot_id'),
|
|
210
|
-
width: 120,
|
|
211
|
-
hidden: this._enableCartonLabel
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
type: 'string',
|
|
215
|
-
name: 'sku',
|
|
216
|
-
header: i18next.t('field.sku'),
|
|
217
|
-
width: 150
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
type: 'string',
|
|
221
|
-
name: 'productName',
|
|
222
|
-
header: i18next.t('field.product'),
|
|
223
|
-
width: 350
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
type: 'string',
|
|
227
|
-
name: 'description',
|
|
228
|
-
header: i18next.t('field.description'),
|
|
229
|
-
width: 100
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: 'string',
|
|
233
|
-
name: 'brand',
|
|
234
|
-
header: i18next.t('field.brand'),
|
|
235
|
-
width: 100
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
type: 'string',
|
|
239
|
-
name: 'packingType',
|
|
240
|
-
header: i18next.t('field.packing_type'),
|
|
241
|
-
width: 100
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
type: 'boolean',
|
|
245
|
-
name: 'batchNoVariance',
|
|
246
|
-
header: i18next.t('field.batch_no_variance'),
|
|
247
|
-
width: 150,
|
|
248
|
-
renderer: value => {
|
|
249
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
type: 'boolean',
|
|
254
|
-
name: 'expirationDateVariance',
|
|
255
|
-
header: i18next.t('field.expiration_date_variance'),
|
|
256
|
-
width: 150,
|
|
257
|
-
renderer: value => {
|
|
258
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: 'boolean',
|
|
263
|
-
name: 'locationVariance',
|
|
264
|
-
header: i18next.t('field.location_variance'),
|
|
265
|
-
width: 150,
|
|
266
|
-
renderer: value => {
|
|
267
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
type: 'boolean',
|
|
272
|
-
name: 'uomValueVariance',
|
|
273
|
-
header: i18next.t('field.uom_value_variance'),
|
|
274
|
-
width: 150,
|
|
275
|
-
renderer: value => {
|
|
276
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
277
|
-
},
|
|
278
|
-
hidden: this._enableCartonLabel
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
type: 'string',
|
|
282
|
-
name: 'uom',
|
|
283
|
-
header: i18next.t('field.uom'),
|
|
284
|
-
width: 80
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
type: 'integer',
|
|
288
|
-
name: 'systemQty',
|
|
289
|
-
header: i18next.t('field.system_qty'),
|
|
290
|
-
width: 100
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: 'string',
|
|
294
|
-
name: 'finalCount',
|
|
295
|
-
header: i18next.t('field.final_count'),
|
|
296
|
-
width: 100
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
type: 'string',
|
|
300
|
-
name: 'countVariance',
|
|
301
|
-
header: i18next.t('field.count_variance'),
|
|
302
|
-
width: 120
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
type: 'string',
|
|
306
|
-
name: 'countStatus',
|
|
307
|
-
header: i18next.t('field.count_status'),
|
|
308
|
-
width: 100
|
|
309
|
-
}
|
|
310
|
-
]
|
|
331
|
+
}
|
|
311
332
|
}
|
|
312
333
|
}
|
|
313
334
|
|
|
@@ -346,6 +367,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
346
367
|
inspectedLocation {
|
|
347
368
|
name
|
|
348
369
|
}
|
|
370
|
+
status
|
|
349
371
|
}
|
|
350
372
|
inventory {
|
|
351
373
|
id
|
|
@@ -421,6 +443,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
421
443
|
!isNaN(parseFloat(countData[key])) && isFinite(countData[key]) ? parseInt(countData[key], 10) : '-'
|
|
422
444
|
}
|
|
423
445
|
})
|
|
446
|
+
this._countData = countData
|
|
424
447
|
|
|
425
448
|
// Calculate the latest count key and finalCount
|
|
426
449
|
const latestCountKey = [...Object.keys(countData)]
|
|
@@ -431,11 +454,12 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
431
454
|
const finalCount = latestCountKey ? countData[latestCountKey] : item.systemQty
|
|
432
455
|
|
|
433
456
|
// Calculate countVariance
|
|
434
|
-
|
|
457
|
+
let countVariance = finalCount - item.systemQty
|
|
435
458
|
|
|
436
459
|
// Calculate countStatus
|
|
437
460
|
let countStatus
|
|
438
461
|
const {
|
|
462
|
+
status,
|
|
439
463
|
inspectedBatchNo,
|
|
440
464
|
inspectedQty,
|
|
441
465
|
inspectedUomValue,
|
|
@@ -449,7 +473,23 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
449
473
|
const inspectedLocationName = inspectedLocation.name
|
|
450
474
|
const { id: inventoryId, cartonId, palletId, packingType: invPackingType, uom: invUom } = inventory
|
|
451
475
|
|
|
452
|
-
|
|
476
|
+
let batchNoVariance = item.batchNoVariance
|
|
477
|
+
let expirationDateVariance = item.expirationDateVariance
|
|
478
|
+
let locationVariance = item.locationVariance
|
|
479
|
+
let uomValueVariance = item.uomValueVariance
|
|
480
|
+
|
|
481
|
+
if (
|
|
482
|
+
inventoryCheckItem.status === ORDER_STATUS.INSPECTING.value ||
|
|
483
|
+
inventoryCheckItem.status === ORDER_STATUS.PENDING.value
|
|
484
|
+
) {
|
|
485
|
+
// reset variance value if cc is not executed yet
|
|
486
|
+
countStatus = 'PENDING'
|
|
487
|
+
countVariance = 0
|
|
488
|
+
batchNoVariance = null
|
|
489
|
+
expirationDateVariance = null
|
|
490
|
+
locationVariance = null
|
|
491
|
+
uomValueVariance = null
|
|
492
|
+
} else if (finalCount === item.systemQty) {
|
|
453
493
|
countStatus = 'HIT'
|
|
454
494
|
} else if (finalCount < item.systemQty) {
|
|
455
495
|
countStatus = 'SHORT'
|
|
@@ -485,10 +525,10 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
485
525
|
packingType: invPackingType || pdPackingType,
|
|
486
526
|
uom: invUom || pdUom,
|
|
487
527
|
runningNo: idx + 1,
|
|
488
|
-
batchNoVariance:
|
|
489
|
-
locationVariance:
|
|
490
|
-
uomValueVariance:
|
|
491
|
-
expirationDateVariance:
|
|
528
|
+
batchNoVariance: batchNoVariance,
|
|
529
|
+
locationVariance: locationVariance,
|
|
530
|
+
uomValueVariance: uomValueVariance,
|
|
531
|
+
expirationDateVariance: expirationDateVariance,
|
|
492
532
|
countVariance,
|
|
493
533
|
countStatus,
|
|
494
534
|
company: item.company,
|
|
@@ -536,10 +576,13 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
536
576
|
.pop()
|
|
537
577
|
|
|
538
578
|
const finalCount = latestCountKey ? groupedRecord[latestCountKey] : groupedRecord['systemQty']
|
|
539
|
-
|
|
579
|
+
let countVariance = finalCount - groupedRecord['systemQty']
|
|
540
580
|
|
|
541
581
|
let countStatus
|
|
542
|
-
if (
|
|
582
|
+
if (groupedRecord.countStatus === ORDER_STATUS.PENDING.value) {
|
|
583
|
+
countStatus = groupedRecord.countStatus
|
|
584
|
+
countVariance = groupedRecord.countVariance
|
|
585
|
+
} else if (finalCount === groupedRecord.systemQty) {
|
|
543
586
|
countStatus = 'HIT'
|
|
544
587
|
} else if (finalCount < groupedRecord.systemQty) {
|
|
545
588
|
countStatus = 'SHORT'
|
|
@@ -556,9 +599,6 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
556
599
|
})
|
|
557
600
|
total = Object.keys(groupedRecords).length
|
|
558
601
|
}
|
|
559
|
-
|
|
560
|
-
this._createDynamicColumns(records)
|
|
561
|
-
|
|
562
602
|
this._updateColumnVisibility()
|
|
563
603
|
this.updateContext()
|
|
564
604
|
return { records, total }
|
|
@@ -570,52 +610,6 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
570
610
|
}
|
|
571
611
|
}
|
|
572
612
|
|
|
573
|
-
_createDynamicColumns(records) {
|
|
574
|
-
if (records.length === 0) {
|
|
575
|
-
console.error('No records available')
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
this.config.columns = this.config.columns.filter(column => !column.name?.startsWith('count '))
|
|
580
|
-
|
|
581
|
-
const countColumns = Object.keys(records[0]).filter(key => key.startsWith('count '))
|
|
582
|
-
if (!countColumns.length) {
|
|
583
|
-
console.error('No count columns found in exampleRecord')
|
|
584
|
-
return
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
// Sorting the countColumns
|
|
588
|
-
countColumns.sort((a, b) => {
|
|
589
|
-
const numA = parseInt(a.split('_')[1])
|
|
590
|
-
const numB = parseInt(b.split('_')[1])
|
|
591
|
-
return numA - numB
|
|
592
|
-
})
|
|
593
|
-
|
|
594
|
-
const existingColumnNames = this.config.columns.map(column => column.name)
|
|
595
|
-
const dynamicColumns = countColumns
|
|
596
|
-
.filter(column => !existingColumnNames.includes(column))
|
|
597
|
-
.map(column => ({
|
|
598
|
-
type: 'integer',
|
|
599
|
-
name: column,
|
|
600
|
-
header: column,
|
|
601
|
-
width: 100
|
|
602
|
-
}))
|
|
603
|
-
|
|
604
|
-
if (dynamicColumns.length > 0) {
|
|
605
|
-
const originQtyColumnIndex = this.config.columns.findIndex(col => col.name === 'systemQty')
|
|
606
|
-
const finalCountColumnIndex = this.config.columns.findIndex(col => col.name === 'finalCount')
|
|
607
|
-
|
|
608
|
-
if (originQtyColumnIndex !== -1 && finalCountColumnIndex !== -1) {
|
|
609
|
-
this.config.columns.splice(originQtyColumnIndex + 1, 0, ...dynamicColumns)
|
|
610
|
-
} else {
|
|
611
|
-
console.warn('systemQty or finalCount columns not found. Appending count columns at the end.')
|
|
612
|
-
this.config.columns.push(...dynamicColumns)
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
this.grist.config = { ...this.config }
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
|
|
619
613
|
_updateColumnVisibility() {
|
|
620
614
|
if (this.config && this.config.columns) {
|
|
621
615
|
const uomValueVarianceColumn = this.config.columns.find(col => col.name === 'uomValueVariance')
|
|
@@ -9,14 +9,26 @@ import './tote-popup'
|
|
|
9
9
|
import './vas-list-popup'
|
|
10
10
|
|
|
11
11
|
import gql from 'graphql-tag'
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
css,
|
|
14
|
+
html
|
|
15
|
+
} from 'lit-element'
|
|
13
16
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
14
17
|
|
|
15
18
|
import { sleep } from '@operato/utils'
|
|
16
19
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
17
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
i18next,
|
|
22
|
+
localize
|
|
23
|
+
} from '@things-factory/i18n-base'
|
|
18
24
|
import { openPopup } from '@things-factory/layout-base'
|
|
19
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
client,
|
|
27
|
+
CustomAlert,
|
|
28
|
+
gqlContext,
|
|
29
|
+
PageView,
|
|
30
|
+
store
|
|
31
|
+
} from '@things-factory/shell'
|
|
20
32
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
21
33
|
import { isMobileDevice } from '@things-factory/utils'
|
|
22
34
|
|
|
@@ -453,7 +465,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
453
465
|
? html`${(this._enableInputQty == 1 && this._releaseGoodType) ||
|
|
454
466
|
(this._enableInputQty == 2 && !this._releaseGoodType) ||
|
|
455
467
|
this._enableInputQty == 3 ||
|
|
456
|
-
!this._isCartonLabel
|
|
468
|
+
!this._isCartonLabel ||
|
|
469
|
+
(this._isCartonLabel && !this._enableProductScanning)
|
|
457
470
|
? html`<label>${i18next.t('label.picked_qty')}</label>
|
|
458
471
|
<input
|
|
459
472
|
type="number"
|
|
@@ -1158,7 +1171,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1158
1171
|
mutation replenishmentPicking(
|
|
1159
1172
|
$worksheetDetailName: String!
|
|
1160
1173
|
$worksheetType: String!
|
|
1161
|
-
$productBarcode: String
|
|
1174
|
+
$productBarcode: String
|
|
1162
1175
|
$cartonId: String!
|
|
1163
1176
|
$binLocation: String
|
|
1164
1177
|
$serialNumber: String
|
|
@@ -1178,7 +1191,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1178
1191
|
variables: {
|
|
1179
1192
|
worksheetDetailName: this._selectedOrderInventory.name,
|
|
1180
1193
|
worksheetType: WORKSHEET_TYPE.PICKING_REPLENISHMENT.value,
|
|
1181
|
-
productBarcode: this.productBarcodeInput.value.trim(),
|
|
1194
|
+
productBarcode: this._enableProductScanning ? this.productBarcodeInput.value.trim() : null,
|
|
1182
1195
|
cartonId: this.cartonInput.value.trim(),
|
|
1183
1196
|
serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
|
|
1184
1197
|
binLocation: this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
|
|
@@ -338,12 +338,6 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
338
338
|
if (invalidRow) {
|
|
339
339
|
throw new Error(i18next.t('text.insufficient_storage_qty'))
|
|
340
340
|
}
|
|
341
|
-
|
|
342
|
-
invalidRow = this.dataGrist.selected.find(itm => !itm.transferQty || itm.transferQty <= 0 || isNaN(itm.transferQty))
|
|
343
|
-
|
|
344
|
-
if (invalidRow) {
|
|
345
|
-
throw new Error(i18next.t('text.invalid_transfer_qty'))
|
|
346
|
-
}
|
|
347
341
|
}
|
|
348
342
|
|
|
349
343
|
async _createReplenishment() {
|
|
@@ -356,12 +350,23 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
356
350
|
throw new Error(i18next.t('text.please_select_product_to_replenish'))
|
|
357
351
|
}
|
|
358
352
|
|
|
359
|
-
let result
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
353
|
+
let result
|
|
354
|
+
if (this.dataGrist.selected.some( itm => !itm.transferQty || itm.transferQty <= 0 || isNaN(itm.transferQty)) ) {
|
|
355
|
+
result = await CustomAlert({
|
|
356
|
+
title: i18next.t('title.are_you_sure'),
|
|
357
|
+
text: i18next.t('text.only_transfer_quantity_with_greater_than_zero'),
|
|
358
|
+
confirmButton: { text: i18next.t('button.submit') },
|
|
359
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
360
|
+
})
|
|
361
|
+
} else {
|
|
362
|
+
result = await CustomAlert({
|
|
363
|
+
title: i18next.t('title.are_you_sure'),
|
|
364
|
+
text: i18next.t('text.create_replenishment'),
|
|
365
|
+
confirmButton: { text: i18next.t('button.submit') },
|
|
366
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
367
|
+
})
|
|
368
|
+
}
|
|
369
|
+
|
|
365
370
|
|
|
366
371
|
if (!result.value) return
|
|
367
372
|
|
|
@@ -380,7 +385,7 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
380
385
|
})
|
|
381
386
|
|
|
382
387
|
if (!response.errors) {
|
|
383
|
-
navigate(`
|
|
388
|
+
navigate(`replenishment/list`)
|
|
384
389
|
showToast({ message: i18next.t('text.replenishment_created') })
|
|
385
390
|
}
|
|
386
391
|
} catch (e) {
|
|
@@ -456,7 +461,9 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
456
461
|
}
|
|
457
462
|
|
|
458
463
|
async _getOrderInventories() {
|
|
459
|
-
const orderInventories = this.dataGrist.selected
|
|
464
|
+
const orderInventories = this.dataGrist.selected
|
|
465
|
+
.filter(record => record.transferQty > 0)
|
|
466
|
+
.map(record => {
|
|
460
467
|
let newRecord = {
|
|
461
468
|
bizplaceId: record.bizplace.id,
|
|
462
469
|
releaseQty: record.transferQty,
|
|
@@ -579,10 +586,10 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
579
586
|
!itm.productSKU ||
|
|
580
587
|
!itm.packingType ||
|
|
581
588
|
!itm.packingSize ||
|
|
582
|
-
|
|
589
|
+
itm.pickingShelfQty == null ||
|
|
583
590
|
!itm.storageQty ||
|
|
584
591
|
!itm.minQty ||
|
|
585
|
-
|
|
592
|
+
itm.transferQty == null ||
|
|
586
593
|
''
|
|
587
594
|
) {
|
|
588
595
|
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
@@ -590,20 +597,21 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
590
597
|
if (isNaN(itm.pickingShelfQty) || isNaN(itm.storageQty) || isNaN(itm.minQty) || isNaN(itm.transferQty)) {
|
|
591
598
|
throw new Error(i18next.t('text.invalid_value_in_list'))
|
|
592
599
|
}
|
|
593
|
-
if (itm.pickingShelfQty <
|
|
600
|
+
if (itm.pickingShelfQty < 0 || itm.storageQty < 1 || itm.minQty < 1 || itm.transferQty < 0) {
|
|
594
601
|
throw new Error(i18next.t('text.invalid_value_in_list'))
|
|
595
602
|
}
|
|
596
603
|
})
|
|
597
604
|
|
|
598
605
|
patches.forEach(patch => {
|
|
599
|
-
const record = this.dataGrist.dirtyData.records.find(record => record.productSKU === patch.productSKU)
|
|
606
|
+
const record = this.dataGrist.dirtyData.records.find(record => record.productSKU === patch.productSKU && record.packingType === patch.packingType)
|
|
600
607
|
if (record) {
|
|
601
608
|
record.transferQty = parseInt(patch.transferQty)
|
|
602
609
|
}
|
|
603
610
|
})
|
|
604
611
|
|
|
605
612
|
history.back()
|
|
606
|
-
this.dataGrist.
|
|
613
|
+
this.dataGrist.records = patches
|
|
614
|
+
this.dataGrist.refresh()
|
|
607
615
|
} catch (e) {
|
|
608
616
|
showToast(e)
|
|
609
617
|
}
|
|
@@ -614,7 +622,13 @@ class Replenishment extends localize(i18next)(PageView) {
|
|
|
614
622
|
openPopup(
|
|
615
623
|
html`
|
|
616
624
|
<import-pop-up
|
|
617
|
-
.records=${records
|
|
625
|
+
.records=${records.map(record => {
|
|
626
|
+
return {
|
|
627
|
+
...record,
|
|
628
|
+
transferQty: record.transferQty ? record.transferQty : 0,
|
|
629
|
+
pickingShelfQty: record.pickingShelfQty ? record.pickingShelfQty : 0
|
|
630
|
+
}
|
|
631
|
+
})}
|
|
618
632
|
.config=${{
|
|
619
633
|
rows: this.config.rows,
|
|
620
634
|
columns: this.config.columns
|
package/client/route.js
CHANGED
|
@@ -338,7 +338,7 @@ export default function route(page) {
|
|
|
338
338
|
return page
|
|
339
339
|
|
|
340
340
|
case 'putaway':
|
|
341
|
-
import('./pages/inbound/putaway-product')
|
|
341
|
+
import('./pages/inbound/putaway/putaway-product')
|
|
342
342
|
return page
|
|
343
343
|
|
|
344
344
|
case 'worksheet_unloading':
|
|
@@ -346,7 +346,7 @@ export default function route(page) {
|
|
|
346
346
|
return page
|
|
347
347
|
|
|
348
348
|
case 'worksheet_putaway':
|
|
349
|
-
import('./pages/inbound/worksheet-putaway')
|
|
349
|
+
import('./pages/inbound/putaway/worksheet-putaway')
|
|
350
350
|
return page
|
|
351
351
|
|
|
352
352
|
case 'worksheet_unloading_return':
|
|
@@ -354,7 +354,7 @@ export default function route(page) {
|
|
|
354
354
|
return page
|
|
355
355
|
|
|
356
356
|
case 'worksheet_putaway_return':
|
|
357
|
-
import('./pages/inbound/worksheet-putaway-return')
|
|
357
|
+
import('./pages/inbound/putaway/worksheet-putaway-return')
|
|
358
358
|
return page
|
|
359
359
|
|
|
360
360
|
//vas
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.551",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.535",
|
|
92
92
|
"@things-factory/product-base": "^4.3.535",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.535",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.551",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.534",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.534",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.534",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.535",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.535",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.535",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.551",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.551"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.534",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "0c07b711097eae74c8d75c938c9d9580d2fdf4ab"
|
|
121
121
|
}
|