@things-factory/operato-wms 4.3.48 → 4.3.49
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.
|
@@ -63,7 +63,8 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
63
63
|
_currentSerialNumber: String,
|
|
64
64
|
adjustmentType: String,
|
|
65
65
|
enableRemove: Boolean,
|
|
66
|
-
enableUpdateBtn: Boolean
|
|
66
|
+
enableUpdateBtn: Boolean,
|
|
67
|
+
checkDuplicate: Boolean
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -85,6 +86,7 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
85
86
|
super()
|
|
86
87
|
this.enableRemove = true
|
|
87
88
|
this.enableUpdateBtn = true
|
|
89
|
+
this.checkDuplicate = false
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
render() {
|
|
@@ -214,7 +216,7 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
214
216
|
this._selectedInventoryItem = record
|
|
215
217
|
this.createInventoryItemChange(INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value)
|
|
216
218
|
|
|
217
|
-
this.data.total -= 1
|
|
219
|
+
this.checkDuplicate === false ? this.data.total -= 1 : ''
|
|
218
220
|
}
|
|
219
221
|
|
|
220
222
|
this.clearView()
|
|
@@ -260,6 +262,7 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
260
262
|
this._selectedInventoryItem = null
|
|
261
263
|
if (this.serialNumberInput) this.serialNumberInput.value = ''
|
|
262
264
|
this._currentSerialNumber = ''
|
|
265
|
+
this._checkDuplicated = false
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
async fetchInventoryItems() {
|
|
@@ -312,11 +315,13 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
312
315
|
|
|
313
316
|
if (this.inventory?.inventoryItemChanges) {
|
|
314
317
|
let existingInventoryItemChanges = JSON.parse(this.inventory.inventoryItemChanges)
|
|
315
|
-
records.push(...existingInventoryItemChanges)
|
|
316
318
|
|
|
317
|
-
|
|
319
|
+
records.push(...existingInventoryItemChanges)
|
|
320
|
+
|
|
321
|
+
total = records.length
|
|
318
322
|
}
|
|
319
323
|
|
|
324
|
+
|
|
320
325
|
this.data = {
|
|
321
326
|
total,
|
|
322
327
|
records
|
|
@@ -396,6 +401,15 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
396
401
|
}
|
|
397
402
|
}
|
|
398
403
|
|
|
404
|
+
const duplicated = this.data.records.findIndex((res)=>res.transactionType == 'CHANGES' && res.type == 'REMOVED' && (res.serialNumber == inventoryItemChange.serialNumber))
|
|
405
|
+
|
|
406
|
+
if(duplicated > 0){
|
|
407
|
+
this.checkDuplicate = true
|
|
408
|
+
throw new Error(i18next.t('text.duplicated_romoval_on_same_sn'))
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
this.checkDuplicate = false
|
|
412
|
+
|
|
399
413
|
if (type == INVENTORY_ITEM_CHANGE_TYPE.NEW.value) this.data.total += 1
|
|
400
414
|
this.data = {
|
|
401
415
|
...this.data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.49",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@things-factory/print-ui": "^4.3.47",
|
|
94
94
|
"@things-factory/product-base": "^4.3.47",
|
|
95
95
|
"@things-factory/resource-ui": "^4.3.47",
|
|
96
|
-
"@things-factory/sales-ui": "^4.3.
|
|
96
|
+
"@things-factory/sales-ui": "^4.3.49",
|
|
97
97
|
"@things-factory/scene-data-transform": "^4.3.47",
|
|
98
98
|
"@things-factory/scene-excel": "^4.3.47",
|
|
99
99
|
"@things-factory/scene-firebase": "^4.3.47",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"@things-factory/system-ui": "^4.3.47",
|
|
110
110
|
"@things-factory/transport-base": "^4.3.47",
|
|
111
111
|
"@things-factory/tutorial-ui": "^4.3.47",
|
|
112
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
113
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
112
|
+
"@things-factory/warehouse-base": "^4.3.49",
|
|
113
|
+
"@things-factory/worksheet-base": "^4.3.49"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@things-factory/builder": "^4.3.47",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"cypress-localstorage-commands": "^1.6.1",
|
|
120
120
|
"eslint-plugin-cypress": "^2.12.1"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "92f35aea7d93a7b25fb8c669e638372ffadc7202"
|
|
123
123
|
}
|
package/translations/en.json
CHANGED
|
@@ -1152,6 +1152,7 @@
|
|
|
1152
1152
|
"text.driver_is_empty": "driver name is empty",
|
|
1153
1153
|
"text.driver_is_not_selected": "driver is not selected",
|
|
1154
1154
|
"text.duplicated_vas_on_same_batch": "duplicated vas on same batch",
|
|
1155
|
+
"text.duplicated_romoval_on_same_sn": "duplicated removal on same serial no",
|
|
1155
1156
|
"text.edit_add_order_product": "edit add order product",
|
|
1156
1157
|
"text.edited_batch_no_have_been_processed": "edited batch no have been processed",
|
|
1157
1158
|
"text.empty_product_barcode": "empty product barcode",
|