@things-factory/operato-wms 4.0.24 → 4.0.28
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/bootstrap.js +1 -1
- package/client/pages/adjustment/transfer-inventory.js +32 -6
- package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
- package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
- package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
- package/client/pages/billing/transport-summary-report.js +21 -23
- package/client/pages/bulk-operation/bulk-operation.js +189 -64
- package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
- package/client/pages/components/popup-unloading.js +47 -34
- package/client/pages/components/select-product-popup.js +74 -27
- package/client/pages/components/worksheet-information-popup.js +100 -0
- package/client/pages/inbound/expiry-date-popup.js +2 -2
- package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
- package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
- package/client/pages/inbound/putaway-product.js +196 -235
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +236 -646
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/vas-selector.js +9 -8
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/inventory-check/check-inventory-popup.js +20 -18
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
- package/client/pages/inventory-check/inspecting-product.js +2 -2
- package/client/pages/inventory-check/inventory-check-list.js +30 -19
- package/client/pages/inventory-check/search-popup.js +15 -14
- package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
- package/client/pages/master/location-list.js +61 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +142 -156
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
- package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
- package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
- package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
- package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
- package/client/pages/order/release-order/batch-picking-popup.js +19 -2
- package/client/pages/order/release-order/create-release-order.js +194 -89
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +392 -109
- package/client/pages/order/return-order/check-return-order.js +15 -13
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
- package/client/pages/order/return-order/rejected-return-order.js +8 -14
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
- package/client/pages/order/return-order/return-order-detail.js +35 -31
- package/client/pages/order/return-order/return-order-list.js +9 -8
- package/client/pages/order/return-order/return-order-requests.js +20 -18
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
- package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
- package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +17 -16
- package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
- package/client/pages/order/transport-order/view-delivery-note.js +19 -22
- package/client/pages/order/vas-order/create-vas-order.js +12 -11
- package/client/pages/order/vas-order/receive-vas-order.js +25 -22
- package/client/pages/order/vas-order/vas-order-detail.js +26 -23
- package/client/pages/order/vas-order/vas-order-list.js +9 -8
- package/client/pages/order/vas-order/vas-order-requests.js +11 -12
- package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
- package/client/pages/outbound/packing-product.js +115 -234
- package/client/pages/outbound/picking-product.js +288 -380
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/sorting-product.js +66 -63
- package/client/pages/outbound/worksheet-loading.js +23 -17
- package/client/pages/outbound/worksheet-packing.js +18 -16
- package/client/pages/outbound/worksheet-picking.js +22 -18
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
- package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
- package/client/pages/report/inventory-pallet-report.js +13 -12
- package/client/pages/report/job-sheet-list.js +9 -8
- package/client/pages/report/job-sheet-popup.js +9 -9
- package/client/pages/report/job-sheet-report.js +6 -6
- package/client/pages/system/location-sorting-rule.js +53 -46
- package/client/pages/vas/abstract-execute-vas.js +47 -34
- package/client/pages/vas/execute-pure-vas.js +66 -62
- package/client/pages/vas/execute-ref-vas.js +39 -41
- package/client/pages/vas/print-product-label.js +17 -9
- package/client/pages/vas/related-vas-list.js +7 -6
- package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
- package/client/pages/vas/vas-pallet-label-popup.js +1 -1
- package/client/pages/vas/vas-worksheet-list.js +9 -8
- package/client/pages/vas/worksheet-ref-vas.js +7 -6
- package/client/pages/vas/worksheet-vas.js +16 -14
- package/client/route.js +16 -32
- package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
- package/things-factory.config.js +0 -16
- package/translations/en.json +34 -2
- package/translations/ko.json +34 -3
- package/translations/ms.json +34 -3
- package/translations/zh.json +34 -3
- package/client/pages/inbound/location-selector.js +0 -224
- package/client/pages/master/picking-bin-list.js +0 -354
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
- package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import '@things-factory/barcode-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
import './logistics-init/logistics-init-popup'
|
|
4
|
+
import '../components/worksheet-information-popup'
|
|
4
5
|
|
|
5
6
|
import gql from 'graphql-tag'
|
|
6
7
|
import { css, html } from 'lit-element'
|
|
7
8
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
9
|
|
|
9
10
|
import { GhostPrint } from '@operato/ghost-print'
|
|
10
|
-
import { MultiColumnFormStyles
|
|
11
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
11
12
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
12
13
|
import { openPopup } from '@things-factory/layout-base'
|
|
13
14
|
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
@@ -20,110 +21,60 @@ import { PLATFORM, WORKSHEET_STATUS } from '../constants'
|
|
|
20
21
|
class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
21
22
|
static get properties() {
|
|
22
23
|
return {
|
|
23
|
-
releaseGoodNo: String,
|
|
24
|
-
orderInformation: String,
|
|
25
|
-
trackingNo: String,
|
|
26
|
-
shippingProvider: String,
|
|
27
|
-
platform: String,
|
|
28
24
|
airwayBill: String,
|
|
29
|
-
invoice: String,
|
|
30
25
|
config: Object,
|
|
31
26
|
data: Object,
|
|
27
|
+
invoice: String,
|
|
28
|
+
orderInformation: String,
|
|
29
|
+
platform: String,
|
|
30
|
+
releaseGoodNo: String,
|
|
31
|
+
shippingProvider: String,
|
|
32
|
+
trackingNo: String,
|
|
33
|
+
_bizplaceName: String,
|
|
34
|
+
_enableProductScanning: Boolean,
|
|
32
35
|
_productName: String,
|
|
36
|
+
_logisticsInitiated: Boolean,
|
|
33
37
|
_selectedTaskStatus: String,
|
|
34
|
-
|
|
35
|
-
_logisticsInitiated: Boolean
|
|
38
|
+
_worksheetInfo: Object
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
static get styles() {
|
|
40
43
|
return [
|
|
41
|
-
SingleColumnFormStyles,
|
|
42
44
|
MultiColumnFormStyles,
|
|
43
45
|
css`
|
|
44
46
|
:host {
|
|
45
47
|
display: flex;
|
|
46
48
|
flex-direction: column;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.grist {
|
|
50
|
-
background-color: var(--main-section-background-color);
|
|
51
|
-
display: flex;
|
|
52
|
-
flex: 1;
|
|
53
|
-
overflow: auto;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.left-column {
|
|
57
|
-
flex: 1;
|
|
58
49
|
overflow: hidden;
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.right-column {
|
|
64
|
-
flex: 1;
|
|
65
|
-
overflow: auto;
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: column;
|
|
68
50
|
}
|
|
69
|
-
|
|
70
51
|
data-grist {
|
|
52
|
+
overflow: auto;
|
|
71
53
|
flex: 1;
|
|
72
54
|
}
|
|
73
|
-
|
|
74
55
|
h2 {
|
|
75
56
|
padding: var(--subtitle-padding);
|
|
76
57
|
font: var(--subtitle-font);
|
|
77
58
|
color: var(--subtitle-text-color);
|
|
78
59
|
border-bottom: var(--subtitle-border-bottom);
|
|
79
60
|
}
|
|
80
|
-
|
|
81
|
-
margin: var(--grist-title-margin);
|
|
82
|
-
border: var(--grist-title-border);
|
|
83
|
-
font: var(--grist-title-font);
|
|
84
|
-
color: var(--secondary-color);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.grist h2 mwc-icon {
|
|
61
|
+
legend mwc-icon {
|
|
88
62
|
vertical-align: middle;
|
|
89
63
|
margin: var(--grist-title-icon-margin);
|
|
90
64
|
font-size: var(--grist-title-icon-size);
|
|
91
65
|
color: var(--grist-title-icon-color);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
h2 + data-grist {
|
|
95
|
-
padding-top: var(--grist-title-with-grid-padding);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
div.reusable_pallet {
|
|
99
|
-
grid-column: span 12 / auto;
|
|
100
|
-
display: inline-flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
font-size: 12px;
|
|
103
|
-
background-color: #ccc0;
|
|
104
|
-
border: 1px solid #6e7e8e;
|
|
105
|
-
color: #394e63;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@media (max-width: 460px) {
|
|
109
|
-
:host {
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
66
|
+
cursor: pointer;
|
|
112
67
|
}
|
|
113
68
|
`
|
|
114
69
|
]
|
|
115
70
|
}
|
|
116
71
|
|
|
72
|
+
get completed() {
|
|
73
|
+
return this.data.records.every(record => record.completed)
|
|
74
|
+
}
|
|
75
|
+
|
|
117
76
|
get context() {
|
|
118
77
|
var actions = []
|
|
119
|
-
if (this.completed) {
|
|
120
|
-
actions.push({
|
|
121
|
-
title: i18next.t('button.complete'),
|
|
122
|
-
action: this._complete.bind(this),
|
|
123
|
-
...CommonButtonStyles.submit
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
|
|
127
78
|
if (this.releaseGoodNo && this.platform != 'operato' && this.completed && this.trackingNo) {
|
|
128
79
|
if (this.platform === PLATFORM.LAZADA.value) {
|
|
129
80
|
actions.push({
|
|
@@ -140,13 +91,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
140
91
|
})
|
|
141
92
|
}
|
|
142
93
|
|
|
143
|
-
if (this.releaseGoodNo && this.platform == 'operato' &&
|
|
144
|
-
actions.push({
|
|
145
|
-
title: i18next.t('button.fetch_airway_bill'),
|
|
146
|
-
action: this.fetchSellercraftAirwayBill.bind(this),
|
|
147
|
-
...CommonButtonStyles.label
|
|
148
|
-
})
|
|
149
|
-
} else if (this.releaseGoodNo && this.platform == 'operato' && this.airwayBill && this.completed) {
|
|
94
|
+
if (this.releaseGoodNo && this.platform == 'operato' && this.airwayBill && this.completed) {
|
|
150
95
|
actions.push({
|
|
151
96
|
title: i18next.t('button.print_airway_bill'),
|
|
152
97
|
action: this.printSellercraftAirwayBill.bind(this),
|
|
@@ -183,6 +128,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
183
128
|
})
|
|
184
129
|
}
|
|
185
130
|
|
|
131
|
+
if (this.completed) {
|
|
132
|
+
actions.push({
|
|
133
|
+
title: i18next.t('button.complete'),
|
|
134
|
+
action: this._complete.bind(this),
|
|
135
|
+
...CommonButtonStyles.submit
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
|
|
186
139
|
return {
|
|
187
140
|
title: i18next.t('title.packing'),
|
|
188
141
|
help: 'operato-wms/outbound/packing-product',
|
|
@@ -190,14 +143,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
190
143
|
}
|
|
191
144
|
}
|
|
192
145
|
|
|
193
|
-
get
|
|
194
|
-
return this.shadowRoot.querySelector('
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
get productBarcodeInput() {
|
|
198
|
-
return this.shadowRoot
|
|
199
|
-
.querySelector('barcode-scanable-input[name=productBarcode]')
|
|
200
|
-
.shadowRoot.querySelector('input')
|
|
146
|
+
get grist() {
|
|
147
|
+
return this.shadowRoot.querySelector('data-grist')
|
|
201
148
|
}
|
|
202
149
|
|
|
203
150
|
get infoForm() {
|
|
@@ -208,34 +155,36 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
208
155
|
return this.shadowRoot.querySelector('form#input-form')
|
|
209
156
|
}
|
|
210
157
|
|
|
211
|
-
get releaseQtyInput() {
|
|
212
|
-
return this.shadowRoot.querySelector('input[name=packedQty]')
|
|
213
|
-
}
|
|
214
|
-
|
|
215
158
|
get locationInput() {
|
|
216
159
|
return this.shadowRoot.querySelector('barcode-scanable-input[name=locationName]').shadowRoot.querySelector('input')
|
|
217
160
|
}
|
|
218
161
|
|
|
219
|
-
get
|
|
220
|
-
return this.shadowRoot
|
|
162
|
+
get productBarcodeInput() {
|
|
163
|
+
return this.shadowRoot
|
|
164
|
+
.querySelector('barcode-scanable-input[name=productBarcode]')
|
|
165
|
+
.shadowRoot.querySelector('input')
|
|
221
166
|
}
|
|
222
167
|
|
|
223
|
-
get
|
|
224
|
-
return this.
|
|
168
|
+
get releaseGoodNoInput() {
|
|
169
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name=releaseGoodNo]').shadowRoot.querySelector('input')
|
|
225
170
|
}
|
|
226
171
|
|
|
227
|
-
get
|
|
228
|
-
return this.
|
|
172
|
+
get releaseQtyInput() {
|
|
173
|
+
return this.shadowRoot.querySelector('input[name=packedQty]')
|
|
229
174
|
}
|
|
230
175
|
|
|
231
|
-
|
|
232
|
-
|
|
176
|
+
get scannable() {
|
|
177
|
+
return this._selectedTaskStatus && this._selectedTaskStatus === WORKSHEET_STATUS.EXECUTING.value
|
|
233
178
|
}
|
|
234
179
|
|
|
235
180
|
_focusOnProductBarcodeInput() {
|
|
236
181
|
setTimeout(() => this.productBarcodeInput.focus(), 100)
|
|
237
182
|
}
|
|
238
183
|
|
|
184
|
+
_focusOnReleaseGoodInput() {
|
|
185
|
+
setTimeout(() => this.releaseGoodNoInput.focus(), 100)
|
|
186
|
+
}
|
|
187
|
+
|
|
239
188
|
_focusOnReleaseQtyInput() {
|
|
240
189
|
setTimeout(() => this.releaseQtyInput.focus(), 100)
|
|
241
190
|
}
|
|
@@ -244,8 +193,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
244
193
|
return html`
|
|
245
194
|
<form id="info-form" class="multi-column-form">
|
|
246
195
|
<fieldset>
|
|
247
|
-
<legend>${i18next.t('title.scan_area')}</legend>
|
|
248
|
-
|
|
249
196
|
<label>${i18next.t('label.release_good_no')}</label>
|
|
250
197
|
<barcode-scanable-input
|
|
251
198
|
name="releaseGoodNo"
|
|
@@ -255,95 +202,54 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
255
202
|
e.preventDefault()
|
|
256
203
|
if (this.releaseGoodNoInput.value) {
|
|
257
204
|
this._fetchInventories(this.releaseGoodNoInput.value)
|
|
205
|
+
this.releaseGoodNoInput.value = ''
|
|
258
206
|
}
|
|
259
207
|
}
|
|
260
208
|
}}"
|
|
261
209
|
></barcode-scanable-input>
|
|
262
210
|
</fieldset>
|
|
263
|
-
|
|
264
|
-
<fieldset>
|
|
265
|
-
<legend>${i18next.t('title.release_order')}: ${this.releaseGoodNo}</legend>
|
|
266
|
-
<label>${i18next.t('label.company')}</label>
|
|
267
|
-
<input name="bizplaceName" readonly />
|
|
268
|
-
|
|
269
|
-
<label>${i18next.t('label.shipping_provider')}</label>
|
|
270
|
-
<input name="shippingProvider" readonly />
|
|
271
|
-
|
|
272
|
-
<label>${i18next.t('label.tracking_no')}</label>
|
|
273
|
-
<input name="trackingNo" readonly />
|
|
274
|
-
|
|
275
|
-
<label>${i18next.t('label.status')}</label>
|
|
276
|
-
<input name="marketplaceStatus" readonly />
|
|
277
|
-
|
|
278
|
-
<label>${i18next.t('label.started_at')}</label>
|
|
279
|
-
<input name="startedAt" type="datetime-local" readonly />
|
|
280
|
-
|
|
281
|
-
<label>${i18next.t('label.ref_no')}</label>
|
|
282
|
-
<input name="refNo" readonly />
|
|
283
|
-
|
|
284
|
-
<label>${i18next.t('label.ref_no_2')}</label>
|
|
285
|
-
<input name="refNo2" readonly />
|
|
286
|
-
</fieldset>
|
|
287
211
|
</form>
|
|
288
212
|
|
|
289
|
-
<
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
213
|
+
<form id="input-form" class="multi-column-form" @keypress="${this.packing.bind(this)}">
|
|
214
|
+
${this.scannable
|
|
215
|
+
? html`
|
|
216
|
+
<fieldset>
|
|
217
|
+
${this._enableProductScanning
|
|
218
|
+
? html` <label>${i18next.t('label.product_barcode')}</label>
|
|
219
|
+
<barcode-scanable-input name="productBarcode" custom-input></barcode-scanable-input>`
|
|
220
|
+
: html`
|
|
221
|
+
<label>${i18next.t('label.packed_qty')}</label>
|
|
222
|
+
<input type="number" min="1" name="packedQty" />
|
|
223
|
+
`}
|
|
224
|
+
</fieldset>
|
|
225
|
+
`
|
|
226
|
+
: ''}
|
|
227
|
+
</form>
|
|
298
228
|
|
|
299
|
-
|
|
300
|
-
|
|
229
|
+
<data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
|
|
230
|
+
<div slot="headroom" id="form-section">
|
|
231
|
+
<form id="info-form" class="multi-column-form">
|
|
301
232
|
<fieldset>
|
|
302
|
-
<legend
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<label>${i18next.t('label.packing_type')}</label>
|
|
311
|
-
<input name="packingTypeSize" readonly />
|
|
312
|
-
|
|
313
|
-
<label>${i18next.t('label.current_location')}</label>
|
|
314
|
-
<input name="binLocation" readonly />
|
|
315
|
-
|
|
316
|
-
<label>${i18next.t('label.packing_progress')}</label>
|
|
317
|
-
<input name="packingProgress" readonly />
|
|
233
|
+
<legend>
|
|
234
|
+
${i18next.t('title.order_no')}: ${this.releaseGoodNo}
|
|
235
|
+
${this.releaseGoodNo
|
|
236
|
+
? html`(${this._bizplaceName})
|
|
237
|
+
<mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
|
|
238
|
+
: ''}
|
|
239
|
+
</legend>
|
|
318
240
|
</fieldset>
|
|
319
|
-
|
|
320
|
-
${this.scannable
|
|
321
|
-
? html`
|
|
322
|
-
<fieldset>
|
|
323
|
-
<legend>${i18next.t('title.input_section')}</legend>
|
|
324
|
-
|
|
325
|
-
${this._enableProductScanning
|
|
326
|
-
? html` <label>${i18next.t('label.product_barcode')}</label>
|
|
327
|
-
<barcode-scanable-input name="productBarcode" custom-input></barcode-scanable-input>`
|
|
328
|
-
: html`
|
|
329
|
-
<label>${i18next.t('label.packed_qty')}</label>
|
|
330
|
-
<input type="number" min="1" name="packedQty" />
|
|
331
|
-
`}
|
|
332
|
-
</fieldset>
|
|
333
|
-
`
|
|
334
|
-
: ''}
|
|
335
241
|
</form>
|
|
336
242
|
</div>
|
|
337
|
-
</
|
|
243
|
+
</data-grist>
|
|
338
244
|
`
|
|
339
245
|
}
|
|
340
246
|
|
|
341
247
|
constructor() {
|
|
342
248
|
super()
|
|
343
249
|
this.data = { records: [] }
|
|
344
|
-
this._productName = ''
|
|
345
250
|
this.releaseGoodNo = ''
|
|
346
251
|
this._enableProductScanning = false
|
|
252
|
+
this._productName = ''
|
|
347
253
|
this._selectedOrderInventory = null
|
|
348
254
|
this._selectedTaskStatus = null
|
|
349
255
|
}
|
|
@@ -354,7 +260,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
354
260
|
}
|
|
355
261
|
}
|
|
356
262
|
|
|
357
|
-
|
|
263
|
+
pageInitialized() {
|
|
358
264
|
this.config = {
|
|
359
265
|
rows: {
|
|
360
266
|
appendable: false,
|
|
@@ -363,11 +269,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
363
269
|
if (data.records.length && record) {
|
|
364
270
|
this._selectedOrderInventory = record
|
|
365
271
|
this._selectedTaskStatus = record.status
|
|
366
|
-
this._productName = record.product?.name
|
|
367
|
-
? `${record.product.name} ${record.product?.description ? `(${record.product.description})` : ''}`
|
|
368
|
-
: ''
|
|
369
272
|
|
|
370
|
-
this._fillUpForm(this.inputForm, record)
|
|
371
273
|
if (this.scannable) {
|
|
372
274
|
if (this._enableProductScanning) this._focusOnProductBarcodeInput()
|
|
373
275
|
else this._focusOnReleaseQtyInput()
|
|
@@ -377,7 +279,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
377
279
|
}
|
|
378
280
|
},
|
|
379
281
|
pagination: { infinite: true },
|
|
380
|
-
list: { fields: ['completed', 'locationName', 'sku', 'product', 'batchId', 'expirationDate', '
|
|
282
|
+
list: { fields: ['completed', 'locationName', 'sku', 'product', 'batchId', 'expirationDate', 'packingProgress'] },
|
|
381
283
|
columns: [
|
|
382
284
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
383
285
|
{
|
|
@@ -390,36 +292,42 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
390
292
|
type: 'string',
|
|
391
293
|
name: 'locationName',
|
|
392
294
|
header: i18next.t('field.location'),
|
|
295
|
+
label: true,
|
|
393
296
|
width: 120
|
|
394
297
|
},
|
|
395
298
|
{
|
|
396
299
|
type: 'string',
|
|
397
300
|
name: 'sku',
|
|
398
301
|
header: i18next.t('field.sku'),
|
|
302
|
+
label: true,
|
|
399
303
|
width: 140
|
|
400
304
|
},
|
|
401
305
|
{
|
|
402
306
|
type: 'object',
|
|
403
307
|
name: 'product',
|
|
404
308
|
header: i18next.t('field.product'),
|
|
405
|
-
|
|
309
|
+
label: true,
|
|
310
|
+
width: 200
|
|
406
311
|
},
|
|
407
312
|
{
|
|
408
|
-
type: '
|
|
409
|
-
name: '
|
|
313
|
+
type: 'string',
|
|
314
|
+
name: 'packingProgress',
|
|
410
315
|
header: i18next.t('field.release_qty'),
|
|
316
|
+
label: true,
|
|
411
317
|
width: 80
|
|
412
318
|
},
|
|
413
319
|
{
|
|
414
320
|
type: 'string',
|
|
415
321
|
name: 'batchId',
|
|
416
322
|
header: i18next.t('field.batch_id'),
|
|
323
|
+
label: true,
|
|
417
324
|
width: 140
|
|
418
325
|
},
|
|
419
326
|
{
|
|
420
327
|
type: 'date',
|
|
421
328
|
name: 'expirationDate',
|
|
422
329
|
header: i18next.t('field.exp_date'),
|
|
330
|
+
label: true,
|
|
423
331
|
width: 120
|
|
424
332
|
}
|
|
425
333
|
]
|
|
@@ -446,6 +354,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
446
354
|
partnerDomainId
|
|
447
355
|
refNo
|
|
448
356
|
refNo2
|
|
357
|
+
refNo3
|
|
449
358
|
airwayBill
|
|
450
359
|
invoice
|
|
451
360
|
startedAt
|
|
@@ -514,7 +423,9 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
514
423
|
this.shippingProvider = worksheetInfo.shippingProvider
|
|
515
424
|
this.orderInformation = worksheetInfo.marketplaceOrder
|
|
516
425
|
|
|
517
|
-
this.
|
|
426
|
+
this._bizplaceName = worksheetInfo.bizplaceName
|
|
427
|
+
this._worksheetInfo = worksheetInfo
|
|
428
|
+
|
|
518
429
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
519
430
|
if (this._selectedOrderInventory) {
|
|
520
431
|
const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
|
|
@@ -522,8 +433,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
522
433
|
this._selectedOrderInventory = null
|
|
523
434
|
this._selectedTaskStatus = null
|
|
524
435
|
this.inputForm.reset()
|
|
525
|
-
} else {
|
|
526
|
-
this._fillUpForm(this.inputForm, record)
|
|
527
436
|
}
|
|
528
437
|
}
|
|
529
438
|
|
|
@@ -540,7 +449,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
540
449
|
record.locationName = record?.binLocation?.name
|
|
541
450
|
record.sku = record?.sku
|
|
542
451
|
record.product = record?.product
|
|
543
|
-
record.packingTypeSize = `${record.packingType}(${record.packingSize})`
|
|
544
452
|
record.packingProgress = `${record.packedQty} / ${record.releaseQty}`
|
|
545
453
|
|
|
546
454
|
return record
|
|
@@ -552,34 +460,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
552
460
|
this.data = { records: [] }
|
|
553
461
|
this.infoForm.reset()
|
|
554
462
|
this.inputForm.reset()
|
|
555
|
-
this._productName = ''
|
|
556
463
|
this.releaseGoodNo = ''
|
|
557
464
|
this._selectedOrderInventory = null
|
|
558
465
|
this._selectedTaskStatus = null
|
|
559
466
|
}
|
|
560
467
|
|
|
561
|
-
_fillUpForm(form, data) {
|
|
562
|
-
form.reset()
|
|
563
|
-
for (let key in data) {
|
|
564
|
-
Array.from(form.querySelectorAll('input')).forEach(field => {
|
|
565
|
-
if (field.name === key && field.type === 'checkbox') {
|
|
566
|
-
field.checked = data[key]
|
|
567
|
-
} else if (field.name === key && field.type === 'datetime-local') {
|
|
568
|
-
const datetime = Number(data[key])
|
|
569
|
-
const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
|
|
570
|
-
field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
|
|
571
|
-
} else if (field.name === key) {
|
|
572
|
-
if (data[key] instanceof Object) {
|
|
573
|
-
const objectData = data[key]
|
|
574
|
-
field.value = `${objectData.name} ${objectData.description ? `(${objectData.description})` : ''}`
|
|
575
|
-
} else {
|
|
576
|
-
field.value = data[key]
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
})
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
468
|
checkShippingProviderAndDeliveryType() {
|
|
584
469
|
if (this.orderInformation.otherInfoJSON == null) {
|
|
585
470
|
return false
|
|
@@ -652,30 +537,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
652
537
|
var decodedHTML = atob(orderDocInfo[0].file)
|
|
653
538
|
this._callPrintDialog(decodedHTML)
|
|
654
539
|
break
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
540
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
query: gql`
|
|
662
|
-
query fetchSellercraftAirwayBill($releaseOrderNo: String!) {
|
|
663
|
-
fetchSellercraftAirwayBill(releaseOrderNo: $releaseOrderNo) {
|
|
664
|
-
airwayBill
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
`,
|
|
668
|
-
variables: { releaseOrderNo }
|
|
669
|
-
})
|
|
670
|
-
|
|
671
|
-
if (!response.errors) {
|
|
672
|
-
this.airwayBill = response.data.fetchAirwayBill.airwayBill
|
|
541
|
+
default:
|
|
542
|
+
let url = new URL(window.location)
|
|
673
543
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
this._callPrintDialog(this.airwayBill)
|
|
677
|
-
} else {
|
|
678
|
-
this._showToast({ message: i18next.t('text.pending_airwaybill_from_ecommerce_platform') })
|
|
544
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
545
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
679
546
|
}
|
|
680
547
|
}
|
|
681
548
|
}
|
|
@@ -731,6 +598,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
731
598
|
|
|
732
599
|
async packing(e) {
|
|
733
600
|
if (e.keyCode === 13) {
|
|
601
|
+
e.preventDefault()
|
|
734
602
|
try {
|
|
735
603
|
this._validatePacking()
|
|
736
604
|
|
|
@@ -741,8 +609,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
741
609
|
if (!response.errors) {
|
|
742
610
|
if (this._enableProductScanning) {
|
|
743
611
|
this.productBarcodeInput.value = ''
|
|
612
|
+
this._focusOnProductBarcodeInput()
|
|
744
613
|
} else {
|
|
745
614
|
this.releaseQtyInput.value = ''
|
|
615
|
+
this._focusOnReleaseQtyInput()
|
|
746
616
|
this._selectedTaskStatus = null
|
|
747
617
|
this._selectedOrderInventory = null
|
|
748
618
|
}
|
|
@@ -756,8 +626,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
756
626
|
}
|
|
757
627
|
|
|
758
628
|
async productBarcodePacking() {
|
|
759
|
-
return await client.
|
|
760
|
-
|
|
629
|
+
return await client.mutate({
|
|
630
|
+
mutation: gql`
|
|
761
631
|
mutation scanProductPacking($worksheetDetailName: String!, $productBarcode: String!) {
|
|
762
632
|
scanProductPacking(worksheetDetailName: $worksheetDetailName, productBarcode: $productBarcode)
|
|
763
633
|
}
|
|
@@ -770,8 +640,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
770
640
|
}
|
|
771
641
|
|
|
772
642
|
async commonPacking() {
|
|
773
|
-
return await client.
|
|
774
|
-
|
|
643
|
+
return await client.mutate({
|
|
644
|
+
mutation: gql`
|
|
775
645
|
mutation packing($worksheetDetailName: String!, $releaseQty: Int!) {
|
|
776
646
|
packing(worksheetDetailName: $worksheetDetailName, releaseQty: $releaseQty)
|
|
777
647
|
}
|
|
@@ -814,7 +684,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
814
684
|
async _completeHandler() {
|
|
815
685
|
if (!this.data?.records?.length || this.data.records.some(record => !record.completed)) return
|
|
816
686
|
|
|
817
|
-
this.updateContext()
|
|
818
687
|
const result = await CustomAlert({
|
|
819
688
|
title: i18next.t('title.packing'),
|
|
820
689
|
text: i18next.t('text.do_you_want_to_complete'),
|
|
@@ -822,16 +691,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
822
691
|
cancelButton: { text: i18next.t('button.cancel') }
|
|
823
692
|
})
|
|
824
693
|
|
|
825
|
-
if (!result.value)
|
|
826
|
-
return
|
|
827
|
-
}
|
|
694
|
+
if (!result.value) return
|
|
828
695
|
|
|
829
696
|
this._complete()
|
|
830
697
|
}
|
|
831
698
|
|
|
832
699
|
async _complete() {
|
|
833
|
-
const response = await client.
|
|
834
|
-
|
|
700
|
+
const response = await client.mutate({
|
|
701
|
+
mutation: gql`
|
|
835
702
|
mutation completePacking($releaseGoodNo: String!) {
|
|
836
703
|
completePacking(releaseGoodNo: $releaseGoodNo)
|
|
837
704
|
}
|
|
@@ -841,6 +708,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
841
708
|
|
|
842
709
|
if (!response.errors) {
|
|
843
710
|
this._clearView()
|
|
711
|
+
this.updateContext()
|
|
844
712
|
await CustomAlert({
|
|
845
713
|
title: i18next.t('title.packing'),
|
|
846
714
|
text: i18next.t('text.packing_is_completed'),
|
|
@@ -872,6 +740,19 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
872
740
|
}
|
|
873
741
|
}
|
|
874
742
|
|
|
743
|
+
_openWorksheetInformation() {
|
|
744
|
+
openPopup(
|
|
745
|
+
html`
|
|
746
|
+
<worksheet-information-popup .worksheetInformation="${this._worksheetInfo}"></worksheet-information-popup>
|
|
747
|
+
`,
|
|
748
|
+
{
|
|
749
|
+
backdrop: true,
|
|
750
|
+
size: 'large',
|
|
751
|
+
title: i18next.t('title.order_information')
|
|
752
|
+
}
|
|
753
|
+
)
|
|
754
|
+
}
|
|
755
|
+
|
|
875
756
|
async _setOrderToRTS() {
|
|
876
757
|
let result = await CustomAlert({
|
|
877
758
|
title: i18next.t('title.are_you_sure'),
|