@things-factory/operato-wms 5.0.13 → 6.0.0-alpha.1
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/bulk-operation/bulk-operation.js +96 -8
- package/client/pages/bulk-operation/validate-gan-popup.js +37 -27
- package/client/pages/bulk-operation/validate-ro-popup.js +40 -0
- package/client/pages/components/select-inventory-popup.js +633 -0
- package/client/pages/constants/order.js +2 -1
- package/client/pages/inbound/pallet-label-popup.js +2 -0
- package/client/pages/inbound/select-product-batch.js +7 -1
- package/client/pages/inbound/undo-unload-popup.js +37 -21
- package/client/pages/inbound/unload-product.js +147 -59
- package/client/pages/inbound/worksheet-putaway.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +11 -7
- package/client/pages/inventory/inventory-adjustment.js +261 -238
- package/client/pages/inventory/inventory-by-product-detail.js +99 -92
- package/client/pages/inventory/inventory-by-product.js +170 -68
- package/client/pages/inventory/onhand-inventory.js +10 -12
- package/client/pages/inventory/serial-number-list-popup.js +36 -5
- package/client/pages/inventory-check/inspecting-product.js +1 -1
- package/client/pages/manifest/create-loading-manifest.js +47 -22
- package/client/pages/manifest/dispatcher-verification-popup.js +24 -13
- package/client/pages/manifest/loading-manifest-detail.js +311 -46
- package/client/pages/manifest/loading-manifest-list.js +86 -13
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +305 -52
- package/client/pages/order/arrival-notice/arrival-notice-list.js +20 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +2 -2
- package/client/pages/order/goods-received-note/received-note-detail.js +187 -15
- package/client/pages/order/release-order/b2b/b2b-order-list.js +76 -80
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +148 -123
- package/client/pages/order/release-order/batch-picking-popup.js +11 -0
- package/client/pages/order/release-order/create-release-order.js +762 -250
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -3
- package/client/pages/order/release-order/release-order-detail.js +897 -215
- package/client/pages/order/transport-order/delivery-note-popup.js +1050 -107
- package/client/pages/order/transport-order/print-delivery-note.js +214 -33
- package/client/pages/order/transport-order/upload-delivery-note.js +6 -4
- package/client/pages/order/transport-order/view-delivery-note.js +0 -1
- package/client/pages/outbound/generate-worksheet-popup.js +374 -0
- package/client/pages/outbound/inventory-reassign-popup.js +1097 -0
- package/client/pages/outbound/loading-product.js +88 -78
- package/client/pages/outbound/merged-outbound-worksheet.js +1 -1
- package/client/pages/outbound/packing-product.js +193 -82
- package/client/pages/outbound/packing-worksheet-list.js +10 -9
- package/client/pages/outbound/picking-product.js +979 -905
- package/client/pages/outbound/route-label-popup.js +283 -191
- package/client/pages/outbound/serial-number-popup.js +1 -0
- package/client/pages/outbound/sorting-product.js +12 -12
- package/client/pages/outbound/worksheet-batch-picking.js +39 -5
- package/client/pages/outbound/worksheet-packing.js +17 -4
- package/client/pages/outbound/worksheet-picking.js +45 -6
- package/client/pages/report/inbound-serial-number-report.js +86 -9
- package/client/pages/report/inventory-report.js +10 -0
- package/client/pages/report/inventory-summary-report.js +28 -19
- package/client/pages/report/outbound-order-details-report.js +204 -43
- package/client/pages/report/outbound-serial-number-report.js +87 -9
- package/client/pages/report/release-inventory-report.js +503 -0
- package/client/route.js +5 -0
- package/client/util/index.js +2 -0
- package/client/util/page-settings.js +43 -0
- package/client/util/toast.js +10 -0
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +3 -3
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +9 -10
- 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 +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js +6 -4
- package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js +6 -4
- package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js +21 -10
- package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js +1 -2
- package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js +1 -2
- package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/index.js +2 -1
- package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +17 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +113 -75
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js +21 -10
- package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js +56 -0
- package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js.map +1 -0
- package/dist-server/graphql/resolvers/index.js +5 -4
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -1
- package/dist-server/graphql/resolvers/opa-menu/opa-menus.js +8 -7
- package/dist-server/graphql/resolvers/opa-menu/opa-menus.js.map +1 -1
- package/dist-server/graphql/resolvers/{extra → other}/add-release-good-products.js +59 -8
- package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -0
- package/dist-server/graphql/resolvers/{extra → other}/index.js +3 -1
- package/dist-server/graphql/resolvers/other/index.js.map +1 -0
- package/dist-server/graphql/resolvers/other/page-settings.js +87 -0
- package/dist-server/graphql/resolvers/other/page-settings.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/costing-report.js +4 -4
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js +36 -7
- package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js.map +1 -1
- 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/outbound-order-details-report.js +69 -30
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js +36 -11
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/product-label-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js +180 -0
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +2 -2
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -1
- package/dist-server/graphql/types/dashboard/index.js +1 -0
- package/dist-server/graphql/types/dashboard/index.js.map +1 -1
- package/dist-server/graphql/types/index.js +7 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/other/index.js +19 -0
- package/dist-server/graphql/types/other/index.js.map +1 -0
- package/dist-server/graphql/types/other/page-setting.js +34 -0
- package/dist-server/graphql/types/other/page-setting.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/outbound-order-details-report.js +17 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/release-inventory-report-list.js +12 -0
- package/dist-server/graphql/types/reports/release-inventory-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/release-inventory-report.js +27 -0
- package/dist-server/graphql/types/reports/release-inventory-report.js.map +1 -0
- package/dist-server/migrations/1568858861188-SeedSetting.js +5 -6
- package/dist-server/migrations/1568858861188-SeedSetting.js.map +1 -1
- package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js +1 -1
- package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js.map +1 -1
- package/dist-server/migrations/1623381200659-SeedStoringRule.js +1 -1
- package/dist-server/migrations/1623381200659-SeedStoringRule.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/report-query-util.js +5 -2
- package/dist-server/utils/report-query-util.js.map +1 -1
- package/helps/release-note.ko.md +8 -20
- package/helps/release-note.md +8 -20
- package/helps/release-note.ms.md +8 -20
- package/helps/release-note.zh.md +8 -20
- package/package.json +42 -42
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -6
- package/server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.ts +4 -5
- package/server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.ts +9 -10
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.ts +4 -5
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +17 -19
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +10 -8
- package/server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.ts +9 -9
- package/server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.ts +9 -9
- package/server/graphql/resolvers/dashboard/arrival-notices-by-status.ts +23 -14
- package/server/graphql/resolvers/dashboard/collection-orders-by-status.ts +4 -5
- package/server/graphql/resolvers/dashboard/delivery-orders-by-status.ts +4 -5
- package/server/graphql/resolvers/dashboard/index.ts +3 -1
- package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +18 -6
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +114 -81
- package/server/graphql/resolvers/dashboard/release-goods-by-status.ts +23 -14
- package/server/graphql/resolvers/dashboard/unit-inbounded-outbounded.ts +61 -0
- package/server/graphql/resolvers/index.ts +5 -4
- package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +11 -9
- package/server/graphql/resolvers/opa-menu/opa-menus.ts +7 -6
- package/server/graphql/resolvers/{extra → other}/add-release-good-products.ts +73 -12
- package/server/graphql/resolvers/other/index.ts +10 -0
- package/server/graphql/resolvers/other/page-settings.ts +105 -0
- package/server/graphql/resolvers/reports/costing-report.ts +8 -10
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +7 -9
- package/server/graphql/resolvers/reports/inbound-serial-number-report.ts +41 -13
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +76 -38
- package/server/graphql/resolvers/reports/outbound-serial-number-report.ts +42 -18
- package/server/graphql/resolvers/reports/product-label-report.ts +4 -6
- package/server/graphql/resolvers/reports/release-inventory-report.ts +201 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +3 -5
- package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +10 -10
- package/server/graphql/types/dashboard/index.ts +1 -0
- package/server/graphql/types/index.ts +8 -2
- package/server/graphql/types/other/index.ts +19 -0
- package/server/graphql/types/other/page-setting.ts +33 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +17 -1
- package/server/graphql/types/reports/release-inventory-report-list.ts +8 -0
- package/server/graphql/types/reports/release-inventory-report.ts +23 -0
- package/server/migrations/1568858861188-SeedSetting.ts +4 -4
- package/server/migrations/1623308919899-SeedLocationRecommendSetting.ts +3 -2
- package/server/migrations/1623381200659-SeedStoringRule.ts +3 -2
- package/server/utils/report-query-util.ts +5 -2
- package/things-factory.config.js +4 -0
- package/translations/en.json +148 -27
- package/translations/ko.json +185 -105
- package/translations/ms.json +183 -98
- package/translations/zh.json +197 -112
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +0 -1
- package/dist-server/graphql/resolvers/extra/index.js.map +0 -1
- package/dist-server/graphql/types/extra/index.js +0 -11
- package/dist-server/graphql/types/extra/index.js.map +0 -1
- package/server/graphql/resolvers/extra/index.ts +0 -5
- package/server/graphql/types/extra/index.ts +0 -7
|
@@ -35,6 +35,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
35
35
|
releaseGoodId: String,
|
|
36
36
|
shippingProvider: String,
|
|
37
37
|
trackingNo: String,
|
|
38
|
+
totalBinRO: Number,
|
|
39
|
+
binRo: String,
|
|
40
|
+
ownTransport: Boolean,
|
|
41
|
+
toggleComplete: Boolean,
|
|
38
42
|
_bizplaceName: String,
|
|
39
43
|
_enableProductScanning: Boolean,
|
|
40
44
|
_productName: String,
|
|
@@ -78,50 +82,50 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
get completed() {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return this.data.records.every(record => record.completed)
|
|
85
|
-
}
|
|
85
|
+
return this.orderRemark
|
|
86
|
+
? this.data.records.every(record => record.completed) && Boolean(this.checkedRemarkAt)
|
|
87
|
+
: this.data.records.every(record => record.completed)
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
get context() {
|
|
89
91
|
var actions = []
|
|
90
92
|
if (this.releaseGoodNo && this.platform != 'operato' && this.completed && this.trackingNo) {
|
|
91
93
|
if (this.platform === PLATFORM.LAZADA.value) {
|
|
94
|
+
actions.push({
|
|
95
|
+
title: i18next.t('button.print_airway_bill'),
|
|
96
|
+
action: this.printAirwayBill.bind(this),
|
|
97
|
+
...CommonButtonStyles.label
|
|
98
|
+
})
|
|
99
|
+
|
|
92
100
|
actions.push({
|
|
93
101
|
title: i18next.t('button.print_invoice'),
|
|
94
102
|
action: this.printInvoice.bind(this),
|
|
95
103
|
...CommonButtonStyles.label
|
|
96
104
|
})
|
|
97
105
|
}
|
|
98
|
-
|
|
99
|
-
actions.push({
|
|
100
|
-
title: i18next.t('button.print_airway_bill'),
|
|
101
|
-
action: this.printAirwayBill.bind(this),
|
|
102
|
-
...CommonButtonStyles.label
|
|
103
|
-
})
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
if (this.releaseGoodNo && this.platform == 'operato' && this.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
if (this.releaseGoodNo && this.platform == 'operato' && this.completed) {
|
|
109
|
+
if (!this.ownTransport) {
|
|
110
|
+
actions.push({
|
|
111
|
+
title: i18next.t('button.print_airway_bill'),
|
|
112
|
+
action: this.printSellercraftDocument.bind(this, 'awb'),
|
|
113
|
+
...CommonButtonStyles.label
|
|
114
|
+
})
|
|
115
|
+
}
|
|
112
116
|
|
|
113
117
|
actions.push({
|
|
114
118
|
title: i18next.t('button.print_invoice'),
|
|
115
|
-
action: this.
|
|
119
|
+
action: this.printSellercraftDocument.bind(this, 'invoice'),
|
|
116
120
|
...CommonButtonStyles.label
|
|
117
121
|
})
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
if (
|
|
121
125
|
this.releaseGoodNo &&
|
|
122
|
-
(this.orderInformation
|
|
123
|
-
this.orderInformation
|
|
124
|
-
this.orderInformation
|
|
126
|
+
(this.orderInformation?.status === 'packed' ||
|
|
127
|
+
this.orderInformation?.status === 'unfulfilled' ||
|
|
128
|
+
this.orderInformation?.status === 'processing') &&
|
|
125
129
|
!this._trackingNo &&
|
|
126
130
|
!this._logisticsInitiated &&
|
|
127
131
|
(this.platform === PLATFORM.LAZADA.value ||
|
|
@@ -152,7 +156,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
152
156
|
})
|
|
153
157
|
}
|
|
154
158
|
|
|
155
|
-
if (this.
|
|
159
|
+
if (this.toggleComplete) {
|
|
156
160
|
actions.push({
|
|
157
161
|
title: i18next.t('button.complete'),
|
|
158
162
|
action: this._complete.bind(this),
|
|
@@ -225,7 +229,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
225
229
|
|
|
226
230
|
render() {
|
|
227
231
|
return html`
|
|
228
|
-
<form id="info-form" class="multi-column-form">
|
|
232
|
+
<form id="info-form" class="multi-column-form" style="align-items:center">
|
|
229
233
|
<fieldset>
|
|
230
234
|
<label>${i18next.t('label.release_good_no')}</label>
|
|
231
235
|
<barcode-scanable-input
|
|
@@ -287,11 +291,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
287
291
|
this.data = { records: [] }
|
|
288
292
|
this.releaseGoodNo = ''
|
|
289
293
|
this.releaseGoodId = ''
|
|
294
|
+
this.totalBinRO = 0
|
|
295
|
+
this.checkedRemarkAt = ''
|
|
290
296
|
this._enableProductScanning = false
|
|
291
297
|
this._productName = ''
|
|
292
298
|
this._selectedOrderInventory = null
|
|
293
299
|
this._selectedTaskStatus = null
|
|
294
300
|
this._scanning = false
|
|
301
|
+
this.toggleComplete = false
|
|
295
302
|
this._isRequireSerialNumberScanningOutbound = false
|
|
296
303
|
this._isBatchPicking = false
|
|
297
304
|
}
|
|
@@ -394,7 +401,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
394
401
|
id
|
|
395
402
|
name
|
|
396
403
|
remark
|
|
404
|
+
ownTransport
|
|
397
405
|
checkedRemarkAt
|
|
406
|
+
totalInventoriesByBin
|
|
407
|
+
isOrderInventoryBin
|
|
398
408
|
}
|
|
399
409
|
bizplaceName
|
|
400
410
|
partnerDomainId
|
|
@@ -476,11 +486,18 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
476
486
|
})
|
|
477
487
|
|
|
478
488
|
if (!response.errors) {
|
|
489
|
+
// @oscar a more efficient writing of this line of code would be defining a const for the response of accessing releaseGood, kindly improve this.
|
|
490
|
+
if (response.data.packingWorksheet.worksheetInfo.releaseGood.isOrderInventoryBin) {
|
|
491
|
+
this.totalBinRO = response.data.packingWorksheet.worksheetInfo.releaseGood.totalInventoriesByBin
|
|
492
|
+
this.binRo = releaseGoodNo
|
|
493
|
+
}
|
|
494
|
+
|
|
479
495
|
this.releaseGoodNo = response.data.packingWorksheet.worksheetInfo.releaseGood.name
|
|
480
496
|
this.releaseGoodId = response.data.packingWorksheet.worksheetInfo.releaseGood.id
|
|
481
497
|
if (!response.data?.packingWorksheet) return
|
|
482
498
|
|
|
483
499
|
const { worksheetInfo, worksheetDetailInfos } = response.data.packingWorksheet
|
|
500
|
+
|
|
484
501
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
485
502
|
|
|
486
503
|
this.trackingNo = worksheetInfo.trackingNo
|
|
@@ -491,7 +508,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
491
508
|
this.shippingProvider = worksheetInfo.shippingProvider
|
|
492
509
|
this.orderInformation = worksheetInfo.marketplaceOrder
|
|
493
510
|
this.orderRemark = worksheetInfo.releaseGood?.remark
|
|
511
|
+
this.ownTransport = worksheetInfo.releaseGood?.ownTransport
|
|
494
512
|
this.checkedRemarkAt = worksheetInfo.releaseGood?.checkedRemarkAt
|
|
513
|
+
this.toggleComplete = Boolean(worksheetInfo.releaseGood?.remark)
|
|
514
|
+
? worksheetDetailInfos.every(res => res.status === 'DONE') &&
|
|
515
|
+
worksheetInfo.releaseGood?.checkedRemarkAt !== null
|
|
516
|
+
: worksheetDetailInfos.every(res => res.status === 'DONE')
|
|
495
517
|
|
|
496
518
|
this._isBatchPicking = worksheetDetailInfos[0].relatedOrderInv?.refWorksheetId ? true : false
|
|
497
519
|
|
|
@@ -500,7 +522,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
500
522
|
|
|
501
523
|
if (this._selectedOrderInventory) {
|
|
502
524
|
const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
|
|
503
|
-
if (record
|
|
525
|
+
if (record?.packedQty == record?.releaseQty) {
|
|
504
526
|
this._selectedOrderInventory = null
|
|
505
527
|
this._selectedTaskStatus = null
|
|
506
528
|
this.inputForm.reset()
|
|
@@ -511,6 +533,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
511
533
|
worksheetDetailInfos[0].product?.isRequireSerialNumberScanningOutbound
|
|
512
534
|
}
|
|
513
535
|
|
|
536
|
+
if (this.completed && this.airwayBill) {
|
|
537
|
+
this.printBill()
|
|
538
|
+
}
|
|
539
|
+
|
|
514
540
|
this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
|
|
515
541
|
|
|
516
542
|
if (this._enableProductScanning) {
|
|
@@ -518,6 +544,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
518
544
|
} else {
|
|
519
545
|
this._focusOnReleaseQtyInput()
|
|
520
546
|
}
|
|
547
|
+
|
|
521
548
|
this.updateContext()
|
|
522
549
|
}
|
|
523
550
|
}
|
|
@@ -529,7 +556,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
529
556
|
record.locationName = record?.binLocation?.name
|
|
530
557
|
record.sku = record?.sku
|
|
531
558
|
record.product = record?.product
|
|
532
|
-
record.packingProgress = `${record
|
|
559
|
+
record.packingProgress = `${record?.packedQty} / ${record.releaseQty}`
|
|
533
560
|
|
|
534
561
|
return record
|
|
535
562
|
})
|
|
@@ -543,6 +570,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
543
570
|
this.releaseGoodNo = ''
|
|
544
571
|
this._selectedOrderInventory = null
|
|
545
572
|
this._selectedTaskStatus = null
|
|
573
|
+
this.toggleComplete = false
|
|
546
574
|
}
|
|
547
575
|
|
|
548
576
|
checkShippingProviderAndDeliveryType() {
|
|
@@ -567,23 +595,66 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
567
595
|
return otherInfo.deliveryType
|
|
568
596
|
}
|
|
569
597
|
|
|
570
|
-
|
|
571
|
-
|
|
598
|
+
async printSellercraftDocument(type) {
|
|
599
|
+
try {
|
|
600
|
+
if (this.releaseGoodId == undefined) {
|
|
601
|
+
throw new Error('Unable to find order id, please rescan your order.')
|
|
602
|
+
}
|
|
572
603
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
604
|
+
// get sellercraft document fetcher function
|
|
605
|
+
let fetchOrder = async id => {
|
|
606
|
+
const response = await client.mutate({
|
|
607
|
+
mutation: gql`
|
|
608
|
+
mutation fetchSellercraftDocument($releaseGoodId: String!) {
|
|
609
|
+
fetchSellercraftDocument(releaseGoodId: $releaseGoodId) {
|
|
610
|
+
airwayBill
|
|
611
|
+
invoice
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
`,
|
|
615
|
+
variables: { releaseGoodId: id }
|
|
616
|
+
})
|
|
617
|
+
if (!response.errors) {
|
|
618
|
+
this.invoice = document.invoice
|
|
619
|
+
this.airwayBill = document.airwayBill
|
|
576
620
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
convertedPdfUrl = `${url.origin}/proxy?url=${this.airwayBill}`
|
|
584
|
-
}
|
|
621
|
+
return {
|
|
622
|
+
invoice: response.data.fetchSellercraftDocument.invoice,
|
|
623
|
+
airwayBill: response.data.fetchSellercraftDocument.airwayBill
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
585
627
|
|
|
586
|
-
|
|
628
|
+
let convertedPdfUrl = ''
|
|
629
|
+
if (type == 'invoice') {
|
|
630
|
+
let invoice = this.invoice
|
|
631
|
+
// fetch and set variable if invoice not found
|
|
632
|
+
if (!invoice || invoice.trim() == '') {
|
|
633
|
+
let document = await fetchOrder(this.releaseGoodId)
|
|
634
|
+
invoice = document.invoice
|
|
635
|
+
}
|
|
636
|
+
let url = new URL(window.location)
|
|
637
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${invoice}`
|
|
638
|
+
} else if (type == 'awb') {
|
|
639
|
+
let airwayBill = this.airwayBill
|
|
640
|
+
// fetch and set variable if awb not found
|
|
641
|
+
if (!airwayBill || airwayBill.trim() == '') {
|
|
642
|
+
let document = await fetchOrder(this.releaseGoodId)
|
|
643
|
+
airwayBill = document.airwayBill
|
|
644
|
+
}
|
|
645
|
+
if (airwayBill.includes('partner.shopeemobile.com')) {
|
|
646
|
+
convertedPdfUrl = `/pdf/merge?urls=${airwayBill}`
|
|
647
|
+
} else {
|
|
648
|
+
let url = new URL(window.location)
|
|
649
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${airwayBill}`
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// print PDF document
|
|
654
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
655
|
+
} catch (error) {
|
|
656
|
+
this._showToast({ message: 'Waiting for AWB from marketplace. Please retry in awhile' })
|
|
657
|
+
}
|
|
587
658
|
}
|
|
588
659
|
|
|
589
660
|
async printInvoice() {
|
|
@@ -607,27 +678,22 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
607
678
|
if (orderDocInfo?.length === 0) {
|
|
608
679
|
this._showToast({ message: i18next.t('text.no_document_available') })
|
|
609
680
|
} else {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
this._callPrintDialog(decodedHTML)
|
|
624
|
-
break
|
|
625
|
-
|
|
626
|
-
default:
|
|
627
|
-
let url = new URL(window.location)
|
|
681
|
+
if (this.platform == 'shopee' && !orderDocInfo[0]?.isShopeeV2) {
|
|
682
|
+
const orderDocUrls = orderDocInfo.map(item => item.airwayBill)
|
|
683
|
+
for (var i = 0; i < orderDocUrls.length; i++) {
|
|
684
|
+
orderDocUrls[i] = 'urls=' + orderDocUrls[i]
|
|
685
|
+
}
|
|
686
|
+
var mergedURL = orderDocUrls.toString().replace(/,/g, '&')
|
|
687
|
+
var convertedPdfUrl = `/pdf/merge?${mergedURL}`
|
|
688
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
689
|
+
} else if (this.platform == 'lazada') {
|
|
690
|
+
var decodedHTML = atob(orderDocInfo[0].file)
|
|
691
|
+
this._callPrintDialog(decodedHTML)
|
|
692
|
+
} else {
|
|
693
|
+
let url = new URL(window.location)
|
|
628
694
|
|
|
629
|
-
|
|
630
|
-
|
|
695
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
696
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
631
697
|
}
|
|
632
698
|
}
|
|
633
699
|
}
|
|
@@ -643,6 +709,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
643
709
|
mimeType
|
|
644
710
|
file
|
|
645
711
|
documentType
|
|
712
|
+
isShopeeV2
|
|
646
713
|
}
|
|
647
714
|
}
|
|
648
715
|
`,
|
|
@@ -684,12 +751,13 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
684
751
|
async packing(e) {
|
|
685
752
|
if (e.keyCode === 13) {
|
|
686
753
|
e.preventDefault()
|
|
754
|
+
console.time('time execution for product barcode scanning')
|
|
687
755
|
try {
|
|
688
756
|
await this._validatePacking()
|
|
689
757
|
|
|
690
|
-
let response
|
|
691
|
-
|
|
692
|
-
|
|
758
|
+
let response = this._enableProductScanning ? await this.productBarcodePacking() : await this.commonPacking()
|
|
759
|
+
|
|
760
|
+
console.timeLog('time execution for product barcode scanning')
|
|
693
761
|
|
|
694
762
|
if (!response.errors) {
|
|
695
763
|
if (this._enableProductScanning) {
|
|
@@ -710,17 +778,20 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
710
778
|
} catch (e) {
|
|
711
779
|
if (this._isRequireSerialNumberScanningOutbound && this._isBatchPicking) this.serialInput.value = ''
|
|
712
780
|
else if (this._enableProductScanning && !this._isRequireSerialNumberScanningOutbound) {
|
|
713
|
-
this.productBarcodeInput.value = ''
|
|
714
781
|
this._focusOnProductBarcodeInput()
|
|
715
782
|
} else {
|
|
716
|
-
this.releaseQtyInput.value = ''
|
|
717
783
|
this._focusOnReleaseQtyInput()
|
|
718
784
|
this._selectedTaskStatus = null
|
|
719
785
|
}
|
|
720
786
|
this._selectedOrderInventory = null
|
|
721
787
|
this._showToast(e)
|
|
722
788
|
} finally {
|
|
789
|
+
this._enableProductScanning && !this._isRequireSerialNumberScanningOutbound
|
|
790
|
+
? (this.productBarcodeInput.value = '')
|
|
791
|
+
: (this.releaseQtyInput.value = '')
|
|
723
792
|
this._scanning = false
|
|
793
|
+
// time execution for product barcode scanning (without scanning machines): 308.0390625 ms
|
|
794
|
+
console.timeEnd('time execution for product barcode scanning')
|
|
724
795
|
}
|
|
725
796
|
}
|
|
726
797
|
}
|
|
@@ -728,7 +799,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
728
799
|
async productBarcodePacking() {
|
|
729
800
|
if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
730
801
|
this._scanning = true
|
|
731
|
-
|
|
802
|
+
let response = await client.mutate({
|
|
732
803
|
mutation: gql`
|
|
733
804
|
mutation scanProductPacking($worksheetDetailName: String!, $productBarcode: String!, $serialNumber: String) {
|
|
734
805
|
scanProductPacking(
|
|
@@ -745,6 +816,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
745
816
|
this._isRequireSerialNumberScanningOutbound && this._isBatchPicking ? this.serialInput.value.trim() : null
|
|
746
817
|
}
|
|
747
818
|
})
|
|
819
|
+
|
|
820
|
+
return response
|
|
748
821
|
}
|
|
749
822
|
|
|
750
823
|
async commonPacking() {
|
|
@@ -768,7 +841,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
768
841
|
})
|
|
769
842
|
}
|
|
770
843
|
|
|
771
|
-
|
|
844
|
+
_validatePacking() {
|
|
772
845
|
// validate for order selection
|
|
773
846
|
if (this._enableProductScanning) {
|
|
774
847
|
//if no input
|
|
@@ -780,21 +853,18 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
780
853
|
//find product match with input barcode
|
|
781
854
|
const foundOrderInventory = this.data.records.find(
|
|
782
855
|
itm =>
|
|
783
|
-
itm.product.productDetails.find(
|
|
784
|
-
detail =>
|
|
785
|
-
detail.gtin === this.productBarcodeInput.value.trim() &&
|
|
786
|
-
detail.packingType == itm.packingType &&
|
|
787
|
-
detail.packingSize == itm.packingSize
|
|
788
|
-
) != undefined
|
|
856
|
+
itm.product.productDetails.find(detail => detail.gtin === this.productBarcodeInput.value.trim()) != undefined
|
|
789
857
|
)
|
|
790
858
|
|
|
791
859
|
if (foundOrderInventory) {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
860
|
+
this._selectedOrderInventory = foundOrderInventory
|
|
861
|
+
|
|
862
|
+
if (this._selectedOrderInventory?.status === WORKSHEET_STATUS.DONE.value) {
|
|
863
|
+
this._selectedOrderInventory = null
|
|
795
864
|
throw new Error(i18next.t('text.scanned_product_status_is_done'))
|
|
796
865
|
}
|
|
797
866
|
} else {
|
|
867
|
+
this._focusOnProductBarcodeInput()
|
|
798
868
|
throw new Error(i18next.t('text.incorrect_product_barcode'))
|
|
799
869
|
}
|
|
800
870
|
} else {
|
|
@@ -824,6 +894,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
824
894
|
}
|
|
825
895
|
|
|
826
896
|
async _complete() {
|
|
897
|
+
const totalBinRO = this.totalBinRO
|
|
827
898
|
const response = await client.mutate({
|
|
828
899
|
mutation: gql`
|
|
829
900
|
mutation completePacking($releaseGoodNo: String!) {
|
|
@@ -834,13 +905,43 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
834
905
|
})
|
|
835
906
|
|
|
836
907
|
if (!response.errors) {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
908
|
+
if (totalBinRO > 1) {
|
|
909
|
+
const resultNextOrder = await CustomAlert({
|
|
910
|
+
title: i18next.t('title.packing'),
|
|
911
|
+
text: i18next.t('text.packing_is_completed'),
|
|
912
|
+
confirmButton: { text: i18next.t('button.next_order') }
|
|
913
|
+
})
|
|
914
|
+
|
|
915
|
+
if (!resultNextOrder.value) {
|
|
916
|
+
this._focusOnReleaseGoodInput()
|
|
917
|
+
this._clearView()
|
|
918
|
+
this.updateContext()
|
|
919
|
+
return
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
this._clearView()
|
|
923
|
+
this.updateContext()
|
|
924
|
+
|
|
925
|
+
this.checkedRemarkAt = ''
|
|
926
|
+
await this._fetchInventories(this.binRo)
|
|
927
|
+
this.toggleComplete = false
|
|
928
|
+
this._focusOnProductBarcodeInput()
|
|
929
|
+
} else {
|
|
930
|
+
this.toggleComplete = false
|
|
931
|
+
|
|
932
|
+
this._clearView()
|
|
933
|
+
this.updateContext()
|
|
934
|
+
|
|
935
|
+
const result = await CustomAlert({
|
|
936
|
+
title: i18next.t('title.packing'),
|
|
937
|
+
text: i18next.t('text.packing_is_completed'),
|
|
938
|
+
timer: 1000
|
|
939
|
+
})
|
|
940
|
+
|
|
941
|
+
if (result.dismiss === 'timer' && result.isDismissed) {
|
|
942
|
+
this._focusOnReleaseGoodInput()
|
|
943
|
+
}
|
|
944
|
+
}
|
|
844
945
|
}
|
|
845
946
|
}
|
|
846
947
|
|
|
@@ -879,6 +980,16 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
879
980
|
)
|
|
880
981
|
}
|
|
881
982
|
|
|
983
|
+
async printBill() {
|
|
984
|
+
if (this.releaseGoodNo && this.platform != 'operato' && this.completed && this.trackingNo) {
|
|
985
|
+
await this.printAirwayBill()
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
if (this.releaseGoodNo && this.platform == 'operato' && !this.ownTransport && this.airwayBill && this.completed) {
|
|
989
|
+
await this.printSellercraftDocument('awb')
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
882
993
|
async openSerialNumberPopup() {
|
|
883
994
|
await sleep(1010)
|
|
884
995
|
openPopup(
|
|
@@ -92,16 +92,10 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
92
92
|
|
|
93
93
|
this._searchFields = [
|
|
94
94
|
{
|
|
95
|
-
name: '
|
|
96
|
-
label: i18next.t('field.
|
|
95
|
+
name: 'outboundOrderInfo',
|
|
96
|
+
label: i18next.t('field.order_info'),
|
|
97
97
|
type: 'text',
|
|
98
|
-
props: { searchOper: '
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: 'releaseGoodRefNo',
|
|
102
|
-
label: i18next.t('field.ref_no'),
|
|
103
|
-
type: 'text',
|
|
104
|
-
props: { searchOper: 'i_like' }
|
|
98
|
+
props: { searchOper: 'eq' }
|
|
105
99
|
},
|
|
106
100
|
{
|
|
107
101
|
label: i18next.t('field.company'),
|
|
@@ -166,6 +160,13 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
166
160
|
type: 'checkbox',
|
|
167
161
|
props: { searchOper: 'eq' },
|
|
168
162
|
attrs: ['indeterminate']
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
label: i18next.t('field.manifested'),
|
|
166
|
+
name: 'manifest',
|
|
167
|
+
type: 'checkbox',
|
|
168
|
+
props: { searchOper: 'eq' },
|
|
169
|
+
attrs: ['indeterminate']
|
|
169
170
|
}
|
|
170
171
|
]
|
|
171
172
|
|