@things-factory/operato-wms 4.3.0-alpha.1 → 4.3.2

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 (98) hide show
  1. package/client/constants/index.js +1 -0
  2. package/client/constants/order.js +14 -0
  3. package/client/pages/constants/index.js +1 -0
  4. package/client/pages/constants/setting.js +1 -0
  5. package/client/pages/constants/tote.js +14 -0
  6. package/client/pages/inbound/putaway-product.js +3 -1
  7. package/client/pages/inbound/unload-product.js +21 -11
  8. package/client/pages/inventory/inventory-adjustment-approval.js +24 -9
  9. package/client/pages/inventory/inventory-adjustment.js +79 -13
  10. package/client/pages/master/product/product-list.js +1 -1
  11. package/client/pages/master/tote-list.js +740 -0
  12. package/client/pages/order/arrival-notice/arrival-notice-detail.js +0 -2
  13. package/client/pages/order/arrival-notice/receive-arrival-notice.js +0 -2
  14. package/client/pages/order/draft-release-good/draft-release-good-detail.js +1163 -0
  15. package/client/pages/order/draft-release-good/draft-release-good-list.js +546 -0
  16. package/client/pages/order/goods-received-note/customer-received-note.js +3 -0
  17. package/client/pages/order/goods-received-note/received-note-detail.js +3 -0
  18. package/client/pages/order/release-order/b2c/b2c-order-requests.js +21 -30
  19. package/client/pages/order/release-order/bulk-print-packing-list.js +4 -0
  20. package/client/pages/order/release-order/receive-release-order-request.js +0 -2
  21. package/client/pages/order/release-order/release-order-detail.js +44 -26
  22. package/client/pages/order/return-order/receive-return-order-requests.js +0 -2
  23. package/client/pages/order/transfer-order/receive-transfer-order-request.js +1 -1
  24. package/client/pages/order/transport-order/print-delivery-note.js +0 -1
  25. package/client/pages/order/transport-order/view-delivery-note.js +1 -1
  26. package/client/pages/order/vas-order/receive-vas-order.js +0 -2
  27. package/client/pages/outbound/inventory-assign-popup.js +7 -2
  28. package/client/pages/outbound/inventory-auto-assign-popup.js +2 -1
  29. package/client/pages/outbound/loading-product.js +49 -11
  30. package/client/pages/outbound/order-remark-popup.js +112 -0
  31. package/client/pages/outbound/packing-product.js +42 -6
  32. package/client/pages/outbound/packing-worksheet-list.js +15 -0
  33. package/client/pages/outbound/picking-product.js +150 -13
  34. package/client/pages/outbound/single-outbound-worksheet.js +10 -22
  35. package/client/pages/outbound/sorting-product.js +78 -15
  36. package/client/pages/outbound/tote-popup.js +461 -0
  37. package/client/pages/outbound/worksheet-batch-picking.js +9 -2
  38. package/client/pages/outbound/worksheet-packing.js +7 -2
  39. package/client/pages/outbound/worksheet-picking.js +9 -2
  40. package/client/pages/report/inventory-summary-report.js +8 -0
  41. package/client/pages/report/outbound-order-details-report.js +18 -0
  42. package/client/pages/vas/abstract-execute-vas.js +12 -7
  43. package/client/pages/vas/print-product-label.js +15 -6
  44. package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -1
  45. package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +3 -1
  46. package/client/route.js +12 -0
  47. package/dist-server/entities/index.js +2 -1
  48. package/dist-server/entities/index.js.map +1 -1
  49. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js +168 -0
  50. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js.map +1 -0
  51. package/dist-server/graphql/index.js +1 -5
  52. package/dist-server/graphql/index.js.map +1 -1
  53. package/dist-server/graphql/resolvers/board-setting/board-settings.js +2 -1
  54. package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
  55. package/dist-server/graphql/resolvers/index.js +4 -7
  56. package/dist-server/graphql/resolvers/index.js.map +1 -1
  57. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +3 -1
  58. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  59. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +6 -0
  60. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +1 -0
  61. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +58 -0
  62. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -0
  63. package/dist-server/graphql/types/index.js +5 -8
  64. package/dist-server/graphql/types/index.js.map +1 -1
  65. package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -0
  66. package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
  67. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +9 -0
  68. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +1 -0
  69. package/dist-server/index.js +2 -5
  70. package/dist-server/index.js.map +1 -1
  71. package/dist-server/opa-app-setting-constants.js +2 -1
  72. package/dist-server/opa-app-setting-constants.js.map +1 -1
  73. package/dist-server/utils/index.js +1 -5
  74. package/dist-server/utils/index.js.map +1 -1
  75. package/helps/release-note.ko.md +11 -9
  76. package/helps/release-note.md +11 -9
  77. package/helps/release-note.ms.md +11 -9
  78. package/helps/release-note.zh.md +11 -9
  79. package/package.json +50 -50
  80. package/server/entities/index.ts +2 -2
  81. package/server/entities/warehouse-bizplace-onhand-inventory.ts +141 -0
  82. package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
  83. package/server/graphql/resolvers/index.ts +3 -2
  84. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -2
  85. package/server/graphql/resolvers/warehouse-inventory-adjustment/index.ts +5 -0
  86. package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +68 -0
  87. package/server/graphql/types/index.ts +4 -4
  88. package/server/graphql/types/reports/outbound-order-details-report.ts +2 -0
  89. package/server/graphql/types/warehouse-inventory-adjustment/index.ts +5 -0
  90. package/server/index.ts +2 -1
  91. package/server/opa-app-setting-constants.ts +1 -0
  92. package/things-factory.config.js +13 -0
  93. package/translations/en.json +48 -8
  94. package/translations/ko.json +35 -1
  95. package/translations/ms.json +35 -1
  96. package/translations/zh.json +35 -1
  97. package/config.development.js +0 -73
  98. package/config.production.js +0 -113
@@ -0,0 +1,461 @@
1
+ import '@things-factory/grist-ui'
2
+ import '@things-factory/barcode-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit-element'
6
+
7
+ import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
8
+ import { i18next, localize } from '@things-factory/i18n-base'
9
+ import { client } from '@things-factory/shell'
10
+ import { ScrollbarStyles } from '@things-factory/styles'
11
+ import { isMobileDevice } from '@things-factory/utils'
12
+ import { TOTE_STATUS } from '../constants'
13
+
14
+ class TotePopup extends localize(i18next)(LitElement) {
15
+ static get properties() {
16
+ return {
17
+ bizplace: String,
18
+ config: Object,
19
+ grist: Object,
20
+ data: Object,
21
+ orderNo: String,
22
+ toteNo: String,
23
+ _totalSeal: Number,
24
+ _selectedToteNo: String,
25
+ _toteNoList: Object,
26
+ _sealNoList: Object,
27
+ _sealed: Boolean
28
+ }
29
+ }
30
+
31
+ static get styles() {
32
+ return [
33
+ MultiColumnFormStyles,
34
+ SingleColumnFormStyles,
35
+ ScrollbarStyles,
36
+ css`
37
+ :host {
38
+ display: flex;
39
+ flex-direction: column;
40
+ overflow: hidden;
41
+ background-color: white;
42
+ }
43
+
44
+ .grist {
45
+ display: flex;
46
+ flex-direction: column;
47
+ flex: 1;
48
+ overflow-y: auto;
49
+ }
50
+ .grist-container {
51
+ overflow-y: hidden;
52
+ display: flex;
53
+ flex: 1;
54
+ padding: 10px;
55
+ }
56
+ data-grist {
57
+ overflow-y: hidden;
58
+ flex: 1;
59
+ }
60
+ h2 {
61
+ padding: var(--subtitle-padding);
62
+ font: var(--subtitle-font);
63
+ color: var(--subtitle-text-color);
64
+ border-bottom: var(--subtitle-border-bottom);
65
+ }
66
+ .grist h2 {
67
+ font: var(--grist-title-font);
68
+ }
69
+ .button-container {
70
+ padding: var(--button-container-padding);
71
+ margin: var(--button-container-margin);
72
+ text-align: var(--button-container-align);
73
+ background-color: var(--button-container-background);
74
+ height: var(--button-container-height);
75
+ }
76
+ .break {
77
+ word-wrap: break-word;
78
+ }
79
+ `
80
+ ]
81
+ }
82
+
83
+ render() {
84
+ return html`
85
+ <form class="multi-column-form">
86
+ <fieldset>
87
+ <legend>${i18next.t('title.tote')}</legend>
88
+
89
+ <label class="break">${i18next.t('field.now_scanning')}</label>
90
+ <input type="text" .value="${this.toteNo || ''} ${this._sealed ? '(Sealed)' : ''}" disabled />
91
+ </fieldset>
92
+ </form>
93
+
94
+ <form id="info-form" class="multi-column-form">
95
+ <fieldset>
96
+ <label>${i18next.t('field.tote')}</label>
97
+ <barcode-scanable-input
98
+ name="toteNo"
99
+ custom-input
100
+ @keypress="${e => {
101
+ if (e.keyCode === 13) {
102
+ e.preventDefault()
103
+ this._checkToteAndOrderTote()
104
+ }
105
+ }}"
106
+ ></barcode-scanable-input>
107
+ </fieldset>
108
+
109
+ <fieldset>
110
+ <label>${i18next.t('field.scanned')}</label>
111
+ <select
112
+ name="toteNoList"
113
+ @change="${e => {
114
+ this._selectedToteNo = this._toteNoList.filter(itm => itm.id == e.currentTarget.value)
115
+ if (this._selectedToteNo) this.grist.fetch()
116
+ }}"
117
+ >
118
+ <option value="" selected>-- ${i18next.t('text.tote_number')} --</option>
119
+ ${(this._toteNoList || []).map(list => html` <option value=${list.id}>${list.name}</option> `)}
120
+ </select>
121
+ </fieldset>
122
+ </form>
123
+
124
+ <form class="multi-column-form">
125
+ <fieldset>
126
+ <label>${i18next.t('field.seal_no')}</label>
127
+ <barcode-scanable-input
128
+ name="sealNo"
129
+ custom-input
130
+ @keypress="${e => {
131
+ if (e.keyCode === 13) {
132
+ e.preventDefault()
133
+ this.sealNo = this.sealNoInput.value
134
+ if (this.toteNo) {
135
+ this._sealTote()
136
+ } else {
137
+ this._showToast({ message: i18next.t('text.tote_is_not_scanned') })
138
+ }
139
+ }
140
+ }}"
141
+ ></barcode-scanable-input>
142
+ </fieldset>
143
+
144
+ <label>${i18next.t('field.scanned')} (${this._totalSeal || 0})</label>
145
+ <select name="sealNoList">
146
+ <option value="">-- ${i18next.t('text.seal_number')} --</option>
147
+ ${(this._sealNoList?.orderToteSeals || []).map(
148
+ list => html` <option value="${list.name}">${list.name}</option> `
149
+ )}
150
+ </select>
151
+ </form>
152
+
153
+ <div class="grist-container">
154
+ <div class="grist">
155
+ <data-grist
156
+ id="grist"
157
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
158
+ .config=${this.config}
159
+ .fetchHandler=${this.fetchOrderToteItems.bind(this)}
160
+ ></data-grist>
161
+ </div>
162
+ </div>
163
+
164
+ <div class="button-container">
165
+ <mwc-button
166
+ danger
167
+ @click=${() => {
168
+ this.dispatchEvent(
169
+ new CustomEvent('completed', {
170
+ detail: this._sealed ? '' : this.toteNo
171
+ })
172
+ )
173
+ history.back()
174
+ }}
175
+ raised
176
+ label="${i18next.t('button.back')}"
177
+ ></mwc-button>
178
+ </div>
179
+ `
180
+ }
181
+
182
+ get grist() {
183
+ return this.shadowRoot.querySelector('data-grist#grist')
184
+ }
185
+
186
+ get toteNoInput() {
187
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=toteNo]').shadowRoot.querySelector('input')
188
+ }
189
+
190
+ get sealNoInput() {
191
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=sealNo]').shadowRoot.querySelector('input')
192
+ }
193
+
194
+ _focusOnSealNoInput() {
195
+ setTimeout(() => this.sealNoInput.focus(), 50)
196
+ }
197
+
198
+ _focusOnToteNoInput() {
199
+ setTimeout(() => this.toteNoInput.focus(), 50)
200
+ }
201
+
202
+ async firstUpdated() {
203
+ this.config = {
204
+ pagination: { pages: [10, 20, 50, 100] },
205
+ rows: {
206
+ appendable: false
207
+ },
208
+ columns: [
209
+ { type: 'gutter', gutterName: 'sequence' },
210
+ {
211
+ type: 'string',
212
+ name: 'sku',
213
+ header: i18next.t('field.sku'),
214
+ width: 180
215
+ },
216
+ {
217
+ type: 'string',
218
+ name: 'packingType',
219
+ header: i18next.t('field.packing_type'),
220
+ width: 180
221
+ },
222
+ {
223
+ type: 'string',
224
+ name: 'pickedQty',
225
+ header: i18next.t('field.picked_qty'),
226
+ width: 180
227
+ }
228
+ ]
229
+ }
230
+
231
+ await this._fetchToteList()
232
+ this._focusOnToteNoInput()
233
+ }
234
+
235
+ async fetchOrderToteItems({ sorters = [] }) {
236
+ if (!this._selectedToteNo || this._selectedToteNo.length < 1) {
237
+ this._totalSeal = 0
238
+ this._sealNoList = null
239
+ return {
240
+ total: 0,
241
+ records: []
242
+ }
243
+ }
244
+
245
+ const sortings = sorters
246
+
247
+ const response = await client.query({
248
+ query: gql`
249
+ query orderToteItems($toteNo: String!, $orderNo: String!, $sortings: [Sorting!]!) {
250
+ orderToteItems(toteNo: $toteNo, orderNo: $orderNo, sortings: $sortings) {
251
+ items {
252
+ id
253
+ name
254
+ orderProduct {
255
+ id
256
+ product {
257
+ id
258
+ sku
259
+ packingType
260
+ }
261
+ }
262
+ qty
263
+ }
264
+ total
265
+ }
266
+ }
267
+ `,
268
+ variables: {
269
+ toteNo: this._selectedToteNo[0].name,
270
+ sortings,
271
+ orderNo: this.orderNo
272
+ }
273
+ })
274
+
275
+ if (!response.errors) {
276
+ if (this._selectedToteNo) {
277
+ this._sealNoList = this._toteNoList.find(itm => itm.name == this._selectedToteNo[0].name)
278
+ this._totalSeal = this._sealNoList.orderToteSeals.length
279
+ }
280
+
281
+ if (this.toteNo && this.toteNo !== '') {
282
+ this._focusOnSealNoInput()
283
+ } else {
284
+ this._focusOnToteNoInput()
285
+ }
286
+
287
+ return {
288
+ total: response.data.orderToteItems.total || 0,
289
+ records:
290
+ response.data.orderToteItems.items.map(item => {
291
+ return {
292
+ ...item,
293
+ sku: item.orderProduct.product.sku,
294
+ packingType: item.orderProduct.product.packingType,
295
+ pickedQty: item.qty
296
+ }
297
+ }) || []
298
+ }
299
+ }
300
+ }
301
+
302
+ async _checkToteAndOrderTote() {
303
+ try {
304
+ this.toteNo = this.toteNoInput.value
305
+ let result = await this._checkIsSealed()
306
+
307
+ if (result) {
308
+ await this._checkToteAvailability()
309
+ } else {
310
+ this.toteNoInput.value = ''
311
+ this.toteNo = ''
312
+ }
313
+ } catch (e) {
314
+ this._showToast(e)
315
+ }
316
+
317
+ if (this.toteNo && this.toteNo !== '') {
318
+ this._focusOnSealNoInput()
319
+ } else {
320
+ this._focusOnToteNoInput()
321
+ }
322
+ }
323
+
324
+ async _sealTote() {
325
+ try {
326
+ const response = await client.mutate({
327
+ mutation: gql`
328
+ mutation sealTote($sealNo: String!, $toteNo: String!, $orderNo: String!) {
329
+ sealTote(sealNo: $sealNo, toteNo: $toteNo, orderNo: $orderNo)
330
+ }
331
+ `,
332
+ variables: {
333
+ sealNo: this.sealNo,
334
+ toteNo: this.toteNo,
335
+ orderNo: this.orderNo
336
+ }
337
+ })
338
+
339
+ if (!response.errors) {
340
+ await this._checkIsSealed()
341
+ this._selectedToteNo = ''
342
+ this._toteNoList = null
343
+ this._sealNoList = null
344
+ await this._fetchToteList()
345
+ await this.grist.fetch()
346
+ this.sealNoInput.value = ''
347
+ this.sealNo = ''
348
+ this._focusOnSealNoInput()
349
+ }
350
+ } catch (e) {
351
+ this._showToast(e)
352
+ }
353
+ }
354
+
355
+ async _checkIsSealed() {
356
+ try {
357
+ const response = await client.query({
358
+ query: gql`
359
+ query checkOrderTote($name: String!, $orderNo: String!) {
360
+ checkOrderTote(name: $name, orderNo: $orderNo)
361
+ }
362
+ `,
363
+ variables: { name: this.toteNo, orderNo: this.orderNo }
364
+ })
365
+
366
+ if (!response.errors) {
367
+ this._sealed = response.data.checkOrderTote
368
+ return true
369
+ }
370
+ } catch (e) {
371
+ this._showToast(e)
372
+ return false
373
+ }
374
+ }
375
+
376
+ async _checkToteAvailability() {
377
+ try {
378
+ const response = await client.query({
379
+ query: gql`
380
+ query checkToteStatus($name: String!, $bizplace: String!) {
381
+ checkToteStatus(name: $name, bizplace: $bizplace)
382
+ }
383
+ `,
384
+ variables: { name: this.toteNo, bizplace: this.bizplace }
385
+ })
386
+
387
+ if (!response.errors) {
388
+ const status = response.data?.checkToteStatus
389
+ if (status !== '') {
390
+ if (status == TOTE_STATUS.DAMAGED.value) {
391
+ this.toteNo = ''
392
+ throw new Error(i18next.t('text.tote_is_damaged_please_scan_again'))
393
+ }
394
+
395
+ if (status == TOTE_STATUS.DISPATCHED.value) {
396
+ this.toteNo = ''
397
+ throw new Error(i18next.t('text.tote_is_dispatched_please_scan_again'))
398
+ }
399
+
400
+ this._showToast({ message: i18next.t('text.tote_carton_(x)_is_scanned', { x: this.toteNoInput?.value }) })
401
+ } else if (this.toteNoInput?.value !== '') {
402
+ this._showToast({ message: i18next.t('text.tote_box_(x)_is_scanned', { x: this.toteNoInput?.value }) })
403
+ }
404
+ }
405
+ } catch (e) {
406
+ this._showToast(e)
407
+ } finally {
408
+ this.toteNoInput.value = ''
409
+ }
410
+ }
411
+
412
+ async _fetchToteList() {
413
+ try {
414
+ let filters = [{ name: 'releaseGoodNo', operator: 'eq', value: this.orderNo }]
415
+
416
+ const response = await client.query({
417
+ query: gql`
418
+ query orderTotes($filters: [Filter!]!) {
419
+ orderTotes(filters: $filters) {
420
+ items {
421
+ id
422
+ name
423
+ orderToteSeals {
424
+ id
425
+ name
426
+ }
427
+ }
428
+ total
429
+ }
430
+ }
431
+ `,
432
+ variables: {
433
+ filters
434
+ }
435
+ })
436
+
437
+ if (!response.errors) {
438
+ response.data?.orderTotes.items.map(itm => {
439
+ itm.orderToteSeals.orderToteId = itm.id
440
+ })
441
+
442
+ this._toteNoList = response.data?.orderTotes.items
443
+ }
444
+ } catch (e) {
445
+ this._showToast(e)
446
+ }
447
+ }
448
+
449
+ _showToast({ type, message }) {
450
+ document.dispatchEvent(
451
+ new CustomEvent('notify', {
452
+ detail: {
453
+ type,
454
+ message
455
+ }
456
+ })
457
+ )
458
+ }
459
+ }
460
+
461
+ window.customElements.define('tote-popup', TotePopup)
@@ -264,7 +264,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
264
264
  uom: record.uom,
265
265
  releaseQty: record.releaseQty,
266
266
  releaseUomValue: record.releaseUomValue,
267
- completed: record.completed
267
+ completed: record.completed,
268
+ orderProductId: record.orderProduct.id
268
269
  }
269
270
 
270
271
  this.updateContext()
@@ -296,7 +297,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
296
297
  packingSize: record.packingSize,
297
298
  uom: record.uom,
298
299
  releaseQty: record.releaseQty,
299
- releaseUomValue: record.releaseUomValue
300
+ releaseUomValue: record.releaseUomValue,
301
+ orderProductId: record.orderProduct.id
300
302
  }
301
303
  this._showInventoryAssignPopup()
302
304
  }
@@ -502,6 +504,10 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
502
504
  bizplace {
503
505
  id
504
506
  }
507
+ orderProduct {
508
+ id
509
+ name
510
+ }
505
511
  packingType
506
512
  packingSize
507
513
  uom
@@ -991,6 +997,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
991
997
  .uom="${this._selectedProduct.uom}"
992
998
  .releaseQty="${this._selectedProduct.releaseQty}"
993
999
  .releaseUomValue="${this._selectedProduct.releaseUomValue}"
1000
+ .orderProductId="${this._selectedProduct.orderProductId}"
994
1001
  @completed="${async () => {
995
1002
  this._spinner(true)
996
1003
 
@@ -173,6 +173,9 @@ class WorksheetPacking extends localize(i18next)(PageView) {
173
173
  <label>${i18next.t('label.tracking_no')}</label>
174
174
  <input name="trackingNo" readonly />
175
175
 
176
+ <label>${i18next.t('label.order_remark')}</label>
177
+ <textarea name="remark" rows="5" readonly></textarea>
178
+
176
179
  <label>${i18next.t('label.status')}</label>
177
180
  <select name="status" disabled>
178
181
  ${Object.keys(WORKSHEET_STATUS).map(
@@ -309,6 +312,7 @@ class WorksheetPacking extends localize(i18next)(PageView) {
309
312
  refNo3
310
313
  ownTransport
311
314
  releaseDate
315
+ remark
312
316
  }
313
317
  marketplaceOrder {
314
318
  name
@@ -408,7 +412,8 @@ class WorksheetPacking extends localize(i18next)(PageView) {
408
412
  ownCollection: worksheet.releaseGood.ownTransport,
409
413
  releaseDate: worksheet.releaseGood.releaseDate,
410
414
  shippingProvider: worksheet.marketplaceOrder?.shippingProvider || '',
411
- trackingNo: worksheet.marketplaceOrder?.trackingNo || ''
415
+ trackingNo: worksheet.marketplaceOrder?.trackingNo || '',
416
+ remark: worksheet.releaseGood.remark || ''
412
417
  })
413
418
 
414
419
  this.worksheetDetailData = {
@@ -459,7 +464,7 @@ class WorksheetPacking extends localize(i18next)(PageView) {
459
464
 
460
465
  _fillupForm(data) {
461
466
  for (let key in data) {
462
- Array.from(this.form.querySelectorAll('input, select')).forEach(field => {
467
+ Array.from(this.form.querySelectorAll('input, select, textarea')).forEach(field => {
463
468
  if (field.name === key && field.type === 'checkbox') {
464
469
  field.checked = data[key]
465
470
  } else if (field.name === key) {
@@ -347,7 +347,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
347
347
  releaseQty: record.releaseQty,
348
348
  releaseUomValue: record.releaseUomValue,
349
349
  availableQty: record.availableQty,
350
- completed: record.completed
350
+ completed: record.completed,
351
+ orderProductId: record.orderProduct.id
351
352
  }
352
353
 
353
354
  this.updateContext()
@@ -378,7 +379,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
378
379
  packingSize: record.packingSize,
379
380
  releaseQty: record.releaseQty,
380
381
  releaseUomValue: record.releaseUomValue,
381
- uom: record.uom
382
+ uom: record.uom,
383
+ orderProductId: record.orderProduct.id
382
384
  }
383
385
  this._showInventoryAssignPopup()
384
386
  }
@@ -671,6 +673,10 @@ class WorksheetPicking extends localize(i18next)(PageView) {
671
673
  brand
672
674
  pickingStrategy
673
675
  }
676
+ orderProduct {
677
+ id
678
+ name
679
+ }
674
680
  packingType
675
681
  packingSize
676
682
  uom
@@ -1202,6 +1208,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1202
1208
  .uom="${this._selectedProduct.uom}"
1203
1209
  .releaseQty="${this._selectedProduct.releaseQty}"
1204
1210
  .releaseUomValue="${this._selectedProduct.releaseUomValue}"
1211
+ .orderProductId="${this._selectedProduct.orderProductId}"
1205
1212
  @completed="${async () => {
1206
1213
  await this.fetchOrderInventories()
1207
1214
  await this.fetchWorksheetDetails(
@@ -271,6 +271,13 @@ class InventorySummaryReport extends connect(store)(localize(i18next)(PageView))
271
271
  header: i18next.t('field.outbound_qty'),
272
272
  width: 140
273
273
  },
274
+ {
275
+ type: 'float',
276
+ name: 'missingQty',
277
+ record: { align: 'center' },
278
+ header: i18next.t('field.missing_qty'),
279
+ width: 140
280
+ },
274
281
  {
275
282
  type: 'float',
276
283
  name: 'closingQty',
@@ -296,6 +303,7 @@ class InventorySummaryReport extends connect(store)(localize(i18next)(PageView))
296
303
  'openingQty',
297
304
  'totalInQty',
298
305
  'totalOutQty',
306
+ 'missingQty',
299
307
  'closingQty'
300
308
  ]
301
309
  },
@@ -450,6 +450,18 @@ class OutboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVi
450
450
  header: i18next.t('field.packed_at'),
451
451
  width: 170
452
452
  },
453
+ {
454
+ type: 'string',
455
+ name: 'checkedRemarkBy',
456
+ header: i18next.t('field.remark_checked_by'),
457
+ width: 170
458
+ },
459
+ {
460
+ type: 'datetime',
461
+ name: 'checkedRemarkAt',
462
+ header: i18next.t('field.remark_checked_at'),
463
+ width: 170
464
+ },
453
465
  {
454
466
  type: 'string',
455
467
  name: 'loadedBy',
@@ -515,6 +527,8 @@ class OutboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVi
515
527
  'pickedBy',
516
528
  'packedAt',
517
529
  'packedBy',
530
+ 'checkedRemarkBy',
531
+ 'checkedRemarkAt',
518
532
  'loadedAt',
519
533
  'loadedBy',
520
534
  'shippedAt'
@@ -634,6 +648,8 @@ class OutboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVi
634
648
  pickedBy
635
649
  packedAt
636
650
  packedBy
651
+ checkedRemarkAt
652
+ checkedRemarkBy
637
653
  loadedAt
638
654
  loadedBy
639
655
  shippedAt
@@ -784,6 +800,8 @@ class OutboundOrderDetailsReport extends connect(store)(localize(i18next)(PageVi
784
800
  { header: i18next.t('field.picked_at'), key: 'pickedAt', width: 15, type: 'string' },
785
801
  { header: i18next.t('field.packed_by'), key: 'packedBy', width: 15, type: 'string' },
786
802
  { header: i18next.t('field.packed_at'), key: 'packedAt', width: 15, type: 'string' },
803
+ { header: i18next.t('field.remark_checked_by'), key: 'checkedRemarkBy', width: 15, type: 'string' },
804
+ { header: i18next.t('field.remark_checked_at'), key: 'checkedRemarkAt', width: 15, type: 'string' },
787
805
  { header: i18next.t('field.loaded_by'), key: 'loadedBy', width: 15, type: 'string' },
788
806
  { header: i18next.t('field.loaded_at'), key: 'loadedAt', width: 15, type: 'string' },
789
807
  { header: i18next.t('field.shipped_at'), key: 'shippedAt', width: 15, type: 'string' }
@@ -1,19 +1,23 @@
1
+ import '../components/popup-note'
2
+ import '../components/vas-templates'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit-element'
6
+
7
+ import { sleep } from '@operato/utils'
1
8
  import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
2
9
  import { getRenderer } from '@things-factory/grist-ui'
3
10
  import { i18next } from '@things-factory/i18n-base'
4
11
  import { openPopup } from '@things-factory/layout-base'
5
- import { client, CustomAlert, navigate, UPDATE_CONTEXT, store } from '@things-factory/shell'
12
+ import { client, CustomAlert, navigate, store, UPDATE_CONTEXT } from '@things-factory/shell'
6
13
  import { CommonButtonStyles } from '@things-factory/styles'
7
- import gql from 'graphql-tag'
8
- import { css, html, LitElement } from 'lit-element'
9
- import '../components/popup-note'
10
- import '../components/vas-templates'
14
+
11
15
  import {
12
16
  VAS_BATCH_AND_PRODUCT_TYPE,
13
17
  VAS_BATCH_NO_TYPE,
14
18
  VAS_ETC_TYPE,
15
- VAS_PRODUCT_TYPE,
16
19
  VAS_NAME,
20
+ VAS_PRODUCT_TYPE,
17
21
  WORKSHEET_STATUS
18
22
  } from '../constants'
19
23
 
@@ -583,7 +587,8 @@ export class AbstractExecuteVas extends LitElement {
583
587
  this._selectedTaskStatus = null
584
588
  }
585
589
 
586
- _openIssueEditor() {
590
+ async _openIssueEditor() {
591
+ await sleep(1010)
587
592
  openPopup(
588
593
  html`
589
594
  <popup-note