@things-factory/operato-wms 4.3.479 → 4.3.482
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 +0 -1
- package/client/pages/inbound/worksheet-unloading.js +8 -1
- package/client/pages/report/tote-loading-qc-report.js +21 -1
- package/dist-server/graphql/resolvers/reports/tote-loading-qc-report.js +40 -1
- package/dist-server/graphql/resolvers/reports/tote-loading-qc-report.js.map +1 -1
- package/dist-server/graphql/types/reports/loading-qc-report.js +2 -0
- package/dist-server/graphql/types/reports/loading-qc-report.js.map +1 -1
- package/package.json +4 -4
- package/server/graphql/resolvers/reports/tote-loading-qc-report.ts +41 -0
- package/server/graphql/types/reports/loading-qc-report.ts +2 -0
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -117,7 +117,6 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
|
|
|
117
117
|
this.data = {
|
|
118
118
|
records: this.pallets.records
|
|
119
119
|
.map(record => ({ ...record, startSeq: 1 }))
|
|
120
|
-
.sort((a, b) => a.product.sku.localeCompare(b.product.sku))
|
|
121
120
|
}
|
|
122
121
|
//console.log(this.data.records)
|
|
123
122
|
}
|
|
@@ -589,7 +589,14 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
|
|
|
589
589
|
refNo3: worksheet.arrivalNotice.refNo3
|
|
590
590
|
}
|
|
591
591
|
})
|
|
592
|
-
.sort((a, b) =>
|
|
592
|
+
.sort((a, b) => {
|
|
593
|
+
const skuComparison = a.product.sku.localeCompare(b.product.sku)
|
|
594
|
+
if (skuComparison !== 0) {
|
|
595
|
+
|
|
596
|
+
return skuComparison
|
|
597
|
+
}
|
|
598
|
+
return a.targetProduct.batchId.localeCompare(b.targetProduct.batchId)
|
|
599
|
+
})
|
|
593
600
|
}
|
|
594
601
|
|
|
595
602
|
const orderVass = worksheet.orderVass
|
|
@@ -175,11 +175,12 @@ class ToteLoadingQcReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
175
175
|
groups: [
|
|
176
176
|
{ column: 'bizplaceName' },
|
|
177
177
|
{ column: 'releaseGoodNo' },
|
|
178
|
+
{ column: 'attentionTo' },
|
|
178
179
|
{ column: 'releaseDate' },
|
|
179
180
|
{ column: 'routeId' },
|
|
180
181
|
{ column: 'stopId', title: 'Sub Total' }
|
|
181
182
|
],
|
|
182
|
-
totals: ['orderQuantity', 'tote', 'totalSeal']
|
|
183
|
+
totals: ['orderQuantity', 'tote', 'totalSeal', 'totalCarton']
|
|
183
184
|
},
|
|
184
185
|
columns: [
|
|
185
186
|
{
|
|
@@ -198,6 +199,14 @@ class ToteLoadingQcReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
198
199
|
imex: { header: i18next.t('field.release_good_no'), key: 'releaseGoodNo', width: 30, type: 'string' },
|
|
199
200
|
width: 300
|
|
200
201
|
},
|
|
202
|
+
{
|
|
203
|
+
type: 'string',
|
|
204
|
+
name: 'attentionTo',
|
|
205
|
+
header: i18next.t('field.attention_to'),
|
|
206
|
+
sortable: false,
|
|
207
|
+
imex: { header: i18next.t('field.release_good_no'), key: 'attentionTo', width: 30, type: 'string' },
|
|
208
|
+
width: 300
|
|
209
|
+
},
|
|
201
210
|
{
|
|
202
211
|
type: 'date',
|
|
203
212
|
name: 'releaseDate',
|
|
@@ -228,6 +237,13 @@ class ToteLoadingQcReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
228
237
|
imex: { header: i18next.t('field.order_quantity'), key: 'orderQuantity', width: 25, type: 'integer' },
|
|
229
238
|
width: 150
|
|
230
239
|
},
|
|
240
|
+
{
|
|
241
|
+
type: 'integer',
|
|
242
|
+
name: 'totalCarton',
|
|
243
|
+
header: i18next.t('field.total_carton'),
|
|
244
|
+
imex: { header: i18next.t('field.total_carton'), key: 'totalCarton', width: 25, type: 'integer' },
|
|
245
|
+
width: 150
|
|
246
|
+
},
|
|
231
247
|
{
|
|
232
248
|
type: 'string',
|
|
233
249
|
name: 'tote',
|
|
@@ -288,10 +304,12 @@ class ToteLoadingQcReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
288
304
|
loadingQcReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
289
305
|
bizplaceName
|
|
290
306
|
releaseGoodNo
|
|
307
|
+
attentionTo
|
|
291
308
|
routeId
|
|
292
309
|
stopId
|
|
293
310
|
releaseDate
|
|
294
311
|
orderQuantity
|
|
312
|
+
totalCarton
|
|
295
313
|
tote
|
|
296
314
|
toteBox
|
|
297
315
|
sealId
|
|
@@ -344,6 +362,8 @@ class ToteLoadingQcReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
344
362
|
if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
|
|
345
363
|
throw new Error(i18next.t('text.invalid_form_value'))
|
|
346
364
|
if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
|
|
365
|
+
if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
|
|
366
|
+
if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
|
|
347
367
|
}
|
|
348
368
|
|
|
349
369
|
_compareValues(key, order = 'asc') {
|
|
@@ -28,9 +28,30 @@ exports.loadingQcReport = {
|
|
|
28
28
|
const qb = (0, typeorm_1.getRepository)(sales_base_1.ReleaseGood).createQueryBuilder('rg');
|
|
29
29
|
qb.select('bizplace.name', 'bizplaceName')
|
|
30
30
|
.addSelect('rg.name', 'releaseGoodNo')
|
|
31
|
+
.addSelect('rg.attention_to', 'attentionTo')
|
|
31
32
|
.addSelect('rg.route_id', 'routeId')
|
|
32
33
|
.addSelect('rg.stop_id', 'stopId')
|
|
33
34
|
.addSelect('rg.release_date', 'releaseDate')
|
|
35
|
+
.addSelect(`CASE WHEN EXISTS( SELECT 1 FROM order_tote_items oti WHERE oi.id = oti.order_inventory_id)
|
|
36
|
+
THEN
|
|
37
|
+
CASE WHEN EXISTS (SELECT 1 FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)
|
|
38
|
+
THEN
|
|
39
|
+
CASE WHEN FLOOR(oti.qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)) = 0
|
|
40
|
+
THEN NULL
|
|
41
|
+
ELSE FLOOR("oti"."qty" / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = "pd"."product_id"))
|
|
42
|
+
END
|
|
43
|
+
ELSE NULL
|
|
44
|
+
END
|
|
45
|
+
ELSE
|
|
46
|
+
CASE WHEN EXISTS (SELECT 1 FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)
|
|
47
|
+
THEN
|
|
48
|
+
CASE WHEN FLOOR(oi.release_qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)) = 0
|
|
49
|
+
THEN NULL
|
|
50
|
+
ELSE FLOOR(oi.release_qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id))
|
|
51
|
+
END
|
|
52
|
+
ELSE NULL
|
|
53
|
+
END
|
|
54
|
+
END`, 'totalCarton')
|
|
34
55
|
.addSelect('case when oti.qty is null then oi.release_qty else oti.qty end', 'orderQuantity')
|
|
35
56
|
.addSelect('ot.name', 'tote')
|
|
36
57
|
.addSelect('case when ot.tote_id is null then false else true end', 'toteBox')
|
|
@@ -41,12 +62,29 @@ exports.loadingQcReport = {
|
|
|
41
62
|
.leftJoin('order_tote_items', 'oti', 'oti.order_inventory_id = oi.id')
|
|
42
63
|
.leftJoin('order_totes', 'ot', 'ot.id = oti.order_tote_id')
|
|
43
64
|
.leftJoin('order_tote_seals', 'ots', 'ots.order_tote_id = ot.id')
|
|
65
|
+
.innerJoin('product_details', 'pd', 'oi.product_detail_id = pd.id')
|
|
44
66
|
.where('rg.status = :status', { status: 'LOADING' })
|
|
45
67
|
.andWhere('bizplace.id = :bizplaceId', { bizplaceId: bizplaceFilter.value })
|
|
46
68
|
.andWhere('rg.release_date <= :toDate', { toDate: toDateFilter.value })
|
|
47
69
|
.andWhere('rg.release_date >= :fromDate', { fromDate: fromDateFilter.value })
|
|
48
70
|
.andWhere('w.type = :type', { type: 'LOADING' })
|
|
49
|
-
.andWhere('rg.domain_id = :domainId', { domainId: domain.id })
|
|
71
|
+
.andWhere('rg.domain_id = :domainId', { domainId: domain.id })
|
|
72
|
+
.groupBy('bizplace.name')
|
|
73
|
+
.addGroupBy('rg.name ')
|
|
74
|
+
.addGroupBy('rg.route_id')
|
|
75
|
+
.addGroupBy('rg.stop_id')
|
|
76
|
+
.addGroupBy('rg.release_date')
|
|
77
|
+
.addGroupBy('case when oti.qty is null then oi.release_qty else oti.qty end')
|
|
78
|
+
.addGroupBy('ot.name')
|
|
79
|
+
.addGroupBy('case when ot.tote_id is null then false else true end')
|
|
80
|
+
.addGroupBy('ots.name')
|
|
81
|
+
.addGroupBy('rg.attention_to')
|
|
82
|
+
.addGroupBy('oi.inventory_id')
|
|
83
|
+
.addGroupBy('w.created_at')
|
|
84
|
+
.addGroupBy('pd.product_id')
|
|
85
|
+
.addGroupBy('oi.release_qty')
|
|
86
|
+
.addGroupBy('oi.id')
|
|
87
|
+
.addGroupBy('oti.qty');
|
|
50
88
|
orderInfoFilter
|
|
51
89
|
? qb.andWhere('(rg.name ~* :orderInfoFilter or rg.ref_no ~* :orderInfoFilter or rg.ref_no_2 ~* :orderInfoFilter or rg.ref_no_3 ~* :orderInfoFilter)', { orderInfoFilter })
|
|
52
90
|
: '';
|
|
@@ -68,6 +106,7 @@ exports.loadingQcReport = {
|
|
|
68
106
|
}
|
|
69
107
|
else {
|
|
70
108
|
prev[reducedItemIndex].orderQuantity += curr.orderQuantity;
|
|
109
|
+
prev[reducedItemIndex].totalCarton += curr.totalCarton;
|
|
71
110
|
if (!prev[reducedItemIndex].sealId.includes(curr.sealId)) {
|
|
72
111
|
prev[reducedItemIndex].sealId = prev[reducedItemIndex].sealId.concat(', ', curr.sealId);
|
|
73
112
|
prev[reducedItemIndex].totalSeal++;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tote-loading-qc-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/tote-loading-qc-report.ts"],"names":[],"mappings":";;;AAAA,qCAA0E;AAK1E,2DAAwD;AAE3C,QAAA,eAAe,GAAG;IAC7B,KAAK,CAAC,eAAe,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC3D,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;YAEpD,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAC9E,IAAI,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YAC9E,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAC1E,IAAI,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAA;YAC5E,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAC1E,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CA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,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAA;qBACpC;yBAAM;wBACL,IAAI,CAAC,gBAAgB,CAAC,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAA;wBAC1D,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAA;wBACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;4BACxD,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;4BACvF,IAAI,CAAC,gBAAgB,CAAC,CAAC,SAAS,EAAE,CAAA;yBACnC;qBACF;oBACD,OAAO,IAAI,CAAA;iBACZ;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;oBACf,OAAO,IAAI,CAAA;iBACZ;YACH,CAAC,EAAE,EAAE,CAAC,CAAA;YAEN,OAAO,KAAK,CAAA;SACb;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -9,10 +9,12 @@ exports.LoadingQcReport = (0, graphql_tag_1.default) `
|
|
|
9
9
|
type LoadingQcReport {
|
|
10
10
|
bizplaceName: String
|
|
11
11
|
releaseGoodNo: String
|
|
12
|
+
attentionTo: String
|
|
12
13
|
routeId: String
|
|
13
14
|
stopId: String
|
|
14
15
|
releaseDate: Date
|
|
15
16
|
orderQuantity: Int
|
|
17
|
+
totalCarton: Int
|
|
16
18
|
tote: String
|
|
17
19
|
toteBox: Boolean
|
|
18
20
|
sealId: String
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-qc-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/loading-qc-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA
|
|
1
|
+
{"version":3,"file":"loading-qc-report.js","sourceRoot":"","sources":["../../../../server/graphql/types/reports/loading-qc-report.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;CAejC,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.482",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.434",
|
|
92
92
|
"@things-factory/product-base": "^4.3.452",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.452",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.482",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.381",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.381",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.381",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@things-factory/transport-base": "^4.3.452",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.452",
|
|
110
110
|
"@things-factory/warehouse-base": "^4.3.479",
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.482"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.381",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "86a240e223158a81df6991a47e9caa2f4650a54a"
|
|
121
121
|
}
|
|
@@ -37,9 +37,32 @@ export const loadingQcReport = {
|
|
|
37
37
|
|
|
38
38
|
qb.select('bizplace.name', 'bizplaceName')
|
|
39
39
|
.addSelect('rg.name', 'releaseGoodNo')
|
|
40
|
+
.addSelect('rg.attention_to', 'attentionTo')
|
|
40
41
|
.addSelect('rg.route_id', 'routeId')
|
|
41
42
|
.addSelect('rg.stop_id', 'stopId')
|
|
42
43
|
.addSelect('rg.release_date', 'releaseDate')
|
|
44
|
+
.addSelect(
|
|
45
|
+
`CASE WHEN EXISTS( SELECT 1 FROM order_tote_items oti WHERE oi.id = oti.order_inventory_id)
|
|
46
|
+
THEN
|
|
47
|
+
CASE WHEN EXISTS (SELECT 1 FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)
|
|
48
|
+
THEN
|
|
49
|
+
CASE WHEN FLOOR(oti.qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)) = 0
|
|
50
|
+
THEN NULL
|
|
51
|
+
ELSE FLOOR("oti"."qty" / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = "pd"."product_id"))
|
|
52
|
+
END
|
|
53
|
+
ELSE NULL
|
|
54
|
+
END
|
|
55
|
+
ELSE
|
|
56
|
+
CASE WHEN EXISTS (SELECT 1 FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)
|
|
57
|
+
THEN
|
|
58
|
+
CASE WHEN FLOOR(oi.release_qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id)) = 0
|
|
59
|
+
THEN NULL
|
|
60
|
+
ELSE FLOOR(oi.release_qty / (SELECT pd2.packing_size FROM product_details pd2 WHERE pd2.packing_type = 'Carton' AND pd2.product_id = pd.product_id))
|
|
61
|
+
END
|
|
62
|
+
ELSE NULL
|
|
63
|
+
END
|
|
64
|
+
END`,
|
|
65
|
+
'totalCarton')
|
|
43
66
|
.addSelect('case when oti.qty is null then oi.release_qty else oti.qty end', 'orderQuantity')
|
|
44
67
|
.addSelect('ot.name', 'tote')
|
|
45
68
|
.addSelect('case when ot.tote_id is null then false else true end', 'toteBox')
|
|
@@ -50,12 +73,29 @@ export const loadingQcReport = {
|
|
|
50
73
|
.leftJoin('order_tote_items', 'oti', 'oti.order_inventory_id = oi.id')
|
|
51
74
|
.leftJoin('order_totes', 'ot', 'ot.id = oti.order_tote_id')
|
|
52
75
|
.leftJoin('order_tote_seals', 'ots', 'ots.order_tote_id = ot.id')
|
|
76
|
+
.innerJoin('product_details', 'pd', 'oi.product_detail_id = pd.id')
|
|
53
77
|
.where('rg.status = :status', { status: 'LOADING' })
|
|
54
78
|
.andWhere('bizplace.id = :bizplaceId', { bizplaceId: bizplaceFilter.value })
|
|
55
79
|
.andWhere('rg.release_date <= :toDate', { toDate: toDateFilter.value })
|
|
56
80
|
.andWhere('rg.release_date >= :fromDate', { fromDate: fromDateFilter.value })
|
|
57
81
|
.andWhere('w.type = :type', { type: 'LOADING' })
|
|
58
82
|
.andWhere('rg.domain_id = :domainId', { domainId: domain.id })
|
|
83
|
+
.groupBy('bizplace.name')
|
|
84
|
+
.addGroupBy('rg.name ')
|
|
85
|
+
.addGroupBy('rg.route_id')
|
|
86
|
+
.addGroupBy('rg.stop_id')
|
|
87
|
+
.addGroupBy('rg.release_date')
|
|
88
|
+
.addGroupBy('case when oti.qty is null then oi.release_qty else oti.qty end')
|
|
89
|
+
.addGroupBy('ot.name')
|
|
90
|
+
.addGroupBy('case when ot.tote_id is null then false else true end')
|
|
91
|
+
.addGroupBy('ots.name')
|
|
92
|
+
.addGroupBy('rg.attention_to')
|
|
93
|
+
.addGroupBy('oi.inventory_id')
|
|
94
|
+
.addGroupBy('w.created_at')
|
|
95
|
+
.addGroupBy('pd.product_id')
|
|
96
|
+
.addGroupBy('oi.release_qty')
|
|
97
|
+
.addGroupBy('oi.id')
|
|
98
|
+
.addGroupBy('oti.qty')
|
|
59
99
|
|
|
60
100
|
orderInfoFilter
|
|
61
101
|
? qb.andWhere(
|
|
@@ -87,6 +127,7 @@ export const loadingQcReport = {
|
|
|
87
127
|
prev[prev.length - 1].totalSeal = 1
|
|
88
128
|
} else {
|
|
89
129
|
prev[reducedItemIndex].orderQuantity += curr.orderQuantity
|
|
130
|
+
prev[reducedItemIndex].totalCarton += curr.totalCarton
|
|
90
131
|
if (!prev[reducedItemIndex].sealId.includes(curr.sealId)) {
|
|
91
132
|
prev[reducedItemIndex].sealId = prev[reducedItemIndex].sealId.concat(', ', curr.sealId)
|
|
92
133
|
prev[reducedItemIndex].totalSeal++
|
|
@@ -4,10 +4,12 @@ export const LoadingQcReport = gql`
|
|
|
4
4
|
type LoadingQcReport {
|
|
5
5
|
bizplaceName: String
|
|
6
6
|
releaseGoodNo: String
|
|
7
|
+
attentionTo: String
|
|
7
8
|
routeId: String
|
|
8
9
|
stopId: String
|
|
9
10
|
releaseDate: Date
|
|
10
11
|
orderQuantity: Int
|
|
12
|
+
totalCarton: Int
|
|
11
13
|
tote: String
|
|
12
14
|
toteBox: Boolean
|
|
13
15
|
sealId: String
|
package/translations/en.json
CHANGED
|
@@ -655,6 +655,7 @@
|
|
|
655
655
|
"field.threshold_qty": "threshold qty",
|
|
656
656
|
"field.to_date": "to date",
|
|
657
657
|
"field.to": "to",
|
|
658
|
+
"field.total_carton": "total carton",
|
|
658
659
|
"field.total_cost": "total cost",
|
|
659
660
|
"field.total_days_worked": "total days worked",
|
|
660
661
|
"field.total_delivery": "total delivery",
|
package/translations/ko.json
CHANGED
|
@@ -648,6 +648,7 @@
|
|
|
648
648
|
"field.threshold_qty": "[ko]threshold qty",
|
|
649
649
|
"field.to_date": "to date",
|
|
650
650
|
"field.to": "to",
|
|
651
|
+
"field.total_carton": "[ko]total carton",
|
|
651
652
|
"field.total_cost": "[ko]total cost",
|
|
652
653
|
"field.total_delivery": "총 운송건수",
|
|
653
654
|
"field.total_hours_worked": "[ko] total hours worked",
|
package/translations/ms.json
CHANGED
|
@@ -628,6 +628,7 @@
|
|
|
628
628
|
"field.threshold_qty": "[ms]threshold qty",
|
|
629
629
|
"field.to_date": "sehingga tarikh",
|
|
630
630
|
"field.to": "pada",
|
|
631
|
+
"field.total_carton": "[ms]total carton",
|
|
631
632
|
"field.total_cost": "[ms]total cost",
|
|
632
633
|
"field.total_days_worked": "[ms] total days worked",
|
|
633
634
|
"field.total_delivery": "total delivery",
|
package/translations/zh.json
CHANGED
|
@@ -609,6 +609,7 @@
|
|
|
609
609
|
"field.threshold_qty": "[zh]threshold qty",
|
|
610
610
|
"field.to_date": "to date",
|
|
611
611
|
"field.to": "to",
|
|
612
|
+
"field.total_carton": "[zh]total carton",
|
|
612
613
|
"field.total_cost": "[zh]total cost",
|
|
613
614
|
"field.total_delivery": "total delivery",
|
|
614
615
|
"field.total_days_worked": "total days worked",
|