@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.
Files changed (85) hide show
  1. package/client/pages/components/vas-templates/vas-pallet-add-popup.js +1 -0
  2. package/client/pages/components/vas-templates/vas-relabel.js +1 -0
  3. package/client/pages/components/vas-templates/vas-repack-relabel.js +1 -0
  4. package/client/pages/components/vas-templates/vas-repack.js +1 -0
  5. package/client/pages/components/vas-templates/vas-repalletizing.js +1 -0
  6. package/client/pages/components/vas-templates/vas-template.js +1 -0
  7. package/client/pages/components/vas-templates/vas-unpack.js +1 -0
  8. package/client/pages/constants/vas-target-type.js +1 -0
  9. package/client/pages/constants/worksheet.js +4 -0
  10. package/client/pages/inbound/adjust-pallet-qty.js +1 -1
  11. package/client/pages/inbound/inbound-worksheet.js +1 -0
  12. package/client/pages/inbound/palletizing-pallets-popup.js +1 -1
  13. package/client/pages/inbound/unload-product.js +1 -0
  14. package/client/pages/inbound/vas-selector.js +1 -0
  15. package/client/pages/inbound/worksheet-putaway.js +1 -0
  16. package/client/pages/inbound/worksheet-unloading.js +1 -0
  17. package/client/pages/order/arrival-notice/arrival-notice-detail.js +1 -0
  18. package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -0
  19. package/client/pages/order/arrival-notice/check-arrived-notice.js +1 -0
  20. package/client/pages/order/arrival-notice/create-arrival-notice.js +1 -0
  21. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +1 -0
  22. package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -0
  23. package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -0
  24. package/client/pages/order/release-order/create-release-order.js +713 -84
  25. package/client/pages/order/release-order/receive-release-order-request.js +1 -0
  26. package/client/pages/order/release-order/rejected-release-order.js +1 -0
  27. package/client/pages/order/release-order/release-order-detail.js +1020 -388
  28. package/client/pages/order/return-order/check-return-order.js +1 -0
  29. package/client/pages/order/return-order/rejected-return-order.js +2 -0
  30. package/client/pages/order/return-order/return-order-assign-buffer-location.js +1 -0
  31. package/client/pages/order/return-order/return-order-detail.js +1 -0
  32. package/client/pages/order/reverse-kitting-order/reverse-kitting-pallet-label-popup.js +1 -0
  33. package/client/pages/order/transfer-order/rejected-transfer-order.js +1 -0
  34. package/client/pages/order/vas-order/create-vas-order.js +1 -0
  35. package/client/pages/order/vas-order/popup/abastract-vas-create-form.js +1 -0
  36. package/client/pages/order/vas-order/popup/select-vas-popup.js +220 -0
  37. package/client/pages/order/vas-order/popup/vas-create-batch-product-type-form.js +1 -0
  38. package/client/pages/order/vas-order/popup/vas-create-batch-type-form.js +1 -0
  39. package/client/pages/order/vas-order/popup/vas-create-etc-type-form.js +1 -0
  40. package/client/pages/order/vas-order/popup/vas-create-popup.js +1 -0
  41. package/client/pages/order/vas-order/popup/vas-create-product-type-form.js +1 -0
  42. package/client/pages/order/vas-order/popup/vas-target-product-popup.js +644 -0
  43. package/client/pages/order/vas-order/receive-vas-order.js +1 -0
  44. package/client/pages/order/vas-order/vas-order-detail.js +1 -0
  45. package/client/pages/order/vas-order/vas-order-list.js +1 -0
  46. package/client/pages/order/vas-order/vas-order-requests.js +1 -0
  47. package/client/pages/outbound/loading-product.js +109 -14
  48. package/client/pages/outbound/picking-product.js +59 -1
  49. package/client/pages/outbound/vas-list-popup.js +367 -0
  50. package/client/pages/outbound/worksheet-loading.js +13 -8
  51. package/client/pages/outbound/worksheet-picking.js +4 -0
  52. package/client/pages/report/vas-report.js +534 -0
  53. package/client/pages/vas/abstract-execute-vas.js +2 -1
  54. package/client/pages/vas/execute-pure-vas.js +1 -0
  55. package/client/pages/vas/execute-ref-vas.js +1 -0
  56. package/client/pages/vas/execute-vas.js +2 -2
  57. package/client/pages/vas/related-vas-list.js +1 -0
  58. package/client/pages/vas/vas-execution-page.js +469 -0
  59. package/client/pages/vas/vas-pallet-label-popup.js +1 -0
  60. package/client/pages/vas/vas-worksheet-list.js +1 -0
  61. package/client/pages/vas/worksheet-ref-vas.js +97 -36
  62. package/client/pages/vas/worksheet-vas.js +1 -0
  63. package/client/route.js +9 -0
  64. package/config.development.js +16 -16
  65. package/dist-server/graphql/resolvers/reports/index.js +2 -1
  66. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  67. package/dist-server/graphql/resolvers/reports/vas-report.js +118 -0
  68. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -0
  69. package/dist-server/graphql/types/reports/index.js +6 -1
  70. package/dist-server/graphql/types/reports/index.js.map +1 -1
  71. package/dist-server/graphql/types/reports/vas-report-list.js +14 -0
  72. package/dist-server/graphql/types/reports/vas-report-list.js.map +1 -0
  73. package/dist-server/graphql/types/reports/vas-report.js +18 -0
  74. package/dist-server/graphql/types/reports/vas-report.js.map +1 -0
  75. package/package.json +7 -7
  76. package/server/graphql/resolvers/reports/index.ts +3 -1
  77. package/server/graphql/resolvers/reports/vas-report.ts +135 -0
  78. package/server/graphql/types/reports/index.ts +7 -1
  79. package/server/graphql/types/reports/vas-report-list.ts +8 -0
  80. package/server/graphql/types/reports/vas-report.ts +12 -0
  81. package/things-factory.config.js +11 -0
  82. package/translations/en.json +30 -5
  83. package/translations/ko.json +26 -1
  84. package/translations/ms.json +26 -1
  85. package/translations/zh.json +26 -1
@@ -0,0 +1,469 @@
1
+ import '@things-factory/barcode-ui'
2
+ import gql from 'graphql-tag'
3
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
4
+ import { i18next, localize } from '@things-factory/i18n-base'
5
+ import { PageView, store, client, CustomAlert, navigate } from '@things-factory/shell'
6
+ import { css, html } from 'lit-element'
7
+ import { connect } from 'pwa-helpers/connect-mixin.js'
8
+ import { ARRIVAL_NOTICE, RELEASE_OF_GOODS } from '../constants'
9
+ import { isMobileDevice } from '@things-factory/utils'
10
+ import { CommonButtonStyles } from '@things-factory/styles'
11
+ import { showToast } from '../../util/index'
12
+ import './execute-pure-vas'
13
+ import './execute-ref-vas'
14
+
15
+ const AVAIL_ORDER_TYPES = { RELEASE_OF_GOODS, ARRIVAL_NOTICE }
16
+
17
+ //vas
18
+ class VasExecution extends connect(store)(localize(i18next)(PageView)) {
19
+ static get properties() {
20
+ return {
21
+ refOrderType: String,
22
+ config: Object,
23
+ data: Object,
24
+ incompleteVas: Boolean,
25
+ orderNo: String,
26
+ _selectedVas: Object
27
+ }
28
+ }
29
+
30
+ static get styles() {
31
+ return [
32
+ MultiColumnFormStyles,
33
+ css`
34
+ :host {
35
+ overflow: auto;
36
+ display: flex;
37
+ flex-direction: column;
38
+ }
39
+ .container {
40
+ flex: 1;
41
+ display: flex;
42
+ flex-direction: column;
43
+ }
44
+ `
45
+ ]
46
+ }
47
+
48
+ render() {
49
+ return html`
50
+ <form class="multi-column-form" id="info-form">
51
+ <fieldset>
52
+ <legend>${i18next.t('title.scan_area')}</legend>
53
+ <label>${i18next.t('label.order_type')}</label>
54
+ <select name="orderType" @change="${this.orderTypeChangeHandler.bind(this)}">
55
+ ${Object.keys(AVAIL_ORDER_TYPES).map(
56
+ key => html`
57
+ <option value="${AVAIL_ORDER_TYPES[key].value}">
58
+ ${i18next.t(`label.${AVAIL_ORDER_TYPES[key].name}`)}
59
+ </option>
60
+ `
61
+ )}
62
+ </select>
63
+
64
+ <label>${i18next.t('label.order_no')}</label>
65
+ <barcode-scanable-input
66
+ name="orderNo"
67
+ custom-input
68
+ @keypress="${this.orderNoKeypressHandler.bind(this)}"
69
+ ></barcode-scanable-input>
70
+ </fieldset>
71
+ </form>
72
+
73
+ <!-- Showing proper component based on type of reference order -->
74
+ <div id="form-section">
75
+ <form id="info-form" class="multi-column-form">
76
+ <fieldset>
77
+ <legend>
78
+ ${i18next.t('title.vas')}
79
+ [${this._selectedVas?.__seq__
80
+ ? this._selectedVas?.__seq__
81
+ : this.data
82
+ ? parseFloat(
83
+ this.data?.records.map(data => data.targetVas.orderVasItems.executedAt === null).indexOf(true)
84
+ ) + 1
85
+ : ''}
86
+ ]
87
+ </legend>
88
+ </fieldset>
89
+ </form>
90
+ </div>
91
+ <data-grist id="vas" .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
92
+ </data-grist>
93
+ `
94
+ }
95
+
96
+ get context() {
97
+ var actions = []
98
+
99
+ if (this.incompleteVas === true) {
100
+ actions.push({
101
+ title: i18next.t('button.execute'),
102
+ action: this.executeVas.bind(this),
103
+ ...CommonButtonStyles.save
104
+ })
105
+ }
106
+
107
+ if (this.incompleteVas === false) {
108
+ actions.push({
109
+ title: i18next.t('button.complete'),
110
+ action: this.completeVas.bind(this),
111
+ ...CommonButtonStyles.submit
112
+ })
113
+ }
114
+
115
+ return {
116
+ title: i18next.t('title.vas'),
117
+ help: 'operato-wms/vas/execute-vas',
118
+ actions
119
+ }
120
+ }
121
+
122
+ get orderNoInput() {
123
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=orderNo]').shadowRoot.querySelector('input')
124
+ }
125
+
126
+ get orderTypeSelector() {
127
+ return this.shadowRoot.querySelector('select[name=orderType]')
128
+ }
129
+
130
+ get childComp() {
131
+ return this.shadowRoot.querySelector('#execute-vas')
132
+ }
133
+
134
+ async pageInitialized(changes) {
135
+ this.config = {
136
+ rows: {
137
+ appendable: false,
138
+ handlers: {
139
+ click: async (columns, data, column, record, rowIndex) => {
140
+ this._selectedVas =
141
+ record.executedAt == null
142
+ ? record
143
+ : this.data?.records.map(data => data.targetVas.orderVasItems.executedAt === null)
144
+ this.updateContext()
145
+ }
146
+ }
147
+ },
148
+ pagination: { infinite: true },
149
+ list: { fields: ['__seq__', 'done', 'batchId', 'qty', 'vasQty', 'sku', 'newSku', 'outputQty', 'remark', 'vas'] },
150
+ columns: [
151
+ { type: 'gutter', gutterName: 'sequence' },
152
+ {
153
+ type: 'boolean',
154
+ name: 'done',
155
+ record: { editable: false },
156
+ header: i18next.t('field.done'),
157
+ width: 80
158
+ },
159
+ {
160
+ type: 'string',
161
+ name: 'batchId',
162
+ header: i18next.t('field.batch_id'),
163
+ label: true,
164
+ width: 120
165
+ },
166
+ {
167
+ type: 'string',
168
+ name: 'sku',
169
+ header: i18next.t('field.sku'),
170
+ label: true,
171
+ width: 160
172
+ },
173
+ {
174
+ type: 'string',
175
+ name: 'newSku',
176
+ header: i18next.t('field.new_sku'),
177
+ label: true,
178
+ width: 160
179
+ },
180
+ {
181
+ type: 'number',
182
+ name: 'qty',
183
+ header: i18next.t('field.qty'),
184
+ label: true,
185
+ width: 80
186
+ },
187
+ {
188
+ type: 'number',
189
+ name: 'vasQty',
190
+ header: i18next.t('field.vas_qty'),
191
+ label: true,
192
+ width: 80
193
+ },
194
+ {
195
+ type: 'number',
196
+ name: 'outputQty',
197
+ header: i18next.t('field.output_qty'),
198
+ label: true,
199
+ width: 80
200
+ },
201
+ {
202
+ type: 'string',
203
+ name: 'remark',
204
+ header: i18next.t('field.remark'),
205
+ label: true,
206
+ width: 120
207
+ },
208
+ {
209
+ type: 'object',
210
+ name: 'vas',
211
+ header: i18next.t('field.vas'),
212
+ label: true,
213
+ width: 120
214
+ }
215
+ ]
216
+ }
217
+ if (this.active && changes.params) {
218
+ const { orderNo, orderType } = changes.params
219
+ if (orderNo && orderType) {
220
+ this.refOrderType = orderType
221
+ await this.updateComplete
222
+
223
+ this.orderNoInput.value = orderNo
224
+ this.orderTypeSelector.value = orderType
225
+
226
+ this.fetchVas()
227
+ }
228
+ }
229
+ await this.updateComplete
230
+ this.orderNoInput.focus()
231
+ this.refOrderType = this.orderTypeSelector.value
232
+ }
233
+
234
+ orderTypeChangeHandler(e) {
235
+ this.refOrderType = e.currentTarget.value
236
+ this.orderNoInput.select()
237
+ }
238
+
239
+ orderNoKeypressHandler(e) {
240
+ if (e.keyCode === 13) {
241
+ e.preventDefault()
242
+
243
+ this.fetchVas()
244
+ }
245
+ }
246
+
247
+ async fetchVas() {
248
+ this._selectedVas = this._selectedVas?.__seq__
249
+ ? this._selectedVas.targetVas
250
+ : this.data?.records.find(data => data.targetVas.orderVasItems.executedAt === null)
251
+
252
+ const orderNo = this.orderNoInput.value
253
+ this.orderNo = orderNo ? orderNo : this.orderNo
254
+ const orderType = this.refOrderType
255
+ if (!orderNo) return
256
+
257
+ const response = await client.query({
258
+ query: gql`
259
+ query vasWorksheet($orderNo: String!, $orderType: String!) {
260
+ vasWorksheet(orderNo: $orderNo, orderType: $orderType) {
261
+ worksheetInfo {
262
+ bizplaceName
263
+ startedAt
264
+ }
265
+ worksheetDetailInfos {
266
+ batchId
267
+ targetVas {
268
+ id
269
+ status
270
+ outputQty
271
+ qty
272
+ orderVasItems {
273
+ id
274
+ name
275
+ vasQty
276
+ vas {
277
+ id
278
+ name
279
+ description
280
+ }
281
+ executedAt
282
+ }
283
+ product {
284
+ id
285
+ sku
286
+ }
287
+ newProduct {
288
+ id
289
+ sku
290
+ }
291
+ }
292
+ inventory {
293
+ id
294
+ batchId
295
+ palletId
296
+ qty
297
+ uomValue
298
+ }
299
+ description
300
+ remark
301
+ issue
302
+ }
303
+ }
304
+ }
305
+ `,
306
+ variables: { orderNo, orderType }
307
+ })
308
+
309
+ if (!response.errors) {
310
+ const { worksheetInfo, worksheetDetailInfos } = response.data.vasWorksheet
311
+ this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
312
+ this.incompleteVas = this.data.records.find(wd => wd.targetVas?.orderVasItems?.executedAt === null) ? true : false
313
+ this._selectedVas = this._selectedVas?.__seq__
314
+ ? this._selectedVas.targetVas
315
+ : this.data.records.find(data => data.targetVas.orderVasItems.executedAt === null)
316
+ this.updateContext()
317
+ }
318
+ }
319
+
320
+ formatWorksheetDetailInfos(wsdInfos) {
321
+ let wd = []
322
+ wsdInfos
323
+ .filter(wsd => wsd.targetVas.orderVasItems)
324
+ .map(wsd => {
325
+ if (wsd.targetVas.orderVasItems.length > 1) {
326
+ for (let i = 0; i < wsd.targetVas.orderVasItems.length; i++) {
327
+ if (i == 0) {
328
+ wd.push({ ...wsd, targetVas: { ...wsd.targetVas, orderVasItems: wsd.targetVas.orderVasItems[i] } })
329
+ } else {
330
+ wd.push({ targetVas: { orderVasItems: wsd.targetVas.orderVasItems[i] } })
331
+ }
332
+ }
333
+ } else {
334
+ for (let i = 0; i < wsd.targetVas.orderVasItems.length; i++) {
335
+ wd.push({ ...wsd, targetVas: { ...wsd.targetVas, orderVasItems: wsd.targetVas.orderVasItems[i] } })
336
+ }
337
+ }
338
+ })
339
+ return wd.map(record => {
340
+ return {
341
+ ...record,
342
+ sku: record.targetVas?.product?.sku,
343
+ outputQty: record.targetVas?.outputQty,
344
+ newSku: record.targetVas?.newProduct?.sku,
345
+ qty: record.targetVas?.qty,
346
+ vas: record.targetVas?.orderVasItems?.vas,
347
+ vasQty: record.targetVas?.orderVasItems?.vasQty,
348
+ done: record.targetVas?.orderVasItems?.executedAt !== null ? true : false
349
+ }
350
+ })
351
+ }
352
+
353
+ async executeVas() {
354
+ try {
355
+ const result = await CustomAlert({
356
+ title: i18next.t('title.are_you_sure'),
357
+ text: i18next.t('text.execute_vas'),
358
+ confirmButton: { text: i18next.t('button.confirm') },
359
+ cancelButton: { text: i18next.t('button.cancel') }
360
+ })
361
+
362
+ if (!result.value) return
363
+
364
+ this.validateVas(this._selectedVas?.targetVas?.orderVasItems)
365
+ let patches = this._selectedVas?.targetVas?.orderVasItems
366
+
367
+ if (patches.length === 0) {
368
+ throw new Error(i18next.t('text.nothing_changed'))
369
+ }
370
+
371
+ patches = [
372
+ {
373
+ id: patches.id,
374
+ executedAt: new Date().getTime(),
375
+ cuFlag: 'M'
376
+ }
377
+ ]
378
+
379
+ const response = await client.mutate({
380
+ mutation: gql`
381
+ mutation updateMultipleOrderVasItem($patches: [OrderVasItemPatch!]!) {
382
+ updateMultipleOrderVasItem(patches: $patches) {
383
+ id
384
+ name
385
+ }
386
+ }
387
+ `,
388
+ variables: { patches }
389
+ })
390
+
391
+ if (!response.errors) {
392
+ document.dispatchEvent(
393
+ new CustomEvent('notify', {
394
+ detail: {
395
+ message: i18next.t('text.executed')
396
+ }
397
+ })
398
+ )
399
+
400
+ this.fetchVas()
401
+ this.updateContext()
402
+ }
403
+ } catch (e) {
404
+ showToast(e)
405
+ }
406
+ }
407
+
408
+ validateVas(vas) {
409
+ if (!vas) {
410
+ throw new Error(i18next.t('text.nothing_selected'))
411
+ }
412
+ if (vas.executedAt !== null) {
413
+ throw new Error(i18next.t('text.invalid_input_in_field', { field: i18next.t('text.executed') }))
414
+ }
415
+ }
416
+
417
+ async completeVas() {
418
+ try {
419
+ const result = await CustomAlert({
420
+ title: i18next.t('title.are_you_sure'),
421
+ text: i18next.t('text.vas_has_been_completed'),
422
+ confirmButton: { text: i18next.t('button.confirm') },
423
+ cancelButton: { text: i18next.t('button.cancel') }
424
+ })
425
+
426
+ if (!result.value) return
427
+ const response = await client.mutate({
428
+ mutation: gql`
429
+ mutation completeVas($orderNo: String!, $orderType: String!) {
430
+ completeVas(orderNo: $orderNo, orderType: $orderType)
431
+ }
432
+ `,
433
+ variables: {
434
+ orderNo: this.orderNo,
435
+ orderType: this.refOrderType
436
+ }
437
+ })
438
+
439
+ if (!response.errors) {
440
+ this._showToast({ message: i18next.t('text.vas_is_completed') })
441
+ this.clearview()
442
+ navigate('vas_worksheets')
443
+ }
444
+ } catch (e) {
445
+ this._showToast(e)
446
+ }
447
+ }
448
+ get vasGrist() {
449
+ return this.shadowRoot.querySelector('data-grist#vas')
450
+ }
451
+
452
+ clearview() {
453
+ this.orderNoInput.value = ''
454
+ this.data = {}
455
+ }
456
+
457
+ _showToast({ type, message }) {
458
+ document.dispatchEvent(
459
+ new CustomEvent('notify', {
460
+ detail: {
461
+ type,
462
+ message
463
+ }
464
+ })
465
+ )
466
+ }
467
+ }
468
+
469
+ window.customElements.define('vas-execution', VasExecution)
@@ -18,6 +18,7 @@ class VasPalletLabelPopup extends connect(store)(localize(i18next)(LitElement))
18
18
  }
19
19
  }
20
20
 
21
+ //vas
21
22
  static get styles() {
22
23
  return [
23
24
  css`
@@ -12,6 +12,7 @@ import { isMobileDevice } from '@things-factory/utils'
12
12
 
13
13
  import { ORDER_TYPES, WORKSHEET_TYPE } from '../constants'
14
14
 
15
+ //vas
15
16
  class VasWorksheetList extends localize(i18next)(PageView) {
16
17
  static get styles() {
17
18
  return [
@@ -31,6 +31,7 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
31
31
  }
32
32
  }
33
33
 
34
+ //vas
34
35
  static get styles() {
35
36
  return [
36
37
  MultiColumnFormStyles,
@@ -170,7 +171,23 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
170
171
  pageInitialized() {
171
172
  this.taskGristConfig = {
172
173
  rows: { appendable: false, handlers: { click: this.taskGristClickHandler.bind(this) } },
173
- list: { fields: ['set', 'vas', 'status'] },
174
+ list: {
175
+ fields: [
176
+ 'targetBatchId',
177
+ 'packingType',
178
+ 'uomValue',
179
+ 'newSku',
180
+ 'sku',
181
+ 'newPackingType',
182
+ 'newUomValue',
183
+ 'qty',
184
+ 'vas',
185
+ 'outputQty',
186
+ 'bufferLocation',
187
+ 'status',
188
+ 'remark'
189
+ ]
190
+ },
174
191
  pagination: { infinite: true },
175
192
  columns: [
176
193
  {
@@ -179,34 +196,34 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
179
196
  },
180
197
  {
181
198
  type: 'string',
182
- name: 'set',
183
- header: i18next.t('field.set'),
199
+ name: 'targetBatchId',
200
+ header: i18next.t('field.batch_no'),
184
201
  record: { align: 'center' },
185
- width: 60
202
+ width: 100
186
203
  },
187
204
  {
188
205
  type: 'string',
189
- name: 'targetBatchId',
190
- header: i18next.t('field.target_batch_id'),
191
- width: 80
192
- },
193
- {
194
- type: 'object',
195
- name: 'targetProduct',
196
- header: i18next.t('field.target_product'),
206
+ name: 'sku',
207
+ header: i18next.t('field.sku'),
197
208
  width: 200
198
209
  },
199
210
  {
200
211
  type: 'string',
201
212
  name: 'packingType',
202
- header: i18next.t('field.packing_type'),
203
- width: 100
213
+ header: i18next.t('field.packing_type_sku', { sku: 'SKU' }),
214
+ width: 150
204
215
  },
205
216
  {
206
- type: 'string',
207
- name: 'otherTarget',
208
- header: i18next.t('field.other_target'),
209
- width: 100
217
+ type: 'integer',
218
+ name: 'qty',
219
+ header: i18next.t('field.qty'),
220
+ width: 80
221
+ },
222
+ {
223
+ type: 'integer',
224
+ name: 'uomValue',
225
+ header: i18next.t('field.uom_value_sku', { sku: 'SKU' }),
226
+ width: 80
210
227
  },
211
228
  {
212
229
  type: 'object',
@@ -216,27 +233,45 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
216
233
  },
217
234
  {
218
235
  type: 'string',
219
- name: 'status',
220
- header: i18next.t('field.status'),
236
+ name: 'newSku',
237
+ header: i18next.t('field.new_sku'),
221
238
  width: 200
222
239
  },
223
240
  {
224
241
  type: 'string',
225
- name: 'remark',
226
- header: i18next.t('field.remark'),
227
- width: 250
242
+ name: 'newPackingType',
243
+ header: i18next.t('field.packing_type_sku', { sku: 'N.SKU' }),
244
+ width: 150
245
+ },
246
+ {
247
+ type: 'integer',
248
+ name: 'newUomValue',
249
+ header: i18next.t('field.uom_value_sku', { sku: 'N.SKU' }),
250
+ width: 80
251
+ },
252
+ {
253
+ type: 'integer',
254
+ name: 'outputQty',
255
+ header: i18next.t('field.output_qty'),
256
+ width: 80
257
+ },
258
+ {
259
+ type: 'object',
260
+ name: 'bufferLocation',
261
+ header: i18next.t('field.location'),
262
+ width: 100
228
263
  },
229
264
  {
230
265
  type: 'string',
231
- name: 'description',
232
- header: i18next.t('field.comment'),
233
- width: 250
266
+ name: 'status',
267
+ header: i18next.t('field.status'),
268
+ width: 150
234
269
  },
235
270
  {
236
271
  type: 'string',
237
- name: 'issue',
238
- header: i18next.t('field.issue'),
239
- width: 250
272
+ name: 'remark',
273
+ header: i18next.t('field.remark'),
274
+ width: 150
240
275
  }
241
276
  ]
242
277
  }
@@ -272,24 +307,41 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
272
307
  releaseGood {
273
308
  name
274
309
  }
310
+ bufferLocation {
311
+ name
312
+ }
275
313
  worksheetDetails {
276
314
  targetVas {
277
315
  set
278
- targetBatchId
279
- targetProduct {
316
+ batchId
317
+ product {
280
318
  name
281
319
  description
320
+ sku
282
321
  }
283
322
  packingType
284
- otherTarget
285
- vas {
323
+ uomValue
324
+ newProduct {
286
325
  name
287
326
  description
288
- operationGuide
327
+ sku
328
+ }
329
+ newProductDetail {
330
+ packingType
331
+ uomValue
332
+ }
333
+ orderVasItems {
334
+ vas {
335
+ name
336
+ description
337
+ operationGuide
338
+ }
339
+ vasQty
289
340
  }
290
341
  status
291
342
  remark
292
- operationGuide
343
+ qty
344
+ outputQty
293
345
  }
294
346
  description
295
347
  issue
@@ -333,7 +385,16 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
333
385
  formatTaskData() {
334
386
  return {
335
387
  records: this.worksheet.worksheetDetails.map(wsd => {
336
- return { ...wsd.targetVas, description: wsd.description, issue: wsd.issue }
388
+ return {
389
+ ...wsd.targetVas,
390
+ bufferLocation: this.worksheet.bufferLocation,
391
+ sku: wsd.targetVas.product.sku,
392
+ newSku: wsd.targetVas.newProduct?.sku,
393
+ newPackingType: wsd.targetVas.newProductDetail?.packingType,
394
+ newUomValue: wsd.targetVas.newProductDetail?.uomValue,
395
+ description: wsd.description,
396
+ issue: wsd.issue
397
+ }
337
398
  })
338
399
  }
339
400
  }
@@ -142,6 +142,7 @@ class WorksheetVas extends localize(i18next)(PageView) {
142
142
  }
143
143
  }
144
144
 
145
+ //vas
145
146
  render() {
146
147
  return html`
147
148
  <div class="form-container">