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