@things-factory/operato-wms 4.3.0-alpha.1 → 4.3.2
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/putaway-product.js +3 -1
- package/client/pages/inbound/unload-product.js +21 -11
- package/client/pages/inventory/inventory-adjustment-approval.js +24 -9
- package/client/pages/inventory/inventory-adjustment.js +79 -13
- 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/goods-received-note/customer-received-note.js +3 -0
- package/client/pages/order/goods-received-note/received-note-detail.js +3 -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/receive-release-order-request.js +0 -2
- package/client/pages/order/release-order/release-order-detail.js +44 -26
- 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/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 +150 -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/inventory-summary-report.js +8 -0
- package/client/pages/report/outbound-order-details-report.js +18 -0
- package/client/pages/vas/abstract-execute-vas.js +12 -7
- package/client/pages/vas/print-product-label.js +15 -6
- 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 +12 -0
- package/dist-server/entities/index.js +2 -1
- package/dist-server/entities/index.js.map +1 -1
- package/dist-server/entities/warehouse-bizplace-onhand-inventory.js +168 -0
- package/dist-server/entities/warehouse-bizplace-onhand-inventory.js.map +1 -0
- package/dist-server/graphql/index.js +1 -5
- package/dist-server/graphql/index.js.map +1 -1
- 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/index.js +4 -7
- 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 +58 -0
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -0
- package/dist-server/graphql/types/index.js +5 -8
- 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/index.js +2 -5
- package/dist-server/index.js.map +1 -1
- package/dist-server/opa-app-setting-constants.js +2 -1
- package/dist-server/opa-app-setting-constants.js.map +1 -1
- package/dist-server/utils/index.js +1 -5
- package/dist-server/utils/index.js.map +1 -1
- package/helps/release-note.ko.md +11 -9
- package/helps/release-note.md +11 -9
- package/helps/release-note.ms.md +11 -9
- package/helps/release-note.zh.md +11 -9
- package/package.json +50 -50
- package/server/entities/index.ts +2 -2
- package/server/entities/warehouse-bizplace-onhand-inventory.ts +141 -0
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
- 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 +68 -0
- 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 +2 -1
- package/server/opa-app-setting-constants.ts +1 -0
- package/things-factory.config.js +13 -0
- package/translations/en.json +48 -8
- package/translations/ko.json +35 -1
- package/translations/ms.json +35 -1
- package/translations/zh.json +35 -1
- package/config.development.js +0 -73
- package/config.production.js +0 -113
|
@@ -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'
|
|
@@ -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'
|
|
@@ -372,7 +372,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
372
372
|
this.productBarcodeInput.readOnly = false
|
|
373
373
|
this.productBarcodeInput.value = ''
|
|
374
374
|
}
|
|
375
|
-
if (
|
|
375
|
+
if (record.product?.isRequireSerialNumberScanningInbound) {
|
|
376
376
|
this.serialNumberInput.value = ''
|
|
377
377
|
}
|
|
378
378
|
this.cartonInput.value = ''
|
|
@@ -1090,10 +1090,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1090
1090
|
if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
|
|
1091
1091
|
this._selectedOrderProduct = null
|
|
1092
1092
|
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1093
|
+
if (!this._selectedOrderProduct) {
|
|
1094
|
+
if (foundOrderProducts?.length > 1) {
|
|
1095
|
+
this.selectOrderProduct(foundOrderProducts)
|
|
1096
|
+
} else if (foundOrderProducts?.length == 1) {
|
|
1097
|
+
this._selectedOrderProduct = foundOrderProducts[0]
|
|
1098
|
+
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1099
|
+
this._selectedOrderProduct = foundParentProducts[0]
|
|
1100
|
+
}
|
|
1097
1101
|
}
|
|
1098
1102
|
}
|
|
1099
1103
|
} catch (e) {
|
|
@@ -1206,7 +1210,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1206
1210
|
}
|
|
1207
1211
|
}
|
|
1208
1212
|
|
|
1209
|
-
_openIssueNote() {
|
|
1213
|
+
async _openIssueNote() {
|
|
1214
|
+
await sleep(1010)
|
|
1210
1215
|
openPopup(
|
|
1211
1216
|
html`
|
|
1212
1217
|
<popup-note
|
|
@@ -1407,7 +1412,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1407
1412
|
}
|
|
1408
1413
|
}
|
|
1409
1414
|
|
|
1410
|
-
_openUndoUnloadPopup() {
|
|
1415
|
+
async _openUndoUnloadPopup() {
|
|
1416
|
+
await sleep(1010)
|
|
1411
1417
|
openPopup(
|
|
1412
1418
|
html`
|
|
1413
1419
|
<undo-unload-popup
|
|
@@ -1443,7 +1449,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1443
1449
|
}
|
|
1444
1450
|
)
|
|
1445
1451
|
}
|
|
1446
|
-
|
|
1452
|
+
|
|
1453
|
+
async _reusablePalletMode() {
|
|
1454
|
+
await sleep(1010)
|
|
1447
1455
|
openPopup(
|
|
1448
1456
|
html`
|
|
1449
1457
|
<popup-reusable-pallet
|
|
@@ -1466,7 +1474,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1466
1474
|
)
|
|
1467
1475
|
}
|
|
1468
1476
|
|
|
1469
|
-
_openSerialNumberList() {
|
|
1477
|
+
async _openSerialNumberList() {
|
|
1478
|
+
await sleep(1010)
|
|
1470
1479
|
openPopup(
|
|
1471
1480
|
html`
|
|
1472
1481
|
<serial-number-list-popup
|
|
@@ -1534,7 +1543,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1534
1543
|
})
|
|
1535
1544
|
}
|
|
1536
1545
|
|
|
1537
|
-
_openVasPopup() {
|
|
1546
|
+
async _openVasPopup() {
|
|
1547
|
+
await sleep(1010)
|
|
1538
1548
|
openPopup(
|
|
1539
1549
|
html`
|
|
1540
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),
|
|
@@ -723,11 +728,15 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
723
728
|
|
|
724
729
|
switch (e.detail.column.name) {
|
|
725
730
|
case 'uomValue':
|
|
726
|
-
if (e.detail.after < 0
|
|
731
|
+
if (e.detail.after < 0 || e.detail.after.toString() == NaN.toString()) {
|
|
732
|
+
item._data.records[e.detail.row].uomValue = 0
|
|
733
|
+
this._showToast({ level: 'error', message: i18next.t('text.invalid_uom_value') })
|
|
734
|
+
}
|
|
727
735
|
break
|
|
728
736
|
case 'qty':
|
|
729
|
-
if (e.detail.after < 0 || !Number.isInteger(e.detail.after))
|
|
730
|
-
|
|
737
|
+
if (e.detail.after < 0 || !Number.isInteger(e.detail.after)) {
|
|
738
|
+
this._showToast({ level: 'error', message: i18next.t('text.invalid_qty') })
|
|
739
|
+
}
|
|
731
740
|
break
|
|
732
741
|
case 'unitCost':
|
|
733
742
|
if (e.detail.after < 0) item._data.records[e.detail.row].unitCost = e.detail.before
|
|
@@ -761,6 +770,46 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
761
770
|
}
|
|
762
771
|
}
|
|
763
772
|
|
|
773
|
+
async missingStock() {
|
|
774
|
+
const selectOrderInventory = this.dataGrist.selected
|
|
775
|
+
|
|
776
|
+
const patchesArr = [...selectOrderInventory]
|
|
777
|
+
|
|
778
|
+
const patches = patchesArr.map(p => {
|
|
779
|
+
return {
|
|
780
|
+
palletId: p.palletId,
|
|
781
|
+
transactionType: 'MISSING'
|
|
782
|
+
}
|
|
783
|
+
})
|
|
784
|
+
|
|
785
|
+
const result = await CustomAlert({
|
|
786
|
+
title: i18next.t('title.are_you_sure'),
|
|
787
|
+
text: i18next.t('text.do_you_want_to_mark_it_as_missing'),
|
|
788
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
789
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
790
|
+
})
|
|
791
|
+
|
|
792
|
+
if (result.isConfirmed) {
|
|
793
|
+
try {
|
|
794
|
+
const response = await client.mutate({
|
|
795
|
+
mutation: gql`
|
|
796
|
+
mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
|
|
797
|
+
submitInventoryChanges(patches: $patches)
|
|
798
|
+
}
|
|
799
|
+
`,
|
|
800
|
+
variables: { patches }
|
|
801
|
+
})
|
|
802
|
+
|
|
803
|
+
if (!response.error) {
|
|
804
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
805
|
+
this.updateContext()
|
|
806
|
+
}
|
|
807
|
+
} catch (error) {
|
|
808
|
+
throw new Error(error)
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
764
813
|
async saveInventories() {
|
|
765
814
|
try {
|
|
766
815
|
var patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
@@ -793,18 +842,34 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
793
842
|
})
|
|
794
843
|
|
|
795
844
|
if (patches && patches.length) {
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
845
|
+
const validateInventoryChanges = await client.query({
|
|
846
|
+
query: gql`
|
|
847
|
+
query validateOrderInventory($patches: [InventoryPatch!]!) {
|
|
848
|
+
validateOrderInventory(patches: $patches)
|
|
800
849
|
}
|
|
801
850
|
`,
|
|
802
851
|
variables: { patches }
|
|
803
852
|
})
|
|
804
853
|
|
|
805
|
-
if (
|
|
806
|
-
|
|
807
|
-
|
|
854
|
+
if (validateInventoryChanges.data.validateOrderInventory) {
|
|
855
|
+
const response = await client.mutate({
|
|
856
|
+
mutation: gql`
|
|
857
|
+
mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
|
|
858
|
+
submitInventoryChanges(patches: $patches)
|
|
859
|
+
}
|
|
860
|
+
`,
|
|
861
|
+
variables: { patches }
|
|
862
|
+
})
|
|
863
|
+
|
|
864
|
+
if (!response.errors) {
|
|
865
|
+
this.dataGrist.fetch()
|
|
866
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
867
|
+
}
|
|
868
|
+
} else {
|
|
869
|
+
this._showToast({
|
|
870
|
+
type: 'error',
|
|
871
|
+
message: `${i18next.t('text.complete_the_picking_process_before_adjust_the_batch_number')}`
|
|
872
|
+
})
|
|
808
873
|
}
|
|
809
874
|
}
|
|
810
875
|
} catch (e) {
|
|
@@ -893,7 +958,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
893
958
|
if (!response.errors) {
|
|
894
959
|
history.back()
|
|
895
960
|
this.dataGrist.fetch()
|
|
896
|
-
this._showToast({ message: i18next.t('text.
|
|
961
|
+
this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
|
|
897
962
|
}
|
|
898
963
|
} catch (e) {
|
|
899
964
|
this._showToast(e)
|
|
@@ -1327,10 +1392,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1327
1392
|
}
|
|
1328
1393
|
}
|
|
1329
1394
|
|
|
1330
|
-
_showToast({ type, message }) {
|
|
1395
|
+
_showToast({ level, type, message }) {
|
|
1331
1396
|
document.dispatchEvent(
|
|
1332
1397
|
new CustomEvent('notify', {
|
|
1333
1398
|
detail: {
|
|
1399
|
+
level,
|
|
1334
1400
|
type,
|
|
1335
1401
|
message
|
|
1336
1402
|
}
|
|
@@ -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
|