@things-factory/operato-wms 4.0.23 → 4.0.27

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 (101) hide show
  1. package/client/bootstrap.js +1 -1
  2. package/client/pages/adjustment/transfer-inventory.js +32 -6
  3. package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
  4. package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
  5. package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
  6. package/client/pages/billing/transport-summary-report.js +21 -23
  7. package/client/pages/bulk-operation/bulk-operation.js +189 -64
  8. package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
  9. package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
  10. package/client/pages/components/popup-unloading.js +47 -34
  11. package/client/pages/components/select-product-popup.js +74 -27
  12. package/client/pages/components/worksheet-information-popup.js +100 -0
  13. package/client/pages/inbound/expiry-date-popup.js +2 -2
  14. package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
  15. package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
  16. package/client/pages/inbound/putaway-product.js +196 -235
  17. package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
  18. package/client/pages/inbound/undo-unload-popup.js +295 -0
  19. package/client/pages/inbound/unload-product.js +236 -646
  20. package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
  21. package/client/pages/inbound/vas-selector.js +9 -8
  22. package/client/pages/inbound/worksheet-unloading.js +15 -11
  23. package/client/pages/inventory/inventory-adjustment.js +9 -10
  24. package/client/pages/inventory-check/check-inventory-popup.js +20 -18
  25. package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
  26. package/client/pages/inventory-check/inspecting-product.js +2 -2
  27. package/client/pages/inventory-check/inventory-check-list.js +30 -19
  28. package/client/pages/inventory-check/search-popup.js +15 -14
  29. package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
  30. package/client/pages/master/location-list.js +60 -52
  31. package/client/pages/master/pallet-list.js +34 -30
  32. package/client/pages/master/print-location-label.js +37 -36
  33. package/client/pages/master/product/product-list.js +1 -1
  34. package/client/pages/master/warehouse-list.js +33 -29
  35. package/client/pages/master/worker-list.js +30 -30
  36. package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
  37. package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
  38. package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
  39. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
  40. package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
  41. package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
  42. package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
  43. package/client/pages/order/goods-received-note/received-note-list.js +9 -8
  44. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  45. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  46. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  47. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  48. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  49. package/client/pages/order/release-order/create-release-order.js +194 -89
  50. package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
  51. package/client/pages/order/release-order/release-order-detail.js +390 -107
  52. package/client/pages/order/return-order/check-return-order.js +15 -13
  53. package/client/pages/order/return-order/create-return-order.js +3 -3
  54. package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
  55. package/client/pages/order/return-order/rejected-return-order.js +8 -14
  56. package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
  57. package/client/pages/order/return-order/return-order-detail.js +35 -31
  58. package/client/pages/order/return-order/return-order-list.js +9 -8
  59. package/client/pages/order/return-order/return-order-requests.js +20 -18
  60. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
  61. package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
  62. package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
  63. package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
  64. package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
  65. package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
  66. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  67. package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
  68. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  69. package/client/pages/order/transport-order/print-delivery-note.js +17 -16
  70. package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
  71. package/client/pages/order/transport-order/view-delivery-note.js +19 -22
  72. package/client/pages/order/vas-order/create-vas-order.js +12 -11
  73. package/client/pages/order/vas-order/receive-vas-order.js +25 -22
  74. package/client/pages/order/vas-order/vas-order-detail.js +26 -23
  75. package/client/pages/order/vas-order/vas-order-list.js +9 -8
  76. package/client/pages/order/vas-order/vas-order-requests.js +11 -12
  77. package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
  78. package/client/pages/outbound/packing-product.js +111 -236
  79. package/client/pages/outbound/picking-product.js +288 -380
  80. package/client/pages/outbound/single-outbound-worksheet.js +9 -8
  81. package/client/pages/outbound/sorting-product.js +66 -63
  82. package/client/pages/outbound/worksheet-loading.js +7 -3
  83. package/client/pages/outbound/worksheet-packing.js +3 -3
  84. package/client/pages/outbound/worksheet-picking.js +22 -18
  85. package/client/pages/report/job-sheet-list.js +9 -8
  86. package/client/pages/vas/print-product-label.js +17 -9
  87. package/client/route.js +16 -32
  88. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  89. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  90. package/package.json +65 -65
  91. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  92. package/things-factory.config.js +0 -16
  93. package/translations/en.json +34 -2
  94. package/translations/ko.json +34 -3
  95. package/translations/ms.json +34 -3
  96. package/translations/zh.json +34 -3
  97. package/client/pages/inbound/location-selector.js +0 -224
  98. package/client/pages/master/picking-bin-list.js +0 -354
  99. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
  100. package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
  101. package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
@@ -3,13 +3,14 @@ import '@things-factory/grist-ui'
3
3
  import './outbound-reusable-pallet'
4
4
  import './picking-replacement-popup'
5
5
  import './show-my-worksheet-list-popup'
6
+ import '../components/worksheet-information-popup'
6
7
  import './serial-number-popup'
7
8
 
8
9
  import gql from 'graphql-tag'
9
10
  import { css, html } from 'lit-element'
10
11
  import { connect } from 'pwa-helpers/connect-mixin.js'
11
12
 
12
- import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
13
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
13
14
  import { i18next, localize } from '@things-factory/i18n-base'
14
15
  import { openPopup } from '@things-factory/layout-base'
15
16
  import { client, CustomAlert, gqlContext, PageView, store } from '@things-factory/shell'
@@ -24,121 +25,117 @@ const PICKING_TYPES = { PICKING, BATCH_PICKING }
24
25
  class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
25
26
  static get properties() {
26
27
  return {
27
- releaseGoodNo: String,
28
- worksheetNo: String,
29
28
  config: Object,
30
29
  data: Object,
31
30
  isWholePicking: Boolean,
32
- refPickingType: String,
33
- locationNameSplit: Array,
34
31
  locations: Array,
32
+ locationNameSplit: Array,
33
+ refPickingType: String,
34
+ releaseGoodNo: String,
35
35
  orderNo: String,
36
- _productName: String,
37
- _productSku: String,
38
- _isRequireSerialNumberScanning: Boolean,
39
- // _selectedTaskStatus: String,
40
- _reusablePalletList: Object,
41
- _hasBinPicking: Boolean,
42
- _isCartonLabel: Boolean,
43
- _enableProductScanning: Boolean,
44
- _isReplacement: Boolean,
36
+ worksheetNo: String,
37
+ _bizplaceName: String,
45
38
  _crossDocking: Boolean,
39
+ _currentBinLocation: String,
40
+ _enableProductScanning: Boolean,
41
+ _hasBinPicking: Boolean,
46
42
  _incompleteLocationName: Boolean,
43
+ _isCartonLabel: Boolean,
47
44
  _isExecuting: Boolean,
48
- _currentBinLocation: String
45
+ _isReplacement: Boolean,
46
+ _isRequireSerialNumberScanning: Boolean,
47
+ _reusablePalletList: Object,
48
+ _worksheetInfo: Object
49
49
  }
50
50
  }
51
51
 
52
52
  static get styles() {
53
53
  return [
54
- SingleColumnFormStyles,
55
54
  MultiColumnFormStyles,
56
55
  css`
57
56
  :host {
58
57
  display: flex;
59
58
  flex-direction: column;
60
- }
61
-
62
- .grist {
63
- background-color: var(--main-section-background-color);
64
- display: flex;
65
- flex: 1;
66
- overflow: auto;
67
- }
68
-
69
- .left-column {
70
- flex: 1;
71
59
  overflow: hidden;
72
- display: flex;
73
- flex-direction: column;
74
60
  }
75
-
76
- .right-column {
77
- flex: 1;
78
- overflow: auto;
79
- display: flex;
80
- flex-direction: column;
81
- }
82
-
83
61
  data-grist {
62
+ overflow: auto;
84
63
  flex: 1;
85
64
  }
86
-
87
65
  h2 {
88
66
  padding: var(--subtitle-padding);
89
67
  font: var(--subtitle-font);
90
68
  color: var(--subtitle-text-color);
91
69
  border-bottom: var(--subtitle-border-bottom);
92
70
  }
93
- .grist h2 {
94
- margin: var(--grist-title-margin);
95
- border: var(--grist-title-border);
96
- font: var(--grist-title-font);
97
- color: var(--secondary-color);
98
- }
99
-
100
- .grist h2 mwc-icon {
71
+ legend mwc-icon {
101
72
  vertical-align: middle;
102
73
  margin: var(--grist-title-icon-margin);
103
74
  font-size: var(--grist-title-icon-size);
104
75
  color: var(--grist-title-icon-color);
76
+ cursor: pointer;
105
77
  }
78
+ `
79
+ ]
80
+ }
106
81
 
107
- h2 + data-grist {
108
- padding-top: var(--grist-title-with-grid-padding);
109
- }
82
+ get binLocationInput() {
83
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=binLocation]')?.shadowRoot.querySelector('input')
84
+ }
110
85
 
111
- div.full_width {
112
- grid-column: span 12 / auto;
113
- display: inline-flex;
114
- align-items: center;
115
- font-size: 12px;
116
- background-color: #ccc0;
117
- border: 1px solid #6e7e8e;
118
- color: #394e63;
119
- }
86
+ get cartonInput() {
87
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]')?.shadowRoot.querySelector('input')
88
+ }
120
89
 
121
- @media (max-width: 460px) {
122
- :host {
123
- display: block;
124
- }
90
+ get completed() {
91
+ return this.data.records.every(record => record.completed)
92
+ }
93
+
94
+ get context() {
95
+ var actions = []
96
+ if (this._hasBinPicking) {
97
+ actions.push({
98
+ title: i18next.t('button.get_task'),
99
+ action: this.getTask.bind(this),
100
+ ...CommonButtonStyles.assignment
101
+ })
102
+ }
125
103
 
126
- ////// For Small Mobile View temporarily disabled
127
- // .grist {
128
- // display: block;
129
- // flex: none;
130
- // }
104
+ actions.push({
105
+ title: i18next.t('button.my_worksheet_list'),
106
+ action: this.showWorksheetList.bind(this),
107
+ ...CommonButtonStyles.inspect
108
+ })
131
109
 
132
- // data-grist {
133
- // max-width: 90%;
134
- // }
110
+ if (this._selectedOrderInventory && this._isRequireSerialNumberScanning) {
111
+ actions.push({
112
+ title: i18next.t('button.serial_number'),
113
+ action: this.openSerialNumberPopup.bind(this),
114
+ ...CommonButtonStyles.description
115
+ })
116
+ }
135
117
 
136
- // .left-column {
137
- // max-height: 200px;
138
- // }
139
- }
140
- `
141
- ]
118
+ if (this.releaseGoodNo) {
119
+ actions.push({
120
+ title: i18next.t('button.plastic_pallet'),
121
+ action: this.openPalletOutbound.bind(this),
122
+ ...CommonButtonStyles.reorder
123
+ })
124
+ }
125
+
126
+ if ((this.releaseGoodNo && this.completed) || (this.taskNo && this.completed)) {
127
+ actions.push({
128
+ title: i18next.t('button.complete'),
129
+ action: this.complete.bind(this),
130
+ ...CommonButtonStyles.submit
131
+ })
132
+ }
133
+
134
+ return {
135
+ title: i18next.t('title.picking'),
136
+ help: 'operato-wms/outbound/picking-product',
137
+ actions
138
+ }
142
139
  }
143
140
 
144
141
  get infoForm() {
@@ -153,52 +150,46 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
153
150
  return this.shadowRoot.querySelector('data-grist')
154
151
  }
155
152
 
153
+ get locationInput() {
154
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=locationName]')?.shadowRoot.querySelector('input')
155
+ }
156
+
157
+ get newLocationInput() {
158
+ return this.shadowRoot.querySelector('select[name=newLocationCode]')
159
+ }
160
+
156
161
  get releaseGoodNoInput() {
157
162
  return this.shadowRoot
158
163
  .querySelector('barcode-scanable-input[name=releaseGoodNo]')
159
164
  ?.shadowRoot?.querySelector('input')
160
165
  }
161
166
 
162
- get taskNoInput() {
163
- return this.shadowRoot.querySelector('barcode-scanable-input[name=taskNo]')?.shadowRoot.querySelector('input')
167
+ get scannable() {
168
+ let result =
169
+ this._selectedOrderInventory && this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
170
+ return result
164
171
  }
165
172
 
166
- get binLocationInput() {
167
- return this.shadowRoot.querySelector('barcode-scanable-input[name=binLocation]')?.shadowRoot.querySelector('input')
173
+ get taskNoInput() {
174
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=taskNo]')?.shadowRoot.querySelector('input')
168
175
  }
169
176
 
170
177
  get palletInput() {
171
178
  return this.shadowRoot.querySelector('barcode-scanable-input[name=palletId]')?.shadowRoot.querySelector('input')
172
179
  }
173
180
 
174
- get cartonInput() {
175
- return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]')?.shadowRoot.querySelector('input')
176
- }
177
-
178
- get locationInput() {
179
- return this.shadowRoot.querySelector('barcode-scanable-input[name=locationName]')?.shadowRoot.querySelector('input')
180
- }
181
-
182
181
  get productBarcodeInput() {
183
182
  return this.shadowRoot
184
183
  ?.querySelector('barcode-scanable-input[name=productBarcode]')
185
184
  ?.shadowRoot.querySelector('input')
186
185
  }
187
186
 
188
- get serialInput() {
189
- return this.shadowRoot.querySelector('barcode-scanable-input[name=serialNumber]')?.shadowRoot.querySelector('input')
190
- }
191
-
192
- get newLocationInput() {
193
- return this.shadowRoot.querySelector('select[name=newLocationCode]')
194
- }
195
-
196
187
  get releaseQtyInput() {
197
188
  return this.shadowRoot.querySelector('input[name=confirmedQty]')
198
189
  }
199
190
 
200
- get releaseProgressInput() {
201
- return this.shadowRoot.querySelector('input[name=releaseProgress]')
191
+ get serialInput() {
192
+ return this.shadowRoot.querySelector('barcode-scanable-input[name=serialNumber]')?.shadowRoot.querySelector('input')
202
193
  }
203
194
 
204
195
  _focusOnNewLocationInput() {
@@ -251,80 +242,33 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
251
242
  }
252
243
  }
253
244
 
254
- get context() {
255
- var actions = []
256
- if (this._hasBinPicking) {
257
- actions.push({
258
- title: i18next.t('button.get_task'),
259
- action: this.getTask.bind(this),
260
- ...CommonButtonStyles.assignment
261
- })
262
- }
263
-
264
- actions.push({
265
- title: i18next.t('button.my_worksheet_list'),
266
- action: this.showWorksheetList.bind(this),
267
- ...CommonButtonStyles.inspect
268
- })
269
-
270
- if ((this.releaseGoodNo && this.completed) || (this.taskNo && this.completed)) {
271
- actions.push({
272
- title: i18next.t('button.complete'),
273
- action: this.complete.bind(this),
274
- ...CommonButtonStyles.submit
275
- })
276
- }
277
-
278
- return {
279
- title: i18next.t('title.picking'),
280
- help: 'operato-wms/outbound/picking-product',
281
- actions
282
- }
283
- }
284
-
285
- get scannable() {
286
- let result =
287
- this._selectedOrderInventory && this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
288
- return result
289
- }
290
-
291
- get completed() {
292
- return this.data.records.every(record => record.completed)
293
- }
294
-
295
245
  constructor() {
296
246
  super()
297
247
 
298
248
  this.data = { records: [] }
299
- this._reusablePalletList = { records: [] }
300
-
301
- this.taskNo = ''
302
- this.releaseGoodNo = ''
303
- this._selectedOrderInventory = null
304
249
  this.locationSortingRules = []
305
250
  this.locationNameSplit = []
306
-
307
- this._productName = ''
308
-
309
251
  this.refPickingType = PICKING_TYPES.PICKING.value
252
+ this.releaseGoodNo = ''
253
+ this.taskNo = ''
310
254
 
311
- this._crossDocking = false
312
- this._isReplacement = false
313
- this._hasBinPicking = false
314
- this._isCartonLabel = false
315
- this._enableProductScanning = false
316
- this._isRequireSerialNumberScanning = false
317
255
  this._incompleteLocationName = false
318
-
256
+ this._isCartonLabel = false
319
257
  /* A flag to indicate either PICKING process is executing */
320
258
  this._isExecuting = false
259
+ this._isReplacement = false
260
+ this._isRequireSerialNumberScanning = false
261
+ this._crossDocking = false
262
+ this._enableProductScanning = false
263
+ this._hasBinPicking = false
264
+ this._reusablePalletList = { records: [] }
265
+ this._selectedOrderInventory = null
321
266
  }
322
267
 
323
268
  render() {
324
269
  return html`
325
270
  <form id="info-form" class="multi-column-form">
326
271
  <fieldset>
327
- <legend>${i18next.t('title.scan_area')}</legend>
328
272
  <label>${i18next.t('label.picking_type')}</label>
329
273
  <select name="pickingType" @change="${e => this.pickingTypeChangeHandler(e.currentTarget.value)}">
330
274
  ${Object.keys(PICKING_TYPES).map(
@@ -352,185 +296,123 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
352
296
  if (e.keyCode === 13) {
353
297
  e.preventDefault()
354
298
  this._currentBinLocation = null
355
- if (this.releaseGoodNoInput.value) {
356
- this.releaseGoodNo = this.releaseGoodNoInput.value
357
- await this.fetchAll(this.releaseGoodNo)
358
- this.completeHandler()
299
+ if (this.refPickingType === PICKING_TYPES.PICKING.value) {
300
+ if (this.releaseGoodNoInput.value) {
301
+ this.releaseGoodNo = this.releaseGoodNoInput.value
302
+ await this.fetchAll(this.releaseGoodNo)
303
+ this.completeHandler()
304
+ }
305
+ } else {
306
+ if (this.taskNoInput.value) {
307
+ this.taskNo = this.taskNoInput.value
308
+ await this.fetchAll(this.taskNo)
309
+ this.completeHandler()
310
+ }
359
311
  }
360
312
  }
361
313
  }}"
362
314
  >
363
315
  </barcode-scanable-input>
364
316
  </fieldset>
317
+ </form>
365
318
 
366
- <fieldset>
367
- ${this.refPickingType === PICKING_TYPES.PICKING.value
368
- ? html` <legend>${`${i18next.t('title.release_order')}: ${this.releaseGoodNo}`}</legend>
369
-
370
- <label>${i18next.t('label.ref_no')}</label>
371
- <input name="refNo" readonly />
372
-
373
- <label>${i18next.t('label.ref_no_2')}</label>
374
- <input name="refNo2" readonly />`
375
- : html` <legend>${`${i18next.t('title.task_no')}: ${this.taskNo}`}</legend>`}
376
-
377
- <label>${i18next.t('label.company')}</label>
378
- <input name="bizplaceName" readonly />
379
-
380
- <label>${i18next.t('label.started_at')}</label>
381
- <input name="startedAt" type="datetime-local" readonly />
382
-
383
- ${this._crossDocking
384
- ? html`
385
- <input name="_crossDocking" type="checkbox" .checked="${this._crossDocking}" disabled />
386
- <label>${i18next.t('label.cross_docking')}</label>
387
- `
388
- : ''}
389
- </fieldset>
319
+ <form id="input-form" class="multi-column-form" @keypress="${this.picking.bind(this)}">
320
+ ${this.scannable
321
+ ? html`
322
+ <fieldset>
323
+ ${this._hasBinPicking
324
+ ? html`
325
+ <label>${i18next.t('label.bin_location')}</label>
326
+ <barcode-scanable-input
327
+ name="binLocation"
328
+ custom-input
329
+ @keypress="${e => {
330
+ if (e.keyCode === 13) {
331
+ e.preventDefault()
332
+ this._currentBinLocation = this.binLocationInput.value
333
+ }
334
+ }}"
335
+ ></barcode-scanable-input>
336
+ `
337
+ : ''}
338
+ ${this._isCartonLabel
339
+ ? html`
340
+ <label>${i18next.t('label.carton_id')}</label>
341
+ <barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
342
+ `
343
+ : html`
344
+ <label>${i18next.t('label.lot_barcode')}</label>
345
+ <barcode-scanable-input name="palletId" custom-input></barcode-scanable-input>
346
+ `}
347
+ ${this._enableProductScanning
348
+ ? html`
349
+ <label>${i18next.t('label.product_barcode')}</label>
350
+ <barcode-scanable-input name="productBarcode" custom-input></barcode-scanable-input>
351
+ `
352
+ : html`
353
+ ${this._isRequireSerialNumberScanning
354
+ ? ''
355
+ : html`
356
+ <label>${i18next.t('label.picked_qty')}</label>
357
+ <input type="number" min="1" name="confirmedQty" />
358
+ `}
359
+ `}
360
+ ${this.isWholePicking ||
361
+ this._crossDocking ||
362
+ this._isCartonLabel ||
363
+ this._enableProductScanning ||
364
+ this._isRequireSerialNumberScanning
365
+ ? ''
366
+ : html`
367
+ ${this._incompleteLocationName
368
+ ? ''
369
+ : html`
370
+ <label>${i18next.t('label.return_location')}</label>
371
+ <barcode-scanable-input name="locationName" custom-input></barcode-scanable-input>
372
+ `}
373
+ <select
374
+ ?hidden="${!this._incompleteLocationName}"
375
+ name="newLocationCode"
376
+ @change="${e => (this.locationInput.value = e.currentTarget.value)}"
377
+ >
378
+ <option value="">-- ${i18next.t('text.please_select_the_location')} --</option>
379
+ ${(this.locations || []).map(
380
+ location =>
381
+ html`
382
+ <option value="${location && location.name}">
383
+ ${location && location.name}
384
+ ${location && location.status ? ` (${location && location.status})` : ''}
385
+ </option>
386
+ `
387
+ )}
388
+ </select>
389
+ `}
390
+ ${this._isRequireSerialNumberScanning
391
+ ? html`
392
+ <label>${i18next.t('label.serial_number')}</label>
393
+ <barcode-scanable-input name="serialNumber" custom-input></barcode-scanable-input>
394
+ `
395
+ : ``}
396
+ </fieldset>
397
+ `
398
+ : ''}
390
399
  </form>
391
400
 
392
- <div class="grist">
393
- <div class="left-column">
394
- <h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.picking')}</h2>
395
- <data-grist
396
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
397
- .config=${this.config}
398
- .data=${this.data}
399
- ></data-grist>
400
- </div>
401
-
402
- <div class="right-column">
403
- <form id="input-form" class="single-column-form" @keypress="${this.picking.bind(this)}">
401
+ <data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}
402
+ ><div slot="headroom" id="form-section">
403
+ <form id="info-form" class="multi-column-form">
404
404
  <fieldset>
405
- <legend>${i18next.t('label.product')}: ${this._productName}</legend>
406
-
407
- <label>${i18next.t('label.batch_no')}</label>
408
- <input name="batchId" readonly />
409
-
410
- <label>${i18next.t('label.batch_no_ref')}</label>
411
- <input name="batchIdRef" readonly />
412
-
413
- <label>${i18next.t('label.packing_type')}</label>
414
- <input name="packingTypeSize" readonly />
415
-
416
- <label>${i18next.t('label.picking_location')}</label>
417
- <input name="location" readonly />
418
-
419
- ${this._hasBinPicking
420
- ? html`
421
- <label>${i18next.t('label.bin_location')}</label>
422
- <input name="binLocation" readonly />
423
- `
424
- : ''}
425
-
426
- <label>${i18next.t('label.release_progress')}</label>
427
- <input name="releaseProgress" readonly />
405
+ <legend>
406
+ ${i18next.t('title.order_no')}: ${this._orderNo}
407
+ ${this._orderNo
408
+ ? html`(${this._bizplaceName})
409
+ <mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
410
+ : ''}
411
+ </legend>
428
412
  </fieldset>
429
-
430
- ${this.releaseGoodNo || ''
431
- ? html`
432
- <fieldset>
433
- <legend>${i18next.t('title.reusable_pallet')}</legend>
434
- <div class="full_width" @click="${this.openPalletOutbound.bind(this)}">
435
- <mwc-icon>apps</mwc-icon>Plastic Pallets
436
- </div>
437
- </fieldset>
438
- `
439
- : ''}
440
- ${this.scannable
441
- ? html`
442
- <fieldset>
443
- <legend>${i18next.t('title.input_section')}</legend>
444
- ${this._hasBinPicking
445
- ? html`
446
- <label>${i18next.t('label.bin_location')}</label>
447
- <barcode-scanable-input
448
- name="binLocation"
449
- custom-input
450
- @keypress="${e => {
451
- if (e.keyCode === 13) {
452
- e.preventDefault()
453
- this._currentBinLocation = this.binLocationInput.value
454
- }
455
- }}"
456
- ></barcode-scanable-input>
457
- `
458
- : ''}
459
- ${this._isCartonLabel
460
- ? html`
461
- <label>${i18next.t('label.carton_id')}</label>
462
- <barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
463
- `
464
- : html`
465
- <label>${i18next.t('label.lot_barcode')}</label>
466
- <barcode-scanable-input name="palletId" custom-input></barcode-scanable-input>
467
- `}
468
- ${this._enableProductScanning
469
- ? html`
470
- <label>${i18next.t('label.product_barcode')}</label>
471
- <barcode-scanable-input name="productBarcode" custom-input></barcode-scanable-input>
472
- `
473
- : html`
474
- ${this._isRequireSerialNumberScanning
475
- ? ''
476
- : html`
477
- <label>${i18next.t('label.picked_qty')}</label>
478
- <input type="number" min="1" name="confirmedQty" />
479
- `}
480
- `}
481
- ${this.isWholePicking ||
482
- this._crossDocking ||
483
- this._isCartonLabel ||
484
- this._enableProductScanning ||
485
- this._isRequireSerialNumberScanning
486
- ? ''
487
- : html`
488
- ${this._incompleteLocationName
489
- ? ''
490
- : html`
491
- <label>${i18next.t('label.return_location')}</label>
492
- <barcode-scanable-input name="locationName" custom-input></barcode-scanable-input>
493
- `}
494
- <select
495
- ?hidden="${!this._incompleteLocationName}"
496
- name="newLocationCode"
497
- @change="${e => (this.locationInput.value = e.currentTarget.value)}"
498
- >
499
- <option value="">-- ${i18next.t('text.please_select_the_location')} --</option>
500
- ${(this.locations || []).map(
501
- location =>
502
- html`
503
- <option value="${location && location.name}">
504
- ${location && location.name}
505
- ${location && location.status ? ` (${location && location.status})` : ''}
506
- </option>
507
- `
508
- )}
509
- </select>
510
- `}
511
- ${this._isRequireSerialNumberScanning
512
- ? html`
513
- <label>${i18next.t('label.serial_number')}</label>
514
- <barcode-scanable-input name="serialNumber" custom-input></barcode-scanable-input>
515
- `
516
- : ``}
517
- </fieldset>
518
- `
519
- : ''}
520
- ${this._selectedOrderInventory && this._isRequireSerialNumberScanning
521
- ? html`
522
- <fieldset>
523
- <fieldset>
524
- <div class="full_width" @click="${this.openSerialNumberPopup.bind(this)}">
525
- <mwc-icon>list</mwc-icon>${i18next.t('label.serial_number_list')}
526
- </div>
527
- </fieldset>
528
- </fieldset>
529
- `
530
- : ``}
531
413
  </form>
532
- </div>
533
- </div>
414
+ </div></data-grist
415
+ >
534
416
  `
535
417
  }
536
418
 
@@ -571,22 +453,16 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
571
453
  if (this.serialInput) this.serialInput.value = ''
572
454
 
573
455
  this._selectedOrderInventory = record
574
- await this.fetchInventories(this.releaseGoodNo)
456
+
457
+ await this.fetchInventories(
458
+ this.refPickingType === PICKING_TYPES.PICKING.value ? this.releaseGoodNo : this.taskNo
459
+ )
575
460
  let updatedRecords = this._selectedOrderInventory
576
461
  if (updatedRecords.releaseQty === updatedRecords.pickedQty) {
577
462
  updatedRecords.status = 'DONE'
578
463
  } else {
579
464
  updatedRecords.status = 'PICKING'
580
465
  }
581
-
582
- // this._isCartonLabel = updatedRecords.hasCartonLabel
583
- // this._productName = updatedRecords.product?.name
584
- // ? `${updatedRecords.product.sku + ' - ' + updatedRecords.product.name} ${
585
- // updatedRecords.product?.description ? `(${updatedRecords.product.description})` : ''
586
- // }`
587
- // : ''
588
- // this._isRequireSerialNumberScanning = updatedRecords?.product?.isRequireSerialNumberScanning
589
- // this.isWholePicking = updatedRecords.releaseQty === updatedRecords.qty
590
466
  }
591
467
  } catch (ex) {
592
468
  console.log(ex)
@@ -598,7 +474,19 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
598
474
  },
599
475
  pagination: { infinite: true },
600
476
  list: {
601
- fields: ['completed', 'locationName', 'palletId', 'cartonId', 'expirationDate', 'batchId', 'releaseQty']
477
+ fields: [
478
+ 'completed',
479
+ 'locationName',
480
+ 'palletId',
481
+ 'cartonId',
482
+ 'sku',
483
+ 'product',
484
+ 'packingType',
485
+ 'packingSize',
486
+ 'expirationDate',
487
+ 'batchId',
488
+ 'releaseProgress'
489
+ ]
602
490
  },
603
491
  columns: [
604
492
  { type: 'gutter', gutterName: 'sequence' },
@@ -612,43 +500,75 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
612
500
  type: 'string',
613
501
  name: 'locationName',
614
502
  header: i18next.t('field.location'),
503
+ label: true,
615
504
  width: 120
616
505
  },
617
506
  {
618
507
  type: 'string',
619
508
  name: 'palletId',
620
509
  header: i18next.t('field.lot_id'),
510
+ label: true,
621
511
  width: 140
622
512
  },
623
513
  {
624
514
  type: 'string',
625
515
  name: 'cartonId',
626
516
  header: i18next.t('field.carton_id'),
517
+ label: true,
627
518
  width: 140
628
519
  },
520
+ {
521
+ type: 'string',
522
+ name: 'sku',
523
+ header: i18next.t('field.sku'),
524
+ label: true,
525
+ width: 120
526
+ },
527
+ {
528
+ type: 'object',
529
+ name: 'product',
530
+ header: i18next.t('field.product'),
531
+ label: true,
532
+ width: 120
533
+ },
534
+ {
535
+ type: 'string',
536
+ name: 'packingType',
537
+ header: i18next.t('field.packing_type'),
538
+ label: true,
539
+ width: 120
540
+ },
541
+ {
542
+ type: 'integer',
543
+ name: 'packingSize',
544
+ header: i18next.t('field.packing_size'),
545
+ label: true,
546
+ width: 100
547
+ },
629
548
  {
630
549
  type: 'date',
631
550
  name: 'expirationDate',
632
551
  header: i18next.t('field.exp_date'),
552
+ label: true,
633
553
  width: 140
634
554
  },
635
555
  {
636
556
  type: 'string',
637
557
  name: 'batchId',
638
558
  header: i18next.t('field.batch_id'),
559
+ label: true,
639
560
  width: 140
640
561
  },
641
562
  {
642
- type: 'integer',
643
- name: 'releaseQty',
563
+ type: 'string',
564
+ name: 'releaseProgress',
644
565
  header: i18next.t('field.release_qty'),
645
- width: 80
566
+ label: true,
567
+ width: 100
646
568
  }
647
569
  ]
648
570
  }
649
571
 
650
- let data = [await locationSortingTask, await enableBinPickingTask]
651
-
652
572
  this.locationSortingRules = await locationSortingTask
653
573
  this._hasBinPicking = await enableBinPickingTask
654
574
  }
@@ -676,6 +596,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
676
596
  partnerDomainId
677
597
  refNo
678
598
  refNo2
599
+ refNo3
679
600
  startedAt
680
601
  releaseGood {
681
602
  crossDocking
@@ -740,7 +661,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
740
661
 
741
662
  const { worksheetInfo, worksheetDetailInfos } = response.data.pickingWorksheet
742
663
  this._crossDocking = worksheetInfo.releaseGood?._crossDocking
743
- this.fillUpForm(this.infoForm, { ...worksheetInfo, _crossDocking: this._crossDocking })
664
+ this._bizplaceName = worksheetInfo.bizplaceName
665
+ this._orderNo = this.releaseGoodNo
666
+ this._worksheetInfo = worksheetInfo
744
667
  this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
745
668
 
746
669
  if (this._selectedOrderInventory) {
@@ -755,7 +678,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
755
678
  if (record.pickedQty == record.releaseQty) {
756
679
  if (this.cartonInput) this.cartonInput.value = ''
757
680
  if (this.palletInput) this.palletInput.value = ''
758
- // this.isWholePicking = true
759
681
  } else {
760
682
  // pre-set bin location from last scan if none was set
761
683
  if (
@@ -831,7 +753,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
831
753
 
832
754
  const { worksheetInfo, worksheetDetailInfos } = response.data.batchPickingWorksheet
833
755
  await this.updateComplete
834
- this.fillUpForm(this.infoForm, { ...worksheetInfo })
756
+ this._bizplaceName = worksheetInfo.bizplaceName
757
+ this._orderNo = this.taskNo
758
+ this._worksheetInfo = worksheetInfo
835
759
  this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
836
760
 
837
761
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
@@ -846,12 +770,12 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
846
770
  if (record.pickedQty == record.releaseQty) {
847
771
  if (this._isCartonLabel) {
848
772
  this.cartonInput.value = ''
849
- this._focusOnCartonNoInput()
773
+ this.productBarcodeInput.value = ''
850
774
  }
851
775
  this.inputForm.reset()
852
776
  } else {
853
- this._focusOnProductBarcodeInput()
854
777
  this.fillUpForm(this.inputForm, record)
778
+ this.focusOnInput()
855
779
  }
856
780
  }
857
781
  }
@@ -885,8 +809,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
885
809
  record.hasCartonLabel = true
886
810
  }
887
811
 
888
- record.packingTypeSize = `${record.packingType}(${record.packingSize})`
889
812
  record.releaseProgress = `${record.pickedQty} / ${record.releaseQty}`
813
+ record.sku = record?.relatedOrderInv.product?.sku
890
814
 
891
815
  return record
892
816
  })
@@ -931,13 +855,11 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
931
855
  this.data = { records: [] }
932
856
  this.infoForm.reset()
933
857
  this.inputForm.reset()
934
- this._productName = ''
935
858
  this._isRequireSerialNumberScanning = false
936
859
  this.releaseGoodNo = null
937
860
  this.taskNo = null
938
861
  this._crossDocking = false
939
862
  this._selectedOrderInventory = null
940
- // this._selectedTaskStatus = null
941
863
  this._incompleteLocationName = false
942
864
  this._isExecuting = false
943
865
  }
@@ -967,6 +889,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
967
889
 
968
890
  async picking(e) {
969
891
  if (e.keyCode === 13) {
892
+ e.preventDefault()
970
893
  try {
971
894
  await this.validatePicking()
972
895
 
@@ -1009,9 +932,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1009
932
  } catch (e) {
1010
933
  this._showToast(e)
1011
934
  }
1012
- // finally {
1013
- // this._isExecuting = false
1014
- // }
1015
935
  }
1016
936
  }
1017
937
 
@@ -1048,21 +968,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1048
968
  openSerialNumberPopup() {
1049
969
  openPopup(
1050
970
  html`
1051
- <serial-number-popup
1052
- .orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"
1053
- @completed="${() => {
1054
- // if (this.refPickingType === PICKING_TYPES.PICKING.value) {
1055
- // this.fetchInventories(this.releaseGoodNoInput.value)
1056
- // this.fetchPalletsHandler(this.releaseGoodNoInput.value)
1057
- // } else {
1058
- // this.fetchInventories(this.taskNoInput.value)
1059
- // this.fetchPalletsHandler(this.taskNoInput.value)
1060
- // }
1061
- // // this._selectedTaskStatus = null
1062
- // this._selectedOrderInventory = null
1063
- // this._isReplacement = false
1064
- }}"
1065
- ></serial-number-popup>
971
+ <serial-number-popup .orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"></serial-number-popup>
1066
972
  `,
1067
973
  {
1068
974
  backdrop: true,
@@ -1072,6 +978,19 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1072
978
  )
1073
979
  }
1074
980
 
981
+ _openWorksheetInformation() {
982
+ openPopup(
983
+ html`
984
+ <worksheet-information-popup .worksheetInformation="${this._worksheetInfo}"></worksheet-information-popup>
985
+ `,
986
+ {
987
+ backdrop: true,
988
+ size: 'large',
989
+ title: i18next.t('title.order_information')
990
+ }
991
+ )
992
+ }
993
+
1075
994
  async pick_crossDocking() {
1076
995
  return await client.mutate({
1077
996
  mutation: gql`
@@ -1303,11 +1222,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1303
1222
  }
1304
1223
 
1305
1224
  async validatePicking() {
1306
- // validate for previous picking execution (multiple picking scanning)
1307
- // if (this._isExecuting) throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
1308
-
1309
- // this._isExecuting = true
1310
-
1311
1225
  // validate for order selection
1312
1226
  if (!this._selectedOrderInventory) throw new Error(i18next.t('text.target_is_not_selected'))
1313
1227
 
@@ -1534,6 +1448,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1534
1448
 
1535
1449
  if (!response.errors) {
1536
1450
  this.clearView()
1451
+ this._orderNo = ''
1452
+ this._bizplaceName = ''
1537
1453
  this._currentBinLocation = ''
1538
1454
  this._selectedOrderInventory = null
1539
1455
  await CustomAlert({
@@ -1545,10 +1461,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1545
1461
  if (!this.orderNo) {
1546
1462
  if (this.refPickingType === PICKING_TYPES.PICKING.value) {
1547
1463
  this.releaseGoodNoInput.value = ''
1548
- // navigate('single_outbound_worksheets')
1549
1464
  } else {
1550
1465
  this.taskNoInput.value = ''
1551
- // navigate('merged_outbound_worksheets')
1552
1466
  }
1553
1467
  }
1554
1468
  this.updateContext()
@@ -1593,6 +1507,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1593
1507
  partnerDomainId
1594
1508
  refNo
1595
1509
  refNo2
1510
+ refNo3
1596
1511
  startedAt
1597
1512
  releaseGood {
1598
1513
  name
@@ -1643,11 +1558,12 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1643
1558
 
1644
1559
  if (!response.errors) {
1645
1560
  if (!this._selectedOrderInventory) this.clearView()
1646
- // this.releaseGoodNo = pickingRefNo
1647
1561
  if (!response.data?.fetchAndAssignPickingTask) return
1648
1562
 
1649
1563
  const { worksheetInfo, worksheetDetailInfos } = response.data.fetchAndAssignPickingTask
1564
+ this._bizplaceName = worksheetInfo.bizplaceName
1650
1565
  this._crossDocking = worksheetInfo.releaseGood?._crossDocking
1566
+ this._orderNo = this.releaseGoodNo
1651
1567
  this.releaseGoodNo = worksheetInfo.releaseGood?.name
1652
1568
  this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
1653
1569
 
@@ -1668,7 +1584,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1668
1584
  this.fillUpForm(this.inputForm, record)
1669
1585
  }
1670
1586
  }
1671
- this.fillUpForm(this.infoForm, { ...worksheetInfo, _crossDocking: this._crossDocking })
1672
1587
  }
1673
1588
  } catch (e) {
1674
1589
  this._showToast(e)
@@ -1743,14 +1658,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1743
1658
  }
1744
1659
 
1745
1660
  this._isCartonLabel = selectedRecords.hasCartonLabel
1746
- this._productName = selectedRecords.product?.name
1747
- ? `${selectedRecords.product.sku + ' - ' + selectedRecords.product.name} ${
1748
- selectedRecords.product?.description ? `(${selectedRecords.product.description})` : ''
1749
- }`
1750
- : ''
1751
1661
  this._isRequireSerialNumberScanning = selectedRecords?.product?.isRequireSerialNumberScanning
1752
-
1753
- // this.isWholePicking = selectedRecords.releaseQty === selectedRecords.qty
1754
1662
  }
1755
1663
 
1756
1664
  _showToast({ type, message }) {