@things-factory/operato-wms 4.3.14 → 4.3.17
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/inventory/inventory-adjustment.js +36 -3
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +38 -20
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
- package/package.json +5 -5
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +38 -20
- package/translations/en.json +1 -0
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
|
@@ -712,15 +712,17 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
712
712
|
const record = event.detail
|
|
713
713
|
const columnName = event.detail.column.name
|
|
714
714
|
|
|
715
|
-
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
|
+
) {
|
|
716
720
|
delete this.dataGrist._data.records[event.detail.row].product
|
|
717
721
|
delete this.dataGrist._data.records[event.detail.row].sku
|
|
718
722
|
delete this.dataGrist._data.records[event.detail.row].brand
|
|
719
723
|
delete this.dataGrist._data.records[event.detail.row].packingType
|
|
720
724
|
delete this.dataGrist._data.records[event.detail.row].packingSize
|
|
721
725
|
delete this.dataGrist._data.records[event.detail.row].uom
|
|
722
|
-
delete this.dataGrist._data.records[event.detail.row].qty
|
|
723
|
-
delete this.dataGrist._data.records[event.detail.row].uomValue
|
|
724
726
|
}
|
|
725
727
|
}
|
|
726
728
|
|
|
@@ -729,6 +731,15 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
729
731
|
|
|
730
732
|
let item = e.target.localName == 'import-pop-up' ? popUpDataGrist : this.dataGrist
|
|
731
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
|
+
|
|
732
743
|
switch (e.detail.column.name) {
|
|
733
744
|
case 'uomValue':
|
|
734
745
|
if (e.detail.after < 0 || e.detail.after.toString() == NaN.toString()) {
|
|
@@ -758,6 +769,21 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
758
769
|
|
|
759
770
|
item._data.records[e.detail.row].sku = e.detail.after?.sku ? e.detail.after.sku : ''
|
|
760
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
|
|
761
787
|
default:
|
|
762
788
|
break
|
|
763
789
|
}
|
|
@@ -824,6 +850,13 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
|
|
|
824
850
|
throw new Error(i18next.t('text.empty_value_in_list'))
|
|
825
851
|
}
|
|
826
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
|
+
|
|
827
860
|
if (row.bizplace) {
|
|
828
861
|
row.bizplace = { id: row.bizplace.id }
|
|
829
862
|
}
|
|
@@ -5,26 +5,40 @@ exports.outboundOrderByStatusResolver = {
|
|
|
5
5
|
async outboundOrderByStatus(_, params, context) {
|
|
6
6
|
const { domain, tx } = context.state;
|
|
7
7
|
const orderStatus = await tx.query(`
|
|
8
|
-
(
|
|
8
|
+
WITH cte_list ("status", "count") as (
|
|
9
|
+
select 'DONE' as status, 0 as "count"
|
|
10
|
+
union
|
|
11
|
+
select 'CANCELLED' as status, 0 as "count"
|
|
12
|
+
union
|
|
13
|
+
select 'PICKING UNASSIGNED' as status, 0 as "count"
|
|
14
|
+
union
|
|
15
|
+
select 'PACKING' as status, 0 as "count"
|
|
16
|
+
union
|
|
17
|
+
select 'AWAITING DISPATCH' as status, 0 as "count"
|
|
18
|
+
union
|
|
19
|
+
select 'OUT FROM WAREHOUSE' as status, 0 as "count"
|
|
20
|
+
union
|
|
21
|
+
select 'PICKING ASSIGNED' as status, 0 as "count"
|
|
22
|
+
union
|
|
23
|
+
select 'OTHERS' as status, 0 as "count"
|
|
24
|
+
) select l."status", coalesce(src."count", l."count") as "count"
|
|
25
|
+
from cte_list l
|
|
26
|
+
left join (
|
|
9
27
|
SELECT "status", COUNT(*) AS "count" FROM (
|
|
10
28
|
SELECT
|
|
11
29
|
CASE WHEN "status" = 'DONE' and rg.updated_at::date = CURRENT_DATE THEN 'DONE'
|
|
12
30
|
WHEN "status" = 'CANCELLED' THEN 'CANCELLED'
|
|
13
|
-
WHEN "status" IN('
|
|
14
|
-
WHEN "status" IN('READY_TO_PACK', 'PACKING') THEN 'PACKING'
|
|
15
|
-
WHEN "dispatchment_status" = 'READY_TO_DISPATCH' and "tracking_no" NOTNULL and "status" NOT IN ('CANCELLED', 'PENDING_CANCEL') THEN 'AWAITING DISPATCH'
|
|
16
|
-
WHEN "dispatchment_status" = 'DISPATCHED' and "tracking_no" NOTNULL and "status" NOT IN ('CANCELLED', 'PENDING_CANCEL') THEN 'OUT FROM WAREHOUSE'
|
|
31
|
+
WHEN "status" IN('PENDING_RECEIVE', 'PENDING_WORKSHEET') THEN 'PICKING UNASSIGNED'
|
|
17
32
|
END AS "status"
|
|
18
33
|
FROM release_goods rg
|
|
19
34
|
WHERE "domain_id" = $1
|
|
20
35
|
AND rg."status" IN ('CANCELLED','PENDING', 'PENDING_RECEIVE', 'PENDING_WORKSHEET', 'READY_TO_PICK', 'PICKING', 'READY_TO_PACK', 'PACKING', 'DONE')
|
|
21
36
|
) AS foo
|
|
22
37
|
GROUP BY "status"
|
|
23
|
-
|
|
38
|
+
UNION ALL
|
|
24
39
|
SELECT "status", COUNT(*) AS "count" FROM (
|
|
25
40
|
SELECT
|
|
26
|
-
CASE WHEN "dispatchment_status" = '
|
|
27
|
-
WHEN "dispatchment_status" = 'DISPATCHED' THEN 'OUT FROM WAREHOUSE'
|
|
41
|
+
CASE WHEN "dispatchment_status" = 'DISPATCHED' THEN 'OUT FROM WAREHOUSE'
|
|
28
42
|
END AS "status"
|
|
29
43
|
FROM release_goods rg
|
|
30
44
|
WHERE "domain_id" = $1
|
|
@@ -32,18 +46,22 @@ exports.outboundOrderByStatusResolver = {
|
|
|
32
46
|
AND rg."status" NOT IN ('CANCELLED', 'PENDING_CANCEL')
|
|
33
47
|
AND rg."tracking_no" NOTNULL
|
|
34
48
|
) AS foo
|
|
35
|
-
GROUP BY "status"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
GROUP BY "status"
|
|
50
|
+
union all
|
|
51
|
+
select 'AWAITING DISPATCH' as "status", count(*) from manifests m
|
|
52
|
+
inner join release_goods rg ON rg.manifest_id = m.id
|
|
53
|
+
where m."status" = 'OPEN' and m."domain_id" = $1
|
|
54
|
+
union all
|
|
55
|
+
select 'PICKING ASSIGNED' as "status", count(*) from worksheets w
|
|
56
|
+
where w."domain_id" = $1 and w."type" ='PICKING'
|
|
57
|
+
and w."status" in ('DEACTIVATED','EXECUTING','PENDING_CANCEL')
|
|
58
|
+
group by w."status"
|
|
59
|
+
union all
|
|
60
|
+
select 'PACKING' as "status", count(*) from worksheets w
|
|
61
|
+
where w."domain_id" = $1 and w."type" ='PACKING'
|
|
62
|
+
and w."status" in ('DEACTIVATED','EXECUTING','PENDING_CANCEL')
|
|
63
|
+
group by w."status"
|
|
64
|
+
) src on src."status" = l."status"
|
|
47
65
|
`, [domain.id]);
|
|
48
66
|
const statusList = [
|
|
49
67
|
'PICKING UNASSIGNED',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-order-by-status.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/outbound-order-by-status.ts"],"names":[],"mappings":";;;AAKa,QAAA,6BAA6B,GAAG;IAC3C,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACjE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAEvF,MAAM,WAAW,GAAwC,MAAM,EAAE,CAAC,KAAK,CACrE
|
|
1
|
+
{"version":3,"file":"outbound-order-by-status.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/dashboard/outbound-order-by-status.ts"],"names":[],"mappings":";;;AAKa,QAAA,6BAA6B,GAAG;IAC3C,KAAK,CAAC,qBAAqB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACjE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAEvF,MAAM,WAAW,GAAwC,MAAM,EAAE,CAAC,KAAK,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DD,EACC,CAAC,MAAM,CAAC,EAAE,CAAC,CACZ,CAAA;QAED,MAAM,UAAU,GAAa;YAC3B,oBAAoB;YACpB,kBAAkB;YAClB,SAAS;YACT,mBAAmB;YACnB,oBAAoB;YACpB,WAAW;YACX,MAAM;YACN,cAAc;SACf,CAAA;QAED,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,YAAiD,EAAE,MAAc,EAAE,EAAE;YAC7F,IAAI,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,CAAA;YAEjE,IAAI,SAAS;gBAAE,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC,CAAA;;gBAC/D,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;YAE5C,OAAO,YAAY,CAAA;QACrB,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.17",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@things-factory/print-ui": "^4.3.14",
|
|
93
93
|
"@things-factory/product-base": "^4.3.14",
|
|
94
94
|
"@things-factory/resource-ui": "^4.3.14",
|
|
95
|
-
"@things-factory/sales-ui": "^4.3.
|
|
95
|
+
"@things-factory/sales-ui": "^4.3.17",
|
|
96
96
|
"@things-factory/scene-data-transform": "^4.3.14",
|
|
97
97
|
"@things-factory/scene-excel": "^4.3.14",
|
|
98
98
|
"@things-factory/scene-firebase": "^4.3.14",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"@things-factory/system-ui": "^4.3.14",
|
|
109
109
|
"@things-factory/transport-base": "^4.3.14",
|
|
110
110
|
"@things-factory/tutorial-ui": "^4.3.14",
|
|
111
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
112
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/warehouse-base": "^4.3.16",
|
|
112
|
+
"@things-factory/worksheet-base": "^4.3.17"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@things-factory/builder": "^4.3.14",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"cypress-localstorage-commands": "^1.6.1",
|
|
119
119
|
"eslint-plugin-cypress": "^2.12.1"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "5347681c08bd9c85d0ecd390f2411f07d20c1a78"
|
|
122
122
|
}
|
|
@@ -9,26 +9,40 @@ export const outboundOrderByStatusResolver = {
|
|
|
9
9
|
|
|
10
10
|
const orderStatus: { status: string; count: number }[] = await tx.query(
|
|
11
11
|
`
|
|
12
|
-
(
|
|
12
|
+
WITH cte_list ("status", "count") as (
|
|
13
|
+
select 'DONE' as status, 0 as "count"
|
|
14
|
+
union
|
|
15
|
+
select 'CANCELLED' as status, 0 as "count"
|
|
16
|
+
union
|
|
17
|
+
select 'PICKING UNASSIGNED' as status, 0 as "count"
|
|
18
|
+
union
|
|
19
|
+
select 'PACKING' as status, 0 as "count"
|
|
20
|
+
union
|
|
21
|
+
select 'AWAITING DISPATCH' as status, 0 as "count"
|
|
22
|
+
union
|
|
23
|
+
select 'OUT FROM WAREHOUSE' as status, 0 as "count"
|
|
24
|
+
union
|
|
25
|
+
select 'PICKING ASSIGNED' as status, 0 as "count"
|
|
26
|
+
union
|
|
27
|
+
select 'OTHERS' as status, 0 as "count"
|
|
28
|
+
) select l."status", coalesce(src."count", l."count") as "count"
|
|
29
|
+
from cte_list l
|
|
30
|
+
left join (
|
|
13
31
|
SELECT "status", COUNT(*) AS "count" FROM (
|
|
14
32
|
SELECT
|
|
15
33
|
CASE WHEN "status" = 'DONE' and rg.updated_at::date = CURRENT_DATE THEN 'DONE'
|
|
16
34
|
WHEN "status" = 'CANCELLED' THEN 'CANCELLED'
|
|
17
|
-
WHEN "status" IN('
|
|
18
|
-
WHEN "status" IN('READY_TO_PACK', 'PACKING') THEN 'PACKING'
|
|
19
|
-
WHEN "dispatchment_status" = 'READY_TO_DISPATCH' and "tracking_no" NOTNULL and "status" NOT IN ('CANCELLED', 'PENDING_CANCEL') THEN 'AWAITING DISPATCH'
|
|
20
|
-
WHEN "dispatchment_status" = 'DISPATCHED' and "tracking_no" NOTNULL and "status" NOT IN ('CANCELLED', 'PENDING_CANCEL') THEN 'OUT FROM WAREHOUSE'
|
|
35
|
+
WHEN "status" IN('PENDING_RECEIVE', 'PENDING_WORKSHEET') THEN 'PICKING UNASSIGNED'
|
|
21
36
|
END AS "status"
|
|
22
37
|
FROM release_goods rg
|
|
23
38
|
WHERE "domain_id" = $1
|
|
24
39
|
AND rg."status" IN ('CANCELLED','PENDING', 'PENDING_RECEIVE', 'PENDING_WORKSHEET', 'READY_TO_PICK', 'PICKING', 'READY_TO_PACK', 'PACKING', 'DONE')
|
|
25
40
|
) AS foo
|
|
26
41
|
GROUP BY "status"
|
|
27
|
-
|
|
42
|
+
UNION ALL
|
|
28
43
|
SELECT "status", COUNT(*) AS "count" FROM (
|
|
29
44
|
SELECT
|
|
30
|
-
CASE WHEN "dispatchment_status" = '
|
|
31
|
-
WHEN "dispatchment_status" = 'DISPATCHED' THEN 'OUT FROM WAREHOUSE'
|
|
45
|
+
CASE WHEN "dispatchment_status" = 'DISPATCHED' THEN 'OUT FROM WAREHOUSE'
|
|
32
46
|
END AS "status"
|
|
33
47
|
FROM release_goods rg
|
|
34
48
|
WHERE "domain_id" = $1
|
|
@@ -36,18 +50,22 @@ export const outboundOrderByStatusResolver = {
|
|
|
36
50
|
AND rg."status" NOT IN ('CANCELLED', 'PENDING_CANCEL')
|
|
37
51
|
AND rg."tracking_no" NOTNULL
|
|
38
52
|
) AS foo
|
|
39
|
-
GROUP BY "status"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
GROUP BY "status"
|
|
54
|
+
union all
|
|
55
|
+
select 'AWAITING DISPATCH' as "status", count(*) from manifests m
|
|
56
|
+
inner join release_goods rg ON rg.manifest_id = m.id
|
|
57
|
+
where m."status" = 'OPEN' and m."domain_id" = $1
|
|
58
|
+
union all
|
|
59
|
+
select 'PICKING ASSIGNED' as "status", count(*) from worksheets w
|
|
60
|
+
where w."domain_id" = $1 and w."type" ='PICKING'
|
|
61
|
+
and w."status" in ('DEACTIVATED','EXECUTING','PENDING_CANCEL')
|
|
62
|
+
group by w."status"
|
|
63
|
+
union all
|
|
64
|
+
select 'PACKING' as "status", count(*) from worksheets w
|
|
65
|
+
where w."domain_id" = $1 and w."type" ='PACKING'
|
|
66
|
+
and w."status" in ('DEACTIVATED','EXECUTING','PENDING_CANCEL')
|
|
67
|
+
group by w."status"
|
|
68
|
+
) src on src."status" = l."status"
|
|
51
69
|
`,
|
|
52
70
|
[domain.id]
|
|
53
71
|
)
|
package/translations/en.json
CHANGED
|
@@ -1376,6 +1376,7 @@
|
|
|
1376
1376
|
"text.there_is_non_assigned_vas": "there is non-assigned vas",
|
|
1377
1377
|
"text.there_is_not_ready_vas": "there is not ready vas",
|
|
1378
1378
|
"text.there_is_nothing_to_restore": "there is nothing to restore",
|
|
1379
|
+
"text.there_is_release_qty_no_amendment_is_allowed": "there is release qty, no amendment is allowed",
|
|
1379
1380
|
"text.there_is_uncompleted_task": "there is uncompleted task",
|
|
1380
1381
|
"text.there_no_selected": "there no selected",
|
|
1381
1382
|
"text.theres_no_pallet_selected": "there's no pallet selected",
|
package/translations/ko.json
CHANGED
|
@@ -1947,5 +1947,6 @@
|
|
|
1947
1947
|
"text.tote_is_dispatched_please_scan_again": "[ko] tote is dispatched, please scan again",
|
|
1948
1948
|
"text.tote_box_(x)_is_scanned": "[ko] tote box ({x}) is scanned",
|
|
1949
1949
|
"text.tote_carton_(x)_is_scanned": "[ko] tote carton ({x}) is scanned",
|
|
1950
|
-
"text.tote_is_not_scanned": "[ko] tote is not scanned"
|
|
1950
|
+
"text.tote_is_not_scanned": "[ko] tote is not scanned",
|
|
1951
|
+
"text.there_is_release_qty_no_amendment_is_allowed": "[ko] there is release qty, no amendment is allowed"
|
|
1951
1952
|
}
|
package/translations/ms.json
CHANGED
|
@@ -1816,5 +1816,6 @@
|
|
|
1816
1816
|
"text.tote_is_dispatched_please_scan_again": "[ms] tote is dispatched, please scan again",
|
|
1817
1817
|
"text.tote_box_(x)_is_scanned": "[ms] tote box ({x}) is scanned",
|
|
1818
1818
|
"text.tote_carton_(x)_is_scanned": "[ms] tote carton ({x}) is scanned",
|
|
1819
|
-
"text.tote_is_not_scanned": "[ms] tote is not scanned"
|
|
1819
|
+
"text.tote_is_not_scanned": "[ms] tote is not scanned",
|
|
1820
|
+
"text.there_is_release_qty_no_amendment_is_allowed": "[ms] there is release qty, no amendment is allowed"
|
|
1820
1821
|
}
|
package/translations/zh.json
CHANGED
|
@@ -1766,5 +1766,6 @@
|
|
|
1766
1766
|
"text.tote_is_dispatched_please_scan_again": "[zh] tote is dispatched, please scan again",
|
|
1767
1767
|
"text.tote_box_(x)_is_scanned": "[zh] tote box ({x}) is scanned",
|
|
1768
1768
|
"text.tote_carton_(x)_is_scanned": "[zh] tote carton ({x}) is scanned",
|
|
1769
|
-
"text.tote_is_not_scanned": "[zh] tote is not scanned"
|
|
1769
|
+
"text.tote_is_not_scanned": "[zh] tote is not scanned",
|
|
1770
|
+
"text.there_is_release_qty_no_amendment_is_allowed": "[zh] there is release qty, no amendment is allowed"
|
|
1770
1771
|
}
|