@things-factory/operato-wms 5.0.0-alpha.9 → 5.0.0-y.0
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/.eslintrc.json +11 -0
- package/client/constants/index.js +1 -0
- package/client/constants/order.js +14 -0
- package/client/pages/constants/index.js +2 -0
- package/client/pages/constants/inventory-item-change.js +10 -0
- package/client/pages/constants/order.js +5 -0
- package/client/pages/constants/picking-strategy.js +4 -0
- package/client/pages/constants/setting.js +2 -0
- package/client/pages/constants/tote.js +14 -0
- package/client/pages/inbound/inbound-worksheet.js +1 -1
- package/client/pages/inbound/pallet-label-popup.js +6 -0
- package/client/pages/inbound/putaway-product.js +3 -1
- package/client/pages/inbound/serial-number-list-popup.js +0 -1
- package/client/pages/inbound/unload-product.js +21 -11
- package/client/pages/inventory/inventory-adjustment-approval.js +57 -11
- package/client/pages/inventory/inventory-adjustment.js +264 -20
- package/client/pages/inventory/inventory-by-product-detail.js +1 -1
- package/client/pages/inventory/non-loaded-inventory.js +120 -48
- package/client/pages/inventory/onhand-inventory.js +27 -0
- package/client/pages/inventory/serial-number-list-popup.js +468 -0
- package/client/pages/inventory-check/create-cycle-count.js +1 -0
- package/client/pages/inventory-check/inspecting-product.js +13 -7
- package/client/pages/manifest/create-loading-manifest.js +1 -0
- package/client/pages/master/pallet-list.js +24 -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/arrival-notice-list.js +1 -3
- package/client/pages/order/arrival-notice/arrival-notice-requests.js +1 -1
- package/client/pages/order/arrival-notice/edit-product-popup.js +13 -0
- 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/b2b/b2b-order-list.js +25 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +1 -3
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +62 -17
- package/client/pages/order/release-order/batch-picking-popup.js +8 -0
- 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-extra-product-popup.js +15 -10
- 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/delivery-order-list.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 +10 -26
- package/client/pages/outbound/inventory-auto-assign-popup.js +26 -50
- package/client/pages/outbound/loading-product.js +52 -14
- package/client/pages/outbound/merged-outbound-worksheet.js +155 -4
- package/client/pages/outbound/order-remark-popup.js +112 -0
- package/client/pages/outbound/packing-product.js +164 -25
- package/client/pages/outbound/packing-worksheet-list.js +16 -1
- package/client/pages/outbound/picking-product.js +224 -33
- package/client/pages/outbound/picking-replacement-popup.js +5 -0
- package/client/pages/outbound/return-pallet-check-popup.js +7 -1
- package/client/pages/outbound/route-label-popup.js +464 -0
- package/client/pages/outbound/select-operator-popup.js +86 -14
- package/client/pages/outbound/serial-number-popup.js +55 -26
- package/client/pages/outbound/single-outbound-worksheet.js +150 -5
- package/client/pages/outbound/sorting-product.js +198 -44
- package/client/pages/outbound/tote-popup.js +461 -0
- package/client/pages/outbound/worksheet-batch-picking.js +23 -20
- package/client/pages/outbound/worksheet-packing.js +7 -2
- package/client/pages/outbound/worksheet-picking.js +14 -11
- package/client/pages/report/costing-report.js +453 -0
- package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +1 -1
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +2 -2
- package/client/pages/report/inbound-order-details-report.js +14 -0
- package/client/pages/report/inventory-pallet-storage-report.js +1 -1
- package/client/pages/report/inventory-summary-report.js +11 -2
- package/client/pages/report/outbound-order-details-report.js +30 -0
- package/client/pages/report/outbound-serial-number-report.js +11 -4
- package/client/pages/report/volume-summary-report.js +606 -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 +20 -0
- package/cypress/fixtures/globals.json +3 -0
- package/cypress/fixtures/master-data/location.json +31 -0
- package/cypress/fixtures/master-data/pallet.json +129 -0
- package/cypress/fixtures/master-data/palletImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transport-driver.json +22 -0
- package/cypress/fixtures/master-data/transport-vehicle.json +24 -0
- package/cypress/fixtures/master-data/transportDriverDeletedImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportDriverImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleDeletedImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleNameSizeImport.xlsx +0 -0
- package/cypress/fixtures/master-data/transportVehicleNameStatusImport.xlsx +0 -0
- package/cypress/fixtures/master-data/warehouse.json +20 -0
- package/cypress/fixtures/master-data/warehouseImport.xlsx +0 -0
- package/cypress/integration/master-data/location.spec.js +31 -0
- package/cypress/integration/master-data/pallet.spec.js +176 -0
- package/cypress/integration/master-data/transport-driver.spec.js +131 -0
- package/cypress/integration/master-data/transport-vehicle.spec.js +165 -0
- package/cypress/integration/master-data/warehouse.spec.js +135 -0
- package/cypress/plugins/index.js +22 -0
- package/cypress/support/commands.js +425 -0
- package/cypress/support/index.js +31 -0
- package/cypress.json +9 -0
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +3 -1
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/index.js +3 -1
- package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +50 -0
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -0
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +86 -0
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -0
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +9 -10
- 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/costing-report.js +172 -0
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -0
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +13 -4
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js +4 -2
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-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/index.js +5 -1
- package/dist-server/graphql/types/dashboard/index.js.map +1 -1
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +15 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-status.js +14 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-status.js.map +1 -0
- 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/costing-report-list.js +14 -0
- package/dist-server/graphql/types/reports/costing-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/costing-report.js +19 -0
- package/dist-server/graphql/types/reports/costing-report.js.map +1 -0
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -0
- package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +3 -0
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/outbound-serial-number-report.js +2 -1
- package/dist-server/graphql/types/reports/outbound-serial-number-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/migrations/1568858861188-SeedSetting.js +2 -1
- package/dist-server/migrations/1568858861188-SeedSetting.js.map +1 -1
- package/dist-server/opa-app-setting-constants.js +3 -1
- package/dist-server/opa-app-setting-constants.js.map +1 -1
- package/helps/release-note.ko.md +37 -2
- package/helps/release-note.md +19 -48
- package/helps/release-note.ms.md +36 -1
- package/helps/release-note.zh.md +36 -1
- package/package.json +76 -67
- package/server/graphql/resolvers/board-setting/board-settings.ts +6 -2
- package/server/graphql/resolvers/dashboard/index.ts +5 -1
- package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +48 -0
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +93 -0
- package/server/graphql/resolvers/extra/add-release-good-products.ts +29 -15
- package/server/graphql/resolvers/index.ts +3 -2
- package/server/graphql/resolvers/reports/costing-report.ts +196 -0
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -0
- package/server/graphql/resolvers/reports/index.ts +2 -0
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +16 -5
- package/server/graphql/resolvers/reports/outbound-serial-number-report.ts +4 -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/index.ts +5 -1
- package/server/graphql/types/dashboard/inventory-expiry-counter.ts +9 -0
- package/server/graphql/types/dashboard/inventory-expiry-status.ts +8 -0
- package/server/graphql/types/index.ts +4 -4
- package/server/graphql/types/reports/costing-report-list.ts +8 -0
- package/server/graphql/types/reports/costing-report.ts +13 -0
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -0
- package/server/graphql/types/reports/index.ts +7 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +3 -0
- package/server/graphql/types/reports/outbound-serial-number-report.ts +2 -1
- package/server/graphql/types/warehouse-inventory-adjustment/index.ts +5 -0
- package/server/index.ts +1 -1
- package/server/migrations/1568858861188-SeedSetting.ts +5 -2
- package/server/opa-app-setting-constants.ts +3 -1
- package/things-factory.config.js +21 -0
- package/translations/en.json +81 -4
- package/translations/ko.json +182 -129
- package/translations/ms.json +62 -3
- package/translations/zh.json +62 -3
- package/config.development.js +0 -73
- package/config.production.js +0 -113
- package/dist-server/entities/index.js +0 -5
- package/dist-server/entities/index.js.map +0 -1
- package/server/entities/index.ts +0 -3
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": ["cypress"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"cypress/no-assigning-return-values": "error",
|
|
5
|
+
"cypress/no-unnecessary-waiting": "error",
|
|
6
|
+
"cypress/assertion-before-screenshot": "warn",
|
|
7
|
+
"cypress/no-force": "warn",
|
|
8
|
+
"cypress/no-async-tests": "error",
|
|
9
|
+
"cypress/no-pause": "error"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './cargo'
|
|
2
2
|
export * from './claim'
|
|
3
3
|
export * from './inventory'
|
|
4
|
+
export * from './inventory-item-change'
|
|
4
5
|
export * from './location'
|
|
5
6
|
export * from './location-sorting-rule'
|
|
6
7
|
export * from './marketplace'
|
|
@@ -15,3 +16,4 @@ export * from './worksheet'
|
|
|
15
16
|
export * from './pallet'
|
|
16
17
|
export * from './platform'
|
|
17
18
|
export * from './group-type'
|
|
19
|
+
export * from './tote'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const INVENTORY_ITEM_CHANGE_TYPE = {
|
|
2
|
+
NEW: { name: 'new', value: 'NEW' },
|
|
3
|
+
MODIFIED: { name: 'modified', value: 'MODIFIED' },
|
|
4
|
+
REMOVED: { name: 'removed', value: 'REMOVED' }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const INVENTORY_ITEM_CHANGE_TRANSACTION_TYPE = {
|
|
8
|
+
ORIGINAL: { name: 'original', value: 'ORIGINAL' },
|
|
9
|
+
CHANGES: { name: 'changes', value: 'CHANGES' }
|
|
10
|
+
}
|
|
@@ -24,6 +24,11 @@ export const ORDER_TYPES = {
|
|
|
24
24
|
REVERSE_KITTING_ORDER
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export const ORDER_SOURCES = {
|
|
28
|
+
PICKING: { name: 'picking', value: 'picking' },
|
|
29
|
+
PACKING: { name: 'packing', value: 'packing' }
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
export const RO_TYPES = {
|
|
28
33
|
B2B: { name: 'B2B', value: 'b2b' },
|
|
29
34
|
B2C: { name: 'B2C', value: 'b2c' }
|
|
@@ -5,3 +5,5 @@ export const PALLET_LABEL_SETTING_KEY = 'pallet-label'
|
|
|
5
5
|
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
|
+
export const ROUTE_LABEL_SETTING_KEY = 'route-label'
|
|
9
|
+
export const TOTE_LABEL_SETTING_KEY = 'tote-label'
|
|
@@ -195,7 +195,7 @@ class InboundWorksheet extends localize(i18next)(PageView) {
|
|
|
195
195
|
]
|
|
196
196
|
},
|
|
197
197
|
rows: { appendable: false, selectable: { multiple: true } },
|
|
198
|
-
pagination: { limit: 100, pages: [
|
|
198
|
+
pagination: { limit: 100, pages: [100, 200, 500] },
|
|
199
199
|
columns: [
|
|
200
200
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
201
201
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
@@ -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
|
|
@@ -135,7 +135,6 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
|
|
|
135
135
|
|
|
136
136
|
<div class="button-container">
|
|
137
137
|
<mwc-button
|
|
138
|
-
class="mobile-full-width"
|
|
139
138
|
danger
|
|
140
139
|
@click=${() => {
|
|
141
140
|
this.dispatchEvent(new CustomEvent('close-serial-number-list', {}))
|
|
@@ -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
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
import '../inventory/serial-number-list-popup'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { css, html } from 'lit-element'
|
|
@@ -7,9 +8,10 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
7
8
|
|
|
8
9
|
import { getCodeByName } from '@things-factory/code-base'
|
|
9
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
10
|
-
import { client, PageView, store } from '@things-factory/shell'
|
|
11
|
+
import { client, PageView, store,gqlContext } from '@things-factory/shell'
|
|
11
12
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
12
13
|
import { isMobileDevice } from '@things-factory/utils'
|
|
14
|
+
import { openPopup } from '@things-factory/layout-base'
|
|
13
15
|
|
|
14
16
|
class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageView)) {
|
|
15
17
|
static get styles() {
|
|
@@ -62,7 +64,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
62
64
|
config: Object,
|
|
63
65
|
data: Object,
|
|
64
66
|
_detailData: Object,
|
|
65
|
-
_compareColumn: Array
|
|
67
|
+
_compareColumn: Array,
|
|
68
|
+
_selectedInventoryChange: Object
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -119,6 +122,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
async pageInitialized() {
|
|
125
|
+
this._selectedInventoryChange = null
|
|
122
126
|
this._lockedPallet = []
|
|
123
127
|
const partners = await this._fetchPartners()
|
|
124
128
|
const _approvalStatus = await getCodeByName('APPROVAL_STATUS')
|
|
@@ -136,7 +140,10 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
136
140
|
{ column: 'uomValue', name: 'UomValue' },
|
|
137
141
|
{ column: 'expirationDate', name: 'Exp. Date' },
|
|
138
142
|
{ column: 'manufactureDate', name: 'Mfg. Date' },
|
|
139
|
-
{ column: 'unitCost', name: 'Unit Cost' }
|
|
143
|
+
{ column: 'unitCost', name: 'Unit Cost' },
|
|
144
|
+
{ column: 'inventoryItemChange', name: 'Inventory Item Changes' },
|
|
145
|
+
{ column: 'status', name: 'Status' },
|
|
146
|
+
|
|
140
147
|
]
|
|
141
148
|
|
|
142
149
|
this.config = {
|
|
@@ -153,6 +160,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
153
160
|
handlers: {
|
|
154
161
|
click: (columns, data, column, record, rowIndex) => {
|
|
155
162
|
if (record) {
|
|
163
|
+
this._selectedInventoryChange = record
|
|
156
164
|
let recordDiff = []
|
|
157
165
|
let compareData = []
|
|
158
166
|
|
|
@@ -188,7 +196,17 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
188
196
|
} else {
|
|
189
197
|
this._compareColumn.map(item => {
|
|
190
198
|
let currentVal = compareData[item.column]?.name || compareData[item.column] || '[N/A]'
|
|
191
|
-
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
|
+
}
|
|
192
210
|
|
|
193
211
|
recordDiff.push({
|
|
194
212
|
column: item.name,
|
|
@@ -272,7 +290,13 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
272
290
|
pagination: { infinite: true },
|
|
273
291
|
list: { fields: ['column', 'current', 'update'] },
|
|
274
292
|
rows: {
|
|
275
|
-
appendable: false
|
|
293
|
+
appendable: false,
|
|
294
|
+
handlers: {
|
|
295
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
296
|
+
if (record.column == 'Inventory Item Changes')
|
|
297
|
+
this._openSerialNumberPopup(this._selectedInventoryChange, rowIndex)
|
|
298
|
+
}
|
|
299
|
+
}
|
|
276
300
|
},
|
|
277
301
|
columns: [
|
|
278
302
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -392,6 +416,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
392
416
|
batchIdRef
|
|
393
417
|
packingType
|
|
394
418
|
packingSize
|
|
419
|
+
status
|
|
395
420
|
bizplace {
|
|
396
421
|
id
|
|
397
422
|
name
|
|
@@ -420,6 +445,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
420
445
|
packingType
|
|
421
446
|
packingSize
|
|
422
447
|
batchIdRef
|
|
448
|
+
status
|
|
423
449
|
bizplace {
|
|
424
450
|
id
|
|
425
451
|
name
|
|
@@ -536,8 +562,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
536
562
|
if (patches && patches.length) {
|
|
537
563
|
const response = await client.mutate({
|
|
538
564
|
mutation: gql`
|
|
539
|
-
mutation
|
|
540
|
-
|
|
565
|
+
mutation warehouseInventoryAdjustment($patches: [InventoryChangePatch!]!) {
|
|
566
|
+
warehouseInventoryAdjustment(patches: $patches) {
|
|
541
567
|
items {
|
|
542
568
|
id
|
|
543
569
|
}
|
|
@@ -545,13 +571,14 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
545
571
|
}
|
|
546
572
|
}
|
|
547
573
|
`,
|
|
548
|
-
variables: { patches }
|
|
574
|
+
variables: { patches },
|
|
575
|
+
context: gqlContext()
|
|
549
576
|
})
|
|
550
577
|
if (!response.errors) {
|
|
551
|
-
this._lockedPallet = response.data.
|
|
578
|
+
this._lockedPallet = response.data.warehouseInventoryAdjustment.items
|
|
552
579
|
this._showToast({
|
|
553
580
|
message:
|
|
554
|
-
response.data.
|
|
581
|
+
response.data.warehouseInventoryAdjustment.total > 0
|
|
555
582
|
? 'Highlighted pallet could not be approved due to ongoing process.'
|
|
556
583
|
: i18next.t('text.data_approved'),
|
|
557
584
|
option: 7000
|
|
@@ -629,6 +656,25 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
629
656
|
}
|
|
630
657
|
}
|
|
631
658
|
|
|
659
|
+
_openSerialNumberPopup(inventory, rowIndex) {
|
|
660
|
+
openPopup(
|
|
661
|
+
html`
|
|
662
|
+
<serial-number-list-popup
|
|
663
|
+
.title="${i18next.t('title.serial_number_list')}"
|
|
664
|
+
.inventory=${inventory}
|
|
665
|
+
.adjustmentType=${'APPROVAL'}
|
|
666
|
+
.enableRemove=${false}
|
|
667
|
+
.enableUpdateBtn=${false}
|
|
668
|
+
></serial-number-list-popup>
|
|
669
|
+
`,
|
|
670
|
+
{
|
|
671
|
+
backdrop: false,
|
|
672
|
+
size: 'large',
|
|
673
|
+
title: i18next.t('title.serial_number_list')
|
|
674
|
+
}
|
|
675
|
+
)
|
|
676
|
+
}
|
|
677
|
+
|
|
632
678
|
_showToast({ type, message, option }) {
|
|
633
679
|
document.dispatchEvent(
|
|
634
680
|
new CustomEvent('notify', {
|
|
@@ -646,4 +692,4 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
|
|
|
646
692
|
}
|
|
647
693
|
}
|
|
648
694
|
|
|
649
|
-
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|
|
695
|
+
window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
|