@things-factory/operato-wms 4.0.10 → 4.0.14
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/adjustment/transfer-inventory.js +368 -165
- package/client/pages/billing/claim-chit/claim-chit-list.js +7 -6
- package/client/pages/bulk-operation/bulk-operation.js +316 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +445 -0
- package/client/pages/components/select-product-popup.js +15 -2
- package/client/pages/constants/inventory.js +1 -0
- package/client/pages/constants/location.js +33 -6
- package/client/pages/constants/order.js +10 -0
- package/client/pages/constants/worksheet.js +2 -2
- package/client/pages/inbound/inbound-worksheet.js +78 -9
- package/client/pages/inbound/putaway-product.js +214 -139
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +24 -2
- package/client/pages/inbound/unload-product.js +149 -76
- package/client/pages/inbound/worksheet-putaway-return.js +22 -5
- package/client/pages/inbound/worksheet-putaway.js +21 -8
- package/client/pages/inbound/worksheet-unloading-return.js +22 -5
- package/client/pages/inbound/worksheet-unloading.js +8 -0
- package/client/pages/inventory/inventory-adjustment-approval.js +11 -19
- package/client/pages/inventory/inventory-adjustment.js +136 -101
- package/client/pages/inventory/inventory-by-product-detail.js +3 -5
- package/client/pages/inventory/inventory-by-product.js +8 -0
- package/client/pages/inventory/inventory-history-by-pallet.js +12 -5
- package/client/pages/inventory/inventory-history.js +14 -5
- package/client/pages/inventory/onhand-inventory.js +11 -2
- package/client/pages/inventory-check/create-cycle-count.js +12 -6
- package/client/pages/inventory-check/cycle-count-report.js +8 -0
- package/client/pages/inventory-check/inspecting-product.js +146 -80
- package/client/pages/inventory-check/worksheet-cycle-count.js +14 -0
- package/client/pages/manifest/create-loading-manifest.js +314 -0
- package/client/pages/manifest/dispatcher-verification-popup.js +86 -0
- package/client/pages/manifest/loading-manifest-detail.js +345 -0
- package/client/pages/manifest/loading-manifest-list.js +305 -0
- package/client/pages/master/location-list.js +58 -17
- package/client/pages/master/product/product-detail-bizplace-setting-popup.js +2 -2
- package/client/pages/master/product/product-details-popup.js +2 -2
- package/client/pages/master/product/product-list.js +5 -5
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +134 -115
- package/client/pages/order/arrival-notice/arrival-notice-list.js +87 -6
- package/client/pages/order/arrival-notice/arrival-notice-requests.js +83 -6
- package/client/pages/order/arrival-notice/assign-buffer-location.js +8 -1
- package/client/pages/order/arrival-notice/check-arrived-notice.js +9 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +38 -3
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +290 -25
- package/client/pages/order/arrival-notice/edit-product-popup.js +36 -5
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +8 -1
- package/client/pages/order/goods-received-note/received-note-list.js +138 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +45 -5
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +52 -12
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +244 -24
- package/client/pages/order/release-order/bulk-print-packing-list.js +23 -0
- package/client/pages/order/release-order/create-release-order.js +55 -8
- package/client/pages/order/release-order/receive-release-order-request.js +35 -24
- package/client/pages/order/release-order/release-extra-product-popup.js +204 -63
- package/client/pages/order/release-order/release-order-detail.js +301 -74
- package/client/pages/order/return-order/check-return-order.js +9 -1
- package/client/pages/order/return-order/create-return-order.js +14 -2
- package/client/pages/order/return-order/receive-return-order-requests.js +9 -1
- package/client/pages/order/return-order/return-order-detail.js +15 -6
- package/client/pages/order/return-order/return-order-inventory-popup.js +7 -0
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +124 -59
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +1 -6
- package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +239 -0
- package/client/pages/order/transport-order/delivery-order-list.js +102 -59
- package/client/pages/outbound/inventory-assign-popup.js +23 -6
- package/client/pages/outbound/inventory-auto-assign-popup.js +22 -6
- package/client/pages/outbound/loading-product.js +4 -1
- package/client/pages/outbound/merged-outbound-worksheet.js +43 -1
- package/client/pages/outbound/packing-product.js +4 -1
- package/client/pages/outbound/packing-worksheet-list.js +39 -1
- package/client/pages/outbound/picking-product.js +803 -431
- package/client/pages/outbound/picking-replacement-popup.js +1 -1
- package/client/pages/outbound/serial-number-popup.js +280 -0
- package/client/pages/outbound/single-outbound-worksheet.js +47 -1
- package/client/pages/outbound/worksheet-batch-picking.js +22 -8
- package/client/pages/outbound/worksheet-loading.js +22 -5
- package/client/pages/outbound/worksheet-packing.js +8 -0
- package/client/pages/outbound/worksheet-picking.js +62 -8
- package/client/pages/outbound/worksheet-return.js +9 -1
- package/client/pages/outbound/worksheet-sorting.js +9 -1
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +31 -30
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +23 -26
- package/client/pages/report/inventory-pallet-storage-report.js +11 -10
- package/client/pages/report/inventory-report.js +41 -43
- package/client/pages/report/inventory-summary-report.js +25 -28
- package/client/pages/report/product-label-report.js +401 -0
- package/client/pages/support/inventory-comparison.js +296 -0
- package/client/pages/vas/print-product-label.js +298 -132
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +38 -23
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +98 -15
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +129 -21
- package/client/pages/vas/vas-pallet-label-popup.js +5 -8
- package/client/route.js +28 -0
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +64 -54
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +34 -9
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/index.js +5 -1
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/inventory-comparison/index.js +6 -0
- package/dist-server/graphql/resolvers/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js +78 -0
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/product-label-report.js +56 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js +6 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +20 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -0
- package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js +1 -1
- package/dist-server/graphql/types/index.js +8 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/inventory-comparison/index.js +13 -0
- package/dist-server/graphql/types/inventory-comparison/index.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js +14 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js.map +1 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js +18 -0
- package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/product-label-report-list.js +14 -0
- package/dist-server/graphql/types/reports/product-label-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/product-label-report.js +16 -0
- package/dist-server/graphql/types/reports/product-label-report.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/index.js +10 -0
- package/dist-server/graphql/types/shipping-provider/index.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js +13 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +1 -0
- package/package.json +65 -65
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -2
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +75 -65
- package/server/graphql/resolvers/extra/add-release-good-products.ts +57 -15
- package/server/graphql/resolvers/index.ts +5 -1
- package/server/graphql/resolvers/inventory-comparison/index.ts +5 -0
- package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +99 -0
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/product-label-report.ts +56 -0
- package/server/graphql/resolvers/shipping-provider/index.ts +5 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +20 -0
- package/server/graphql/types/custom/elccl/elccl-inventory-report.ts +1 -1
- package/server/graphql/types/index.ts +8 -2
- package/server/graphql/types/inventory-comparison/index.ts +11 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison-list.ts +8 -0
- package/server/graphql/types/inventory-comparison/inventory-comparison.ts +12 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/product-label-report-list.ts +8 -0
- package/server/graphql/types/reports/product-label-report.ts +10 -0
- package/server/graphql/types/shipping-provider/index.ts +8 -0
- package/server/graphql/types/shipping-provider/shipping-provider-list.ts +7 -0
- package/server/graphql/types/shipping-provider/shipping-provider.ts +7 -0
- package/things-factory.config.js +30 -0
- package/translations/en.json +91 -11
- package/translations/ko.json +109 -11
- package/translations/ms.json +111 -12
- package/translations/zh.json +123 -26
|
@@ -8,7 +8,7 @@ import { getCodeByName } from '@things-factory/code-base'
|
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
9
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
10
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
-
import {
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
12
12
|
|
|
13
13
|
import { WORKSHEET_TYPE } from '../constants'
|
|
14
14
|
|
|
@@ -181,13 +181,24 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
181
181
|
|
|
182
182
|
this.config = {
|
|
183
183
|
list: {
|
|
184
|
-
fields: [
|
|
184
|
+
fields: [
|
|
185
|
+
'arrivalNotice',
|
|
186
|
+
'bizplace',
|
|
187
|
+
'type',
|
|
188
|
+
'arrivalRefNo',
|
|
189
|
+
'status',
|
|
190
|
+
'createdAt',
|
|
191
|
+
'startedAt',
|
|
192
|
+
'endedAt',
|
|
193
|
+
'updater',
|
|
194
|
+
'updatedAt'
|
|
195
|
+
]
|
|
185
196
|
},
|
|
186
|
-
rows: { appendable: false },
|
|
197
|
+
rows: { appendable: false, selectable: { multiple: true } },
|
|
187
198
|
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
188
199
|
columns: [
|
|
189
|
-
{ type: 'gutter', gutterName: 'dirty' },
|
|
190
200
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
201
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
191
202
|
{
|
|
192
203
|
type: 'gutter',
|
|
193
204
|
gutterName: 'button',
|
|
@@ -215,6 +226,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
215
226
|
type: 'object',
|
|
216
227
|
name: 'arrivalNotice',
|
|
217
228
|
header: i18next.t('field.arrival_notice'),
|
|
229
|
+
label: true,
|
|
218
230
|
sortable: true,
|
|
219
231
|
width: 160
|
|
220
232
|
},
|
|
@@ -222,6 +234,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
222
234
|
type: 'string',
|
|
223
235
|
name: 'arrivalRefNo',
|
|
224
236
|
header: i18next.t('field.ref_no'),
|
|
237
|
+
label: true,
|
|
225
238
|
sortable: true,
|
|
226
239
|
width: 120
|
|
227
240
|
},
|
|
@@ -229,12 +242,14 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
229
242
|
type: 'boolean',
|
|
230
243
|
name: 'crossDocking',
|
|
231
244
|
header: i18next.t('field.cross_docking'),
|
|
245
|
+
label: true,
|
|
232
246
|
width: 100
|
|
233
247
|
},
|
|
234
248
|
{
|
|
235
249
|
type: 'object',
|
|
236
250
|
name: 'bizplace',
|
|
237
251
|
header: i18next.t('field.company'),
|
|
252
|
+
label: true,
|
|
238
253
|
sortable: true,
|
|
239
254
|
width: 200
|
|
240
255
|
},
|
|
@@ -242,6 +257,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
242
257
|
type: 'string',
|
|
243
258
|
name: 'type',
|
|
244
259
|
header: i18next.t('field.type'),
|
|
260
|
+
label: true,
|
|
245
261
|
sortable: true,
|
|
246
262
|
width: 120
|
|
247
263
|
},
|
|
@@ -249,6 +265,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
249
265
|
type: 'string',
|
|
250
266
|
name: 'status',
|
|
251
267
|
header: i18next.t('field.status'),
|
|
268
|
+
label: true,
|
|
252
269
|
sortable: true,
|
|
253
270
|
width: 120
|
|
254
271
|
},
|
|
@@ -256,6 +273,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
256
273
|
type: 'datetime',
|
|
257
274
|
name: 'createdAt',
|
|
258
275
|
header: i18next.t('field.created_at'),
|
|
276
|
+
label: true,
|
|
259
277
|
sortable: true,
|
|
260
278
|
width: 160
|
|
261
279
|
},
|
|
@@ -263,6 +281,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
263
281
|
type: 'datetime',
|
|
264
282
|
name: 'startedAt',
|
|
265
283
|
header: i18next.t('field.started_at'),
|
|
284
|
+
label: true,
|
|
266
285
|
sortable: true,
|
|
267
286
|
width: 160
|
|
268
287
|
},
|
|
@@ -270,6 +289,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
270
289
|
type: 'datetime',
|
|
271
290
|
name: 'endedAt',
|
|
272
291
|
header: i18next.t('field.ended_at'),
|
|
292
|
+
label: true,
|
|
273
293
|
sortable: true,
|
|
274
294
|
width: 160
|
|
275
295
|
},
|
|
@@ -277,6 +297,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
277
297
|
type: 'object',
|
|
278
298
|
name: 'updater',
|
|
279
299
|
header: i18next.t('field.updater'),
|
|
300
|
+
label: true,
|
|
280
301
|
sortable: true,
|
|
281
302
|
width: 150
|
|
282
303
|
},
|
|
@@ -284,6 +305,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
284
305
|
type: 'datetime',
|
|
285
306
|
name: 'updatedAt',
|
|
286
307
|
header: i18next.t('field.updated_at'),
|
|
308
|
+
label: true,
|
|
287
309
|
sortable: true,
|
|
288
310
|
width: 200
|
|
289
311
|
}
|
|
@@ -311,7 +333,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
311
333
|
|
|
312
334
|
const response = await client.query({
|
|
313
335
|
query: gql`
|
|
314
|
-
query worksheets($filters: [Filter!]
|
|
336
|
+
query worksheets($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
|
|
315
337
|
worksheets(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
316
338
|
items {
|
|
317
339
|
id
|
|
@@ -416,12 +438,59 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
416
438
|
}
|
|
417
439
|
}
|
|
418
440
|
|
|
419
|
-
|
|
420
|
-
|
|
441
|
+
async _exportableData() {
|
|
442
|
+
try {
|
|
443
|
+
let data = []
|
|
444
|
+
|
|
445
|
+
var headerSetting = [
|
|
446
|
+
{ header: i18next.t('field.order_no'), key: 'orderNo', width: 25, type: 'string' },
|
|
447
|
+
{ header: i18next.t('field.company'), key: 'bizplaceName', width: 25, type: 'string' },
|
|
448
|
+
{ header: i18next.t('field.ref_no'), key: 'arrivalRefNo', width: 25, type: 'string' },
|
|
449
|
+
{ header: i18next.t('field.cross_docking'), key: 'crossDocking', width: 30, type: 'string' },
|
|
450
|
+
{ header: i18next.t('field.type'), key: 'type', width: 25, type: 'string' },
|
|
451
|
+
{ header: i18next.t('field.status'), key: 'status', width: 25, type: 'string' },
|
|
452
|
+
{ header: i18next.t('field.created_at'), key: 'createdAt', width: 30, type: 'date' },
|
|
453
|
+
{ header: i18next.t('field.started_at'), key: 'startedAt', width: 30, type: 'date' },
|
|
454
|
+
{ header: i18next.t('field.ended_at'), key: 'endedAt', width: 30, type: 'date' },
|
|
455
|
+
{ header: i18next.t('field.updated_at'), key: 'updatedAt', width: 30, type: 'date' },
|
|
456
|
+
{ header: i18next.t('field.updater'), key: 'updaterName', width: 25, type: 'string' }
|
|
457
|
+
]
|
|
458
|
+
|
|
459
|
+
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
460
|
+
data = this.dataGrist.selected.map(record => {
|
|
461
|
+
return {
|
|
462
|
+
...record,
|
|
463
|
+
orderNo: record.arrivalNotice?.name,
|
|
464
|
+
bizplaceName: record.bizplace?.name,
|
|
465
|
+
updaterName: record.updater?.name
|
|
466
|
+
}
|
|
467
|
+
})
|
|
468
|
+
} else {
|
|
469
|
+
data = (await this.fetchHandler({ page: 1, limit: 9999999 })).records.map(record => {
|
|
470
|
+
return {
|
|
471
|
+
...record,
|
|
472
|
+
orderNo: record.arrivalNotice?.name,
|
|
473
|
+
bizplaceName: record.bizplace?.name,
|
|
474
|
+
updaterName: record.updater?.name
|
|
475
|
+
}
|
|
476
|
+
})
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
return { header: headerSetting, data }
|
|
480
|
+
} catch (e) {
|
|
481
|
+
this._showToast(e)
|
|
482
|
+
}
|
|
421
483
|
}
|
|
422
484
|
|
|
423
|
-
|
|
424
|
-
|
|
485
|
+
_showToast({ type, message }) {
|
|
486
|
+
document.dispatchEvent(
|
|
487
|
+
new CustomEvent('notify', {
|
|
488
|
+
detail: {
|
|
489
|
+
type,
|
|
490
|
+
message
|
|
491
|
+
}
|
|
492
|
+
})
|
|
493
|
+
)
|
|
425
494
|
}
|
|
426
495
|
}
|
|
427
496
|
|
|
@@ -38,7 +38,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
38
38
|
_operationType: String,
|
|
39
39
|
incompleteLocationName: Boolean,
|
|
40
40
|
locations: Array,
|
|
41
|
-
recommendLocationName: String
|
|
41
|
+
recommendLocationName: String,
|
|
42
|
+
_scanning: Boolean,
|
|
43
|
+
_expirationPeriod: Number,
|
|
44
|
+
_expirationDate: Number,
|
|
45
|
+
_locationType: String
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -328,6 +332,10 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
328
332
|
this._selectedTaskStatus = null
|
|
329
333
|
this.recommendLocationName = null
|
|
330
334
|
this._operationType = OPERATION_TYPE.PUTAWAY
|
|
335
|
+
this._scanning = false
|
|
336
|
+
this._expirationPeriod = 0
|
|
337
|
+
this._expirationDate = 0
|
|
338
|
+
this._locationType = ''
|
|
331
339
|
}
|
|
332
340
|
|
|
333
341
|
get completed() {
|
|
@@ -496,6 +504,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
496
504
|
sku
|
|
497
505
|
name
|
|
498
506
|
description
|
|
507
|
+
expirationPeriod
|
|
499
508
|
}
|
|
500
509
|
qty
|
|
501
510
|
status
|
|
@@ -535,7 +544,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
535
544
|
...record,
|
|
536
545
|
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
537
546
|
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
538
|
-
reusablePalletName: reusablePalletName
|
|
547
|
+
reusablePalletName: reusablePalletName,
|
|
548
|
+
expirationPeriod: record.product.expirationPeriod,
|
|
549
|
+
expirationDate: record.expirationDate
|
|
539
550
|
}
|
|
540
551
|
})
|
|
541
552
|
.sort((a, b) => {
|
|
@@ -581,6 +592,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
581
592
|
name
|
|
582
593
|
description
|
|
583
594
|
sku
|
|
595
|
+
expirationPeriod
|
|
584
596
|
}
|
|
585
597
|
qty
|
|
586
598
|
status
|
|
@@ -619,7 +631,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
619
631
|
...record,
|
|
620
632
|
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
621
633
|
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
622
|
-
reusablePalletName: reusablePalletName
|
|
634
|
+
reusablePalletName: reusablePalletName,
|
|
635
|
+
expirationPeriod: record.product.expirationPeriod,
|
|
636
|
+
expirationDate: record.expirationDate
|
|
623
637
|
}
|
|
624
638
|
})
|
|
625
639
|
.sort((a, b) => {
|
|
@@ -778,166 +792,211 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
778
792
|
}
|
|
779
793
|
|
|
780
794
|
async _arrivalNoticePutaway() {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
if (this.
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
const response = await client.mutate({
|
|
789
|
-
mutation: gql`
|
|
790
|
-
mutation putaway(
|
|
791
|
-
$worksheetDetailName: [String]!
|
|
792
|
-
$palletId: String
|
|
793
|
-
$cartonId: String
|
|
794
|
-
$toLocation: String!
|
|
795
|
-
) {
|
|
796
|
-
putaway(
|
|
797
|
-
worksheetDetailName: $worksheetDetailName
|
|
798
|
-
palletId: $palletId
|
|
799
|
-
cartonId: $cartonId
|
|
800
|
-
toLocation: $toLocation
|
|
801
|
-
)
|
|
802
|
-
}
|
|
803
|
-
`,
|
|
804
|
-
variables: {
|
|
805
|
-
worksheetDetailName: worksheetDetailNames,
|
|
806
|
-
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
807
|
-
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
808
|
-
toLocation: this.locationInput.value
|
|
809
|
-
}
|
|
810
|
-
})
|
|
795
|
+
if (this._scanning === false) {
|
|
796
|
+
this._scanning = true
|
|
797
|
+
try {
|
|
798
|
+
await this._validatePutaway()
|
|
799
|
+
if (!this.incompleteLocationName) {
|
|
800
|
+
let worksheetDetailNames = []
|
|
801
|
+
const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
|
|
811
802
|
|
|
812
|
-
if (!response.errors) {
|
|
813
|
-
this._fetchProducts(this.orderNo)
|
|
814
803
|
if (this._enableCartonLabel) {
|
|
815
|
-
this.cartonInput.value
|
|
816
|
-
|
|
804
|
+
let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
805
|
+
worksheetDetailNames.push(worksheetDetail[0].name)
|
|
806
|
+
if (worksheetDetail[0].expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
|
|
807
|
+
await this._expiryAlert()
|
|
808
|
+
}
|
|
817
809
|
} else {
|
|
818
|
-
this.
|
|
819
|
-
this.
|
|
810
|
+
worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
811
|
+
if (this._selectedOrderProduct.expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
|
|
812
|
+
await this._expiryAlert()
|
|
813
|
+
}
|
|
820
814
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
815
|
+
|
|
816
|
+
const response = await client.mutate({
|
|
817
|
+
mutation: gql`
|
|
818
|
+
mutation putaway(
|
|
819
|
+
$worksheetDetailName: [String]!
|
|
820
|
+
$palletId: String
|
|
821
|
+
$cartonId: String
|
|
822
|
+
$toLocation: String!
|
|
823
|
+
) {
|
|
824
|
+
putaway(
|
|
825
|
+
worksheetDetailName: $worksheetDetailName
|
|
826
|
+
palletId: $palletId
|
|
827
|
+
cartonId: $cartonId
|
|
828
|
+
toLocation: $toLocation
|
|
829
|
+
)
|
|
830
|
+
}
|
|
831
|
+
`,
|
|
832
|
+
variables: {
|
|
833
|
+
worksheetDetailName: worksheetDetailNames,
|
|
834
|
+
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
835
|
+
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
836
|
+
toLocation: this.locationInput.value
|
|
837
|
+
}
|
|
838
|
+
})
|
|
839
|
+
|
|
840
|
+
if (!response.errors) {
|
|
841
|
+
this._fetchProducts(this.orderNo)
|
|
842
|
+
if (this._enableCartonLabel) {
|
|
843
|
+
this.cartonInput.value = ''
|
|
844
|
+
this._focusOnCartonInput()
|
|
845
|
+
} else {
|
|
846
|
+
this.palletInput.value = ''
|
|
847
|
+
this._focusOnPalletInput()
|
|
848
|
+
}
|
|
849
|
+
this._selectedTaskStatus = null
|
|
850
|
+
this._selectedOrderProduct = null
|
|
851
|
+
this.recommendLocationName = null
|
|
852
|
+
this.locationInput.value = ''
|
|
853
|
+
}
|
|
854
|
+
} else {
|
|
855
|
+
this._openSelectLocationPopup()
|
|
825
856
|
}
|
|
826
|
-
}
|
|
827
|
-
this.
|
|
857
|
+
} catch (e) {
|
|
858
|
+
this._showToast(e)
|
|
828
859
|
}
|
|
829
|
-
|
|
830
|
-
this.
|
|
860
|
+
|
|
861
|
+
this._scanning = false
|
|
862
|
+
} else {
|
|
863
|
+
this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
831
864
|
}
|
|
832
865
|
}
|
|
833
866
|
|
|
834
867
|
async _customerReturnPutaway() {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
if (this.
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
const response = await client.mutate({
|
|
843
|
-
mutation: gql`
|
|
844
|
-
mutation putawayReturn(
|
|
845
|
-
$worksheetDetailName: [String]!
|
|
846
|
-
$palletId: String
|
|
847
|
-
$cartonId: String
|
|
848
|
-
$toLocation: String!
|
|
849
|
-
) {
|
|
850
|
-
putawayReturn(
|
|
851
|
-
worksheetDetailName: $worksheetDetailName
|
|
852
|
-
palletId: $palletId
|
|
853
|
-
cartonId: $cartonId
|
|
854
|
-
toLocation: $toLocation
|
|
855
|
-
)
|
|
856
|
-
}
|
|
857
|
-
`,
|
|
858
|
-
variables: {
|
|
859
|
-
worksheetDetailName: worksheetDetailNames,
|
|
860
|
-
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
861
|
-
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
862
|
-
toLocation: this.locationInput.value
|
|
863
|
-
}
|
|
864
|
-
})
|
|
868
|
+
if (this._scanning === false) {
|
|
869
|
+
this._scanning = true
|
|
870
|
+
try {
|
|
871
|
+
await this._validatePutaway()
|
|
872
|
+
if (!this.incompleteLocationName) {
|
|
873
|
+
let worksheetDetailNames = []
|
|
874
|
+
const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
|
|
865
875
|
|
|
866
|
-
if (!response.errors) {
|
|
867
|
-
this._fetchProducts(this.orderNo)
|
|
868
876
|
if (this._enableCartonLabel) {
|
|
869
|
-
|
|
870
|
-
this.
|
|
877
|
+
worksheetDetailNames.push(worksheetDetail[0].name)
|
|
878
|
+
let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
879
|
+
if (worksheetDetail[0].expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
|
|
880
|
+
await this._expiryAlert()
|
|
881
|
+
}
|
|
871
882
|
} else {
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
883
|
+
worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
884
|
+
if (this._selectedOrderProduct.expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
|
|
885
|
+
await this._expiryAlert()
|
|
886
|
+
}
|
|
874
887
|
}
|
|
875
888
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
889
|
+
const response = await client.mutate({
|
|
890
|
+
mutation: gql`
|
|
891
|
+
mutation putawayReturn(
|
|
892
|
+
$worksheetDetailName: [String]!
|
|
893
|
+
$palletId: String
|
|
894
|
+
$cartonId: String
|
|
895
|
+
$toLocation: String!
|
|
896
|
+
) {
|
|
897
|
+
putawayReturn(
|
|
898
|
+
worksheetDetailName: $worksheetDetailName
|
|
899
|
+
palletId: $palletId
|
|
900
|
+
cartonId: $cartonId
|
|
901
|
+
toLocation: $toLocation
|
|
902
|
+
)
|
|
903
|
+
}
|
|
904
|
+
`,
|
|
905
|
+
variables: {
|
|
906
|
+
worksheetDetailName: worksheetDetailNames,
|
|
907
|
+
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
908
|
+
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
909
|
+
toLocation: this.locationInput.value
|
|
910
|
+
}
|
|
911
|
+
})
|
|
912
|
+
|
|
913
|
+
if (!response.errors) {
|
|
914
|
+
this._fetchProducts(this.orderNo)
|
|
915
|
+
if (this._enableCartonLabel) {
|
|
916
|
+
this.cartonInput.value = ''
|
|
917
|
+
this._focusOnCartonInput()
|
|
918
|
+
} else {
|
|
919
|
+
this.palletInput.value = ''
|
|
920
|
+
this._focusOnPalletInput()
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
this._selectedTaskStatus = null
|
|
924
|
+
this._selectedOrderProduct = null
|
|
925
|
+
this.recommendLocationName = null
|
|
926
|
+
this.locationInput.value = ''
|
|
927
|
+
}
|
|
928
|
+
} else {
|
|
929
|
+
this._openSelectLocationPopup()
|
|
880
930
|
}
|
|
881
|
-
}
|
|
882
|
-
this.
|
|
931
|
+
} catch (e) {
|
|
932
|
+
this._showToast(e)
|
|
883
933
|
}
|
|
884
|
-
|
|
885
|
-
this.
|
|
934
|
+
|
|
935
|
+
this._scanning = false
|
|
936
|
+
} else {
|
|
937
|
+
this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
886
938
|
}
|
|
887
939
|
}
|
|
888
940
|
|
|
889
941
|
async _warehouseReturnPutaway() {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
if (this.
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
942
|
+
if (this._scanning === false) {
|
|
943
|
+
this._scanning = true
|
|
944
|
+
try {
|
|
945
|
+
await this._validatePutaway()
|
|
946
|
+
if (!this.incompleteLocationName) {
|
|
947
|
+
let worksheetDetailNames = []
|
|
948
|
+
if (this._enableCartonLabel) worksheetDetailNames = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
949
|
+
else worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
950
|
+
|
|
951
|
+
const response = await client.mutate({
|
|
952
|
+
mutation: gql`
|
|
953
|
+
mutation returning(
|
|
954
|
+
$worksheetDetailName: [String]!
|
|
955
|
+
$palletId: String
|
|
956
|
+
$cartonId: String
|
|
957
|
+
$toLocation: String!
|
|
958
|
+
) {
|
|
959
|
+
returning(
|
|
960
|
+
worksheetDetailName: $worksheetDetailName
|
|
961
|
+
palletId: $palletId
|
|
962
|
+
cartonId: $cartonId
|
|
963
|
+
toLocation: $toLocation
|
|
964
|
+
)
|
|
965
|
+
}
|
|
966
|
+
`,
|
|
967
|
+
variables: {
|
|
968
|
+
worksheetDetailName: worksheetDetailNames,
|
|
969
|
+
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
970
|
+
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
971
|
+
toLocation: this.locationInput.value
|
|
972
|
+
}
|
|
973
|
+
})
|
|
974
|
+
|
|
975
|
+
if (!response.errors) {
|
|
976
|
+
this._fetchProducts(this.orderNo)
|
|
977
|
+
if (this._enableCartonLabel) {
|
|
978
|
+
this.cartonInput.value = ''
|
|
979
|
+
this._focusOnCartonInput()
|
|
980
|
+
} else {
|
|
981
|
+
this.palletInput.value = ''
|
|
982
|
+
this._focusOnPalletInput()
|
|
911
983
|
}
|
|
912
|
-
`,
|
|
913
|
-
variables: {
|
|
914
|
-
worksheetDetailName: worksheetDetailNames,
|
|
915
|
-
palletId: this._enableCartonLabel ? null : this.palletInput.value,
|
|
916
|
-
cartonId: this._enableCartonLabel ? this.cartonInput.value : null,
|
|
917
|
-
toLocation: this.locationInput.value
|
|
918
|
-
}
|
|
919
|
-
})
|
|
920
984
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
this.
|
|
925
|
-
this._focusOnCartonInput()
|
|
926
|
-
} else {
|
|
927
|
-
this.palletInput.value = ''
|
|
928
|
-
this._focusOnPalletInput()
|
|
985
|
+
this._selectedTaskStatus = null
|
|
986
|
+
this._selectedOrderProduct = null
|
|
987
|
+
this.recommendLocationName = null
|
|
988
|
+
this.locationInput.value = ''
|
|
929
989
|
}
|
|
930
|
-
|
|
931
|
-
this.
|
|
932
|
-
this._selectedOrderProduct = null
|
|
933
|
-
this.recommendLocationName = null
|
|
934
|
-
this.locationInput.value = ''
|
|
990
|
+
} else {
|
|
991
|
+
this._openSelectLocationPopup()
|
|
935
992
|
}
|
|
936
|
-
}
|
|
937
|
-
this.
|
|
993
|
+
} catch (e) {
|
|
994
|
+
this._showToast(e)
|
|
938
995
|
}
|
|
939
|
-
|
|
940
|
-
this.
|
|
996
|
+
|
|
997
|
+
this._scanning = false
|
|
998
|
+
} else {
|
|
999
|
+
this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
941
1000
|
}
|
|
942
1001
|
}
|
|
943
1002
|
|
|
@@ -972,8 +1031,23 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
972
1031
|
}
|
|
973
1032
|
}
|
|
974
1033
|
|
|
1034
|
+
async _expiryAlert() {
|
|
1035
|
+
await CustomAlert({
|
|
1036
|
+
title: i18next.t('title.location_scanned_is_not_a_quarantine_zone'),
|
|
1037
|
+
confirmButton: { text: i18next.t('button.confirm') }
|
|
1038
|
+
})
|
|
1039
|
+
}
|
|
1040
|
+
|
|
975
1041
|
_getSelectedOrderProducts(scannedCartonId) {
|
|
976
|
-
return this.data.records
|
|
1042
|
+
return this.data.records
|
|
1043
|
+
.filter(record => record.cartonId === scannedCartonId)
|
|
1044
|
+
.map(record => {
|
|
1045
|
+
return {
|
|
1046
|
+
name: record.name,
|
|
1047
|
+
expirationDate: record.expirationDate,
|
|
1048
|
+
expirationPeriod: record.product.expirationPeriod
|
|
1049
|
+
}
|
|
1050
|
+
})
|
|
977
1051
|
}
|
|
978
1052
|
|
|
979
1053
|
async _validatePutaway() {
|
|
@@ -1078,7 +1152,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1078
1152
|
if (filters) {
|
|
1079
1153
|
const response = await client.query({
|
|
1080
1154
|
query: gql`
|
|
1081
|
-
query locations($filters: [Filter!]) {
|
|
1155
|
+
query locations($filters: [Filter!]!) {
|
|
1082
1156
|
locations(filters: $filters) {
|
|
1083
1157
|
items {
|
|
1084
1158
|
id
|
|
@@ -1113,6 +1187,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1113
1187
|
row
|
|
1114
1188
|
column
|
|
1115
1189
|
shelf
|
|
1190
|
+
type
|
|
1116
1191
|
}
|
|
1117
1192
|
}
|
|
1118
1193
|
`,
|