@things-factory/operato-wms 4.3.108 → 4.3.110
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 +15 -9
- package/client/pages/components/select-inventory-popup.js +1 -7
- package/client/pages/components/select-product-popup.js +2 -31
- package/client/pages/inbound/undo-putaway-popup.js +9 -5
- package/client/pages/inbound/undo-unload-popup.js +2 -15
- package/client/pages/inbound/unload-product.js +67 -72
- package/client/pages/inventory/inventory-adjustment-approval.js +5 -4
- package/client/pages/inventory/inventory-adjustment.js +2 -9
- package/client/pages/inventory/inventory-by-product-detail.js +13 -13
- package/client/pages/inventory-check/check-inventory-popup.js +3 -14
- package/client/pages/inventory-check/create-cycle-count.js +3 -2
- package/client/pages/inventory-check/inspecting-product.js +7 -25
- package/client/pages/inventory-check/inventory-check-list.js +10 -94
- package/client/pages/manifest/loading-manifest-detail.js +4 -7
- package/client/pages/master/generate-location-list.js +22 -30
- package/client/pages/master/location-list.js +71 -134
- package/client/pages/master/pallet-list.js +58 -137
- package/client/pages/master/product/product-details-popup.js +3 -3
- package/client/pages/master/tote-list.js +27 -40
- package/client/pages/master/transport-driver.js +41 -50
- package/client/pages/master/transport-vehicle.js +41 -45
- package/client/pages/master/warehouse-list.js +34 -56
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +25 -36
- package/client/pages/order/arrival-notice/create-arrival-notice.js +32 -53
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +0 -2
- package/client/pages/order/arrival-notice/edit-product-popup.js +7 -9
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +4 -79
- package/client/pages/order/release-order/create-release-order.js +5 -22
- package/client/pages/order/release-order/release-extra-product-popup.js +1 -4
- package/client/pages/order/release-order/release-order-detail.js +0 -24
- package/client/pages/order/return-order/create-return-order.js +0 -5
- package/client/pages/order/return-order/return-order-inventory-popup.js +0 -1
- package/client/pages/order/transport-order/delivery-order-list.js +0 -26
- package/client/pages/outbound/inventory-reassign-popup.js +0 -6
- package/client/pages/outbound/packing-product.js +5 -5
- package/client/pages/outbound/packing-worksheet-list.js +1 -3
- package/client/pages/outbound/picking-product.js +7 -18
- package/client/pages/outbound/show-my-worksheet-list-popup.js +3 -12
- package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +2 -5
- package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +8 -48
- package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +4 -42
- package/client/pages/vas/print-product-label.js +11 -13
- package/config.development.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +5 -6
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/other/add-release-good-products.js +11 -7
- package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/costing-report.js +24 -18
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +6 -5
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
- package/package.json +50 -50
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +5 -6
- package/server/graphql/resolvers/other/add-release-good-products.ts +12 -8
- package/server/graphql/resolvers/reports/costing-report.ts +24 -18
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -5
- package/server/graphql/resolvers/reports/release-inventory-report.ts +4 -6
- package/translations/en.json +13 -43
- package/translations/ko.json +11 -33
- package/translations/ms.json +11 -33
- package/translations/zh.json +4 -26
|
@@ -404,11 +404,8 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
404
404
|
html`
|
|
405
405
|
<validate-gan-popup
|
|
406
406
|
.records=${records.map(raw => {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
let etaDate = new Date(String(raw.etaDate || ''))
|
|
411
|
-
let mfgDate = new Date(String(raw.manufactureDate || ''))
|
|
407
|
+
let etaDate = new Date((raw.etaDate - (25567 + 1)) * 86400 * 1000 || null)
|
|
408
|
+
let mfgDate = new Date((raw.manufactureDate - (25567 + 1)) * 86400 * 1000 || null)
|
|
412
409
|
|
|
413
410
|
return {
|
|
414
411
|
refNo: String(raw.refNo || ''),
|
|
@@ -429,8 +426,14 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
429
426
|
packQty: parseInt(raw.packQty || 0),
|
|
430
427
|
palletQty: parseInt(raw.palletQty || 0),
|
|
431
428
|
unitPrice: Number(raw.unitPrice || 0),
|
|
432
|
-
manufactureDate:
|
|
433
|
-
|
|
429
|
+
manufactureDate: `${mfgDate.getFullYear()}-${(mfgDate.getMonth() + 1).toString().padStart(2, 0)}-${mfgDate
|
|
430
|
+
.getDate()
|
|
431
|
+
.toString()
|
|
432
|
+
.padStart(2, 0)}`,
|
|
433
|
+
etaDate: `${etaDate.getFullYear()}-${(etaDate.getMonth() + 1).toString().padStart(2, 0)}-${etaDate
|
|
434
|
+
.getDate()
|
|
435
|
+
.toString()
|
|
436
|
+
.padStart(2, 0)}`
|
|
434
437
|
}
|
|
435
438
|
})}
|
|
436
439
|
.ganProcessing=${this.ganProcessingSetting}
|
|
@@ -474,11 +477,14 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
474
477
|
country: String(record.country || ''),
|
|
475
478
|
sku: String(record.sku || ''),
|
|
476
479
|
productId: String(record.productId || ''),
|
|
477
|
-
productDetailId: String(record.productDetailId || ''),
|
|
478
480
|
packingType: record.packingType && record.packingType != '' ? String(record.packingType) : null,
|
|
479
481
|
packingSize: !isNaN(Number(record.packingSize || 'x')) ? Number(record.packingSize) : null,
|
|
480
482
|
uom: record.uom && record.uom != '' ? String(record.uom) : null,
|
|
481
|
-
releaseQty:
|
|
483
|
+
releaseQty: Number(record.releaseQty)
|
|
484
|
+
? Math.floor(Number(record.releaseQty)) < 1
|
|
485
|
+
? 1
|
|
486
|
+
: Math.floor(Number(record.releaseQty))
|
|
487
|
+
: null,
|
|
482
488
|
postalCode: String(record.postalCode || ''),
|
|
483
489
|
phone1: String(record.phone1 || ''),
|
|
484
490
|
exportOption: false,
|
|
@@ -446,7 +446,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
446
446
|
items {
|
|
447
447
|
id
|
|
448
448
|
productId
|
|
449
|
-
productDetailId
|
|
450
449
|
batchId
|
|
451
450
|
batchIdRef
|
|
452
451
|
groupType
|
|
@@ -494,7 +493,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
494
493
|
palletId
|
|
495
494
|
cartonId
|
|
496
495
|
productId
|
|
497
|
-
productDetailId
|
|
498
496
|
productSKU
|
|
499
497
|
productName
|
|
500
498
|
productBrand
|
|
@@ -542,6 +540,7 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
542
540
|
this.dispatchEvent(
|
|
543
541
|
new CustomEvent('selected', {
|
|
544
542
|
detail: {
|
|
543
|
+
productDetailId: selectedProduct.id,
|
|
545
544
|
packingType: selectedProduct.packingType,
|
|
546
545
|
uom: selectedProduct.uom,
|
|
547
546
|
uomValue: selectedProduct.uomValue,
|
|
@@ -556,9 +555,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
556
555
|
packingSize: selectedProduct.packingSize,
|
|
557
556
|
primaryUnit: selectedProduct.uom,
|
|
558
557
|
primaryValue: selectedProduct.uomValue
|
|
559
|
-
},
|
|
560
|
-
productDetail: {
|
|
561
|
-
id: selectedProduct.productDetailId
|
|
562
558
|
}
|
|
563
559
|
}
|
|
564
560
|
})
|
|
@@ -586,7 +582,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
586
582
|
remainQty: itm.remainQty,
|
|
587
583
|
remainUomValueWithUom: itm.remainUomValueWithUom,
|
|
588
584
|
productId: itm.productId,
|
|
589
|
-
productDetailId: itm.productDetailId,
|
|
590
585
|
remainUomValue: itm.remainUomValue,
|
|
591
586
|
batchId: itm.batchId,
|
|
592
587
|
batchIdRef: itm.batchIdRef,
|
|
@@ -608,7 +603,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
608
603
|
remainQty: itm.remainQty,
|
|
609
604
|
remainUomValueWithUom: itm.remainUomValueWithUom,
|
|
610
605
|
productId: itm.productId,
|
|
611
|
-
productDetailId: itm.productDetailId,
|
|
612
606
|
remainUomValue: itm.remainUomValue,
|
|
613
607
|
batchId: itm.batchId,
|
|
614
608
|
batchIdRef: itm.batchIdRef,
|
|
@@ -121,8 +121,7 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
|
|
|
121
121
|
pagination: { pages: [10, 20, 50, 100] },
|
|
122
122
|
rows: {
|
|
123
123
|
appendable: false,
|
|
124
|
-
selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
|
|
125
|
-
handlers: { dblclick: this._dblClickHandler.bind(this) }
|
|
124
|
+
selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
|
|
126
125
|
},
|
|
127
126
|
columns: [
|
|
128
127
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -230,7 +229,6 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
|
|
|
230
229
|
response.data.productDetails.items.map(item => {
|
|
231
230
|
return {
|
|
232
231
|
...item,
|
|
233
|
-
productName: item.product.name,
|
|
234
232
|
productId: item.product.id,
|
|
235
233
|
sku: item.product.sku,
|
|
236
234
|
brand: item.product.brand,
|
|
@@ -242,34 +240,7 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
|
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
242
|
|
|
245
|
-
|
|
246
|
-
if (this.selectMultipleProducts) return
|
|
247
|
-
this.dispatchEvent(
|
|
248
|
-
new CustomEvent('selected', {
|
|
249
|
-
detail: {
|
|
250
|
-
productDetailId: record.id,
|
|
251
|
-
packingType: record.packingType,
|
|
252
|
-
uom: record.uom,
|
|
253
|
-
uomValue: record.uomValue,
|
|
254
|
-
productName: `${record.name}(${record.description}(${record.sku}))`,
|
|
255
|
-
isError: false,
|
|
256
|
-
productBrand: record.brand,
|
|
257
|
-
product: {
|
|
258
|
-
id: record.productId,
|
|
259
|
-
name: record.name,
|
|
260
|
-
sku: record.sku,
|
|
261
|
-
packingType: record.packingType,
|
|
262
|
-
packingSize: record.packingSize,
|
|
263
|
-
primaryUnit: record.uom,
|
|
264
|
-
primaryValue: record.uomValue
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
})
|
|
268
|
-
)
|
|
269
|
-
history.back()
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
selectProduct(record) {
|
|
243
|
+
selectProduct() {
|
|
273
244
|
if (this.selectMultipleProducts !== true) {
|
|
274
245
|
const selectedProduct = this.productGrist.selected[0]
|
|
275
246
|
if (selectedProduct) {
|
|
@@ -202,8 +202,11 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
202
202
|
async _undoPutaway() {
|
|
203
203
|
try {
|
|
204
204
|
let selectedInventories = []
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
if (this._autoSelectInventory?.length) {
|
|
206
|
+
selectedInventories = this._autoSelectInventory
|
|
207
|
+
} else {
|
|
208
|
+
selectedInventories = this.dataGrist.selected
|
|
209
|
+
}
|
|
207
210
|
if (!selectedInventories?.length) throw new Error(i18next.t('text.select_at_least_one_inventory_to_undo'))
|
|
208
211
|
|
|
209
212
|
this._validateScanInventory()
|
|
@@ -247,11 +250,12 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
247
250
|
this.lotInput.value = ''
|
|
248
251
|
}
|
|
249
252
|
this._showToast({ message: i18next.t('text.no_matching_putaway_inventory_found') })
|
|
253
|
+
} else if (targetedUndoInventories?.length == 1) {
|
|
254
|
+
this.data = { records: targetedUndoInventories }
|
|
255
|
+
this._autoSelectInventory = targetedUndoInventories
|
|
256
|
+
this._undoPutaway()
|
|
250
257
|
} else {
|
|
251
258
|
this.data = { records: targetedUndoInventories }
|
|
252
|
-
if (targetedUndoInventories?.length == 1) {
|
|
253
|
-
this.data.records[0].__selected__ = true
|
|
254
|
-
}
|
|
255
259
|
}
|
|
256
260
|
}
|
|
257
261
|
}
|
|
@@ -6,7 +6,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
6
6
|
|
|
7
7
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
-
import { client, store
|
|
9
|
+
import { client, store } from '@things-factory/shell'
|
|
10
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
11
11
|
|
|
12
12
|
class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
@@ -214,16 +214,6 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
214
214
|
|
|
215
215
|
async _undoUnloading() {
|
|
216
216
|
try {
|
|
217
|
-
if (this.dataGrist.selected.some(s => s.inventoryItems?.length > 0)) {
|
|
218
|
-
const result = await CustomAlert({
|
|
219
|
-
title: i18next.t('title.are_you_sure'),
|
|
220
|
-
text: i18next.t('text.all_related_serial_number_will_be_deleted'),
|
|
221
|
-
confirmButton: { text: i18next.t('button.confirm') },
|
|
222
|
-
cancelButton: { text: i18next.t('button.cancel') }
|
|
223
|
-
})
|
|
224
|
-
|
|
225
|
-
if (!result.value) return
|
|
226
|
-
}
|
|
227
217
|
let selectedInventoryIds = []
|
|
228
218
|
selectedInventoryIds = this.dataGrist.selected.map(inventory => inventory.id)
|
|
229
219
|
|
|
@@ -277,10 +267,7 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
277
267
|
return { ...itm, sku: itm.product.sku }
|
|
278
268
|
})
|
|
279
269
|
}
|
|
280
|
-
|
|
281
|
-
this._selectedRecords = targetedUndoInventories
|
|
282
|
-
this.data.records[0].__selected__ = true
|
|
283
|
-
}
|
|
270
|
+
this._selectedRecords = targetedUndoInventories?.length == 1 ? targetedUndoInventories : []
|
|
284
271
|
}
|
|
285
272
|
} catch (e) {
|
|
286
273
|
this._showToast(e)
|
|
@@ -576,7 +576,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
576
576
|
description
|
|
577
577
|
isRequiredCheckExpiry
|
|
578
578
|
isRequireSerialNumberScanningInbound
|
|
579
|
-
expirationPeriod
|
|
580
579
|
}
|
|
581
580
|
name
|
|
582
581
|
targetName
|
|
@@ -700,7 +699,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
700
699
|
sku
|
|
701
700
|
isRequiredCheckExpiry
|
|
702
701
|
isRequireSerialNumberScanningInbound
|
|
703
|
-
expirationPeriod
|
|
704
702
|
}
|
|
705
703
|
inventory {
|
|
706
704
|
id
|
|
@@ -727,7 +725,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
727
725
|
this._orderNo = orderNo
|
|
728
726
|
const worksheetInfo = response.data.unloadingReturnWorksheet.worksheetInfo
|
|
729
727
|
this._worksheetInfo = worksheetInfo
|
|
730
|
-
this._bizplaceName = worksheetInfo?.bizplaceName
|
|
731
728
|
|
|
732
729
|
this.orderProductData = {
|
|
733
730
|
records: orderBy(
|
|
@@ -787,9 +784,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
787
784
|
id
|
|
788
785
|
name
|
|
789
786
|
}
|
|
790
|
-
inventoryItems {
|
|
791
|
-
serialNumber
|
|
792
|
-
}
|
|
793
787
|
}
|
|
794
788
|
}
|
|
795
789
|
`,
|
|
@@ -873,19 +867,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
873
867
|
try {
|
|
874
868
|
if (!this._enableCartonLabel) return this._unloadSelected()
|
|
875
869
|
let orderProducts = await this._validateUnloading()
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
870
|
+
if (orderProducts?.length > 1) {
|
|
871
|
+
this.selectOrderProduct(orderProducts)
|
|
872
|
+
} else {
|
|
873
|
+
if (this._isRequireSerialNumberScanningInbound) {
|
|
874
|
+
return this._scanSerialNumberUnload()
|
|
880
875
|
} else {
|
|
881
|
-
if (this.
|
|
882
|
-
return this.
|
|
883
|
-
} else {
|
|
884
|
-
if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
|
|
885
|
-
return this._qtyUnload()
|
|
886
|
-
}
|
|
887
|
-
this._scanProductUnload()
|
|
876
|
+
if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
|
|
877
|
+
return this._qtyUnload()
|
|
888
878
|
}
|
|
879
|
+
this._scanProductUnload()
|
|
889
880
|
}
|
|
890
881
|
} catch (e) {
|
|
891
882
|
this._showToast(e)
|
|
@@ -1117,72 +1108,74 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1117
1108
|
}
|
|
1118
1109
|
|
|
1119
1110
|
async _checkedScannedProduct() {
|
|
1120
|
-
|
|
1121
|
-
|
|
1111
|
+
try {
|
|
1112
|
+
//fetch any product details that has entered gtin
|
|
1113
|
+
const response = await this.fetchProductDetails(this.productBarcodeInput?.value || '', '')
|
|
1122
1114
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1115
|
+
if (!response.errors) {
|
|
1116
|
+
let orderProductData = this.orderProductData.records
|
|
1117
|
+
let checkedProductDetails = response.data.checkGtin.items
|
|
1118
|
+
|
|
1119
|
+
//check from grist if any is matched
|
|
1120
|
+
const foundOrderProducts = orderProductData.filter(op => {
|
|
1121
|
+
return checkedProductDetails.some(
|
|
1122
|
+
itm =>
|
|
1123
|
+
itm.product.id == op.product.id && itm.packingType == op.packingType && itm.packingSize == op.packingSize
|
|
1124
|
+
)
|
|
1125
|
+
})
|
|
1134
1126
|
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1127
|
+
const foundParentProducts = orderProductData.filter(op => {
|
|
1128
|
+
return checkedProductDetails.some(itm => itm.product.id == op.product.id)
|
|
1129
|
+
})
|
|
1138
1130
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1131
|
+
if (!foundOrderProducts?.length) {
|
|
1132
|
+
if (!foundParentProducts?.length) {
|
|
1133
|
+
if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
|
|
1134
|
+
if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
|
|
1135
|
+
}
|
|
1144
1136
|
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1137
|
+
if (this._isRequireSerialNumberScanningInbound) {
|
|
1138
|
+
if (this.serialNumberInput?.value) this.serialNumberInput.value = ''
|
|
1139
|
+
}
|
|
1148
1140
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1141
|
+
this.productBarcodeInput.value = ''
|
|
1142
|
+
this._focusOnProductBarcodeInput()
|
|
1143
|
+
throw new Error(i18next.t('text.no_matching_product_found'))
|
|
1144
|
+
}
|
|
1152
1145
|
}
|
|
1153
|
-
}
|
|
1154
1146
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1147
|
+
const product =
|
|
1148
|
+
foundOrderProducts?.length >= 1
|
|
1149
|
+
? foundOrderProducts[0].product
|
|
1150
|
+
: foundOrderProducts?.length == 0 && foundParentProducts?.length > 0
|
|
1151
|
+
? foundParentProducts[0].product
|
|
1152
|
+
: null
|
|
1161
1153
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1154
|
+
if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
|
|
1155
|
+
this._selectedOrderProduct = null
|
|
1164
1156
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1157
|
+
if (foundOrderProducts?.length > 1) {
|
|
1158
|
+
if (this._isRequireSerialNumberScanningInbound) {
|
|
1159
|
+
if (!this._selectedOrderProduct) {
|
|
1160
|
+
return foundOrderProducts
|
|
1161
|
+
}
|
|
1162
|
+
} else {
|
|
1168
1163
|
return foundOrderProducts
|
|
1169
1164
|
}
|
|
1170
|
-
} else {
|
|
1171
|
-
|
|
1165
|
+
} else if (foundOrderProducts?.length == 1) {
|
|
1166
|
+
this._expirationPeriod = product.expirationPeriod
|
|
1167
|
+
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1168
|
+
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1169
|
+
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1170
|
+
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1171
|
+
this._expirationPeriod = product.expirationPeriod
|
|
1172
|
+
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1173
|
+
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1174
|
+
this._selectedOrderProduct = foundParentProducts[0]
|
|
1172
1175
|
}
|
|
1173
|
-
} else if (foundOrderProducts?.length == 1) {
|
|
1174
|
-
this._expirationPeriod = product.expirationPeriod
|
|
1175
|
-
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1176
|
-
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1177
|
-
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1178
|
-
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1179
|
-
this._expirationPeriod = product.expirationPeriod
|
|
1180
|
-
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1181
|
-
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1182
|
-
this._selectedOrderProduct = foundParentProducts[0]
|
|
1183
1176
|
}
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1177
|
+
} catch (e) {
|
|
1178
|
+
this._showToast(e)
|
|
1186
1179
|
}
|
|
1187
1180
|
}
|
|
1188
1181
|
|
|
@@ -1299,7 +1292,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1299
1292
|
}
|
|
1300
1293
|
}
|
|
1301
1294
|
|
|
1302
|
-
|
|
1295
|
+
if (orderProducts?.length > 1) {
|
|
1296
|
+
return orderProducts
|
|
1297
|
+
}
|
|
1303
1298
|
}
|
|
1304
1299
|
}
|
|
1305
1300
|
|
|
@@ -1498,7 +1493,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1498
1493
|
await this._validateUnloading()
|
|
1499
1494
|
await this._checkedLotScannedProduct()
|
|
1500
1495
|
|
|
1501
|
-
if (this._isRequireSerialNumberScanningInbound)
|
|
1496
|
+
if (this._isRequireSerialNumberScanningInbound) this._scanSerialNumberUnload()
|
|
1502
1497
|
this._qtyUnload()
|
|
1503
1498
|
} catch (e) {
|
|
1504
1499
|
this._showToast(e)
|
|
@@ -8,7 +8,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
8
8
|
|
|
9
9
|
import { getCodeByName } from '@things-factory/code-base'
|
|
10
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
|
-
import { client, PageView, store,
|
|
11
|
+
import { client, PageView, store,gqlContext } from '@things-factory/shell'
|
|
12
12
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
13
13
|
import { isMobileDevice } from '@things-factory/utils'
|
|
14
14
|
import { openPopup } from '@things-factory/layout-base'
|
|
@@ -142,7 +142,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
142
142
|
{ column: 'manufactureDate', name: 'Mfg. Date' },
|
|
143
143
|
{ column: 'unitCost', name: 'Unit Cost' },
|
|
144
144
|
{ column: 'inventoryItemChange', name: 'Inventory Item Changes' },
|
|
145
|
-
{ column: 'status', name: 'Status' }
|
|
145
|
+
{ column: 'status', name: 'Status' },
|
|
146
|
+
|
|
146
147
|
]
|
|
147
148
|
|
|
148
149
|
this.config = {
|
|
@@ -199,7 +200,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
199
200
|
|
|
200
201
|
if (item.column == 'status' && record.transactionType == 'MISSING') {
|
|
201
202
|
updatedVal = record.transactionType || '[N/A]'
|
|
202
|
-
}
|
|
203
|
+
}else if(item.column == 'status'){
|
|
203
204
|
updatedVal = '[N/A]'
|
|
204
205
|
}
|
|
205
206
|
|
|
@@ -691,4 +692,4 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
691
692
|
}
|
|
692
693
|
}
|
|
693
694
|
|
|
694
|
-
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|
|
695
|
+
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|
|
@@ -586,9 +586,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
586
586
|
isRequireSerialNumberScanningOutbound
|
|
587
587
|
isRequireSerialNumberScanningInbound
|
|
588
588
|
}
|
|
589
|
-
productDetail {
|
|
590
|
-
id
|
|
591
|
-
}
|
|
592
589
|
qty
|
|
593
590
|
lockedQty
|
|
594
591
|
warehouse {
|
|
@@ -657,9 +654,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
657
654
|
description
|
|
658
655
|
productInformation
|
|
659
656
|
}
|
|
660
|
-
productDetail {
|
|
661
|
-
id
|
|
662
|
-
}
|
|
663
657
|
qty
|
|
664
658
|
lockedQty
|
|
665
659
|
warehouse {
|
|
@@ -774,7 +768,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
774
768
|
}
|
|
775
769
|
break
|
|
776
770
|
case 'packingSize':
|
|
777
|
-
if (e.detail.after
|
|
771
|
+
if (e.detail.after < 0 || !Number.isInteger(e.detail.after)) {
|
|
778
772
|
item._data.records[e.detail.row].packingSize = e.detail.before
|
|
779
773
|
this.showToast({ level: 'error', message: i18next.t('text.invalid_packing_size') })
|
|
780
774
|
}
|
|
@@ -787,7 +781,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
787
781
|
break
|
|
788
782
|
case 'manufactureDate':
|
|
789
783
|
if (new Date(e.detail.after) > new Date()) {
|
|
790
|
-
|
|
784
|
+
item._data.records[e.detail.row].manufactureDate = e.detail.before
|
|
791
785
|
this.showToast({ message: i18next.t('text.invalid_manufacture_date') })
|
|
792
786
|
}
|
|
793
787
|
break
|
|
@@ -904,7 +898,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
904
898
|
|
|
905
899
|
row.bizplace = row.bizplace ? { id: row.bizplace.id } : undefined
|
|
906
900
|
row.location = row.location ? { id: row.location.id } : undefined
|
|
907
|
-
row.productDetailId = row.product ? row.product.id : undefined
|
|
908
901
|
row.product = row.product ? { id: row.product.productId } : undefined
|
|
909
902
|
row.uomValue = row.uomValue ? parseFloat(row.uomValue) : undefined
|
|
910
903
|
row.unitCost = row.unitCost ? parseFloat(row.unitCost) : undefined
|
|
@@ -82,19 +82,19 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
|
|
|
82
82
|
queryName: 'locations',
|
|
83
83
|
field: 'name'
|
|
84
84
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
{
|
|
86
|
+
label: i18next.t('field.expirying_in'),
|
|
87
|
+
name: 'expiryingIn',
|
|
88
|
+
type: 'select',
|
|
89
|
+
options: [
|
|
90
|
+
{ value: '' },
|
|
91
|
+
{ name: i18next.t('text.3_months'), value: '3 months' },
|
|
92
|
+
{ name: i18next.t('text.6_months'), value: '6 months' },
|
|
93
|
+
{ name: i18next.t('text.9_months'), value: '9 months' },
|
|
94
|
+
{ name: i18next.t('text.12_months'), value: '12 months' }
|
|
95
|
+
],
|
|
96
|
+
props: { searchOper: 'eq' }
|
|
97
|
+
},
|
|
98
98
|
{
|
|
99
99
|
label: i18next.t('field.has_balance'),
|
|
100
100
|
name: 'remainOnly',
|
|
@@ -127,7 +127,7 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
127
127
|
|
|
128
128
|
async _checkPalletId() {
|
|
129
129
|
try {
|
|
130
|
-
|
|
130
|
+
this._validateInput()
|
|
131
131
|
|
|
132
132
|
const isInventoryOwner = await this._checkInventoryOwnership(this.palletIdInput.value, this.bizplaceName)
|
|
133
133
|
if (!isInventoryOwner)
|
|
@@ -149,17 +149,7 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
149
149
|
)
|
|
150
150
|
} else {
|
|
151
151
|
const invInfo = await this._checkCurrentLocationinCC(this.palletIdInput.value, this.cycleCountNo)
|
|
152
|
-
|
|
153
|
-
if (!invInfo) {
|
|
154
|
-
this.dispatchEvent(
|
|
155
|
-
new CustomEvent('not-in-cc', {
|
|
156
|
-
detail: {
|
|
157
|
-
palletId: this.palletIdInput.value,
|
|
158
|
-
cycleCountNo: this.cycleCountNo
|
|
159
|
-
}
|
|
160
|
-
})
|
|
161
|
-
)
|
|
162
|
-
} else if (invInfo?.currentLocation !== this.locationInput.value) {
|
|
152
|
+
if (invInfo.currentLocation !== this.locationInput.value) {
|
|
163
153
|
this.dispatchEvent(
|
|
164
154
|
new CustomEvent('relocate-inventory', {
|
|
165
155
|
detail: {
|
|
@@ -180,6 +170,7 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
180
170
|
}
|
|
181
171
|
}
|
|
182
172
|
} catch (e) {
|
|
173
|
+
history.back()
|
|
183
174
|
this._showToast(e)
|
|
184
175
|
}
|
|
185
176
|
}
|
|
@@ -232,8 +223,6 @@ class CheckInventoryPopup extends localize(i18next)(LitElement) {
|
|
|
232
223
|
|
|
233
224
|
if (!response.errors) {
|
|
234
225
|
return response.data.checkStockTakeCurrentLocation
|
|
235
|
-
} else {
|
|
236
|
-
return response.errors
|
|
237
226
|
}
|
|
238
227
|
} catch (e) {
|
|
239
228
|
this.showToast(e)
|
|
@@ -166,7 +166,6 @@ class CreateCycleCount extends localize(i18next)(PageView) {
|
|
|
166
166
|
descriptionField: 'productName',
|
|
167
167
|
select: [
|
|
168
168
|
{ name: 'productId', hidden: true },
|
|
169
|
-
{ name: 'productDetailId', hidden: true },
|
|
170
169
|
{ name: 'remainUomValue', hidden: true },
|
|
171
170
|
{ name: 'uom', hidden: true },
|
|
172
171
|
{ name: 'batchId', header: i18next.t('field.batch_id') },
|
|
@@ -554,7 +553,9 @@ class CreateCycleCount extends localize(i18next)(PageView) {
|
|
|
554
553
|
return {
|
|
555
554
|
batchId: itm.batchId,
|
|
556
555
|
batchIdRef: itm.batchIdRef,
|
|
557
|
-
|
|
556
|
+
packingSize: itm.packingSize,
|
|
557
|
+
packingType: itm.packingType,
|
|
558
|
+
productId: itm.productId
|
|
558
559
|
}
|
|
559
560
|
}) || []
|
|
560
561
|
|