@things-factory/operato-wms 4.3.260 → 4.3.261
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/inbound/pallet-label-popup.js +4 -0
- package/client/pages/inventory/inventory-adjustment.js +11 -21
- package/client/pages/order/release-order/create-release-order.js +24 -68
- package/client/pages/order/release-order/release-order-detail.js +506 -225
- package/client/pages/report/vas-report.js +36 -36
- package/package.json +5 -5
- package/server/graphql/resolvers/reports/vas-report.ts +1 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +4 -1
- package/translations/ms.json +4 -1
- package/translations/zh.json +4 -1
|
@@ -152,6 +152,8 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
152
152
|
batchId
|
|
153
153
|
batchIdRef
|
|
154
154
|
packingType
|
|
155
|
+
uom
|
|
156
|
+
uomValue
|
|
155
157
|
palletId
|
|
156
158
|
remark
|
|
157
159
|
orderProductRemark
|
|
@@ -187,6 +189,8 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
187
189
|
searchParams.append('type', results[i].product?.type)
|
|
188
190
|
searchParams.append('description', results[i].product?.description)
|
|
189
191
|
searchParams.append('packing', results[i].packingType)
|
|
192
|
+
searchParams.append('uom', results[i].uom)
|
|
193
|
+
searchParams.append('uomValue', results[i].uomValue)
|
|
190
194
|
searchParams.append('customer', results[i].bizplace?.name)
|
|
191
195
|
searchParams.append('date', dateStr)
|
|
192
196
|
searchParams.append('remark', results[i].remark)
|
|
@@ -7,28 +7,14 @@ import '../inventory/serial-number-list-popup'
|
|
|
7
7
|
import '../components/select-product-popup'
|
|
8
8
|
|
|
9
9
|
import gql from 'graphql-tag'
|
|
10
|
-
import {
|
|
11
|
-
css,
|
|
12
|
-
html
|
|
13
|
-
} from 'lit-element'
|
|
10
|
+
import { css, html } from 'lit-element'
|
|
14
11
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
15
12
|
|
|
16
13
|
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
17
|
-
import {
|
|
18
|
-
i18next,
|
|
19
|
-
localize
|
|
20
|
-
} from '@things-factory/i18n-base'
|
|
14
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
21
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
CustomAlert,
|
|
25
|
-
PageView,
|
|
26
|
-
store
|
|
27
|
-
} from '@things-factory/shell'
|
|
28
|
-
import {
|
|
29
|
-
CommonButtonStyles,
|
|
30
|
-
ScrollbarStyles
|
|
31
|
-
} from '@things-factory/styles'
|
|
16
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
17
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
32
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
33
19
|
|
|
34
20
|
import { fetchPageSettings } from '../../util/index'
|
|
@@ -773,7 +759,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
773
759
|
...item,
|
|
774
760
|
sku: item.product.sku,
|
|
775
761
|
brand: item.product.brand,
|
|
776
|
-
unitCost: parseFloat(item.unitCost == null ? 0: item.unitCost).toFixed(2),
|
|
762
|
+
unitCost: parseFloat(item.unitCost == null ? 0 : item.unitCost).toFixed(2),
|
|
777
763
|
lockedQty: item.lockedQty || 0,
|
|
778
764
|
remainQty: item.qty - (item.lockedQty || 0)
|
|
779
765
|
}
|
|
@@ -895,7 +881,8 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
895
881
|
item._data.records[e.detail.row].sku = e.detail.after?.sku ? e.detail.after.sku : ''
|
|
896
882
|
|
|
897
883
|
if (e.detail.before == undefined) {
|
|
898
|
-
item._data.records[e.detail.row].unitCost =
|
|
884
|
+
item._data.records[e.detail.row].unitCost =
|
|
885
|
+
e.detail.after?.costPrice >= 0 ? e.detail.after.costPrice : undefined
|
|
899
886
|
}
|
|
900
887
|
break
|
|
901
888
|
|
|
@@ -1148,7 +1135,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1148
1135
|
throw new Error(i18next.t('text.invalid_unit_cost'))
|
|
1149
1136
|
}
|
|
1150
1137
|
}
|
|
1151
|
-
|
|
1138
|
+
|
|
1152
1139
|
if (itm.unit)
|
|
1153
1140
|
if (itm.location.zone || itm.location.row || itm.location.column) {
|
|
1154
1141
|
//if user repic location after import
|
|
@@ -1529,6 +1516,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1529
1516
|
searchParams.append('description', record.product.description)
|
|
1530
1517
|
searchParams.append('customer', record.bizplace.name)
|
|
1531
1518
|
searchParams.append('packing', record.packingType)
|
|
1519
|
+
searchParams.append('packingSize', record.packingSize)
|
|
1520
|
+
searchParams.append('uom', record.uom)
|
|
1521
|
+
searchParams.append('uomValue', record.uomValue)
|
|
1532
1522
|
searchParams.append('date', dateIn)
|
|
1533
1523
|
searchParams.append('remark', record.remark)
|
|
1534
1524
|
searchParams.append('batchRef', record.batchIdRef)
|
|
@@ -1966,7 +1966,26 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1966
1966
|
invData.productDetailId === event.detail.after.productDetailId &&
|
|
1967
1967
|
invData.batchId === event.detail.after.batchId
|
|
1968
1968
|
)
|
|
1969
|
-
|
|
1969
|
+
const totalQtyVas = this.vasGrist.dirtyData.records.reduce(
|
|
1970
|
+
(total, vas) =>
|
|
1971
|
+
vas.qty &&
|
|
1972
|
+
vas.productId === changeRecord.productId &&
|
|
1973
|
+
vas.productDetailId === changeRecord.productDetailId &&
|
|
1974
|
+
vas.batchId === changeRecord.batchId
|
|
1975
|
+
? total + vas.qty
|
|
1976
|
+
: total,
|
|
1977
|
+
0
|
|
1978
|
+
)
|
|
1979
|
+
const totalReleaseQty = this.inventoryData.records.reduce(
|
|
1980
|
+
(total, inv) =>
|
|
1981
|
+
inv.releaseQty &&
|
|
1982
|
+
inv.productId === changeRecord.productId &&
|
|
1983
|
+
inv.productDetailId === changeRecord.productDetailId &&
|
|
1984
|
+
inv.batchId === changeRecord.batchId
|
|
1985
|
+
? total + inv.releaseQty
|
|
1986
|
+
: total,
|
|
1987
|
+
0
|
|
1988
|
+
)
|
|
1970
1989
|
try {
|
|
1971
1990
|
// to map to the first row
|
|
1972
1991
|
if (
|
|
@@ -1993,47 +2012,13 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1993
2012
|
}
|
|
1994
2013
|
if (changedColumn === 'qty') {
|
|
1995
2014
|
if (changeRecord.qty === undefined) throw new Error(i18next.t('text.there_is_no_selected_items'))
|
|
1996
|
-
//
|
|
2015
|
+
// compare qty
|
|
2016
|
+
if (totalQtyVas > totalReleaseQty) {
|
|
2017
|
+
throw new Error(i18next.t('text.qty_exceed_release_qty'))
|
|
2018
|
+
}
|
|
1997
2019
|
if (changeRecord.qty <= 0 || isNaN(changeRecord.qty)) {
|
|
1998
2020
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
1999
2021
|
}
|
|
2000
|
-
if (this._selectBy === 'pallet') {
|
|
2001
|
-
if (
|
|
2002
|
-
///
|
|
2003
|
-
this.vasData.records.reduce(
|
|
2004
|
-
(total, vas) =>
|
|
2005
|
-
vas.qty &&
|
|
2006
|
-
vas.productId === changeRecord.productId &&
|
|
2007
|
-
vas.productDetailId === changeRecord.productDetailId &&
|
|
2008
|
-
vas.batchId === changeRecord.batchId
|
|
2009
|
-
? total + vas.qty
|
|
2010
|
-
: total,
|
|
2011
|
-
0
|
|
2012
|
-
) > inventoryData.releaseQty
|
|
2013
|
-
|
|
2014
|
-
//
|
|
2015
|
-
) {
|
|
2016
|
-
throw new Error(i18next.t('text.qty_exceed_release_qty'))
|
|
2017
|
-
}
|
|
2018
|
-
} else if (this._selectBy === 'product') {
|
|
2019
|
-
if (changeRecord.qty > inventoryData.releaseQty) {
|
|
2020
|
-
throw new Error(i18next.t('text.qty_exceed_release_qty'))
|
|
2021
|
-
}
|
|
2022
|
-
if (
|
|
2023
|
-
this.vasData.records.reduce(
|
|
2024
|
-
(total, vas) =>
|
|
2025
|
-
vas.qty &&
|
|
2026
|
-
vas.productId === changeRecord.productId &&
|
|
2027
|
-
vas.productDetailId === changeRecord.productDetailId &&
|
|
2028
|
-
vas.batchId === changeRecord.batchId
|
|
2029
|
-
? total + vas.qty
|
|
2030
|
-
: total,
|
|
2031
|
-
0
|
|
2032
|
-
) > inventoryData.releaseQty
|
|
2033
|
-
) {
|
|
2034
|
-
throw new Error(i18next.t('text.qty_exceed_release_qty'))
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
2022
|
//to change uom, vasQty
|
|
2038
2023
|
let uomValue = initialRecord.releaseUomValue / initialRecord.releaseQty
|
|
2039
2024
|
let newUomValue = initialRecord.newUomValue
|
|
@@ -2603,35 +2588,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2603
2588
|
)
|
|
2604
2589
|
}
|
|
2605
2590
|
})
|
|
2606
|
-
|
|
2607
|
-
// unique
|
|
2608
|
-
const unique = []
|
|
2609
|
-
for (const item of this.vasData.records) {
|
|
2610
|
-
// "name" and "location" used for duplicate check
|
|
2611
|
-
const duplicate = unique.find(
|
|
2612
|
-
obj =>
|
|
2613
|
-
obj.name === item.name &&
|
|
2614
|
-
obj.vasGristId === item.vasGristId &&
|
|
2615
|
-
obj.vas.id === item.vas.id &&
|
|
2616
|
-
obj.remark === item.remark &&
|
|
2617
|
-
obj.qty === item.qty &&
|
|
2618
|
-
obj.vasQty === item.vasQty &&
|
|
2619
|
-
obj.outputQty === item.outputQty &&
|
|
2620
|
-
obj.newProductId === item.newProductId &&
|
|
2621
|
-
obj.uom === item.uom &&
|
|
2622
|
-
obj.uomValue === item.uomValue &&
|
|
2623
|
-
obj.newUom === item.newUom &&
|
|
2624
|
-
obj.newUomValue === item.newUomValue &&
|
|
2625
|
-
obj.newPackingType === item.newPackingType
|
|
2626
|
-
)
|
|
2627
|
-
if (!duplicate) {
|
|
2628
|
-
unique.push(item)
|
|
2629
|
-
}
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
if (unique.length != this.vasData.records.length) {
|
|
2633
|
-
throw new Error(i18next.t('text.duplicate_entry_in_vas_details'))
|
|
2634
|
-
}
|
|
2635
2591
|
}
|
|
2636
2592
|
|
|
2637
2593
|
async _openBulkProductSelection(type, rowIndex, record) {
|