@things-factory/operato-wms 4.3.764 → 4.3.769
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/bulk-operation/validate-gan-popup.js +2 -2
- package/client/pages/inventory/inventory-adjustment.js +46 -43
- package/client/pages/order/arrival-notice/create-arrival-notice.js +209 -206
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +132 -129
- package/client/pages/order/arrival-notice/edit-product-popup.js +97 -92
- package/config.development.js +88 -105
- package/package.json +50 -50
|
@@ -212,16 +212,16 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
212
212
|
?checked="${this._ownTransport}"
|
|
213
213
|
?disabled="${this._disableTransport}"
|
|
214
214
|
@change="${e => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
215
|
+
this._ownTransport = e.currentTarget.checked
|
|
216
|
+
if (this._ownTransport) {
|
|
217
|
+
this._warehouseTransportInput.checked = false
|
|
218
|
+
this._warehouseTransport = false
|
|
219
|
+
} else {
|
|
220
|
+
this._warehouseTransportInput.checked = true
|
|
221
|
+
this._warehouseTransport = true
|
|
222
|
+
}
|
|
223
|
+
this._validateTransport()
|
|
224
|
+
}}"
|
|
225
225
|
/>
|
|
226
226
|
<label for="ownTransport">${i18next.t('label.own_transport')}</label>
|
|
227
227
|
|
|
@@ -232,16 +232,16 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
232
232
|
?disabled="${this._disableTransport}"
|
|
233
233
|
?checked="${this._warehouseTransport}"
|
|
234
234
|
@change="${e => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
235
|
+
this._warehouseTransport = e.currentTarget.checked
|
|
236
|
+
if (this._warehouseTransport) {
|
|
237
|
+
this._ownTransportInput.checked = false
|
|
238
|
+
this._ownTransport = false
|
|
239
|
+
} else {
|
|
240
|
+
this._ownTransportInput.checked = true
|
|
241
|
+
this._ownTransport = true
|
|
242
|
+
}
|
|
243
|
+
this._validateTransport()
|
|
244
|
+
}}"
|
|
245
245
|
/>
|
|
246
246
|
<label for="warehouseTransport">${i18next.t('label.warehouse_transport')}</label>
|
|
247
247
|
|
|
@@ -251,8 +251,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
251
251
|
name="container"
|
|
252
252
|
?checked="${this._hasContainer}"
|
|
253
253
|
@change="${e => {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
this._hasContainer = e.currentTarget.checked
|
|
255
|
+
}}"
|
|
256
256
|
?hidden="${!this._checkTransport}"
|
|
257
257
|
/>
|
|
258
258
|
<label for="container" ?hidden="${!this._checkTransport}">${i18next.t('label.container')}</label>
|
|
@@ -272,9 +272,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
272
272
|
name="importCargo"
|
|
273
273
|
?checked="${this._importedOrder}"
|
|
274
274
|
@change="${e => {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
this._importedOrder = e.currentTarget.checked
|
|
276
|
+
this._validateImportCargo()
|
|
277
|
+
}}"
|
|
278
278
|
?hidden="${!this._checkTransport}"
|
|
279
279
|
/>
|
|
280
280
|
<label for="importedOrder" ?hidden="${!this._checkTransport}">${i18next.t('label.import_cargo')}</label>
|
|
@@ -320,11 +320,11 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
320
320
|
<select name="containerSize" ?hidden="${!this._hasContainer}">
|
|
321
321
|
<option value="">--${i18next.t('label.please_select_a_container_size')}--</option>
|
|
322
322
|
${(this.containerSizes || []).map(
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
containerSize =>
|
|
324
|
+
html`
|
|
325
325
|
<option value="${containerSize && containerSize.name}">${containerSize && containerSize.name}</option>
|
|
326
326
|
`
|
|
327
|
-
|
|
327
|
+
)}
|
|
328
328
|
</select>
|
|
329
329
|
|
|
330
330
|
<label ?hidden="${!this._ownTransport}">${i18next.t('label.do_no')}</label>
|
|
@@ -378,8 +378,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
378
378
|
|
|
379
379
|
<h2
|
|
380
380
|
@click="${e => {
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
this._vasExpanded = !this._vasExpanded
|
|
382
|
+
}}"
|
|
383
383
|
class="vas-title"
|
|
384
384
|
>
|
|
385
385
|
<mwc-icon>list_alt</mwc-icon>${i18next.t('title.vas')}<mwc-icon
|
|
@@ -720,15 +720,15 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
720
720
|
},
|
|
721
721
|
...(this._enableLotIdInput
|
|
722
722
|
? [
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
723
|
+
{
|
|
724
|
+
type: 'string',
|
|
725
|
+
name: 'palletId',
|
|
726
|
+
header: i18next.t('field.lot_id'),
|
|
727
|
+
imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
|
|
728
|
+
record: { editable: editable },
|
|
729
|
+
width: 150
|
|
730
|
+
}
|
|
731
|
+
]
|
|
732
732
|
: []),
|
|
733
733
|
{
|
|
734
734
|
type: 'date',
|
|
@@ -833,9 +833,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
833
833
|
html`
|
|
834
834
|
<select-transport-vehicle-popup
|
|
835
835
|
@selected="${e => {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
836
|
+
// value of e might be wrong, need to recheck
|
|
837
|
+
this._transportVehicle = `${e.detail.regNumber}` + ` - ${e.detail.size}`
|
|
838
|
+
}}"
|
|
839
839
|
></select-transport-vehicle-popup>
|
|
840
840
|
`,
|
|
841
841
|
{
|
|
@@ -854,15 +854,15 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
854
854
|
.bizplaceId="${this._bizplaceId}"
|
|
855
855
|
.selectMultipleProducts="${this._showAddProducts}"
|
|
856
856
|
@selected="${e => {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
857
|
+
let newRecords = []
|
|
858
|
+
for (let i = 0; i < e.detail.multipleProducts.length; i++) {
|
|
859
|
+
newRecords.push(e.detail.multipleProducts[i])
|
|
860
|
+
}
|
|
861
|
+
this.productData = {
|
|
862
|
+
...this.productData,
|
|
863
|
+
records: [...this.productGrist.dirtyData.records, ...newRecords]
|
|
864
|
+
}
|
|
865
|
+
}}"
|
|
866
866
|
></select-product-popup>
|
|
867
867
|
`,
|
|
868
868
|
{
|
|
@@ -883,40 +883,40 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
883
883
|
<select-product-popup
|
|
884
884
|
.bizplaceId="${this._bizplaceId}"
|
|
885
885
|
@selected="${e => {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
this.productGrist.dirtyData.records = this.productGrist.dirtyData.records.map(item => {
|
|
898
|
-
return {
|
|
899
|
-
...item,
|
|
900
|
-
totalUomValue:
|
|
901
|
-
item?.packQty > 0
|
|
902
|
-
? item?.totalUomValue
|
|
903
|
-
? item.totalUomValue
|
|
904
|
-
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(3)} ${e.detail.uom}`
|
|
905
|
-
: null
|
|
906
|
-
}
|
|
907
|
-
})
|
|
886
|
+
// let newRecord = []
|
|
887
|
+
// newRecord.push(e.detail)
|
|
888
|
+
|
|
889
|
+
if (this.productGrist.dirtyData.records.length !== rowIndex) {
|
|
890
|
+
// update existing product data records
|
|
891
|
+
this.productGrist.dirtyData.records.splice(rowIndex, 1, {
|
|
892
|
+
...this.productGrist.dirtyData.records[rowIndex],
|
|
893
|
+
...e.detail,
|
|
894
|
+
isRequiredCheckExpiry: e.detail.product.isRequiredCheckExpiry
|
|
895
|
+
})
|
|
908
896
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
897
|
+
this.productGrist.dirtyData.records = this.productGrist.dirtyData.records.map(item => {
|
|
898
|
+
return {
|
|
899
|
+
...item,
|
|
900
|
+
totalUomValue:
|
|
901
|
+
item?.packQty > 0
|
|
902
|
+
? item?.totalUomValue
|
|
903
|
+
? item.totalUomValue
|
|
904
|
+
: `${parseFloat(item.packQty * e.detail.uomValue).toFixed(3)} ${e.detail.uom}`
|
|
905
|
+
: null
|
|
917
906
|
}
|
|
907
|
+
})
|
|
908
|
+
|
|
909
|
+
this.productData = {
|
|
910
|
+
...this.productData,
|
|
911
|
+
records: [...this.productGrist.dirtyData.records]
|
|
918
912
|
}
|
|
919
|
-
}
|
|
913
|
+
} else {
|
|
914
|
+
this.productData = {
|
|
915
|
+
...this.productData,
|
|
916
|
+
records: [...this.productGrist.dirtyData.records, e.detail]
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}}"
|
|
920
920
|
></select-product-popup>
|
|
921
921
|
`,
|
|
922
922
|
{
|
|
@@ -938,31 +938,31 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
938
938
|
.bizplaceId="${this._bizplaceId}"
|
|
939
939
|
.enableDirectInbound="${this.enableDirectInbound}"
|
|
940
940
|
@selected="${async e => {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
941
|
+
this.productGrist.dirtyData.records[rowIndex].location = { id: e.detail.id, name: e.detail.name }
|
|
942
|
+
this.productGrist.dirtyData.records[rowIndex].warehouse = {
|
|
943
|
+
id: e.detail.warehouse.id,
|
|
944
|
+
name: e.detail.warehouse.name
|
|
945
|
+
}
|
|
946
|
+
this.productGrist.dirtyData.records[rowIndex].__dirty__ = true
|
|
947
947
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
948
|
+
if (this.productGrist.dirtyData.records.length !== rowIndex) {
|
|
949
|
+
this.productGrist.dirtyData.records.splice(rowIndex, 1, {
|
|
950
|
+
...this.productGrist.dirtyData.records[rowIndex]
|
|
951
|
+
})
|
|
952
952
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
953
|
+
this.productData = {
|
|
954
|
+
...this.productData,
|
|
955
|
+
records: [...this.productGrist.dirtyData.records]
|
|
956
|
+
}
|
|
957
957
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
}
|
|
958
|
+
this.productGrist.data.records = this.productGrist.dirtyData.records
|
|
959
|
+
} else {
|
|
960
|
+
this.productData = {
|
|
961
|
+
...this.productData,
|
|
962
|
+
records: [...this.productGrist.dirtyData.records]
|
|
964
963
|
}
|
|
965
|
-
}
|
|
964
|
+
}
|
|
965
|
+
}}"
|
|
966
966
|
></buffer-location-selector>
|
|
967
967
|
`,
|
|
968
968
|
{
|
|
@@ -1575,8 +1575,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
|
|
1577
1577
|
let orderProduct = {
|
|
1578
|
-
batchId: record.batchId,
|
|
1579
|
-
batchIdRef: record
|
|
1578
|
+
batchId: record.batchId ? record.batchId.trim() : null,
|
|
1579
|
+
batchIdRef: record.batchIdRef ? record.batchIdRef.trim() : null,
|
|
1580
1580
|
product: { id: record.product.id },
|
|
1581
1581
|
productDetail: record?.productDetail?.id ? record.productDetail : { id: record.productDetailId },
|
|
1582
1582
|
packingType: record.packingType,
|
|
@@ -1677,67 +1677,67 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1677
1677
|
html`
|
|
1678
1678
|
<vas-create-popup
|
|
1679
1679
|
.targetList="${this.productGrist.dirtyData.records
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1680
|
+
.map(record => {
|
|
1681
|
+
let packQty = record.packQty - (record.releaseQty || 0)
|
|
1682
|
+
|
|
1683
|
+
if (this.vasData.records?.length) {
|
|
1684
|
+
const existVasData = this.vasData.records.filter(vasRecord => {
|
|
1685
|
+
const isSamePackingType = !!(record.packingType === vasRecord.packingType)
|
|
1686
|
+
switch (vasRecord.targetType) {
|
|
1687
|
+
case VAS_BATCH_AND_PRODUCT_TYPE:
|
|
1688
|
+
return (
|
|
1689
|
+
record.batchId === vasRecord.target.batchId &&
|
|
1690
|
+
record.product.id === vasRecord.target.productId &&
|
|
1691
|
+
isSamePackingType
|
|
1692
|
+
)
|
|
1693
|
+
case VAS_BATCH_NO_TYPE:
|
|
1694
|
+
return record.batchId === vasRecord.target && isSamePackingType
|
|
1695
|
+
case VAS_PRODUCT_TYPE:
|
|
1696
|
+
return record.product.id === vasRecord.target && isSamePackingType
|
|
1697
|
+
}
|
|
1698
|
+
})
|
|
1699
1699
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1700
|
+
if (existVasData?.length) {
|
|
1701
|
+
let assignedQty = 0
|
|
1702
1702
|
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1703
|
+
existVasData.forEach(dt => {
|
|
1704
|
+
assignedQty += dt.qty
|
|
1705
|
+
})
|
|
1706
1706
|
|
|
1707
|
-
|
|
1708
|
-
}
|
|
1707
|
+
packQty -= assignedQty
|
|
1709
1708
|
}
|
|
1709
|
+
}
|
|
1710
1710
|
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1711
|
+
delete record.__dirty__
|
|
1712
|
+
delete record.__dirtyfields__
|
|
1713
|
+
return {
|
|
1714
|
+
...record,
|
|
1715
|
+
packQty,
|
|
1716
|
+
unitUomValue: record.uomValue,
|
|
1717
|
+
totalUomValue: record.uomValue * packQty
|
|
1718
|
+
}
|
|
1719
|
+
})
|
|
1720
|
+
.filter(record => record.packQty > 0)}"
|
|
1721
1721
|
.vasList="${this.vasData.records}"
|
|
1722
1722
|
.record="${record}"
|
|
1723
1723
|
@completed="${e => {
|
|
1724
|
-
|
|
1724
|
+
const newRecords = e.detail
|
|
1725
1725
|
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1726
|
+
if (this.vasGrist.dirtyData.records.length !== this._selectedVasRecordIdx) {
|
|
1727
|
+
// update existing vasData records
|
|
1728
|
+
this.vasGrist.dirtyData.records.splice(this._selectedVasRecordIdx, 1, ...newRecords)
|
|
1729
1729
|
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
}
|
|
1730
|
+
this.vasData = {
|
|
1731
|
+
...this.vasData,
|
|
1732
|
+
records: [...this.vasGrist.dirtyData.records]
|
|
1733
|
+
}
|
|
1734
|
+
} else {
|
|
1735
|
+
this.vasData = {
|
|
1736
|
+
...this.vasData,
|
|
1737
|
+
records: [...this.vasGrist.dirtyData.records, ...newRecords]
|
|
1739
1738
|
}
|
|
1740
|
-
}
|
|
1739
|
+
}
|
|
1740
|
+
}}"
|
|
1741
1741
|
></vas-create-popup>
|
|
1742
1742
|
`,
|
|
1743
1743
|
{
|
|
@@ -1778,15 +1778,15 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1778
1778
|
html`
|
|
1779
1779
|
<popup-partner-bizplaces-selector
|
|
1780
1780
|
@selected="${async e => {
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1781
|
+
this._bizplaceId = e.detail.id
|
|
1782
|
+
this._bizplaceName = e.detail.name
|
|
1783
|
+
this.productGrist.reset()
|
|
1784
|
+
this.vasGrist.reset()
|
|
1785
|
+
this._strictProductSelection = await fetchSettingRule('strict-product-selection', e.detail.domain.id)
|
|
1786
|
+
this._configureProductGrist()
|
|
1787
|
+
this._clearView()
|
|
1788
|
+
this._showAddProducts = true
|
|
1789
|
+
}}"
|
|
1790
1790
|
></popup-partner-bizplaces-selector>
|
|
1791
1791
|
`,
|
|
1792
1792
|
{
|
|
@@ -1850,14 +1850,14 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1850
1850
|
},
|
|
1851
1851
|
...(this._enableLotIdInput
|
|
1852
1852
|
? [
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1853
|
+
{
|
|
1854
|
+
type: 'string',
|
|
1855
|
+
name: 'palletId',
|
|
1856
|
+
header: i18next.t('field.lot_id'),
|
|
1857
|
+
imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
|
|
1858
|
+
width: 100
|
|
1859
|
+
}
|
|
1860
|
+
]
|
|
1861
1861
|
: []),
|
|
1862
1862
|
{
|
|
1863
1863
|
type: 'date',
|
|
@@ -1875,20 +1875,20 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1875
1875
|
},
|
|
1876
1876
|
...(this.enableDirectInbound
|
|
1877
1877
|
? [
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1878
|
+
{
|
|
1879
|
+
type: 'object',
|
|
1880
|
+
name: 'location',
|
|
1881
|
+
header: i18next.t('field.location'),
|
|
1882
|
+
imex: {
|
|
1881
1883
|
header: i18next.t('field.location'),
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
}
|
|
1891
|
-
]
|
|
1884
|
+
key: 'location.name',
|
|
1885
|
+
width: 30,
|
|
1886
|
+
type: 'array',
|
|
1887
|
+
arrData: []
|
|
1888
|
+
},
|
|
1889
|
+
width: 120
|
|
1890
|
+
}
|
|
1891
|
+
]
|
|
1892
1892
|
: []),
|
|
1893
1893
|
{
|
|
1894
1894
|
type: 'float',
|
|
@@ -1906,14 +1906,14 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
1906
1906
|
},
|
|
1907
1907
|
...(this.enableDirectInbound
|
|
1908
1908
|
? [
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1909
|
+
{
|
|
1910
|
+
type: 'string',
|
|
1911
|
+
name: 'errMsg',
|
|
1912
|
+
header: i18next.t('field.error_message'),
|
|
1913
|
+
imex: { header: i18next.t('field.error_message'), key: 'errMsg', width: 25, type: 'string' },
|
|
1914
|
+
width: 350
|
|
1915
|
+
}
|
|
1916
|
+
]
|
|
1917
1917
|
: [])
|
|
1918
1918
|
]
|
|
1919
1919
|
|
|
@@ -2025,8 +2025,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
2025
2025
|
item?.unitPrice || item?.unitPrice == 0
|
|
2026
2026
|
? item.unitPrice
|
|
2027
2027
|
: item?.productDetail?.costPrice
|
|
2028
|
-
|
|
2029
|
-
|
|
2028
|
+
? item.productDetail.costPrice
|
|
2029
|
+
: null
|
|
2030
2030
|
|
|
2031
2031
|
return {
|
|
2032
2032
|
...item,
|
|
@@ -2058,6 +2058,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
2058
2058
|
async importHandler(patches) {
|
|
2059
2059
|
try {
|
|
2060
2060
|
const orderProducts = patches.map(patch => {
|
|
2061
|
+
if (patch?.batchId) patch.batchId = patch.batchId.trim()
|
|
2062
|
+
if (patch?.batchIdRef) patch.batchIdRef = patch.batchIdRef.trim()
|
|
2063
|
+
|
|
2061
2064
|
if (patch.manufactureDate) {
|
|
2062
2065
|
const mdt = new Date(patch.manufactureDate)
|
|
2063
2066
|
patch.manufactureDate = mdt < new Date() ? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}` : ''
|
|
@@ -2087,8 +2090,8 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
2087
2090
|
if (!this.enableDirectInbound && records.some(record => record.location)) {
|
|
2088
2091
|
throw new Error(
|
|
2089
2092
|
'Location-based assignment is not allowed. Please delete the' +
|
|
2090
|
-
|
|
2091
|
-
|
|
2093
|
+
' location ' +
|
|
2094
|
+
'column or enable Direct GAN Order in settings.'
|
|
2092
2095
|
)
|
|
2093
2096
|
}
|
|
2094
2097
|
if (this._bizplaceId) {
|
|
@@ -2110,20 +2113,20 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
2110
2113
|
record.unitPrice == null && record.unitPrice !== undefined
|
|
2111
2114
|
? '0.00'
|
|
2112
2115
|
: record.unitPrice === undefined
|
|
2113
|
-
|
|
2114
|
-
|
|
2116
|
+
? null
|
|
2117
|
+
: parseFloat(parseFloat(record.unitPrice).toFixed(2)),
|
|
2115
2118
|
packQty:
|
|
2116
2119
|
record.packQty == null && record.packQty !== undefined
|
|
2117
2120
|
? '0'
|
|
2118
2121
|
: record.packQty === undefined
|
|
2119
|
-
|
|
2120
|
-
|
|
2122
|
+
? null
|
|
2123
|
+
: parseFloat(parseFloat(record.packQty).toFixed(3)),
|
|
2121
2124
|
palletQty:
|
|
2122
2125
|
record.palletQty == null && record.palletQty !== undefined
|
|
2123
2126
|
? parseInt('0')
|
|
2124
2127
|
: record.palletQty === undefined
|
|
2125
|
-
|
|
2126
|
-
|
|
2128
|
+
? null
|
|
2129
|
+
: parseInt(record.palletQty),
|
|
2127
2130
|
uomValue: record.uomValue !== null && record.uomValue !== undefined ? parseFloat(record.uomValue) : ''
|
|
2128
2131
|
}
|
|
2129
2132
|
})
|
|
@@ -2134,9 +2137,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
|
|
|
2134
2137
|
<import-pop-up
|
|
2135
2138
|
.records=${records}
|
|
2136
2139
|
.config=${{
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
+
rows: this.productGristConfig.rows,
|
|
2141
|
+
columns: [...this.excelColumns().filter(column => column.imex !== undefined)]
|
|
2142
|
+
}}
|
|
2140
2143
|
.importHandler="${await this.importHandler.bind(this)}"
|
|
2141
2144
|
.enableDirectInbound=${this.enableDirectInbound}
|
|
2142
2145
|
></import-pop-up>
|