@things-factory/operato-wms 4.0.28 → 4.0.32
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/fetch-setting-value.js +10 -2
- package/client/pages/bulk-operation/bulk-operation.js +44 -10
- package/client/pages/bulk-operation/validate-gan-popup.js +5 -4
- package/client/pages/bulk-operation/validate-ro-popup.js +7 -39
- package/client/pages/components/popup-reusable-pallet.js +145 -0
- package/client/pages/components/vas-templates/vas-pallet-add-popup.js +12 -11
- package/client/pages/components/vas-templates/vas-relabel.js +57 -34
- package/client/pages/components/vas-templates/vas-repack-relabel.js +56 -36
- package/client/pages/components/vas-templates/vas-repack.js +45 -31
- package/client/pages/components/vas-templates/vas-repalletizing.js +58 -39
- package/client/pages/components/vas-templates/vas-unpack.js +38 -24
- package/client/pages/components/worksheet-information-popup.js +4 -1
- package/client/pages/inbound/unload-product.js +119 -103
- package/client/pages/inventory/onhand-inventory.js +1 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +52 -44
- package/client/pages/order/arrival-notice/arrival-notice-list.js +2 -5
- package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
- package/client/pages/order/release-order/batch-picking-popup.js +4 -3
- package/client/pages/order/release-order/create-release-order.js +1 -1
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -5
- package/client/pages/order/release-order/release-order-detail.js +31 -14
- package/client/pages/order/return-order/create-return-order.js +41 -52
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +2 -2
- package/client/pages/order/transport-order/create-delivery-order.js +4 -2
- package/client/pages/order/transport-order/delivery-note-popup.js +2 -2
- package/client/pages/outbound/packing-worksheet-list.js +64 -4
- package/client/pages/outbound/picking-product.js +12 -7
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +2 -2
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +5 -1
- package/client/pages/report/inbound-order-details-report.js +3 -5
- package/client/pages/vas/abstract-execute-vas.js +4 -1
- package/client/pages/vas/execute-pure-vas.js +3 -8
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +1 -1
- package/config.development.js +73 -0
- package/config.production.js +113 -0
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -4
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +2 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -4
- package/server/graphql/types/reports/inbound-order-details-report.ts +2 -1
- package/translations/en.json +15 -1
- package/translations/ko.json +20 -7
- package/translations/ms.json +21 -8
- package/translations/zh.json +21 -8
- package/client/pages/components/popup-unloading.js +0 -610
|
@@ -195,6 +195,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
195
195
|
} else {
|
|
196
196
|
this._warehouseTransportInput.checked = true
|
|
197
197
|
this._warehouseTransport = true
|
|
198
|
+
this._exportInput.checked = false
|
|
199
|
+
this._exportOption = false
|
|
198
200
|
}
|
|
199
201
|
this._validateTransport()
|
|
200
202
|
}}"
|
|
@@ -212,6 +214,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
212
214
|
if (this._warehouseTransport) {
|
|
213
215
|
this._ownTransportInput.checked = false
|
|
214
216
|
this._ownTransport = false
|
|
217
|
+
this._exportInput.checked = false
|
|
218
|
+
this._exportOption = false
|
|
215
219
|
} else {
|
|
216
220
|
this._ownTransportInput.checked = true
|
|
217
221
|
this._ownTransport = true
|
|
@@ -247,6 +251,16 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
247
251
|
?disabled="${!this?._editable}"
|
|
248
252
|
@change="${e => {
|
|
249
253
|
this._exportOption = e.currentTarget.checked
|
|
254
|
+
if (this._exportOption == true) {
|
|
255
|
+
this._warehouseTransportInput.checked = false
|
|
256
|
+
this._warehouseTransport = false
|
|
257
|
+
this._ownTransportInput.checked = true
|
|
258
|
+
this._ownTransport = true
|
|
259
|
+
}
|
|
260
|
+
if (this._warehouseTransport) {
|
|
261
|
+
this._exportInput.checked = false
|
|
262
|
+
this._exportOption = false
|
|
263
|
+
}
|
|
250
264
|
}}"
|
|
251
265
|
/>
|
|
252
266
|
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
@@ -345,8 +359,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
345
359
|
.value="${this._containerArrivalDate}"
|
|
346
360
|
@change="${e => {
|
|
347
361
|
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
348
|
-
required
|
|
349
362
|
}}"
|
|
363
|
+
required
|
|
350
364
|
/>
|
|
351
365
|
|
|
352
366
|
<label>${i18next.t('label.container_leaving_date')}</label>
|
|
@@ -357,8 +371,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
357
371
|
.value="${this._containerLeavingDate}"
|
|
358
372
|
@change="${e => {
|
|
359
373
|
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
360
|
-
required
|
|
361
374
|
}}"
|
|
375
|
+
required
|
|
362
376
|
/>
|
|
363
377
|
|
|
364
378
|
<label>${i18next.t('label.ship_name')}</label>
|
|
@@ -415,10 +429,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
415
429
|
}
|
|
416
430
|
|
|
417
431
|
get context() {
|
|
418
|
-
this._vasExpanded = false
|
|
419
|
-
let userIsOfficeAdmin = this._userRoles
|
|
420
|
-
? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
|
|
421
|
-
: false
|
|
432
|
+
this._vasExpanded = false ? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin') : false
|
|
422
433
|
|
|
423
434
|
var actions = [
|
|
424
435
|
{
|
|
@@ -471,7 +482,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
471
482
|
params.append('name', this._ganNo)
|
|
472
483
|
actions.push({
|
|
473
484
|
title: i18next.t('button.move_to_x', { state: { x: i18next.t('title.arrival_notice') } }),
|
|
474
|
-
action: () => navigate(`
|
|
485
|
+
action: () => navigate(`arrival_notices?${params.toString()}`)
|
|
475
486
|
})
|
|
476
487
|
}
|
|
477
488
|
|
|
@@ -545,6 +556,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
545
556
|
return this.shadowRoot.querySelector('input[name=warehouseTransport]')
|
|
546
557
|
}
|
|
547
558
|
|
|
559
|
+
get _exportInput() {
|
|
560
|
+
return this.shadowRoot.querySelector('input[name=exportOption]')
|
|
561
|
+
}
|
|
562
|
+
|
|
548
563
|
get _containerArrivalDateInput() {
|
|
549
564
|
return this.shadowRoot.querySelector('input[name=containerArrivalDate]')
|
|
550
565
|
}
|
|
@@ -907,8 +922,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
907
922
|
status: inventoryInfo.status,
|
|
908
923
|
existing: true,
|
|
909
924
|
roundedUomValue: `${roundedUomValue} ${inventoryInfo.uom}`,
|
|
910
|
-
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty
|
|
911
|
-
addableUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue
|
|
925
|
+
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty,
|
|
926
|
+
addableUomValue: inventoryInfo.uomValue - inventoryInfo.lockedUomValue
|
|
912
927
|
}
|
|
913
928
|
})
|
|
914
929
|
|
|
@@ -917,11 +932,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
917
932
|
this._releaseOrderId = releaseOrder.id
|
|
918
933
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
919
934
|
this._exportOption = releaseOrder.exportOption
|
|
920
|
-
if (this._exportOption) {
|
|
921
|
-
this._ownTransport = true
|
|
922
|
-
} else if (!this._exportOption) {
|
|
923
|
-
this._ownTransport = releaseOrder.ownTransport
|
|
924
|
-
}
|
|
925
935
|
|
|
926
936
|
this._courierOption = releaseOrder.courierOption
|
|
927
937
|
this._packingOption = releaseOrder.packingOption
|
|
@@ -942,6 +952,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
942
952
|
this._fillupSOForm(shippingOrder)
|
|
943
953
|
}
|
|
944
954
|
|
|
955
|
+
if (this._exportOption) {
|
|
956
|
+
this._ownTransport = true
|
|
957
|
+
this._ownTransportInput.checked = true
|
|
958
|
+
} else if (!this._exportOption) {
|
|
959
|
+
this._ownTransport = releaseOrder.ownTransport
|
|
960
|
+
}
|
|
961
|
+
|
|
945
962
|
if (releaseOrder && releaseOrder?.attachment) {
|
|
946
963
|
this._attachments = releaseOrder && releaseOrder.attachment
|
|
947
964
|
}
|
|
@@ -250,7 +250,6 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
250
250
|
.config=${this.inventoryGristConfig}
|
|
251
251
|
.data=${this.inventoryData}
|
|
252
252
|
@record-change="${this._onProductChangeHandler.bind(this)}"
|
|
253
|
-
@field-change="${this._onInventoryFieldChanged.bind(this)}"
|
|
254
253
|
></data-grist>
|
|
255
254
|
</div>
|
|
256
255
|
</div>
|
|
@@ -575,23 +574,46 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
575
574
|
}
|
|
576
575
|
|
|
577
576
|
//Fields Changed Handler
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
577
|
+
_onProductChangeHandler(event) {
|
|
578
|
+
const changeRecord = event.detail.after
|
|
579
|
+
const changedColumn = event.detail.column.name
|
|
580
|
+
|
|
581
|
+
try {
|
|
582
|
+
if (changedColumn === 'returnQty') {
|
|
583
|
+
this._validateChangedValue(changeRecord.returnQty, changeRecord.releaseQty, 'field.qty')
|
|
584
|
+
} else if (changedColumn === 'returnUomValue') {
|
|
585
|
+
this._validateChangedValue(changeRecord.returnUomValue, changeRecord.releaseUomValue, 'field.uom_value')
|
|
586
|
+
}
|
|
587
|
+
this._updateReturnQtyAndUomValue(event.detail.row, changedColumn, event.detail.before, event.detail.after)
|
|
588
|
+
this._updateInventoryList()
|
|
589
|
+
} catch (e) {
|
|
590
|
+
const beforeValue = event.detail.before && event.detail.before[event.detail.column.name]
|
|
591
|
+
if (beforeValue) {
|
|
592
|
+
event.detail.after[event.detail.column.name] = beforeValue
|
|
593
|
+
} else {
|
|
594
|
+
delete event.detail.after[event.detail.column.name]
|
|
595
|
+
}
|
|
596
|
+
this._showToast(e)
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
_updateReturnQtyAndUomValue(rowIndex, columnName, initialRecord, newRecord) {
|
|
601
|
+
let roundedUomValue = 0
|
|
581
602
|
let returnQty = 0
|
|
582
603
|
|
|
583
604
|
if (columnName == 'returnUomValue' || columnName == 'returnQty') {
|
|
584
|
-
let packageUomValue = e.detail.record.releaseUomValue / e.detail.record.releaseQty
|
|
585
605
|
if (
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
606
|
+
initialRecord.releaseUomValue &&
|
|
607
|
+
initialRecord.releaseQty &&
|
|
608
|
+
initialRecord.releaseUomValue > 0 &&
|
|
609
|
+
initialRecord.releaseQty > 0
|
|
590
610
|
) {
|
|
611
|
+
let packageUomValue = initialRecord.releaseUomValue / initialRecord.releaseQty
|
|
612
|
+
|
|
591
613
|
if (columnName === 'returnQty') {
|
|
592
|
-
returnQty =
|
|
614
|
+
returnQty = newRecord.returnQty || 0
|
|
593
615
|
} else {
|
|
594
|
-
returnQty = Math.round(
|
|
616
|
+
returnQty = Math.round(newRecord.returnUomValue / packageUomValue)
|
|
595
617
|
}
|
|
596
618
|
|
|
597
619
|
roundedUomValue = returnQty * packageUomValue
|
|
@@ -602,59 +624,26 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
602
624
|
this.inventoryData = {
|
|
603
625
|
...this.inventoryGrist.dirtyData,
|
|
604
626
|
records: this.inventoryGrist.dirtyData.records.map((record, idx) => {
|
|
605
|
-
if ((columnName == 'returnUomValue' || columnName == 'returnQty') && idx ===
|
|
627
|
+
if ((columnName == 'returnUomValue' || columnName == 'returnQty') && idx === rowIndex) {
|
|
606
628
|
if (columnName == 'returnUomValue') record.returnQty = returnQty
|
|
607
629
|
record.returnUomValue = roundedUomValue
|
|
608
630
|
}
|
|
609
631
|
|
|
610
|
-
|
|
632
|
+
return {
|
|
611
633
|
...record,
|
|
612
634
|
...record.inventory
|
|
613
635
|
}
|
|
614
|
-
|
|
615
|
-
return returnObj
|
|
616
636
|
})
|
|
617
637
|
}
|
|
618
638
|
}
|
|
619
639
|
|
|
620
|
-
_onProductChangeHandler(event) {
|
|
621
|
-
const changeRecord = event.detail.after
|
|
622
|
-
const changedColumn = event.detail.column.name
|
|
623
|
-
|
|
624
|
-
try {
|
|
625
|
-
if (changedColumn === 'returnQty') {
|
|
626
|
-
this._validateReleaseQty(changeRecord.returnQty, changeRecord.releaseQty)
|
|
627
|
-
} else if (changedColumn === 'returnUomValue') {
|
|
628
|
-
this._validateReleaseUomValue(changeRecord.returnUomValue, changeRecord.releaseUomValue)
|
|
629
|
-
}
|
|
630
|
-
this._updateInventoryList()
|
|
631
|
-
} catch (e) {
|
|
632
|
-
const beforeValue = event.detail.before && event.detail.before[event.detail.column.name]
|
|
633
|
-
if (beforeValue) {
|
|
634
|
-
event.detail.after[event.detail.column.name] = beforeValue
|
|
635
|
-
} else {
|
|
636
|
-
delete event.detail.after[event.detail.column.name]
|
|
637
|
-
}
|
|
638
|
-
this._showToast(e)
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
640
|
//Validation
|
|
643
|
-
|
|
644
|
-
if (
|
|
645
|
-
if (
|
|
646
|
-
throw new Error(i18next.t('text.
|
|
647
|
-
} else if (
|
|
648
|
-
throw new Error(i18next.t('text.
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
_validateReleaseUomValue(returnUomValue, releaseUomValue) {
|
|
653
|
-
if (releaseUomValue === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
|
|
654
|
-
if (returnUomValue > releaseUomValue) {
|
|
655
|
-
throw new Error(i18next.t('text.available_uom_value_insufficient'))
|
|
656
|
-
} else if (returnUomValue <= 0) {
|
|
657
|
-
throw new Error(i18next.t('text.invalid_uom_value_input'))
|
|
641
|
+
_validateChangedValue(returnValue, releaseValue, fieldVariable) {
|
|
642
|
+
if (releaseValue === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
|
|
643
|
+
if (returnValue > releaseValue) {
|
|
644
|
+
throw new Error(i18next.t('text.available_x_insufficient', { state: { x: i18next.t(fieldVariable) } }))
|
|
645
|
+
} else if (returnValue <= 0 || isNaN(returnValue)) {
|
|
646
|
+
throw new Error(i18next.t('text.invalid_x_input', { state: { x: i18next.t(fieldVariable) } }))
|
|
658
647
|
}
|
|
659
648
|
}
|
|
660
649
|
|
|
@@ -804,7 +804,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
804
804
|
|
|
805
805
|
_getReverseKittingOrder() {
|
|
806
806
|
return {
|
|
807
|
-
|
|
807
|
+
reverseKittingOrderInventories: this._getReverseKittingOrderInventories(),
|
|
808
808
|
customerBizplaceId: this._bizplaceId
|
|
809
809
|
}
|
|
810
810
|
}
|
|
@@ -825,7 +825,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
|
|
|
825
825
|
let result = {
|
|
826
826
|
set: idx + 1,
|
|
827
827
|
batchId: record.batchId,
|
|
828
|
-
|
|
828
|
+
name: record.productName,
|
|
829
829
|
packingType: record.packingType,
|
|
830
830
|
qty: record.qty,
|
|
831
831
|
uomValue: record.uomValue
|
|
@@ -583,7 +583,7 @@ class CreateDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
583
583
|
})
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
const amountRelatedColumns = ['uomValue', 'uom', 'packQty']
|
|
586
|
+
const amountRelatedColumns = ['uomValue', 'uom', 'packQty', 'palletQty']
|
|
587
587
|
if (amountRelatedColumns.indexOf(changedColumn) >= 0) {
|
|
588
588
|
const calcedAmount = this._calcAmount(changedColumn, changeRecord)
|
|
589
589
|
for (let key in calcedAmount) {
|
|
@@ -705,12 +705,14 @@ class CreateDeliveryOrder extends localize(i18next)(PageView) {
|
|
|
705
705
|
|
|
706
706
|
_calcAmount(changedColumn, changeRecord) {
|
|
707
707
|
let calcedRecord = {}
|
|
708
|
-
let { uomValue, uom, packQty, releaseQty, releaseUomValue } = changeRecord
|
|
708
|
+
let { uomValue, uom, packQty, releaseQty, releaseUomValue, palletQty } = changeRecord
|
|
709
709
|
|
|
710
710
|
if (changedColumn === 'uomValue' && (!uomValue || uomValue < 0))
|
|
711
711
|
throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.uom_value') } }))
|
|
712
712
|
if (changedColumn === 'packQty' && (!packQty || packQty < 0))
|
|
713
713
|
throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.pack_qty') } }))
|
|
714
|
+
if (changedColumn === 'palletQty' && (!palletQty || palletQty < 0))
|
|
715
|
+
throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.pallet_qty') } }))
|
|
714
716
|
if (changedColumn === 'uom' && !uom)
|
|
715
717
|
throw new Error(i18next.t('text.x_is_empty', { state: { x: i18next.t('label.uom') } }))
|
|
716
718
|
|
|
@@ -520,7 +520,7 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
520
520
|
if (this.manualDo) {
|
|
521
521
|
response = await client.mutate({
|
|
522
522
|
mutation: gql`
|
|
523
|
-
mutation dispatchManualDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch]) {
|
|
523
|
+
mutation dispatchManualDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch!]) {
|
|
524
524
|
dispatchManualDeliveryOrder(orderInfo: $orderInfo, orderItems: $orderItems) {
|
|
525
525
|
id
|
|
526
526
|
name
|
|
@@ -537,7 +537,7 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
537
537
|
} else {
|
|
538
538
|
response = await client.mutate({
|
|
539
539
|
mutation: gql`
|
|
540
|
-
mutation dispatchDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch]) {
|
|
540
|
+
mutation dispatchDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch!]) {
|
|
541
541
|
dispatchDeliveryOrder(orderInfo: $orderInfo, orderItems: $orderItems) {
|
|
542
542
|
id
|
|
543
543
|
name
|
|
@@ -6,8 +6,8 @@ import { css, html } from 'lit-element'
|
|
|
6
6
|
|
|
7
7
|
import { getCodeByName } from '@things-factory/code-base'
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
-
import { client, navigate, PageView } from '@things-factory/shell'
|
|
10
|
-
import { ScrollbarStyles } from '@things-factory/styles'
|
|
9
|
+
import { client, navigate, PageView, CustomAlert } from '@things-factory/shell'
|
|
10
|
+
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
11
11
|
import { isMobileDevice } from '@things-factory/utils'
|
|
12
12
|
|
|
13
13
|
import { WORKSHEET_TYPE } from '../constants'
|
|
@@ -57,6 +57,13 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
57
57
|
get context() {
|
|
58
58
|
return {
|
|
59
59
|
title: i18next.t('title.packing_worksheet_list'),
|
|
60
|
+
actions: [
|
|
61
|
+
{
|
|
62
|
+
title: i18next.t('button.activate'),
|
|
63
|
+
action: this._activateWorksheet.bind(this),
|
|
64
|
+
...CommonButtonStyles.activate
|
|
65
|
+
}
|
|
66
|
+
],
|
|
60
67
|
exportable: {
|
|
61
68
|
name: i18next.t('title.packing_worksheet_list'),
|
|
62
69
|
data: this._exportableData.bind(this)
|
|
@@ -159,11 +166,11 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
159
166
|
list: {
|
|
160
167
|
fields: ['releaseGood', 'bizplace', 'type', 'releaseRefNo', 'status', 'startedAt', 'endedAt']
|
|
161
168
|
},
|
|
162
|
-
rows: { appendable: false },
|
|
169
|
+
rows: { appendable: false, selectable: { multiple: true } },
|
|
163
170
|
pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
|
|
164
171
|
columns: [
|
|
165
|
-
{ type: 'gutter', gutterName: 'dirty' },
|
|
166
172
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
173
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
167
174
|
{
|
|
168
175
|
type: 'gutter',
|
|
169
176
|
gutterName: 'button',
|
|
@@ -344,6 +351,48 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
344
351
|
}
|
|
345
352
|
}
|
|
346
353
|
|
|
354
|
+
async _activateWorksheet() {
|
|
355
|
+
try {
|
|
356
|
+
let selectedItem = this.dataGrist.selected.filter(i => i.status == 'DEACTIVATED')
|
|
357
|
+
if (selectedItem.length > 0) {
|
|
358
|
+
const result = await CustomAlert({
|
|
359
|
+
title: i18next.t('title.are_you_sure'),
|
|
360
|
+
text: i18next.t('text.activate_packing_worksheet'),
|
|
361
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
362
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
363
|
+
})
|
|
364
|
+
|
|
365
|
+
if (!result.value) {
|
|
366
|
+
return
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const response = await client.mutate({
|
|
370
|
+
mutation: gql`
|
|
371
|
+
mutation activatePacking($worksheetNo: [String!]!) {
|
|
372
|
+
activatePacking(worksheetNo: $worksheetNo) {
|
|
373
|
+
id
|
|
374
|
+
name
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
`,
|
|
378
|
+
variables: {
|
|
379
|
+
worksheetNo: selectedItem.map(itm => {
|
|
380
|
+
return itm.name
|
|
381
|
+
})
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
|
|
385
|
+
if (!response.errors) {
|
|
386
|
+
this._showToast({ message: i18next.t('text.worksheet_activated') })
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
} catch (e) {
|
|
390
|
+
this._showToast(e)
|
|
391
|
+
} finally {
|
|
392
|
+
this.dataGrist.fetch()
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
347
396
|
_modifyDateRange(e) {
|
|
348
397
|
const fromDate = e.currentTarget.value
|
|
349
398
|
|
|
@@ -409,6 +458,17 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
|
|
|
409
458
|
})
|
|
410
459
|
return { header: headerSetting, data: data }
|
|
411
460
|
}
|
|
461
|
+
|
|
462
|
+
_showToast({ type, message }) {
|
|
463
|
+
document.dispatchEvent(
|
|
464
|
+
new CustomEvent('notify', {
|
|
465
|
+
detail: {
|
|
466
|
+
type,
|
|
467
|
+
message
|
|
468
|
+
}
|
|
469
|
+
})
|
|
470
|
+
)
|
|
471
|
+
}
|
|
412
472
|
}
|
|
413
473
|
|
|
414
474
|
window.customElements.define('packing-worksheet-list', PackingWorksheetList)
|
|
@@ -591,6 +591,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
591
591
|
worksheetInfo {
|
|
592
592
|
releaseGood {
|
|
593
593
|
name
|
|
594
|
+
crossDocking
|
|
594
595
|
}
|
|
595
596
|
bizplaceName
|
|
596
597
|
partnerDomainId
|
|
@@ -598,9 +599,10 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
598
599
|
refNo2
|
|
599
600
|
refNo3
|
|
600
601
|
startedAt
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
containerNo
|
|
603
|
+
marketplaceStatus
|
|
604
|
+
shippingProvider
|
|
605
|
+
trackingNo
|
|
604
606
|
}
|
|
605
607
|
worksheetDetailInfos {
|
|
606
608
|
name
|
|
@@ -762,7 +764,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
762
764
|
|
|
763
765
|
if (this._selectedOrderInventory) {
|
|
764
766
|
const record = this.data.records.find(
|
|
765
|
-
record =>
|
|
767
|
+
record =>
|
|
768
|
+
record.product.sku === this._selectedOrderInventory.product.sku &&
|
|
769
|
+
record.palletId === this._selectedOrderInventory.palletId
|
|
766
770
|
)
|
|
767
771
|
|
|
768
772
|
this.updateSelectedItemProp(record)
|
|
@@ -772,7 +776,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
772
776
|
this.cartonInput.value = ''
|
|
773
777
|
this.productBarcodeInput.value = ''
|
|
774
778
|
}
|
|
775
|
-
this.inputForm
|
|
779
|
+
this.fillUpForm(this.inputForm, record)
|
|
776
780
|
} else {
|
|
777
781
|
this.fillUpForm(this.inputForm, record)
|
|
778
782
|
this.focusOnInput()
|
|
@@ -1563,8 +1567,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1563
1567
|
const { worksheetInfo, worksheetDetailInfos } = response.data.fetchAndAssignPickingTask
|
|
1564
1568
|
this._bizplaceName = worksheetInfo.bizplaceName
|
|
1565
1569
|
this._crossDocking = worksheetInfo.releaseGood?._crossDocking
|
|
1566
|
-
this._orderNo = this.releaseGoodNo
|
|
1567
1570
|
this.releaseGoodNo = worksheetInfo.releaseGood?.name
|
|
1571
|
+
this._orderNo = this.releaseGoodNo
|
|
1572
|
+
this._worksheetInfo = worksheetInfo
|
|
1568
1573
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
1569
1574
|
|
|
1570
1575
|
this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
|
|
@@ -1649,7 +1654,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1649
1654
|
}
|
|
1650
1655
|
|
|
1651
1656
|
updateSelectedItemProp(selectedRecords) {
|
|
1652
|
-
if (selectedRecords
|
|
1657
|
+
if (selectedRecords?.releaseQty === selectedRecords.qty) {
|
|
1653
1658
|
this.isWholePicking = true
|
|
1654
1659
|
this._selectedOrderInventory = selectedRecords
|
|
1655
1660
|
} else {
|
|
@@ -1046,7 +1046,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
|
|
|
1046
1046
|
description: wsd.description,
|
|
1047
1047
|
status: wsd.status,
|
|
1048
1048
|
productSku: wsd.targetInventory.inventory.product.sku,
|
|
1049
|
-
productBrand:
|
|
1049
|
+
productBrand: wsd.targetInventory.inventory.product.brand,
|
|
1050
1050
|
releaseQty: wsd.targetInventory.releaseQty,
|
|
1051
1051
|
releaseUomValue: wsd.targetInventory.releaseUomValue,
|
|
1052
1052
|
releaseUomValueWithUom:
|
|
@@ -1384,7 +1384,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
|
|
|
1384
1384
|
history.back()
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
}}
|
|
1387
|
+
}}"
|
|
1388
1388
|
></select-operator-popup>
|
|
1389
1389
|
`,
|
|
1390
1390
|
{
|
|
@@ -378,7 +378,11 @@ class ElcclInventorySummaryReport extends connect(store)(localize(i18next)(PageV
|
|
|
378
378
|
})
|
|
379
379
|
]
|
|
380
380
|
|
|
381
|
-
|
|
381
|
+
header.filter(hdr => hdr.type == 'date').map(hdr => (hdr.type = 'string'))
|
|
382
|
+
|
|
383
|
+
let data = (await this.fetchHandler({ page: 1, limit: 9999999 })).records.map(itm =>
|
|
384
|
+
flattenObject({ ...itm, initialDate: new Date(parseInt(itm.initialDate)).toLocaleDateString() })
|
|
385
|
+
)
|
|
382
386
|
|
|
383
387
|
return { header, data }
|
|
384
388
|
} catch (e) {
|
|
@@ -205,7 +205,7 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
type: 'string',
|
|
208
|
-
name: '
|
|
208
|
+
name: 'purchaseOrderNo',
|
|
209
209
|
header: i18next.t('field.po_no'),
|
|
210
210
|
width: 200
|
|
211
211
|
},
|
|
@@ -602,10 +602,8 @@ class InboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVie
|
|
|
602
602
|
description
|
|
603
603
|
type
|
|
604
604
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
name
|
|
608
|
-
}
|
|
605
|
+
purchaseOrderId
|
|
606
|
+
purchaseOrderNo
|
|
609
607
|
contactPoint {
|
|
610
608
|
id
|
|
611
609
|
name
|
|
@@ -472,7 +472,10 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
472
472
|
const response = await client.query({
|
|
473
473
|
query: gql`
|
|
474
474
|
${this.fetchInventoriesQuery}
|
|
475
|
-
|
|
475
|
+
`,
|
|
476
|
+
variables: {
|
|
477
|
+
worksheetDetailName: this._selectedVas.name
|
|
478
|
+
}
|
|
476
479
|
})
|
|
477
480
|
|
|
478
481
|
if (!response.errors) {
|
|
@@ -131,9 +131,8 @@ class ExecutePureVas extends localize(i18next)(AbstractExecuteVas) {
|
|
|
131
131
|
`
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
return
|
|
136
|
-
query: gql`
|
|
134
|
+
get fetchInventoriesQuery() {
|
|
135
|
+
return `
|
|
137
136
|
query vasInventories($worksheetDetailName: String!) {
|
|
138
137
|
vasInventories(worksheetDetailName: $worksheetDetailName) {
|
|
139
138
|
batchId
|
|
@@ -152,11 +151,7 @@ class ExecutePureVas extends localize(i18next)(AbstractExecuteVas) {
|
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
|
-
|
|
156
|
-
variables: {
|
|
157
|
-
worksheetDetailName: this._selectedVas.name
|
|
158
|
-
}
|
|
159
|
-
})
|
|
154
|
+
`
|
|
160
155
|
}
|
|
161
156
|
|
|
162
157
|
_fillUpInfoForm(data) {
|
|
@@ -193,9 +193,9 @@ class ExecuteReverseKitting extends connect(store)(localize(i18next)(PageView))
|
|
|
193
193
|
|
|
194
194
|
async fetchReverseKittingOrder() {
|
|
195
195
|
if (!this._orderNo) return
|
|
196
|
-
const response = await client.
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
const response = await client.mutate({
|
|
197
|
+
mutation: gql`
|
|
198
|
+
mutation executingReverseKittingOrder($name: String!) {
|
|
199
199
|
executingReverseKittingOrder(name: $name) {
|
|
200
200
|
id
|
|
201
201
|
name
|
|
@@ -152,9 +152,9 @@ class PopupCombinationSets extends localize(i18next)(LitElement) {
|
|
|
152
152
|
|
|
153
153
|
async fetchReverseKittingOrder() {
|
|
154
154
|
if (!this.orderNo) return
|
|
155
|
-
const response = await client.
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
const response = await client.mutate({
|
|
156
|
+
mutation: gql`
|
|
157
|
+
mutation executingReverseKittingOrder($name: String!) {
|
|
158
158
|
executingReverseKittingOrder(name: $name) {
|
|
159
159
|
id
|
|
160
160
|
name
|
|
@@ -235,7 +235,7 @@ class PopupReverseKittingTemplate extends localize(i18next)(LitElement) {
|
|
|
235
235
|
async _fetchInventories() {
|
|
236
236
|
const response = await client.query({
|
|
237
237
|
query: gql`
|
|
238
|
-
query reverseKittingInventories($reverseKittingOIName: String!, $productDetailId: String) {
|
|
238
|
+
query reverseKittingInventories($reverseKittingOIName: String!, $productDetailId: String!) {
|
|
239
239
|
reverseKittingInventories(reverseKittingOIName: $reverseKittingOIName, productDetailId: $productDetailId) {
|
|
240
240
|
batchId
|
|
241
241
|
packingType
|