@things-factory/operato-wms 4.3.80 → 4.3.83

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.
@@ -12,8 +12,7 @@ import { isMobileDevice } from '@things-factory/utils'
12
12
  class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
13
13
  static get properties() {
14
14
  return {
15
- _autoSelectInventoryIds: Array,
16
- _selectedInventoryIds: Array,
15
+ _selectedRecords: Array,
17
16
  config: Object,
18
17
  data: Object,
19
18
  enableCartonLabel: Boolean,
@@ -26,8 +25,7 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
26
25
 
27
26
  constructor() {
28
27
  super()
29
- this._selectedInventoryIds = []
30
- this._autoSelectInventoryIds = []
28
+ this._selectedRecords = []
31
29
  }
32
30
 
33
31
  static get styles() {
@@ -96,13 +94,21 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
96
94
 
97
95
  render() {
98
96
  return html`
99
- <form id="input-form" class="single-column-form" @keypress="${this._populateTargetedInventory.bind(this)}">
97
+ <form id="input-form" class="single-column-form">
100
98
  <fieldset>
101
99
  ${this.enableCartonLabel
102
100
  ? html`<label>${i18next.t('label.carton_id')}</label>
103
- <barcode-scanable-input name="cartonId" without-enter custom-input></barcode-scanable-input>`
101
+ <barcode-scanable-input
102
+ name="cartonId"
103
+ custom-input
104
+ @keypress="${this._populateTargetedInventory.bind(this)}"
105
+ ></barcode-scanable-input>`
104
106
  : html`<label>${i18next.t('label.lot_id')}</label>
105
- <barcode-scanable-input name="lotId" without-enter custom-input></barcode-scanable-input>`}
107
+ <barcode-scanable-input
108
+ name="lotId"
109
+ custom-input
110
+ @keypress="${this._populateTargetedInventory.bind(this)}"
111
+ ></barcode-scanable-input>`}
106
112
  </fieldset>
107
113
  </form>
108
114
 
@@ -112,6 +118,7 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
112
118
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
113
119
  .config=${this.config}
114
120
  .data="${this.data}"
121
+ .selectedRecords=${this._selectedRecords}
115
122
  ></data-grist>
116
123
  </div>
117
124
 
@@ -125,7 +132,9 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
125
132
  this.config = {
126
133
  pagination: { infinite: true },
127
134
  rows: { selectable: { multiple: true }, appendable: false },
128
- list: { fields: ['palletId', 'cartonId', 'batchId', 'product', 'packingType', 'packingSize', 'qty', 'status'] },
135
+ list: {
136
+ fields: ['palletId', 'cartonId', 'batchId', 'sku', 'product', 'packingType', 'packingSize', 'qty', 'status']
137
+ },
129
138
  columns: [
130
139
  { type: 'gutter', gutterName: 'sequence' },
131
140
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
@@ -151,6 +160,13 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
151
160
  header: i18next.t('field.batch_id'),
152
161
  width: 150
153
162
  },
163
+ {
164
+ type: 'string',
165
+ name: 'sku',
166
+ label: true,
167
+ header: i18next.t('field.sku'),
168
+ width: 120
169
+ },
154
170
  {
155
171
  type: 'object',
156
172
  name: 'product',
@@ -199,11 +215,8 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
199
215
  async _undoUnloading() {
200
216
  try {
201
217
  let selectedInventoryIds = []
202
- if (this._autoSelectInventoryIds?.length) {
203
- selectedInventoryIds = this._autoSelectInventoryIds
204
- } else {
205
- selectedInventoryIds = this.dataGrist.selected.map(inventory => inventory.id)
206
- }
218
+ selectedInventoryIds = this.dataGrist.selected.map(inventory => inventory.id)
219
+
207
220
  if (!selectedInventoryIds?.length) throw new Error(i18next.t('text.select_at_least_one_inventory_to_undo'))
208
221
 
209
222
  this._validateScanInventory()
@@ -226,9 +239,9 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
226
239
  }
227
240
 
228
241
  _populateTargetedInventory(e) {
229
- if (e.keyCode === 13) {
230
- e.preventDefault()
231
-
242
+ if (e.keyCode !== 13) return
243
+ e.preventDefault()
244
+ try {
232
245
  let targetedUndoInventories = []
233
246
 
234
247
  if (this.enableCartonLabel) {
@@ -248,13 +261,16 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
248
261
  this.lotInput.value = ''
249
262
  }
250
263
  this._showToast({ message: i18next.t('text.no_matching_unloaded_inventory_found') })
251
- } else if (targetedUndoInventories?.length == 1) {
252
- this.data = { records: targetedUndoInventories }
253
- this._autoSelectInventoryIds = targetedUndoInventories.map(inventory => inventory.id)
254
- this._undoUnloading()
255
264
  } else {
256
- this.data = { records: targetedUndoInventories }
265
+ this.data = {
266
+ records: targetedUndoInventories.map(itm => {
267
+ return { ...itm, sku: itm.product.sku }
268
+ })
269
+ }
270
+ this._selectedRecords = targetedUndoInventories?.length == 1 ? targetedUndoInventories : []
257
271
  }
272
+ } catch (e) {
273
+ this._showToast(e)
258
274
  }
259
275
  }
260
276
 
@@ -485,7 +485,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
485
485
  const currentLocationColumn = {
486
486
  type: 'object',
487
487
  name: 'location',
488
- header: i18next.t('field.buffer_location'),
488
+ header: i18next.t('field.location'),
489
489
  width: 170
490
490
  }
491
491
  const statusColumnConfig = {
@@ -405,6 +405,78 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
405
405
  imex: { header: i18next.t('field.updated_by'), key: 'updater.name', width: 25, type: 'string' },
406
406
  sortable: true,
407
407
  width: 200
408
+ },
409
+ {
410
+ type: 'string',
411
+ name: 'attentionTo',
412
+ header: i18next.t('field.receiver_name'),
413
+ imex: { header: i18next.t('field.receiver_name'), key: 'attentionTo', width: 25, type: 'string' },
414
+ width: 200,
415
+ hidden: true
416
+ },
417
+ {
418
+ type: 'string',
419
+ name: 'attentionCompany',
420
+ header: i18next.t('field.receiver_company'),
421
+ imex: { header: i18next.t('field.receiver_company'), key: 'attentionCompany', width: 25, type: 'string' },
422
+ width: 200,
423
+ hidden: true
424
+ },
425
+ {
426
+ type: 'string',
427
+ name: 'deliveryAddress1',
428
+ header: i18next.t('field.delivery_address'),
429
+ imex: { header: i18next.t('field.delivery_address'), key: 'deliveryAddress1', width: 75, type: 'string' },
430
+ width: 200,
431
+ hidden: true
432
+ },
433
+ {
434
+ type: 'string',
435
+ name: 'city',
436
+ header: i18next.t('field.city'),
437
+ imex: { header: i18next.t('field.city'), key: 'city', width: 25, type: 'string' },
438
+ width: 200,
439
+ hidden: true
440
+ },
441
+ {
442
+ type: 'string',
443
+ name: 'state',
444
+ header: i18next.t('field.state'),
445
+ imex: { header: i18next.t('field.state'), key: 'state', width: 25, type: 'string' },
446
+ width: 200,
447
+ hidden: true
448
+ },
449
+ {
450
+ type: 'string',
451
+ name: 'country',
452
+ header: i18next.t('field.country'),
453
+ imex: { header: i18next.t('field.country'), key: 'country', width: 20, type: 'string' },
454
+ width: 200,
455
+ hidden: true
456
+ },
457
+ {
458
+ type: 'string',
459
+ name: 'phone1',
460
+ header: `${i18next.t('field.contact')} 1`,
461
+ imex: { header: `${i18next.t('field.contact')} 1`, key: 'phone1', width: 25, type: 'string' },
462
+ width: 200,
463
+ hidden: true
464
+ },
465
+ {
466
+ type: 'string',
467
+ name: 'phone2',
468
+ header: `${i18next.t('field.contact')} 2`,
469
+ imex: { header: `${i18next.t('field.contact')} 2`, key: 'phone2', width: 25, type: 'string' },
470
+ width: 200,
471
+ hidden: true
472
+ },
473
+ {
474
+ type: 'string',
475
+ name: 'email',
476
+ header: i18next.t('field.email'),
477
+ imex: { header: i18next.t('field.email'), key: 'email', width: 25, type: 'string' },
478
+ width: 200,
479
+ hidden: true
408
480
  }
409
481
  ]
410
482
  }
@@ -430,7 +502,6 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
430
502
  items {
431
503
  id
432
504
  trackingNo
433
- attentionTo
434
505
  deliveryAddress1
435
506
  deliveryAddress2
436
507
  deliveryAddress3
@@ -444,6 +515,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
444
515
  country
445
516
  phone1
446
517
  phone2
518
+ email
447
519
  postalCode
448
520
  marketplaceOrderStatus
449
521
  transporter
@@ -713,46 +785,6 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
713
785
  )
714
786
  }
715
787
 
716
- async _exportableData() {
717
- try {
718
- let data = []
719
-
720
- var headerSetting = [
721
- { header: i18next.t('field.ro'), key: 'name', width: 25, type: 'string' },
722
- { header: i18next.t('field.company'), key: 'bizplaceName', width: 25, type: 'string' },
723
- { header: i18next.t('field.ref_no'), key: 'refNo', width: 25, type: 'string' },
724
- { header: i18next.t('field.ref_no_2'), key: 'refNo2', width: 25, type: 'string' },
725
- { header: i18next.t('field.release_date'), key: 'releaseDate', width: 30, type: 'date' },
726
- { header: i18next.t('field.postal_code'), key: 'postalCode', width: 30, type: 'string' },
727
- {
728
- header: i18next.t('field.marketplace_order_status'),
729
- key: 'marketplaceOrderStatus',
730
- width: 30,
731
- type: 'string'
732
- },
733
- { header: i18next.t('field.warehouse_status'), key: 'status', width: 30, type: 'string' },
734
- { header: i18next.t('field.transporter'), key: 'transporter', width: 30, type: 'string' },
735
- { header: i18next.t('field.delivery_address'), key: 'deliveryAddress1', width: 30, type: 'string' },
736
- { header: i18next.t('field.attention_to'), key: 'attentionTo', width: 30, type: 'string' },
737
- { header: i18next.t('field.phone'), key: 'phone1', width: 30, type: 'string' }
738
- ]
739
-
740
- if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
741
- data = this.dataGrist.selected
742
- } else {
743
- const bizplaceFilters = (await this.searchForm.getQueryFilters()).filter(x => x.name === 'bizplaceId')
744
- if (bizplaceFilters.length == 0) {
745
- throw new Error(`Please select a customer for export.`)
746
- }
747
- data = await this.fetchHandler({ page: 1, limit: 9999999 })
748
- }
749
-
750
- return { header: headerSetting, data }
751
- } catch (e) {
752
- this._showToast(e)
753
- }
754
- }
755
-
756
788
  async _openGenerateWorksheetPopup() {
757
789
  try {
758
790
  if (this.dataGrist.selected.length <= 0)
@@ -37,6 +37,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
37
37
  trackingNo: String,
38
38
  totalBinRO: Number,
39
39
  binRo: String,
40
+ ownTransport: Boolean,
40
41
  toggleComplete: Boolean,
41
42
  _bizplaceName: String,
42
43
  _enableProductScanning: Boolean,
@@ -105,11 +106,13 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
105
106
  }
106
107
 
107
108
  if (this.releaseGoodNo && this.platform == 'operato' && this.completed) {
108
- actions.push({
109
- title: i18next.t('button.print_airway_bill'),
110
- action: this.printSellercraftDocument.bind(this, 'awb'),
111
- ...CommonButtonStyles.label
112
- })
109
+ if (!this.ownTransport) {
110
+ actions.push({
111
+ title: i18next.t('button.print_airway_bill'),
112
+ action: this.printSellercraftDocument.bind(this, 'awb'),
113
+ ...CommonButtonStyles.label
114
+ })
115
+ }
113
116
 
114
117
  actions.push({
115
118
  title: i18next.t('button.print_invoice'),
@@ -398,6 +401,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
398
401
  id
399
402
  name
400
403
  remark
404
+ ownTransport
401
405
  checkedRemarkAt
402
406
  totalInventoriesByBin
403
407
  isOrderInventoryBin
@@ -504,6 +508,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
504
508
  this.shippingProvider = worksheetInfo.shippingProvider
505
509
  this.orderInformation = worksheetInfo.marketplaceOrder
506
510
  this.orderRemark = worksheetInfo.releaseGood?.remark
511
+ this.ownTransport = worksheetInfo.releaseGood?.ownTransport
507
512
  this.checkedRemarkAt = worksheetInfo.releaseGood?.checkedRemarkAt
508
513
  this.toggleComplete = Boolean(worksheetInfo.releaseGood?.remark)
509
514
  ? worksheetDetailInfos.every(res => res.status === 'DONE') &&
@@ -979,7 +984,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
979
984
  await this.printAirwayBill()
980
985
  }
981
986
 
982
- if (this.releaseGoodNo && this.platform == 'operato' && this.airwayBill && this.completed) {
987
+ if (this.releaseGoodNo && this.platform == 'operato' && !this.ownTransport && this.airwayBill && this.completed) {
983
988
  await this.printSellercraftDocument('awb')
984
989
  }
985
990
  }