@things-factory/operato-wms 4.3.219 → 4.3.221
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.
|
@@ -18,7 +18,7 @@ import { CommonButtonStyles } from '@things-factory/styles'
|
|
|
18
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
19
19
|
|
|
20
20
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
21
|
-
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN, WORKSHEET_STATUS
|
|
21
|
+
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, REPLENISHMENT, WAREHOUSE_RETURN, WORKSHEET_STATUS } from '../constants'
|
|
22
22
|
|
|
23
23
|
const OPERATION_TYPE = {
|
|
24
24
|
PUTAWAY: 'putaway',
|
|
@@ -862,6 +862,15 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
862
862
|
if (this._scanning === false) {
|
|
863
863
|
this._scanning = true
|
|
864
864
|
this.grist.showSpinner()
|
|
865
|
+
|
|
866
|
+
const patches = {
|
|
867
|
+
arrivalNoticeNo: this._orderNo,
|
|
868
|
+
worksheetDetailName: this._selectedOrderProduct?.name || this._selectedOrderProduct.map(itm => itm.name),
|
|
869
|
+
palletId: this._enableCartonLabel ? null : this.getInput(this.palletInput).value,
|
|
870
|
+
cartonId: this._enableCartonLabel ? this.getInput(this.cartonInput).value : null,
|
|
871
|
+
toLocation: this.locationInput ? this.locationInput.value : this._selectedLocation
|
|
872
|
+
}
|
|
873
|
+
|
|
865
874
|
try {
|
|
866
875
|
const response = await client.mutate({
|
|
867
876
|
mutation: gql`
|
|
@@ -915,13 +924,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
915
924
|
}
|
|
916
925
|
}
|
|
917
926
|
`,
|
|
918
|
-
variables:
|
|
919
|
-
arrivalNoticeNo: this._orderNo,
|
|
920
|
-
worksheetDetailName: this._selectedOrderProduct.name,
|
|
921
|
-
palletId: this._enableCartonLabel ? null : this.getInput(this.palletInput).value,
|
|
922
|
-
cartonId: this._enableCartonLabel ? this.getInput(this.cartonInput).value : null,
|
|
923
|
-
toLocation: this.locationInput ? this.locationInput.value : this._selectedLocation
|
|
924
|
-
}
|
|
927
|
+
variables: patches
|
|
925
928
|
})
|
|
926
929
|
|
|
927
930
|
if (!response.errors) {
|
|
@@ -1178,9 +1181,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1178
1181
|
async _getWorksheetDetailNames(locationDetails) {
|
|
1179
1182
|
let worksheetDetailNames = []
|
|
1180
1183
|
if (this._enableCartonLabel) {
|
|
1181
|
-
this._records
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
+
this._records
|
|
1185
|
+
.filter(record => record.cartonId === this.getInput(this.cartonInput).value && record.status !== 'DONE')
|
|
1186
|
+
.forEach(itm => {
|
|
1187
|
+
worksheetDetailNames.push(itm.name)
|
|
1188
|
+
})
|
|
1184
1189
|
if (this._records.find(itm => itm.expirationDate) && locationDetails) {
|
|
1185
1190
|
let answer = await this._checkExpiry(this._records, locationDetails.type)
|
|
1186
1191
|
if (answer) {
|
|
@@ -1212,7 +1217,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1212
1217
|
name: record.name,
|
|
1213
1218
|
expirationDate: record.expirationDate,
|
|
1214
1219
|
expirationPeriod: record.product.expirationPeriod,
|
|
1215
|
-
palletId: record.palletId
|
|
1220
|
+
palletId: record.palletId,
|
|
1221
|
+
cartonId: record.cartonId
|
|
1216
1222
|
}
|
|
1217
1223
|
})
|
|
1218
1224
|
}
|
|
@@ -1236,6 +1242,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1236
1242
|
record => record.cartonId === scannedCartonId && record.completed === false
|
|
1237
1243
|
)}"
|
|
1238
1244
|
@selections="${e => {
|
|
1245
|
+
this._selectedOrderProduct = e.detail
|
|
1239
1246
|
this._records = e.detail
|
|
1240
1247
|
e.keyCode = 13
|
|
1241
1248
|
this._transactionHandler(e)
|
|
@@ -1252,16 +1259,22 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1252
1259
|
|
|
1253
1260
|
async _validatePutaway() {
|
|
1254
1261
|
if (this._enableCartonLabel) {
|
|
1262
|
+
let cartonInputValue = this.getInput(this.cartonInput).value
|
|
1263
|
+
|
|
1255
1264
|
// 2. carton id existing
|
|
1256
|
-
if (!
|
|
1265
|
+
if (!cartonInputValue) {
|
|
1257
1266
|
this._focusOnCartonInput()
|
|
1258
1267
|
throw new Error(i18next.t('text.carton_id_is_empty'))
|
|
1259
1268
|
}
|
|
1260
1269
|
|
|
1261
|
-
if (!this.data.records.map(record => record.cartonId).includes(
|
|
1270
|
+
if (!this.data.records.map(record => record.cartonId).includes(cartonInputValue)) {
|
|
1262
1271
|
this.getInput(this.cartonInput).value = ''
|
|
1263
1272
|
this._focusOnCartonInput()
|
|
1264
1273
|
throw new Error(i18next.t('text.unable_to_find_matching_x', { state: { x: i18next.t('label.carton') } }))
|
|
1274
|
+
} else {
|
|
1275
|
+
this._selectedOrderProduct = [
|
|
1276
|
+
this.data.records.find(x => x.cartonId == cartonInputValue && x.status !== 'DONE')
|
|
1277
|
+
]
|
|
1265
1278
|
}
|
|
1266
1279
|
} else {
|
|
1267
1280
|
let palletInputValue = this.getInput(this.palletInput).value
|
|
@@ -161,11 +161,12 @@ class PutawaySameCartonPopup extends connect(store)(localize(i18next)(LitElement
|
|
|
161
161
|
async _selectPutawayInventories() {
|
|
162
162
|
try {
|
|
163
163
|
let selectedInventories = []
|
|
164
|
-
selectedInventories = this.dataGrist.selected.map(({ name, expirationDate, expirationPeriod, palletId }) => ({
|
|
164
|
+
selectedInventories = this.dataGrist.selected.map(({ name, expirationDate, expirationPeriod, palletId, cartonId }) => ({
|
|
165
165
|
name,
|
|
166
166
|
expirationDate,
|
|
167
167
|
expirationPeriod,
|
|
168
|
-
palletId
|
|
168
|
+
palletId,
|
|
169
|
+
cartonId
|
|
169
170
|
}))
|
|
170
171
|
if (!selectedInventories?.length) throw new Error(i18next.t('text.select_at_least_one_inventory_to_putaway'))
|
|
171
172
|
|
|
@@ -1034,7 +1034,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1034
1034
|
return this._scanSerialNumberUnload()
|
|
1035
1035
|
} else {
|
|
1036
1036
|
if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
|
|
1037
|
-
return this._qtyUnload()
|
|
1037
|
+
return await this._qtyUnload()
|
|
1038
1038
|
}
|
|
1039
1039
|
this._scanProductUnload()
|
|
1040
1040
|
}
|
|
@@ -1192,56 +1192,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1192
1192
|
id
|
|
1193
1193
|
name
|
|
1194
1194
|
}
|
|
1195
|
-
bizplaceName
|
|
1196
|
-
partnerDomainId
|
|
1197
|
-
customerCompanyDomainId
|
|
1198
|
-
containerNo
|
|
1199
|
-
refNo
|
|
1200
|
-
refNo2
|
|
1201
|
-
refNo3
|
|
1202
|
-
looseItem
|
|
1203
|
-
bufferLocation
|
|
1204
|
-
startedAt
|
|
1205
|
-
orderVas {
|
|
1206
|
-
targetVas {
|
|
1207
|
-
id
|
|
1208
|
-
name
|
|
1209
|
-
vas {
|
|
1210
|
-
id
|
|
1211
|
-
name
|
|
1212
|
-
description
|
|
1213
|
-
type
|
|
1214
|
-
}
|
|
1215
|
-
qty
|
|
1216
|
-
remark
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
worksheetDetailInfos {
|
|
1221
|
-
id
|
|
1222
|
-
batchId
|
|
1223
|
-
batchIdRef
|
|
1224
|
-
product {
|
|
1225
|
-
id
|
|
1226
|
-
sku
|
|
1227
|
-
name
|
|
1228
|
-
description
|
|
1229
|
-
isRequiredCheckExpiry
|
|
1230
|
-
isRequireSerialNumberScanningInbound
|
|
1231
|
-
expirationPeriod
|
|
1232
|
-
}
|
|
1233
|
-
name
|
|
1234
|
-
targetName
|
|
1235
|
-
description
|
|
1236
|
-
packingSize
|
|
1237
|
-
packingType
|
|
1238
|
-
palletQty
|
|
1239
|
-
actualPalletQty
|
|
1240
|
-
packQty
|
|
1241
|
-
actualPackQty
|
|
1242
|
-
issue
|
|
1243
|
-
manufactureDate
|
|
1244
|
-
remark
|
|
1245
1195
|
}
|
|
1246
1196
|
}
|
|
1247
1197
|
}
|
|
@@ -1260,7 +1210,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1260
1210
|
}
|
|
1261
1211
|
})
|
|
1262
1212
|
if (!response.errors) {
|
|
1263
|
-
await this._fetchProducts(this._orderNo
|
|
1213
|
+
await this._fetchProducts(this._orderNo)
|
|
1264
1214
|
}
|
|
1265
1215
|
} catch (e) {
|
|
1266
1216
|
this._showToast(e)
|
|
@@ -1719,7 +1669,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1719
1669
|
await this._checkedLotScannedProduct()
|
|
1720
1670
|
|
|
1721
1671
|
if (this._isRequireSerialNumberScanningInbound) return this._scanSerialNumberUnload()
|
|
1722
|
-
this._qtyUnload()
|
|
1672
|
+
await this._qtyUnload()
|
|
1723
1673
|
} catch (e) {
|
|
1724
1674
|
this._showToast(e)
|
|
1725
1675
|
}
|
|
@@ -356,6 +356,11 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
356
356
|
gtin
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
+
productDetail {
|
|
360
|
+
productBarcodes {
|
|
361
|
+
gtin
|
|
362
|
+
}
|
|
363
|
+
}
|
|
359
364
|
}
|
|
360
365
|
}
|
|
361
366
|
orderProducts {
|
|
@@ -378,6 +383,11 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
378
383
|
gtin
|
|
379
384
|
}
|
|
380
385
|
}
|
|
386
|
+
productDetail {
|
|
387
|
+
productBarcodes {
|
|
388
|
+
gtin
|
|
389
|
+
}
|
|
390
|
+
}
|
|
381
391
|
}
|
|
382
392
|
bizplace {
|
|
383
393
|
id
|
|
@@ -401,6 +411,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
401
411
|
.map(oi => {
|
|
402
412
|
const inventory = oi.inventory
|
|
403
413
|
const product = inventory.product
|
|
414
|
+
const productDetail = inventory.productDetail
|
|
404
415
|
const record = {
|
|
405
416
|
batchId: inventory.batchId,
|
|
406
417
|
palletId: inventory.palletId,
|
|
@@ -418,11 +429,11 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
418
429
|
bizplaceId: arrivalNotice.bizplace.id
|
|
419
430
|
}
|
|
420
431
|
|
|
421
|
-
if (
|
|
422
|
-
return
|
|
432
|
+
if (productDetail.productBarcodes && productDetail.productBarcodes.length) {
|
|
433
|
+
return productDetail.productBarcodes.map(productBarcode => {
|
|
423
434
|
return {
|
|
424
435
|
...record,
|
|
425
|
-
gtin:
|
|
436
|
+
gtin: productBarcode.gtin,
|
|
426
437
|
productName: product.name
|
|
427
438
|
}
|
|
428
439
|
})
|
|
@@ -442,6 +453,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
442
453
|
records: orderProducts
|
|
443
454
|
.map(op => {
|
|
444
455
|
const product = op.product
|
|
456
|
+
const productDetail = op.productDetail
|
|
445
457
|
const record = {
|
|
446
458
|
batchId: op.batchId,
|
|
447
459
|
palletId: '[N/A]',
|
|
@@ -461,11 +473,11 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
|
|
|
461
473
|
bizplaceName: arrivalNotice.bizplace.name
|
|
462
474
|
}
|
|
463
475
|
|
|
464
|
-
if (
|
|
465
|
-
return
|
|
476
|
+
if (productDetail.productBarcodes && productDetail.productBarcodes.length) {
|
|
477
|
+
return productDetail.productBarcodes.map(productBarcode => {
|
|
466
478
|
return {
|
|
467
479
|
...record,
|
|
468
|
-
gtin:
|
|
480
|
+
gtin: productBarcode.gtin,
|
|
469
481
|
productName: product.name
|
|
470
482
|
}
|
|
471
483
|
})
|
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.221",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.179",
|
|
92
92
|
"@things-factory/product-base": "^4.3.204",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.179",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.221",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.159",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.159",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.159",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.179",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.179",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.179",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.221",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.221"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.179",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "fbc150a886cba84b6ba5998cb6445a94c9af2425"
|
|
121
121
|
}
|