@things-factory/operato-wms 4.3.247 → 4.3.249
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 +6 -1
- package/client/pages/components/select-inventory-popup.js +4 -1
- package/client/pages/constants/location.js +4 -0
- package/client/pages/inbound/putaway-product.js +43 -10
- package/client/pages/inbound/putaway-same-carton-popup.js +9 -7
- package/client/pages/inbound/unload-product.js +65 -67
- package/client/pages/inbound/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/worksheet-putaway.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +3 -3
- package/client/pages/inbound/worksheet-unloading.js +1 -1
- package/client/pages/inventory/inventory-by-product.js +11 -0
- package/client/pages/inventory/onhand-inventory.js +64 -3
- package/client/pages/master/product/product-list.js +5 -5
- package/client/pages/order/release-order/create-release-order.js +5 -0
- package/client/pages/outbound/inventory-reassign-popup.js +3 -2
- package/client/pages/outbound/loading-product.js +14 -4
- package/client/pages/outbound/sorting-product.js +1 -1
- package/client/pages/outbound/worksheet-batch-picking.js +214 -144
- package/client/pages/outbound/worksheet-loading.js +1 -1
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +357 -250
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +1 -1
- package/config.development.js +15 -15
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +37 -2
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js +36 -0
- package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js.map +1 -0
- package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js +32 -0
- package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js.map +1 -0
- package/package.json +23 -23
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +37 -2
- package/server/migrations/1687413760311-UpdateProductDetailStockQty.ts +34 -0
- package/server/migrations/1687415141200-InsertNewProductDetailStock.ts +30 -0
- package/translations/en.json +7 -0
- package/translations/ko.json +7 -0
- package/translations/ms.json +7 -0
- package/translations/zh.json +7 -0
|
@@ -189,7 +189,12 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
189
189
|
refNo: '',
|
|
190
190
|
refNo2: '',
|
|
191
191
|
refNo3: '',
|
|
192
|
-
releaseDate:
|
|
192
|
+
releaseDate:
|
|
193
|
+
(new Date().getMonth() + 1).toString() +
|
|
194
|
+
'-' +
|
|
195
|
+
new Date().getDate().toString() +
|
|
196
|
+
'-' +
|
|
197
|
+
new Date().getFullYear(),
|
|
193
198
|
attentionTo: '',
|
|
194
199
|
attentionCompany: '',
|
|
195
200
|
deliveryAddress1: '',
|
|
@@ -501,6 +501,7 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
501
501
|
palletId
|
|
502
502
|
location {
|
|
503
503
|
name
|
|
504
|
+
type
|
|
504
505
|
}
|
|
505
506
|
packingType
|
|
506
507
|
packingSize
|
|
@@ -525,7 +526,8 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
525
526
|
response.data.inventoriesByPallet.items.map(item => {
|
|
526
527
|
return {
|
|
527
528
|
...item,
|
|
528
|
-
location: item?.location?.name
|
|
529
|
+
location: item?.location?.name,
|
|
530
|
+
locationType: item?.location?.type
|
|
529
531
|
}
|
|
530
532
|
}) || []
|
|
531
533
|
}
|
|
@@ -614,6 +616,7 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
|
|
|
614
616
|
batchIdRef: itm.batchIdRef,
|
|
615
617
|
groupType: itm.groupType,
|
|
616
618
|
location: itm.location,
|
|
619
|
+
locationType: itm.locationType,
|
|
617
620
|
palletId: itm.palletId
|
|
618
621
|
}
|
|
619
622
|
}
|
|
@@ -40,7 +40,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
40
40
|
_bizplaceName: String,
|
|
41
41
|
_enableCartonLabel: Boolean,
|
|
42
42
|
_expirationDate: Number,
|
|
43
|
-
|
|
43
|
+
__minInboundShelfLife: Number,
|
|
44
44
|
_locationType: String,
|
|
45
45
|
_operationType: String,
|
|
46
46
|
_orderNo: String,
|
|
@@ -333,7 +333,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
333
333
|
this.recommendLocationName = null
|
|
334
334
|
this._operationType = OPERATION_TYPE.PUTAWAY
|
|
335
335
|
this._scanning = false
|
|
336
|
-
this.
|
|
336
|
+
this.__minInboundShelfLife = 0
|
|
337
337
|
this._expirationDate = 0
|
|
338
338
|
this._locationType = ''
|
|
339
339
|
this._records = []
|
|
@@ -531,7 +531,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
531
531
|
sku
|
|
532
532
|
name
|
|
533
533
|
description
|
|
534
|
-
|
|
534
|
+
minInboundShelfLife
|
|
535
535
|
}
|
|
536
536
|
qty
|
|
537
537
|
status
|
|
@@ -566,6 +566,39 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
566
566
|
this._worksheetInfo = worksheetInfo
|
|
567
567
|
this._bizplaceName = worksheetInfo.bizplaceName
|
|
568
568
|
|
|
569
|
+
this.data = {
|
|
570
|
+
records: response.data.putawayWorksheet.worksheetDetailInfos
|
|
571
|
+
.map(record => {
|
|
572
|
+
let reusablePalletName = ''
|
|
573
|
+
if (record.reusablePallet) {
|
|
574
|
+
reusablePalletName = record.reusablePallet.name
|
|
575
|
+
}
|
|
576
|
+
return {
|
|
577
|
+
...record,
|
|
578
|
+
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
579
|
+
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
580
|
+
reusablePalletName: reusablePalletName,
|
|
581
|
+
sku: record.product.sku,
|
|
582
|
+
minInboundShelfLife: record.product.minInboundShelfLife,
|
|
583
|
+
expirationDate: record.expirationDate
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
.sort((a, b) => {
|
|
587
|
+
if (a.completed !== b.completed) {
|
|
588
|
+
if (a.completed) return 1
|
|
589
|
+
if (b.completed) return -1
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
if (a.batchId > b.batchId) return 1
|
|
593
|
+
if (b.batchId < b.batchId) return -1
|
|
594
|
+
|
|
595
|
+
if (a.palletId > b.palletId) return 1
|
|
596
|
+
if (a.palletId < b.palletId) return -1
|
|
597
|
+
|
|
598
|
+
return 0
|
|
599
|
+
})
|
|
600
|
+
}
|
|
601
|
+
|
|
569
602
|
this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
|
|
570
603
|
this._massageItemList(response.data.putawayWorksheet.worksheetDetailInfos)
|
|
571
604
|
}
|
|
@@ -595,7 +628,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
595
628
|
name
|
|
596
629
|
description
|
|
597
630
|
sku
|
|
598
|
-
|
|
631
|
+
minInboundShelfLife
|
|
599
632
|
}
|
|
600
633
|
qty
|
|
601
634
|
status
|
|
@@ -631,7 +664,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
631
664
|
...record,
|
|
632
665
|
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
633
666
|
sku: record.product.sku,
|
|
634
|
-
|
|
667
|
+
minInboundShelfLife: record.product.minInboundShelfLife,
|
|
635
668
|
expirationDate: record.expirationDate
|
|
636
669
|
}
|
|
637
670
|
})
|
|
@@ -755,7 +788,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
755
788
|
sku
|
|
756
789
|
name
|
|
757
790
|
description
|
|
758
|
-
|
|
791
|
+
minInboundShelfLife
|
|
759
792
|
}
|
|
760
793
|
qty
|
|
761
794
|
status
|
|
@@ -797,7 +830,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
797
830
|
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
798
831
|
reusablePalletName: reusablePalletName,
|
|
799
832
|
sku: record.product.sku,
|
|
800
|
-
|
|
833
|
+
minInboundShelfLife: record.product.minInboundShelfLife,
|
|
801
834
|
expirationDate: record.expirationDate
|
|
802
835
|
}
|
|
803
836
|
})
|
|
@@ -1216,7 +1249,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1216
1249
|
return {
|
|
1217
1250
|
name: record.name,
|
|
1218
1251
|
expirationDate: record.expirationDate,
|
|
1219
|
-
|
|
1252
|
+
minInboundShelfLife: record.product.minInboundShelfLife,
|
|
1220
1253
|
palletId: record.palletId,
|
|
1221
1254
|
cartonId: record.cartonId
|
|
1222
1255
|
}
|
|
@@ -1336,9 +1369,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1336
1369
|
for (let wsd of worksheetDetails) {
|
|
1337
1370
|
new Date(wsd.expirationDate)
|
|
1338
1371
|
let date = new Date()
|
|
1339
|
-
let acceptBefore = new Date(date.setDate(date.getDate() + wsd.
|
|
1372
|
+
let acceptBefore = new Date(date.setDate(date.getDate() + wsd.minInboundShelfLife))
|
|
1340
1373
|
|
|
1341
|
-
if (wsd.
|
|
1374
|
+
if (wsd.minInboundShelfLife > 0 && wsd.expirationDate) {
|
|
1342
1375
|
if (new Date(wsd.expirationDate) < acceptBefore && locationType !== 'QUARANTINE') {
|
|
1343
1376
|
expiringProducts.push(wsd.palletId)
|
|
1344
1377
|
}
|
|
@@ -161,13 +161,15 @@ 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(
|
|
165
|
-
name,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
164
|
+
selectedInventories = this.dataGrist.selected.map(
|
|
165
|
+
({ name, expirationDate, minInboundShelfLife, palletId, cartonId }) => ({
|
|
166
|
+
name,
|
|
167
|
+
expirationDate,
|
|
168
|
+
minInboundShelfLife,
|
|
169
|
+
palletId,
|
|
170
|
+
cartonId
|
|
171
|
+
})
|
|
172
|
+
)
|
|
171
173
|
if (!selectedInventories?.length) throw new Error(i18next.t('text.select_at_least_one_inventory_to_putaway'))
|
|
172
174
|
|
|
173
175
|
this.dispatchEvent(new CustomEvent('selections', { detail: selectedInventories }))
|
|
@@ -33,7 +33,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
33
33
|
_bizplaceName: String,
|
|
34
34
|
_cartonId: String,
|
|
35
35
|
_enableProductScanning: Boolean,
|
|
36
|
-
|
|
36
|
+
__minInboundShelfLife: Number,
|
|
37
37
|
_enableCartonLabel: Boolean,
|
|
38
38
|
_enableInputQty: Number,
|
|
39
39
|
_isLooseItem: Boolean,
|
|
@@ -385,7 +385,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
385
385
|
this._enableCartonLabel = false
|
|
386
386
|
this._enableInputQty = 0
|
|
387
387
|
this._enableProductScanning = false
|
|
388
|
-
this.
|
|
388
|
+
this.__minInboundShelfLife = 0
|
|
389
389
|
this._isLooseItem = false
|
|
390
390
|
this._isQtyChecked = false
|
|
391
391
|
this._isRequiredCheckExpiry = false
|
|
@@ -675,73 +675,71 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
675
675
|
|
|
676
676
|
async _fetchProducts(orderNo, response) {
|
|
677
677
|
if (this.refOrderType === AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value) {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
query:
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
678
|
+
const response = await client.query({
|
|
679
|
+
query: gql`
|
|
680
|
+
query unloadingWorksheet($arrivalNoticeNo: String!) {
|
|
681
|
+
unloadingWorksheet(arrivalNoticeNo: $arrivalNoticeNo) {
|
|
682
|
+
worksheetInfo {
|
|
683
|
+
arrivalNotice {
|
|
684
|
+
id
|
|
685
|
+
name
|
|
686
|
+
}
|
|
687
|
+
bizplaceName
|
|
688
|
+
partnerDomainId
|
|
689
|
+
customerCompanyDomainId
|
|
690
|
+
containerNo
|
|
691
|
+
refNo
|
|
692
|
+
refNo2
|
|
693
|
+
refNo3
|
|
694
|
+
looseItem
|
|
695
|
+
bufferLocation
|
|
696
|
+
startedAt
|
|
697
|
+
orderVas {
|
|
698
|
+
targetVas {
|
|
685
699
|
id
|
|
686
700
|
name
|
|
687
|
-
|
|
688
|
-
bizplaceName
|
|
689
|
-
partnerDomainId
|
|
690
|
-
customerCompanyDomainId
|
|
691
|
-
containerNo
|
|
692
|
-
refNo
|
|
693
|
-
refNo2
|
|
694
|
-
refNo3
|
|
695
|
-
looseItem
|
|
696
|
-
bufferLocation
|
|
697
|
-
startedAt
|
|
698
|
-
orderVas {
|
|
699
|
-
targetVas {
|
|
701
|
+
vas {
|
|
700
702
|
id
|
|
701
703
|
name
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
name
|
|
705
|
-
description
|
|
706
|
-
type
|
|
707
|
-
}
|
|
708
|
-
qty
|
|
709
|
-
remark
|
|
704
|
+
description
|
|
705
|
+
type
|
|
710
706
|
}
|
|
707
|
+
qty
|
|
708
|
+
remark
|
|
711
709
|
}
|
|
712
710
|
}
|
|
713
|
-
|
|
711
|
+
}
|
|
712
|
+
worksheetDetailInfos {
|
|
713
|
+
id
|
|
714
|
+
batchId
|
|
715
|
+
batchIdRef
|
|
716
|
+
product {
|
|
714
717
|
id
|
|
715
|
-
|
|
716
|
-
batchIdRef
|
|
717
|
-
product {
|
|
718
|
-
id
|
|
719
|
-
sku
|
|
720
|
-
name
|
|
721
|
-
description
|
|
722
|
-
isRequiredCheckExpiry
|
|
723
|
-
isRequireSerialNumberScanningInbound
|
|
724
|
-
expirationPeriod
|
|
725
|
-
}
|
|
718
|
+
sku
|
|
726
719
|
name
|
|
727
|
-
targetName
|
|
728
720
|
description
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
actualPalletQty
|
|
733
|
-
packQty
|
|
734
|
-
actualPackQty
|
|
735
|
-
issue
|
|
736
|
-
manufactureDate
|
|
737
|
-
remark
|
|
721
|
+
isRequiredCheckExpiry
|
|
722
|
+
isRequireSerialNumberScanningInbound
|
|
723
|
+
minInboundShelfLife
|
|
738
724
|
}
|
|
725
|
+
name
|
|
726
|
+
targetName
|
|
727
|
+
description
|
|
728
|
+
packingSize
|
|
729
|
+
packingType
|
|
730
|
+
palletQty
|
|
731
|
+
actualPalletQty
|
|
732
|
+
packQty
|
|
733
|
+
actualPackQty
|
|
734
|
+
issue
|
|
735
|
+
manufactureDate
|
|
736
|
+
remark
|
|
739
737
|
}
|
|
740
738
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
}
|
|
739
|
+
}
|
|
740
|
+
`,
|
|
741
|
+
variables: { arrivalNoticeNo: orderNo }
|
|
742
|
+
})
|
|
745
743
|
|
|
746
744
|
if (!response.errors) {
|
|
747
745
|
const responseType = response.data?.unloadingWorksheet?.worksheetInfo
|
|
@@ -852,7 +850,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
852
850
|
sku
|
|
853
851
|
isRequiredCheckExpiry
|
|
854
852
|
isRequireSerialNumberScanningInbound
|
|
855
|
-
|
|
853
|
+
minInboundShelfLife
|
|
856
854
|
}
|
|
857
855
|
inventory {
|
|
858
856
|
id
|
|
@@ -1049,7 +1047,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1049
1047
|
if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
1050
1048
|
this._scanning = true
|
|
1051
1049
|
|
|
1052
|
-
if (this._isRequiredCheckExpiry && this.
|
|
1050
|
+
if (this._isRequiredCheckExpiry && this.__minInboundShelfLife > 0) {
|
|
1053
1051
|
const answer = await this._checkExpiry()
|
|
1054
1052
|
if (answer && !answer.value) return (this._scanning = false)
|
|
1055
1053
|
}
|
|
@@ -1106,7 +1104,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1106
1104
|
return this._showToast({ message: i18next.t('text.enter_serial_number') })
|
|
1107
1105
|
}
|
|
1108
1106
|
|
|
1109
|
-
if (this._isRequiredCheckExpiry && this.
|
|
1107
|
+
if (this._isRequiredCheckExpiry && this.__minInboundShelfLife > 0) {
|
|
1110
1108
|
const answer = await this._checkExpiry()
|
|
1111
1109
|
if (answer && !answer.value) return (this._scanning = false)
|
|
1112
1110
|
}
|
|
@@ -1153,7 +1151,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1153
1151
|
|
|
1154
1152
|
async _checkExpiry() {
|
|
1155
1153
|
let date = new Date()
|
|
1156
|
-
const acceptBefore = new Date(date.setDate(date.getDate() + this.
|
|
1154
|
+
const acceptBefore = new Date(date.setDate(date.getDate() + this.__minInboundShelfLife))
|
|
1157
1155
|
let expiryDate = new Date(this.expDateInput.value)
|
|
1158
1156
|
if (expiryDate < acceptBefore) {
|
|
1159
1157
|
return await CustomAlert({
|
|
@@ -1168,7 +1166,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1168
1166
|
if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
1169
1167
|
this._scanning = true
|
|
1170
1168
|
|
|
1171
|
-
if (this._isRequiredCheckExpiry && this.
|
|
1169
|
+
if (this._isRequiredCheckExpiry && this.__minInboundShelfLife > 0) {
|
|
1172
1170
|
const answer = await this._checkExpiry()
|
|
1173
1171
|
if (answer && !answer.value) return (this._scanning = false)
|
|
1174
1172
|
}
|
|
@@ -1235,7 +1233,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1235
1233
|
sku
|
|
1236
1234
|
isRequiredCheckExpiry
|
|
1237
1235
|
isRequireSerialNumberScanningInbound
|
|
1238
|
-
|
|
1236
|
+
minInboundShelfLife
|
|
1239
1237
|
}
|
|
1240
1238
|
}
|
|
1241
1239
|
}
|
|
@@ -1265,7 +1263,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1265
1263
|
sku
|
|
1266
1264
|
isRequiredCheckExpiry
|
|
1267
1265
|
isRequireSerialNumberScanningInbound
|
|
1268
|
-
|
|
1266
|
+
minInboundShelfLife
|
|
1269
1267
|
}
|
|
1270
1268
|
}
|
|
1271
1269
|
total
|
|
@@ -1283,7 +1281,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1283
1281
|
async _checkedLotScannedProduct() {
|
|
1284
1282
|
const response = await this.fetchProductDetail('', this._selectedOrderProduct.product.id)
|
|
1285
1283
|
if (!response.errors) {
|
|
1286
|
-
this.
|
|
1284
|
+
this.__minInboundShelfLife = response.data.productDetail.product.minInboundShelfLife
|
|
1287
1285
|
}
|
|
1288
1286
|
}
|
|
1289
1287
|
|
|
@@ -1342,12 +1340,12 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1342
1340
|
return foundOrderProducts
|
|
1343
1341
|
}
|
|
1344
1342
|
} else if (foundOrderProducts?.length == 1) {
|
|
1345
|
-
this.
|
|
1343
|
+
this.__minInboundShelfLife = product.minInboundShelfLife
|
|
1346
1344
|
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1347
1345
|
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1348
1346
|
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1349
1347
|
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1350
|
-
this.
|
|
1348
|
+
this.__minInboundShelfLife = product.minInboundShelfLife
|
|
1351
1349
|
this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
|
|
1352
1350
|
this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
|
|
1353
1351
|
this._selectedOrderProduct = foundParentProducts[0]
|
|
@@ -1364,7 +1362,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1364
1362
|
.orderProducts="${orderProducts}"
|
|
1365
1363
|
@selected-batch="${async e => {
|
|
1366
1364
|
this._selectedOrderProduct = e.detail
|
|
1367
|
-
this.
|
|
1365
|
+
this.__minInboundShelfLife = this._selectedOrderProduct.product.minInboundShelfLife
|
|
1368
1366
|
this._isRequiredCheckExpiry = this._selectedOrderProduct.product.isRequiredCheckExpiry
|
|
1369
1367
|
this._isRequireSerialNumberScanningInbound =
|
|
1370
1368
|
this._selectedOrderProduct.product.isRequireSerialNumberScanningInbound
|
|
@@ -143,7 +143,7 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
|
|
|
143
143
|
</fieldset>
|
|
144
144
|
</form>
|
|
145
145
|
|
|
146
|
-
<barcode-tag bcid="qrcode" .value=${this._returnOrderNo}></barcode-tag>
|
|
146
|
+
<barcode-tag bcid="qrcode" .value=${this._returnOrderNo} showLogo="true"></barcode-tag>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
149
|
<div class="grist">
|
|
@@ -152,7 +152,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
|
|
|
152
152
|
</fieldset>
|
|
153
153
|
</form>
|
|
154
154
|
|
|
155
|
-
<barcode-tag bcid="qrcode" .value=${this._ganNo}></barcode-tag>
|
|
155
|
+
<barcode-tag bcid="qrcode" .value=${this._ganNo} showLogo="true"></barcode-tag>
|
|
156
156
|
</div>
|
|
157
157
|
|
|
158
158
|
<div class="grist">
|
|
@@ -176,7 +176,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
|
|
|
176
176
|
</fieldset>
|
|
177
177
|
</form>
|
|
178
178
|
|
|
179
|
-
<barcode-tag bcid="qrcode" .value=${this._returnOrderNo}></barcode-tag>
|
|
179
|
+
<barcode-tag bcid="qrcode" .value=${this._returnOrderNo} showLogo="true"></barcode-tag>
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
182
|
<div class="grist">
|
|
@@ -285,7 +285,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
|
|
|
285
285
|
if (!this._worksheetNo) return
|
|
286
286
|
const response = await client.query({
|
|
287
287
|
query: gql`
|
|
288
|
-
query($name: String!) {
|
|
288
|
+
query ($name: String!) {
|
|
289
289
|
worksheet(name: $name) {
|
|
290
290
|
status
|
|
291
291
|
releaseGood {
|
|
@@ -447,7 +447,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
|
|
|
447
447
|
|
|
448
448
|
const response = await client.mutate({
|
|
449
449
|
mutation: gql`
|
|
450
|
-
mutation($worksheetNo: String!, $unloadingReturnWorksheetDetails: [WorksheetDetailPatch]) {
|
|
450
|
+
mutation ($worksheetNo: String!, $unloadingReturnWorksheetDetails: [WorksheetDetailPatch]) {
|
|
451
451
|
activateUnloadingReturn(
|
|
452
452
|
worksheetNo: $worksheetNo
|
|
453
453
|
unloadingReturnWorksheetDetails: $unloadingReturnWorksheetDetails
|
|
@@ -209,7 +209,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
|
|
|
209
209
|
</fieldset>
|
|
210
210
|
</form>
|
|
211
211
|
|
|
212
|
-
<barcode-tag bcid="qrcode" .value=${this._ganNo}></barcode-tag>
|
|
212
|
+
<barcode-tag bcid="qrcode" .value=${this._ganNo} showLogo="true"></barcode-tag>
|
|
213
213
|
</div>
|
|
214
214
|
|
|
215
215
|
<div class="grist">
|
|
@@ -475,6 +475,14 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
475
475
|
label: true,
|
|
476
476
|
width: 120
|
|
477
477
|
},
|
|
478
|
+
{
|
|
479
|
+
type: 'integer',
|
|
480
|
+
name: 'damageQty',
|
|
481
|
+
imex: { header: i18next.t('field.damage_qty'), key: 'damageQty', width: 20, type: 'integer' },
|
|
482
|
+
header: i18next.t('field.damage_qty'),
|
|
483
|
+
label: true,
|
|
484
|
+
width: 120
|
|
485
|
+
},
|
|
478
486
|
{
|
|
479
487
|
type: 'integer',
|
|
480
488
|
name: 'storageQty',
|
|
@@ -535,6 +543,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
535
543
|
draftQty
|
|
536
544
|
warehouseQty
|
|
537
545
|
obsoleteQty
|
|
546
|
+
damageQty
|
|
538
547
|
storageQty
|
|
539
548
|
transferQty
|
|
540
549
|
}
|
|
@@ -566,6 +575,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
566
575
|
record.obsoleteQty = item.obsoleteQty
|
|
567
576
|
record.transferQty = item.transferQty
|
|
568
577
|
record.storageQty = item.storageQty
|
|
578
|
+
record.damageQty = item.damageQty
|
|
569
579
|
|
|
570
580
|
return record
|
|
571
581
|
})
|
|
@@ -707,6 +717,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
707
717
|
draftQty: item.draftQty,
|
|
708
718
|
warehouseQty: item.warehouseQty,
|
|
709
719
|
obsoleteQty: item.obsoleteQty,
|
|
720
|
+
damageQty: item.damageQty,
|
|
710
721
|
storageQty: item.storageQty,
|
|
711
722
|
transferQty: item.transferQty,
|
|
712
723
|
auxUnit1: item.auxUnit1,
|
|
@@ -238,6 +238,24 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
238
238
|
sortable: true,
|
|
239
239
|
width: 80
|
|
240
240
|
},
|
|
241
|
+
{
|
|
242
|
+
type: 'string',
|
|
243
|
+
name: 'condition',
|
|
244
|
+
header: i18next.t('field.condition'),
|
|
245
|
+
width: 100
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
type: 'string',
|
|
249
|
+
name: 'expiry',
|
|
250
|
+
header: i18next.t('field.expiry_status'),
|
|
251
|
+
width: 120
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
type: 'string',
|
|
255
|
+
name: 'adjustmentNote',
|
|
256
|
+
header: i18next.t('field.reason_of_defective'),
|
|
257
|
+
width: 200
|
|
258
|
+
},
|
|
241
259
|
{
|
|
242
260
|
type: 'string',
|
|
243
261
|
name: 'remark',
|
|
@@ -431,6 +449,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
431
449
|
id
|
|
432
450
|
name
|
|
433
451
|
description
|
|
452
|
+
type
|
|
434
453
|
}
|
|
435
454
|
updatedAt
|
|
436
455
|
updater {
|
|
@@ -442,6 +461,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
442
461
|
manufactureDate
|
|
443
462
|
remark
|
|
444
463
|
unitCost
|
|
464
|
+
adjustmentNote
|
|
445
465
|
}
|
|
446
466
|
total
|
|
447
467
|
}
|
|
@@ -473,7 +493,11 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
473
493
|
name: `${item.product.name} ${item.product.description}`,
|
|
474
494
|
productBrand: `${item.product.brand}`
|
|
475
495
|
},
|
|
476
|
-
volume: parseFloat(item.product.volume * item.remainQty).toFixed(2)
|
|
496
|
+
volume: parseFloat(item.product.volume * item.remainQty).toFixed(2),
|
|
497
|
+
// Need to move to serverside processing and fetch with db query for consistent performance
|
|
498
|
+
condition: this.getCondition(item.location.type),
|
|
499
|
+
expiry: this.getStatus(item.expirationDate)
|
|
500
|
+
// Need to move to serverside processing and fetch with db query for consistent performance
|
|
477
501
|
},
|
|
478
502
|
'_'
|
|
479
503
|
)
|
|
@@ -481,6 +505,40 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
481
505
|
}
|
|
482
506
|
}
|
|
483
507
|
|
|
508
|
+
// Need to move to serverside processing and fetch with db query for consistent performance
|
|
509
|
+
getCondition(locationType) {
|
|
510
|
+
switch (locationType) {
|
|
511
|
+
case 'BIN':
|
|
512
|
+
case 'BUFFER':
|
|
513
|
+
case 'FLOOR':
|
|
514
|
+
case 'SHELF':
|
|
515
|
+
case 'STORAGE':
|
|
516
|
+
return 'New'
|
|
517
|
+
case 'RESERVE':
|
|
518
|
+
return 'Reserve'
|
|
519
|
+
case 'DAMAGE':
|
|
520
|
+
return 'Damage'
|
|
521
|
+
case 'QUARANTINE':
|
|
522
|
+
return 'Quarantine'
|
|
523
|
+
default:
|
|
524
|
+
return ''
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
getStatus(exp_date, outbound_alert, min_outbound_shelf_life) {
|
|
529
|
+
const now = new Date()
|
|
530
|
+
if (exp_date < now) {
|
|
531
|
+
return 'Expired'
|
|
532
|
+
} else if (exp_date > outbound_alert) {
|
|
533
|
+
return 'Expiring'
|
|
534
|
+
} else if (exp_date >= outbound_alert && exp_date <= min_outbound_shelf_life) {
|
|
535
|
+
return 'Risky'
|
|
536
|
+
} else {
|
|
537
|
+
return 'Normal'
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
// Need to move to serverside processing and fetch with db query for consistent performance
|
|
541
|
+
|
|
484
542
|
async _fetchPartners() {
|
|
485
543
|
const filters = []
|
|
486
544
|
const response = await client.query({
|
|
@@ -528,11 +586,14 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
528
586
|
{ header: i18next.t('field.non_loaded_uom_value'), key: 'nonLoadedUomValue', width: 25, type: 'string' },
|
|
529
587
|
{ header: i18next.t('field.uom'), key: 'uom', width: 15, type: 'string' },
|
|
530
588
|
{ header: i18next.t('field.location'), key: 'location_name', width: 25, type: 'string' },
|
|
531
|
-
{ header: i18next.t('field.remark'), key: 'remark', width: 40, type: 'string' },
|
|
532
589
|
{ header: i18next.t('field.exp_date'), key: 'expirationDate', width: 30, type: 'date' },
|
|
533
590
|
{ header: i18next.t('field.batch_no_ref'), key: 'batchIdRef', width: 50, type: 'string' },
|
|
534
591
|
{ header: i18next.t('field.volume_m3'), key: 'volume', width: 25, type: 'float' },
|
|
535
|
-
{ header: i18next.t('field.unit_cost'), key: 'unitCost', width: 25, type: 'float' }
|
|
592
|
+
{ header: i18next.t('field.unit_cost'), key: 'unitCost', width: 25, type: 'float' },
|
|
593
|
+
{ header: i18next.t('field.condition'), key: 'condition', width: 25, type: 'string' },
|
|
594
|
+
{ header: i18next.t('field.reason_of_defective'), key: 'adjustmentNote', width: 25, type: 'string' },
|
|
595
|
+
{ header: i18next.t('field.expiry_status'), key: 'expiry', width: 25, type: 'string' },
|
|
596
|
+
{ header: i18next.t('field.remark'), key: 'remark', width: 40, type: 'string' }
|
|
536
597
|
]
|
|
537
598
|
|
|
538
599
|
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|