@things-factory/operato-wms 4.3.41 → 4.3.44
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/bulk-operation.js +2 -2
- package/client/pages/inbound/unload-product.js +43 -23
- package/client/pages/inventory/onhand-inventory.js +0 -1
- package/client/pages/order/release-order/create-release-order.js +207 -208
- package/client/pages/order/release-order/release-order-detail.js +151 -192
- package/client/pages/order/transport-order/delivery-note-popup.js +441 -337
- package/package.json +6 -6
- package/translations/en.json +2 -0
|
@@ -354,8 +354,8 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
354
354
|
html`
|
|
355
355
|
<validate-gan-popup
|
|
356
356
|
.records=${records.map(raw => {
|
|
357
|
-
let etaDate = new Date((raw.etaDate - (25567 + 1)) * 86400 * 1000 ||
|
|
358
|
-
let mfgDate = new Date((raw.manufactureDate - (25567 + 1)) * 86400 * 1000 ||
|
|
357
|
+
let etaDate = new Date((raw.etaDate - (25567 + 1)) * 86400 * 1000 || null)
|
|
358
|
+
let mfgDate = new Date((raw.manufactureDate - (25567 + 1)) * 86400 * 1000 || null)
|
|
359
359
|
|
|
360
360
|
return {
|
|
361
361
|
refNo: String(raw.refNo || ''),
|
|
@@ -644,11 +644,13 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
644
644
|
records: worksheetDetailInfo
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
if (
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
647
|
+
if (this._selectedOrderProduct) {
|
|
648
|
+
let quantityTally = worksheetDetailInfo.filter(
|
|
649
|
+
itm => itm.id == this._selectedOrderProduct.id && itm.actualPackQty == itm.packQty
|
|
650
|
+
)
|
|
651
|
+
if (quantityTally?.length == 1) {
|
|
652
|
+
this._selectedOrderProduct = null
|
|
653
|
+
}
|
|
652
654
|
}
|
|
653
655
|
|
|
654
656
|
const partnerDomainId = worksheetInfo.partnerDomainId
|
|
@@ -847,14 +849,17 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
847
849
|
e.preventDefault()
|
|
848
850
|
try {
|
|
849
851
|
if (!this._enableCartonLabel) return this._unloadSelected()
|
|
850
|
-
await this._validateUnloading()
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
return this._scanSerialNumberUnload()
|
|
852
|
+
let orderProducts = await this._validateUnloading()
|
|
853
|
+
if (orderProducts?.length > 1) {
|
|
854
|
+
this.selectOrderProduct(orderProducts)
|
|
854
855
|
} else {
|
|
855
|
-
if (
|
|
856
|
+
if (this._isRequireSerialNumberScanningInbound) {
|
|
857
|
+
return this._scanSerialNumberUnload()
|
|
858
|
+
} else {
|
|
859
|
+
if (!(this._enableProductScanning && !this._enableInputQty)) return this._qtyUnload()
|
|
860
|
+
}
|
|
861
|
+
this._scanProductUnload()
|
|
856
862
|
}
|
|
857
|
-
this._scanProductUnload()
|
|
858
863
|
} catch (e) {
|
|
859
864
|
this._showToast(e)
|
|
860
865
|
}
|
|
@@ -1090,14 +1095,18 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1090
1095
|
if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
|
|
1091
1096
|
this._selectedOrderProduct = null
|
|
1092
1097
|
|
|
1093
|
-
if (
|
|
1094
|
-
if (
|
|
1095
|
-
this.
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
} else
|
|
1099
|
-
|
|
1098
|
+
if (foundOrderProducts?.length > 1) {
|
|
1099
|
+
if (this._isRequireSerialNumberScanningInbound) {
|
|
1100
|
+
if (!this._selectedOrderProduct) {
|
|
1101
|
+
return foundOrderProducts
|
|
1102
|
+
}
|
|
1103
|
+
} else {
|
|
1104
|
+
return foundOrderProducts
|
|
1100
1105
|
}
|
|
1106
|
+
} else if (foundOrderProducts?.length == 1) {
|
|
1107
|
+
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1108
|
+
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1109
|
+
this._selectedOrderProduct = foundParentProducts[0]
|
|
1101
1110
|
}
|
|
1102
1111
|
}
|
|
1103
1112
|
} catch (e) {
|
|
@@ -1114,12 +1123,17 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1114
1123
|
this._selectedOrderProduct = e.detail
|
|
1115
1124
|
|
|
1116
1125
|
if (e.detail.product.isRequireSerialNumberScanningInbound) {
|
|
1126
|
+
this._isRequireSerialNumberScanningInbound = true
|
|
1127
|
+
if (!this.serialNumberInput.value) {
|
|
1128
|
+
this._focusOnSerialNumberInput()
|
|
1129
|
+
this._showToast(Error(i18next.t('text.serial_number_is_empty')))
|
|
1130
|
+
}
|
|
1117
1131
|
await this._scanSerialNumberUnload()
|
|
1118
1132
|
} else {
|
|
1119
1133
|
if (this._enableProductScanning && !this._enableInputQty) {
|
|
1120
1134
|
await this._scanProductUnload()
|
|
1121
1135
|
} else {
|
|
1122
|
-
this.
|
|
1136
|
+
await this._qtyUnload()
|
|
1123
1137
|
}
|
|
1124
1138
|
}
|
|
1125
1139
|
}}"
|
|
@@ -1182,7 +1196,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1182
1196
|
throw new Error(i18next.t('text.scan_product_barcode'))
|
|
1183
1197
|
}
|
|
1184
1198
|
|
|
1185
|
-
await this._checkedScannedProduct()
|
|
1199
|
+
let orderProducts = await this._checkedScannedProduct()
|
|
1186
1200
|
|
|
1187
1201
|
if (this._enableInputQty && !this._isRequireSerialNumberScanningInbound) {
|
|
1188
1202
|
if (!parseInt(this.actualQtyInput.value)) {
|
|
@@ -1195,9 +1209,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1195
1209
|
throw new Error(i18next.t('text.qty_should_be_positive'))
|
|
1196
1210
|
}
|
|
1197
1211
|
} else if (this._isRequireSerialNumberScanningInbound) {
|
|
1198
|
-
if (
|
|
1199
|
-
this.
|
|
1200
|
-
|
|
1212
|
+
if (this.serialNumberInput) {
|
|
1213
|
+
if (!this.serialNumberInput.value) {
|
|
1214
|
+
this._focusOnSerialNumberInput()
|
|
1215
|
+
throw new Error(i18next.t('text.enter_serial_number'))
|
|
1216
|
+
}
|
|
1201
1217
|
}
|
|
1202
1218
|
}
|
|
1203
1219
|
|
|
@@ -1207,6 +1223,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1207
1223
|
throw new Error(i18next.t('text.expiry_date_is_empty'))
|
|
1208
1224
|
}
|
|
1209
1225
|
}
|
|
1226
|
+
|
|
1227
|
+
if (orderProducts?.length > 1) {
|
|
1228
|
+
return orderProducts
|
|
1229
|
+
}
|
|
1210
1230
|
}
|
|
1211
1231
|
}
|
|
1212
1232
|
|
|
@@ -514,7 +514,6 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
514
514
|
{ header: i18next.t('field.location'), key: 'location_name', width: 25, type: 'string' },
|
|
515
515
|
{ header: i18next.t('field.remark'), key: 'remark', width: 40, type: 'string' },
|
|
516
516
|
{ header: i18next.t('field.exp_date'), key: 'expirationDate', width: 30, type: 'date' },
|
|
517
|
-
{ header: i18next.t('field.batch_id'), key: 'batchId', width: 30, type: 'string' },
|
|
518
517
|
{ header: i18next.t('field.batch_no_ref'), key: 'batchIdRef', width: 50, type: 'string' },
|
|
519
518
|
{ header: i18next.t('field.volume_m3'), key: 'volume', width: 25, type: 'float' },
|
|
520
519
|
{ header: i18next.t('field.unit_cost'), key: 'unitCost', width: 25, type: 'float' }
|