@things-factory/operato-wms 4.0.27 → 4.0.31
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 +116 -91
- package/client/pages/inventory/onhand-inventory.js +1 -0
- package/client/pages/master/location-list.js +1 -0
- package/client/pages/master/print-location-label.js +131 -146
- 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/goods-received-note/received-note-detail.js +7 -6
- package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
- 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 +29 -12
- 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-product.js +6 -0
- 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-loading.js +16 -14
- package/client/pages/outbound/worksheet-packing.js +15 -13
- package/client/pages/outbound/worksheet-picking.js +2 -2
- 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/custom-elccl/elccl-inventory-summary-report.js +5 -1
- package/client/pages/report/inbound-order-details-report.js +3 -5
- package/client/pages/report/inventory-pallet-report.js +13 -12
- 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 +51 -35
- package/client/pages/vas/execute-pure-vas.js +63 -64
- package/client/pages/vas/execute-ref-vas.js +39 -41
- package/client/pages/vas/related-vas-list.js +7 -6
- 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/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/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
|
}
|
|
@@ -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
|
|
@@ -537,6 +537,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
537
537
|
var decodedHTML = atob(orderDocInfo[0].file)
|
|
538
538
|
this._callPrintDialog(decodedHTML)
|
|
539
539
|
break
|
|
540
|
+
|
|
541
|
+
default:
|
|
542
|
+
let url = new URL(window.location)
|
|
543
|
+
|
|
544
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
545
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
540
546
|
}
|
|
541
547
|
}
|
|
542
548
|
}
|
|
@@ -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 {
|
|
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { getRenderer } from '@things-factory/grist-ui'
|
|
6
6
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
10
|
import { css, html } from 'lit-element'
|
|
@@ -367,10 +367,8 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
367
367
|
if (!this._worksheetNo) return
|
|
368
368
|
const response = await client.query({
|
|
369
369
|
query: gql`
|
|
370
|
-
query {
|
|
371
|
-
worksheet(${
|
|
372
|
-
name: this._worksheetNo
|
|
373
|
-
})}) {
|
|
370
|
+
query worksheet($name: String!) {
|
|
371
|
+
worksheet(name: $name) {
|
|
374
372
|
status
|
|
375
373
|
releaseGood {
|
|
376
374
|
name
|
|
@@ -434,7 +432,10 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
434
432
|
}
|
|
435
433
|
}
|
|
436
434
|
}
|
|
437
|
-
|
|
435
|
+
`,
|
|
436
|
+
variables: {
|
|
437
|
+
name: this._worksheetNo
|
|
438
|
+
}
|
|
438
439
|
})
|
|
439
440
|
|
|
440
441
|
if (!response.errors) {
|
|
@@ -541,17 +542,18 @@ class WorksheetLoading extends localize(i18next)(PageView) {
|
|
|
541
542
|
return
|
|
542
543
|
}
|
|
543
544
|
|
|
544
|
-
const response = await client.
|
|
545
|
-
|
|
546
|
-
mutation {
|
|
547
|
-
activateLoading(${
|
|
548
|
-
worksheetNo: this._worksheetNo,
|
|
549
|
-
loadingWorksheetDetails: this._getLoadingWorksheetDetails()
|
|
550
|
-
})}) {
|
|
545
|
+
const response = await client.mutate({
|
|
546
|
+
mutation: gql`
|
|
547
|
+
mutation activateLoading($worksheetNo: String!, $loadingWorksheetDetails: [WorksheetDetailPatch]) {
|
|
548
|
+
activateLoading(worksheetNo: $worksheetNo, loadingWorksheetDetails: $loadingWorksheetDetails) {
|
|
551
549
|
name
|
|
552
550
|
}
|
|
553
551
|
}
|
|
554
|
-
|
|
552
|
+
`,
|
|
553
|
+
variables: {
|
|
554
|
+
worksheetNo: this._worksheetNo,
|
|
555
|
+
loadingWorksheetDetails: this._getLoadingWorksheetDetails()
|
|
556
|
+
}
|
|
555
557
|
})
|
|
556
558
|
if (!response.errors) {
|
|
557
559
|
this._showToast({ message: i18next.t('text.worksheet_activated') })
|
|
@@ -10,7 +10,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
10
10
|
import { openPopup } from '@things-factory/layout-base'
|
|
11
11
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
12
12
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
13
|
-
import {
|
|
13
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
14
14
|
|
|
15
15
|
import { MARKETPLACE_STATUS, WORKSHEET_STATUS } from '../constants'
|
|
16
16
|
|
|
@@ -298,10 +298,8 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
298
298
|
if (!this._worksheetNo) return
|
|
299
299
|
const response = await client.query({
|
|
300
300
|
query: gql`
|
|
301
|
-
query {
|
|
302
|
-
worksheet(${
|
|
303
|
-
name: this._worksheetNo
|
|
304
|
-
})}) {
|
|
301
|
+
query worksheet($name: String!) {
|
|
302
|
+
worksheet(name: $name) {
|
|
305
303
|
status
|
|
306
304
|
releaseGood {
|
|
307
305
|
name
|
|
@@ -384,7 +382,10 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
384
382
|
}
|
|
385
383
|
}
|
|
386
384
|
}
|
|
387
|
-
|
|
385
|
+
`,
|
|
386
|
+
variables: {
|
|
387
|
+
name: this._worksheetNo
|
|
388
|
+
}
|
|
388
389
|
})
|
|
389
390
|
|
|
390
391
|
if (!response.errors) {
|
|
@@ -486,16 +487,17 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
486
487
|
return
|
|
487
488
|
}
|
|
488
489
|
|
|
489
|
-
const response = await client.
|
|
490
|
-
|
|
491
|
-
mutation {
|
|
492
|
-
activatePacking(${
|
|
493
|
-
worksheetNo: this._worksheetNo
|
|
494
|
-
})}) {
|
|
490
|
+
const response = await client.mutate({
|
|
491
|
+
mutation: gql`
|
|
492
|
+
mutation activatePacking($worksheetNo: String!) {
|
|
493
|
+
activatePacking(worksheetNo: $worksheetNo) {
|
|
495
494
|
name
|
|
496
495
|
}
|
|
497
496
|
}
|
|
498
|
-
|
|
497
|
+
`,
|
|
498
|
+
variables: {
|
|
499
|
+
worksheetNo: this._worksheetNo
|
|
500
|
+
}
|
|
499
501
|
})
|
|
500
502
|
if (!response.errors) {
|
|
501
503
|
this._showToast({ message: i18next.t('text.worksheet_activated') })
|
|
@@ -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
|
{
|
|
@@ -7,8 +7,6 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
7
7
|
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
9
|
import { client, PageView, store } from '@things-factory/shell'
|
|
10
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
11
|
-
|
|
12
10
|
class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageView)) {
|
|
13
11
|
static get styles() {
|
|
14
12
|
return css`
|
|
@@ -235,12 +233,8 @@ class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageVi
|
|
|
235
233
|
var tzoffset = new Date().getTimezoneOffset() * 60
|
|
236
234
|
const response = await client.query({
|
|
237
235
|
query: gql`
|
|
238
|
-
query {
|
|
239
|
-
elcclDailyCollectionReport(${
|
|
240
|
-
filters: [...this.searchForm.queryFilters, { name: 'tzoffset', operator: 'custom', value: tzoffset }],
|
|
241
|
-
pagination: { page, limit },
|
|
242
|
-
sortings: sorters
|
|
243
|
-
})}) {
|
|
236
|
+
query elcclDailyCollectionReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
237
|
+
elcclDailyCollectionReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
244
238
|
arrival_notice_name
|
|
245
239
|
bizplace_name
|
|
246
240
|
ended_at
|
|
@@ -255,7 +249,12 @@ class ElcclDailyCollectionReport extends connect(store)(localize(i18next)(PageVi
|
|
|
255
249
|
delivery_summary
|
|
256
250
|
}
|
|
257
251
|
}
|
|
258
|
-
|
|
252
|
+
`,
|
|
253
|
+
variables: {
|
|
254
|
+
filters: [...this.searchForm.queryFilters, { name: 'tzoffset', operator: 'custom', value: tzoffset }],
|
|
255
|
+
pagination: { page, limit },
|
|
256
|
+
sortings: sorters
|
|
257
|
+
}
|
|
259
258
|
})
|
|
260
259
|
|
|
261
260
|
this.data = {
|