@things-factory/operato-wms 4.3.289 → 4.3.290
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/order/release-order/create-release-order.js +195 -167
- package/client/pages/order/release-order/release-order-detail.js +180 -125
- package/client/pages/order/vas-order/popup/select-vas-popup.js +159 -22
- package/client/pages/order/vas-order/popup/vas-target-product-popup.js +4 -2
- package/client/pages/report/order-vas-report.js +22 -10
- package/client/pages/report/vas-report.js +57 -47
- package/dist-server/graphql/resolvers/reports/vas-report.js +8 -17
- package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
- package/package.json +5 -5
- package/server/graphql/resolvers/reports/vas-report.ts +12 -25
- package/translations/en.json +1 -0
- package/translations/ko.json +2 -2
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
|
@@ -126,7 +126,7 @@ export const orderVasReport = {
|
|
|
126
126
|
const result: any = await tx.query(
|
|
127
127
|
`
|
|
128
128
|
select * from temp_vas_order_report
|
|
129
|
-
order by "created_at" desc, "order_no", "sku", "batch_no", "order_vas_name"
|
|
129
|
+
order by "order_no" asc,"created_at" desc, "order_no", "sku", "batch_no", "order_vas_name"
|
|
130
130
|
`
|
|
131
131
|
)
|
|
132
132
|
|
|
@@ -181,7 +181,6 @@ export const orderVasReport = {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
185
184
|
export const vasReport = {
|
|
186
185
|
async vasReport(_: any, params: ListParam, context: any) {
|
|
187
186
|
try {
|
|
@@ -189,7 +188,7 @@ export const vasReport = {
|
|
|
189
188
|
let bizplaceFilter = params.filters.find(data => data.name === 'bizplace')
|
|
190
189
|
let fromDate = params.filters.find(data => data.name === 'fromDate')
|
|
191
190
|
let toDate = params.filters.find(data => data.name === 'toDate')
|
|
192
|
-
let vasFilter = params.filters.find(data =>data.name === 'vas')
|
|
191
|
+
let vasFilter = params.filters.find(data => data.name === 'vas')
|
|
193
192
|
let typeFilter = params.filters.find(data => data.name === 'type')
|
|
194
193
|
const domain = context.state.domain
|
|
195
194
|
|
|
@@ -205,24 +204,15 @@ export const vasReport = {
|
|
|
205
204
|
|
|
206
205
|
let extraQueryFilter = ''
|
|
207
206
|
|
|
208
|
-
if (fromDate) {
|
|
209
|
-
extraQueryFilter = `${extraQueryFilter} and executed_at >= '%${fromDate.value}%' `
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
if (toDate) {
|
|
213
|
-
extraQueryFilter = `${extraQueryFilter} and executed_at <= '%${toDate.value}%' `
|
|
214
|
-
}
|
|
215
|
-
|
|
216
207
|
if (vasFilter) {
|
|
217
208
|
extraQueryFilter = `${extraQueryFilter} and (
|
|
218
209
|
vas_name ilike '%${vasFilter.value}%'
|
|
219
210
|
or vas_description ilike '%${vasFilter.value}%') `
|
|
220
211
|
}
|
|
221
|
-
|
|
212
|
+
|
|
222
213
|
if (typeFilter) {
|
|
223
214
|
extraQueryFilter = `${extraQueryFilter} and vas_type = '${typeFilter.value}' `
|
|
224
215
|
}
|
|
225
|
-
|
|
226
216
|
|
|
227
217
|
await tx.query(
|
|
228
218
|
`
|
|
@@ -235,25 +225,22 @@ export const vasReport = {
|
|
|
235
225
|
(SELECT coalesce(SUM(ovi.vas_qty), 0)
|
|
236
226
|
FROM order_vas_items ovi
|
|
237
227
|
inner join order_vass ov on ov.id = ovi.order_vas_id
|
|
238
|
-
inner join
|
|
239
|
-
inner join worksheets w on
|
|
240
|
-
inner join release_goods rg on w.release_good_id = rg.id
|
|
228
|
+
inner join release_goods rg on ov.release_good_id = rg.id
|
|
229
|
+
inner join worksheets w on ov.release_good_id = w.release_good_id
|
|
241
230
|
inner join bizplaces b on rg.bizplace_id = b.id
|
|
242
231
|
WHERE ovi.vas_id = v.id
|
|
243
|
-
and
|
|
232
|
+
and w.bizplace_id = $1
|
|
233
|
+
and w."type" = 'VAS'
|
|
244
234
|
and ((w.status <> 'CANCELLED'
|
|
245
235
|
and rg.status not in ('CANCELLED', 'PENDING_CANCEL'))
|
|
246
236
|
or (ovi.executed_at notnull and rg.status in ('CANCELLED', 'PENDING_CANCEL')))
|
|
237
|
+
and ovi.executed_at >= $3 and ovi.executed_at <= $4
|
|
247
238
|
) as "vas_qty",
|
|
248
239
|
(SELECT max(ovi2.executed_at)
|
|
249
240
|
FROM order_vas_items ovi2
|
|
250
241
|
inner join order_vass ov2 on ov2.id = ovi2.order_vas_id
|
|
251
|
-
inner join worksheet_details wd2 on wd2.target_vas_id = ov2.id
|
|
252
|
-
inner join worksheets w2 on w2.id = wd2.worksheet_id
|
|
253
|
-
inner join release_goods rg2 on rg2.id = w2.release_good_id
|
|
254
|
-
inner join bizplaces b2 on b2.id = rg2.bizplace_id
|
|
255
242
|
WHERE ovi2.vas_id = v.id
|
|
256
|
-
and
|
|
243
|
+
and ov2.bizplace_id = $1
|
|
257
244
|
) as "executed_at"
|
|
258
245
|
from vass v
|
|
259
246
|
where v.domain_id = $2
|
|
@@ -262,7 +249,7 @@ export const vasReport = {
|
|
|
262
249
|
${extraQueryFilter}
|
|
263
250
|
)
|
|
264
251
|
`,
|
|
265
|
-
[bizplace.id, domain.id]
|
|
252
|
+
[bizplace.id, domain.id, fromDate.value, toDate.value]
|
|
266
253
|
)
|
|
267
254
|
|
|
268
255
|
const total: any = await tx.query(`
|
|
@@ -282,7 +269,7 @@ export const vasReport = {
|
|
|
282
269
|
name: bizplace.name
|
|
283
270
|
},
|
|
284
271
|
orderVasItem: {
|
|
285
|
-
vas: { id: item.vas_id, name: item.vas_name, description: item.vas_description, type: item.vas_type},
|
|
272
|
+
vas: { id: item.vas_id, name: item.vas_name, description: item.vas_description, type: item.vas_type },
|
|
286
273
|
vasQty: item.vas_qty,
|
|
287
274
|
executedAt: item.executed_at
|
|
288
275
|
}
|
|
@@ -299,4 +286,4 @@ export const vasReport = {
|
|
|
299
286
|
throw error
|
|
300
287
|
}
|
|
301
288
|
}
|
|
302
|
-
}
|
|
289
|
+
}
|
package/translations/en.json
CHANGED
|
@@ -1964,6 +1964,7 @@
|
|
|
1964
1964
|
"title.select_product_batch": "select product batch",
|
|
1965
1965
|
"title.select_truck": "select truck",
|
|
1966
1966
|
"title.select_warehouse": "select warehouse",
|
|
1967
|
+
"title.selected_vas": "selected vas",
|
|
1967
1968
|
"title.serial_number_list": "serial number list",
|
|
1968
1969
|
"title.serial_number": "serial number",
|
|
1969
1970
|
"title.setting": "setting",
|
package/translations/ko.json
CHANGED
|
@@ -2178,6 +2178,6 @@
|
|
|
2178
2178
|
"field.executed_at_from_date": "[ko] executed at from date",
|
|
2179
2179
|
"field.executed_at_to_date": "[ko] executed at to date",
|
|
2180
2180
|
"field.latest_execution_from_date": "[ko] latest execution from date",
|
|
2181
|
-
"field.latest_execution_to_date": "[ko] latest execution to date"
|
|
2182
|
-
|
|
2181
|
+
"field.latest_execution_to_date": "[ko] latest execution to date",
|
|
2182
|
+
"title.selected_vas": "[ko] selected vas"
|
|
2183
2183
|
}
|
package/translations/ms.json
CHANGED
|
@@ -2051,5 +2051,6 @@
|
|
|
2051
2051
|
"field.executed_at_from_date": "[ms] executed at from date",
|
|
2052
2052
|
"field.executed_at_to_date": "[ms] executed at to date",
|
|
2053
2053
|
"field.latest_execution_from_date": "[ms] latest execution from date",
|
|
2054
|
-
"field.latest_execution_to_date": "[ms] latest execution to date"
|
|
2054
|
+
"field.latest_execution_to_date": "[ms] latest execution to date",
|
|
2055
|
+
"title.selected_vas": "[ms] selected vas"
|
|
2055
2056
|
}
|
package/translations/zh.json
CHANGED
|
@@ -2001,5 +2001,6 @@
|
|
|
2001
2001
|
"field.executed_at_from_date": "[ms] executed at from date",
|
|
2002
2002
|
"field.executed_at_to_date": "[ms] executed at to date",
|
|
2003
2003
|
"field.latest_execution_from_date": "[ms] latest execution from date",
|
|
2004
|
-
"field.latest_execution_to_date": "[ms] latest execution to date"
|
|
2004
|
+
"field.latest_execution_to_date": "[ms] latest execution to date",
|
|
2005
|
+
"title.selected_vas": "[zh] selected vas"
|
|
2005
2006
|
}
|