@things-factory/operato-wms 4.3.642 → 4.3.644
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/outbound/loading-v2/loading-execution-base.js +625 -153
- package/client/pages/outbound/loading-v2/loading-execution.js +239 -139
- package/client/pages/outbound/loading-v2/loading.js +297 -179
- package/client/pages/outbound/loading-v2/release-good-info.js +8 -8
- package/client/pages/outbound/picking-v2/picking.js +4 -0
- package/client/pages/outbound/show-ro-list-popup.js +17 -3
- package/client/pages/report/billing-module-report.js +421 -0
- package/client/route.js +4 -0
- package/dist-server/graphql/resolvers/outbound/complete-load.js +6 -1
- package/dist-server/graphql/resolvers/outbound/complete-load.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js +148 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js +67 -13
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js +20 -3
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/index.js +2 -1
- package/dist-server/graphql/resolvers/outbound/index.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js +15 -3
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js +36 -15
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js +53 -52
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/billing-module-report.js +355 -0
- package/dist-server/graphql/resolvers/reports/billing-module-report.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +3 -0
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/pg-udf-query.js +5 -3
- package/dist-server/graphql/resolvers/reports/pg-udf-query.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +3 -3
- package/dist-server/graphql/types/outbound/index.js +2 -1
- package/dist-server/graphql/types/outbound/index.js.map +1 -1
- package/dist-server/graphql/types/reports/billing-module-report-list.js +14 -0
- package/dist-server/graphql/types/reports/billing-module-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/billing-module-report.js +15 -0
- package/dist-server/graphql/types/reports/billing-module-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +5 -0
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/package.json +4 -4
- package/server/graphql/resolvers/outbound/complete-load.ts +6 -1
- package/server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.ts +154 -0
- package/server/graphql/resolvers/outbound/find-loadable-release-good.ts +82 -16
- package/server/graphql/resolvers/outbound/get-delivery-orders.ts +27 -3
- package/server/graphql/resolvers/outbound/index.ts +2 -0
- package/server/graphql/resolvers/outbound/load-by-qty.ts +19 -7
- package/server/graphql/resolvers/outbound/loading-worksheet-v2.ts +116 -22
- package/server/graphql/resolvers/outbound/sort-item.ts +56 -58
- package/server/graphql/resolvers/reports/billing-module-report.ts +372 -0
- package/server/graphql/resolvers/reports/index.ts +2 -0
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +5 -8
- package/server/graphql/resolvers/reports/pg-udf-query.ts +15 -13
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +3 -3
- package/server/graphql/types/outbound/index.ts +2 -1
- package/server/graphql/types/reports/billing-module-report-list.ts +8 -0
- package/server/graphql/types/reports/billing-module-report.ts +9 -0
- package/server/graphql/types/reports/index.ts +6 -0
- package/things-factory.config.js +4 -0
- package/translations/en.json +7 -0
- package/translations/ko.json +2 -0
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
|
@@ -3,6 +3,7 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import './show-my-loading-worksheet-list-popup'
|
|
4
4
|
import './loading-execution'
|
|
5
5
|
import '../show-ro-list-popup'
|
|
6
|
+
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
6
7
|
|
|
7
8
|
import gql from 'graphql-tag'
|
|
8
9
|
import { css, html, property } from 'lit-element'
|
|
@@ -17,12 +18,242 @@ import { isMobileDevice } from '@things-factory/utils'
|
|
|
17
18
|
|
|
18
19
|
import { showToast } from '../../../util'
|
|
19
20
|
|
|
21
|
+
// Constants
|
|
22
|
+
const SETTINGS = {
|
|
23
|
+
QC_SKU: 'qc-sku',
|
|
24
|
+
DISABLE_QC: 'disable-QC-in-loading'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const FILTER_TYPES = {
|
|
28
|
+
QC: 'qc',
|
|
29
|
+
LOADING: 'loading',
|
|
30
|
+
ALL: 'all'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// GraphQL Queries
|
|
34
|
+
const FIND_LOADABLE_RELEASE_GOOD = gql`
|
|
35
|
+
query findLoadableReleaseGood($orderNo: String!, $tabName: String!) {
|
|
36
|
+
findLoadableReleaseGood(orderNo: $orderNo, tabName: $tabName) {
|
|
37
|
+
id
|
|
38
|
+
name
|
|
39
|
+
refNo
|
|
40
|
+
refNo2
|
|
41
|
+
status
|
|
42
|
+
district
|
|
43
|
+
attentionCompany
|
|
44
|
+
sortedBy {
|
|
45
|
+
name
|
|
46
|
+
}
|
|
47
|
+
itemCounts {
|
|
48
|
+
total
|
|
49
|
+
pending
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`
|
|
54
|
+
|
|
55
|
+
const FIND_LOADABLE_RELEASE_GOOD_BY_BIN = gql`
|
|
56
|
+
query findLoadableReleaseGoodByBin($orderNo: String!) {
|
|
57
|
+
findLoadableReleaseGoodByBin(orderNo: $orderNo) {
|
|
58
|
+
worksheetInfo {
|
|
59
|
+
worksheet {
|
|
60
|
+
id
|
|
61
|
+
name
|
|
62
|
+
type
|
|
63
|
+
status
|
|
64
|
+
}
|
|
65
|
+
bizplaceName
|
|
66
|
+
startedAt
|
|
67
|
+
binLocationName
|
|
68
|
+
releaseGood {
|
|
69
|
+
id
|
|
70
|
+
name
|
|
71
|
+
attentionCompany
|
|
72
|
+
status
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
worksheetDetailInfos {
|
|
76
|
+
id
|
|
77
|
+
name
|
|
78
|
+
batchId
|
|
79
|
+
releaseQty
|
|
80
|
+
pickedQty
|
|
81
|
+
sortedQty
|
|
82
|
+
status
|
|
83
|
+
packingType
|
|
84
|
+
packingSize
|
|
85
|
+
expirationDate
|
|
86
|
+
binLocation {
|
|
87
|
+
name
|
|
88
|
+
}
|
|
89
|
+
productName
|
|
90
|
+
productSku
|
|
91
|
+
relatedOrderInv {
|
|
92
|
+
id
|
|
93
|
+
batchId
|
|
94
|
+
packingType
|
|
95
|
+
product {
|
|
96
|
+
id
|
|
97
|
+
sku
|
|
98
|
+
name
|
|
99
|
+
}
|
|
100
|
+
productDetail {
|
|
101
|
+
id
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`
|
|
108
|
+
|
|
109
|
+
const LOADING_WORKSHEET_V2 = gql`
|
|
110
|
+
query loadingWorksheetv2($orderNo: String!, $filter: String) {
|
|
111
|
+
loadingWorksheetv2(orderNo: $orderNo, filter: $filter) {
|
|
112
|
+
worksheetInfo {
|
|
113
|
+
worksheet {
|
|
114
|
+
id
|
|
115
|
+
name
|
|
116
|
+
type
|
|
117
|
+
status
|
|
118
|
+
}
|
|
119
|
+
bizplaceName
|
|
120
|
+
startedAt
|
|
121
|
+
releaseGood {
|
|
122
|
+
id
|
|
123
|
+
name
|
|
124
|
+
attentionCompany
|
|
125
|
+
status
|
|
126
|
+
refNo
|
|
127
|
+
refNo2
|
|
128
|
+
refNo3
|
|
129
|
+
remark
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
worksheetDetailInfos {
|
|
133
|
+
id
|
|
134
|
+
name
|
|
135
|
+
batchId
|
|
136
|
+
releaseQty
|
|
137
|
+
pickedQty
|
|
138
|
+
sortedQty
|
|
139
|
+
status
|
|
140
|
+
packingType
|
|
141
|
+
packingSize
|
|
142
|
+
expirationDate
|
|
143
|
+
binLocation {
|
|
144
|
+
name
|
|
145
|
+
}
|
|
146
|
+
productName
|
|
147
|
+
productSku
|
|
148
|
+
relatedOrderInv {
|
|
149
|
+
id
|
|
150
|
+
batchId
|
|
151
|
+
packingType
|
|
152
|
+
product {
|
|
153
|
+
id
|
|
154
|
+
sku
|
|
155
|
+
name
|
|
156
|
+
}
|
|
157
|
+
productDetail {
|
|
158
|
+
id
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`
|
|
165
|
+
|
|
166
|
+
const GET_DELIVERY_ORDERS = gql`
|
|
167
|
+
query getDeliveryOrders($releaseGoodNo: String!) {
|
|
168
|
+
getDeliveryOrders(releaseGoodNo: $releaseGoodNo) {
|
|
169
|
+
completable
|
|
170
|
+
deliveryOrders {
|
|
171
|
+
id
|
|
172
|
+
name
|
|
173
|
+
truckNo
|
|
174
|
+
orderInventories {
|
|
175
|
+
batchId
|
|
176
|
+
packingSize
|
|
177
|
+
packingType
|
|
178
|
+
pickedQty
|
|
179
|
+
product {
|
|
180
|
+
name
|
|
181
|
+
sku
|
|
182
|
+
}
|
|
183
|
+
inventory {
|
|
184
|
+
expirationDate
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
`
|
|
191
|
+
|
|
192
|
+
const GET_LOADING_TASK = gql`
|
|
193
|
+
mutation getLoadingTask {
|
|
194
|
+
getLoadingTask {
|
|
195
|
+
worksheetInfo {
|
|
196
|
+
worksheet {
|
|
197
|
+
id
|
|
198
|
+
name
|
|
199
|
+
type
|
|
200
|
+
status
|
|
201
|
+
}
|
|
202
|
+
bizplaceName
|
|
203
|
+
startedAt
|
|
204
|
+
releaseGood {
|
|
205
|
+
id
|
|
206
|
+
name
|
|
207
|
+
attentionCompany
|
|
208
|
+
status
|
|
209
|
+
refNo
|
|
210
|
+
refNo2
|
|
211
|
+
refNo3
|
|
212
|
+
remark
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
worksheetDetailInfos {
|
|
216
|
+
id
|
|
217
|
+
name
|
|
218
|
+
batchId
|
|
219
|
+
releaseQty
|
|
220
|
+
pickedQty
|
|
221
|
+
sortedQty
|
|
222
|
+
status
|
|
223
|
+
packingType
|
|
224
|
+
packingSize
|
|
225
|
+
expirationDate
|
|
226
|
+
binLocation {
|
|
227
|
+
name
|
|
228
|
+
}
|
|
229
|
+
productName
|
|
230
|
+
productSku
|
|
231
|
+
relatedOrderInv {
|
|
232
|
+
id
|
|
233
|
+
batchId
|
|
234
|
+
packingType
|
|
235
|
+
product {
|
|
236
|
+
id
|
|
237
|
+
sku
|
|
238
|
+
name
|
|
239
|
+
}
|
|
240
|
+
productDetail {
|
|
241
|
+
id
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
`
|
|
248
|
+
|
|
20
249
|
class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
21
250
|
static get properties() {
|
|
22
251
|
return {
|
|
23
252
|
_state: Object,
|
|
24
253
|
_data: Object,
|
|
25
|
-
_context: Object
|
|
254
|
+
_context: Object,
|
|
255
|
+
_qcSku: Boolean,
|
|
256
|
+
_disableQC: Boolean
|
|
26
257
|
}
|
|
27
258
|
}
|
|
28
259
|
|
|
@@ -74,6 +305,24 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
74
305
|
]
|
|
75
306
|
}
|
|
76
307
|
|
|
308
|
+
constructor() {
|
|
309
|
+
super()
|
|
310
|
+
this.configContext()
|
|
311
|
+
this._qcSku = false
|
|
312
|
+
this._disableQC = false
|
|
313
|
+
this.initializeSettings()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async initializeSettings() {
|
|
317
|
+
try {
|
|
318
|
+
this._qcSku = await fetchSettingRule(SETTINGS.QC_SKU)
|
|
319
|
+
this._disableQC = await fetchSettingRule(SETTINGS.DISABLE_QC)
|
|
320
|
+
this.configContext()
|
|
321
|
+
} catch (e) {
|
|
322
|
+
console.error('Error initializing settings:', e)
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
77
326
|
configContext(
|
|
78
327
|
actions = [
|
|
79
328
|
{
|
|
@@ -88,18 +337,18 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
88
337
|
}
|
|
89
338
|
]
|
|
90
339
|
) {
|
|
91
|
-
this.
|
|
340
|
+
if (this._qcSku) {
|
|
341
|
+
actions = actions.filter(
|
|
342
|
+
a => a.title !== i18next.t('button.get_task')
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
this._context = {
|
|
92
346
|
...this._context,
|
|
93
347
|
actions
|
|
94
348
|
}
|
|
95
349
|
this.updateContext()
|
|
96
350
|
}
|
|
97
351
|
|
|
98
|
-
constructor() {
|
|
99
|
-
super()
|
|
100
|
-
this.configContext()
|
|
101
|
-
}
|
|
102
|
-
|
|
103
352
|
get context() {
|
|
104
353
|
return this._context
|
|
105
354
|
}
|
|
@@ -115,6 +364,7 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
115
364
|
.worksheet=${this._data.worksheetInfo}
|
|
116
365
|
.worksheetDetails=${this._data?.worksheetDetailInfos}
|
|
117
366
|
.deliveryOrdersInfo=${this._data?.deliveryOrderInfoList}
|
|
367
|
+
._useQcSku=${this._qcSku}
|
|
118
368
|
></loading-execution>`
|
|
119
369
|
} else {
|
|
120
370
|
return html` <div class="${isMobileDevice() ? 'single-column-form' : 'multi-column-form'}">
|
|
@@ -144,62 +394,7 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
144
394
|
async getTask() {
|
|
145
395
|
try {
|
|
146
396
|
const response = await client.mutate({
|
|
147
|
-
mutation:
|
|
148
|
-
mutation getLoadingTask {
|
|
149
|
-
getLoadingTask {
|
|
150
|
-
worksheetInfo {
|
|
151
|
-
worksheet {
|
|
152
|
-
id
|
|
153
|
-
name
|
|
154
|
-
type
|
|
155
|
-
status
|
|
156
|
-
}
|
|
157
|
-
bizplaceName
|
|
158
|
-
startedAt
|
|
159
|
-
releaseGood {
|
|
160
|
-
id
|
|
161
|
-
name
|
|
162
|
-
attentionCompany
|
|
163
|
-
status
|
|
164
|
-
refNo
|
|
165
|
-
refNo2
|
|
166
|
-
refNo3
|
|
167
|
-
remark
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
worksheetDetailInfos {
|
|
171
|
-
id
|
|
172
|
-
name
|
|
173
|
-
batchId
|
|
174
|
-
releaseQty
|
|
175
|
-
pickedQty
|
|
176
|
-
sortedQty
|
|
177
|
-
status
|
|
178
|
-
packingType
|
|
179
|
-
packingSize
|
|
180
|
-
expirationDate
|
|
181
|
-
binLocation {
|
|
182
|
-
name
|
|
183
|
-
}
|
|
184
|
-
productName
|
|
185
|
-
productSku
|
|
186
|
-
relatedOrderInv {
|
|
187
|
-
id
|
|
188
|
-
batchId
|
|
189
|
-
packingType
|
|
190
|
-
product {
|
|
191
|
-
id
|
|
192
|
-
sku
|
|
193
|
-
name
|
|
194
|
-
}
|
|
195
|
-
productDetail {
|
|
196
|
-
id
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
`,
|
|
397
|
+
mutation: GET_LOADING_TASK,
|
|
203
398
|
variables: {},
|
|
204
399
|
context: gqlContext()
|
|
205
400
|
})
|
|
@@ -207,7 +402,6 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
207
402
|
if (!response.errors) {
|
|
208
403
|
let data = response.data.getLoadingTask
|
|
209
404
|
data.deliveryOrderInfoList = await this.fetchDeliveryOrders(data.worksheetInfo.releaseGood.name)
|
|
210
|
-
|
|
211
405
|
this._data = data
|
|
212
406
|
}
|
|
213
407
|
} catch (e) {
|
|
@@ -219,34 +413,37 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
219
413
|
|
|
220
414
|
async fetchOrder(orderNo) {
|
|
221
415
|
try {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
query findLoadableReleaseGood($orderNo: String!) {
|
|
225
|
-
findLoadableReleaseGood(orderNo: $orderNo) {
|
|
226
|
-
id
|
|
227
|
-
name
|
|
228
|
-
refNo
|
|
229
|
-
refNo2
|
|
230
|
-
status
|
|
231
|
-
district
|
|
232
|
-
attentionCompany
|
|
233
|
-
sortedBy {
|
|
234
|
-
name
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
`,
|
|
239
|
-
variables: { orderNo },
|
|
240
|
-
context: gqlContext()
|
|
241
|
-
})
|
|
416
|
+
if (!this._qcSku) {
|
|
417
|
+
const defaultTabName = this._disableQC === true || this._disableQC === 'true' ? 'LOADING' : 'QC'
|
|
242
418
|
|
|
243
|
-
|
|
244
|
-
|
|
419
|
+
const response = await client.query({
|
|
420
|
+
query: FIND_LOADABLE_RELEASE_GOOD,
|
|
421
|
+
variables: {
|
|
422
|
+
orderNo,
|
|
423
|
+
tabName: defaultTabName
|
|
424
|
+
},
|
|
425
|
+
context: gqlContext()
|
|
426
|
+
})
|
|
427
|
+
|
|
428
|
+
if (!response.errors) {
|
|
429
|
+
let records = response.data.findLoadableReleaseGood
|
|
245
430
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
431
|
+
if (records.length) {
|
|
432
|
+
await this.selectReleaseOrderPopup(records)
|
|
433
|
+
} else {
|
|
434
|
+
throw new Error(i18next.t('text.no_release_order_found'))
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
} else {
|
|
438
|
+
const response = await client.query({
|
|
439
|
+
query: FIND_LOADABLE_RELEASE_GOOD_BY_BIN,
|
|
440
|
+
variables: { orderNo },
|
|
441
|
+
context: gqlContext()
|
|
442
|
+
})
|
|
443
|
+
|
|
444
|
+
if (!response.errors) {
|
|
445
|
+
let items = response.data.findLoadableReleaseGoodByBin
|
|
446
|
+
this._data = items
|
|
250
447
|
}
|
|
251
448
|
}
|
|
252
449
|
} catch (e) {
|
|
@@ -255,12 +452,10 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
255
452
|
}
|
|
256
453
|
|
|
257
454
|
async selectReleaseOrderPopup(orders) {
|
|
258
|
-
let releaseGoods = orders.map(ro => {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
})
|
|
455
|
+
let releaseGoods = orders.map(ro => ({
|
|
456
|
+
...ro,
|
|
457
|
+
sortedByUser: ro.sortedBy?.name
|
|
458
|
+
}))
|
|
264
459
|
|
|
265
460
|
await sleep(1010)
|
|
266
461
|
openPopup(
|
|
@@ -283,64 +478,11 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
283
478
|
|
|
284
479
|
async fetchWorksheet(orderNo) {
|
|
285
480
|
try {
|
|
481
|
+
const filter = this._disableQC === true || this._disableQC === 'true' ? FILTER_TYPES.LOADING : FILTER_TYPES.QC
|
|
482
|
+
|
|
286
483
|
const response = await client.query({
|
|
287
|
-
query:
|
|
288
|
-
|
|
289
|
-
loadingWorksheetv2(orderNo: $orderNo, filter: $filter) {
|
|
290
|
-
worksheetInfo {
|
|
291
|
-
worksheet {
|
|
292
|
-
id
|
|
293
|
-
name
|
|
294
|
-
type
|
|
295
|
-
status
|
|
296
|
-
}
|
|
297
|
-
bizplaceName
|
|
298
|
-
startedAt
|
|
299
|
-
releaseGood {
|
|
300
|
-
id
|
|
301
|
-
name
|
|
302
|
-
attentionCompany
|
|
303
|
-
status
|
|
304
|
-
refNo
|
|
305
|
-
refNo2
|
|
306
|
-
refNo3
|
|
307
|
-
remark
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
worksheetDetailInfos {
|
|
311
|
-
id
|
|
312
|
-
name
|
|
313
|
-
batchId
|
|
314
|
-
releaseQty
|
|
315
|
-
pickedQty
|
|
316
|
-
sortedQty
|
|
317
|
-
status
|
|
318
|
-
packingType
|
|
319
|
-
packingSize
|
|
320
|
-
expirationDate
|
|
321
|
-
binLocation {
|
|
322
|
-
name
|
|
323
|
-
}
|
|
324
|
-
productName
|
|
325
|
-
productSku
|
|
326
|
-
relatedOrderInv {
|
|
327
|
-
id
|
|
328
|
-
batchId
|
|
329
|
-
packingType
|
|
330
|
-
product {
|
|
331
|
-
id
|
|
332
|
-
sku
|
|
333
|
-
name
|
|
334
|
-
}
|
|
335
|
-
productDetail {
|
|
336
|
-
id
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
`,
|
|
343
|
-
variables: { orderNo, filter: 'all' }
|
|
484
|
+
query: LOADING_WORKSHEET_V2,
|
|
485
|
+
variables: { orderNo, filter }
|
|
344
486
|
})
|
|
345
487
|
|
|
346
488
|
if (!response.errors) {
|
|
@@ -356,31 +498,7 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
356
498
|
async fetchDeliveryOrders(releaseGoodName) {
|
|
357
499
|
try {
|
|
358
500
|
const response = await client.query({
|
|
359
|
-
query:
|
|
360
|
-
query getDeliveryOrders($releaseGoodNo: String!) {
|
|
361
|
-
getDeliveryOrders(releaseGoodNo: $releaseGoodNo) {
|
|
362
|
-
completable
|
|
363
|
-
deliveryOrders {
|
|
364
|
-
id
|
|
365
|
-
name
|
|
366
|
-
truckNo
|
|
367
|
-
orderInventories {
|
|
368
|
-
batchId
|
|
369
|
-
packingSize
|
|
370
|
-
packingType
|
|
371
|
-
pickedQty
|
|
372
|
-
product {
|
|
373
|
-
name
|
|
374
|
-
sku
|
|
375
|
-
}
|
|
376
|
-
inventory {
|
|
377
|
-
expirationDate
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
`,
|
|
501
|
+
query: GET_DELIVERY_ORDERS,
|
|
384
502
|
variables: { releaseGoodNo: releaseGoodName }
|
|
385
503
|
})
|
|
386
504
|
|
|
@@ -388,7 +506,7 @@ class LoadingProductV2 extends connect(store)(localize(i18next)(PageView)) {
|
|
|
388
506
|
return response.data.getDeliveryOrders
|
|
389
507
|
}
|
|
390
508
|
} catch (e) {
|
|
391
|
-
|
|
509
|
+
showToast(e)
|
|
392
510
|
}
|
|
393
511
|
}
|
|
394
512
|
|
|
@@ -61,29 +61,29 @@ class ReleaseGoodInfo extends localize(i18next)(LitElement) {
|
|
|
61
61
|
|
|
62
62
|
render() {
|
|
63
63
|
return html`
|
|
64
|
-
<label class="text-14 font-bold order-no">Order No.: ${this.data?.releaseGood
|
|
64
|
+
<label class="text-14 font-bold order-no">Order No.: ${this.data?.releaseGood?.name || ''}</label>
|
|
65
65
|
|
|
66
66
|
<div class="worksheet-info">
|
|
67
67
|
<label class="worksheet-info-title">Company</label>
|
|
68
|
-
<label class="worksheet-info-description">: ${this.data?.bizplaceName}</label>
|
|
68
|
+
<label class="worksheet-info-description">: ${this.data?.bizplaceName || ''}</label>
|
|
69
69
|
|
|
70
70
|
<label class="worksheet-info-title">Ref 1</label>
|
|
71
|
-
<label class="worksheet-info-description">: ${this.data?.releaseGood
|
|
71
|
+
<label class="worksheet-info-description">: ${this.data?.releaseGood?.refNo || ''}</label>
|
|
72
72
|
|
|
73
73
|
<label class="worksheet-info-title">Ref 2</label>
|
|
74
|
-
<label class="worksheet-info-description">: ${this.data?.releaseGood
|
|
74
|
+
<label class="worksheet-info-description">: ${this.data?.releaseGood?.refNo2 || ''}</label>
|
|
75
75
|
|
|
76
76
|
<label class="worksheet-info-title">Ref 3</label>
|
|
77
|
-
<label class="worksheet-info-description">: ${this.data?.releaseGood
|
|
77
|
+
<label class="worksheet-info-description">: ${this.data?.releaseGood?.refNo3 || ''}</label>
|
|
78
78
|
|
|
79
79
|
<label class="worksheet-info-title">Remark</label>
|
|
80
|
-
<label class="worksheet-info-description">: ${this.data?.releaseGood
|
|
80
|
+
<label class="worksheet-info-description">: ${this.data?.releaseGood?.remark || ''}</label>
|
|
81
81
|
|
|
82
82
|
<label class="worksheet-info-title">Start Time</label>
|
|
83
|
-
<label class="worksheet-info-description">: ${this.data?.startedAt}</label>
|
|
83
|
+
<label class="worksheet-info-description">: ${this.data?.startedAt || ''}</label>
|
|
84
84
|
|
|
85
85
|
<label class="worksheet-info-title">Status</label>
|
|
86
|
-
<label class="worksheet-info-description">: ${this.data?.releaseGood
|
|
86
|
+
<label class="worksheet-info-description">: ${this.data?.releaseGood?.status || ''}</label>
|
|
87
87
|
</div>
|
|
88
88
|
`
|
|
89
89
|
}
|
|
@@ -124,7 +124,11 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
|
|
|
124
124
|
updated(changeProps) {
|
|
125
125
|
if (changeProps.has('releaseOrders')) {
|
|
126
126
|
if (this.releaseOrders && this.releaseOrders.length) {
|
|
127
|
-
|
|
127
|
+
const processedRecords = this.releaseOrders.map(ro => ({
|
|
128
|
+
...ro,
|
|
129
|
+
itemCounts: ro.itemCounts ? `${ro.itemCounts.pending || 0}/${ro.itemCounts.total || 0}` : '0/0'
|
|
130
|
+
}))
|
|
131
|
+
this.data = { records: processedRecords }
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -142,7 +146,7 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
|
|
|
142
146
|
rows: { selectable: { multiple: false }, appendable: false },
|
|
143
147
|
pagination: { infinite: true },
|
|
144
148
|
list: {
|
|
145
|
-
fields: ['name', 'refNo', 'refNo2', 'district', 'attentionCompany', 'status', 'sortedByUser']
|
|
149
|
+
fields: ['name', 'refNo', 'refNo2', 'district', 'attentionCompany', 'status', 'sortedByUser', 'itemCounts']
|
|
146
150
|
},
|
|
147
151
|
columns: [
|
|
148
152
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -195,6 +199,13 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
|
|
|
195
199
|
header: i18next.t('field.sorted_by'),
|
|
196
200
|
label: true,
|
|
197
201
|
width: 120
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
type: 'string',
|
|
205
|
+
name: 'itemCounts',
|
|
206
|
+
header: i18next.t('field.completed_items'),
|
|
207
|
+
label: true,
|
|
208
|
+
width: 150
|
|
198
209
|
}
|
|
199
210
|
]
|
|
200
211
|
}
|
|
@@ -221,7 +232,10 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
|
|
|
221
232
|
)
|
|
222
233
|
}
|
|
223
234
|
} else {
|
|
224
|
-
|
|
235
|
+
const msg = i18next.t('text.no_orders_selected', {
|
|
236
|
+
defaultValue: 'Please select a Release Order'
|
|
237
|
+
})
|
|
238
|
+
showToast(new Error(msg))
|
|
225
239
|
}
|
|
226
240
|
}
|
|
227
241
|
}
|