@things-factory/operato-wms 4.3.637 → 4.3.638
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 +7 -12
- package/client/pages/bulk-operation/bulk-operation.js +24 -22
- package/client/pages/bulk-operation/validate-b2c-ro-popup.js +14 -4
- package/client/pages/bulk-operation/validate-gan-popup.js +26 -11
- package/client/pages/bulk-operation/validate-ro-popup.js +16 -6
- package/client/pages/components/list-view/product-list-view.js +1 -1
- package/client/pages/components/select-inventory-popup.js +1 -5
- package/client/pages/components/select-product-popup.js +4 -9
- package/client/pages/inbound/putaway/putaway-product.js +92 -70
- package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +10 -3
- package/client/pages/inbound/putaway/putaway-same-carton-popup.js +1 -1
- package/client/pages/inbound/putaway/putaway-worksheet-generate-popup.js +1 -1
- package/client/pages/inbound/putaway/undo-putaway-popup.js +19 -16
- package/client/pages/inbound/putaway/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/putaway/worksheet-putaway.js +3 -3
- package/client/pages/inbound/undo-unload-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +33 -37
- package/client/pages/inbound/unloaded-inventories-popup.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +2 -2
- package/client/pages/inventory/inventory-adjustment.js +5 -20
- package/client/pages/inventory/inventory-by-product.js +43 -43
- package/client/pages/inventory/onhand-inventory.js +2 -2
- package/client/pages/inventory-check/add-extra-inventory-popup.js +2 -10
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +2 -2
- package/client/pages/inventory-check/cycle-count-report.js +19 -14
- package/client/pages/inventory-check/inspecting-product.js +2 -14
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +27 -23
- package/client/pages/order/arrival-notice/assign-buffer-location.js +2 -2
- package/client/pages/order/arrival-notice/check-arrived-notice.js +2 -2
- package/client/pages/order/arrival-notice/create-arrival-notice.js +29 -33
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +8 -8
- package/client/pages/order/arrival-notice/edit-product-popup.js +27 -29
- package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +3 -3
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -3
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -2
- package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +91 -92
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +56 -61
- package/client/pages/order/release-order/create-release-order.js +55 -64
- package/client/pages/order/release-order/receive-release-order-request.js +1 -1
- package/client/pages/order/release-order/rejected-release-order.js +2 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +7 -11
- package/client/pages/order/release-order/release-order-detail.js +116 -158
- package/client/pages/order/return-order/create-return-order.js +3 -16
- package/client/pages/order/return-order/return-order-inventory-popup.js +1 -2
- package/client/pages/outbound/inventory-assign-popup.js +2 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +1 -1
- package/client/pages/outbound/inventory-reassign-popup.js +6 -6
- package/client/pages/outbound/loading-product.js +3 -3
- package/client/pages/outbound/loading-v2/load-by-qty.js +2 -2
- package/client/pages/outbound/loading-v2/loading-execution-base.js +4 -4
- package/client/pages/outbound/packing-product.js +26 -7
- package/client/pages/outbound/picking-product.js +16 -36
- package/client/pages/outbound/picking-replacement-popup.js +4 -4
- package/client/pages/outbound/picking-v2/picking-execution-base.js +4 -8
- package/client/pages/outbound/sorting-product.js +7 -5
- package/client/pages/outbound/worksheet-batch-picking.js +43 -30
- package/client/pages/outbound/worksheet-loading.js +2 -2
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +19 -23
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +23 -12
- package/client/pages/outbound/worksheet-zone-picking.js +3 -3
- package/client/pages/report/replenishment-report.js +14 -5
- package/client/pages/report/volume-summary-report.js +6 -6
- package/dist-server/graphql/resolvers/outbound/sort-item.js +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js +1 -2
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +7 -18
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -1
- package/dist-server/graphql/types/outbound/index.js +1 -1
- package/dist-server/graphql/types/reports/cycle-count-report.js +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -2
- package/dist-server/graphql/types/zone-worksheet/index.js +1 -1
- package/package.json +16 -16
- package/server/graphql/resolvers/outbound/sort-item.ts +1 -1
- package/server/graphql/resolvers/reports/cycle-count-report.ts +1 -2
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +8 -20
- package/server/graphql/types/outbound/index.ts +1 -1
- package/server/graphql/types/reports/cycle-count-report.ts +1 -1
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -2
- package/server/graphql/types/zone-worksheet/index.ts +1 -1
- package/translations/en.json +259 -265
- package/translations/ko.json +0 -1
- package/translations/ms.json +1463 -1580
- package/translations/zh.json +2150 -2354
|
@@ -566,39 +566,34 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
566
566
|
<label>${i18next.t('label.attention_to')}</label>
|
|
567
567
|
<input name="attentionTo" .value="${this._releaseOrder.attentionTo}" ?readonly="${!this?._editable}" />
|
|
568
568
|
|
|
569
|
-
<button
|
|
570
|
-
type="button"
|
|
571
|
-
class="button"
|
|
572
|
-
?disabled=${!this?._editable}
|
|
573
|
-
@click="${this._openContactPointSelector.bind(this)}"
|
|
574
|
-
>
|
|
569
|
+
<button type="button" class="button" ?disabled=${!this?._editable} @click="${this._openContactPointSelector.bind(this)}">
|
|
575
570
|
import
|
|
576
571
|
</button>
|
|
577
572
|
|
|
578
|
-
<label class="section-header2"></label>
|
|
579
|
-
|
|
580
|
-
<label> </label>
|
|
581
|
-
<label> </label>
|
|
573
|
+
<label class="section-header2"></label>
|
|
574
|
+
|
|
575
|
+
<label> </label>
|
|
576
|
+
<label> </label>
|
|
582
577
|
|
|
583
578
|
<label>${i18next.t('label.contact')}</label>
|
|
584
579
|
<input name="phone1" value="${this._releaseOrder.phone1}" />
|
|
585
580
|
|
|
586
581
|
<!-- delivery -->
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
582
|
+
<div class="header-with-checkbox">
|
|
583
|
+
<label class="section-header">${i18next.t('label.delivery_address')}</label>
|
|
584
|
+
<div class="checkbox-wrapper">
|
|
585
|
+
<input
|
|
586
|
+
type="checkbox"
|
|
587
|
+
id="matchDeliveryAddress"
|
|
588
|
+
name="matchDeliveryAddressInput"
|
|
589
|
+
?checked="${this._disableBillingAddress}"
|
|
590
|
+
@change=${e => {
|
|
591
|
+
this._disableBillingAddress = e.currentTarget.checked;
|
|
592
|
+
}}
|
|
593
|
+
/>
|
|
594
|
+
<label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
|
|
595
|
+
</div>
|
|
600
596
|
</div>
|
|
601
|
-
</div>
|
|
602
597
|
|
|
603
598
|
<label>${i18next.t('label.address_1')}</label>
|
|
604
599
|
<textarea name="deliveryAddress1" .value="${this._releaseOrder.deliveryAddress1}"></textarea>
|
|
@@ -661,48 +656,25 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
661
656
|
<input name="city" .value="${this._releaseOrder.city}" />
|
|
662
657
|
|
|
663
658
|
<!-- billing -->
|
|
664
|
-
<label ?hidden=${this._disableBillingAddress} class="section-header"
|
|
665
|
-
>${i18next.t('label.billing_address')}</label
|
|
666
|
-
>
|
|
659
|
+
<label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t('label.billing_address')}</label>
|
|
667
660
|
|
|
668
661
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_1')}</label>
|
|
669
|
-
<textarea
|
|
670
|
-
|
|
671
|
-
name="billingAddress"
|
|
672
|
-
.value="${this._releaseOrder.billingAddress}"
|
|
673
|
-
></textarea>
|
|
674
|
-
|
|
662
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress" .value="${this._releaseOrder.billingAddress}"></textarea>
|
|
663
|
+
|
|
675
664
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_2')}</label>
|
|
676
|
-
<textarea
|
|
677
|
-
?hidden=${this._disableBillingAddress}
|
|
678
|
-
name="billingAddress2"
|
|
679
|
-
.value="${this._releaseOrder.billingAddress2}"
|
|
680
|
-
></textarea>
|
|
665
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" .value="${this._releaseOrder.billingAddress2}"></textarea>
|
|
681
666
|
|
|
682
667
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_3')}</label>
|
|
683
|
-
<textarea
|
|
684
|
-
?hidden=${this._disableBillingAddress}
|
|
685
|
-
name="billingAddress3"
|
|
686
|
-
.value="${this._releaseOrder.billingAddress3}"
|
|
687
|
-
></textarea>
|
|
668
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" .value="${this._releaseOrder.billingAddress3}"></textarea>
|
|
688
669
|
|
|
689
670
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_4')}</label>
|
|
690
|
-
<textarea
|
|
691
|
-
?hidden=${this._disableBillingAddress}
|
|
692
|
-
name="billingAddress4"
|
|
693
|
-
.value="${this._releaseOrder.billingAddress4}"
|
|
694
|
-
></textarea>
|
|
671
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" .value="${this._releaseOrder.billingAddress4}"></textarea>
|
|
695
672
|
|
|
696
673
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_5')}</label>
|
|
697
|
-
<textarea
|
|
698
|
-
?hidden=${this._disableBillingAddress}
|
|
699
|
-
name="billingAddress5"
|
|
700
|
-
.value="${this._releaseOrder.billingAddress5}"
|
|
701
|
-
></textarea>
|
|
674
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" .value="${this._releaseOrder.billingAddress5}"></textarea>
|
|
702
675
|
|
|
703
676
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
|
|
704
|
-
<select
|
|
705
|
-
?hidden=${this._disableBillingAddress}
|
|
677
|
+
<select ?hidden=${this._disableBillingAddress}
|
|
706
678
|
name="billingCountry"
|
|
707
679
|
?disabled="${this._disableBillingAddress}"
|
|
708
680
|
@change=${e => {
|
|
@@ -721,10 +693,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
721
693
|
</select>
|
|
722
694
|
|
|
723
695
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.zip_postal_code')}</label>
|
|
724
|
-
${this._selectedBillingCountry !== 'MY'
|
|
696
|
+
${this._selectedBillingCountry !== 'MY'
|
|
725
697
|
? html`
|
|
726
|
-
<input
|
|
727
|
-
?hidden=${this._disableBillingAddress}
|
|
698
|
+
<input ?hidden=${this._disableBillingAddress}
|
|
728
699
|
name="billingPostalCode"
|
|
729
700
|
.value=${this._releaseOrder.billingPostalCode || this._releaseOrder.postalCode}
|
|
730
701
|
/>
|
|
@@ -752,10 +723,16 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
752
723
|
</select>`}
|
|
753
724
|
|
|
754
725
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.state')}</label>
|
|
755
|
-
<input
|
|
726
|
+
<input
|
|
727
|
+
?hidden=${this._disableBillingAddress}
|
|
728
|
+
name="billingState"
|
|
729
|
+
.value="${this._releaseOrder.billingState}"
|
|
730
|
+
/>
|
|
756
731
|
|
|
757
732
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
|
|
758
733
|
<input ?hidden=${this._disableBillingAddress} name="billingCity" .value="${this._releaseOrder.billingCity}" />
|
|
734
|
+
|
|
735
|
+
|
|
759
736
|
</form>
|
|
760
737
|
|
|
761
738
|
<form name="exportInfo" ?hidden="${this._showExportInfo}" class="multi-column-form" autocomplete="off">
|
|
@@ -940,7 +917,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
940
917
|
}
|
|
941
918
|
|
|
942
919
|
if (this.isUserBelongsDomain) {
|
|
943
|
-
if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking) {
|
|
920
|
+
if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking ) {
|
|
944
921
|
actions.push(
|
|
945
922
|
{
|
|
946
923
|
title: i18next.t('button.reject'),
|
|
@@ -1015,7 +992,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1015
992
|
})
|
|
1016
993
|
}
|
|
1017
994
|
|
|
1018
|
-
if (this.vasData.records.some(vas => vas.status === ORDER_VAS_STATUS.PENDING_APPROVE.value)) {
|
|
995
|
+
if (this.vasData.records.some( vas => vas.status === ORDER_VAS_STATUS.PENDING_APPROVE.value )) {
|
|
1019
996
|
actions.push({
|
|
1020
997
|
title: i18next.t('button.vas_changes'),
|
|
1021
998
|
action: this._openVasChangesPopup.bind(this),
|
|
@@ -1029,11 +1006,11 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1029
1006
|
})
|
|
1030
1007
|
}
|
|
1031
1008
|
} else {
|
|
1032
|
-
if (this.vasData.records.some(vas => vas.status === ORDER_VAS_STATUS.PENDING_APPROVE.value)) {
|
|
1009
|
+
if (this.vasData.records.some( vas => vas.status === ORDER_VAS_STATUS.PENDING_APPROVE.value )) {
|
|
1033
1010
|
actions.push({
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1011
|
+
title: i18next.t('button.inspect_changes'),
|
|
1012
|
+
action: this._openApproveVasChangesPopup.bind(this),
|
|
1013
|
+
...CommonButtonStyles.inspect
|
|
1037
1014
|
})
|
|
1038
1015
|
}
|
|
1039
1016
|
}
|
|
@@ -1256,7 +1233,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1256
1233
|
width: 140
|
|
1257
1234
|
},
|
|
1258
1235
|
{
|
|
1259
|
-
type: '
|
|
1236
|
+
type: 'integer',
|
|
1260
1237
|
name: 'releaseQty',
|
|
1261
1238
|
header: i18next.t('field.release_qty'),
|
|
1262
1239
|
width: 130
|
|
@@ -1358,11 +1335,11 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1358
1335
|
handlers: {
|
|
1359
1336
|
click: (columns, data, column, record, rowIndex) => {
|
|
1360
1337
|
if (this._editVasStatus.indexOf(this._status) >= 0) {
|
|
1361
|
-
if (record.id) {
|
|
1362
|
-
this.deletedVas.push({
|
|
1338
|
+
if (record.id) {
|
|
1339
|
+
this.deletedVas.push({
|
|
1363
1340
|
...record,
|
|
1364
1341
|
editType: ORDER_VAS_STATUS.REMOVED.value,
|
|
1365
|
-
cuFlag: 'M'
|
|
1342
|
+
cuFlag: 'M'
|
|
1366
1343
|
})
|
|
1367
1344
|
} else {
|
|
1368
1345
|
this.deletedVas.push({
|
|
@@ -1776,7 +1753,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1776
1753
|
this._manifestedAt = orderPackages.some(op => op.manifestedAt)
|
|
1777
1754
|
this._isInBatchPicking = releaseOrder.inventoryInfos.some(inventoryInfo => inventoryInfo.refWorksheetId)
|
|
1778
1755
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
1779
|
-
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(
|
|
1756
|
+
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(2))
|
|
1780
1757
|
return {
|
|
1781
1758
|
...inventoryInfo,
|
|
1782
1759
|
productSKU: inventoryInfo?.product?.sku || '',
|
|
@@ -1914,10 +1891,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1914
1891
|
newPackingType: orderVas?.newPackingType,
|
|
1915
1892
|
adjustedNewPackingType: orderVas?.adjustedNewPackingType,
|
|
1916
1893
|
newUnitUomValue: calUnitUomValue(orderVas?.newUomValue, orderVas?.outputQty).toFixed(2),
|
|
1917
|
-
adjustedNewUnitUomValue: calUnitUomValue(
|
|
1918
|
-
orderVas?.adjustedNewUomValue,
|
|
1919
|
-
orderVas?.adjustedOutputQty
|
|
1920
|
-
).toFixed(2),
|
|
1894
|
+
adjustedNewUnitUomValue: calUnitUomValue(orderVas?.adjustedNewUomValue, orderVas?.adjustedOutputQty).toFixed(2),
|
|
1921
1895
|
newUomValue: orderVas?.newUomValue,
|
|
1922
1896
|
adjustedNewUomValue: orderVas?.adjustedNewUomValue,
|
|
1923
1897
|
newUom: orderVas?.newUom,
|
|
@@ -2427,14 +2401,14 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2427
2401
|
cuFlag: record.id ? 'M' : '+',
|
|
2428
2402
|
__dirty__: record.id ? 'M' : '+',
|
|
2429
2403
|
__dirtyfields__: record.__dirtyfields__
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2404
|
+
? {
|
|
2405
|
+
...record.__dirtyfields__,
|
|
2406
|
+
productSKU: { before: record.productSKU, after: d.productSKU }
|
|
2407
|
+
}
|
|
2408
|
+
: {
|
|
2409
|
+
productSKU: { before: record.productSKU, after: d.productSKU }
|
|
2410
|
+
// qty: { before: record.qty, after: d.qty }
|
|
2411
|
+
}
|
|
2438
2412
|
|
|
2439
2413
|
// group: ++group
|
|
2440
2414
|
}
|
|
@@ -2568,9 +2542,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2568
2542
|
let lastIndex = this.vasGrist.dirtyData.records.findLastIndex(oldData => oldData.group == record.group)
|
|
2569
2543
|
|
|
2570
2544
|
for (let i = 0; i < e.detail.length; i++) {
|
|
2571
|
-
let a = oldRecords.find(
|
|
2572
|
-
vb => vb.vas?.id === e.detail[i].id && vb.group === this.vasGrist.dirtyData.records[firstIndex].group
|
|
2573
|
-
)
|
|
2545
|
+
let a = oldRecords.find(vb => vb.vas?.id === e.detail[i].id && vb.group === this.vasGrist.dirtyData.records[firstIndex].group)
|
|
2574
2546
|
if (i == 0) {
|
|
2575
2547
|
newRecords.push({
|
|
2576
2548
|
...this.vasGrist.dirtyData.records[firstIndex],
|
|
@@ -2589,34 +2561,32 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2589
2561
|
newUom: this.vasGrist.dirtyData.records[firstIndex].newUom,
|
|
2590
2562
|
newUomValue: this.vasGrist.dirtyData.records[firstIndex].newUomValue,
|
|
2591
2563
|
vasRemark: a?.vasRemark,
|
|
2592
|
-
itemEditType: a?.orderVasItemId
|
|
2593
|
-
|
|
2594
|
-
: ORDER_VAS_STATUS.NEW.value,
|
|
2595
|
-
__dirty__: a?.orderVasItemId ? (a.__dirty__ ? a.__dirty__ : undefined) : '+',
|
|
2564
|
+
itemEditType: a?.orderVasItemId ? (a.itemEditType || (a.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)) : ORDER_VAS_STATUS.NEW.value,
|
|
2565
|
+
__dirty__: a?.orderVasItemId ? a.__dirty__ ? a.__dirty__ : undefined : '+',
|
|
2596
2566
|
__dirtyfields__: a?.__dirtyfields__
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
}
|
|
2567
|
+
? {
|
|
2568
|
+
...a.__dirtyfields__,
|
|
2569
|
+
productSKU: {
|
|
2570
|
+
before: this.vasGrist.dirtyData.records[firstIndex].productSKU,
|
|
2571
|
+
after: e.detail[i].productSKU
|
|
2572
|
+
},
|
|
2573
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2574
|
+
vasQty: {
|
|
2575
|
+
before: 0,
|
|
2576
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2608
2577
|
}
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2578
|
+
}
|
|
2579
|
+
: {
|
|
2580
|
+
productSKU: {
|
|
2581
|
+
before: this.vasGrist.dirtyData.records[firstIndex].productSKU,
|
|
2582
|
+
after: e.detail[i].productSKU
|
|
2583
|
+
},
|
|
2584
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2585
|
+
vasQty: {
|
|
2586
|
+
before: 0,
|
|
2587
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2619
2588
|
}
|
|
2589
|
+
}
|
|
2620
2590
|
})
|
|
2621
2591
|
} else {
|
|
2622
2592
|
newRecords.push({
|
|
@@ -2629,26 +2599,24 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2629
2599
|
},
|
|
2630
2600
|
orderVasItemId: a?.orderVasItemId,
|
|
2631
2601
|
vasRemark: a?.vasRemark,
|
|
2632
|
-
itemEditType: a?.orderVasItemId
|
|
2633
|
-
|
|
2634
|
-
: ORDER_VAS_STATUS.NEW.value,
|
|
2635
|
-
__dirty__: a?.orderVasItemId ? (a.__dirty__ ? a.__dirty__ : undefined) : '+',
|
|
2602
|
+
itemEditType: a?.orderVasItemId ? (a.itemEditType || (a.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)) : ORDER_VAS_STATUS.NEW.value,
|
|
2603
|
+
__dirty__: a?.orderVasItemId ? a.__dirty__ ? a.__dirty__ : undefined : '+',
|
|
2636
2604
|
__dirtyfields__: a?.__dirtyfields__
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
}
|
|
2605
|
+
? {
|
|
2606
|
+
...a.__dirtyfields__,
|
|
2607
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2608
|
+
vasQty: {
|
|
2609
|
+
before: 0,
|
|
2610
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2644
2611
|
}
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2612
|
+
}
|
|
2613
|
+
: {
|
|
2614
|
+
vas: { before: this.vasGrist.dirtyData.records[firstIndex].vas, after: e.detail[i] },
|
|
2615
|
+
vasQty: {
|
|
2616
|
+
before: 0,
|
|
2617
|
+
after: this.vasGrist.dirtyData.records[firstIndex].qty
|
|
2651
2618
|
}
|
|
2619
|
+
}
|
|
2652
2620
|
})
|
|
2653
2621
|
}
|
|
2654
2622
|
}
|
|
@@ -2662,9 +2630,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2662
2630
|
}
|
|
2663
2631
|
}}"
|
|
2664
2632
|
@deleted="${e => {
|
|
2665
|
-
let oldRecord = this.vasGrist.dirtyData.records.filter(
|
|
2666
|
-
data => data.group === record.group && data.id === record.id
|
|
2667
|
-
)
|
|
2633
|
+
let oldRecord = this.vasGrist.dirtyData.records.filter(data => data.group === record.group && data.id === record.id)
|
|
2668
2634
|
let oldOvi = oldRecord[0].orderVasItems
|
|
2669
2635
|
for (const vas of e.detail) {
|
|
2670
2636
|
let ovi = oldOvi?.find(data => data.vas.id === vas.id)
|
|
@@ -3255,7 +3221,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3255
3221
|
this._stateBillingInput.value = ''
|
|
3256
3222
|
return
|
|
3257
3223
|
}
|
|
3258
|
-
}
|
|
3224
|
+
}else{
|
|
3225
|
+
|
|
3259
3226
|
}
|
|
3260
3227
|
|
|
3261
3228
|
try {
|
|
@@ -3468,7 +3435,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3468
3435
|
orderVasPatch = orderVasPatch.concat(this.deletedVas.filter(del => del.id))
|
|
3469
3436
|
orderVasItemPatch = orderVasItemPatch.concat(this.deletedVas.filter(del => !del.id && del.orderVasItemId))
|
|
3470
3437
|
|
|
3471
|
-
orderVasPatch = orderVasPatch
|
|
3438
|
+
orderVasPatch = orderVasPatch
|
|
3439
|
+
.map(ov => {
|
|
3472
3440
|
return {
|
|
3473
3441
|
id: ov?.id,
|
|
3474
3442
|
bizplace: this._releaseOrder.bizplace,
|
|
@@ -3499,10 +3467,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3499
3467
|
vas: { id: cur.vas.id, name: cur.vas.name },
|
|
3500
3468
|
vasQty: cur.vasQty,
|
|
3501
3469
|
vasRemark: cur?.vasRemark,
|
|
3502
|
-
cuFlag: cur.orderVasItemId ? cur.cuFlag || (cur.__dirty__ ? 'M' : undefined) : '+',
|
|
3503
|
-
itemEditType: cur?.orderVasItemId
|
|
3504
|
-
? cur.itemEditType || (cur.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)
|
|
3505
|
-
: ORDER_VAS_STATUS.NEW.value
|
|
3470
|
+
cuFlag: cur.orderVasItemId ? (cur.cuFlag || (cur.__dirty__ ? 'M' : undefined)) : '+',
|
|
3471
|
+
itemEditType: cur?.orderVasItemId ? (cur.itemEditType || (cur.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)) : ORDER_VAS_STATUS.NEW.value,
|
|
3506
3472
|
}
|
|
3507
3473
|
]
|
|
3508
3474
|
} else {
|
|
@@ -3521,21 +3487,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3521
3487
|
return {
|
|
3522
3488
|
id: ovi.orderVasItemId ? ovi.orderVasItemId : undefined,
|
|
3523
3489
|
vas: { id: ovi.vas.id, name: ovi.vas.name },
|
|
3524
|
-
orderVas: {
|
|
3525
|
-
id: ovi.orderVas?.id
|
|
3526
|
-
? ovi.orderVas.id
|
|
3527
|
-
: this.vasData.records.find(vasData => ovi.group === vasData.group && vasData.id)?.id
|
|
3528
|
-
},
|
|
3490
|
+
orderVas: { id: ovi.orderVas?.id ? ovi.orderVas.id : this.vasData.records.find(vasData => ovi.group === vasData.group && vasData.id)?.id },
|
|
3529
3491
|
vasQty: ovi.vasQty,
|
|
3530
|
-
cuFlag: ovi.orderVasItemId ? ovi.cuFlag || (ovi.__dirty__ ? 'M' : undefined) : '+',
|
|
3531
|
-
itemEditType: ovi.orderVasItemId
|
|
3532
|
-
? ovi.itemEditType || (ovi.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)
|
|
3533
|
-
: ORDER_VAS_STATUS.NEW.value
|
|
3492
|
+
cuFlag: ovi.orderVasItemId ? (ovi.cuFlag || (ovi.__dirty__ ? 'M' : undefined)) : '+',
|
|
3493
|
+
itemEditType: ovi.orderVasItemId ? (ovi.itemEditType || (ovi.__dirty__ ? ORDER_VAS_STATUS.CHANGES.value : undefined)) : ORDER_VAS_STATUS.NEW.value
|
|
3534
3494
|
}
|
|
3535
3495
|
})
|
|
3536
|
-
.filter(
|
|
3537
|
-
ovi => ovi.orderVas.id && !orderVasPatch.some(ovp => ovp.orderVasItemsPatch.some(item => item.id === ovi.id))
|
|
3538
|
-
)
|
|
3496
|
+
.filter(ovi => ovi.orderVas.id && !orderVasPatch.some(ovp => ovp.orderVasItemsPatch.some(item => item.id === ovi.id)))
|
|
3539
3497
|
|
|
3540
3498
|
const result = await CustomAlert({
|
|
3541
3499
|
title: i18next.t('title.are_you_sure'),
|
|
@@ -3574,12 +3532,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3574
3532
|
const hasChanges = ov.cuFlag || isDirty || ov.orderVasItemsPatch.some(ovi => ovi.cuFlag)
|
|
3575
3533
|
return {
|
|
3576
3534
|
...ov,
|
|
3577
|
-
cuFlag: !ov.id ? '+' : hasChanges ? ov.cuFlag || 'M' : undefined,
|
|
3578
|
-
editType: !ov.id
|
|
3579
|
-
? ORDER_VAS_STATUS.NEW.value
|
|
3580
|
-
: hasChanges
|
|
3581
|
-
? ov.editType || ORDER_VAS_STATUS.CHANGES.value
|
|
3582
|
-
: undefined
|
|
3535
|
+
cuFlag: !ov.id ? '+' : hasChanges ? (ov.cuFlag || 'M') : undefined,
|
|
3536
|
+
editType: !ov.id ? ORDER_VAS_STATUS.NEW.value : hasChanges ? (ov.editType || ORDER_VAS_STATUS.CHANGES.value) : undefined
|
|
3583
3537
|
}
|
|
3584
3538
|
})
|
|
3585
3539
|
}
|
|
@@ -3601,7 +3555,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3601
3555
|
}
|
|
3602
3556
|
|
|
3603
3557
|
_validateVas() {
|
|
3604
|
-
if (this.deletedVas.length === 0 && !this.vasGrist.dirtyData.records.some(vas => vas.__dirty__)) {
|
|
3558
|
+
if (this.deletedVas.length === 0 && !this.vasGrist.dirtyData.records.some( vas => vas.__dirty__ )) {
|
|
3605
3559
|
throw new Error(i18next.t('text.no_changes_to_be_submitted'))
|
|
3606
3560
|
}
|
|
3607
3561
|
const roData = this.inventoryData.records
|
|
@@ -3722,6 +3676,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3722
3676
|
return this.vasFormattedData
|
|
3723
3677
|
}
|
|
3724
3678
|
|
|
3679
|
+
|
|
3725
3680
|
sortByNameField(items, nameField, nameField2) {
|
|
3726
3681
|
if (nameField2) {
|
|
3727
3682
|
items?.sort((a, b) => {
|
|
@@ -3742,7 +3697,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3742
3697
|
try {
|
|
3743
3698
|
openPopup(
|
|
3744
3699
|
html`
|
|
3745
|
-
<vas-changes-popup
|
|
3700
|
+
<vas-changes-popup
|
|
3701
|
+
.releaseGoodNo="${this._releaseOrderNo}"
|
|
3702
|
+
.data="${this.vasData}"
|
|
3703
|
+
></vas-changes-popup>
|
|
3746
3704
|
`,
|
|
3747
3705
|
{
|
|
3748
3706
|
backdrop: true,
|
|
@@ -3750,7 +3708,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3750
3708
|
title: i18next.t('title.view_vas_changes')
|
|
3751
3709
|
}
|
|
3752
3710
|
)
|
|
3753
|
-
} catch
|
|
3711
|
+
} catch(e) {
|
|
3754
3712
|
this._showToast(e)
|
|
3755
3713
|
}
|
|
3756
3714
|
}
|
|
@@ -3775,7 +3733,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
3775
3733
|
title: i18next.t('title.proceed_edited_vas')
|
|
3776
3734
|
}
|
|
3777
3735
|
)
|
|
3778
|
-
} catch
|
|
3736
|
+
} catch(e) {
|
|
3779
3737
|
this._showToast(e)
|
|
3780
3738
|
}
|
|
3781
3739
|
}
|
|
@@ -494,13 +494,13 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
494
494
|
width: 150
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
|
-
type: '
|
|
497
|
+
type: 'integer',
|
|
498
498
|
name: 'releaseQty',
|
|
499
499
|
header: i18next.t('field.release_qty'),
|
|
500
500
|
width: 140
|
|
501
501
|
},
|
|
502
502
|
{
|
|
503
|
-
type: '
|
|
503
|
+
type: 'integer',
|
|
504
504
|
name: 'returnQty',
|
|
505
505
|
header: i18next.t('field.return_qty'),
|
|
506
506
|
record: { editable: true, options: { min: 0 } },
|
|
@@ -585,19 +585,6 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
585
585
|
|
|
586
586
|
try {
|
|
587
587
|
if (changedColumn === 'returnQty') {
|
|
588
|
-
// Validate decimal quantities based on isInventoryDecimal
|
|
589
|
-
if (!changeRecord.isInventoryDecimal) {
|
|
590
|
-
// For non-decimal products, check if the quantity is a whole number
|
|
591
|
-
if (changeRecord.returnQty % 1 !== 0) {
|
|
592
|
-
throw new Error(i18next.t('text.decimal_quantities_not_allowed'))
|
|
593
|
-
}
|
|
594
|
-
} else {
|
|
595
|
-
// For decimal products, check if the quantity has more than 3 decimal places
|
|
596
|
-
const decimalPlaces = (changeRecord.returnQty.toString().split('.')[1] || '').length
|
|
597
|
-
if (decimalPlaces > 3) {
|
|
598
|
-
throw new Error(i18next.t('text.decimal_places_exceed_limit'))
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
588
|
this._validateChangedValue(changeRecord.returnQty, changeRecord.releaseQty, 'field.qty')
|
|
602
589
|
} else if (changedColumn === 'returnUomValue') {
|
|
603
590
|
this._validateChangedValue(changeRecord.returnUomValue, changeRecord.releaseUomValue, 'field.uom_value')
|
|
@@ -635,7 +622,7 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
|
|
|
635
622
|
}
|
|
636
623
|
|
|
637
624
|
roundedUomValue = returnQty * packageUomValue
|
|
638
|
-
roundedUomValue = parseFloat(roundedUomValue.toFixed(
|
|
625
|
+
roundedUomValue = parseFloat(roundedUomValue.toFixed(2))
|
|
639
626
|
}
|
|
640
627
|
}
|
|
641
628
|
|
|
@@ -191,7 +191,7 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
191
191
|
width: 120
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
|
-
type: '
|
|
194
|
+
type: 'integer',
|
|
195
195
|
name: 'releaseQty',
|
|
196
196
|
header: i18next.t('field.return_qty'),
|
|
197
197
|
width: 150
|
|
@@ -268,7 +268,6 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
268
268
|
productDetailId
|
|
269
269
|
releaseOrderId
|
|
270
270
|
releaseGoodName
|
|
271
|
-
isInventoryDecimal
|
|
272
271
|
releaseGoodRefNo
|
|
273
272
|
releaseGoodRefNo2
|
|
274
273
|
releaseGoodRefNo3
|
|
@@ -186,13 +186,13 @@ class InventoryAssignPopup extends localize(i18next)(LitElement) {
|
|
|
186
186
|
width: 120
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
type: '
|
|
189
|
+
type: 'integer',
|
|
190
190
|
name: 'qty',
|
|
191
191
|
header: i18next.t('field.available_qty'),
|
|
192
192
|
width: 100
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
|
-
type: '
|
|
195
|
+
type: 'integer',
|
|
196
196
|
name: 'pickQty',
|
|
197
197
|
header: i18next.t('field.pick_qty'),
|
|
198
198
|
record: { editable: true },
|
|
@@ -253,7 +253,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
|
|
|
253
253
|
width: 100
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
|
-
type: '
|
|
256
|
+
type: 'integer',
|
|
257
257
|
name: 'releaseQty',
|
|
258
258
|
header: i18next.t('field.release_qty'),
|
|
259
259
|
width: 140
|
|
@@ -401,13 +401,13 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
|
|
|
401
401
|
width: 100
|
|
402
402
|
},
|
|
403
403
|
{
|
|
404
|
-
type: '
|
|
404
|
+
type: 'integer',
|
|
405
405
|
name: 'addableQty',
|
|
406
406
|
header: i18next.t('field.remaining_qty'),
|
|
407
407
|
width: 100
|
|
408
408
|
},
|
|
409
409
|
{
|
|
410
|
-
type: '
|
|
410
|
+
type: 'integer',
|
|
411
411
|
name: 'releaseQty',
|
|
412
412
|
header: i18next.t('field.release_qty'),
|
|
413
413
|
record: { editable: true, options: { min: 0 } },
|
|
@@ -800,7 +800,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
|
|
|
800
800
|
|
|
801
801
|
roundedUomValue = releaseQty * (e.detail.after.remainUomValue / e.detail.after.remainQty)
|
|
802
802
|
|
|
803
|
-
roundedUomValue = parseFloat(roundedUomValue.toFixed(
|
|
803
|
+
roundedUomValue = parseFloat(roundedUomValue.toFixed(2))
|
|
804
804
|
}
|
|
805
805
|
} else {
|
|
806
806
|
let packageUomValue = e.detail.record.remainUomValue / e.detail.record.remainQty
|
|
@@ -817,7 +817,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
|
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
roundedUomValue = releaseQty * packageUomValue
|
|
820
|
-
roundedUomValue = parseFloat(roundedUomValue.toFixed(
|
|
820
|
+
roundedUomValue = parseFloat(roundedUomValue.toFixed(2))
|
|
821
821
|
this.releaseQty = releaseQty
|
|
822
822
|
this.releaseUomValue = roundedUomValue
|
|
823
823
|
}
|
|
@@ -975,7 +975,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
|
|
|
975
975
|
}
|
|
976
976
|
|
|
977
977
|
roundedUom = releaseQty * packageUom
|
|
978
|
-
roundedUom = parseFloat(roundedUom.toFixed(
|
|
978
|
+
roundedUom = parseFloat(roundedUom.toFixed(2))
|
|
979
979
|
}
|
|
980
980
|
} else {
|
|
981
981
|
releaseQty = afterValue
|
|
@@ -468,7 +468,7 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
468
468
|
|
|
469
469
|
if (this._hasVas) {
|
|
470
470
|
configColumns.push({
|
|
471
|
-
type: '
|
|
471
|
+
type: 'integer',
|
|
472
472
|
name: 'releaseQty',
|
|
473
473
|
header: i18next.t('field.release_qty'),
|
|
474
474
|
width: 100
|
|
@@ -476,13 +476,13 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
476
476
|
}
|
|
477
477
|
configColumns.push(
|
|
478
478
|
{
|
|
479
|
-
type: '
|
|
479
|
+
type: 'integer',
|
|
480
480
|
name: 'pickedQty',
|
|
481
481
|
header: i18next.t('field.picked_qty'),
|
|
482
482
|
width: 100
|
|
483
483
|
},
|
|
484
484
|
{
|
|
485
|
-
type: '
|
|
485
|
+
type: 'integer',
|
|
486
486
|
name: 'loadedQty',
|
|
487
487
|
header: i18next.t('field.loaded_qty'),
|
|
488
488
|
record: { editable: true },
|