@things-factory/operato-wms 4.3.185 → 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 +12 -12
- 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
|
@@ -10,6 +10,7 @@ export const WAREHOUSE_RETURN = { name: 'warehouse_return', value: 'WAREHOUSE_RE
|
|
|
10
10
|
export const CUSTOMER_RETURN = { name: 'customer_return', value: 'CUSTOMER_RETURN' }
|
|
11
11
|
export const RETURN_ORDER = { name: 'return_order', value: 'RETURN_ORDER' }
|
|
12
12
|
export const REVERSE_KITTING_ORDER = { name: 'reverse_kitting_order', value: 'REVERSE_KITTING_ORDER' }
|
|
13
|
+
export const REPLENISHMENT = { name: 'replenishment', value: 'REPLENISHMENT' }
|
|
13
14
|
|
|
14
15
|
export const ORDER_TYPES = {
|
|
15
16
|
ARRIVAL_NOTICE,
|
|
@@ -21,7 +22,8 @@ export const ORDER_TYPES = {
|
|
|
21
22
|
CYCLE_COUNT,
|
|
22
23
|
TRANSFER_ORDER,
|
|
23
24
|
RETURN_ORDER,
|
|
24
|
-
REVERSE_KITTING_ORDER
|
|
25
|
+
REVERSE_KITTING_ORDER,
|
|
26
|
+
REPLENISHMENT
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export const ORDER_SOURCES = {
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
2
|
+
import { navigate } from '@things-factory/shell'
|
|
3
|
+
export const REPLENISHMENT_CONFIG = {
|
|
4
|
+
CREATE: {
|
|
5
|
+
list: {
|
|
6
|
+
fields: [
|
|
7
|
+
'bizplace',
|
|
8
|
+
'productSku',
|
|
9
|
+
'packingType',
|
|
10
|
+
'packingSize',
|
|
11
|
+
'pickingShelfQty',
|
|
12
|
+
'storageQty',
|
|
13
|
+
'minQty',
|
|
14
|
+
'transferQty'
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
pagination: { limit: 100, pages: [100, 200, 500, 1000] },
|
|
18
|
+
rows: { selectable: { multiple: true } },
|
|
19
|
+
columns: [
|
|
20
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
21
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
22
|
+
{
|
|
23
|
+
type: 'object',
|
|
24
|
+
name: 'bizplace',
|
|
25
|
+
header: i18next.t('field.company'),
|
|
26
|
+
label: true,
|
|
27
|
+
sortable: true,
|
|
28
|
+
width: 250
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'string',
|
|
32
|
+
name: 'productSKU',
|
|
33
|
+
header: i18next.t('field.sku'),
|
|
34
|
+
width: 200
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'string',
|
|
38
|
+
name: 'packingType',
|
|
39
|
+
header: i18next.t('field.packing_type'),
|
|
40
|
+
width: 150
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'string',
|
|
44
|
+
name: 'packingSize',
|
|
45
|
+
header: i18next.t('field.packing_size'),
|
|
46
|
+
width: 150
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'integer',
|
|
50
|
+
name: 'pickingShelfQty',
|
|
51
|
+
header: i18next.t('field.picking_shelf_qty'),
|
|
52
|
+
width: 150
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'integer',
|
|
56
|
+
name: 'storageQty',
|
|
57
|
+
header: i18next.t('field.storage_qty'),
|
|
58
|
+
width: 150
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'integer',
|
|
62
|
+
name: 'minQty',
|
|
63
|
+
header: i18next.t('field.min_qty'),
|
|
64
|
+
width: 150
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'integer',
|
|
68
|
+
name: 'transferQty',
|
|
69
|
+
header: i18next.t('field.transfer_qty'),
|
|
70
|
+
record: { editable: true },
|
|
71
|
+
width: 150
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
LIST: {
|
|
76
|
+
list: {
|
|
77
|
+
fields: ['orderNo', 'type', 'status', 'assignedPicker', 'createdAt', 'startedAt', 'endedAt', 'updater']
|
|
78
|
+
},
|
|
79
|
+
pagination: { limit: 100, pages: [100, 200, 500, 1000] },
|
|
80
|
+
rows: { selectable: { multiple: true } },
|
|
81
|
+
columns: [
|
|
82
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
83
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
84
|
+
{
|
|
85
|
+
type: 'gutter',
|
|
86
|
+
gutterName: 'button',
|
|
87
|
+
icon: 'reorder',
|
|
88
|
+
handlers: {
|
|
89
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
90
|
+
navigate(`replenishment_detail/${record.name}`)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'string',
|
|
96
|
+
name: 'name',
|
|
97
|
+
header: i18next.t('field.order_no'),
|
|
98
|
+
width: 150
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: 'string',
|
|
102
|
+
name: 'status',
|
|
103
|
+
header: i18next.t('field.status'),
|
|
104
|
+
width: 150
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'datetime',
|
|
108
|
+
name: 'createdAt',
|
|
109
|
+
header: i18next.t('field.created_at'),
|
|
110
|
+
width: 150
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'object',
|
|
114
|
+
name: 'creator',
|
|
115
|
+
header: i18next.t('field.created_by'),
|
|
116
|
+
width: 150
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
DETAIL: {
|
|
121
|
+
list: {
|
|
122
|
+
fields: ['cartonId', 'sku', 'product.name', 'storageLocation', 'transferQty', 'status', 'updater']
|
|
123
|
+
},
|
|
124
|
+
pagination: { infinite: true },
|
|
125
|
+
rows: { selectable: { multiple: true } },
|
|
126
|
+
columns: [
|
|
127
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
128
|
+
{
|
|
129
|
+
type: 'object',
|
|
130
|
+
name: 'bizplace',
|
|
131
|
+
header: i18next.t('field.company'),
|
|
132
|
+
width: 150
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'string',
|
|
136
|
+
name: 'productSKU',
|
|
137
|
+
header: i18next.t('field.sku'),
|
|
138
|
+
width: 150
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'string',
|
|
142
|
+
name: 'packingType',
|
|
143
|
+
header: i18next.t('field.packing_type'),
|
|
144
|
+
width: 150
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'string',
|
|
148
|
+
name: 'packingSize',
|
|
149
|
+
header: i18next.t('field.packing_size'),
|
|
150
|
+
width: 150
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: 'integer',
|
|
154
|
+
name: 'transferQty',
|
|
155
|
+
header: i18next.t('field.transfer_qty'),
|
|
156
|
+
record: { editable: true },
|
|
157
|
+
width: 150
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const REPLENISHMENT_STATUS = {
|
|
2
|
+
PENDING_WORKSHEET: {
|
|
3
|
+
name: 'pending worksheet',
|
|
4
|
+
value: 'PENDING_WORKSHEET'
|
|
5
|
+
},
|
|
6
|
+
READY_TO_PICK: {
|
|
7
|
+
name: 'ready to pick',
|
|
8
|
+
value: 'PENDING_WORKSHEET'
|
|
9
|
+
},
|
|
10
|
+
PICKING: {
|
|
11
|
+
name: 'picking',
|
|
12
|
+
value: 'PENDING_WORKSHEET'
|
|
13
|
+
},
|
|
14
|
+
PUTAWAY: {
|
|
15
|
+
name: 'putaway',
|
|
16
|
+
value: 'PENDING_WORKSHEET'
|
|
17
|
+
},
|
|
18
|
+
CANCELLED: {
|
|
19
|
+
name: 'cancelled',
|
|
20
|
+
value: 'PENDING_WORKSHEET'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
2
|
+
export const WORKSHEET_REPLENISHMENT_CONFIG = {
|
|
3
|
+
LIST: {
|
|
4
|
+
list: {
|
|
5
|
+
fields: ['orderNo', 'type', 'status', 'assignedPicker', 'createdAt', 'startedAt', 'endedAt', 'updater']
|
|
6
|
+
},
|
|
7
|
+
pagination: { limit: 100, pages: [100, 200, 500, 1000] },
|
|
8
|
+
rows: { selectable: { multiple: true } },
|
|
9
|
+
columns: [
|
|
10
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
11
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
12
|
+
{
|
|
13
|
+
type: 'gutter',
|
|
14
|
+
gutterName: 'button',
|
|
15
|
+
icon: 'reorder',
|
|
16
|
+
handlers: {
|
|
17
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
18
|
+
navigate(`replenishment/detail/${record.name}`) // 1. move to rejected detail page
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'string',
|
|
24
|
+
name: 'orderNo',
|
|
25
|
+
header: i18next.t('field.order_no'),
|
|
26
|
+
width: 150
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: 'string',
|
|
30
|
+
name: 'type',
|
|
31
|
+
header: i18next.t('field.type'),
|
|
32
|
+
width: 150
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'string',
|
|
36
|
+
name: 'status',
|
|
37
|
+
header: i18next.t('field.status'),
|
|
38
|
+
width: 150
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'string',
|
|
42
|
+
name: 'assignedPicker',
|
|
43
|
+
header: i18next.t('field.assigned_picker'),
|
|
44
|
+
width: 150
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'datetime',
|
|
48
|
+
name: 'createdAt',
|
|
49
|
+
header: i18next.t('field.created_at'),
|
|
50
|
+
width: 150
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'datetime',
|
|
54
|
+
name: 'startedAt',
|
|
55
|
+
header: i18next.t('field.started_at'),
|
|
56
|
+
width: 150
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'datetime',
|
|
60
|
+
name: 'endedAt',
|
|
61
|
+
header: i18next.t('field.ended_at'),
|
|
62
|
+
width: 150
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'string',
|
|
66
|
+
name: 'updater',
|
|
67
|
+
header: i18next.t('field.updater'),
|
|
68
|
+
width: 150
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
DETAIL: {
|
|
73
|
+
list: {
|
|
74
|
+
fields: ['cartonId', 'sku', 'product.name', 'storageLocation', 'transferQty', 'status', 'updater']
|
|
75
|
+
},
|
|
76
|
+
pagination: { limit: 100, pages: [100, 200, 500, 1000] },
|
|
77
|
+
rows: { selectable: { multiple: true } },
|
|
78
|
+
columns: [
|
|
79
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
80
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
81
|
+
{
|
|
82
|
+
type: 'string',
|
|
83
|
+
name: 'cartonId',
|
|
84
|
+
header: i18next.t('field.carton_id'),
|
|
85
|
+
width: 150
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'string',
|
|
89
|
+
name: 'sku',
|
|
90
|
+
header: i18next.t('field.sku'),
|
|
91
|
+
width: 150
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'object',
|
|
95
|
+
name: 'product.name',
|
|
96
|
+
header: i18next.t('field.product'),
|
|
97
|
+
width: 150
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'string',
|
|
101
|
+
name: 'storageLocation',
|
|
102
|
+
header: i18next.t('field.storage_location'),
|
|
103
|
+
width: 150
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'integer',
|
|
107
|
+
name: 'transferQty',
|
|
108
|
+
header: i18next.t('field.transfer_qty'),
|
|
109
|
+
width: 150
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'string',
|
|
113
|
+
name: 'status',
|
|
114
|
+
header: i18next.t('field.status'),
|
|
115
|
+
width: 150
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -56,6 +56,14 @@ export const WORKSHEET_TYPE = {
|
|
|
56
56
|
SORTING: {
|
|
57
57
|
name: i18next.t('label.sorting'),
|
|
58
58
|
value: 'SORTING'
|
|
59
|
+
},
|
|
60
|
+
PICKING_REPLENISHMENT: {
|
|
61
|
+
name: i18next.t('label.picking_replenishment'),
|
|
62
|
+
value: 'PICKING_REPLENISHMENT'
|
|
63
|
+
},
|
|
64
|
+
PUTAWAY_REPLENISHMENT: {
|
|
65
|
+
name: i18next.t('label.putaway_replenishment'),
|
|
66
|
+
value: 'PUTAWAY_REPLENISHMENT'
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
|
|
@@ -18,14 +18,14 @@ import { CommonButtonStyles } from '@things-factory/styles'
|
|
|
18
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
19
19
|
|
|
20
20
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
21
|
-
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, WORKSHEET_STATUS } from '../constants'
|
|
21
|
+
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, WORKSHEET_STATUS, REPLENISHMENT } from '../constants'
|
|
22
22
|
|
|
23
23
|
const OPERATION_TYPE = {
|
|
24
24
|
PUTAWAY: 'putaway',
|
|
25
25
|
TRANSFER: 'transfer'
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN }
|
|
28
|
+
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, REPLENISHMENT }
|
|
29
29
|
|
|
30
30
|
class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
31
31
|
static get properties() {
|
|
@@ -377,7 +377,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
377
377
|
this._selectedTaskStatus = record.status
|
|
378
378
|
this.recommendLocationName = null
|
|
379
379
|
|
|
380
|
-
if (
|
|
380
|
+
if (
|
|
381
|
+
!record.completed &&
|
|
382
|
+
this.refOrderType !== AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value &&
|
|
383
|
+
this.refOrderType !== AVAIL_ORDER_TYPES.REPLENISHMENT.value
|
|
384
|
+
) {
|
|
381
385
|
this.recommendLocationName = (await this._getLocationRecommendation(record.name)) || null
|
|
382
386
|
}
|
|
383
387
|
|
|
@@ -675,10 +679,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
675
679
|
})
|
|
676
680
|
}
|
|
677
681
|
|
|
678
|
-
this._enableCartonLabel = await fetchSettingRule('enable-carton-label',
|
|
682
|
+
this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
|
|
679
683
|
if (this._enableCartonLabel) this._focusOnCartonInput()
|
|
680
684
|
else this._focusOnPalletInput()
|
|
681
|
-
|
|
682
685
|
this._completeHandler()
|
|
683
686
|
}
|
|
684
687
|
} else if (this.refOrderType === AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value) {
|
|
@@ -753,10 +756,98 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
753
756
|
})
|
|
754
757
|
}
|
|
755
758
|
|
|
756
|
-
this._enableCartonLabel = await fetchSettingRule('enable-carton-label',
|
|
759
|
+
this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
|
|
757
760
|
if (this._enableCartonLabel) this._focusOnCartonInput()
|
|
758
761
|
else this._focusOnPalletInput()
|
|
762
|
+
this._completeHandler()
|
|
763
|
+
}
|
|
764
|
+
} else if (this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
765
|
+
const response = await client.query({
|
|
766
|
+
query: gql`
|
|
767
|
+
query putawayReplenishmentWorksheet($replenishmentNo: String!) {
|
|
768
|
+
putawayReplenishmentWorksheet(replenishmentNo: $replenishmentNo) {
|
|
769
|
+
worksheetInfo {
|
|
770
|
+
status
|
|
771
|
+
replenishment {
|
|
772
|
+
name
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
worksheetDetailInfos {
|
|
776
|
+
name
|
|
777
|
+
palletId
|
|
778
|
+
cartonId
|
|
779
|
+
batchId
|
|
780
|
+
expirationDate
|
|
781
|
+
batchIdRef
|
|
782
|
+
product {
|
|
783
|
+
sku
|
|
784
|
+
name
|
|
785
|
+
description
|
|
786
|
+
expirationPeriod
|
|
787
|
+
}
|
|
788
|
+
qty
|
|
789
|
+
status
|
|
790
|
+
description
|
|
791
|
+
targetName
|
|
792
|
+
packingType
|
|
793
|
+
packingSize
|
|
794
|
+
location {
|
|
795
|
+
name
|
|
796
|
+
description
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
`,
|
|
802
|
+
variables: { replenishmentNo: orderNo }
|
|
803
|
+
})
|
|
759
804
|
|
|
805
|
+
if (!response.errors) {
|
|
806
|
+
const worksheetInfo = response.data.putawayReplenishmentWorksheet.worksheetInfo
|
|
807
|
+
this._worksheetInfo = worksheetInfo
|
|
808
|
+
|
|
809
|
+
if (worksheetInfo?.replenishment) {
|
|
810
|
+
this._orderNo = worksheetInfo.replenishment.name
|
|
811
|
+
} else {
|
|
812
|
+
this._orderNo = orderNo
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
this.data = {
|
|
816
|
+
records: response.data.putawayReplenishmentWorksheet.worksheetDetailInfos
|
|
817
|
+
.map(record => {
|
|
818
|
+
let reusablePalletName = ''
|
|
819
|
+
if (record.reusablePallet) {
|
|
820
|
+
reusablePalletName = record.reusablePallet.name
|
|
821
|
+
}
|
|
822
|
+
return {
|
|
823
|
+
...record,
|
|
824
|
+
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
825
|
+
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
826
|
+
reusablePalletName: reusablePalletName,
|
|
827
|
+
sku: record.product.sku,
|
|
828
|
+
expirationPeriod: record.product.expirationPeriod,
|
|
829
|
+
expirationDate: record.expirationDate
|
|
830
|
+
}
|
|
831
|
+
})
|
|
832
|
+
.sort((a, b) => {
|
|
833
|
+
if (a.completed !== b.completed) {
|
|
834
|
+
if (a.completed) return 1
|
|
835
|
+
if (b.completed) return -1
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
if (a.batchId > b.batchId) return 1
|
|
839
|
+
if (b.batchId < b.batchId) return -1
|
|
840
|
+
|
|
841
|
+
if (a.palletId > b.palletId) return 1
|
|
842
|
+
if (a.palletId < b.palletId) return -1
|
|
843
|
+
|
|
844
|
+
return 0
|
|
845
|
+
})
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
this._enableCartonLabel = await fetchSettingRule('enable-carton-label', null)
|
|
849
|
+
if (this._enableCartonLabel) this._focusOnCartonInput()
|
|
850
|
+
else this._focusOnPalletInput()
|
|
760
851
|
this._completeHandler()
|
|
761
852
|
}
|
|
762
853
|
}
|
|
@@ -782,13 +873,13 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
782
873
|
} else if (this._operationType === OPERATION_TYPE.TRANSFER) {
|
|
783
874
|
this._transfer()
|
|
784
875
|
}
|
|
785
|
-
} else if (this.
|
|
786
|
-
if (this.
|
|
876
|
+
} else if (this._operationType === OPERATION_TYPE.PUTAWAY) {
|
|
877
|
+
if (this.refOrderType === AVAIL_ORDER_TYPES.CUSTOMER_RETURN.value) {
|
|
787
878
|
this._customerReturnPutaway()
|
|
788
|
-
}
|
|
789
|
-
} else if (this.refOrderType === AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value) {
|
|
790
|
-
if (this._operationType === OPERATION_TYPE.PUTAWAY) {
|
|
879
|
+
} else if (this.refOrderType === AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value) {
|
|
791
880
|
this._warehouseReturnPutaway()
|
|
881
|
+
} else if (this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
882
|
+
this._replenishmentPutaway()
|
|
792
883
|
}
|
|
793
884
|
}
|
|
794
885
|
}
|
|
@@ -996,6 +1087,66 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
996
1087
|
}
|
|
997
1088
|
}
|
|
998
1089
|
|
|
1090
|
+
async _replenishmentPutaway() {
|
|
1091
|
+
if (this._scanning === false) {
|
|
1092
|
+
this._scanning = true
|
|
1093
|
+
try {
|
|
1094
|
+
const locationDetails = await this._fetchLocation(
|
|
1095
|
+
this.locationInput ? this.locationInput.value.trim() : this._selectedLocation.trim()
|
|
1096
|
+
)
|
|
1097
|
+
|
|
1098
|
+
let worksheetDetailNames = await this._getWorksheetDetailNames(locationDetails)
|
|
1099
|
+
|
|
1100
|
+
if (!worksheetDetailNames) {
|
|
1101
|
+
return (this._scanning = false)
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
const response = await client.mutate({
|
|
1105
|
+
mutation: gql`
|
|
1106
|
+
mutation replenishmentPutaway($worksheetDetailName: [String]!, $cartonId: String, $toLocation: String!) {
|
|
1107
|
+
replenishmentPutaway(
|
|
1108
|
+
worksheetDetailName: $worksheetDetailName
|
|
1109
|
+
cartonId: $cartonId
|
|
1110
|
+
toLocation: $toLocation
|
|
1111
|
+
)
|
|
1112
|
+
}
|
|
1113
|
+
`,
|
|
1114
|
+
variables: {
|
|
1115
|
+
worksheetDetailName: worksheetDetailNames,
|
|
1116
|
+
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
1117
|
+
toLocation: this.locationInput ? this.locationInput.value : this._selectedLocation
|
|
1118
|
+
}
|
|
1119
|
+
})
|
|
1120
|
+
|
|
1121
|
+
if (!response.errors) {
|
|
1122
|
+
this._fetchProducts(this._orderNo)
|
|
1123
|
+
if (this._enableCartonLabel) {
|
|
1124
|
+
this.cartonInput.value = ''
|
|
1125
|
+
this._focusOnCartonInput()
|
|
1126
|
+
} else {
|
|
1127
|
+
this.palletInput.value = ''
|
|
1128
|
+
this._focusOnPalletInput()
|
|
1129
|
+
}
|
|
1130
|
+
this.incompleteLocationName = false
|
|
1131
|
+
this._selectedTaskStatus = null
|
|
1132
|
+
this._selectedOrderProduct = null
|
|
1133
|
+
this.recommendLocationName = null
|
|
1134
|
+
if (this.locationInput) {
|
|
1135
|
+
this.locationInput.value = ''
|
|
1136
|
+
} else {
|
|
1137
|
+
this._selectedLocation = ''
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
} catch (e) {
|
|
1141
|
+
this._showToast(e)
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
this._scanning = false
|
|
1145
|
+
} else {
|
|
1146
|
+
this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
999
1150
|
async _transfer() {
|
|
1000
1151
|
try {
|
|
1001
1152
|
this._validateTransfer()
|
|
@@ -1369,6 +1520,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1369
1520
|
this._completeCustomerReturnPutaway()
|
|
1370
1521
|
} else if (this.refOrderType === AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value) {
|
|
1371
1522
|
this._completeWarehouseReturnPutaway()
|
|
1523
|
+
} else if (this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
1524
|
+
this._completeReplenishmentPutaway()
|
|
1372
1525
|
}
|
|
1373
1526
|
}
|
|
1374
1527
|
|
|
@@ -1435,6 +1588,27 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1435
1588
|
}
|
|
1436
1589
|
}
|
|
1437
1590
|
|
|
1591
|
+
async _completeReplenishmentPutaway() {
|
|
1592
|
+
const response = await client.mutate({
|
|
1593
|
+
mutation: gql`
|
|
1594
|
+
mutation completeReplenishmentPutaway($replenishmentNo: String!) {
|
|
1595
|
+
completeReplenishmentPutaway(replenishmentNo: $replenishmentNo)
|
|
1596
|
+
}
|
|
1597
|
+
`,
|
|
1598
|
+
variables: { replenishmentNo: this._orderNo }
|
|
1599
|
+
})
|
|
1600
|
+
|
|
1601
|
+
if (!response.errors) {
|
|
1602
|
+
this._clearView()
|
|
1603
|
+
this._orderNo = ''
|
|
1604
|
+
await CustomAlert({
|
|
1605
|
+
title: i18next.t('title.completed'),
|
|
1606
|
+
text: i18next.t('text.putaway_replenishment_completed'),
|
|
1607
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
1608
|
+
})
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1438
1612
|
orderTypeChangeHandler(e) {
|
|
1439
1613
|
this.refOrderType = e.currentTarget.value
|
|
1440
1614
|
this._clearView()
|
|
@@ -9,9 +9,9 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
9
9
|
import { client, store, CustomAlert } from '@things-factory/shell'
|
|
10
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
11
11
|
|
|
12
|
-
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN } from '../constants'
|
|
12
|
+
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, REPLENISHMENT } from '../constants'
|
|
13
13
|
|
|
14
|
-
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN }
|
|
14
|
+
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, REPLENISHMENT }
|
|
15
15
|
|
|
16
16
|
class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
17
17
|
static get properties() {
|
|
@@ -214,6 +214,8 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
214
214
|
response = await this._undoArrivalNoticePutaway(selectedInventories)
|
|
215
215
|
} else if (this.orderType === AVAIL_ORDER_TYPES.CUSTOMER_RETURN.value) {
|
|
216
216
|
response = await this._undoCustomerReturnPutaway(selectedInventories)
|
|
217
|
+
} else if (this.orderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
218
|
+
response = await this._undoReplenishmentPutaway(selectedInventories)
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
if (response && !response?.errors) {
|
|
@@ -328,6 +330,41 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
|
|
333
|
+
async _undoReplenishmentPutaway(selectedInventories) {
|
|
334
|
+
try {
|
|
335
|
+
if (selectedInventories.length > 1) {
|
|
336
|
+
const result = await CustomAlert({
|
|
337
|
+
title: i18next.t('title.are_you_sure'),
|
|
338
|
+
text: i18next.t('text.undo_putaway'),
|
|
339
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
340
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
341
|
+
})
|
|
342
|
+
|
|
343
|
+
if (!result?.value) {
|
|
344
|
+
return
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const response = await client.mutate({
|
|
349
|
+
mutation: gql`
|
|
350
|
+
mutation undoReplenishmentPutaway($worksheetDetailName: [String]!, $cartonId: String) {
|
|
351
|
+
undoReplenishmentPutaway(worksheetDetailName: $worksheetDetailName, cartonId: $cartonId)
|
|
352
|
+
}
|
|
353
|
+
`,
|
|
354
|
+
variables: {
|
|
355
|
+
worksheetDetailName: selectedInventories.map(inventory => inventory.name),
|
|
356
|
+
cartonId: this.enableCartonLabel ? selectedInventories[0].cartonId : null
|
|
357
|
+
}
|
|
358
|
+
})
|
|
359
|
+
|
|
360
|
+
if (!response.errors) {
|
|
361
|
+
return response
|
|
362
|
+
}
|
|
363
|
+
} catch (e) {
|
|
364
|
+
this._showToast(e)
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
331
368
|
_focusOnLotInput() {
|
|
332
369
|
setTimeout(() => this.lotInput.focus(), 100)
|
|
333
370
|
}
|