@things-factory/operato-wms 4.3.640 → 4.3.642
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/adjustment/transfer-inventory.js +12 -7
- package/client/pages/bulk-operation/bulk-operation.js +23 -25
- package/client/pages/bulk-operation/validate-b2c-ro-popup.js +4 -14
- package/client/pages/bulk-operation/validate-gan-popup.js +11 -26
- package/client/pages/bulk-operation/validate-ro-popup.js +6 -16
- package/client/pages/components/list-view/product-list-view.js +1 -1
- package/client/pages/components/select-inventory-popup.js +5 -1
- package/client/pages/components/select-product-popup.js +9 -4
- package/client/pages/constants/replenishment-config.js +5 -5
- package/client/pages/inbound/putaway/putaway-product.js +70 -92
- package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +3 -10
- package/client/pages/inbound/putaway/putaway-same-carton-popup.js +1 -1
- package/client/pages/inbound/putaway/putaway-worksheet-generate-popup.js +1 -1
- package/client/pages/inbound/putaway/undo-putaway-popup.js +16 -19
- package/client/pages/inbound/putaway/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/putaway/worksheet-putaway.js +3 -3
- package/client/pages/inbound/undo-unload-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +37 -33
- package/client/pages/inbound/unloaded-inventories-popup.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +2 -2
- package/client/pages/inventory/inventory-adjustment.js +20 -5
- package/client/pages/inventory/inventory-by-product.js +43 -43
- package/client/pages/inventory/onhand-inventory.js +2 -2
- package/client/pages/inventory-check/add-extra-inventory-popup.js +10 -2
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +2 -2
- package/client/pages/inventory-check/cycle-count-report.js +14 -19
- package/client/pages/inventory-check/inspecting-product.js +14 -2
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +23 -27
- package/client/pages/order/arrival-notice/assign-buffer-location.js +2 -2
- package/client/pages/order/arrival-notice/check-arrived-notice.js +2 -2
- package/client/pages/order/arrival-notice/create-arrival-notice.js +42 -43
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +8 -8
- package/client/pages/order/arrival-notice/edit-product-popup.js +29 -27
- package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +3 -3
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -3
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -2
- package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +92 -91
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +61 -56
- package/client/pages/order/release-order/create-release-order.js +65 -56
- package/client/pages/order/release-order/receive-release-order-request.js +1 -1
- package/client/pages/order/release-order/rejected-release-order.js +2 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +11 -7
- package/client/pages/order/release-order/release-order-detail.js +158 -116
- package/client/pages/order/return-order/create-return-order.js +16 -3
- package/client/pages/order/return-order/return-order-inventory-popup.js +2 -1
- package/client/pages/outbound/inventory-assign-popup.js +2 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +1 -1
- package/client/pages/outbound/inventory-reassign-popup.js +6 -6
- package/client/pages/outbound/loading-product.js +3 -3
- package/client/pages/outbound/loading-v2/load-by-qty.js +2 -2
- package/client/pages/outbound/loading-v2/loading-execution-base.js +4 -4
- package/client/pages/outbound/packing-product.js +7 -26
- package/client/pages/outbound/picking-product.js +36 -16
- package/client/pages/outbound/picking-replacement-popup.js +4 -4
- package/client/pages/outbound/picking-v2/picking-execution-base.js +8 -4
- package/client/pages/outbound/sorting-product.js +5 -7
- package/client/pages/outbound/worksheet-batch-picking.js +30 -43
- package/client/pages/outbound/worksheet-loading.js +2 -2
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +23 -19
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +12 -23
- package/client/pages/outbound/worksheet-zone-picking.js +3 -3
- package/client/pages/replenishment/replenishment.js +1 -1
- package/client/pages/report/replenishment-report.js +5 -14
- package/client/pages/report/volume-summary-report.js +6 -6
- package/dist-server/graphql/resolvers/outbound/sort-item.js +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js +2 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +18 -7
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -1
- package/dist-server/graphql/types/outbound/index.js +1 -1
- package/dist-server/graphql/types/reports/cycle-count-report.js +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -2
- package/dist-server/graphql/types/zone-worksheet/index.js +1 -1
- package/package.json +16 -16
- package/server/graphql/resolvers/outbound/sort-item.ts +1 -1
- package/server/graphql/resolvers/reports/cycle-count-report.ts +2 -1
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +20 -8
- package/server/graphql/types/outbound/index.ts +1 -1
- package/server/graphql/types/reports/cycle-count-report.ts +1 -1
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -2
- package/server/graphql/types/zone-worksheet/index.ts +1 -1
- package/translations/en.json +265 -259
- package/translations/ko.json +1 -0
- package/translations/ms.json +1580 -1463
- package/translations/zh.json +2354 -2150
|
@@ -8,38 +8,18 @@ import './putaway-replenishment-inventory-popup'
|
|
|
8
8
|
import './putaway-replenishment-same-product-popup'
|
|
9
9
|
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
|
-
import {
|
|
12
|
-
css,
|
|
13
|
-
html
|
|
14
|
-
} from 'lit-element'
|
|
11
|
+
import { css, html } from 'lit-element'
|
|
15
12
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
16
13
|
|
|
17
14
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
18
|
-
import {
|
|
19
|
-
i18next,
|
|
20
|
-
localize
|
|
21
|
-
} from '@things-factory/i18n-base'
|
|
15
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
22
16
|
import { openPopup } from '@things-factory/layout-base'
|
|
23
|
-
import {
|
|
24
|
-
client,
|
|
25
|
-
CustomAlert,
|
|
26
|
-
PageView,
|
|
27
|
-
store
|
|
28
|
-
} from '@things-factory/shell'
|
|
17
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
29
18
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
30
|
-
import {
|
|
31
|
-
isMobileDevice,
|
|
32
|
-
sleep
|
|
33
|
-
} from '@things-factory/utils'
|
|
19
|
+
import { isMobileDevice, sleep } from '@things-factory/utils'
|
|
34
20
|
|
|
35
21
|
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
36
|
-
import {
|
|
37
|
-
ARRIVAL_NOTICE,
|
|
38
|
-
CUSTOMER_RETURN,
|
|
39
|
-
REPLENISHMENT,
|
|
40
|
-
WAREHOUSE_RETURN,
|
|
41
|
-
WORKSHEET_STATUS
|
|
42
|
-
} from '../../constants'
|
|
22
|
+
import { ARRIVAL_NOTICE, CUSTOMER_RETURN, REPLENISHMENT, WAREHOUSE_RETURN, WORKSHEET_STATUS } from '../../constants'
|
|
43
23
|
|
|
44
24
|
const OPERATION_TYPE = {
|
|
45
25
|
PUTAWAY: 'putaway',
|
|
@@ -214,7 +194,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
214
194
|
width: 140
|
|
215
195
|
},
|
|
216
196
|
{
|
|
217
|
-
type: '
|
|
197
|
+
type: 'float',
|
|
218
198
|
name: 'qty',
|
|
219
199
|
header: i18next.t('field.qty'),
|
|
220
200
|
width: 80
|
|
@@ -371,52 +351,48 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
371
351
|
? html` <label>${i18next.t('label.recommend_location')}</label>
|
|
372
352
|
<input name="recommendLocation" type="text" value=${this.recommendLocationName} readonly />`
|
|
373
353
|
: html``}
|
|
374
|
-
${this._enableCartonLabel
|
|
375
|
-
? html`
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
}}"
|
|
403
|
-
></barcode-scanable-input>`
|
|
404
|
-
}`
|
|
354
|
+
${this._enableCartonLabel
|
|
355
|
+
? html` ${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value && this._enableProductScanning
|
|
356
|
+
? html` <label>${i18next.t('label.product_barcode')}</label>
|
|
357
|
+
<barcode-scanable-input
|
|
358
|
+
name="productBarcode"
|
|
359
|
+
without-enter
|
|
360
|
+
custom-input
|
|
361
|
+
?scan-only=${this._pageSettings?.cameraScanOnly}
|
|
362
|
+
@keypress="${async e => {
|
|
363
|
+
if (e.keyCode === 13) {
|
|
364
|
+
e.preventDefault()
|
|
365
|
+
await this._putaway(e)
|
|
366
|
+
}
|
|
367
|
+
}}"
|
|
368
|
+
></barcode-scanable-input>`
|
|
369
|
+
: html` <label>${i18next.t('label.carton_id')}</label>
|
|
370
|
+
<barcode-scanable-input
|
|
371
|
+
name="cartonId"
|
|
372
|
+
custom-input
|
|
373
|
+
?scan-only=${this._pageSettings?.cameraScanOnly}
|
|
374
|
+
@keypress="${async e => {
|
|
375
|
+
if (e.keyCode === 13) {
|
|
376
|
+
e.preventDefault()
|
|
377
|
+
await this._putaway(e)
|
|
378
|
+
}
|
|
379
|
+
}}"
|
|
380
|
+
></barcode-scanable-input>`}`
|
|
405
381
|
: html`
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
382
|
+
<label>${i18next.t('label.lot_id')}</label>
|
|
383
|
+
<barcode-scanable-input
|
|
384
|
+
name="palletId"
|
|
385
|
+
.value=${this._pallet}
|
|
386
|
+
custom-input
|
|
387
|
+
?scan-only=${this._pageSettings?.cameraScanOnly}
|
|
388
|
+
@keypress="${async e => {
|
|
389
|
+
if (e.keyCode === 13) {
|
|
390
|
+
e.preventDefault()
|
|
391
|
+
await this._putaway(e)
|
|
392
|
+
}
|
|
393
|
+
}}"
|
|
394
|
+
></barcode-scanable-input>
|
|
395
|
+
`}
|
|
420
396
|
${this._operationType === OPERATION_TYPE.PUTAWAY
|
|
421
397
|
? html`
|
|
422
398
|
${!this.incompleteLocationName
|
|
@@ -496,7 +472,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
496
472
|
: html``}
|
|
497
473
|
</fieldset>
|
|
498
474
|
</form>
|
|
499
|
-
|
|
475
|
+
|
|
500
476
|
<data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
|
|
501
477
|
<div slot="headroom" id="form-section">
|
|
502
478
|
<form id="info-form" class="multi-column-form">
|
|
@@ -1239,9 +1215,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1239
1215
|
|
|
1240
1216
|
if (this._enableCartonLabel && this._enableProductScanning) {
|
|
1241
1217
|
this._records.forEach(record => {
|
|
1242
|
-
worksheetDetailNames.push(record.name)
|
|
1243
|
-
})
|
|
1244
|
-
} else {
|
|
1218
|
+
worksheetDetailNames.push(record.name)
|
|
1219
|
+
})
|
|
1220
|
+
} else {
|
|
1245
1221
|
worksheetDetailNames = await this._getWorksheetDetailNames(locationDetails)
|
|
1246
1222
|
}
|
|
1247
1223
|
|
|
@@ -1419,21 +1395,21 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1419
1395
|
}
|
|
1420
1396
|
})
|
|
1421
1397
|
} else if (this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
1422
|
-
if(this._enableProductScanning) {
|
|
1398
|
+
if (this._enableProductScanning) {
|
|
1423
1399
|
await this._checkedScannedProduct(e)
|
|
1424
1400
|
return
|
|
1425
1401
|
} else {
|
|
1426
1402
|
records = this.data.records
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1403
|
+
.filter(record => record.cartonId === this.getInput(this.cartonInput).value && record.status !== 'DONE')
|
|
1404
|
+
.map(record => {
|
|
1405
|
+
return {
|
|
1406
|
+
name: record.name,
|
|
1407
|
+
expirationDate: record.expirationDate,
|
|
1408
|
+
minInboundShelfLife: record.product.minInboundShelfLife,
|
|
1409
|
+
palletId: record.palletId,
|
|
1410
|
+
cartonId: record.cartonId
|
|
1411
|
+
}
|
|
1412
|
+
})
|
|
1437
1413
|
}
|
|
1438
1414
|
}
|
|
1439
1415
|
if (records.length > 1) {
|
|
@@ -1476,7 +1452,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1476
1452
|
html`
|
|
1477
1453
|
<putaway-replenishment-same-product-popup
|
|
1478
1454
|
.putawayInventories="${this.data.records.filter(
|
|
1479
|
-
record =>
|
|
1455
|
+
record => orderProduct.some(op => op.sku === record.sku) && record.completed === false
|
|
1480
1456
|
)}"
|
|
1481
1457
|
@selections="${async e => {
|
|
1482
1458
|
this._selectedOrderProduct = e.detail
|
|
@@ -1533,7 +1509,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1533
1509
|
this._focusOnCartonInput()
|
|
1534
1510
|
throw new Error(i18next.t('text.carton_id_is_empty'))
|
|
1535
1511
|
}
|
|
1536
|
-
|
|
1512
|
+
|
|
1537
1513
|
if (!this.data.records.map(record => record.cartonId).includes(cartonInputValue)) {
|
|
1538
1514
|
this.getInput(this.cartonInput).value = ''
|
|
1539
1515
|
this._focusOnCartonInput()
|
|
@@ -1545,7 +1521,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1545
1521
|
}
|
|
1546
1522
|
}
|
|
1547
1523
|
|
|
1548
|
-
if(!this.actualQtyInput || isNaN(
|
|
1524
|
+
if (!this.actualQtyInput || isNaN(parseFloat(this.actualQtyInput.value))) {
|
|
1549
1525
|
this._focusOnActualQtyInput()
|
|
1550
1526
|
throw new Error(i18next.t('text.actual_qty_is_invalid'))
|
|
1551
1527
|
}
|
|
@@ -1753,7 +1729,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1753
1729
|
<undo-putaway-popup
|
|
1754
1730
|
.enableCartonLabel="${this._enableCartonLabel}"
|
|
1755
1731
|
.enableProductScanning="${this._enableProductScanning}"
|
|
1756
|
-
.replenishmentId=
|
|
1732
|
+
.replenishmentId="${this.refOrderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value
|
|
1733
|
+
? this._replenishmentId
|
|
1734
|
+
: null}"
|
|
1757
1735
|
.orderType="${this.refOrderType}"
|
|
1758
1736
|
.orderNo="${this._orderNo}"
|
|
1759
1737
|
.putawayInventories="${this.data.records.filter(itm => itm.status == 'DONE')}"
|
|
@@ -1946,7 +1924,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1946
1924
|
} else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
|
|
1947
1925
|
this._records.push(foundParentProducts[0])
|
|
1948
1926
|
}
|
|
1949
|
-
|
|
1927
|
+
|
|
1950
1928
|
if (this._records.some(record => record.expirationDate) && locationDetails) {
|
|
1951
1929
|
let answer = await this._checkExpiry([this._records], locationDetails.type)
|
|
1952
1930
|
if (answer) {
|
|
@@ -1955,7 +1933,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1955
1933
|
}
|
|
1956
1934
|
this._transactionHandler(e)
|
|
1957
1935
|
} else {
|
|
1958
|
-
return this._showToast({ message: i18next.t('text.no_matching_product_found')})
|
|
1936
|
+
return this._showToast({ message: i18next.t('text.no_matching_product_found') })
|
|
1959
1937
|
}
|
|
1960
1938
|
}
|
|
1961
1939
|
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
css,
|
|
5
|
-
html,
|
|
6
|
-
LitElement
|
|
7
|
-
} from 'lit-element'
|
|
3
|
+
import { css, html, LitElement } from 'lit-element'
|
|
8
4
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
9
5
|
|
|
10
6
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
11
|
-
import {
|
|
12
|
-
i18next,
|
|
13
|
-
localize
|
|
14
|
-
} from '@things-factory/i18n-base'
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
15
8
|
import { store } from '@things-factory/shell'
|
|
16
9
|
import { isMobileDevice } from '@things-factory/utils'
|
|
17
10
|
|
|
@@ -155,7 +148,7 @@ class PutawaySameCartonPopup extends connect(store)(localize(i18next)(LitElement
|
|
|
155
148
|
width: 100
|
|
156
149
|
},
|
|
157
150
|
{
|
|
158
|
-
type: '
|
|
151
|
+
type: 'float',
|
|
159
152
|
name: 'qty',
|
|
160
153
|
label: true,
|
|
161
154
|
header: i18next.t('field.qty'),
|
|
@@ -190,7 +190,7 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
190
190
|
width: 100
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
type: '
|
|
193
|
+
type: 'float',
|
|
194
194
|
name: 'qty',
|
|
195
195
|
label: true,
|
|
196
196
|
header: i18next.t('field.qty'),
|
|
@@ -249,25 +249,20 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
249
249
|
if (this.enableCartonLabel) {
|
|
250
250
|
if (this.enableProductScanning && this.orderType === AVAIL_ORDER_TYPES.REPLENISHMENT.value) {
|
|
251
251
|
let inventories = await this._getReplenishedInventories()
|
|
252
|
-
const matchedInventories = inventories.filter(
|
|
253
|
-
|
|
254
|
-
)
|
|
255
|
-
|
|
252
|
+
const matchedInventories = inventories.filter(inventory => inventory.cartonId === this.cartonInput?.value)
|
|
253
|
+
|
|
256
254
|
if (matchedInventories.length > 0) {
|
|
257
255
|
targetedUndoInventories = this.putawayInventories
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}}
|
|
266
|
-
)
|
|
256
|
+
.filter(inventory => matchedInventories.some(inv => inventory.cartonId === inv.refInventory?.cartonId))
|
|
257
|
+
.map(inventory => {
|
|
258
|
+
return {
|
|
259
|
+
...inventory,
|
|
260
|
+
newCartonId: matchedInventories[0].cartonId
|
|
261
|
+
}
|
|
262
|
+
})
|
|
267
263
|
} else {
|
|
268
264
|
targetedUndoInventories = []
|
|
269
265
|
}
|
|
270
|
-
|
|
271
266
|
} else {
|
|
272
267
|
targetedUndoInventories = this.putawayInventories.filter(
|
|
273
268
|
inventory => inventory.cartonId === this.cartonInput?.value
|
|
@@ -306,7 +301,7 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
306
301
|
items {
|
|
307
302
|
cartonId
|
|
308
303
|
refInventory {
|
|
309
|
-
cartonId
|
|
304
|
+
cartonId
|
|
310
305
|
}
|
|
311
306
|
}
|
|
312
307
|
}
|
|
@@ -410,9 +405,11 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
410
405
|
}
|
|
411
406
|
}
|
|
412
407
|
|
|
413
|
-
const cartonId = this.enableCartonLabel
|
|
414
|
-
|
|
415
|
-
|
|
408
|
+
const cartonId = this.enableCartonLabel
|
|
409
|
+
? this.enableProductScanning
|
|
410
|
+
? selectedInventories[0].newCartonId
|
|
411
|
+
: selectedInventories[0].cartonId
|
|
412
|
+
: null
|
|
416
413
|
|
|
417
414
|
const response = await client.mutate({
|
|
418
415
|
mutation: gql`
|
|
@@ -254,7 +254,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
|
|
|
254
254
|
width: 100
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
|
-
type: '
|
|
257
|
+
type: 'float',
|
|
258
258
|
name: 'qty',
|
|
259
259
|
header: i18next.t('field.qty'),
|
|
260
260
|
width: 80
|
|
@@ -312,13 +312,13 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
|
|
|
312
312
|
width: 120
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
|
-
type: '
|
|
315
|
+
type: 'float',
|
|
316
316
|
name: 'qty',
|
|
317
317
|
header: i18next.t('field.qty'),
|
|
318
318
|
width: 80
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
|
-
type: '
|
|
321
|
+
type: 'float',
|
|
322
322
|
name: 'uomValue',
|
|
323
323
|
header: i18next.t('field.uom_value'),
|
|
324
324
|
width: 80
|
|
@@ -10,37 +10,19 @@ import './select-product-batch'
|
|
|
10
10
|
import './serial-number-list-popup'
|
|
11
11
|
|
|
12
12
|
import gql from 'graphql-tag'
|
|
13
|
-
import {
|
|
14
|
-
css,
|
|
15
|
-
html
|
|
16
|
-
} from 'lit-element'
|
|
13
|
+
import { css, html } from 'lit-element'
|
|
17
14
|
import orderBy from 'lodash-es/orderBy'
|
|
18
15
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
19
16
|
|
|
20
17
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
21
|
-
import {
|
|
22
|
-
i18next,
|
|
23
|
-
localize
|
|
24
|
-
} from '@things-factory/i18n-base'
|
|
18
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
25
19
|
import { openPopup } from '@things-factory/layout-base'
|
|
26
|
-
import {
|
|
27
|
-
client,
|
|
28
|
-
CustomAlert,
|
|
29
|
-
PageView,
|
|
30
|
-
store
|
|
31
|
-
} from '@things-factory/shell'
|
|
20
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
32
21
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
33
|
-
import {
|
|
34
|
-
isMobileDevice,
|
|
35
|
-
sleep
|
|
36
|
-
} from '@things-factory/utils'
|
|
22
|
+
import { isMobileDevice, sleep } from '@things-factory/utils'
|
|
37
23
|
|
|
38
24
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
39
|
-
import {
|
|
40
|
-
ARRIVAL_NOTICE,
|
|
41
|
-
RETURN_ORDER,
|
|
42
|
-
VAS_TYPE
|
|
43
|
-
} from '../constants'
|
|
25
|
+
import { ARRIVAL_NOTICE, RETURN_ORDER, VAS_TYPE } from '../constants'
|
|
44
26
|
|
|
45
27
|
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, RETURN_ORDER }
|
|
46
28
|
class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
@@ -668,26 +650,26 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
668
650
|
}
|
|
669
651
|
},
|
|
670
652
|
{
|
|
671
|
-
type: '
|
|
653
|
+
type: 'float',
|
|
672
654
|
name: 'packQty',
|
|
673
655
|
label: true,
|
|
674
656
|
header: i18next.t('field.total_pack_qty'),
|
|
675
657
|
width: 90,
|
|
676
658
|
imex: {
|
|
677
|
-
type: '
|
|
659
|
+
type: 'float',
|
|
678
660
|
key: 'packQty',
|
|
679
661
|
header: i18next.t('field.total_pack_qty'),
|
|
680
662
|
width: 20
|
|
681
663
|
}
|
|
682
664
|
},
|
|
683
665
|
{
|
|
684
|
-
type: '
|
|
666
|
+
type: 'float',
|
|
685
667
|
name: 'actualPackQty',
|
|
686
668
|
label: true,
|
|
687
669
|
header: i18next.t('field.actual_pack_qty'),
|
|
688
670
|
width: 100,
|
|
689
671
|
imex: {
|
|
690
|
-
type: '
|
|
672
|
+
type: 'float',
|
|
691
673
|
key: 'actualPackQty',
|
|
692
674
|
header: i18next.t('field.actual_pack_qty'),
|
|
693
675
|
width: 25
|
|
@@ -770,6 +752,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
770
752
|
description
|
|
771
753
|
isRequiredCheckExpiry
|
|
772
754
|
isRequireSerialNumberScanningInbound
|
|
755
|
+
isInventoryDecimal
|
|
773
756
|
minInboundShelfLife
|
|
774
757
|
}
|
|
775
758
|
name
|
|
@@ -863,7 +846,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
863
846
|
if (this.expDateInput?.value) {
|
|
864
847
|
this.expDateInput.value = null
|
|
865
848
|
}
|
|
866
|
-
|
|
849
|
+
|
|
867
850
|
if (this._enableCartonLabel) {
|
|
868
851
|
this.cartonInput.value = ''
|
|
869
852
|
this.productBarcodeInput.value = ''
|
|
@@ -912,6 +895,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
912
895
|
sku
|
|
913
896
|
isRequiredCheckExpiry
|
|
914
897
|
isRequireSerialNumberScanningInbound
|
|
898
|
+
isInventoryDecimal
|
|
915
899
|
minInboundShelfLife
|
|
916
900
|
}
|
|
917
901
|
inventory {
|
|
@@ -1262,6 +1246,12 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1262
1246
|
}
|
|
1263
1247
|
|
|
1264
1248
|
try {
|
|
1249
|
+
// Add validation for qty
|
|
1250
|
+
const qty = parseFloat(this.actualQtyInput.value)
|
|
1251
|
+
if (isNaN(qty)) {
|
|
1252
|
+
throw new Error(i18next.t('text.invalid_quantity'))
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1265
1255
|
const response = await client.mutate({
|
|
1266
1256
|
mutation: gql`
|
|
1267
1257
|
mutation unload(
|
|
@@ -1291,7 +1281,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1291
1281
|
inventory: {
|
|
1292
1282
|
palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
|
|
1293
1283
|
cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
|
|
1294
|
-
qty:
|
|
1284
|
+
qty: qty, // Use the validated qty
|
|
1295
1285
|
expirationDate: this._isRequiredCheckExpiry ? this.expDateInput.value : null,
|
|
1296
1286
|
reusablePallet: this._usingReusablePallet ? this._reusablePallet : null
|
|
1297
1287
|
},
|
|
@@ -1327,6 +1317,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1327
1317
|
sku
|
|
1328
1318
|
isRequiredCheckExpiry
|
|
1329
1319
|
isRequireSerialNumberScanningInbound
|
|
1320
|
+
isInventoryDecimal
|
|
1330
1321
|
minInboundShelfLife
|
|
1331
1322
|
}
|
|
1332
1323
|
}
|
|
@@ -1357,6 +1348,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1357
1348
|
sku
|
|
1358
1349
|
isRequiredCheckExpiry
|
|
1359
1350
|
isRequireSerialNumberScanningInbound
|
|
1351
|
+
isInventoryDecimal
|
|
1360
1352
|
minInboundShelfLife
|
|
1361
1353
|
}
|
|
1362
1354
|
}
|
|
@@ -1514,16 +1506,22 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1514
1506
|
}
|
|
1515
1507
|
} else {
|
|
1516
1508
|
// 4. qty value existing
|
|
1517
|
-
if (!
|
|
1509
|
+
if (!parseFloat(this.actualQtyInput.value)) {
|
|
1518
1510
|
this._focusOnActualQtyInput()
|
|
1519
1511
|
throw new Error(i18next.t('text.qty_is_empty'))
|
|
1520
1512
|
}
|
|
1521
1513
|
|
|
1522
1514
|
// 5. qty value has to be positive
|
|
1523
|
-
if (!(
|
|
1515
|
+
if (!(parseFloat(this.actualQtyInput.value) > 0)) {
|
|
1524
1516
|
setTimeout(() => this.actualQtyInput.select(), 100)
|
|
1525
1517
|
throw new Error(i18next.t('text.qty_should_be_positive'))
|
|
1526
1518
|
}
|
|
1519
|
+
|
|
1520
|
+
// Check if quantity has decimals and validate against product settings
|
|
1521
|
+
const qty = parseFloat(this.actualQtyInput.value)
|
|
1522
|
+
if (qty % 1 !== 0 && !this._selectedOrderProduct.product.isInventoryDecimal) {
|
|
1523
|
+
throw new Error(i18next.t('text.decimal_quantities_not_allowed'))
|
|
1524
|
+
}
|
|
1527
1525
|
}
|
|
1528
1526
|
|
|
1529
1527
|
if (this._isRequiredCheckExpiry) {
|
|
@@ -1549,15 +1547,21 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1549
1547
|
let orderProducts = await this._checkedScannedProduct()
|
|
1550
1548
|
|
|
1551
1549
|
if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
|
|
1552
|
-
if (!
|
|
1550
|
+
if (!parseFloat(this.actualQtyInput.value)) {
|
|
1553
1551
|
this._focusOnActualQtyInput()
|
|
1554
1552
|
throw new Error(i18next.t('text.enter_qty'))
|
|
1555
1553
|
}
|
|
1556
1554
|
|
|
1557
|
-
if (!(
|
|
1555
|
+
if (!(parseFloat(this.actualQtyInput.value) > 0)) {
|
|
1558
1556
|
setTimeout(() => this.actualQtyInput.select(), 100)
|
|
1559
1557
|
throw new Error(i18next.t('text.qty_should_be_positive'))
|
|
1560
1558
|
}
|
|
1559
|
+
|
|
1560
|
+
// Check if quantity has decimals and validate against product settings
|
|
1561
|
+
const qty = parseFloat(this.actualQtyInput.value)
|
|
1562
|
+
if (qty % 1 !== 0 && !this._selectedOrderProduct.product.isInventoryDecimal) {
|
|
1563
|
+
throw new Error(i18next.t('text.decimal_quantities_not_allowed'))
|
|
1564
|
+
}
|
|
1561
1565
|
} else if (this._isRequireSerialNumberScanningInbound) {
|
|
1562
1566
|
if (!this.serialNumberInput?.value) {
|
|
1563
1567
|
this._focusOnSerialNumberInput()
|
|
@@ -314,13 +314,13 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
|
|
|
314
314
|
width: 80
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
|
-
type: '
|
|
317
|
+
type: 'float',
|
|
318
318
|
name: 'packQty',
|
|
319
319
|
header: i18next.t('field.pack_qty'),
|
|
320
320
|
width: 80
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
|
-
type: '
|
|
323
|
+
type: 'float',
|
|
324
324
|
name: 'totalUomValue',
|
|
325
325
|
header: i18next.t('field.total_uom'),
|
|
326
326
|
width: 120
|