@things-factory/operato-wms 4.1.41 → 4.2.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 (63) hide show
  1. package/.eslintrc.json +11 -0
  2. package/client/pages/constants/index.js +1 -0
  3. package/client/pages/constants/inventory-item-change.js +10 -0
  4. package/client/pages/constants/order.js +5 -0
  5. package/client/pages/constants/picking-strategy.js +4 -0
  6. package/client/pages/constants/setting.js +1 -0
  7. package/client/pages/inbound/serial-number-list-popup.js +0 -1
  8. package/client/pages/inventory/inventory-adjustment-approval.js +34 -3
  9. package/client/pages/inventory/inventory-adjustment.js +144 -5
  10. package/client/pages/inventory/serial-number-list-popup.js +468 -0
  11. package/client/pages/master/pallet-list.js +24 -0
  12. package/client/pages/order/arrival-notice/edit-product-popup.js +13 -0
  13. package/client/pages/order/release-order/b2b/b2b-order-list.js +24 -1
  14. package/client/pages/order/release-order/batch-picking-popup.js +8 -0
  15. package/client/pages/order/release-order/release-extra-product-popup.js +15 -10
  16. package/client/pages/outbound/inventory-assign-popup.js +3 -24
  17. package/client/pages/outbound/inventory-auto-assign-popup.js +25 -50
  18. package/client/pages/outbound/loading-product.js +3 -3
  19. package/client/pages/outbound/merged-outbound-worksheet.js +83 -16
  20. package/client/pages/outbound/packing-product.js +109 -9
  21. package/client/pages/outbound/picking-product.js +21 -8
  22. package/client/pages/outbound/picking-replacement-popup.js +5 -0
  23. package/client/pages/outbound/return-pallet-check-popup.js +7 -1
  24. package/client/pages/outbound/route-label-popup.js +464 -0
  25. package/client/pages/outbound/serial-number-popup.js +55 -26
  26. package/client/pages/outbound/single-outbound-worksheet.js +83 -14
  27. package/client/pages/outbound/sorting-product.js +125 -34
  28. package/client/pages/outbound/worksheet-batch-picking.js +3 -15
  29. package/client/pages/outbound/worksheet-picking.js +2 -6
  30. package/cypress/fixtures/globals.json +3 -0
  31. package/cypress/fixtures/master-data/location.json +31 -0
  32. package/cypress/fixtures/master-data/pallet.json +129 -0
  33. package/cypress/fixtures/master-data/palletImport.xlsx +0 -0
  34. package/cypress/fixtures/master-data/transport-driver.json +22 -0
  35. package/cypress/fixtures/master-data/transport-vehicle.json +24 -0
  36. package/cypress/fixtures/master-data/transportDriverDeletedImport.xlsx +0 -0
  37. package/cypress/fixtures/master-data/transportDriverImport.xlsx +0 -0
  38. package/cypress/fixtures/master-data/transportVehicleDeletedImport.xlsx +0 -0
  39. package/cypress/fixtures/master-data/transportVehicleImport.xlsx +0 -0
  40. package/cypress/fixtures/master-data/transportVehicleNameSizeImport.xlsx +0 -0
  41. package/cypress/fixtures/master-data/transportVehicleNameStatusImport.xlsx +0 -0
  42. package/cypress/fixtures/master-data/warehouse.json +20 -0
  43. package/cypress/fixtures/master-data/warehouseImport.xlsx +0 -0
  44. package/cypress/integration/master-data/location.spec.js +31 -0
  45. package/cypress/integration/master-data/pallet.spec.js +176 -0
  46. package/cypress/integration/master-data/transport-driver.spec.js +131 -0
  47. package/cypress/integration/master-data/transport-vehicle.spec.js +165 -0
  48. package/cypress/integration/master-data/warehouse.spec.js +135 -0
  49. package/cypress/plugins/index.js +22 -0
  50. package/cypress/support/commands.js +425 -0
  51. package/cypress/support/index.js +31 -0
  52. package/cypress.json +9 -0
  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/opa-app-setting-constants.js +2 -1
  56. package/dist-server/opa-app-setting-constants.js.map +1 -1
  57. package/package.json +20 -10
  58. package/server/graphql/resolvers/board-setting/board-settings.ts +4 -2
  59. package/server/opa-app-setting-constants.ts +2 -1
  60. package/translations/en.json +15 -5
  61. package/translations/ko.json +13 -2
  62. package/translations/ms.json +12 -2
  63. package/translations/zh.json +12 -2
@@ -1,9 +1,9 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
+ import './route-label-popup'
3
4
 
4
5
  import gql from 'graphql-tag'
5
6
  import { css, html } from 'lit-element'
6
- import { openPopup } from '@things-factory/layout-base'
7
7
 
8
8
  import './select-operator-popup'
9
9
  import { getCodeByName } from '@things-factory/code-base'
@@ -11,6 +11,9 @@ import { i18next, localize } from '@things-factory/i18n-base'
11
11
  import { client, navigate, PageView } from '@things-factory/shell'
12
12
  import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
13
13
  import { isMobileDevice } from '@things-factory/utils'
14
+ import { openPopup } from '@things-factory/layout-base'
15
+
16
+ import { fetchSettingRule } from '../../fetch-setting-value'
14
17
 
15
18
  import { WORKSHEET_STATUS, WORKSHEET_TYPE } from '../constants'
16
19
 
@@ -38,7 +41,10 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
38
41
 
39
42
  static get properties() {
40
43
  return {
44
+ _partnersList: Array,
41
45
  _searchFields: Array,
46
+ _routeLabelSetting: Boolean,
47
+ assignee: String,
42
48
  config: Object,
43
49
  data: Object,
44
50
  targetBizplace: Object,
@@ -60,20 +66,29 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
60
66
  }
61
67
 
62
68
  get context() {
63
- return {
64
- title: i18next.t('title.outbound_worksheet'),
65
- actions: [
69
+ var actions = [
66
70
  {
67
71
  title: i18next.t('button.assign_picker'),
68
72
  action: this._assignPicker.bind(this),
69
73
  ...CommonButtonStyles.activate
70
74
  }
71
- ],
75
+ ]
76
+
77
+ if (this._routeLabelSetting) {
78
+ actions.push({
79
+ title: i18next.t('button.print_route_label'),
80
+ action: this._openPrintLabelPopup.bind(this),
81
+ ...CommonButtonStyles.label
82
+ })
83
+ }
84
+
85
+ return {
86
+ title: i18next.t('title.outbound_worksheet'),
87
+ actions,
72
88
  exportable: {
73
89
  name: i18next.t('title.outbound_worksheet'),
74
90
  data: this._exportableData.bind(this)
75
91
  },
76
-
77
92
  help: 'operato-wms/outbound/single-outbound-worksheet'
78
93
  }
79
94
  }
@@ -370,7 +385,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
370
385
  items {
371
386
  id
372
387
  name
373
- assignee{
388
+ assignee {
374
389
  id
375
390
  name
376
391
  }
@@ -398,6 +413,10 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
398
413
  name
399
414
  description
400
415
  }
416
+ domain {
417
+ id
418
+ name
419
+ }
401
420
  }
402
421
  total
403
422
  }
@@ -411,6 +430,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
411
430
  })
412
431
 
413
432
  if (!response.errors) {
433
+ let domain = response.data.worksheets.items[0]?.domain
434
+
435
+ if (domain)
436
+ this._routeLabelSetting = await fetchSettingRule('enable-print-route-label', domain.id)
437
+
438
+ this.updateContext()
414
439
  return {
415
440
  total: response.data.worksheets.total || 0,
416
441
  records:
@@ -441,6 +466,10 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
441
466
  id
442
467
  name
443
468
  description
469
+ domain {
470
+ id
471
+ name
472
+ }
444
473
  }
445
474
  }
446
475
  }
@@ -449,18 +478,18 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
449
478
  })
450
479
  this.targetBizplace = response.data.partnersBizplaces || {}
451
480
  if (!response.errors) {
481
+ this._partnersList = response.data.partnersBizplaces
452
482
  return response.data.partnersBizplaces.items
453
483
  }
454
484
  }
455
-
456
-
457
485
 
458
486
  _assignPicker() {
459
487
  try {
460
-
461
- let selectedData = this.dataGrist.selected.filter((item)=>{return item.status =="DEACTIVATED"})
462
-
463
- if(selectedData.length <= 0) throw new Error('No available worksheet selected')
488
+ let selectedData = this.dataGrist.selected.filter(item => {
489
+ return item.status == 'DEACTIVATED'
490
+ })
491
+
492
+ if (selectedData.length <= 0) throw new Error(i18next.t('text.no_available_worksheet_selected'))
464
493
 
465
494
  openPopup(
466
495
  html`
@@ -495,7 +524,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
495
524
  size: 'medium',
496
525
  title: 'select operator'
497
526
  }
498
- )
527
+ )
499
528
  } catch (error) {
500
529
  return this._showToast(error)
501
530
  }
@@ -534,6 +563,35 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
534
563
  }
535
564
  }
536
565
 
566
+ async _openPrintLabelPopup() {
567
+ try {
568
+ const bizplaceFilters = (await this.searchForm.getQueryFilters()).find(x => x.name === 'bizplaceId')
569
+ if (!bizplaceFilters) {
570
+ throw new Error(`Please select a customer to print route label.`)
571
+ } else {
572
+ let selectedPartnerDomain = this._partnersList.items.find(itm => itm.id == bizplaceFilters.value)
573
+ let partnerRouteLabelSetting = await fetchSettingRule(
574
+ 'enable-print-route-label',
575
+ selectedPartnerDomain.domain.id
576
+ )
577
+ if (partnerRouteLabelSetting == false) throw new Error(`Partner setting not found`)
578
+ }
579
+
580
+ openPopup(
581
+ html`
582
+ <route-label-popup .partnerId="${bizplaceFilters.value}" .worksheetType="${'single'}"></route-label-popup>
583
+ `,
584
+ {
585
+ backdrop: true,
586
+ size: 'large',
587
+ title: i18next.t('title.print_route_label')
588
+ }
589
+ )
590
+ } catch (e) {
591
+ this._showToast(e)
592
+ }
593
+ }
594
+
537
595
  _exportableData() {
538
596
  let records = []
539
597
  if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
@@ -591,6 +649,17 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
591
649
  navigate(`worksheet_picking/${record.name}`)
592
650
  }
593
651
  }
652
+
653
+ _showToast({ type, message }) {
654
+ document.dispatchEvent(
655
+ new CustomEvent('notify', {
656
+ detail: {
657
+ type,
658
+ message
659
+ }
660
+ })
661
+ )
662
+ }
594
663
  }
595
664
 
596
665
  window.customElements.define('single-outbound-worksheet', SingleOutboundWorksheet)
@@ -20,7 +20,6 @@ import { WORKSHEET_STATUS } from '../constants'
20
20
  class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
21
21
  static get properties() {
22
22
  return {
23
- _bizplaceName: String,
24
23
  _enableProductScanning: Boolean,
25
24
  _selectedOrderInventory: Object,
26
25
  _selectedTaskStatus: String,
@@ -129,6 +128,10 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
129
128
  return this.shadowRoot.querySelector('barcode-scanable-input[name=taskNo]').shadowRoot.querySelector('input')
130
129
  }
131
130
 
131
+ get serialInput() {
132
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=serialNumber]')?.shadowRoot.querySelector('input')
133
+ }
134
+
132
135
  _focusOnTaskNoInput() {
133
136
  setTimeout(() => this.taskNoInput.focus(), 100)
134
137
  }
@@ -141,6 +144,12 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
141
144
  setTimeout(() => this.sortingQtyInput.focus(), 100)
142
145
  }
143
146
 
147
+ _focusOnSerialInput() {
148
+ if (this.serialInput) {
149
+ setTimeout(() => this.serialInput.focus(), 50)
150
+ }
151
+ }
152
+
144
153
  render() {
145
154
  return html`
146
155
  <form class="multi-column-form">
@@ -169,9 +178,19 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
169
178
  <barcode-scanable-input name="productBarcode" custom-input></barcode-scanable-input>
170
179
  `
171
180
  : html`
172
- <label>${i18next.t('label.enter_picked_qty')}</label>
173
- <input type="number" min="1" name="sortingQty" />
181
+ ${this._isRequireSerialNumberScanningOutbound
182
+ ? ''
183
+ : html`
184
+ <label>${i18next.t('label.enter_picked_qty')}</label>
185
+ <input type="number" min="1" name="sortingQty" />
186
+ `}
174
187
  `}
188
+ ${this._isRequireSerialNumberScanningOutbound
189
+ ? html`
190
+ <label>${i18next.t('label.serial_number')}</label>
191
+ <barcode-scanable-input name="serialNumber" custom-input></barcode-scanable-input>
192
+ `
193
+ : ``}
175
194
  </fieldset>
176
195
  </form>
177
196
 
@@ -182,7 +201,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
182
201
  <legend>
183
202
  ${i18next.t('title.order_no')}: ${this.taskNo}
184
203
  ${this.taskNo
185
- ? html`(${this._bizplaceName})
204
+ ? html`(${this._selectedReleaseGood?.name})
186
205
  <mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
187
206
  : ''}
188
207
  </legend>
@@ -197,6 +216,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
197
216
  super()
198
217
  this.data = { records: [] }
199
218
  this.taskNo = ''
219
+ this._isRequireSerialNumberScanningOutbound = false
200
220
  this._enableProductScanning = false
201
221
  this._selectedOrderInventory = null
202
222
  this._selectedTaskStatus = null
@@ -223,17 +243,30 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
223
243
  if (data.records.length && record) {
224
244
  this._selectedOrderInventory = record
225
245
  this._selectedTaskStatus = record.status
246
+ this._isRequireSerialNumberScanningOutbound = record.isRequireSerialNumberScanningOutbound
226
247
 
227
248
  if (this.scannable) {
228
249
  if (this._enableProductScanning) this._focusOnProductBarcodeInput()
229
250
  }
251
+
252
+ this.updateContext()
230
253
  }
231
254
  }
232
255
  }
233
256
  },
234
257
  pagination: { infinite: true },
235
258
  list: {
236
- fields: ['completed', 'sku', 'product', 'batchId', 'packingType', 'packingSize', 'expirationDate', 'progress']
259
+ fields: [
260
+ 'completed',
261
+ 'sku',
262
+ 'product',
263
+ 'batchId',
264
+ 'packingType',
265
+ 'packingSize',
266
+ 'expirationDate',
267
+ 'progress',
268
+ 'binRemarks'
269
+ ]
237
270
  },
238
271
  columns: [
239
272
  { type: 'gutter', gutterName: 'sequence' },
@@ -291,6 +324,13 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
291
324
  header: i18next.t('field.progress'),
292
325
  label: true,
293
326
  width: 120
327
+ },
328
+ {
329
+ type: 'string',
330
+ name: 'binRemarks',
331
+ header: i18next.t('field.bin_location'),
332
+ label: true,
333
+ width: 400
294
334
  }
295
335
  ]
296
336
  }
@@ -302,9 +342,12 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
302
342
  query: gql`
303
343
  query findReleaseOrdersByTaskNo($taskNo: String!) {
304
344
  findReleaseOrdersByTaskNo(taskNo: $taskNo) {
305
- id
306
- name
307
- status
345
+ releaseGoods {
346
+ id
347
+ name
348
+ status
349
+ }
350
+ taskNo
308
351
  }
309
352
  }
310
353
  `,
@@ -312,8 +355,8 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
312
355
  })
313
356
 
314
357
  if (!response.errors) {
315
- this.releaseOrders = response.data.findReleaseOrdersByTaskNo
316
- this.taskNo = taskNo
358
+ this.releaseOrders = response.data.findReleaseOrdersByTaskNo.releaseGoods
359
+ this.taskNo = response.data.findReleaseOrdersByTaskNo.taskNo
317
360
  if (this.releaseOrders?.length) {
318
361
  this._openSelectReleaseOrderPopup()
319
362
  } else {
@@ -332,7 +375,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
332
375
  .releaseOrders=${this.releaseOrders}
333
376
  @ro-selected=${e => {
334
377
  this._selectedReleaseGood = e.detail.ro
335
- this._fetchItemList(this._selectedReleaseGood.name)
378
+ this._fetchItemList(this._selectedReleaseGood?.name)
336
379
  }}
337
380
  ></show-ro-list-popup>
338
381
  `,
@@ -376,12 +419,12 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
376
419
  }
377
420
  }
378
421
  worksheetDetailInfos {
379
- name
380
422
  batchId
381
423
  productId
382
424
  productSku
383
425
  productName
384
426
  productDescription
427
+ isRequireSerialNumberScanningOutbound
385
428
  expirationDate
386
429
  releaseQty
387
430
  sortedQty
@@ -392,6 +435,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
392
435
  id
393
436
  name
394
437
  }
438
+ binRemarks
395
439
  }
396
440
  }
397
441
  }
@@ -403,12 +447,18 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
403
447
  this._worksheetInfo = worksheetInfo
404
448
 
405
449
  this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
450
+ if (!this._selectedOrderInventory) {
451
+ this._selectedOrderInventory = worksheetDetailInfos[0]
452
+ this._isRequireSerialNumberScanningOutbound = worksheetDetailInfos[0].isRequireSerialNumberScanningOutbound
453
+ }
406
454
  this.updateContext()
407
455
  this._completeHandler()
408
456
 
409
457
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
410
458
 
411
- if (this._enableProductScanning) this._focusOnProductBarcodeInput()
459
+ if (this._isRequireSerialNumberScanningOutbound) this._focusOnSerialInput()
460
+ else if (this._enableProductScanning && !this._isRequireSerialNumberScanningOutbound)
461
+ this._focusOnProductBarcodeInput()
412
462
  else this._focusOnSortingQtyInput()
413
463
  }
414
464
  }
@@ -426,11 +476,12 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
426
476
  response = await this.commonSorting()
427
477
  }
428
478
 
429
- if (!response.errors) {
430
- if (this._enableProductScanning) this.productBarcodeInput.value = ''
431
- else this.sortingQtyInput.value = ''
479
+ if (this._isRequireSerialNumberScanningOutbound) {
480
+ this.serialInput.value = ''
481
+ }
432
482
 
433
- this._fetchItemList(this._selectedReleaseGood.name)
483
+ if (!response.errors) {
484
+ this._fetchItemList(this._selectedReleaseGood?.name)
434
485
  }
435
486
  } catch (e) {
436
487
  this._showToast(e)
@@ -440,15 +491,28 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
440
491
  async commonSorting() {
441
492
  return await client.mutate({
442
493
  mutation: gql`
443
- mutation sortingProduct($taskNo: String!, $releaseGoodNo: String!, $productId: String!, $sortingQty: Float!) {
444
- sortingProduct(taskNo: $taskNo, releaseGoodNo: $releaseGoodNo, productId: $productId, sortingQty: $sortingQty)
494
+ mutation sortingProduct(
495
+ $taskNo: String!
496
+ $releaseGoodNo: String!
497
+ $productId: String!
498
+ $sortingQty: Float!
499
+ $serialNumber: String
500
+ ) {
501
+ sortingProduct(
502
+ taskNo: $taskNo
503
+ releaseGoodNo: $releaseGoodNo
504
+ productId: $productId
505
+ sortingQty: $sortingQty
506
+ serialNumber: $serialNumber
507
+ )
445
508
  }
446
509
  `,
447
510
  variables: {
448
511
  taskNo: this.taskNo,
449
- releaseGoodNo: this._selectedReleaseGood.name,
512
+ releaseGoodNo: this._selectedReleaseGood?.name,
450
513
  productId: this._selectedOrderInventory?.product.id,
451
- sortingQty: parseFloat(this.sortingQtyInput.value)
514
+ sortingQty: this._isRequireSerialNumberScanningOutbound ? 1 : parseFloat(this.sortingQtyInput.value),
515
+ serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value.trim() : null
452
516
  }
453
517
  })
454
518
  }
@@ -456,14 +520,25 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
456
520
  async scanProductSorting() {
457
521
  return await client.mutate({
458
522
  mutation: gql`
459
- mutation scanProductSorting($taskNo: String!, $releaseGoodNo: String!, $productBarcode: String!) {
460
- scanProductSorting(taskNo: $taskNo, releaseGoodNo: $releaseGoodNo, productBarcode: $productBarcode)
523
+ mutation scanProductSorting(
524
+ $taskNo: String!
525
+ $releaseGoodNo: String!
526
+ $productBarcode: String!
527
+ $serialNumber: String
528
+ ) {
529
+ scanProductSorting(
530
+ taskNo: $taskNo
531
+ releaseGoodNo: $releaseGoodNo
532
+ productBarcode: $productBarcode
533
+ serialNumber: $serialNumber
534
+ )
461
535
  }
462
536
  `,
463
537
  variables: {
464
538
  taskNo: this.taskNo,
465
- releaseGoodNo: this._selectedReleaseGood.name,
466
- productBarcode: this.productBarcodeInput.value.trim()
539
+ releaseGoodNo: this._selectedReleaseGood?.name,
540
+ productBarcode: this.productBarcodeInput.value.trim(),
541
+ serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value.trim() : null
467
542
  }
468
543
  })
469
544
  }
@@ -494,11 +569,12 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
494
569
  }
495
570
  `,
496
571
  variables: {
497
- releaseGoodNo: this._selectedReleaseGood.name
572
+ releaseGoodNo: this._selectedReleaseGood?.name
498
573
  }
499
574
  })
500
575
  if (!response.errors) {
501
576
  this._showToast({ message: i18next.t('text.current_release_order_sorting_completed') })
577
+ this._selectedOrderInventory = null
502
578
  await this._fetchReleaseOrderList(this.taskNo)
503
579
  }
504
580
  } catch (e) {
@@ -538,20 +614,34 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
538
614
  this._focusOnProductBarcodeInput()
539
615
  throw new Error(i18next.t('text.product_barcode_is_empty'))
540
616
  }
617
+
618
+ if (this._isRequireSerialNumberScanningOutbound) {
619
+ if (!this.serialInput?.value) {
620
+ this._focusOnSerialInput()
621
+ throw new Error(i18next.t('text.empty_serial_number'))
622
+ }
623
+ }
541
624
  } else {
542
625
  // validate for order selection
543
626
  if (!this._selectedOrderInventory) throw new Error(i18next.t('text.target_is_not_selected'))
544
627
 
545
- if (!this.sortingQtyInput.checkValidity()) throw new Error(i18next.t('text.release_qty_invalid'))
628
+ if (this._isRequireSerialNumberScanningOutbound) {
629
+ if (!this.serialInput?.value) {
630
+ this._focusOnSerialInput()
631
+ throw new Error(i18next.t('text.empty_serial_number'))
632
+ }
633
+ } else {
634
+ if (!this.sortingQtyInput.checkValidity()) throw new Error(i18next.t('text.release_qty_invalid'))
546
635
 
547
- if (!parseInt(this.sortingQtyInput.value)) {
548
- this._focusOnSortingQtyInput()
549
- throw new Error(i18next.t('text.release_qty_is_empty'))
550
- }
636
+ if (!parseInt(this.sortingQtyInput.value)) {
637
+ this._focusOnSortingQtyInput()
638
+ throw new Error(i18next.t('text.release_qty_is_empty'))
639
+ }
551
640
 
552
- if (parseInt(this.sortingQtyInput.value) != this._selectedOrderInventory.releaseQty) {
553
- this._focusOnSortingQtyInput()
554
- throw new Error(i18next.t('text.wrong_sorting_qty'))
641
+ if (parseInt(this.sortingQtyInput.value) != this._selectedOrderInventory.releaseQty) {
642
+ this._focusOnSortingQtyInput()
643
+ throw new Error(i18next.t('text.wrong_sorting_qty'))
644
+ }
555
645
  }
556
646
  }
557
647
  }
@@ -579,6 +669,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
579
669
  else this.sortingQtyInput.value = ''
580
670
  this._selectedOrderInventory = null
581
671
  this._selectedTaskStatus = null
672
+ this.serialInput.value = ''
582
673
  }
583
674
 
584
675
  _showToast({ type, message }) {
@@ -497,6 +497,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
497
497
  name
498
498
  sku
499
499
  description
500
+ pickingStrategy
500
501
  }
501
502
  bizplace {
502
503
  id
@@ -531,6 +532,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
531
532
  name
532
533
  sku
533
534
  description
535
+ pickingStrategy
534
536
  }
535
537
  bizplace {
536
538
  id
@@ -981,6 +983,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
981
983
  .productId="${this._selectedProduct.product.id}"
982
984
  .productName="${this._selectedProduct.product.name}"
983
985
  .productSku="${this._selectedProduct.product.sku}"
986
+ .productPickingStrategy="${this._selectedProduct.product.pickingStrategy}"
984
987
  .bizplaceId="${this._selectedProduct.bizplaceId}"
985
988
  .worksheetType="${this._worksheetType}"
986
989
  .packingType="${this._selectedProduct.packingType}"
@@ -992,13 +995,6 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
992
995
  this._spinner(true)
993
996
 
994
997
  await this.fetchOrderInventories()
995
- // await this.fetchWorksheetDetails(
996
- // this._worksheetNo,
997
- // this._selectedProduct.batchId,
998
- // this._selectedProduct.product.name,
999
- // this._selectedProduct.product.sku,
1000
- // this._selectedProduct.packingType
1001
- // )
1002
998
 
1003
999
  this._selectedProduct.completed = true
1004
1000
 
@@ -1033,14 +1029,6 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1033
1029
  this._spinner(true)
1034
1030
 
1035
1031
  await this.fetchOrderInventories()
1036
- // await this.fetchWorksheetDetails(
1037
- // this._worksheetNo,
1038
- // this._selectedProduct?.batchId,
1039
- // this._selectedProduct?.product?.name,
1040
- // this._selectedProduct?.product?.sku,
1041
- // this._selectedProduct?.packingType,
1042
- // this._selectedProduct.packingSize
1043
- // )
1044
1032
 
1045
1033
  this._spinner(false)
1046
1034
 
@@ -669,6 +669,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
669
669
  description
670
670
  sku
671
671
  brand
672
+ pickingStrategy
672
673
  }
673
674
  packingType
674
675
  packingSize
@@ -824,12 +825,6 @@ class WorksheetPicking extends localize(i18next)(PageView) {
824
825
  this.worksheetDetailData = { records: [] }
825
826
  }
826
827
 
827
- // this code segment is already called inside _updateGristConfig().
828
- // if (this.worksheetDetailData.records.some(e => e.cartonId)) {
829
- // const palletIdColumnIdx = this.preWsdGristConfig.columns.map(c => c.name).indexOf('palletId')
830
- // this.preWsdGristConfig.columns.splice(palletIdColumnIdx, 1, cartonIdColumnConfig)
831
- // }
832
-
833
828
  this._updateGristConfig()
834
829
  this.updateContext()
835
830
  }
@@ -1199,6 +1194,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1199
1194
  .productId="${this._selectedProduct.product.id}"
1200
1195
  .productName="${this._selectedProduct.product.name}"
1201
1196
  .productSku="${this._selectedProduct.product.sku}"
1197
+ .productPickingStrategy="${this._selectedProduct.product.pickingStrategy}"
1202
1198
  .worksheetType="${this.worksheetType}"
1203
1199
  .bizplaceId="${this._selectedProduct.bizplaceId}"
1204
1200
  .packingType="${this._selectedProduct.packingType}"
@@ -0,0 +1,3 @@
1
+ {
2
+ "fileTypes": ["json", "csv", "xlsx", "xls"]
3
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "add1": {
3
+ "name": "C2B-03-04-2",
4
+ "type": "BUFFER",
5
+ "zone": "C2B",
6
+ "row": "03",
7
+ "column": "04",
8
+ "shelf": "2",
9
+ "status": "FULL"
10
+ },
11
+
12
+ "deleteOne": {
13
+ "name": "C2A-02-03-2",
14
+ "type": "BIN",
15
+ "zone": "C2A",
16
+ "row": "02",
17
+ "column": "03",
18
+ "shelf": "2",
19
+ "status": "FULL"
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+ }
29
+
30
+
31
+ }