@things-factory/operato-wms 4.3.2 → 4.4.0-alpha.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.
Files changed (96) hide show
  1. package/client/pages/constants/index.js +0 -1
  2. package/client/pages/constants/setting.js +0 -1
  3. package/client/pages/inbound/putaway-product.js +1 -3
  4. package/client/pages/inbound/unload-product.js +11 -21
  5. package/client/pages/inventory/inventory-adjustment-approval.js +9 -24
  6. package/client/pages/inventory/inventory-adjustment.js +13 -79
  7. package/client/pages/master/product/product-list.js +1 -1
  8. package/client/pages/order/arrival-notice/arrival-notice-detail.js +2 -0
  9. package/client/pages/order/arrival-notice/receive-arrival-notice.js +2 -0
  10. package/client/pages/order/goods-received-note/customer-received-note.js +0 -3
  11. package/client/pages/order/goods-received-note/received-note-detail.js +0 -3
  12. package/client/pages/order/release-order/b2c/b2c-order-requests.js +30 -21
  13. package/client/pages/order/release-order/bulk-print-packing-list.js +0 -4
  14. package/client/pages/order/release-order/receive-release-order-request.js +2 -0
  15. package/client/pages/order/release-order/release-order-detail.js +26 -44
  16. package/client/pages/order/return-order/receive-return-order-requests.js +2 -0
  17. package/client/pages/order/transfer-order/receive-transfer-order-request.js +1 -1
  18. package/client/pages/order/transport-order/print-delivery-note.js +1 -0
  19. package/client/pages/order/transport-order/view-delivery-note.js +1 -1
  20. package/client/pages/order/vas-order/receive-vas-order.js +2 -0
  21. package/client/pages/outbound/inventory-assign-popup.js +2 -7
  22. package/client/pages/outbound/inventory-auto-assign-popup.js +1 -2
  23. package/client/pages/outbound/loading-product.js +11 -49
  24. package/client/pages/outbound/packing-product.js +6 -42
  25. package/client/pages/outbound/packing-worksheet-list.js +0 -15
  26. package/client/pages/outbound/picking-product.js +13 -150
  27. package/client/pages/outbound/single-outbound-worksheet.js +22 -10
  28. package/client/pages/outbound/sorting-product.js +15 -78
  29. package/client/pages/outbound/worksheet-batch-picking.js +2 -9
  30. package/client/pages/outbound/worksheet-packing.js +2 -7
  31. package/client/pages/outbound/worksheet-picking.js +2 -9
  32. package/client/pages/report/inventory-summary-report.js +0 -8
  33. package/client/pages/report/outbound-order-details-report.js +0 -18
  34. package/client/pages/vas/abstract-execute-vas.js +7 -12
  35. package/client/pages/vas/print-product-label.js +6 -15
  36. package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +1 -3
  37. package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +1 -3
  38. package/client/route.js +0 -12
  39. package/dist-server/entities/index.js +1 -2
  40. package/dist-server/entities/index.js.map +1 -1
  41. package/dist-server/graphql/index.js +5 -1
  42. package/dist-server/graphql/index.js.map +1 -1
  43. package/dist-server/graphql/resolvers/board-setting/board-settings.js +1 -2
  44. package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
  45. package/dist-server/graphql/resolvers/index.js +7 -4
  46. package/dist-server/graphql/resolvers/index.js.map +1 -1
  47. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +1 -3
  48. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  49. package/dist-server/graphql/types/index.js +8 -5
  50. package/dist-server/graphql/types/index.js.map +1 -1
  51. package/dist-server/graphql/types/reports/outbound-order-details-report.js +0 -2
  52. package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
  53. package/dist-server/index.js +5 -2
  54. package/dist-server/index.js.map +1 -1
  55. package/dist-server/opa-app-setting-constants.js +1 -2
  56. package/dist-server/opa-app-setting-constants.js.map +1 -1
  57. package/dist-server/utils/index.js +5 -1
  58. package/dist-server/utils/index.js.map +1 -1
  59. package/helps/release-note.ko.md +9 -11
  60. package/helps/release-note.md +9 -11
  61. package/helps/release-note.ms.md +9 -11
  62. package/helps/release-note.zh.md +9 -11
  63. package/package.json +50 -50
  64. package/server/entities/index.ts +2 -2
  65. package/server/graphql/resolvers/board-setting/board-settings.ts +2 -4
  66. package/server/graphql/resolvers/index.ts +2 -3
  67. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +2 -6
  68. package/server/graphql/types/index.ts +4 -4
  69. package/server/graphql/types/reports/outbound-order-details-report.ts +0 -2
  70. package/server/index.ts +1 -2
  71. package/server/opa-app-setting-constants.ts +0 -1
  72. package/things-factory.config.js +0 -13
  73. package/translations/en.json +8 -48
  74. package/translations/ko.json +1 -35
  75. package/translations/ms.json +1 -35
  76. package/translations/zh.json +1 -35
  77. package/client/constants/index.js +0 -1
  78. package/client/constants/order.js +0 -14
  79. package/client/pages/constants/tote.js +0 -14
  80. package/client/pages/master/tote-list.js +0 -740
  81. package/client/pages/order/draft-release-good/draft-release-good-detail.js +0 -1163
  82. package/client/pages/order/draft-release-good/draft-release-good-list.js +0 -546
  83. package/client/pages/outbound/order-remark-popup.js +0 -112
  84. package/client/pages/outbound/tote-popup.js +0 -461
  85. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js +0 -168
  86. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js.map +0 -1
  87. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +0 -6
  88. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +0 -1
  89. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +0 -58
  90. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +0 -1
  91. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +0 -9
  92. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +0 -1
  93. package/server/entities/warehouse-bizplace-onhand-inventory.ts +0 -141
  94. package/server/graphql/resolvers/warehouse-inventory-adjustment/index.ts +0 -5
  95. package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +0 -68
  96. package/server/graphql/types/warehouse-inventory-adjustment/index.ts +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"warehouse-intentory-adjustment.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory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AAC;oBACnF,KAAK,EAAE,EAAE,SAAS,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE;iBACnD,CAAC,CAAA;gBAEF,MAAM,EAAE,CAAC,aAAa,CAAC,2BAAc,CAAC,CAAC,MAAM,CAC3C;oBACE,SAAS,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC,EAAC,MAAM,EAAC,SAAS;iBACtC,EACD,EAAE,MAAM,EAAE,SAAS,EAAE,CACtB,CAAA;gBAED,MAAM,UAAU,GAAU,cAAc,CAAC,GAAG,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;gBAEhE,MAAM,EAAE,CAAC,aAAa,CAAC,gCAAe,CAAC,CAAC,MAAM,CAC5C;oBACE,eAAe,EAAE,IAAA,YAAE,EAAC,UAAU,CAAC,EAAC,MAAM,EAAC,WAAW;iBACnD,EACD,EAAE,MAAM,EAAE,SAAS,EAAE,CACtB,CAAA;aACF;YACD,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Mutation = void 0;
4
- exports.Mutation = `
5
- warehouseInventoryAdjustment (
6
- patches: [InventoryChangePatch]!
7
- ): InventoryChangeList @privilege(category: "inventory_adjustment_approval", privilege: "mutation") @transaction
8
- `;
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/warehouse-inventory-adjustment/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAiB;;;;CAIrC,CAAA"}
@@ -1,141 +0,0 @@
1
- import { ViewColumn, ViewEntity } from 'typeorm'
2
-
3
- @ViewEntity({
4
- expression: `
5
- select d.name as "domainName", b.name as "bizplaceName", src.* from (
6
- WITH oi as (
7
- select
8
- oi.domain_id,
9
- oi.bizplace_id,
10
- SUM(oi.release_qty) AS release_qty,
11
- SUM(oi.release_uom_value) AS release_uom_value,
12
- oi.batch_id,
13
- oi.batch_id_ref,
14
- oi.product_id,
15
- oi.packing_type,
16
- oi.packing_size,
17
- oi.uom
18
- FROM
19
- order_inventories oi
20
- WHERE
21
- (oi.status = 'PENDING' or oi.status = 'PENDING_RECEIVE' or oi.status = 'PENDING_WORKSHEET' or oi.status = 'PENDING_SPLIT')
22
- AND oi.batch_id NOTNULL
23
- AND oi.product_id NOTNULL
24
- AND oi.packing_type NOTNULL
25
- AND oi.packing_size NOTNULL
26
- AND oi.inventory_id IS NULL
27
- GROUP BY
28
- oi.domain_id,
29
- oi.bizplace_id,
30
- oi.batch_id,
31
- oi.batch_id_ref,
32
- oi.product_id,
33
- oi.packing_type,
34
- oi.packing_size,
35
- oi.uom
36
- )
37
- -- SINGLE ITEM INVENTORY QUERY
38
- select
39
- i.domain_id as "domainId",
40
- i.bizplace_id as "bizplaceId",
41
- i.packing_type as "packingType",
42
- i.packing_size as "packingSize",
43
- i.uom,
44
- i.product_id as "productId",
45
- null as "productBundleId",
46
- COALESCE(SUM(COALESCE(i.qty, 0)) - SUM(COALESCE(i.locked_qty, 0)) - MAX(COALESCE(oi.release_qty, 0))) AS "remainQty",
47
- COALESCE(SUM(COALESCE(i.uom_value, 0)) - SUM(COALESCE(i.locked_uom_value, 0)) - MAX(COALESCE(oi.release_uom_value, 0)), 0) AS "remainUomValue",
48
- 'SINGLE' AS "groupType"
49
- FROM inventories i
50
- INNER JOIN locations l2 ON i.location_id = l2.id AND i.domain_id = l2.domain_id AND l2.type NOT IN ('QUARANTINE', 'RESERVE')
51
- LEFT JOIN oi ON i.batch_id = oi.batch_id AND i.product_id = oi.product_id AND i.packing_type = oi.packing_type AND i.packing_size = oi.packing_size AND i.uom = oi.uom
52
- WHERE i.status = 'STORED'
53
- GROUP by
54
- i.domain_id,
55
- i.bizplace_id,
56
- i.product_id,
57
- i.packing_type,
58
- i.packing_size,
59
- i.uom
60
- union all
61
- -- BUNDLE ITEM INVENTORY QUERY
62
- SELECT
63
- pbs.domain_id as "domainId",
64
- pbs.bizplace_id as "bizplaceId",
65
- pb.packing_type as "packingType",
66
- pb.packing_size as "packingSize",
67
- 'UNIT' AS "uom",
68
- null as "productId",
69
- pb.id AS "productBundleId",
70
- COALESCE(MIN(FLOOR(pbs."availableQty")),0) AS "remainQty",
71
- COALESCE(MIN(FLOOR(pbs."availableUomValue")),0) AS "remainUomValue",
72
- 'BUNDLE' AS "groupType"
73
- FROM product_bundles pb
74
- INNER JOIN (
75
- SELECT i.domain_id, i.bizplace_id, pbs.product_id, pbs.product_bundle_id, min(pbs.bundle_qty),
76
- (SUM(COALESCE(i.qty, 0)) - SUM(COALESCE(i.locked_qty, 0)) - MAX(COALESCE(oi.release_qty, 0))) / min(pbs.bundle_qty) AS "availableQty",
77
- (SUM(COALESCE(i.uom_value, 0)) - SUM(COALESCE(i.locked_uom_value, 0)) - MAX(COALESCE(oi.release_uom_value, 0))) / min(pbs.bundle_qty) AS "availableUomValue"
78
- FROM product_bundle_settings pbs
79
- LEFT JOIN inventories i ON i.product_id = pbs.product_id AND i.status = 'STORED'
80
- INNER JOIN locations l ON i.location_id = l.id AND i.domain_id = l.domain_id AND l.type NOT IN ('QUARANTINE', 'RESERVE')
81
- LEFT JOIN oi ON oi.product_id = i.product_id
82
- GROUP by
83
- i.domain_id,
84
- i.bizplace_id,
85
- pbs.product_id,
86
- pbs.product_bundle_id
87
- ) pbs ON pbs.product_bundle_id = pb.id
88
- GROUP BY
89
- pbs.domain_id,
90
- pbs.bizplace_id,
91
- pb.packing_type,
92
- pb.packing_size,
93
- pb.name,
94
- pb.sku,
95
- pb.id
96
- )
97
- AS src
98
- inner join domains d on d.id = src."domainId"
99
- inner join bizplaces b on b.id = src."bizplaceId"
100
- where src."remainQty" > 0
101
- order by src."domainId"
102
- `
103
- })
104
-
105
- export class WarehouseBizplaceOnhandInventory {
106
- @ViewColumn()
107
- domainName: string
108
-
109
- @ViewColumn()
110
- bizplaceName: string
111
-
112
- @ViewColumn()
113
- domainId: string
114
-
115
- @ViewColumn()
116
- bizplaceId: string
117
-
118
- @ViewColumn()
119
- packingType: string
120
-
121
- @ViewColumn()
122
- packingSize: number
123
-
124
- @ViewColumn()
125
- uom: string
126
-
127
- @ViewColumn()
128
- productId: string
129
-
130
- @ViewColumn()
131
- productBundleId: string
132
-
133
- @ViewColumn()
134
- remainQty: number
135
-
136
- @ViewColumn()
137
- remainUomValue: number
138
-
139
- @ViewColumn()
140
- groupType: string
141
- }
@@ -1,5 +0,0 @@
1
- import { warehouseInventoryAdjustment } from './warehouse-intentory-adjustment'
2
-
3
- export const Mutation = {
4
- ...warehouseInventoryAdjustment
5
- }
@@ -1,68 +0,0 @@
1
- import { EntityManager } from 'typeorm'
2
- import { InventoryChange, approveInventoryChanges } from '@things-factory/warehouse-base'
3
- import { In, Not, IsNull } from 'typeorm'
4
- import { OrderInventory } from '@things-factory/sales-base'
5
- import { WorksheetDetail } from '@things-factory/worksheet-base'
6
-
7
- export const warehouseInventoryAdjustment = {
8
- async warehouseInventoryAdjustment(_: any, { patches }, context: any) {
9
- try {
10
- const item = await approveInventoryChanges(patches, context)
11
-
12
- // Retrieve order inventory
13
- const { tx }: { tx: EntityManager } = context.state
14
-
15
- const _inventoryChanges = await tx.getRepository(InventoryChange).find({
16
- where: { id: In(patches.map(item => item.id)) },
17
- relations: [
18
- 'inventory',
19
- 'inventory.bizplace',
20
- 'inventory.bizplace.domain',
21
- 'inventory.product',
22
- 'inventory.location',
23
- 'inventory.warehouse',
24
- 'bizplace',
25
- 'bizplace.domain',
26
- 'bizplace.company',
27
- 'bizplace.company.domain',
28
- 'product',
29
- 'product.productDetails',
30
- 'product.productDetails.childProductDetail',
31
- 'location'
32
- ],
33
- order: {
34
- createdAt: 'ASC'
35
- }
36
- })
37
-
38
- if (_inventoryChanges.length > 0) {
39
- const invId: any[] = _inventoryChanges
40
- .filter((ic: any) => ic.transactionType == 'MISSING')
41
- .map((ic: any) => ic.inventory.id)
42
-
43
- const orderInventory: OrderInventory[] = await tx.getRepository(OrderInventory).find({
44
- where: { inventory: In(invId), status: 'PICKING' }
45
- })
46
-
47
- await tx.getRepository(OrderInventory).update(
48
- {
49
- inventory: In(invId),status:"PICKING"
50
- },
51
- { status: 'MISSING' }
52
- )
53
-
54
- const orderInvId: any[] = orderInventory.map((oi: any) => oi.id)
55
-
56
- await tx.getRepository(WorksheetDetail).update(
57
- {
58
- targetInventory: In(orderInvId),status:"EXECUTING"
59
- },
60
- { status: 'MISSING' }
61
- )
62
- }
63
- return item
64
- } catch (error) {
65
- throw error
66
- }
67
- }
68
- }
@@ -1,5 +0,0 @@
1
- export const Mutation = /* GraphQL */ `
2
- warehouseInventoryAdjustment (
3
- patches: [InventoryChangePatch]!
4
- ): InventoryChangeList @privilege(category: "inventory_adjustment_approval", privilege: "mutation") @transaction
5
- `