@things-factory/operato-wms 4.3.238 → 4.3.241
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/components/vas-templates/vas-pallet-add-popup.js +1 -0
- package/client/pages/components/vas-templates/vas-relabel.js +1 -0
- package/client/pages/components/vas-templates/vas-repack-relabel.js +1 -0
- package/client/pages/components/vas-templates/vas-repack.js +1 -0
- package/client/pages/components/vas-templates/vas-repalletizing.js +1 -0
- package/client/pages/components/vas-templates/vas-template.js +1 -0
- package/client/pages/components/vas-templates/vas-unpack.js +1 -0
- package/client/pages/constants/vas-target-type.js +1 -0
- package/client/pages/constants/worksheet.js +4 -0
- package/client/pages/inbound/adjust-pallet-qty.js +1 -1
- package/client/pages/inbound/inbound-worksheet.js +1 -0
- package/client/pages/inbound/palletizing-pallets-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +1 -0
- package/client/pages/inbound/vas-selector.js +1 -0
- package/client/pages/inbound/worksheet-putaway.js +1 -0
- package/client/pages/inbound/worksheet-unloading.js +1 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +1 -0
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -0
- package/client/pages/order/arrival-notice/check-arrived-notice.js +1 -0
- package/client/pages/order/arrival-notice/create-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -0
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -0
- package/client/pages/order/release-order/create-release-order.js +713 -84
- package/client/pages/order/release-order/receive-release-order-request.js +1 -0
- package/client/pages/order/release-order/rejected-release-order.js +1 -0
- package/client/pages/order/release-order/release-order-detail.js +1020 -388
- package/client/pages/order/return-order/check-return-order.js +1 -0
- package/client/pages/order/return-order/rejected-return-order.js +2 -0
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +1 -0
- package/client/pages/order/return-order/return-order-detail.js +1 -0
- package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +1 -0
- package/client/pages/order/transfer-order/rejected-transfer-order.js +1 -0
- package/client/pages/order/vas-order/create-vas-order.js +1 -0
- package/client/pages/order/vas-order/popup/abastract-vas-create-form.js +1 -0
- package/client/pages/order/vas-order/popup/select-vas-popup.js +220 -0
- package/client/pages/order/vas-order/popup/vas-create-batch-product-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-batch-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-etc-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-popup.js +1 -0
- package/client/pages/order/vas-order/popup/vas-create-product-type-form.js +1 -0
- package/client/pages/order/vas-order/popup/vas-target-product-popup.js +644 -0
- package/client/pages/order/vas-order/receive-vas-order.js +1 -0
- package/client/pages/order/vas-order/vas-order-detail.js +1 -0
- package/client/pages/order/vas-order/vas-order-list.js +1 -0
- package/client/pages/order/vas-order/vas-order-requests.js +1 -0
- package/client/pages/outbound/loading-product.js +109 -14
- package/client/pages/outbound/picking-product.js +59 -1
- package/client/pages/outbound/vas-list-popup.js +367 -0
- package/client/pages/outbound/worksheet-loading.js +13 -8
- package/client/pages/outbound/worksheet-picking.js +4 -0
- package/client/pages/report/vas-report.js +534 -0
- package/client/pages/vas/abstract-execute-vas.js +2 -1
- package/client/pages/vas/execute-pure-vas.js +1 -0
- package/client/pages/vas/execute-ref-vas.js +1 -0
- package/client/pages/vas/execute-vas.js +2 -2
- package/client/pages/vas/related-vas-list.js +1 -0
- package/client/pages/vas/vas-execution-page.js +469 -0
- package/client/pages/vas/vas-pallet-label-popup.js +1 -0
- package/client/pages/vas/vas-worksheet-list.js +1 -0
- package/client/pages/vas/worksheet-ref-vas.js +97 -36
- package/client/pages/vas/worksheet-vas.js +1 -0
- package/client/route.js +9 -0
- package/config.development.js +16 -16
- 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/vas-report.js +118 -0
- package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/vas-report-list.js +14 -0
- package/dist-server/graphql/types/reports/vas-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/vas-report.js +18 -0
- package/dist-server/graphql/types/reports/vas-report.js.map +1 -0
- package/package.json +7 -7
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/vas-report.ts +135 -0
- package/server/graphql/types/reports/index.ts +7 -1
- package/server/graphql/types/reports/vas-report-list.ts +8 -0
- package/server/graphql/types/reports/vas-report.ts +12 -0
- package/things-factory.config.js +11 -0
- package/translations/en.json +30 -5
- package/translations/ko.json +26 -1
- package/translations/ms.json +26 -1
- package/translations/zh.json +26 -1
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import '@things-factory/form-ui'
|
|
2
|
+
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, PageView, store } from '@things-factory/shell'
|
|
10
|
+
import { flattenObject } from '@things-factory/utils'
|
|
11
|
+
|
|
12
|
+
class VasReport extends connect(store)(localize(i18next)(PageView)) {
|
|
13
|
+
static get styles() {
|
|
14
|
+
return css`
|
|
15
|
+
:host {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
data-report {
|
|
22
|
+
flex: 1;
|
|
23
|
+
}
|
|
24
|
+
`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static get properties() {
|
|
28
|
+
return {
|
|
29
|
+
_searchFields: Object,
|
|
30
|
+
_config: Object,
|
|
31
|
+
_partners: Object,
|
|
32
|
+
_partnerId: String,
|
|
33
|
+
_partnerName: String,
|
|
34
|
+
data: Object
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get context() {
|
|
39
|
+
return {
|
|
40
|
+
title: i18next.t('title.vas_report'),
|
|
41
|
+
printable: {
|
|
42
|
+
accept: ['preview'],
|
|
43
|
+
content: this
|
|
44
|
+
},
|
|
45
|
+
exportable: {
|
|
46
|
+
name: i18next.t('title.date_vas_report', {
|
|
47
|
+
state: {
|
|
48
|
+
text: (() => {
|
|
49
|
+
let date = new Date()
|
|
50
|
+
return date.getFullYear().toString() + (date.getMonth() + 1).toString() + date.getDate().toString()
|
|
51
|
+
})()
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
data: this._exportableData.bind(this)
|
|
55
|
+
},
|
|
56
|
+
help: 'operato-wms/report/vas-report'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get report() {
|
|
61
|
+
return this.shadowRoot.querySelector('data-report')
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get searchForm() {
|
|
65
|
+
return this.shadowRoot.querySelector('search-form')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
get _bizplaceSelector() {
|
|
69
|
+
return this.searchForm.shadowRoot.querySelector('select[name=bizplace]')
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
get _fromDateInput() {
|
|
73
|
+
return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get _toDateInput() {
|
|
77
|
+
return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
render() {
|
|
81
|
+
return html`
|
|
82
|
+
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.report.fetch()}></search-form>
|
|
83
|
+
|
|
84
|
+
<data-report .config=${this._config} .fetchHandler=${this.fetchHandler.bind(this)}></data-report>
|
|
85
|
+
`
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
get searchFields() {
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
label: i18next.t('field.company'),
|
|
92
|
+
name: 'bizplace',
|
|
93
|
+
type: 'select',
|
|
94
|
+
options: [
|
|
95
|
+
{ value: '' },
|
|
96
|
+
...this._partners
|
|
97
|
+
.map(partner => {
|
|
98
|
+
return {
|
|
99
|
+
name: `${partner.name} ${partner.description ? `(${partner.description})` : ''}`,
|
|
100
|
+
value: partner.id
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.sort(this._compareValues('name', 'asc'))
|
|
104
|
+
],
|
|
105
|
+
props: { searchOper: 'eq' }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: i18next.t('field.completion_vas_from_date'),
|
|
109
|
+
name: 'fromDate',
|
|
110
|
+
type: 'date',
|
|
111
|
+
props: {
|
|
112
|
+
searchOper: 'eq',
|
|
113
|
+
max: new Date().toISOString().split('T')[0]
|
|
114
|
+
},
|
|
115
|
+
// value: (() => {
|
|
116
|
+
// let date = new Date()
|
|
117
|
+
// date.setMonth(date.getMonth() - 1)
|
|
118
|
+
// return date.toISOString().split('T')[0]
|
|
119
|
+
// })(),
|
|
120
|
+
handlers: { change: this._modifyDateRange.bind(this) }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
lable: i18next.t('field.completion_vas_to_date'),
|
|
124
|
+
name: 'toDate',
|
|
125
|
+
type: 'date',
|
|
126
|
+
props: {
|
|
127
|
+
searchOper: 'eq',
|
|
128
|
+
min: (() => {
|
|
129
|
+
let date = new Date()
|
|
130
|
+
date.setMonth(date.getMonth() - 1)
|
|
131
|
+
return date.toISOString().split('T')[0]
|
|
132
|
+
})(),
|
|
133
|
+
max: new Date().toISOString().split('T')[0]
|
|
134
|
+
}//,
|
|
135
|
+
// value: new Date().toISOString().split('T')[0]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: i18next.t('field.product_info'),
|
|
139
|
+
name: 'productInfo',
|
|
140
|
+
type: 'string',
|
|
141
|
+
props: { searchOper: 'in' }
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: i18next.t('field.order_no'),
|
|
145
|
+
name: 'orderNo',
|
|
146
|
+
type: 'string',
|
|
147
|
+
props: { searchOper: 'in' }
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
get reportConfig() {
|
|
153
|
+
return {
|
|
154
|
+
rows: {
|
|
155
|
+
selectable: false,
|
|
156
|
+
groups: [
|
|
157
|
+
{ column: 'bizplaceName' },
|
|
158
|
+
{ column: 'ro' },
|
|
159
|
+
{ column: 'refNo' },
|
|
160
|
+
{ column: 'sku' },
|
|
161
|
+
{ column: 'batchId' },
|
|
162
|
+
{ column: 'packingType' },
|
|
163
|
+
{ column: 'uom' },
|
|
164
|
+
{ column: 'uomValue' },
|
|
165
|
+
{ column: 'releaseQty'}
|
|
166
|
+
],
|
|
167
|
+
totals: []
|
|
168
|
+
},
|
|
169
|
+
columns: [
|
|
170
|
+
{
|
|
171
|
+
type: 'string',
|
|
172
|
+
name: 'bizplaceName',
|
|
173
|
+
header: i18next.t('field.company'),
|
|
174
|
+
sortable: false,
|
|
175
|
+
imex: { hearder: i18next.t('field.company'), key: 'bizplaceName', width: 75, type: 'string' },
|
|
176
|
+
width: 400
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
type: 'string',
|
|
180
|
+
name: 'ro',
|
|
181
|
+
header: i18next.t('field.order_no'),
|
|
182
|
+
sortable: false,
|
|
183
|
+
imex: { header: i18next.t('field.order_no'), key: 'ro', width: 75, type: 'string' },
|
|
184
|
+
width: 400
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: 'string',
|
|
188
|
+
name: 'refNo',
|
|
189
|
+
header: i18next.t('field.ref_no'),
|
|
190
|
+
sortable: false,
|
|
191
|
+
imex: { header: i18next.t('field.ref_no'), key: 'refNo', width: 75, type: 'string' },
|
|
192
|
+
width: 400
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
type: 'string',
|
|
196
|
+
name: 'sku',
|
|
197
|
+
header: i18next.t('field.sku'),
|
|
198
|
+
sortable: false,
|
|
199
|
+
imex: { header: i18next.t('field.sku'), key: 'sku', width: 75, type: 'string' },
|
|
200
|
+
width: 400
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: 'string',
|
|
204
|
+
name: 'batchId',
|
|
205
|
+
header: i18next.t('field.batch_no'),
|
|
206
|
+
sortable: false,
|
|
207
|
+
imex: { header: i18next.t('field.batch_no'), key: 'batchId', width: 75, type: 'string' },
|
|
208
|
+
width: 400
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
type: 'string',
|
|
212
|
+
name: 'packingType',
|
|
213
|
+
header: i18next.t('field.packing_type'),
|
|
214
|
+
sortable: false,
|
|
215
|
+
imex: { header: i18next.t('field.packing_type'), key: 'packingType', width: 75, type: 'string' },
|
|
216
|
+
width: 400
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: 'string',
|
|
220
|
+
name: 'uom',
|
|
221
|
+
header: i18next.t('field.uom'),
|
|
222
|
+
sortable: false,
|
|
223
|
+
imex: { header: i18next.t('field.uom'), key: 'uom', width: 75, type: 'string'},
|
|
224
|
+
width: 400
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
type: 'number',
|
|
228
|
+
name: 'uomValue',
|
|
229
|
+
header: i18next.t('field.unit_uom_value'),
|
|
230
|
+
sortable: false,
|
|
231
|
+
imex: { header: i18next.t('field.unit_uom_value'), key: 'uomValue', width: 75, type: 'string'},
|
|
232
|
+
width: 400
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
type: 'number',
|
|
236
|
+
name: 'releaseQty',
|
|
237
|
+
header: i18next.t('field.release_qty'),
|
|
238
|
+
sortable: false,
|
|
239
|
+
imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 75, type: 'string'},
|
|
240
|
+
width: 400
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'string',
|
|
244
|
+
name: 'vas',
|
|
245
|
+
header: i18next.t('field.vas'),
|
|
246
|
+
sortable: false,
|
|
247
|
+
imex: { header: i18next.t('field.vas'), key: 'vas', width: 75, type: 'string'},
|
|
248
|
+
width: 400
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
type: 'number',
|
|
252
|
+
name: 'vasQty',
|
|
253
|
+
header: i18next.t('field.vas_qty'),
|
|
254
|
+
sortable: false,
|
|
255
|
+
imex: { header: i18next.t('field.vas_qty'), key: 'vasQty', width: 75, type: 'string'},
|
|
256
|
+
width: 400
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: 'string',
|
|
260
|
+
name: 'newSku',
|
|
261
|
+
header: i18next.t('field.new_sku'),
|
|
262
|
+
sortable: false,
|
|
263
|
+
imex: { header: i18next.t('field.new_sku'), key: 'newSku', width: 75, type: 'string'},
|
|
264
|
+
width: 400
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
type: 'string',
|
|
268
|
+
name: 'newPackingType',
|
|
269
|
+
header: i18next.t('field.packing_type'),
|
|
270
|
+
sortable: false,
|
|
271
|
+
imex: { header: i18next.t('field.packing_type'), key: 'newPackingType', width: 75, type: 'string'},
|
|
272
|
+
width: 400
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
type: 'string',
|
|
276
|
+
name: 'newUom',
|
|
277
|
+
header: i18next.t('field.uom'),
|
|
278
|
+
sortable: false,
|
|
279
|
+
imex: { header: i18next.t('field.uom'), key: 'newUom', width: 75, type: 'string'},
|
|
280
|
+
width: 400
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: 'number',
|
|
284
|
+
name: 'outputQty',
|
|
285
|
+
header: i18next.t('field.output_qty'),
|
|
286
|
+
sortable: false,
|
|
287
|
+
imex: { header: i18next.t('field.output_qty'), key: 'outputQty', width: 75, type: 'string'},
|
|
288
|
+
width: 400
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
type: 'number',
|
|
292
|
+
name: 'newUomValue',
|
|
293
|
+
header: i18next.t('field.uom_value'),
|
|
294
|
+
sortable: false,
|
|
295
|
+
imex: { header: i18next.t('field.uom_value'), key: 'newUomValue', width: 75, type: 'string'},
|
|
296
|
+
width: 400
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: 'datetime',
|
|
300
|
+
name: 'completionDate',
|
|
301
|
+
header: i18next.t('field.completion_date'),
|
|
302
|
+
sortable: false,
|
|
303
|
+
imex: { header: i18next.t('field.completion_date'), key: 'completionDate', width: 75, type: 'string'},
|
|
304
|
+
width: 400
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async pageInitialized() {
|
|
311
|
+
this._releaseOrders = []
|
|
312
|
+
this._partners= [...(await this._fetchPartners())]
|
|
313
|
+
this._orderVass = []
|
|
314
|
+
|
|
315
|
+
this._searchFields = this.searchFields
|
|
316
|
+
this._config = this.reportConfig
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
pageUpdated(changes, lifecycle) {
|
|
320
|
+
if (this.active) {
|
|
321
|
+
this.report.fetch()
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
async fetchHandler({ page, limit, sorters = [] }) {
|
|
326
|
+
try {
|
|
327
|
+
this._validate()
|
|
328
|
+
const response = await client.query({
|
|
329
|
+
query: gql`
|
|
330
|
+
query vasReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
331
|
+
vasReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
332
|
+
items {
|
|
333
|
+
bizplace {
|
|
334
|
+
name
|
|
335
|
+
description
|
|
336
|
+
}
|
|
337
|
+
releaseGood {
|
|
338
|
+
name
|
|
339
|
+
refNo
|
|
340
|
+
}
|
|
341
|
+
orderVas {
|
|
342
|
+
batchId
|
|
343
|
+
packingType
|
|
344
|
+
uom
|
|
345
|
+
uomValue
|
|
346
|
+
newPackingType
|
|
347
|
+
newUom
|
|
348
|
+
newUomValue
|
|
349
|
+
outputQty
|
|
350
|
+
product {
|
|
351
|
+
sku
|
|
352
|
+
}
|
|
353
|
+
newProduct {
|
|
354
|
+
sku
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
orderVasItem {
|
|
358
|
+
vas {
|
|
359
|
+
name
|
|
360
|
+
}
|
|
361
|
+
vasQty
|
|
362
|
+
}
|
|
363
|
+
orderInventory {
|
|
364
|
+
releaseQty
|
|
365
|
+
}
|
|
366
|
+
worksheet {
|
|
367
|
+
endedAt
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
`,
|
|
373
|
+
variables: {
|
|
374
|
+
filters: [
|
|
375
|
+
...this.searchForm.queryFilters.map(filter => {
|
|
376
|
+
switch (filter.name) {
|
|
377
|
+
case 'fromDate':
|
|
378
|
+
let fromDt = new Date(filter.value)
|
|
379
|
+
fromDt.setHours(0)
|
|
380
|
+
filter.value = fromDt.toISOString()
|
|
381
|
+
break
|
|
382
|
+
case 'toDate':
|
|
383
|
+
let toDt = new Date(filter.value)
|
|
384
|
+
toDt.setHours(23, 59, 59)
|
|
385
|
+
filter.value = toDt.toISOString()
|
|
386
|
+
break
|
|
387
|
+
default:
|
|
388
|
+
break
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
return filter
|
|
392
|
+
})
|
|
393
|
+
],
|
|
394
|
+
pagination: { page, limit },
|
|
395
|
+
sortings: sorters
|
|
396
|
+
}
|
|
397
|
+
})
|
|
398
|
+
return {
|
|
399
|
+
total: 0,
|
|
400
|
+
records:
|
|
401
|
+
response.data.vasReport.items.map(item => {
|
|
402
|
+
return {
|
|
403
|
+
...item,
|
|
404
|
+
bizplaceName: item.bizplace.name,
|
|
405
|
+
ro: item.releaseGood.name,
|
|
406
|
+
refNo: item.releaseGood.refNo,
|
|
407
|
+
sku: item.orderVas.product.sku,
|
|
408
|
+
batchId: item.orderVas.batchId,
|
|
409
|
+
packingType: item.orderVas.packingType,
|
|
410
|
+
uom: item.orderVas.uom,
|
|
411
|
+
uomValue: item.orderVas.uomValue,
|
|
412
|
+
releaseQty: item.orderInventory.releaseQty,
|
|
413
|
+
vas: item.orderVasItem.vas.name,
|
|
414
|
+
vasQty: item.orderVasItem.vasQty,
|
|
415
|
+
newSku: item.orderVas.newProduct.sku,
|
|
416
|
+
newPackingType: item.orderVas.newPackingType,
|
|
417
|
+
newUom: item.orderVas.newUom,
|
|
418
|
+
outputQty: item.orderVas.outputQty,
|
|
419
|
+
newUomValue: item.orderVas.newUomValue,
|
|
420
|
+
completionDate: item.worksheet.endedAt
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
}
|
|
424
|
+
} catch (e) {
|
|
425
|
+
this._showToast(e)
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
async _fetchPartners() {
|
|
430
|
+
const filters = []
|
|
431
|
+
const response = await client.query({
|
|
432
|
+
query: gql`
|
|
433
|
+
query partnersBizplaces($filters: [Filter!]) {
|
|
434
|
+
partnersBizplaces(filters: $filters) {
|
|
435
|
+
items {
|
|
436
|
+
id
|
|
437
|
+
name
|
|
438
|
+
description
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
`,
|
|
443
|
+
variables: { filters }
|
|
444
|
+
})
|
|
445
|
+
|
|
446
|
+
if (!response.errors) {
|
|
447
|
+
const partners = response.data.partnersBizplaces.items
|
|
448
|
+
if (partners.length == 1) {
|
|
449
|
+
this._partnerId = partners[0].id
|
|
450
|
+
this._partnerName = partners[0].name
|
|
451
|
+
} else {
|
|
452
|
+
this._partnerId = ''
|
|
453
|
+
this._partnerName = ''
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return partners
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
_validate() {
|
|
461
|
+
if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
|
|
462
|
+
throw new Error(i18next.t('text.invalid_form_value'))
|
|
463
|
+
if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
|
|
464
|
+
// if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
|
|
465
|
+
// if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
_modifyDateRange(e) {
|
|
469
|
+
const fromDate = e.currentTarget.value
|
|
470
|
+
|
|
471
|
+
if (this._toDateInout.value < fromDate) this._toDateInput.value = fromDate
|
|
472
|
+
|
|
473
|
+
let min = new Date(fromDate)
|
|
474
|
+
let today = new Date()
|
|
475
|
+
today.setHours(0, 0, 0, 0)
|
|
476
|
+
|
|
477
|
+
min = min.toISOString().split('T')[0]
|
|
478
|
+
|
|
479
|
+
this._toDateInput.min = min
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
_compareValues(key, order = 'asc' ) {
|
|
483
|
+
return function innerSort(a, b) {
|
|
484
|
+
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
485
|
+
return 0
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
489
|
+
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
490
|
+
|
|
491
|
+
let comparison = 0
|
|
492
|
+
if (varA > varB) {
|
|
493
|
+
comparison = 1
|
|
494
|
+
} else if (varA < varB) {
|
|
495
|
+
comparison = -1
|
|
496
|
+
}
|
|
497
|
+
return order === 'desc' ? comparison * -1 : comparison
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
_exportableData() {
|
|
502
|
+
try {
|
|
503
|
+
var headerSetting = [
|
|
504
|
+
...this.report._config.columns
|
|
505
|
+
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
506
|
+
.map(column => {
|
|
507
|
+
return column.imex
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
|
|
511
|
+
return {
|
|
512
|
+
header: headerSetting,
|
|
513
|
+
data: this.report.data.records,
|
|
514
|
+
groups: this.report._config.rows.groups,
|
|
515
|
+
totals: this.report._config.rows.totals
|
|
516
|
+
}
|
|
517
|
+
} catch (e) {
|
|
518
|
+
this._showToast(e)
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
_showToast({ type, message }) {
|
|
523
|
+
document.dispatchEvent(
|
|
524
|
+
new CustomEvent('notify', {
|
|
525
|
+
detail: {
|
|
526
|
+
type,
|
|
527
|
+
message
|
|
528
|
+
}
|
|
529
|
+
})
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
window.customElements.define('vas-report', VasReport)
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
WORKSHEET_STATUS
|
|
22
22
|
} from '../constants'
|
|
23
23
|
|
|
24
|
+
//vas
|
|
24
25
|
export class AbstractExecuteVas extends LitElement {
|
|
25
26
|
static get styles() {
|
|
26
27
|
return [
|
|
@@ -744,7 +745,7 @@ export class AbstractExecuteVas extends LitElement {
|
|
|
744
745
|
|
|
745
746
|
const response = await client.mutate({
|
|
746
747
|
mutation: gql`
|
|
747
|
-
mutation completeVas($orderNo: String!, $orderType: String!, $worksheetDetails: [WorksheetDetailPatch]
|
|
748
|
+
mutation completeVas($orderNo: String!, $orderType: String!, $worksheetDetails: [WorksheetDetailPatch]) {
|
|
748
749
|
completeVas(orderNo: $orderNo, orderType: $orderType, worksheetDetails: $worksheetDetails)
|
|
749
750
|
}
|
|
750
751
|
`,
|
|
@@ -6,6 +6,7 @@ import { html } from 'lit-element'
|
|
|
6
6
|
import { ARRIVAL_NOTICE, RELEASE_OF_GOODS } from '../constants'
|
|
7
7
|
import { AbstractExecuteVas } from './abstract-execute-vas'
|
|
8
8
|
|
|
9
|
+
//vas
|
|
9
10
|
class ExecuteRefVas extends localize(i18next)(AbstractExecuteVas) {
|
|
10
11
|
render() {
|
|
11
12
|
return html`
|
|
@@ -10,6 +10,7 @@ import './execute-ref-vas'
|
|
|
10
10
|
|
|
11
11
|
const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, RELEASE_OF_GOODS, VAS_ORDER }
|
|
12
12
|
|
|
13
|
+
//vas
|
|
13
14
|
class ExecuteVas extends connect(store)(localize(i18next)(PageView)) {
|
|
14
15
|
static get properties() {
|
|
15
16
|
return {
|
|
@@ -70,8 +71,7 @@ class ExecuteVas extends connect(store)(localize(i18next)(PageView)) {
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
get context() {
|
|
73
|
-
return { title: i18next.t('title.vas'),
|
|
74
|
-
help: 'operato-wms/vas/execute-vas' }
|
|
74
|
+
return { title: i18next.t('title.vas'), help: 'operato-wms/vas/execute-vas' }
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
get orderNoInput() {
|