@things-factory/operato-wms 5.0.0-alpha.50 → 5.0.0-alpha.53
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/constants/index.js +1 -0
- package/client/constants/order.js +14 -0
- package/client/pages/constants/index.js +1 -0
- package/client/pages/constants/setting.js +1 -0
- package/client/pages/constants/tote.js +14 -0
- package/client/pages/inbound/pallet-label-popup.js +6 -0
- package/client/pages/inbound/putaway-product.js +3 -1
- package/client/pages/inbound/unload-product.js +12 -6
- package/client/pages/inventory/inventory-adjustment-approval.js +24 -9
- package/client/pages/inventory/inventory-adjustment.js +121 -16
- package/client/pages/inventory/inventory-by-product-detail.js +1 -1
- package/client/pages/inventory/onhand-inventory.js +27 -0
- package/client/pages/inventory-check/create-cycle-count.js +1 -0
- package/client/pages/manifest/create-loading-manifest.js +1 -0
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/tote-list.js +740 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +0 -2
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +0 -2
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +1163 -0
- package/client/pages/order/draft-release-good/draft-release-good-list.js +546 -0
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +21 -30
- package/client/pages/order/release-order/bulk-print-packing-list.js +4 -0
- package/client/pages/order/release-order/create-release-order.js +1 -0
- package/client/pages/order/release-order/receive-release-order-request.js +0 -2
- package/client/pages/order/release-order/release-order-detail.js +55 -27
- package/client/pages/order/return-order/receive-return-order-requests.js +0 -2
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +0 -1
- package/client/pages/order/transport-order/view-delivery-note.js +1 -1
- package/client/pages/order/vas-order/create-vas-order.js +1 -0
- package/client/pages/order/vas-order/receive-vas-order.js +0 -2
- package/client/pages/outbound/inventory-assign-popup.js +7 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +2 -1
- package/client/pages/outbound/loading-product.js +49 -11
- package/client/pages/outbound/order-remark-popup.js +112 -0
- package/client/pages/outbound/packing-product.js +42 -6
- package/client/pages/outbound/packing-worksheet-list.js +15 -0
- package/client/pages/outbound/picking-product.js +153 -13
- package/client/pages/outbound/single-outbound-worksheet.js +10 -22
- package/client/pages/outbound/sorting-product.js +78 -15
- package/client/pages/outbound/tote-popup.js +461 -0
- package/client/pages/outbound/worksheet-batch-picking.js +9 -2
- package/client/pages/outbound/worksheet-packing.js +7 -2
- package/client/pages/outbound/worksheet-picking.js +9 -2
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +2 -2
- package/client/pages/report/inventory-summary-report.js +11 -2
- package/client/pages/report/outbound-order-details-report.js +18 -0
- package/client/pages/report/volume-summary-report.js +606 -0
- package/client/pages/vas/abstract-execute-vas.js +12 -7
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -1
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +3 -1
- package/client/route.js +16 -0
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +2 -1
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +5 -6
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +53 -22
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +4 -9
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/index.js +3 -2
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +3 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +6 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +1 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +65 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +2 -3
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -1
- package/dist-server/graphql/types/index.js +4 -3
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -0
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +9 -0
- package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +1 -0
- package/dist-server/opa-app-setting-constants.js +2 -1
- package/dist-server/opa-app-setting-constants.js.map +1 -1
- package/helps/release-note.ko.md +11 -12
- package/helps/release-note.md +11 -12
- package/helps/release-note.ms.md +11 -12
- package/helps/release-note.zh.md +11 -12
- package/package.json +43 -43
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
- package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +5 -6
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +53 -22
- package/server/graphql/resolvers/extra/add-release-good-products.ts +22 -13
- package/server/graphql/resolvers/index.ts +3 -2
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -2
- package/server/graphql/resolvers/warehouse-inventory-adjustment/index.ts +5 -0
- package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +79 -0
- package/server/graphql/types/dashboard/inventory-expiry-counter.ts +2 -3
- package/server/graphql/types/index.ts +4 -4
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -0
- package/server/graphql/types/warehouse-inventory-adjustment/index.ts +5 -0
- package/server/index.ts +1 -1
- package/server/opa-app-setting-constants.ts +1 -0
- package/things-factory.config.js +17 -0
- package/translations/en.json +65 -7
- package/translations/ko.json +55 -8
- package/translations/ms.json +49 -2
- package/translations/zh.json +49 -2
- package/dist-server/entities/index.js +0 -5
- package/dist-server/entities/index.js.map +0 -1
- package/server/entities/index.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './order'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const DRAFT_RELEASE_ORDER_STATUS = {
|
|
2
|
+
DRAFT: 'DRAFT',
|
|
3
|
+
INSUFFICIENT: 'INSUFFICIENT',
|
|
4
|
+
SUBMITTED: 'SUBMITTED',
|
|
5
|
+
CANCELLED: 'CANCELLED'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* To identify Product Type Single or Bundle
|
|
10
|
+
*/
|
|
11
|
+
export const PRODUCT_GROUP_TYPES = {
|
|
12
|
+
SINGLE: 'SINGLE',
|
|
13
|
+
BUNDLE: 'BUNDLE'
|
|
14
|
+
}
|
|
@@ -6,3 +6,4 @@ export const PRODUCT_LABEL_SETTING_KEY = 'product-label'
|
|
|
6
6
|
export const REUSABLE_PALLET_LABEL_SETTING_KEY = 'reusable-pallet-label'
|
|
7
7
|
export const INTENALIZED_AWB_SETTING_KEY = 'internalized-awb-label'
|
|
8
8
|
export const ROUTE_LABEL_SETTING_KEY = 'route-label'
|
|
9
|
+
export const TOTE_LABEL_SETTING_KEY = 'tote-label'
|
|
@@ -154,6 +154,9 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
154
154
|
packingType
|
|
155
155
|
palletId
|
|
156
156
|
remark
|
|
157
|
+
orderProductRemark
|
|
158
|
+
purchaseOrderNo
|
|
159
|
+
arrivalNoticeRefNo
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
162
|
`,
|
|
@@ -188,6 +191,9 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
188
191
|
searchParams.append('remark', results[i].remark)
|
|
189
192
|
searchParams.append('batchRef', results[i].batchIdRef)
|
|
190
193
|
searchParams.append('expirationDate', '')
|
|
194
|
+
searchParams.append('orderProductRemark', results[i].orderProductRemark)
|
|
195
|
+
searchParams.append('purchaseOrderNo', results[i].purchaseOrderNo)
|
|
196
|
+
searchParams.append('refNo', results[i].arrivalNoticeRefNo)
|
|
191
197
|
try {
|
|
192
198
|
const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
|
|
193
199
|
method: 'GET'
|
|
@@ -9,6 +9,7 @@ import gql from 'graphql-tag'
|
|
|
9
9
|
import { css, html } from 'lit-element'
|
|
10
10
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
11
11
|
|
|
12
|
+
import { sleep } from '@operato/utils'
|
|
12
13
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
13
14
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
14
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
@@ -1251,7 +1252,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1251
1252
|
)
|
|
1252
1253
|
}
|
|
1253
1254
|
|
|
1254
|
-
_openUndoPopup() {
|
|
1255
|
+
async _openUndoPopup() {
|
|
1256
|
+
await sleep(1010)
|
|
1255
1257
|
openPopup(
|
|
1256
1258
|
html`
|
|
1257
1259
|
<undo-putaway-popup
|
|
@@ -19,7 +19,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
19
19
|
import { openPopup } from '@things-factory/layout-base'
|
|
20
20
|
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
21
21
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
22
|
-
import { isMobileDevice } from '@things-factory/utils'
|
|
22
|
+
import { isMobileDevice, sleep } from '@things-factory/utils'
|
|
23
23
|
|
|
24
24
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
25
25
|
import { ARRIVAL_NOTICE, RETURN_ORDER, VAS_TYPE } from '../constants'
|
|
@@ -1210,7 +1210,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
|
|
1213
|
-
_openIssueNote() {
|
|
1213
|
+
async _openIssueNote() {
|
|
1214
|
+
await sleep(1010)
|
|
1214
1215
|
openPopup(
|
|
1215
1216
|
html`
|
|
1216
1217
|
<popup-note
|
|
@@ -1411,7 +1412,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1411
1412
|
}
|
|
1412
1413
|
}
|
|
1413
1414
|
|
|
1414
|
-
_openUndoUnloadPopup() {
|
|
1415
|
+
async _openUndoUnloadPopup() {
|
|
1416
|
+
await sleep(1010)
|
|
1415
1417
|
openPopup(
|
|
1416
1418
|
html`
|
|
1417
1419
|
<undo-unload-popup
|
|
@@ -1447,7 +1449,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1447
1449
|
}
|
|
1448
1450
|
)
|
|
1449
1451
|
}
|
|
1450
|
-
|
|
1452
|
+
|
|
1453
|
+
async _reusablePalletMode() {
|
|
1454
|
+
await sleep(1010)
|
|
1451
1455
|
openPopup(
|
|
1452
1456
|
html`
|
|
1453
1457
|
<popup-reusable-pallet
|
|
@@ -1470,7 +1474,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1470
1474
|
)
|
|
1471
1475
|
}
|
|
1472
1476
|
|
|
1473
|
-
_openSerialNumberList() {
|
|
1477
|
+
async _openSerialNumberList() {
|
|
1478
|
+
await sleep(1010)
|
|
1474
1479
|
openPopup(
|
|
1475
1480
|
html`
|
|
1476
1481
|
<serial-number-list-popup
|
|
@@ -1538,7 +1543,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1538
1543
|
})
|
|
1539
1544
|
}
|
|
1540
1545
|
|
|
1541
|
-
_openVasPopup() {
|
|
1546
|
+
async _openVasPopup() {
|
|
1547
|
+
await sleep(1010)
|
|
1542
1548
|
openPopup(
|
|
1543
1549
|
html`
|
|
1544
1550
|
<palletizing-pallet-popup
|
|
@@ -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 } from '@things-factory/shell'
|
|
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'
|
|
@@ -141,7 +141,9 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
141
141
|
{ column: 'expirationDate', name: 'Exp. Date' },
|
|
142
142
|
{ column: 'manufactureDate', name: 'Mfg. Date' },
|
|
143
143
|
{ column: 'unitCost', name: 'Unit Cost' },
|
|
144
|
-
{ column: 'inventoryItemChange', name: 'Inventory Item Changes' }
|
|
144
|
+
{ column: 'inventoryItemChange', name: 'Inventory Item Changes' },
|
|
145
|
+
{ column: 'status', name: 'Status' },
|
|
146
|
+
|
|
145
147
|
]
|
|
146
148
|
|
|
147
149
|
this.config = {
|
|
@@ -194,7 +196,17 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
194
196
|
} else {
|
|
195
197
|
this._compareColumn.map(item => {
|
|
196
198
|
let currentVal = compareData[item.column]?.name || compareData[item.column] || '[N/A]'
|
|
197
|
-
let updatedVal
|
|
199
|
+
let updatedVal
|
|
200
|
+
|
|
201
|
+
if (item.column == 'status' && record.transactionType == 'MISSING') {
|
|
202
|
+
updatedVal = record.transactionType || '[N/A]'
|
|
203
|
+
}else if(item.column == 'status'){
|
|
204
|
+
updatedVal = '[N/A]'
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (item.column !== 'status') {
|
|
208
|
+
updatedVal = record[item.column]?.name || record[item.column] || '[N/A]'
|
|
209
|
+
}
|
|
198
210
|
|
|
199
211
|
recordDiff.push({
|
|
200
212
|
column: item.name,
|
|
@@ -404,6 +416,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
404
416
|
batchIdRef
|
|
405
417
|
packingType
|
|
406
418
|
packingSize
|
|
419
|
+
status
|
|
407
420
|
bizplace {
|
|
408
421
|
id
|
|
409
422
|
name
|
|
@@ -432,6 +445,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
432
445
|
packingType
|
|
433
446
|
packingSize
|
|
434
447
|
batchIdRef
|
|
448
|
+
status
|
|
435
449
|
bizplace {
|
|
436
450
|
id
|
|
437
451
|
name
|
|
@@ -548,8 +562,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
548
562
|
if (patches && patches.length) {
|
|
549
563
|
const response = await client.mutate({
|
|
550
564
|
mutation: gql`
|
|
551
|
-
mutation
|
|
552
|
-
|
|
565
|
+
mutation warehouseInventoryAdjustment($patches: [InventoryChangePatch!]!) {
|
|
566
|
+
warehouseInventoryAdjustment(patches: $patches) {
|
|
553
567
|
items {
|
|
554
568
|
id
|
|
555
569
|
}
|
|
@@ -557,13 +571,14 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
557
571
|
}
|
|
558
572
|
}
|
|
559
573
|
`,
|
|
560
|
-
variables: { patches }
|
|
574
|
+
variables: { patches },
|
|
575
|
+
context: gqlContext()
|
|
561
576
|
})
|
|
562
577
|
if (!response.errors) {
|
|
563
|
-
this._lockedPallet = response.data.
|
|
578
|
+
this._lockedPallet = response.data.warehouseInventoryAdjustment.items
|
|
564
579
|
this._showToast({
|
|
565
580
|
message:
|
|
566
|
-
response.data.
|
|
581
|
+
response.data.warehouseInventoryAdjustment.total > 0
|
|
567
582
|
? 'Highlighted pallet could not be approved due to ongoing process.'
|
|
568
583
|
: i18next.t('text.data_approved'),
|
|
569
584
|
option: 7000
|
|
@@ -677,4 +692,4 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
677
692
|
}
|
|
678
693
|
}
|
|
679
694
|
|
|
680
|
-
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|
|
695
|
+
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|
|
@@ -13,7 +13,7 @@ import { DirectPrinter } from '@things-factory/barcode-base'
|
|
|
13
13
|
import { getCodeByName } from '@things-factory/code-base'
|
|
14
14
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
15
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
16
|
-
import { client, PageView, store } from '@things-factory/shell'
|
|
16
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
17
17
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
18
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
19
19
|
|
|
@@ -75,6 +75,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
75
75
|
action: this.printCartonLabel.bind(this),
|
|
76
76
|
...CommonButtonStyles.label
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
title: i18next.t('button.missing_stock'),
|
|
80
|
+
action: this.missingStock.bind(this),
|
|
81
|
+
...CommonButtonStyles.save
|
|
82
|
+
},
|
|
78
83
|
{
|
|
79
84
|
title: i18next.t('button.save'),
|
|
80
85
|
action: this.saveInventories.bind(this),
|
|
@@ -577,6 +582,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
577
582
|
expirationDate
|
|
578
583
|
unitCost
|
|
579
584
|
inventoryItemCount
|
|
585
|
+
purchaseOrderNo
|
|
586
|
+
orderProductRemark
|
|
587
|
+
arrivalNoticeRefNo
|
|
580
588
|
}
|
|
581
589
|
total
|
|
582
590
|
}
|
|
@@ -704,15 +712,17 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
704
712
|
const record = event.detail
|
|
705
713
|
const columnName = event.detail.column.name
|
|
706
714
|
|
|
707
|
-
if (
|
|
715
|
+
if (
|
|
716
|
+
columnName === 'bizplace' &&
|
|
717
|
+
record.before?.bizplace?.id != record.after?.bizplace?.id &&
|
|
718
|
+
this.dataGrist._data.records[record.row].lockedQty <= 0
|
|
719
|
+
) {
|
|
708
720
|
delete this.dataGrist._data.records[event.detail.row].product
|
|
709
721
|
delete this.dataGrist._data.records[event.detail.row].sku
|
|
710
722
|
delete this.dataGrist._data.records[event.detail.row].brand
|
|
711
723
|
delete this.dataGrist._data.records[event.detail.row].packingType
|
|
712
724
|
delete this.dataGrist._data.records[event.detail.row].packingSize
|
|
713
725
|
delete this.dataGrist._data.records[event.detail.row].uom
|
|
714
|
-
delete this.dataGrist._data.records[event.detail.row].qty
|
|
715
|
-
delete this.dataGrist._data.records[event.detail.row].uomValue
|
|
716
726
|
}
|
|
717
727
|
}
|
|
718
728
|
|
|
@@ -721,13 +731,26 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
721
731
|
|
|
722
732
|
let item = e.target.localName == 'import-pop-up' ? popUpDataGrist : this.dataGrist
|
|
723
733
|
|
|
734
|
+
if (
|
|
735
|
+
item._data.records[e.detail.row].lockedQty > 0 &&
|
|
736
|
+
(e.detail.column.name == 'batchId' || e.detail.column.name == 'product' || e.detail.column.name == 'bizplace')
|
|
737
|
+
) {
|
|
738
|
+
this._showToast({ level: 'error', message: i18next.t('text.there_is_release_qty_no_amendment_is_allowed') })
|
|
739
|
+
item._data.records[e.detail.row][e.detail.column.name] = e.detail.before
|
|
740
|
+
return
|
|
741
|
+
}
|
|
742
|
+
|
|
724
743
|
switch (e.detail.column.name) {
|
|
725
744
|
case 'uomValue':
|
|
726
|
-
if (e.detail.after < 0
|
|
745
|
+
if (e.detail.after < 0 || e.detail.after.toString() == NaN.toString()) {
|
|
746
|
+
item._data.records[e.detail.row].uomValue = 0
|
|
747
|
+
this._showToast({ level: 'error', message: i18next.t('text.invalid_uom_value') })
|
|
748
|
+
}
|
|
727
749
|
break
|
|
728
750
|
case 'qty':
|
|
729
|
-
if (e.detail.after < 0 || !Number.isInteger(e.detail.after))
|
|
730
|
-
|
|
751
|
+
if (e.detail.after < 0 || !Number.isInteger(e.detail.after)) {
|
|
752
|
+
this._showToast({ level: 'error', message: i18next.t('text.invalid_qty') })
|
|
753
|
+
}
|
|
731
754
|
break
|
|
732
755
|
case 'unitCost':
|
|
733
756
|
if (e.detail.after < 0) item._data.records[e.detail.row].unitCost = e.detail.before
|
|
@@ -746,6 +769,21 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
746
769
|
|
|
747
770
|
item._data.records[e.detail.row].sku = e.detail.after?.sku ? e.detail.after.sku : ''
|
|
748
771
|
break
|
|
772
|
+
case 'bizplace':
|
|
773
|
+
item._data.records[e.detail.row].uom = ''
|
|
774
|
+
|
|
775
|
+
item._data.records[e.detail.row].packingType = ''
|
|
776
|
+
|
|
777
|
+
item._data.records[e.detail.row].packingSize = 1
|
|
778
|
+
|
|
779
|
+
item._data.records[e.detail.row].brand = ''
|
|
780
|
+
|
|
781
|
+
item._data.records[e.detail.row].sku = ''
|
|
782
|
+
|
|
783
|
+
item._data.records[e.detail.row].qty = e.detail.record.qty
|
|
784
|
+
|
|
785
|
+
item._data.records[e.detail.row].uomValue = e.detail.record.uomValue
|
|
786
|
+
break
|
|
749
787
|
default:
|
|
750
788
|
break
|
|
751
789
|
}
|
|
@@ -761,6 +799,46 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
761
799
|
}
|
|
762
800
|
}
|
|
763
801
|
|
|
802
|
+
async missingStock() {
|
|
803
|
+
const selectOrderInventory = this.dataGrist.selected
|
|
804
|
+
|
|
805
|
+
const patchesArr = [...selectOrderInventory]
|
|
806
|
+
|
|
807
|
+
const patches = patchesArr.map(p => {
|
|
808
|
+
return {
|
|
809
|
+
palletId: p.palletId,
|
|
810
|
+
transactionType: 'MISSING'
|
|
811
|
+
}
|
|
812
|
+
})
|
|
813
|
+
|
|
814
|
+
const result = await CustomAlert({
|
|
815
|
+
title: i18next.t('title.are_you_sure'),
|
|
816
|
+
text: i18next.t('text.do_you_want_to_mark_it_as_missing'),
|
|
817
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
818
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
819
|
+
})
|
|
820
|
+
|
|
821
|
+
if (result.isConfirmed) {
|
|
822
|
+
try {
|
|
823
|
+
const response = await client.mutate({
|
|
824
|
+
mutation: gql`
|
|
825
|
+
mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
|
|
826
|
+
submitInventoryChanges(patches: $patches)
|
|
827
|
+
}
|
|
828
|
+
`,
|
|
829
|
+
variables: { patches }
|
|
830
|
+
})
|
|
831
|
+
|
|
832
|
+
if (!response.error) {
|
|
833
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
834
|
+
this.updateContext()
|
|
835
|
+
}
|
|
836
|
+
} catch (error) {
|
|
837
|
+
throw new Error(error)
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
764
842
|
async saveInventories() {
|
|
765
843
|
try {
|
|
766
844
|
var patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
@@ -772,6 +850,13 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
772
850
|
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
773
851
|
}
|
|
774
852
|
}
|
|
853
|
+
|
|
854
|
+
if (row.cuFlag == 'M' && row.bizplace) {
|
|
855
|
+
if (!row.product) {
|
|
856
|
+
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
775
860
|
if (row.bizplace) {
|
|
776
861
|
row.bizplace = { id: row.bizplace.id }
|
|
777
862
|
}
|
|
@@ -793,18 +878,34 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
793
878
|
})
|
|
794
879
|
|
|
795
880
|
if (patches && patches.length) {
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
881
|
+
const validateInventoryChanges = await client.query({
|
|
882
|
+
query: gql`
|
|
883
|
+
query validateOrderInventory($patches: [InventoryPatch!]!) {
|
|
884
|
+
validateOrderInventory(patches: $patches)
|
|
800
885
|
}
|
|
801
886
|
`,
|
|
802
887
|
variables: { patches }
|
|
803
888
|
})
|
|
804
889
|
|
|
805
|
-
if (
|
|
806
|
-
|
|
807
|
-
|
|
890
|
+
if (validateInventoryChanges.data.validateOrderInventory) {
|
|
891
|
+
const response = await client.mutate({
|
|
892
|
+
mutation: gql`
|
|
893
|
+
mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
|
|
894
|
+
submitInventoryChanges(patches: $patches)
|
|
895
|
+
}
|
|
896
|
+
`,
|
|
897
|
+
variables: { patches }
|
|
898
|
+
})
|
|
899
|
+
|
|
900
|
+
if (!response.errors) {
|
|
901
|
+
this.dataGrist.fetch()
|
|
902
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
903
|
+
}
|
|
904
|
+
} else {
|
|
905
|
+
this._showToast({
|
|
906
|
+
type: 'error',
|
|
907
|
+
message: `${i18next.t('text.complete_the_picking_process_before_adjust_the_batch_number')}`
|
|
908
|
+
})
|
|
808
909
|
}
|
|
809
910
|
}
|
|
810
911
|
} catch (e) {
|
|
@@ -893,7 +994,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
893
994
|
if (!response.errors) {
|
|
894
995
|
history.back()
|
|
895
996
|
this.dataGrist.fetch()
|
|
896
|
-
this._showToast({ message: i18next.t('text.
|
|
997
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
897
998
|
}
|
|
898
999
|
} catch (e) {
|
|
899
1000
|
this._showToast(e)
|
|
@@ -1226,6 +1327,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1226
1327
|
searchParams.append('remark', record.remark)
|
|
1227
1328
|
searchParams.append('batchRef', record.batchIdRef)
|
|
1228
1329
|
searchParams.append('expirationDate', record.expirationDate)
|
|
1330
|
+
searchParams.append('purchaseOrderNo', record.purchaseOrderNo)
|
|
1331
|
+
searchParams.append('orderProductRemark', record.orderProductRemark)
|
|
1332
|
+
searchParams.append('refNo', record.arrivalNoticeRefNo)
|
|
1229
1333
|
|
|
1230
1334
|
try {
|
|
1231
1335
|
const response = await fetch(`label-command/${labelId}?${searchParams.toString()}`, {
|
|
@@ -1327,10 +1431,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1327
1431
|
}
|
|
1328
1432
|
}
|
|
1329
1433
|
|
|
1330
|
-
_showToast({ type, message }) {
|
|
1434
|
+
_showToast({ level, type, message }) {
|
|
1331
1435
|
document.dispatchEvent(
|
|
1332
1436
|
new CustomEvent('notify', {
|
|
1333
1437
|
detail: {
|
|
1438
|
+
level,
|
|
1334
1439
|
type,
|
|
1335
1440
|
message
|
|
1336
1441
|
}
|
|
@@ -237,7 +237,7 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
|
|
|
237
237
|
filters: [
|
|
238
238
|
...filters,
|
|
239
239
|
{ name: 'product_id', operator: 'eq', value: this.productId },
|
|
240
|
-
{ name: 'status', operator: 'in', value: ['STORED', 'TERMINATED'] }
|
|
240
|
+
{ name: 'status', operator: 'in', value: ['STORED', 'TERMINATED','MISSING'] }
|
|
241
241
|
],
|
|
242
242
|
pagination: { page, limit },
|
|
243
243
|
sortings: sorters
|
|
@@ -94,6 +94,8 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
94
94
|
'location',
|
|
95
95
|
'remainQty',
|
|
96
96
|
'expirationDate',
|
|
97
|
+
'nonLoadedQty',
|
|
98
|
+
'nonLoadedUomValue',
|
|
97
99
|
'uomValue',
|
|
98
100
|
'uom'
|
|
99
101
|
]
|
|
@@ -184,6 +186,18 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
184
186
|
header: i18next.t('field.uom'),
|
|
185
187
|
width: 80
|
|
186
188
|
},
|
|
189
|
+
{
|
|
190
|
+
type: 'number',
|
|
191
|
+
name: 'nonLoadedQty',
|
|
192
|
+
header: i18next.t('field.non_loaded_qty'),
|
|
193
|
+
width: 110
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'float',
|
|
197
|
+
name: 'nonLoadedUomValue',
|
|
198
|
+
header: i18next.t('field.non_loaded_uom_value'),
|
|
199
|
+
width: 110
|
|
200
|
+
},
|
|
187
201
|
{
|
|
188
202
|
type: 'string',
|
|
189
203
|
name: 'location_name',
|
|
@@ -197,6 +211,14 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
197
211
|
header: i18next.t('field.exp_date'),
|
|
198
212
|
width: 150
|
|
199
213
|
},
|
|
214
|
+
{
|
|
215
|
+
type: 'date',
|
|
216
|
+
name: 'manufactureDate',
|
|
217
|
+
header: i18next.t('field.manufacture_date'),
|
|
218
|
+
imex: { header: i18next.t('field.manufacture_date'), key: 'manufactureDate', width: 40, type: 'date' },
|
|
219
|
+
sortable: true,
|
|
220
|
+
width: 120
|
|
221
|
+
},
|
|
200
222
|
{
|
|
201
223
|
type: 'string',
|
|
202
224
|
name: 'batchIdRef',
|
|
@@ -385,6 +407,8 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
385
407
|
packingType
|
|
386
408
|
uom
|
|
387
409
|
uomValue
|
|
410
|
+
nonLoadedQty
|
|
411
|
+
nonLoadedUomValue
|
|
388
412
|
bizplace {
|
|
389
413
|
id
|
|
390
414
|
name
|
|
@@ -417,6 +441,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
441
|
}
|
|
418
442
|
initialInboundAt
|
|
419
443
|
expirationDate
|
|
444
|
+
manufactureDate
|
|
420
445
|
remark
|
|
421
446
|
unitCost
|
|
422
447
|
}
|
|
@@ -502,6 +527,8 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
502
527
|
{ header: i18next.t('field.qty'), key: 'remainQty', width: 15, type: 'string' },
|
|
503
528
|
{ header: i18next.t('field.total_uom_value'), key: 'uomValue', width: 25, type: 'string' },
|
|
504
529
|
{ header: i18next.t('field.uom'), key: 'uom', width: 15, type: 'string' },
|
|
530
|
+
{ header: i18next.t('field.non_loaded_qty'), key: 'nonLoadedQty', width: 25, type: 'string' },
|
|
531
|
+
{ header: i18next.t('field.non_loaded_uom_value'), key: 'nonLoadedUomValue', width: 25, type: 'string' },
|
|
505
532
|
{ header: i18next.t('field.location'), key: 'location_name', width: 25, type: 'string' },
|
|
506
533
|
{ header: i18next.t('field.remark'), key: 'remark', width: 40, type: 'string' },
|
|
507
534
|
{ header: i18next.t('field.exp_date'), key: 'expirationDate', width: 30, type: 'date' },
|
|
@@ -619,6 +619,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
|
|
|
619
619
|
return {
|
|
620
620
|
batchId: record?.inventory?.batchId,
|
|
621
621
|
packingType: record?.inventory?.packingType,
|
|
622
|
+
packingSize: record?.inventory?.packingSize,
|
|
622
623
|
productId: record?.inventory?.productId,
|
|
623
624
|
groupType: record?.inventory?.groupType
|
|
624
625
|
}
|
|
@@ -192,6 +192,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
192
192
|
const filters = [
|
|
193
193
|
{ name: 'trackingNo', operator: 'eq', value: this.trackingNoInput.value.trim() },
|
|
194
194
|
{ name: 'manifest_id', operator: 'is_null', value: '' },
|
|
195
|
+
{ name: 'releaseGoodOnly', operator: '', value: '' },
|
|
195
196
|
{ name: 'status', operator: 'in', value: ['PACKING', 'DONE'] }
|
|
196
197
|
]
|
|
197
198
|
const response = await client.query({
|
|
@@ -653,7 +653,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
653
653
|
|
|
654
654
|
const response = await client.query({
|
|
655
655
|
query: gql`
|
|
656
|
-
query productsByBizplace($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
|
|
656
|
+
query productsByBizplace($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
657
657
|
productsByBizplace(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
658
658
|
items {
|
|
659
659
|
sku
|