@things-factory/operato-wms 4.0.9 → 4.0.13
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
|
@@ -49,7 +49,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
49
49
|
_mimetype: String,
|
|
50
50
|
_doPath: String,
|
|
51
51
|
_allowROAddProductSetting: Boolean,
|
|
52
|
-
|
|
52
|
+
_releaseOrder: Object,
|
|
53
|
+
_shippingOrder: Object,
|
|
54
|
+
_containerArrivalDate: Date,
|
|
55
|
+
_containerLeavingDate: Date
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -166,20 +169,40 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
166
169
|
type="checkbox"
|
|
167
170
|
name="ownTransport"
|
|
168
171
|
?checked="${this._ownTransport}"
|
|
169
|
-
?
|
|
170
|
-
|
|
172
|
+
?disabled="${this._disableTransport || !this?._editable}"
|
|
173
|
+
@change="${e => {
|
|
174
|
+
this._ownTransport = e.currentTarget.checked
|
|
175
|
+
if (this._ownTransport) {
|
|
176
|
+
this._warehouseTransportInput.checked = false
|
|
177
|
+
this._warehouseTransport = false
|
|
178
|
+
} else {
|
|
179
|
+
this._warehouseTransportInput.checked = true
|
|
180
|
+
this._warehouseTransport = true
|
|
181
|
+
}
|
|
182
|
+
this._validateTransport()
|
|
183
|
+
}}"
|
|
171
184
|
/>
|
|
172
|
-
<label
|
|
185
|
+
<label for="ownTransport">${i18next.t('label.own_transport')}</label>
|
|
173
186
|
|
|
174
187
|
<input
|
|
175
188
|
id="warehouseTransport"
|
|
176
189
|
type="checkbox"
|
|
177
190
|
name="warehouseTransport"
|
|
178
191
|
?checked="${!this._ownTransport}"
|
|
179
|
-
?
|
|
180
|
-
|
|
192
|
+
?disabled="${this._disableTransport || !this?._editable}"
|
|
193
|
+
@change="${e => {
|
|
194
|
+
this._warehouseTransport = e.currentTarget.checked
|
|
195
|
+
if (this._warehouseTransport) {
|
|
196
|
+
this._ownTransportInput.checked = false
|
|
197
|
+
this._ownTransport = false
|
|
198
|
+
} else {
|
|
199
|
+
this._ownTransportInput.checked = true
|
|
200
|
+
this._ownTransport = true
|
|
201
|
+
}
|
|
202
|
+
this._validateTransport()
|
|
203
|
+
}}"
|
|
181
204
|
/>
|
|
182
|
-
<label
|
|
205
|
+
<label for="warehouseTransport">${i18next.t('label.warehouse_transport')}</label>
|
|
183
206
|
|
|
184
207
|
<input
|
|
185
208
|
id="courierOption"
|
|
@@ -199,8 +222,17 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
199
222
|
/>
|
|
200
223
|
<label>${i18next.t('label.packing')}</label>
|
|
201
224
|
|
|
202
|
-
<input
|
|
203
|
-
|
|
225
|
+
<input
|
|
226
|
+
id="exportOption"
|
|
227
|
+
type="checkbox"
|
|
228
|
+
name="exportOption"
|
|
229
|
+
?checked="${this._exportOption}"
|
|
230
|
+
?disabled="${!this?._editable}"
|
|
231
|
+
@change="${e => {
|
|
232
|
+
this._exportOption = e.currentTarget.checked
|
|
233
|
+
}}"
|
|
234
|
+
/>
|
|
235
|
+
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
204
236
|
|
|
205
237
|
${this._crossDocking
|
|
206
238
|
? html`
|
|
@@ -217,27 +249,36 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
217
249
|
</div>
|
|
218
250
|
|
|
219
251
|
<label>${i18next.t('label.company')}</label>
|
|
220
|
-
<input name="bizplaceName"
|
|
252
|
+
<input name="bizplaceName" disabled />
|
|
221
253
|
|
|
222
254
|
<label>${i18next.t('label.ref_no')}</label>
|
|
223
|
-
<input name="refNo" readonly />
|
|
255
|
+
<input name="refNo" ?readonly="${!this?._editable}" />
|
|
224
256
|
|
|
225
257
|
<label>${i18next.t('label.ref_no_2')}</label>
|
|
226
|
-
<input name="refNo2" readonly />
|
|
258
|
+
<input name="refNo2" ?readonly="${!this?._editable}" />
|
|
227
259
|
|
|
228
260
|
<label>${i18next.t('label.ref_no_3')}</label>
|
|
229
|
-
<input name="refNo3" readonly />
|
|
261
|
+
<input name="refNo3" ?readonly="${!this?._editable}" />
|
|
230
262
|
|
|
231
263
|
<label>${i18next.t('label.release_date')}</label>
|
|
232
|
-
<input name="releaseDate" type="date" readonly />
|
|
264
|
+
<input name="releaseDate" type="date" ?readonly="${!this?._editable}" required />
|
|
233
265
|
|
|
234
266
|
<label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
|
|
235
|
-
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" readonly />
|
|
267
|
+
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
|
|
268
|
+
|
|
269
|
+
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.attention_to')}</label>
|
|
270
|
+
<input name="attentionTo" ?hidden="${this.roType === 'b2b'}" readonly />
|
|
271
|
+
|
|
272
|
+
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.phone_no')}</label>
|
|
273
|
+
<input name="phone1" ?hidden="${this.roType === 'b2b'}" readonly />
|
|
274
|
+
|
|
275
|
+
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.delivery_address')}</label>
|
|
276
|
+
<textarea name="deliveryAddress1" ?hidden="${this.roType === 'b2b'}" rows="5" readonly></textarea>
|
|
236
277
|
|
|
237
278
|
${this._crossDocking
|
|
238
279
|
? html`
|
|
239
280
|
<label for="ganNo">${i18next.t('label.arrival_notice')}</label>
|
|
240
|
-
<input
|
|
281
|
+
<input disabled name="ganNo" .value="${this._ganNo}" />
|
|
241
282
|
`
|
|
242
283
|
: ''}
|
|
243
284
|
${this._attachments?.length > 0
|
|
@@ -263,24 +304,46 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
263
304
|
<barcode-tag bcid="qrcode" .value=${this._releaseOrderNo}></barcode-tag>
|
|
264
305
|
</div>
|
|
265
306
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
307
|
+
${this._exportOption
|
|
308
|
+
? html`
|
|
309
|
+
<div class="so-form-container">
|
|
310
|
+
<form name="shippingOrder" class="multi-column-form">
|
|
311
|
+
<fieldset>
|
|
312
|
+
<legend>${i18next.t('title.export_order')}</legend>
|
|
313
|
+
<label>${i18next.t('label.container_no')}</label>
|
|
314
|
+
<input name="containerNo" ?readonly="${!this?._editable}" required />
|
|
315
|
+
|
|
316
|
+
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
317
|
+
<input
|
|
318
|
+
name="containerArrivalDate"
|
|
319
|
+
type="date"
|
|
320
|
+
?readonly="${!this?._editable}"
|
|
321
|
+
.value="${this._containerArrivalDate}"
|
|
322
|
+
@change="${e => {
|
|
323
|
+
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
324
|
+
required
|
|
325
|
+
}}"
|
|
326
|
+
/>
|
|
327
|
+
|
|
328
|
+
<label>${i18next.t('label.container_leaving_date')}</label>
|
|
329
|
+
<input
|
|
330
|
+
name="containerLeavingDate"
|
|
331
|
+
type="date"
|
|
332
|
+
?readonly="${!this?._editable}"
|
|
333
|
+
.value="${this._containerLeavingDate}"
|
|
334
|
+
@change="${e => {
|
|
335
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
336
|
+
required
|
|
337
|
+
}}"
|
|
338
|
+
/>
|
|
339
|
+
|
|
340
|
+
<label>${i18next.t('label.ship_name')}</label>
|
|
341
|
+
<input name="shipName" ?readonly="${!this?._editable}" required />
|
|
342
|
+
</fieldset>
|
|
343
|
+
</form>
|
|
344
|
+
</div>
|
|
345
|
+
`
|
|
346
|
+
: ''}
|
|
284
347
|
|
|
285
348
|
<div class="container">
|
|
286
349
|
<div class="grist">
|
|
@@ -309,6 +372,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
309
372
|
constructor() {
|
|
310
373
|
super()
|
|
311
374
|
this._clearPage()
|
|
375
|
+
this._editable = false
|
|
376
|
+
this._disableTransport = false
|
|
377
|
+
this._shippingOrder = null
|
|
312
378
|
}
|
|
313
379
|
|
|
314
380
|
get context() {
|
|
@@ -328,6 +394,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
328
394
|
...CommonButtonStyles.back
|
|
329
395
|
}
|
|
330
396
|
]
|
|
397
|
+
if (this._editable) {
|
|
398
|
+
actions.push({
|
|
399
|
+
title: i18next.t('button.update_order_details'),
|
|
400
|
+
action: this._updateReleaseGoodDetails.bind(this),
|
|
401
|
+
...CommonButtonStyles.add
|
|
402
|
+
})
|
|
403
|
+
}
|
|
331
404
|
|
|
332
405
|
if (this._status === ORDER_STATUS.PENDING.value) {
|
|
333
406
|
actions.push(
|
|
@@ -386,6 +459,18 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
386
459
|
return this.shadowRoot.querySelector('input[name=ownTransport]')
|
|
387
460
|
}
|
|
388
461
|
|
|
462
|
+
get _warehouseTransportInput() {
|
|
463
|
+
return this.shadowRoot.querySelector('input[name=warehouseTransport]')
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
get _containerArrivalDateInput() {
|
|
467
|
+
return this.shadowRoot.querySelector('input[name=containerArrivalDate]')
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
get _containerLeavingDateInput() {
|
|
471
|
+
return this.shadowRoot.querySelector('input[name=containerLeavingDate]')
|
|
472
|
+
}
|
|
473
|
+
|
|
389
474
|
get inventoryGrist() {
|
|
390
475
|
return this.shadowRoot.querySelector('data-grist#inventory-grist')
|
|
391
476
|
}
|
|
@@ -409,7 +494,11 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
409
494
|
|
|
410
495
|
async pageInitialized() {
|
|
411
496
|
let [allowROAddProductSetting, userRoles] = [fetchSettingRule('allow-ro-add-product'), this.fetchUserRoleHandler()]
|
|
497
|
+
let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
|
|
498
|
+
|
|
499
|
+
this._enableTransportationServiceSetting = enableTransportationServiceSetting
|
|
412
500
|
|
|
501
|
+
this._validateTransport()
|
|
413
502
|
this._clearPage()
|
|
414
503
|
|
|
415
504
|
this.inventoryGristConfig = {
|
|
@@ -438,6 +527,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
438
527
|
header: i18next.t('field.product'),
|
|
439
528
|
width: 150
|
|
440
529
|
},
|
|
530
|
+
{
|
|
531
|
+
type: 'string',
|
|
532
|
+
name: 'productBrand',
|
|
533
|
+
header: i18next.t('field.brand'),
|
|
534
|
+
width: 100
|
|
535
|
+
},
|
|
441
536
|
{
|
|
442
537
|
type: 'string',
|
|
443
538
|
name: 'packingType',
|
|
@@ -454,14 +549,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
454
549
|
type: 'integer',
|
|
455
550
|
name: 'releaseQty',
|
|
456
551
|
header: i18next.t('field.release_qty'),
|
|
457
|
-
record: { options: { min: 0 } },
|
|
458
552
|
width: 130
|
|
459
553
|
},
|
|
460
554
|
{
|
|
461
555
|
type: 'string',
|
|
462
556
|
name: 'releaseUomValueWithUom',
|
|
463
557
|
header: i18next.t('field.release_uom_value'),
|
|
464
|
-
record: { options: { min: 0 } },
|
|
465
558
|
width: 150
|
|
466
559
|
},
|
|
467
560
|
{
|
|
@@ -595,6 +688,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
595
688
|
name
|
|
596
689
|
truckNo
|
|
597
690
|
type
|
|
691
|
+
attentionTo
|
|
692
|
+
phone1
|
|
693
|
+
deliveryAddress1
|
|
598
694
|
bizplace {
|
|
599
695
|
id
|
|
600
696
|
name
|
|
@@ -634,6 +730,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
634
730
|
product {
|
|
635
731
|
id
|
|
636
732
|
sku
|
|
733
|
+
brand
|
|
637
734
|
name
|
|
638
735
|
description
|
|
639
736
|
}
|
|
@@ -641,6 +738,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
641
738
|
packingType
|
|
642
739
|
packingSize
|
|
643
740
|
qty
|
|
741
|
+
lockedQty
|
|
742
|
+
lockedUomValue
|
|
644
743
|
uomValue
|
|
645
744
|
releaseQty
|
|
646
745
|
releaseUomValue
|
|
@@ -652,6 +751,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
652
751
|
status
|
|
653
752
|
}
|
|
654
753
|
shippingOrderInfo {
|
|
754
|
+
id
|
|
655
755
|
containerNo
|
|
656
756
|
containerLeavingDate
|
|
657
757
|
containerArrivalDate
|
|
@@ -689,14 +789,14 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
689
789
|
if (!response.errors) {
|
|
690
790
|
const releaseOrder = response.data.releaseGoodDetail
|
|
691
791
|
const shippingOrder = releaseOrder.shippingOrderInfo
|
|
792
|
+
|
|
692
793
|
this.roType = releaseOrder.type
|
|
693
794
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
694
|
-
let roundedUomValue =
|
|
695
|
-
inventoryInfo.releaseQty *
|
|
696
|
-
((inventoryInfo.uomValue + inventoryInfo.releaseUomValue) / (inventoryInfo.qty + inventoryInfo.releaseQty))
|
|
795
|
+
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(2))
|
|
697
796
|
return {
|
|
698
797
|
...inventoryInfo,
|
|
699
798
|
productSKU: inventoryInfo?.product?.sku || '',
|
|
799
|
+
productBrand: inventoryInfo?.product?.brand || '',
|
|
700
800
|
inventory: {
|
|
701
801
|
id: inventoryInfo.id,
|
|
702
802
|
name: inventoryInfo.name,
|
|
@@ -711,46 +811,63 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
711
811
|
releaseUomValue: inventoryInfo.releaseUomValue,
|
|
712
812
|
releaseUomValueWithUom: inventoryInfo.releaseUomValue + ' ' + inventoryInfo.uom
|
|
713
813
|
},
|
|
714
|
-
qty: inventoryInfo.qty
|
|
715
|
-
remainQty: inventoryInfo.qty,
|
|
716
|
-
uomValue: inventoryInfo.uomValue
|
|
814
|
+
qty: inventoryInfo.qty,
|
|
815
|
+
remainQty: inventoryInfo.qty - inventoryInfo.lockedQty,
|
|
816
|
+
uomValue: inventoryInfo.uomValue, //total
|
|
717
817
|
releaseUomValue: inventoryInfo.releaseUomValue,
|
|
718
|
-
remainUomValue: inventoryInfo.uomValue,
|
|
719
|
-
availableUomValueWithUom: `${inventoryInfo.uomValue
|
|
818
|
+
remainUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue,
|
|
819
|
+
availableUomValueWithUom: `${inventoryInfo.uomValue /*+ inventoryInfo.releaseUomValue*/} ${
|
|
820
|
+
inventoryInfo.uom
|
|
821
|
+
}`, //total
|
|
720
822
|
releaseUomValueWithUom: inventoryInfo.releaseUomValue + ' ' + inventoryInfo.uom,
|
|
721
|
-
remainUomValueWithUom: `${inventoryInfo.uomValue} ${inventoryInfo.uom}`,
|
|
823
|
+
remainUomValueWithUom: `${inventoryInfo.uomValue - inventoryInfo.releaseUomValue} ${inventoryInfo.uom}`,
|
|
722
824
|
status: inventoryInfo.status,
|
|
723
825
|
existing: true,
|
|
724
|
-
roundedUomValue: `${roundedUomValue} ${inventoryInfo.uom}
|
|
826
|
+
roundedUomValue: `${roundedUomValue} ${inventoryInfo.uom}`,
|
|
827
|
+
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty,
|
|
828
|
+
addableUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue
|
|
725
829
|
}
|
|
726
830
|
})
|
|
727
831
|
|
|
728
832
|
const orderVass = releaseOrder.orderVass
|
|
729
833
|
|
|
834
|
+
this._releaseOrderId = releaseOrder.id
|
|
730
835
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
731
|
-
this._exportOption =
|
|
732
|
-
this._bizplaceName = response.data.releaseGoodDetail.bizplace.name
|
|
836
|
+
this._exportOption = releaseOrder.exportOption
|
|
733
837
|
if (this._exportOption) {
|
|
734
838
|
this._ownTransport = true
|
|
735
839
|
} else if (!this._exportOption) {
|
|
736
|
-
this._ownTransport =
|
|
840
|
+
this._ownTransport = releaseOrder.ownTransport
|
|
737
841
|
}
|
|
738
842
|
|
|
739
|
-
this._courierOption =
|
|
740
|
-
this._packingOption =
|
|
741
|
-
this._crossDocking =
|
|
742
|
-
|
|
843
|
+
this._courierOption = releaseOrder.courierOption
|
|
844
|
+
this._packingOption = releaseOrder.packingOption
|
|
845
|
+
this._crossDocking = releaseOrder?.crossDocking
|
|
846
|
+
|
|
847
|
+
await this.updateComplete
|
|
743
848
|
|
|
849
|
+
this._ganNo = releaseOrder?.arrivalNotice?.name
|
|
744
850
|
this._status = releaseOrder.status
|
|
745
851
|
|
|
746
|
-
this._fillupRGForm(
|
|
852
|
+
this._fillupRGForm({
|
|
853
|
+
...releaseOrder,
|
|
854
|
+
bizplaceName: releaseOrder.bizplace?.name
|
|
855
|
+
})
|
|
856
|
+
|
|
857
|
+
if (shippingOrder) {
|
|
858
|
+
this._shippingOrder = shippingOrder
|
|
859
|
+
this._fillupSOForm(shippingOrder)
|
|
860
|
+
}
|
|
747
861
|
|
|
748
862
|
if (releaseOrder && releaseOrder?.attachment) {
|
|
749
863
|
this._attachments = releaseOrder && releaseOrder.attachment
|
|
750
864
|
}
|
|
751
865
|
|
|
752
|
-
if (
|
|
753
|
-
|
|
866
|
+
if (releaseOrder.status !== 'DONE') {
|
|
867
|
+
this._editable = true
|
|
868
|
+
} else {
|
|
869
|
+
this._editable = false
|
|
870
|
+
}
|
|
754
871
|
this.inventoryData = { records: orderInventories }
|
|
755
872
|
this.vasData = {
|
|
756
873
|
records: orderVass
|
|
@@ -778,35 +895,37 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
778
895
|
}
|
|
779
896
|
|
|
780
897
|
_fillupForm(form, data) {
|
|
781
|
-
form
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
field.
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
if (
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
898
|
+
if (form) {
|
|
899
|
+
form.reset()
|
|
900
|
+
for (let key in data) {
|
|
901
|
+
Array.from(form.querySelectorAll('input, textarea')).forEach(field => {
|
|
902
|
+
if (field.name === key && field.type === 'checkbox') {
|
|
903
|
+
field.checked = data[key]
|
|
904
|
+
} else if (field.name === key && field.type === 'datetime-local') {
|
|
905
|
+
const datetime = Number(data[key])
|
|
906
|
+
const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
|
|
907
|
+
field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
|
|
908
|
+
} else if (field.name === key) {
|
|
909
|
+
if (data[key] instanceof Object) {
|
|
910
|
+
const objectData = data[key]
|
|
911
|
+
field.value = `${objectData.name} ${objectData.description ? `(${objectData.description})` : ''}`
|
|
912
|
+
} else {
|
|
913
|
+
field.value = data[key]
|
|
914
|
+
}
|
|
796
915
|
}
|
|
797
|
-
}
|
|
798
|
-
}
|
|
916
|
+
})
|
|
917
|
+
}
|
|
799
918
|
}
|
|
800
919
|
}
|
|
801
920
|
|
|
802
921
|
_clearPage() {
|
|
803
922
|
this._status = null
|
|
923
|
+
this.roType = 'b2b'
|
|
804
924
|
this._exportOption = false
|
|
805
925
|
this._courierOption = false
|
|
806
926
|
this._packingOption = false
|
|
807
927
|
this._ownTransport = true
|
|
808
928
|
this._downloadable = true
|
|
809
|
-
this._bizplaceName = ''
|
|
810
929
|
this._attachments = []
|
|
811
930
|
this.inventoryData = { records: [] }
|
|
812
931
|
this.vasData = { records: [] }
|
|
@@ -1005,6 +1124,114 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1005
1124
|
|
|
1006
1125
|
return []
|
|
1007
1126
|
}
|
|
1127
|
+
|
|
1128
|
+
async _updateReleaseGoodDetails() {
|
|
1129
|
+
try {
|
|
1130
|
+
this._validateTransport()
|
|
1131
|
+
this._validateForm()
|
|
1132
|
+
|
|
1133
|
+
const result = await CustomAlert({
|
|
1134
|
+
title: i18next.t('title.are_you_sure'),
|
|
1135
|
+
text: i18next.t('text.update_release_order_details'),
|
|
1136
|
+
confirmButton: { text: i18next.t('button.submit') },
|
|
1137
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1138
|
+
})
|
|
1139
|
+
|
|
1140
|
+
if (!result.value) return
|
|
1141
|
+
|
|
1142
|
+
let releaseOrder = this._getFormInfo()
|
|
1143
|
+
delete releaseOrder.warehouseTransport
|
|
1144
|
+
delete releaseOrder.bizplaceId
|
|
1145
|
+
delete releaseOrder.bizplaceName
|
|
1146
|
+
delete releaseOrder.status
|
|
1147
|
+
delete releaseOrder.ganNo
|
|
1148
|
+
|
|
1149
|
+
let shippingOrder = this._exportOption ? this._serializeForm(this.shippingOrderForm) : null
|
|
1150
|
+
|
|
1151
|
+
const response = await client.mutate({
|
|
1152
|
+
mutation: gql`
|
|
1153
|
+
mutation updateReleaseGoodDetails($releaseOrder: ReleaseGoodPatch!, $shippingOrder: ShippingOrderPatch) {
|
|
1154
|
+
updateReleaseGoodDetails(releaseGood: $releaseOrder, shippingOrder: $shippingOrder) {
|
|
1155
|
+
id
|
|
1156
|
+
name
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
`,
|
|
1160
|
+
variables: {
|
|
1161
|
+
releaseOrder: {
|
|
1162
|
+
...releaseOrder,
|
|
1163
|
+
id: this._releaseOrderId,
|
|
1164
|
+
name: this._releaseOrderNo,
|
|
1165
|
+
ownTransport: this._importCargo ? true : this._ownTransport
|
|
1166
|
+
},
|
|
1167
|
+
shippingOrder
|
|
1168
|
+
}
|
|
1169
|
+
})
|
|
1170
|
+
|
|
1171
|
+
if (!response.errors) {
|
|
1172
|
+
this._showToast({ message: i18next.t('text.release_order_details_updated') })
|
|
1173
|
+
await this._fetchReleaseOrder()
|
|
1174
|
+
}
|
|
1175
|
+
} catch (e) {
|
|
1176
|
+
this._showToast(e)
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
_getFormInfo() {
|
|
1181
|
+
const formData = this._serializeForm(this.releaseOrderForm)
|
|
1182
|
+
delete formData.importedOrder
|
|
1183
|
+
return formData
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
_serializeForm(form) {
|
|
1187
|
+
let obj = {}
|
|
1188
|
+
Array.from(form.querySelectorAll('input, select')).forEach(field => {
|
|
1189
|
+
if (!field.hasAttribute('hidden')) {
|
|
1190
|
+
obj[field.name] = field.type === 'checkbox' ? field.checked : field.value
|
|
1191
|
+
}
|
|
1192
|
+
})
|
|
1193
|
+
|
|
1194
|
+
return obj
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
_validateTransport() {
|
|
1198
|
+
//Check if warehouse provide transport
|
|
1199
|
+
if (this._enableTransportationServiceSetting != undefined && !this._enableTransportationServiceSetting) {
|
|
1200
|
+
this._disableTransport = true
|
|
1201
|
+
this._ownTransportInput.checked = true
|
|
1202
|
+
this._ownTransport = true
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
_validateForm() {
|
|
1207
|
+
if (!this.releaseOrderForm.checkValidity()) {
|
|
1208
|
+
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
// - condition: export is ticked
|
|
1212
|
+
if (this.shippingOrderForm) {
|
|
1213
|
+
if (!this.shippingOrderForm.checkValidity()) {
|
|
1214
|
+
throw new Error(i18next.t('text.shipping_order_form_invalid'))
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
validateDate(e) {
|
|
1220
|
+
let inputDate = e.currentTarget.value
|
|
1221
|
+
let todayDate = this._getStdDate()
|
|
1222
|
+
if (inputDate < todayDate) {
|
|
1223
|
+
this._showToast({
|
|
1224
|
+
message: 'Invalid date'
|
|
1225
|
+
})
|
|
1226
|
+
}
|
|
1227
|
+
return inputDate
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
_getStdDate() {
|
|
1231
|
+
let date = new Date()
|
|
1232
|
+
date.setDate(date.getDate())
|
|
1233
|
+
return date.toISOString().split('T')[0]
|
|
1234
|
+
}
|
|
1008
1235
|
}
|
|
1009
1236
|
|
|
1010
1237
|
window.customElements.define('release-order-detail', ReleaseOrderDetail)
|
|
@@ -271,6 +271,12 @@ class CheckReturnOrder extends connect(store)(localize(i18next)(PageView)) {
|
|
|
271
271
|
header: i18next.t('field.product'),
|
|
272
272
|
width: 150
|
|
273
273
|
},
|
|
274
|
+
{
|
|
275
|
+
type: 'string',
|
|
276
|
+
name: 'brand',
|
|
277
|
+
header: i18next.t('field.brand'),
|
|
278
|
+
width: 150
|
|
279
|
+
},
|
|
274
280
|
{
|
|
275
281
|
type: 'string',
|
|
276
282
|
name: 'packingType',
|
|
@@ -343,6 +349,7 @@ class CheckReturnOrder extends connect(store)(localize(i18next)(PageView)) {
|
|
|
343
349
|
name
|
|
344
350
|
description
|
|
345
351
|
sku
|
|
352
|
+
brand
|
|
346
353
|
}
|
|
347
354
|
productName
|
|
348
355
|
packingType
|
|
@@ -376,7 +383,8 @@ class CheckReturnOrder extends connect(store)(localize(i18next)(PageView)) {
|
|
|
376
383
|
records: orderInventories.map(orderInventory => {
|
|
377
384
|
return {
|
|
378
385
|
...orderInventory,
|
|
379
|
-
sku: orderInventory.product.sku
|
|
386
|
+
sku: orderInventory.product.sku,
|
|
387
|
+
brand: orderInventory.product.brand
|
|
380
388
|
}
|
|
381
389
|
})
|
|
382
390
|
}
|
|
@@ -411,6 +411,11 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
411
411
|
width: 280,
|
|
412
412
|
ignoreCondition: true
|
|
413
413
|
},
|
|
414
|
+
{
|
|
415
|
+
name: 'productBrand',
|
|
416
|
+
header: i18next.t('field.brand'),
|
|
417
|
+
ignoreCondition: true
|
|
418
|
+
},
|
|
414
419
|
{
|
|
415
420
|
name: 'packingType',
|
|
416
421
|
header: i18next.t('field.packing_type'),
|
|
@@ -437,6 +442,7 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
437
442
|
'releaseGoodName',
|
|
438
443
|
'batchId',
|
|
439
444
|
'productName',
|
|
445
|
+
'productBrand',
|
|
440
446
|
'packingType',
|
|
441
447
|
'packingSize',
|
|
442
448
|
'releaseQty',
|
|
@@ -459,6 +465,12 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
459
465
|
header: i18next.t('field.product_name'),
|
|
460
466
|
width: 150
|
|
461
467
|
},
|
|
468
|
+
{
|
|
469
|
+
type: 'string',
|
|
470
|
+
name: 'productBrand',
|
|
471
|
+
header: i18next.t('field.brand'),
|
|
472
|
+
width: 150
|
|
473
|
+
},
|
|
462
474
|
{
|
|
463
475
|
type: 'string',
|
|
464
476
|
name: 'batchId',
|
|
@@ -632,7 +644,7 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
632
644
|
if (releaseQty === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
|
|
633
645
|
if (returnQty > releaseQty) {
|
|
634
646
|
throw new Error(i18next.t('text.available_quantity_insufficient'))
|
|
635
|
-
} else if (
|
|
647
|
+
} else if (returnQty <= 0 || isNaN(returnQty)) {
|
|
636
648
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
637
649
|
}
|
|
638
650
|
}
|
|
@@ -754,7 +766,7 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
754
766
|
let returnOrder = this._serializeForm(this.returnOrderForm)
|
|
755
767
|
delete returnOrder.warehouseTransport
|
|
756
768
|
returnOrder.orderInventories = this._getOrderInventories()
|
|
757
|
-
returnOrder.ownTransport = this._ownTransport
|
|
769
|
+
returnOrder.ownTransport = this._ownTransport
|
|
758
770
|
const attachments = this._document?.files ? this._document.files : undefined
|
|
759
771
|
const response = await client.mutate({
|
|
760
772
|
mutation: gql`
|