@things-factory/operato-wms 4.3.186 → 4.3.187
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/constants/index.js +3 -0
- package/client/pages/constants/location.js +4 -0
- package/client/pages/constants/order.js +3 -1
- package/client/pages/constants/replenishment-config.js +161 -0
- package/client/pages/constants/replenishment.js +22 -0
- package/client/pages/constants/worksheet-replenishment-config.js +119 -0
- package/client/pages/constants/worksheet.js +8 -0
- package/client/pages/inbound/putaway-product.js +185 -11
- package/client/pages/inbound/undo-putaway-popup.js +39 -2
- package/client/pages/inbound/unload-product.js +126 -14
- package/client/pages/inventory/inventory-by-product.js +23 -1
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +7 -0
- package/client/pages/outbound/picking-product.js +104 -32
- package/client/pages/replenishment/replenishment-detail.js +429 -0
- package/client/pages/replenishment/replenishment-worksheet-list.js +470 -0
- package/client/pages/replenishment/replenishment.js +510 -0
- package/client/pages/replenishment/worksheet-replenishment.js +414 -0
- package/client/route.js +17 -0
- package/config.development.js +28 -21
- package/helps/release-note.ko.md +4 -4
- package/helps/release-note.md +4 -4
- package/helps/release-note.ms.md +4 -4
- package/helps/release-note.zh.md +4 -4
- package/package.json +6 -6
- package/things-factory.config.js +18 -0
- package/translations/en.json +35 -9
- package/translations/ko.json +26 -1
- package/translations/ms.json +26 -1
- package/translations/zh.json +26 -1
- package/config.production.js +0 -104
|
@@ -179,7 +179,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
179
179
|
return {
|
|
180
180
|
title: i18next.t('title.unloading'),
|
|
181
181
|
help: 'operato-wms/inbound/unload-product',
|
|
182
|
-
actions
|
|
182
|
+
actions,
|
|
183
|
+
exportable: {
|
|
184
|
+
name: i18next.t('title.unloading'),
|
|
185
|
+
data: this._exportableData.bind(this)
|
|
186
|
+
}
|
|
183
187
|
}
|
|
184
188
|
}
|
|
185
189
|
|
|
@@ -500,91 +504,169 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
500
504
|
type: 'boolean',
|
|
501
505
|
name: 'validity',
|
|
502
506
|
header: i18next.t('field.validity'),
|
|
503
|
-
width: 40
|
|
507
|
+
width: 40,
|
|
508
|
+
imex: {
|
|
509
|
+
type: 'boolean',
|
|
510
|
+
key: 'validity',
|
|
511
|
+
header: i18next.t('field.validity'),
|
|
512
|
+
width: 10
|
|
513
|
+
}
|
|
504
514
|
},
|
|
505
515
|
{
|
|
506
516
|
type: 'string',
|
|
507
517
|
name: 'batchId',
|
|
508
518
|
label: true,
|
|
509
519
|
header: i18next.t('field.batch_id'),
|
|
510
|
-
width: 150
|
|
520
|
+
width: 150,
|
|
521
|
+
imex: {
|
|
522
|
+
type: 'string',
|
|
523
|
+
key: 'batchId',
|
|
524
|
+
header: i18next.t('field.batch_id'),
|
|
525
|
+
width: 35
|
|
526
|
+
}
|
|
511
527
|
},
|
|
512
528
|
{
|
|
513
529
|
type: 'string',
|
|
514
530
|
name: 'batchIdRef',
|
|
515
531
|
label: true,
|
|
516
532
|
header: i18next.t('field.batch_no_ref'),
|
|
517
|
-
width: 150
|
|
533
|
+
width: 150,
|
|
534
|
+
imex: {
|
|
535
|
+
type: 'string',
|
|
536
|
+
key: 'batchIdRef',
|
|
537
|
+
header: i18next.t('field.batch_no_ref'),
|
|
538
|
+
width: 35
|
|
539
|
+
}
|
|
518
540
|
},
|
|
519
541
|
{
|
|
520
542
|
type: 'string',
|
|
521
543
|
name: 'sku',
|
|
522
544
|
label: true,
|
|
523
545
|
header: i18next.t('field.sku'),
|
|
524
|
-
width: 120
|
|
546
|
+
width: 120,
|
|
547
|
+
imex: {
|
|
548
|
+
type: 'string',
|
|
549
|
+
key: 'sku',
|
|
550
|
+
header: i18next.t('field.sku'),
|
|
551
|
+
width: 30
|
|
552
|
+
}
|
|
525
553
|
},
|
|
526
554
|
{
|
|
527
555
|
type: 'object',
|
|
528
556
|
name: 'product',
|
|
529
557
|
label: true,
|
|
530
558
|
header: i18next.t('field.product'),
|
|
531
|
-
width: 200
|
|
559
|
+
width: 200,
|
|
560
|
+
imex: {
|
|
561
|
+
type: 'string',
|
|
562
|
+
key: 'product.name',
|
|
563
|
+
header: i18next.t('field.product'),
|
|
564
|
+
width: 60
|
|
565
|
+
}
|
|
532
566
|
},
|
|
533
567
|
{
|
|
534
568
|
type: 'string',
|
|
535
569
|
name: 'packingType',
|
|
536
570
|
label: true,
|
|
537
571
|
header: i18next.t('field.packing_type'),
|
|
538
|
-
width: 120
|
|
572
|
+
width: 120,
|
|
573
|
+
imex: {
|
|
574
|
+
type: 'string',
|
|
575
|
+
key: 'packingType',
|
|
576
|
+
header: i18next.t('field.packing_type'),
|
|
577
|
+
width: 30
|
|
578
|
+
}
|
|
539
579
|
},
|
|
540
580
|
{
|
|
541
581
|
type: 'number',
|
|
542
582
|
name: 'packingSize',
|
|
543
583
|
label: true,
|
|
544
584
|
header: i18next.t('field.packing_size'),
|
|
545
|
-
width: 120
|
|
585
|
+
width: 120,
|
|
586
|
+
imex: {
|
|
587
|
+
type: 'number',
|
|
588
|
+
key: 'packingSize',
|
|
589
|
+
header: i18next.t('field.packing_size'),
|
|
590
|
+
width: 30
|
|
591
|
+
}
|
|
546
592
|
},
|
|
547
593
|
{
|
|
548
594
|
type: 'integer',
|
|
549
595
|
name: 'palletQty',
|
|
550
596
|
label: true,
|
|
551
597
|
header: i18next.t('field.lot_qty'),
|
|
552
|
-
width: 90
|
|
598
|
+
width: 90,
|
|
599
|
+
imex: {
|
|
600
|
+
type: 'integer',
|
|
601
|
+
key: 'palletQty',
|
|
602
|
+
header: i18next.t('field.lot_qty'),
|
|
603
|
+
width: 20
|
|
604
|
+
}
|
|
553
605
|
},
|
|
554
606
|
{
|
|
555
607
|
type: 'integer',
|
|
556
608
|
name: 'actualPalletQty',
|
|
557
609
|
label: true,
|
|
558
610
|
header: i18next.t('field.actual_lot_qty'),
|
|
559
|
-
width: 100
|
|
611
|
+
width: 100,
|
|
612
|
+
imex: {
|
|
613
|
+
type: 'integer',
|
|
614
|
+
key: 'actualPalletQty',
|
|
615
|
+
header: i18next.t('field.actual_lot_qty'),
|
|
616
|
+
width: 25
|
|
617
|
+
}
|
|
560
618
|
},
|
|
561
619
|
{
|
|
562
620
|
type: 'integer',
|
|
563
621
|
name: 'packQty',
|
|
564
622
|
label: true,
|
|
565
623
|
header: i18next.t('field.total_pack_qty'),
|
|
566
|
-
width: 90
|
|
624
|
+
width: 90,
|
|
625
|
+
imex: {
|
|
626
|
+
type: 'integer',
|
|
627
|
+
key: 'packQty',
|
|
628
|
+
header: i18next.t('field.total_pack_qty'),
|
|
629
|
+
width: 20
|
|
630
|
+
}
|
|
567
631
|
},
|
|
568
632
|
{
|
|
569
633
|
type: 'integer',
|
|
570
634
|
name: 'actualPackQty',
|
|
571
635
|
label: true,
|
|
572
636
|
header: i18next.t('field.actual_pack_qty'),
|
|
573
|
-
width: 100
|
|
637
|
+
width: 100,
|
|
638
|
+
imex: {
|
|
639
|
+
type: 'integer',
|
|
640
|
+
key: 'actualPackQty',
|
|
641
|
+
header: i18next.t('field.actual_pack_qty'),
|
|
642
|
+
width: 25
|
|
643
|
+
}
|
|
574
644
|
},
|
|
575
645
|
{
|
|
576
646
|
type: 'date',
|
|
577
647
|
name: 'manufactureDate',
|
|
578
648
|
label: true,
|
|
579
649
|
header: i18next.t('field.manufacture_date'),
|
|
580
|
-
width: 100
|
|
650
|
+
width: 100,
|
|
651
|
+
imex: {
|
|
652
|
+
type: 'date',
|
|
653
|
+
key: 'manufactureDate',
|
|
654
|
+
header: i18next.t('field.manufacture_date'),
|
|
655
|
+
width: 25
|
|
656
|
+
}
|
|
581
657
|
},
|
|
582
658
|
{
|
|
583
659
|
type: 'string',
|
|
584
660
|
name: 'issue',
|
|
585
661
|
label: true,
|
|
586
662
|
header: i18next.t('field.issue'),
|
|
587
|
-
width: 100
|
|
663
|
+
width: 100,
|
|
664
|
+
imex: {
|
|
665
|
+
type: 'string',
|
|
666
|
+
key: 'issue',
|
|
667
|
+
header: i18next.t('field.issue'),
|
|
668
|
+
width: 25
|
|
669
|
+
}
|
|
588
670
|
}
|
|
589
671
|
]
|
|
590
672
|
}
|
|
@@ -1758,6 +1840,36 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1758
1840
|
this.orderNoInput.select()
|
|
1759
1841
|
}
|
|
1760
1842
|
|
|
1843
|
+
async _exportableData() {
|
|
1844
|
+
try {
|
|
1845
|
+
let records = this.orderProductData.records
|
|
1846
|
+
|
|
1847
|
+
var headerSetting = this.orderProductConfig.columns
|
|
1848
|
+
.filter(column => column.type !== 'gutter' && column.imex !== undefined)
|
|
1849
|
+
.map(column => {
|
|
1850
|
+
return column.imex
|
|
1851
|
+
})
|
|
1852
|
+
|
|
1853
|
+
var data = records.map(item => {
|
|
1854
|
+
return {
|
|
1855
|
+
id: item.id,
|
|
1856
|
+
...this.orderProductConfig.columns
|
|
1857
|
+
.filter(column => column.type !== 'gutter' && column.imex !== undefined)
|
|
1858
|
+
.reduce((record, column) => {
|
|
1859
|
+
record[column.imex.key] = column.imex.key
|
|
1860
|
+
.split('.')
|
|
1861
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
1862
|
+
return record
|
|
1863
|
+
}, {})
|
|
1864
|
+
}
|
|
1865
|
+
})
|
|
1866
|
+
|
|
1867
|
+
return { header: headerSetting, data }
|
|
1868
|
+
} catch (e) {
|
|
1869
|
+
this._showToast(e)
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1761
1873
|
_showToast({ type, message }) {
|
|
1762
1874
|
document.dispatchEvent(
|
|
1763
1875
|
new CustomEvent('notify', {
|
|
@@ -326,6 +326,22 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
326
326
|
header: i18next.t('field.obsolete_qty'),
|
|
327
327
|
label: true,
|
|
328
328
|
width: 120
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
type: 'integer',
|
|
332
|
+
name: 'storageQty',
|
|
333
|
+
imex: { header: i18next.t('field.storage_qty'), key: 'storageQty', width: 20, type: 'integer' },
|
|
334
|
+
header: i18next.t('field.storage_qty'),
|
|
335
|
+
label: true,
|
|
336
|
+
width: 120
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
type: 'integer',
|
|
340
|
+
name: 'transferQty',
|
|
341
|
+
imex: { header: i18next.t('field.transfer_qty'), key: 'transferQty', width: 20, type: 'integer' },
|
|
342
|
+
header: i18next.t('field.transfer_qty'),
|
|
343
|
+
label: true,
|
|
344
|
+
width: 120
|
|
329
345
|
}
|
|
330
346
|
]
|
|
331
347
|
}
|
|
@@ -360,6 +376,8 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
360
376
|
draftQty
|
|
361
377
|
warehouseQty
|
|
362
378
|
obsoleteQty
|
|
379
|
+
storageQty
|
|
380
|
+
transferQty
|
|
363
381
|
}
|
|
364
382
|
total
|
|
365
383
|
}
|
|
@@ -386,6 +404,8 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
386
404
|
record.draftQty = item.draftQty
|
|
387
405
|
record.bizplace = item.bizplace
|
|
388
406
|
record.obsoleteQty = item.obsoleteQty
|
|
407
|
+
record.transferQty = item.transferQty
|
|
408
|
+
record.storageQty = item.storageQty
|
|
389
409
|
|
|
390
410
|
return record
|
|
391
411
|
})
|
|
@@ -525,7 +545,9 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
525
545
|
reserveQty: item.reserveQty,
|
|
526
546
|
draftQty: item.draftQty,
|
|
527
547
|
warehouseQty: item.warehouseQty,
|
|
528
|
-
obsoleteQty: item.obsoleteQty
|
|
548
|
+
obsoleteQty: item.obsoleteQty,
|
|
549
|
+
storageQty: item.storageQty,
|
|
550
|
+
transferQty: item.transferQty
|
|
529
551
|
// averageUnitCost: item.averageUnitCost
|
|
530
552
|
}
|
|
531
553
|
})
|
|
@@ -698,6 +698,12 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
698
698
|
header: i18next.t('field.remark'),
|
|
699
699
|
record: { editable: this._editable },
|
|
700
700
|
width: 200
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
type: 'string',
|
|
704
|
+
name: 'status',
|
|
705
|
+
header: i18next.t('field.status'),
|
|
706
|
+
width: 200
|
|
701
707
|
}
|
|
702
708
|
]
|
|
703
709
|
}
|
|
@@ -834,6 +840,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
834
840
|
remainUomValue
|
|
835
841
|
remainUomValueWithUom
|
|
836
842
|
groupType
|
|
843
|
+
status
|
|
837
844
|
}
|
|
838
845
|
shippingOrder {
|
|
839
846
|
id
|
|
@@ -22,7 +22,14 @@ import { isMobileDevice } from '@things-factory/utils'
|
|
|
22
22
|
import { fetchLocationSortingRule } from '../../fetch-location-sorting-rule'
|
|
23
23
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
24
24
|
import { showToast } from '../../util/index'
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
BATCH_PICKING,
|
|
27
|
+
LOCATION_SORTING_RULE,
|
|
28
|
+
LOCATION_TYPE,
|
|
29
|
+
ORDER_SOURCES,
|
|
30
|
+
PICKING,
|
|
31
|
+
WORKSHEET_TYPE
|
|
32
|
+
} from '../constants'
|
|
26
33
|
|
|
27
34
|
const PICKING_TYPES = { PICKING, BATCH_PICKING }
|
|
28
35
|
class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -55,10 +62,11 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
55
62
|
orderNo: String,
|
|
56
63
|
refPickingType: String,
|
|
57
64
|
releaseGoodNo: String,
|
|
58
|
-
|
|
65
|
+
pickingOrderId: String,
|
|
59
66
|
worksheetNo: String,
|
|
60
67
|
toteNo: String,
|
|
61
|
-
_pageSettings: Object
|
|
68
|
+
_pageSettings: Object,
|
|
69
|
+
_isReplenishment: Boolean
|
|
62
70
|
}
|
|
63
71
|
}
|
|
64
72
|
|
|
@@ -128,7 +136,12 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
128
136
|
})
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
if (
|
|
139
|
+
if (
|
|
140
|
+
this.refPickingType === PICKING_TYPES.PICKING.value &&
|
|
141
|
+
this.releaseGoodNo &&
|
|
142
|
+
this._enableToteScanning &&
|
|
143
|
+
!this._isReplenishment
|
|
144
|
+
) {
|
|
132
145
|
actions.push({
|
|
133
146
|
title: i18next.t('button.tote'),
|
|
134
147
|
action: this.openTotePopup.bind(this),
|
|
@@ -136,7 +149,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
136
149
|
})
|
|
137
150
|
}
|
|
138
151
|
|
|
139
|
-
if (this.releaseGoodNo) {
|
|
152
|
+
if (this.releaseGoodNo && !this._isReplenishment) {
|
|
140
153
|
actions.push({
|
|
141
154
|
title: i18next.t('button.plastic_pallet'),
|
|
142
155
|
action: this.openPalletOutbound.bind(this),
|
|
@@ -145,7 +158,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
145
158
|
}
|
|
146
159
|
|
|
147
160
|
if (
|
|
148
|
-
(this.
|
|
161
|
+
(this.pickingOrderId || this.taskNo) &&
|
|
149
162
|
this._releaseGoodType === 'b2b' &&
|
|
150
163
|
this._selectedOrderInventory?.status !== 'MISSING' &&
|
|
151
164
|
this._selectedOrderInventory?.hasMissingInventoryChanges !== true &&
|
|
@@ -282,7 +295,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
282
295
|
this.locationNameSplit = []
|
|
283
296
|
this.refPickingType = PICKING_TYPES.PICKING.value
|
|
284
297
|
this.releaseGoodNo = ''
|
|
285
|
-
this.
|
|
298
|
+
this.pickingOrderId = ''
|
|
286
299
|
this.taskNo = ''
|
|
287
300
|
this._incompleteLocationName = false
|
|
288
301
|
this._isCartonLabel = false
|
|
@@ -297,6 +310,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
297
310
|
this._selectedOrderInventory = null
|
|
298
311
|
this.scannable = false
|
|
299
312
|
this._isLastUnit = false
|
|
313
|
+
this._isReplenishment = false
|
|
300
314
|
}
|
|
301
315
|
|
|
302
316
|
render() {
|
|
@@ -319,7 +333,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
319
333
|
</select>
|
|
320
334
|
<label>
|
|
321
335
|
${this.refPickingType === PICKING_TYPES.PICKING.value
|
|
322
|
-
? i18next.t('label.
|
|
336
|
+
? i18next.t('label.order_no')
|
|
323
337
|
: i18next.t('label.task_no')}
|
|
324
338
|
</label>
|
|
325
339
|
<barcode-scanable-input
|
|
@@ -350,9 +364,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
350
364
|
}
|
|
351
365
|
}
|
|
352
366
|
let [enableProductScanning, enableToteScanning, enableInputQty] = await Promise.all([
|
|
353
|
-
fetchSettingRule('enable-product-scanning', this._worksheetInfo
|
|
354
|
-
fetchSettingRule('enable-tote-scanning', this._worksheetInfo
|
|
355
|
-
fetchSettingRule('enable-input-qty', this._worksheetInfo
|
|
367
|
+
fetchSettingRule('enable-product-scanning', this._worksheetInfo?.partnerDomainId),
|
|
368
|
+
fetchSettingRule('enable-tote-scanning', this._worksheetInfo?.partnerDomainId),
|
|
369
|
+
fetchSettingRule('enable-input-qty', this._worksheetInfo?.partnerDomainId)
|
|
356
370
|
])
|
|
357
371
|
this._enableProductScanning = enableProductScanning
|
|
358
372
|
this._enableToteScanning = enableToteScanning
|
|
@@ -733,7 +747,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
733
747
|
this.inputForm.reset()
|
|
734
748
|
this._isRequireSerialNumberScanningOutbound = false
|
|
735
749
|
this.releaseGoodNo = null
|
|
736
|
-
this.
|
|
750
|
+
this.pickingOrderId = null
|
|
737
751
|
this.taskNo = null
|
|
738
752
|
this._crossDocking = false
|
|
739
753
|
this._selectedOrderInventory = null
|
|
@@ -779,19 +793,19 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
779
793
|
let response = {}
|
|
780
794
|
if (this.crossDocking) {
|
|
781
795
|
response = await this.pickCrossDocking()
|
|
782
|
-
} else if (this._enableProductScanning && this._isCartonLabel) {
|
|
796
|
+
} else if (this._enableProductScanning && this._isCartonLabel && !this._isReplenishment) {
|
|
783
797
|
response = await this.productBarcodePicking()
|
|
784
|
-
} else {
|
|
785
|
-
if (this.
|
|
786
|
-
|
|
787
|
-
throw new Error(i18next.t('text.lot_replacement_is_not_applicable_on_recall_release_order'))
|
|
788
|
-
} else {
|
|
789
|
-
this.openPalletReplacementPopup()
|
|
790
|
-
}
|
|
791
|
-
return
|
|
798
|
+
} else if (this._isReplacement && !this._isCartonLabel) {
|
|
799
|
+
if (this._isReleaseGoodRecall) {
|
|
800
|
+
throw new Error(i18next.t('text.lot_replacement_is_not_applicable_on_recall_release_order'))
|
|
792
801
|
} else {
|
|
793
|
-
|
|
802
|
+
this.openPalletReplacementPopup()
|
|
794
803
|
}
|
|
804
|
+
return
|
|
805
|
+
} else if (this._isReplenishment) {
|
|
806
|
+
response = await this.replenishmentPicking()
|
|
807
|
+
} else {
|
|
808
|
+
response = await this.pickCommonPicking()
|
|
795
809
|
}
|
|
796
810
|
|
|
797
811
|
if (!response.errors) {
|
|
@@ -865,7 +879,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
865
879
|
.orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"
|
|
866
880
|
.orderType="${i18next.t('text.outbound')}"
|
|
867
881
|
.orderSource="${ORDER_SOURCES.PICKING.value}"
|
|
868
|
-
.orderId="${this.
|
|
882
|
+
.orderId="${this.pickingOrderId}"
|
|
869
883
|
.data="${this?._selectedOrderInventory}"
|
|
870
884
|
@close-serial-number-popup="${async e => {
|
|
871
885
|
await this.fetchAll(this.releaseGoodNo)
|
|
@@ -1118,6 +1132,50 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1118
1132
|
}
|
|
1119
1133
|
}
|
|
1120
1134
|
|
|
1135
|
+
async replenishmentPicking() {
|
|
1136
|
+
if (this._isExecuting) throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
|
|
1137
|
+
this._isExecuting = true
|
|
1138
|
+
|
|
1139
|
+
try {
|
|
1140
|
+
return await client.mutate({
|
|
1141
|
+
mutation: gql`
|
|
1142
|
+
mutation replenishmentPicking(
|
|
1143
|
+
$worksheetDetailName: String!
|
|
1144
|
+
$worksheetType: String!
|
|
1145
|
+
$productBarcode: String!
|
|
1146
|
+
$cartonId: String!
|
|
1147
|
+
$binLocation: String
|
|
1148
|
+
$serialNumber: String
|
|
1149
|
+
$pickingQty: Int
|
|
1150
|
+
) {
|
|
1151
|
+
replenishmentPicking(
|
|
1152
|
+
worksheetDetailName: $worksheetDetailName
|
|
1153
|
+
worksheetType: $worksheetType
|
|
1154
|
+
productBarcode: $productBarcode
|
|
1155
|
+
cartonId: $cartonId
|
|
1156
|
+
binLocation: $binLocation
|
|
1157
|
+
serialNumber: $serialNumber
|
|
1158
|
+
pickingQty: $pickingQty
|
|
1159
|
+
)
|
|
1160
|
+
}
|
|
1161
|
+
`,
|
|
1162
|
+
variables: {
|
|
1163
|
+
worksheetDetailName: this._selectedOrderInventory.name,
|
|
1164
|
+
worksheetType: WORKSHEET_TYPE.PICKING_REPLENISHMENT.value,
|
|
1165
|
+
productBarcode: this.productBarcodeInput.value.trim(),
|
|
1166
|
+
cartonId: this.cartonInput.value.trim(),
|
|
1167
|
+
serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
|
|
1168
|
+
binLocation: this._hasBinPicking && (!this.toteNo || this.tote == '') ? this.binLocationInput.value : null,
|
|
1169
|
+
pickingQty: this.releaseQtyInput?.value ? parseInt(this.releaseQtyInput.value) : 1
|
|
1170
|
+
}
|
|
1171
|
+
})
|
|
1172
|
+
} catch (e) {
|
|
1173
|
+
throw e
|
|
1174
|
+
} finally {
|
|
1175
|
+
this._isExecuting = false
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1121
1179
|
async validatePicking() {
|
|
1122
1180
|
// validate for order selection
|
|
1123
1181
|
// pallet id existing
|
|
@@ -1404,8 +1462,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1404
1462
|
case PICKING_TYPES.PICKING.value:
|
|
1405
1463
|
response = await client.query({
|
|
1406
1464
|
query: gql`
|
|
1407
|
-
query pickingWorksheet($
|
|
1408
|
-
pickingWorksheet(
|
|
1465
|
+
query pickingWorksheet($orderNo: String!, $locationSortingRules: [Sorting!]) {
|
|
1466
|
+
pickingWorksheet(orderNo: $orderNo, locationSortingRules: $locationSortingRules) {
|
|
1409
1467
|
worksheetInfo {
|
|
1410
1468
|
releaseGood {
|
|
1411
1469
|
id
|
|
@@ -1414,6 +1472,10 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1414
1472
|
crossDocking
|
|
1415
1473
|
type
|
|
1416
1474
|
}
|
|
1475
|
+
replenishment {
|
|
1476
|
+
id
|
|
1477
|
+
name
|
|
1478
|
+
}
|
|
1417
1479
|
bizplaceName
|
|
1418
1480
|
partnerDomainId
|
|
1419
1481
|
refNo
|
|
@@ -1480,19 +1542,26 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1480
1542
|
}
|
|
1481
1543
|
}
|
|
1482
1544
|
`,
|
|
1483
|
-
variables: {
|
|
1545
|
+
variables: { orderNo: pickingRefNo, locationSortingRules: this.locationSortingRules }
|
|
1484
1546
|
})
|
|
1485
1547
|
|
|
1486
1548
|
if (!response.errors) {
|
|
1487
|
-
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1490
|
-
|
|
1549
|
+
let releaseGood = response.data.pickingWorksheet.worksheetInfo?.releaseGood
|
|
1550
|
+
let replenishment = response.data.pickingWorksheet.worksheetInfo?.replenishment
|
|
1551
|
+
|
|
1552
|
+
if (releaseGood) {
|
|
1553
|
+
this._isReleaseGoodRecall = response.data.pickingWorksheet.worksheetInfo.releaseGood.recall
|
|
1554
|
+
this.pickingOrderId = releaseGood.id
|
|
1555
|
+
this._releaseGoodType = releaseGood.type
|
|
1556
|
+
} else {
|
|
1557
|
+
this.pickingOrderId = replenishment.id
|
|
1558
|
+
this._isReplenishment = true
|
|
1559
|
+
}
|
|
1491
1560
|
|
|
1492
1561
|
if (!response.data?.pickingWorksheet) return
|
|
1493
1562
|
const { worksheetInfo, worksheetDetailInfos } = response.data.pickingWorksheet
|
|
1494
1563
|
this._crossDocking = worksheetInfo.releaseGood?._crossDocking
|
|
1495
|
-
this._bizplaceName = worksheetInfo
|
|
1564
|
+
this._bizplaceName = worksheetInfo?.bizplaceName
|
|
1496
1565
|
this._orderNo = this.releaseGoodNo
|
|
1497
1566
|
this._worksheetInfo = worksheetInfo
|
|
1498
1567
|
let data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
@@ -1578,6 +1647,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1578
1647
|
}
|
|
1579
1648
|
}
|
|
1580
1649
|
}
|
|
1650
|
+
|
|
1581
1651
|
break
|
|
1582
1652
|
|
|
1583
1653
|
case PICKING_TYPES.BATCH_PICKING.value:
|
|
@@ -1987,7 +2057,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1987
2057
|
this._bizplaceName = worksheetInfo.bizplaceName
|
|
1988
2058
|
this._crossDocking = worksheetInfo.releaseGood?._crossDocking
|
|
1989
2059
|
this.releaseGoodNo = worksheetInfo.releaseGood?.name
|
|
1990
|
-
this.
|
|
2060
|
+
this.pickingOrderId = worksheetInfo.releaseGood?.id
|
|
1991
2061
|
this._orderNo = this.releaseGoodNo
|
|
1992
2062
|
this._worksheetInfo = worksheetInfo
|
|
1993
2063
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
@@ -2084,6 +2154,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2084
2154
|
this._isCartonLabel = selectedRecords.hasCartonLabel
|
|
2085
2155
|
this._isRequireSerialNumberScanningOutbound = selectedRecords?.product?.isRequireSerialNumberScanningOutbound
|
|
2086
2156
|
}
|
|
2157
|
+
|
|
2158
|
+
massageReleaseGood(response) {}
|
|
2087
2159
|
}
|
|
2088
2160
|
|
|
2089
2161
|
window.customElements.define('picking-product', PickingProduct)
|