@things-factory/operato-wms 4.0.24 → 4.0.25

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 (43) hide show
  1. package/client/pages/adjustment/transfer-inventory.js +32 -6
  2. package/client/pages/bulk-operation/bulk-operation.js +189 -64
  3. package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
  4. package/client/pages/bulk-operation/validate-ro-popup.js +52 -22
  5. package/client/pages/components/popup-unloading.js +47 -34
  6. package/client/pages/components/select-product-popup.js +74 -27
  7. package/client/pages/components/worksheet-information-popup.js +100 -0
  8. package/client/pages/inbound/putaway-product.js +184 -231
  9. package/client/pages/inbound/undo-unload-popup.js +295 -0
  10. package/client/pages/inbound/unload-product.js +229 -567
  11. package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
  12. package/client/pages/inbound/worksheet-unloading.js +15 -11
  13. package/client/pages/inventory/inventory-adjustment.js +9 -10
  14. package/client/pages/master/product/product-list.js +1 -1
  15. package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
  16. package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
  17. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
  18. package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
  19. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  20. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  21. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  22. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  23. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  24. package/client/pages/order/release-order/create-release-order.js +194 -89
  25. package/client/pages/order/release-order/release-order-detail.js +390 -107
  26. package/client/pages/order/return-order/create-return-order.js +3 -3
  27. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  28. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  29. package/client/pages/outbound/packing-product.js +111 -236
  30. package/client/pages/outbound/picking-product.js +287 -380
  31. package/client/pages/outbound/sorting-product.js +66 -63
  32. package/client/pages/outbound/worksheet-loading.js +7 -3
  33. package/client/pages/outbound/worksheet-packing.js +3 -3
  34. package/client/pages/outbound/worksheet-picking.js +22 -18
  35. package/client/pages/vas/print-product-label.js +17 -9
  36. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  37. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  38. package/package.json +65 -65
  39. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  40. package/translations/en.json +31 -2
  41. package/translations/ko.json +32 -3
  42. package/translations/ms.json +32 -3
  43. package/translations/zh.json +32 -3
@@ -3,6 +3,9 @@ import '@things-factory/grist-ui'
3
3
  import '../components/popup-note'
4
4
  import '../components/popup-unloading'
5
5
  import './palletizing-pallets-popup'
6
+ import '../components/worksheet-information-popup'
7
+ import './unloaded-inventories-popup'
8
+ import './undo-unload-popup'
6
9
  import './expiry-date-popup'
7
10
  import './select-product-batch'
8
11
 
@@ -11,7 +14,7 @@ import { css, html } from 'lit-element'
11
14
  import orderBy from 'lodash/orderBy'
12
15
  import { connect } from 'pwa-helpers/connect-mixin.js'
13
16
 
14
- import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
17
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
15
18
  import { i18next, localize } from '@things-factory/i18n-base'
16
19
  import { openPopup } from '@things-factory/layout-base'
17
20
  import { client, CustomAlert, PageView, store } from '@things-factory/shell'
@@ -19,68 +22,52 @@ import { CommonButtonStyles } from '@things-factory/styles'
19
22
  import { isMobileDevice } from '@things-factory/utils'
20
23
 
21
24
  import { fetchSettingRule } from '../../fetch-setting-value'
22
- import { ARRIVAL_NOTICE, INVENTORY_STATUS, PALLET_STATUS, RETURN_ORDER, VAS_TYPE } from '../constants'
25
+ import { ARRIVAL_NOTICE, PALLET_STATUS, RETURN_ORDER, VAS_TYPE } from '../constants'
23
26
 
24
27
  const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, RETURN_ORDER }
25
28
  class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
26
29
  static get properties() {
27
30
  return {
28
- _orderNo: String,
29
- _palletId: String,
31
+ _bizplaceName: String,
30
32
  _cartonId: String,
31
- _productName: String,
32
- _isLooseItem: Boolean,
33
33
  _enableProductScanning: Boolean,
34
- _isQtyChecked: Boolean,
34
+ _expirationPeriod: Number,
35
35
  _enableCartonLabel: Boolean,
36
36
  _enableInputQty: Boolean,
37
+ _isLooseItem: Boolean,
38
+ _isQtyChecked: Boolean,
37
39
  _isRequiredCheckExpiry: Boolean,
38
- _expirationPeriod: Number,
40
+ _isReusablePallet: Boolean,
41
+ _orderNo: String,
42
+ _palletId: String,
43
+ _reusablePalletId: Array,
44
+ _reusablePalletIdData: Object,
45
+ _scanning: Boolean,
46
+ _selectedOrderProduct: Object,
47
+ _selectedInventory: Object,
48
+ _unloadedInventories: Array,
49
+ _worksheetInfo: Object,
39
50
  customerCompanyDomainId: String,
40
51
  orderProductConfig: Object,
41
52
  orderProductData: Object,
53
+ orderVasData: Object,
42
54
  palletProductConfig: Object,
43
55
  palletProductData: Object,
44
- _selectedOrderProduct: Object,
45
- _selectedInventory: Object,
46
- _unloadedInventories: Array,
47
- _isReusablePallet: Boolean,
48
- _reusablePalletId: Array,
49
- _reusablePalletIdData: Object,
50
- orderVasData: Object,
51
- refOrderType: String,
52
- _scanning: Boolean
56
+ refOrderType: String
53
57
  }
54
58
  }
55
59
 
56
60
  static get styles() {
57
61
  return [
58
62
  MultiColumnFormStyles,
59
- SingleColumnFormStyles,
60
63
  css`
61
64
  :host {
62
65
  display: flex;
63
66
  flex-direction: column;
64
- }
65
- .grist {
66
- background-color: var(--main-section-background-color);
67
- display: flex;
68
67
  overflow: hidden;
69
- flex: 1;
70
- }
71
- .left-column {
72
- overflow: hidden;
73
- display: flex;
74
- flex: 1;
75
- flex-direction: column;
76
- }
77
- .right-column {
78
- overflow: auto;
79
- display: flex;
80
- flex: 1;
81
- flex-direction: column;
82
68
  }
83
69
  data-grist {
70
+ overflow: auto;
84
71
  flex: 1;
85
72
  }
86
73
  h2 {
@@ -89,41 +76,46 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
89
76
  color: var(--subtitle-text-color);
90
77
  border-bottom: var(--subtitle-border-bottom);
91
78
  }
92
- .grist h2 {
93
- margin: var(--grist-title-margin);
94
- border: var(--grist-title-border);
95
- font: var(--grist-title-font);
96
- color: var(--secondary-color);
97
- }
98
- .grist h2 mwc-icon {
79
+ legend mwc-icon {
99
80
  vertical-align: middle;
100
81
  margin: var(--grist-title-icon-margin);
101
82
  font-size: var(--grist-title-icon-size);
102
83
  color: var(--grist-title-icon-color);
103
- }
104
- h2 + data-grist {
105
- padding-top: var(--grist-title-with-grid-padding);
106
- }
107
- div.palletizing {
108
- grid-column: span 12 / auto;
109
- display: inline-flex;
110
- align-items: center;
111
- font-size: 12px;
112
- background-color: #ccc0;
113
- border: 1px solid #6e7e8e;
114
- color: #394e63;
115
- }
116
- @media (max-width: 460px) {
117
- :host {
118
- display: block;
119
- }
84
+ cursor: pointer;
120
85
  }
121
86
  `
122
87
  ]
123
88
  }
124
89
 
90
+ get actualQtyInput() {
91
+ return this.shadowRoot.querySelector('input[name=qty]')
92
+ }
93
+
94
+ get cartonInput() {
95
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]').shadowRoot.querySelector('input')
96
+ }
97
+
98
+ get completable() {
99
+ let completable = false
100
+ const orderProductWithIssues = this.orderProductData.records.filter(orderProduct => !orderProduct.validity)
101
+ if (!orderProductWithIssues?.length) {
102
+ completable = this.orderProductData.records.every(record => record.validity)
103
+ } else {
104
+ completable = orderProductWithIssues.every(record => record.issue)
105
+ }
106
+ return completable
107
+ }
108
+
125
109
  get context() {
126
110
  var actions = []
111
+ if (this._isLooseItem) {
112
+ actions.push({
113
+ title: i18next.t('button.vas'),
114
+ action: this._openVasPopup.bind(this),
115
+ ...CommonButtonStyles.vas
116
+ })
117
+ }
118
+
127
119
  if (this._selectedOrderProduct && !this._selectedOrderProduct.validity) {
128
120
  actions.push({
129
121
  title: i18next.t('button.issue'),
@@ -132,22 +124,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
132
124
  })
133
125
  }
134
126
 
135
- if (this._selectedInventory) {
127
+ if (this._unloadedInventories && this._unloadedInventories.length > 0) {
136
128
  actions.push({
137
129
  title: i18next.t('button.undo'),
138
- action: this._undoUnloading.bind(this),
130
+ action: this._openUndoUnloadPopup.bind(this),
139
131
  ...CommonButtonStyles.undo
140
132
  })
141
133
  }
142
134
 
143
- if (this._selectedInventory && !this._selectedInventory?.checked) {
144
- actions.push({
145
- title: i18next.t('button.qty_checked'),
146
- action: this._completeQC.bind(this),
147
- ...CommonButtonStyles.inspect
148
- })
149
- }
150
-
151
135
  if (
152
136
  this._unloadedInventories &&
153
137
  this._unloadedInventories.length > 0 &&
@@ -177,8 +161,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
177
161
  }
178
162
  }
179
163
 
180
- get infoForm() {
181
- return this.shadowRoot.querySelector('form#info-form')
164
+ get expDateInput() {
165
+ return this.shadowRoot.querySelector('input[name=expDate]')
182
166
  }
183
167
 
184
168
  get inputForm() {
@@ -189,31 +173,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
189
173
  return this.shadowRoot.querySelector('data-grist#order-product-grist')
190
174
  }
191
175
 
192
- get palletProductGrist() {
193
- return this.shadowRoot.querySelector('data-grist#pallet-product-grist')
194
- }
195
-
196
176
  get orderNoInput() {
197
177
  return this.shadowRoot.querySelector('barcode-scanable-input[name=orderNo]').shadowRoot.querySelector('input')
198
178
  }
199
179
 
200
- get palletInput() {
201
- return this.shadowRoot.querySelector('barcode-scanable-input[name=palletId]').shadowRoot.querySelector('input')
202
- }
203
-
204
- get cartonInput() {
205
- return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]').shadowRoot.querySelector('input')
180
+ get palletProductGrist() {
181
+ return this.shadowRoot.querySelector('data-grist#pallet-product-grist')
206
182
  }
207
183
 
208
- get completable() {
209
- let completable = false
210
- const orderProductWithIssues = this.orderProductData.records.filter(orderProduct => !orderProduct.validity)
211
- if (!orderProductWithIssues?.length) {
212
- completable = this.orderProductData.records.every(record => record.validity)
213
- } else {
214
- completable = orderProductWithIssues.every(record => record.issue)
215
- }
216
- return completable
184
+ get lotInput() {
185
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=lotId]').shadowRoot.querySelector('input')
217
186
  }
218
187
 
219
188
  get productBarcodeInput() {
@@ -222,19 +191,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
222
191
  ?.shadowRoot?.querySelector('input')
223
192
  }
224
193
 
225
- get actualQtyInput() {
226
- return this.shadowRoot.querySelector('input[name=qty]')
227
- }
228
-
229
- get expDateInput() {
230
- return this.shadowRoot.querySelector('input[name=expDate]')
231
- }
232
-
233
194
  render() {
234
195
  return html`
235
196
  <form id="info-form" class="multi-column-form">
236
197
  <fieldset>
237
- <legend>${i18next.t('title.scan_area')}</legend>
238
198
  <label>${i18next.t('label.order_type')}</label>
239
199
  <select name="orderType" @change="${this.orderTypeChangeHandler.bind(this)}">
240
200
  ${Object.keys(AVAIL_ORDER_TYPES).map(key =>
@@ -268,157 +228,90 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
268
228
  }}"
269
229
  ></barcode-scanable-input>
270
230
  </fieldset>
231
+ </form>
271
232
 
233
+ <form id="input-form" class="multi-column-form" @keypress="${this._transactionHandler.bind(this)}">
272
234
  <fieldset>
273
- <legend>
274
- ${`${
275
- this.refOrderType === AVAIL_ORDER_TYPES.RETURN_ORDER.value
276
- ? i18next.t('title.return_order')
277
- : i18next.t('title.arrival_notice')
278
- }: ${this._orderNo}`}
279
- </legend>
280
-
281
- <label>${i18next.t('label.company')}</label>
282
- <input name="bizplaceName" readonly />
283
-
284
- <label ?hidden="${this.refOrderType === AVAIL_ORDER_TYPES.RETURN_ORDER.value}"
285
- >${i18next.t('label.container_no')}</label
286
- >
287
- <input ?hidden="${this.refOrderType === AVAIL_ORDER_TYPES.RETURN_ORDER.value}" name="containerNo" readonly />
288
-
289
- <label>${i18next.t('label.ref_no')}</label>
290
- <input name="refNo" readonly />
291
-
292
- <label>${i18next.t('label.staging_area')}</label>
293
- <input name="bufferLocation" readonly />
294
-
295
- <label>${i18next.t('label.started_at')}</label>
296
- <input name="startedAt" type="datetime-local" readonly />
235
+ ${this._enableCartonLabel
236
+ ? html`<label>${i18next.t('label.carton_id')}</label>
237
+ <barcode-scanable-input
238
+ name="cartonId"
239
+ .value=${this._cartonId}
240
+ without-enter
241
+ custom-input
242
+ ></barcode-scanable-input>`
243
+ : html`<label>${i18next.t('label.lot_id')}</label>
244
+ <barcode-scanable-input
245
+ name="lotId"
246
+ .value=${this._palletId}
247
+ without-enter
248
+ custom-input
249
+ ></barcode-scanable-input>`}
250
+ ${this._enableProductScanning
251
+ ? html`
252
+ <label>${i18next.t('label.product_barcode')}</label>
253
+ <barcode-scanable-input name="productBarcode" without-enter custom-input></barcode-scanable-input>
254
+ `
255
+ : ''}
256
+ ${this._enableInputQty
257
+ ? html`
258
+ <label>${i18next.t('label.actual_qty')}</label>
259
+ <input name="qty" type="number" min="1" />
260
+ `
261
+ : ''}
262
+ ${this._isRequiredCheckExpiry
263
+ ? html`
264
+ <label>${i18next.t('label.expiry_date')}</label>
265
+ <input name="expDate" type="date" />
266
+ `
267
+ : ''}
297
268
  </fieldset>
298
269
  </form>
299
270
 
300
- <div class="grist">
301
- <div class="left-column">
302
- <h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.unloading')}</h2>
303
- <data-grist
304
- id="order-product-grist"
305
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
306
- .config=${this.orderProductConfig}
307
- .data=${this.orderProductData}
308
- ></data-grist>
309
-
310
- <h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.unloaded')}</h2>
311
- <data-grist
312
- id="pallet-product-grist"
313
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
314
- .config=${this.palletProductConfig}
315
- .data=${this.palletProductData}
316
- ></data-grist>
317
- </div>
318
-
319
- <div class="right-column">
320
- <form id="input-form" class="single-column-form" @keypress="${this._transactionHandler.bind(this)}">
271
+ <data-grist
272
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
273
+ .config=${this.orderProductConfig}
274
+ .data=${this.orderProductData}
275
+ >
276
+ <div slot="headroom" id="form-section">
277
+ <form id="info-form" class="multi-column-form">
321
278
  <fieldset>
322
- <legend>${i18next.t('title.product')}: ${this._productName}</legend>
323
-
324
- <label>${i18next.t('label.batch_no')}</label>
325
- <input name="batchId" readonly />
326
-
327
- <label>${i18next.t('label.batch_no_ref')}</label>
328
- <input name="batchIdRef" readonly />
329
-
330
- <label>${i18next.t('label.packing_type')}</label>
331
- <input name="packingTypeSize" readonly />
332
-
333
- <label>${i18next.t('label.total_pallet_qty')}</label>
334
- <input name="palletQty" type="number" readonly />
335
-
336
- <label>${i18next.t('label.total_pack_qty')}</label>
337
- <input name="totalActualQty" readonly />
338
-
339
- <label>${i18next.t('label.actual_qty')}</label>
340
- <input name="actualQty" type="number" readonly />
341
- </fieldset>
342
-
343
- ${this._isLooseItem
344
- ? html`
345
- <fieldset>
346
- <legend>${i18next.t('title.palletizing')}</legend>
347
- <div class="palletizing" @click="${this._openPalletizingPallets.bind(this)}">
348
- <mwc-icon>apps</mwc-icon>Pallets
349
- </div>
350
- </fieldset>
351
- `
352
- : ''}
353
-
354
- <fieldset>
355
- <legend>${i18next.t('title.input_section')}</legend>
356
-
357
- ${this._enableCartonLabel
358
- ? html`<label>${i18next.t('label.carton_id')}</label>
359
- <barcode-scanable-input
360
- name="cartonId"
361
- .value=${this._cartonId}
362
- without-enter
363
- custom-input
364
- ></barcode-scanable-input>`
365
- : html`<label>${i18next.t('label.lot_id')}</label>
366
- <barcode-scanable-input
367
- name="palletId"
368
- .value=${this._palletId}
369
- without-enter
370
- custom-input
371
- ></barcode-scanable-input>`}
372
- ${this._enableProductScanning
373
- ? html`
374
- <label>${i18next.t('label.product_barcode')}</label>
375
- <barcode-scanable-input name="productBarcode" without-enter custom-input></barcode-scanable-input>
376
- `
377
- : ''}
378
- ${this._enableInputQty
379
- ? html`
380
- <label>${i18next.t('label.actual_qty')}</label>
381
- <input name="qty" type="number" min="1" />
382
- `
383
- : ''}
384
- ${this._isRequiredCheckExpiry || this._selectedInventory?.expirationDate
385
- ? html`
386
- <label>${i18next.t('label.expiry_date')}</label>
387
- <input name="expDate" type="date" />
388
- `
389
- : ''}
279
+ <legend>
280
+ ${i18next.t('title.order_no')}: ${this._orderNo}
281
+ ${this._orderNo
282
+ ? html`(${this._bizplaceName})
283
+ <mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
284
+ : ''}
285
+ </legend>
390
286
  </fieldset>
391
287
  </form>
392
288
  </div>
393
- </div>
289
+ </data-grist>
394
290
  `
395
291
  }
396
292
 
397
293
  constructor() {
398
294
  super()
399
- this._isReusablePallet = false
400
- this._isLooseItem = false
401
295
  this._enableCartonLabel = false
402
296
  this._enableInputQty = true
403
- this._isQtyChecked = false
404
297
  this._enableProductScanning = false
405
- this._isRequiredCheckExpiry = false
406
298
  this._expirationPeriod = 0
299
+ this._isLooseItem = false
300
+ this._isQtyChecked = false
301
+ this._isRequiredCheckExpiry = false
302
+ this._isReusablePallet = false
407
303
  this._orderNo = ''
408
- this._productName = ''
409
- this._productSku = ''
304
+ this._scanning = false
410
305
  this.refOrderType = AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value
411
306
  this.orderProductData = { records: [] }
412
- this.reusablePalletIdData = { records: [] }
413
307
  this.orderVasData = { records: [] }
414
- this._scanning = false
308
+ this.reusablePalletIdData = { records: [] }
415
309
  }
416
310
 
417
311
  updated(changedProps) {
418
312
  if (
419
313
  changedProps.has('_orderNo') ||
420
314
  changedProps.has('_selectedOrderProduct') ||
421
- changedProps.has('_selectedInventory') ||
422
315
  changedProps.has('_unloadedInventories')
423
316
  ) {
424
317
  this.updateContext()
@@ -439,15 +332,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
439
332
  click: (columns, data, column, record, rowIndex) => {
440
333
  if (record && record.batchId) {
441
334
  this._selectedOrderProduct = record
442
- this._selectedInventory = null
443
- this._productName = `${record.product.sku + ' - ' + record.product.name} ${
444
- record.product.description ? `(${record.product.description})` : ''
445
- }`
446
335
  this._isRequiredCheckExpiry = record.product?.isRequiredCheckExpiry
447
336
  this._isQtyChecked = false
448
337
 
449
- record.totalActualQty = `${record.actualPackQty || 0} / ${record.packQty}`
450
-
451
338
  this.inputForm.reset()
452
339
  if (this._enableCartonLabel) {
453
340
  if (this._enableProductScanning) {
@@ -457,11 +344,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
457
344
  this.cartonInput.value = ''
458
345
  this._focusOnCartonInput()
459
346
  } else {
460
- this.palletInput.value = ''
461
- this._focusOnPalletInput()
347
+ this.lotInput.value = ''
348
+ this._focusOnLotInput()
462
349
  }
463
- this._fillUpForm(this.inputForm, record)
464
- this._fetchInventories()
465
350
  }
466
351
  }
467
352
  }
@@ -479,11 +364,42 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
479
364
  'palletQty',
480
365
  'actualPalletQty',
481
366
  'packQty',
482
- 'actualPackQty'
367
+ 'actualPackQty',
368
+ 'issue'
483
369
  ]
484
370
  },
485
371
  columns: [
486
372
  { type: 'gutter', gutterName: 'sequence' },
373
+ {
374
+ type: 'gutter',
375
+ gutterName: 'button',
376
+ icon: 'reorder',
377
+ handlers: {
378
+ click: (columns, data, column, record, rowIndex) => {
379
+ if (!this._unloadedInventories?.length) return
380
+
381
+ const { sku, batchId, packingType, packingSize } = record
382
+ openPopup(
383
+ html`
384
+ <unloaded-inventories-popup
385
+ .unloadedInventories="${this._unloadedInventories.filter(
386
+ inventory =>
387
+ inventory.batchId == batchId &&
388
+ inventory?.product.sku == sku &&
389
+ inventory.packingType == packingType &&
390
+ inventory.packingSize == packingSize
391
+ )}"
392
+ ></unloaded-inventories-popup>
393
+ `,
394
+ {
395
+ backdrop: true,
396
+ size: 'large',
397
+ title: i18next.t('title.unloaded_inventories')
398
+ }
399
+ )
400
+ }
401
+ }
402
+ },
487
403
  {
488
404
  type: 'boolean',
489
405
  name: 'validity',
@@ -493,190 +409,82 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
493
409
  {
494
410
  type: 'string',
495
411
  name: 'batchId',
412
+ label: true,
496
413
  header: i18next.t('field.batch_id'),
497
414
  width: 150
498
415
  },
499
416
  {
500
417
  type: 'string',
501
418
  name: 'batchIdRef',
419
+ label: true,
502
420
  header: i18next.t('field.batch_no_ref'),
503
421
  width: 150
504
422
  },
505
423
  {
506
- type: 'strinng',
424
+ type: 'string',
507
425
  name: 'sku',
426
+ label: true,
508
427
  header: i18next.t('field.sku'),
509
428
  width: 120
510
429
  },
511
430
  {
512
431
  type: 'object',
513
432
  name: 'product',
433
+ label: true,
514
434
  header: i18next.t('field.product'),
515
435
  width: 200
516
436
  },
517
437
  {
518
- type: 'strinng',
438
+ type: 'string',
519
439
  name: 'packingType',
440
+ label: true,
520
441
  header: i18next.t('field.packing_type'),
521
442
  width: 120
522
443
  },
523
444
  {
524
445
  type: 'number',
525
446
  name: 'packingSize',
447
+ label: true,
526
448
  header: i18next.t('field.packing_size'),
527
449
  width: 120
528
450
  },
529
451
  {
530
452
  type: 'integer',
531
453
  name: 'palletQty',
454
+ label: true,
532
455
  header: i18next.t('field.pallet_qty'),
533
- width: 60
456
+ width: 90
534
457
  },
535
458
  {
536
459
  type: 'integer',
537
460
  name: 'actualPalletQty',
461
+ label: true,
538
462
  header: i18next.t('field.actual_pallet_qty'),
539
- width: 60
463
+ width: 100
540
464
  },
541
465
  {
542
466
  type: 'integer',
543
467
  name: 'packQty',
468
+ label: true,
544
469
  header: i18next.t('field.total_pack_qty'),
545
- width: 60
470
+ width: 90
546
471
  },
547
472
  {
548
473
  type: 'integer',
549
474
  name: 'actualPackQty',
475
+ label: true,
550
476
  header: i18next.t('field.actual_pack_qty'),
551
- width: 60
477
+ width: 100
552
478
  },
553
479
  {
554
480
  type: 'string',
555
481
  name: 'issue',
482
+ label: true,
556
483
  header: i18next.t('field.issue'),
557
484
  width: 100
558
485
  }
559
486
  ]
560
487
  }
561
-
562
- this.palletProductConfig = {
563
- rows: {
564
- appendable: false,
565
- handlers: {
566
- click: (columns, data, column, record, rowIndex) => {
567
- if (record.reusablePallet) {
568
- this._openPopupUnloading(record.reusablePallet.name, this.orderProductData, {
569
- records: this.palletProductData.records.filter(item => record.reusablePallet == item.reusablePallet)
570
- })
571
- } else {
572
- if (record && record.palletId) {
573
- this._selectedInventory = record
574
- this._productName = `${record.product.sku + ' - ' + record.product.name} ${
575
- record.product.description ? `(${record.product.description})` : ''
576
- }`
577
-
578
- if (this._enableCartonLabel) this.cartonInput.value = record.cartonId
579
- else this.palletInput.value = record.palletId
580
-
581
- if (record?.checked) this._isQtyChecked = true
582
- else this._isQtyChecked = false
583
-
584
- record.actualQty = record.qty
585
-
586
- if (record?.product.isRequiredCheckExpiry && !record?.expirationDate) this._openUpdateExpiryDate()
587
- if (!record?.checked && this._enableProductScanning) this._focusOnProductBarcodeInput()
588
- else if (record.checked && this._enableProductScanning) this.productBarcodeInput.readOnly = true
589
-
590
- this._fillUpForm(this.inputForm, record)
591
- }
592
- }
593
- }
594
- }
595
- },
596
- list: {
597
- fields: [
598
- 'checked',
599
- 'sku',
600
- 'product',
601
- 'batchId',
602
- 'palletId',
603
- 'cartonId',
604
- 'qty',
605
- 'expirationDate',
606
- 'reusablePalletName'
607
- ]
608
- },
609
- pagination: { infinite: true },
610
- columns: [
611
- { type: 'gutter', gutterName: 'sequence' },
612
- {
613
- type: 'boolean',
614
- name: 'checked',
615
- header: i18next.t('field.checked'),
616
- width: 40
617
- },
618
- {
619
- type: 'strinng',
620
- name: 'sku',
621
- header: i18next.t('field.sku'),
622
- width: 120
623
- },
624
- {
625
- type: 'object',
626
- name: 'product',
627
- header: i18next.t('field.product'),
628
- width: 240
629
- },
630
- {
631
- type: 'string',
632
- name: 'packingType',
633
- header: i18next.t('field.packing_type'),
634
- width: 120
635
- },
636
- {
637
- type: 'string',
638
- name: 'packingSize',
639
- header: i18next.t('field.packing_size'),
640
- width: 120
641
- },
642
- {
643
- type: 'string',
644
- name: 'batchId',
645
- header: i18next.t('field.batch_id'),
646
- width: 120
647
- },
648
- {
649
- type: 'string',
650
- name: 'palletId',
651
- header: i18next.t('field.lot_id'),
652
- width: 120
653
- },
654
- {
655
- type: 'string',
656
- name: 'cartonId',
657
- header: i18next.t('field.carton_id'),
658
- width: 120
659
- },
660
- {
661
- type: 'integer',
662
- name: 'qty',
663
- header: i18next.t('field.actual_pack_qty'),
664
- width: 80
665
- },
666
- {
667
- type: 'date',
668
- name: 'expirationDate',
669
- header: i18next.t('field.exp_date'),
670
- width: 120
671
- },
672
- {
673
- type: 'string',
674
- name: 'reusablePalletName',
675
- header: i18next.t('field.reusable_pallet'),
676
- width: 120
677
- }
678
- ]
679
- }
680
488
  }
681
489
 
682
490
  async _fetchProducts(orderNo) {
@@ -691,6 +499,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
691
499
  customerCompanyDomainId
692
500
  containerNo
693
501
  refNo
502
+ refNo2
503
+ refNo3
694
504
  looseItem
695
505
  bufferLocation
696
506
  startedAt
@@ -743,8 +553,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
743
553
  const orderVasInfo = worksheetInfo.orderVas
744
554
 
745
555
  this._orderNo = orderNo
556
+ this._bizplaceName = worksheetInfo.bizplaceName
746
557
  this._isLooseItem = worksheetInfo.looseItem
747
- this._fillUpForm(this.infoForm, worksheetInfo)
558
+ this._worksheetInfo = worksheetInfo
748
559
 
749
560
  this.orderVasData = orderVasInfo
750
561
  ? {
@@ -869,13 +680,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
869
680
  }
870
681
 
871
682
  async _fetchInventories() {
872
- let worksheetDetailNames = []
873
- if (this._selectedOrderProduct) worksheetDetailNames.push(this._selectedOrderProduct.name)
874
- else worksheetDetailNames = this.orderProductData.records.map(record => record.name)
875
683
  const response = await client.query({
876
684
  query: gql`
877
685
  query unloadedInventories($worksheetDetailNames: [String]!) {
878
686
  unloadedInventories(worksheetDetailNames: $worksheetDetailNames) {
687
+ id
879
688
  batchId
880
689
  packingType
881
690
  bizplace {
@@ -903,28 +712,11 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
903
712
  }
904
713
  }
905
714
  `,
906
- variables: { worksheetDetailNames }
715
+ variables: { worksheetDetailNames: this.orderProductData.records.map(record => record.name) }
907
716
  })
908
717
 
909
718
  if (!response.errors) {
910
- this._unloadedInventories = response.data.unloadedInventories.map(unloadedInventory => {
911
- return {
912
- ...unloadedInventory,
913
- checked: unloadedInventory.status === INVENTORY_STATUS.UNLOADED.value,
914
- expirationDate: unloadedInventory?.expirationDate ? unloadedInventory?.expirationDate : null,
915
- sku: unloadedInventory.product.sku,
916
- packingTypeSize: `${unloadedInventory.packingType}(${unloadedInventory.packingSize})`
917
- }
918
- })
919
-
920
- this.palletProductData = {
921
- records: this._unloadedInventories.map(unloadedInventory => {
922
- return {
923
- ...unloadedInventory,
924
- reusablePalletName: unloadedInventory?.reusablePallet ? unloadedInventory.reusablePallet.name : ''
925
- }
926
- })
927
- }
719
+ this._unloadedInventories = response.data.unloadedInventories
928
720
 
929
721
  this.orderProductData = {
930
722
  records: this.orderProductData.records.map(orderProduct => {
@@ -954,9 +746,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
954
746
  this._focusOnCartonInput()
955
747
  }
956
748
  } else {
957
- this.palletInput.value = ''
749
+ this.lotInput.value = ''
958
750
  if (this._enableInputQty) this.actualQtyInput.value = ''
959
- this._focusOnPalletInput()
751
+ this._focusOnLotInput()
960
752
  }
961
753
 
962
754
  if (this._enableProductScanning) {
@@ -970,38 +762,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
970
762
  _clearView() {
971
763
  this.orderProductData = { records: [] }
972
764
  this.palletProductData = { records: [] }
973
- this.infoForm.reset()
974
765
  this.inputForm.reset()
975
- this._productName = ''
976
766
  this._selectedOrderProduct = null
977
767
  this._selectedInventory = null
978
768
  this._unloadedInventories = null
979
769
  this.updateContext()
980
770
  }
981
771
 
982
- _fillUpForm(form, data) {
983
- for (let key in data) {
984
- Array.from(form.querySelectorAll('input')).forEach(field => {
985
- if (field.name === key && field.type === 'checkbox') {
986
- field.checked = data[key]
987
- } else if (field.name === key && field.type === 'datetime-local') {
988
- const datetime = Number(data[key])
989
- const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
990
- field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
991
- } else if (field.name === key) {
992
- if (data[key] instanceof Object) {
993
- const objectData = data[key]
994
- field.value = `${objectData.name} ${objectData.description ? `(${objectData.description})` : ''}`
995
- } else {
996
- field.value = data[key]
997
- }
998
- }
999
- })
1000
- }
1001
- }
1002
-
1003
772
  async _transactionHandler(e) {
1004
773
  if (e.keyCode === 13) {
774
+ e.preventDefault()
1005
775
  try {
1006
776
  if (this._enableCartonLabel) {
1007
777
  await this._validateUnloading()
@@ -1053,7 +823,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1053
823
  worksheetDetailName: this._selectedOrderProduct.name,
1054
824
  productBarcode: this.productBarcodeInput.value.trim(),
1055
825
  inventory: {
1056
- palletId: this._enableCartonLabel ? null : this.palletInput.value.trim(),
826
+ palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
1057
827
  cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
1058
828
  expirationDate: this.expDateInput?.value ? this.expDateInput.value : null
1059
829
  }
@@ -1098,7 +868,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1098
868
  variables: {
1099
869
  worksheetDetailName: this._selectedOrderProduct.name,
1100
870
  inventory: {
1101
- palletId: this._enableCartonLabel ? null : this.palletInput.value.trim(),
871
+ palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
1102
872
  cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
1103
873
  qty: parseInt(this.actualQtyInput.value),
1104
874
  expirationDate: this._isRequiredCheckExpiry ? this.expDateInput.value : null
@@ -1160,7 +930,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1160
930
  const response = await this.fetchProductDetail(this.productBarcodeInput?.value || '', '')
1161
931
 
1162
932
  if (!response.errors) {
1163
- const { product, packingSize, packingType, id } = response.data.productDetail
933
+ const { product, packingSize, packingType } = response.data.productDetail
1164
934
  const foundOrderProducts = this.orderProductData.records.filter(
1165
935
  orderProduct =>
1166
936
  orderProduct.product.id === product.id &&
@@ -1189,20 +959,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1189
959
 
1190
960
  if (foundOrderProducts?.length > 1 && !this._selectedOrderProduct) {
1191
961
  this.selectOrderProduct(foundOrderProducts)
1192
- } else if (foundOrderProducts?.length == 1) {
1193
- if (!this._selectedOrderProduct) this._selectedOrderProduct = foundOrderProducts[0]
1194
-
1195
- this._productName = `(${this._selectedOrderProduct.product.sku})${this._selectedOrderProduct.product.name} ${
1196
- this._selectedOrderProduct.product.description ? `(${this._selectedOrderProduct.product.description})` : ''
1197
- }`
1198
- this._fillUpForm(this.inputForm, this._selectedOrderProduct)
1199
- } else if (foundOrderProducts?.length == 0 && foundParentProducts?.length == 1 && !this._selectedOrderProduct) {
1200
- this._selectedOrderProduct = foundParentProducts[0]
1201
-
1202
- this._productName = `(${this._selectedOrderProduct.product.sku})${this._selectedOrderProduct.product.name} ${
1203
- this._selectedOrderProduct.product.description ? `(${this._selectedOrderProduct.product.description})` : ''
1204
- }`
1205
- this._fillUpForm(this.inputForm, this._selectedOrderProduct)
962
+ } else {
963
+ this._selectedOrderProduct = foundOrderProducts[0]
1206
964
  }
1207
965
  }
1208
966
  } catch (e) {
@@ -1235,8 +993,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1235
993
 
1236
994
  async _validateUnloading() {
1237
995
  if (!this._enableCartonLabel) {
1238
- if (!this.palletInput.value) {
1239
- this._focusOnPalletInput()
996
+ if (!this.lotInput.value) {
997
+ this._focusOnLotInput()
1240
998
  throw new Error(i18next.t('text.lot_id_is_empty'))
1241
999
  }
1242
1000
  } else {
@@ -1303,9 +1061,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1303
1061
  html`
1304
1062
  <popup-unloading
1305
1063
  .ganNo="${this._orderNo}"
1306
- ._productSku="${this._productSku}"
1307
- ._productName="${this._productName}"
1308
1064
  .reusablePallet="${reusablePallet}"
1065
+ .orderType="${this.refOrderType}"
1066
+ .orderNo="${this._orderNo}"
1309
1067
  .unloadingGristData="${unloadingData}"
1310
1068
  .unloadedGristData="${unloadedData}"
1311
1069
  .enableProductScanning="${this._enableProductScanning}"
@@ -1438,64 +1196,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1438
1196
  }
1439
1197
  }
1440
1198
 
1441
- async _undoUnloading() {
1442
- try {
1443
- this._validateSelectedInventory()
1444
- const result = await CustomAlert({
1445
- title: i18next.t('title.are_you_sure'),
1446
- text: i18next.t('text.undo_unloading'),
1447
- confirmButton: { text: i18next.t('button.confirm') },
1448
- cancelButton: { text: i18next.t('button.cancel') }
1449
- })
1450
-
1451
- if (!result.value) {
1452
- return
1453
- }
1454
-
1455
- let response
1456
- if (this._enableProductScanning && !this._selectedInventory.checked) {
1457
- response = await client.mutate({
1458
- mutation: gql`
1459
- mutation undoProductScanUnload($worksheetDetailName: String!, $palletId: String, $cartonId: String) {
1460
- undoProductScanUnload(worksheetDetailName: $worksheetDetailName, palletId: $palletId, cartonId: $cartonId)
1461
- }
1462
- `,
1463
- variables: {
1464
- worksheetDetailName: this._selectedOrderProduct.name,
1465
- palletId: this._enableCartonLabel ? null : this.palletInput.value.trim(),
1466
- cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null
1467
- }
1468
- })
1469
- } else {
1470
- response = await client.mutate({
1471
- mutation: gql`
1472
- mutation undoUnloading($worksheetDetailName: String!, $palletId: String!) {
1473
- undoUnloading(worksheetDetailName: $worksheetDetailName, palletId: $palletId)
1474
- }
1475
- `,
1476
- variables: {
1477
- worksheetDetailName: this._selectedOrderProduct.name,
1478
- palletId: this._selectedInventory.palletId
1479
- }
1480
- })
1481
- }
1482
-
1483
- if (!response.errors) {
1484
- if (this._enableCartonLabel) {
1485
- this.cartonInput.value = ''
1486
- this._isQtyChecked = false
1487
- if (this._enableInputQty) this._selectedInventory = null
1488
- if (this.expDateInput?.value) this.expDateInput.value = ''
1489
- } else {
1490
- this._selectedInventory = null
1491
- }
1492
- await this._fetchProducts(this._orderNo)
1493
- }
1494
- } catch (e) {
1495
- this._showToast(e)
1496
- }
1497
- }
1498
-
1499
1199
  _validateSelectedInventory() {
1500
1200
  if (!this._selectedInventory) throw new Error(i18next.t('text.target_does_not_selected'))
1501
1201
  if (!this._selectedOrderProduct) {
@@ -1522,7 +1222,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1522
1222
  variables: {
1523
1223
  worksheetDetailName: this._selectedOrderProduct.name,
1524
1224
  inventory: {
1525
- palletId: this._enableCartonLabel ? null : this.palletInput.value.trim(),
1225
+ palletId: this._enableCartonLabel ? null : this.lotInput.value.trim(),
1526
1226
  cartonId: this._enableCartonLabel ? this.cartonInput.value.trim() : null,
1527
1227
  expirationDate: this.expDateInput?.value ? this.expDateInput.value : null
1528
1228
  }
@@ -1566,34 +1266,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1566
1266
  })
1567
1267
 
1568
1268
  if (!response.errors) {
1569
- // const havingVas = await this.checkHavingVas(this._arrivalNoticeNo)
1570
- // if (havingVas) {
1571
- // const result = await CustomAlert({
1572
- // title: i18next.t('title.completed'),
1573
- // text: i18next.t('text.unloading_completed'),
1574
- // confirmButton: { text: i18next.t('button.move_to_x', { state: { x: i18next.t('title.vas') } }) },
1575
- // cancelButton: { text: i18next.t('button.cancel') }
1576
- // })
1577
-
1578
- // if (!result.value) {
1579
- // this._arrivalNoticeNo = null
1580
- // this._clearView()
1581
- // return
1582
- // }
1583
-
1584
- // let searchParam = new URLSearchParams()
1585
- // searchParam.append('orderNo', this._arrivalNoticeNo)
1586
- // searchParam.append('orderType', ARRIVAL_NOTICE.value)
1587
-
1588
- // navigate(`execute_vas?${searchParam.toString()}`)
1589
- // } else {
1590
- // await CustomAlert({
1591
- // title: i18next.t('title.completed'),
1592
- // text: i18next.t('text.unloading_completed'),
1593
- // confirmButton: { text: i18next.t('button.confirm') }
1594
- // })
1595
- // }
1596
-
1597
1269
  await CustomAlert({
1598
1270
  title: i18next.t('title.completed'),
1599
1271
  text: i18next.t('text.unloading_completed'),
@@ -1614,34 +1286,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1614
1286
  })
1615
1287
 
1616
1288
  if (!response.errors) {
1617
- // const havingVas = await this.checkHavingVas(this._arrivalNoticeNo)
1618
- // if (havingVas) {
1619
- // const result = await CustomAlert({
1620
- // title: i18next.t('title.completed'),
1621
- // text: i18next.t('text.unloading_completed'),
1622
- // confirmButton: { text: i18next.t('button.move_to_x', { state: { x: i18next.t('title.vas') } }) },
1623
- // cancelButton: { text: i18next.t('button.cancel') }
1624
- // })
1625
-
1626
- // if (!result.value) {
1627
- // this._arrivalNoticeNo = null
1628
- // this._clearView()
1629
- // return
1630
- // }
1631
-
1632
- // let searchParam = new URLSearchParams()
1633
- // searchParam.append('orderNo', this._arrivalNoticeNo)
1634
- // searchParam.append('orderType', ARRIVAL_NOTICE.value)
1635
-
1636
- // navigate(`execute_vas?${searchParam.toString()}`)
1637
- // } else {
1638
- // await CustomAlert({
1639
- // title: i18next.t('title.completed'),
1640
- // text: i18next.t('text.unloading_completed'),
1641
- // confirmButton: { text: i18next.t('button.confirm') }
1642
- // })
1643
- // }
1644
-
1645
1289
  await CustomAlert({
1646
1290
  title: i18next.t('title.completed'),
1647
1291
  text: i18next.t('text.unloading_completed'),
@@ -1657,29 +1301,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1657
1301
  }
1658
1302
  }
1659
1303
 
1660
- // async checkHavingVas(orderNo) {
1661
- // const response = await client.query({
1662
- // query: gql`
1663
- // query {
1664
- // havingVas(${gqlBuilder.buildArgs({
1665
- // orderType: ARRIVAL_NOTICE.value,
1666
- // orderNo
1667
- // })}) {
1668
- // id
1669
- // }
1670
- // }
1671
- // `
1672
- // })
1673
-
1674
- // if (!response.errors) {
1675
- // return Boolean(response.data.havingVas.id)
1676
- // }
1677
- // }
1678
-
1679
1304
  async _checkReusablePallet() {
1680
1305
  try {
1681
1306
  if (!this._selectedOrderProduct) throw new Error(i18next.t('text.target_is_not_selected'))
1682
- if (!this.palletInput.value) return
1307
+ if (!this.lotInput.value) return
1683
1308
 
1684
1309
  const response = await client.query({
1685
1310
  query: gql`
@@ -1690,14 +1315,14 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1690
1315
  }
1691
1316
  }
1692
1317
  `,
1693
- variables: { name: this.palletInput.value, status: PALLET_STATUS.ACTIVE.value }
1318
+ variables: { name: this.lotInput.value, status: PALLET_STATUS.ACTIVE.value }
1694
1319
  })
1695
1320
 
1696
1321
  if (!response.errors) {
1697
1322
  if (response.data.palletByStatus) {
1698
1323
  this.reusablePalletIdData = response.data.palletByStatus
1699
1324
  this._isReusablePallet = true
1700
- this._openPopupUnloading(this.palletInput.value, this.orderProductData, this.palletProductData)
1325
+ this._openPopupUnloading(this.lotInput.value, this.orderProductData, this.palletProductData)
1701
1326
  } else {
1702
1327
  await this._validateUnloading()
1703
1328
  await this._checkedLotScannedProduct()
@@ -1709,6 +1334,43 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1709
1334
  }
1710
1335
  }
1711
1336
 
1337
+ _openUndoUnloadPopup() {
1338
+ openPopup(
1339
+ html`
1340
+ <undo-unload-popup
1341
+ .enableCartonLabel="${this._enableCartonLabel}"
1342
+ .enableProductScanning="${this._enableProductScanning}"
1343
+ .orderType="${this.refOrderType}"
1344
+ .orderNo="${this._orderNo}"
1345
+ .unloadedInventories="${this._unloadedInventories}"
1346
+ @undo-inventory="${async e => {
1347
+ history.back()
1348
+ await this._fetchProducts(this._orderNo)
1349
+ this._showToast({ message: i18next.t('text.inventory_undo_successfully') })
1350
+ }}"
1351
+ ></undo-unload-popup>
1352
+ `,
1353
+ {
1354
+ backdrop: true,
1355
+ size: 'large',
1356
+ title: i18next.t('title.undo_unload')
1357
+ }
1358
+ )
1359
+ }
1360
+
1361
+ _openWorksheetInformation() {
1362
+ openPopup(
1363
+ html`
1364
+ <worksheet-information-popup .worksheetInformation="${this._worksheetInfo}"></worksheet-information-popup>
1365
+ `,
1366
+ {
1367
+ backdrop: true,
1368
+ size: 'large',
1369
+ title: i18next.t('title.order_information')
1370
+ }
1371
+ )
1372
+ }
1373
+
1712
1374
  _validateComplete() {
1713
1375
  if (this.refOrderType === AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value) {
1714
1376
  if (!this._orderNo) {
@@ -1737,7 +1399,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1737
1399
  })
1738
1400
  }
1739
1401
 
1740
- _openPalletizingPallets() {
1402
+ _openVasPopup() {
1741
1403
  openPopup(
1742
1404
  html`
1743
1405
  <palletizing-pallet-popup
@@ -1778,8 +1440,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1778
1440
  setTimeout(() => this.orderNoInput.focus(), 100)
1779
1441
  }
1780
1442
 
1781
- _focusOnPalletInput() {
1782
- setTimeout(() => this.palletInput.focus(), 100)
1443
+ _focusOnLotInput() {
1444
+ setTimeout(() => this.lotInput.focus(), 100)
1783
1445
  }
1784
1446
 
1785
1447
  _focusOnCartonInput() {