@things-factory/operato-wms 4.3.417 → 4.3.419

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.
@@ -266,6 +266,11 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
266
266
  }
267
267
  } else {
268
268
  this.searchFields = [
269
+ {
270
+ label: i18next.t('field.lot_id'),
271
+ name: 'palletId',
272
+ props: { searchOper: 'i_like' }
273
+ },
269
274
  {
270
275
  label: i18next.t('field.batch_id'),
271
276
  name: 'batchId',
@@ -7,38 +7,18 @@ import './putaway-same-carton-popup'
7
7
  import './putaway-replenishment-inventory-popup'
8
8
 
9
9
  import gql from 'graphql-tag'
10
- import {
11
- css,
12
- html
13
- } from 'lit-element'
10
+ import { css, html } from 'lit-element'
14
11
  import { connect } from 'pwa-helpers/connect-mixin.js'
15
12
 
16
13
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
17
- import {
18
- i18next,
19
- localize
20
- } from '@things-factory/i18n-base'
14
+ import { i18next, localize } from '@things-factory/i18n-base'
21
15
  import { openPopup } from '@things-factory/layout-base'
22
- import {
23
- client,
24
- CustomAlert,
25
- PageView,
26
- store
27
- } from '@things-factory/shell'
16
+ import { client, CustomAlert, PageView, store } from '@things-factory/shell'
28
17
  import { CommonButtonStyles } from '@things-factory/styles'
29
- import {
30
- isMobileDevice,
31
- sleep
32
- } from '@things-factory/utils'
18
+ import { isMobileDevice, sleep } from '@things-factory/utils'
33
19
 
34
20
  import { fetchSettingRule } from '../../fetch-setting-value'
35
- import {
36
- ARRIVAL_NOTICE,
37
- CUSTOMER_RETURN,
38
- REPLENISHMENT,
39
- WAREHOUSE_RETURN,
40
- WORKSHEET_STATUS
41
- } from '../constants'
21
+ import { ARRIVAL_NOTICE, CUSTOMER_RETURN, REPLENISHMENT, WAREHOUSE_RETURN, WORKSHEET_STATUS } from '../constants'
42
22
 
43
23
  const OPERATION_TYPE = {
44
24
  PUTAWAY: 'putaway',
@@ -140,6 +120,132 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
140
120
  }
141
121
  }
142
122
 
123
+ get gristConfig() {
124
+ let columns = [
125
+ { type: 'gutter', gutterName: 'sequence' },
126
+ {
127
+ type: 'gutter',
128
+ gutterName: 'button',
129
+ icon: 'reorder',
130
+ handlers: {
131
+ click: (columns, data, column, record, rowIndex, _orderNo) => {
132
+ this._openReplenishmentPutawayInventoriesPopup(this._replenishmentId, record.cartonId)
133
+ }
134
+ },
135
+ exclude: this.refOrderType != AVAIL_ORDER_TYPES.REPLENISHMENT.value
136
+ },
137
+ {
138
+ type: 'boolean',
139
+ name: 'completed',
140
+ header: i18next.t('field.completed'),
141
+ width: 40
142
+ },
143
+ {
144
+ type: 'string',
145
+ name: 'palletId',
146
+ header: i18next.t('field.lot_id'),
147
+ width: 140
148
+ },
149
+ {
150
+ type: 'string',
151
+ name: 'cartonId',
152
+ header: i18next.t('field.carton_id'),
153
+ width: 140
154
+ },
155
+ {
156
+ type: 'string',
157
+ name: 'sku',
158
+ label: true,
159
+ header: i18next.t('field.sku'),
160
+ width: 120
161
+ },
162
+ {
163
+ type: 'object',
164
+ name: 'product',
165
+ header: i18next.t('field.product'),
166
+ width: 140
167
+ },
168
+ {
169
+ type: 'string',
170
+ name: 'batchId',
171
+ header: i18next.t('field.batch_id'),
172
+ width: 140
173
+ },
174
+ {
175
+ type: 'string',
176
+ name: 'packingType',
177
+ header: i18next.t('field.packing_type'),
178
+ width: 140
179
+ },
180
+ {
181
+ type: 'string',
182
+ name: 'packingSize',
183
+ header: i18next.t('field.packing_size'),
184
+ width: 140
185
+ },
186
+ {
187
+ type: 'date',
188
+ name: 'expirationDate',
189
+ header: i18next.t('field.exp_date'),
190
+ width: 140
191
+ },
192
+ {
193
+ type: 'integer',
194
+ name: 'qty',
195
+ header: i18next.t('field.qty'),
196
+ width: 80
197
+ },
198
+ {
199
+ type: 'object',
200
+ name: 'reusablePallet',
201
+ header: i18next.t('field.reusable_pallet'),
202
+ width: 140
203
+ },
204
+ {
205
+ type: 'object',
206
+ name: 'location',
207
+ header: i18next.t('field.location'),
208
+ width: 140
209
+ }
210
+ ]
211
+
212
+ return {
213
+ rows: {
214
+ appendable: false,
215
+ handlers: {
216
+ click: async (columns, data, column, record, rowIndex) => {
217
+ if (data.records.length && record) {
218
+ if (this._selectedOrderProduct && this._selectedOrderProduct.name === record) {
219
+ return
220
+ }
221
+
222
+ this._selectedOrderProduct = record
223
+ this._selectedTaskStatus = null
224
+ this._selectedTaskStatus = record.status
225
+ this.recommendLocationName = null
226
+
227
+ if (
228
+ !record.completed &&
229
+ this.refOrderType !== AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value &&
230
+ this.refOrderType !== AVAIL_ORDER_TYPES.REPLENISHMENT.value
231
+ ) {
232
+ this.recommendLocationName = (await this._getLocationRecommendation(record.name)) || null
233
+ }
234
+
235
+ if (this._enableCartonLabel && record?.cartonId) this._focusOnCartonInput()
236
+ else this._focusOnPalletInput()
237
+ }
238
+ }
239
+ }
240
+ },
241
+ pagination: { infinite: true },
242
+ list: {
243
+ fields: ['completed', 'sku', 'product', 'palletId', 'cartonId', 'expirationDate', 'batchId', 'qty', 'location']
244
+ },
245
+ columns: columns.filter(itm => itm.exclude != true)
246
+ }
247
+ }
248
+
143
249
  get cartonInput() {
144
250
  return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]')
145
251
  }
@@ -405,124 +511,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
405
511
  ...this._pageSettings,
406
512
  cameraScanOnly: (await fetchSettingRule('camera-scan-only')) || false
407
513
  }
408
-
409
- this.config = {
410
- rows: {
411
- appendable: false,
412
- handlers: {
413
- click: async (columns, data, column, record, rowIndex) => {
414
- if (data.records.length && record) {
415
- if (this._selectedOrderProduct && this._selectedOrderProduct.name === record) {
416
- return
417
- }
418
-
419
- this._selectedOrderProduct = record
420
- this._selectedTaskStatus = null
421
- this._selectedTaskStatus = record.status
422
- this.recommendLocationName = null
423
-
424
- if (
425
- !record.completed &&
426
- this.refOrderType !== AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value &&
427
- this.refOrderType !== AVAIL_ORDER_TYPES.REPLENISHMENT.value
428
- ) {
429
- this.recommendLocationName = (await this._getLocationRecommendation(record.name)) || null
430
- }
431
-
432
- if (this._enableCartonLabel && record?.cartonId) this._focusOnCartonInput()
433
- else this._focusOnPalletInput()
434
- }
435
- }
436
- }
437
- },
438
- pagination: { infinite: true },
439
- list: { fields: ['completed', 'sku', 'product', 'palletId', 'cartonId', 'expirationDate', 'batchId', 'qty'] },
440
- columns: [
441
- { type: 'gutter', gutterName: 'sequence' },
442
- {
443
- type: 'gutter',
444
- gutterName: 'button',
445
- icon: 'reorder',
446
- handlers: {
447
- click: (columns, data, column, record, rowIndex, _orderNo) => {
448
- this.openReplenishmentPutawayInventoriesPopup(this._replenishmentId, record.cartonId)
449
- }
450
- }
451
- },
452
- {
453
- type: 'boolean',
454
- name: 'completed',
455
- header: i18next.t('field.completed'),
456
- width: 40
457
- },
458
- {
459
- type: 'string',
460
- name: 'palletId',
461
- header: i18next.t('field.lot_id'),
462
- width: 140
463
- },
464
- {
465
- type: 'string',
466
- name: 'cartonId',
467
- header: i18next.t('field.carton_id'),
468
- width: 140
469
- },
470
- {
471
- type: 'string',
472
- name: 'sku',
473
- label: true,
474
- header: i18next.t('field.sku'),
475
- width: 120
476
- },
477
- {
478
- type: 'object',
479
- name: 'product',
480
- header: i18next.t('field.product'),
481
- width: 140
482
- },
483
- {
484
- type: 'string',
485
- name: 'batchId',
486
- header: i18next.t('field.batch_id'),
487
- width: 140
488
- },
489
- {
490
- type: 'string',
491
- name: 'packingType',
492
- header: i18next.t('field.packing_type'),
493
- width: 140
494
- },
495
- {
496
- type: 'string',
497
- name: 'packingSize',
498
- header: i18next.t('field.packing_size'),
499
- width: 140
500
- },
501
- {
502
- type: 'date',
503
- name: 'expirationDate',
504
- header: i18next.t('field.exp_date'),
505
- width: 140
506
- },
507
- {
508
- type: 'integer',
509
- name: 'qty',
510
- header: i18next.t('field.qty'),
511
- width: 80
512
- },
513
- {
514
- type: 'object',
515
- name: 'reusablePallet',
516
- header: i18next.t('field.reusable_pallet'),
517
- width: 140
518
- }
519
- ]
520
- }
521
514
  }
522
515
 
523
516
  pageUpdated() {
524
517
  if (this.active) {
525
518
  this._focusOnOrderNoField()
519
+ this.config = this.gristConfig
526
520
  }
527
521
  }
528
522
 
@@ -592,6 +586,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
592
586
  packingType
593
587
  packingSize
594
588
  location {
589
+ id
595
590
  name
596
591
  description
597
592
  }
@@ -618,41 +613,39 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
618
613
  this._worksheetInfo = worksheetInfo
619
614
  this._bizplaceName = worksheetInfo.bizplaceName
620
615
 
621
- this.data = {
622
- records: response.data.putawayWorksheet.worksheetDetailInfos
623
- .map(record => {
624
- let reusablePalletName = ''
625
- if (record.reusablePallet) {
626
- reusablePalletName = record.reusablePallet.name
627
- }
628
- return {
629
- ...record,
630
- completed: record.status === WORKSHEET_STATUS.DONE.value,
631
- packingTypeSize: `${record.packingType}(${record.packingSize})`,
632
- reusablePalletName: reusablePalletName,
633
- sku: record.product.sku,
634
- minInboundShelfLife: record.product.minInboundShelfLife,
635
- expirationDate: record.expirationDate
636
- }
637
- })
638
- .sort((a, b) => {
639
- if (a.completed !== b.completed) {
640
- if (a.completed) return 1
641
- if (b.completed) return -1
642
- }
616
+ let results = response.data.putawayWorksheet.worksheetDetailInfos
617
+ .map(record => {
618
+ let reusablePalletName = ''
619
+ if (record.reusablePallet) {
620
+ reusablePalletName = record.reusablePallet.name
621
+ }
622
+ return {
623
+ ...record,
624
+ completed: record.status === WORKSHEET_STATUS.DONE.value,
625
+ packingTypeSize: `${record.packingType}(${record.packingSize})`,
626
+ reusablePalletName: reusablePalletName,
627
+ sku: record.product.sku,
628
+ minInboundShelfLife: record.product.minInboundShelfLife,
629
+ expirationDate: record.expirationDate
630
+ }
631
+ })
632
+ .sort((a, b) => {
633
+ if (a.completed !== b.completed) {
634
+ if (a.completed) return 1
635
+ if (b.completed) return -1
636
+ }
643
637
 
644
- if (a.batchId > b.batchId) return 1
645
- if (b.batchId < b.batchId) return -1
638
+ if (a.batchId > b.batchId) return 1
639
+ if (b.batchId < b.batchId) return -1
646
640
 
647
- if (a.palletId > b.palletId) return 1
648
- if (a.palletId < b.palletId) return -1
641
+ if (a.palletId > b.palletId) return 1
642
+ if (a.palletId < b.palletId) return -1
649
643
 
650
- return 0
651
- })
652
- }
644
+ return 0
645
+ })
653
646
 
654
647
  this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
655
- this._massageItemList(response.data.putawayWorksheet.worksheetDetailInfos)
648
+ this._massageItemList(results)
656
649
  }
657
650
  } else if (this.refOrderType === AVAIL_ORDER_TYPES.CUSTOMER_RETURN.value) {
658
651
  const response = await client.query({
@@ -689,6 +682,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
689
682
  packingType
690
683
  packingSize
691
684
  location {
685
+ id
692
686
  name
693
687
  description
694
688
  }
@@ -717,7 +711,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
717
711
  completed: record.status === WORKSHEET_STATUS.DONE.value,
718
712
  sku: record.product.sku,
719
713
  minInboundShelfLife: record.product.minInboundShelfLife,
720
- expirationDate: record.expirationDate
714
+ expirationDate: record.expirationDate,
715
+ location: record.status === WORKSHEET_STATUS.DONE.value ? record.location : null
721
716
  }
722
717
  })
723
718
  .sort((a, b) => {
@@ -773,6 +768,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
773
768
  packingType
774
769
  packingSize
775
770
  location {
771
+ id
776
772
  name
777
773
  description
778
774
  }
@@ -794,7 +790,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
794
790
  return {
795
791
  ...record,
796
792
  sku: record.product.sku,
797
- completed: record.status === WORKSHEET_STATUS.DONE.value
793
+ completed: record.status === WORKSHEET_STATUS.DONE.value,
794
+ location: record.status === WORKSHEET_STATUS.DONE.value ? record.location : null
798
795
  }
799
796
  })
800
797
  .sort((a, b) => {
@@ -851,6 +848,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
851
848
  packingType
852
849
  packingSize
853
850
  location {
851
+ id
854
852
  name
855
853
  description
856
854
  }
@@ -887,7 +885,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
887
885
  sku: record.product.sku,
888
886
  minInboundShelfLife: record.product.minInboundShelfLife,
889
887
  expirationDate: record.expirationDate,
890
- qty: record.actualPackQty + ' / ' + record.qty
888
+ qty: record.actualPackQty + ' / ' + record.qty,
889
+ location: record.status === WORKSHEET_STATUS.DONE.value ? record.location : null
891
890
  }
892
891
  })
893
892
  .sort((a, b) => {
@@ -997,6 +996,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
997
996
  packingType
998
997
  packingSize
999
998
  location {
999
+ id
1000
1000
  name
1001
1001
  description
1002
1002
  }
@@ -1237,7 +1237,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1237
1237
  }
1238
1238
  }
1239
1239
 
1240
- openReplenishmentPutawayInventoriesPopup(replenishmentId, cartonId) {
1240
+ _openReplenishmentPutawayInventoriesPopup(replenishmentId, cartonId) {
1241
1241
  openPopup(
1242
1242
  html`
1243
1243
  <putaway-replenishment-inventory-popup .replenishmentId="${replenishmentId}" .cartonId="${cartonId}">
@@ -1736,6 +1736,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1736
1736
  orderTypeChangeHandler(e) {
1737
1737
  this.refOrderType = e.currentTarget.value
1738
1738
  this._clearView()
1739
+ this.config = this.gristConfig
1739
1740
  this.orderNoInput.select()
1740
1741
  }
1741
1742
 
@@ -1776,7 +1777,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1776
1777
  this._selectedLocation = ''
1777
1778
  }
1778
1779
 
1779
- this.data = { records: worksheetDetailInfos }
1780
+ this.data = {
1781
+ records: worksheetDetailInfos.map(itm => {
1782
+ return { ...itm, location: itm.status === WORKSHEET_STATUS.DONE.value ? itm.location : null }
1783
+ })
1784
+ }
1780
1785
 
1781
1786
  this._completeHandler()
1782
1787
  }
@@ -244,6 +244,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
244
244
  name="inventoryCheckItemStatus"
245
245
  @change="${async e => {
246
246
  this.inventoryCheckItemStatus = e.target.value
247
+ this._arrayIndex = 0
247
248
  this.updateContext({ inventoryCheckItemStatus: e.target.value })
248
249
  await this.fetchCycleCountWorksheet()
249
250
  }}"
@@ -1032,53 +1033,55 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1032
1033
  cancelButton: { text: i18next.t('button.cancel') }
1033
1034
  })
1034
1035
 
1035
- let response
1036
+ if (result.value) {
1037
+ let response
1036
1038
 
1037
- if (!this._enableCartonLabel) {
1038
- response = await client.mutate({
1039
- mutation: gql`
1040
- mutation undoInspection($worksheetDetailName: String!) {
1041
- undoInspection(worksheetDetailName: $worksheetDetailName)
1042
- }
1043
- `,
1044
- variables: { worksheetDetailName: name }
1045
- })
1046
- } else {
1047
- response = await client.mutate({
1048
- mutation: gql`
1049
- mutation undoInspectionCarton(
1050
- $productDetailId: String!
1051
- $cartonId: String!
1052
- $batchId: String!
1053
- $locationId: String!
1054
- $inventoryCheckNo: String!
1055
- $countNo: Int!
1056
- ) {
1057
- undoInspectionCarton(
1058
- productDetailId: $productDetailId
1059
- cartonId: $cartonId
1060
- batchId: $batchId
1061
- locationId: $locationId
1062
- inventoryCheckNo: $inventoryCheckNo
1063
- countNo: $countNo
1064
- )
1039
+ if (!this._enableCartonLabel) {
1040
+ response = await client.mutate({
1041
+ mutation: gql`
1042
+ mutation undoInspection($worksheetDetailName: String!) {
1043
+ undoInspection(worksheetDetailName: $worksheetDetailName)
1044
+ }
1045
+ `,
1046
+ variables: { worksheetDetailName: name }
1047
+ })
1048
+ } else {
1049
+ response = await client.mutate({
1050
+ mutation: gql`
1051
+ mutation undoInspectionCarton(
1052
+ $productDetailId: String!
1053
+ $cartonId: String!
1054
+ $batchId: String!
1055
+ $locationId: String!
1056
+ $inventoryCheckNo: String!
1057
+ $countNo: Int!
1058
+ ) {
1059
+ undoInspectionCarton(
1060
+ productDetailId: $productDetailId
1061
+ cartonId: $cartonId
1062
+ batchId: $batchId
1063
+ locationId: $locationId
1064
+ inventoryCheckNo: $inventoryCheckNo
1065
+ countNo: $countNo
1066
+ )
1067
+ }
1068
+ `,
1069
+ variables: {
1070
+ productDetailId,
1071
+ cartonId,
1072
+ batchId,
1073
+ locationId,
1074
+ inventoryCheckNo: this.cycleCountNo,
1075
+ countNo
1065
1076
  }
1066
- `,
1067
- variables: {
1068
- productDetailId,
1069
- cartonId,
1070
- batchId,
1071
- locationId,
1072
- inventoryCheckNo: this.cycleCountNo,
1073
- countNo
1074
- }
1075
- })
1076
- }
1077
+ })
1078
+ }
1077
1079
 
1078
- if (!response.errors) {
1079
- await this.fetchCycleCountWorksheet()
1080
- this.resetInput()
1081
- this.showToast({ message: i18next.t('text.the_inventory_has_been_successfully_reverted') })
1080
+ if (!response.errors) {
1081
+ await this.fetchCycleCountWorksheet()
1082
+ this.resetInput()
1083
+ this.showToast({ message: i18next.t('text.the_inventory_has_been_successfully_reverted') })
1084
+ }
1082
1085
  }
1083
1086
  } catch (e) {
1084
1087
  this.showToast(e)
@@ -5,40 +5,21 @@ import '../print-airway-bill-popup'
5
5
  import '../../../outbound/generate-worksheet-popup'
6
6
 
7
7
  import gql from 'graphql-tag'
8
- import {
9
- css,
10
- html
11
- } from 'lit-element'
8
+ import { css, html } from 'lit-element'
12
9
  import { connect } from 'pwa-helpers/connect-mixin'
13
10
 
14
11
  import { GhostPrint } from '@operato/ghost-print'
15
12
  import { DirectPrinter } from '@things-factory/barcode-base'
16
13
  import { getCodeByName } from '@things-factory/code-base'
17
- import {
18
- i18next,
19
- localize
20
- } from '@things-factory/i18n-base'
14
+ import { i18next, localize } from '@things-factory/i18n-base'
21
15
  import { openPopup } from '@things-factory/layout-base'
22
- import {
23
- client,
24
- navigate,
25
- PageView,
26
- store
27
- } from '@things-factory/shell'
28
- import {
29
- CommonButtonStyles,
30
- ScrollbarStyles
31
- } from '@things-factory/styles'
32
- import {
33
- isMobileDevice,
34
- sleep
35
- } from '@things-factory/utils'
16
+ import { client, navigate, PageView, store } from '@things-factory/shell'
17
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
18
+ import { isMobileDevice, sleep } from '@things-factory/utils'
36
19
 
37
20
  import { fetchSettingRule } from '../../../../fetch-setting-value'
38
- import {
39
- INTENALIZED_AWB_SETTING_KEY,
40
- ORDER_STATUS
41
- } from '../../../constants'
21
+ import { INTENALIZED_AWB_SETTING_KEY, ORDER_STATUS } from '../../../constants'
22
+ import { error } from 'console'
42
23
 
43
24
  const HEADER_JSON = {
44
25
  'Content-Type': 'application/json',
@@ -244,7 +225,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
244
225
  props: {
245
226
  searchOper: 'gte'
246
227
  },
247
- options: [{ value: '' }, { name: 'Single Item', value: 1 }, { name: 'Multiple Item', value: 2 }]
228
+ options: [{ value: '' }, { name: 'Single Item', value: 1 }, { name: 'Multiple Item', value: 2 }]
248
229
  },
249
230
  {
250
231
  label: i18next.t('field.product_info'),
@@ -259,7 +240,13 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
259
240
  props: {
260
241
  searchOper: 'eq'
261
242
  },
262
- options: [{ value: '' }, { name: 'Lazada', value: 'LZD' }, { name: 'Shopee', value: 'SHP' }, { name: 'Shopify', value: 'SPF' }, { name: 'Tiktok', value: 'TTK' }]
243
+ options: [
244
+ { value: '' },
245
+ { name: 'Lazada', value: 'LZD' },
246
+ { name: 'Shopee', value: 'SHP' },
247
+ { name: 'Shopify', value: 'SPF' },
248
+ { name: 'Tiktok', value: 'TTK' }
249
+ ]
263
250
  },
264
251
  {
265
252
  label: i18next.t('field.order_remark'),
@@ -321,6 +308,21 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
321
308
  }
322
309
  }
323
310
  },
311
+ {
312
+ type: 'gutter',
313
+ gutterName: 'button',
314
+ icon: 'assignment_return',
315
+ handlers: {
316
+ click: (columns, data, column, record, rowIndex) => {
317
+ const { status, name } = record
318
+ if (status === ORDER_STATUS.DONE.value) {
319
+ navigate(`create_return_order?releaseOrderNo=${name}`)
320
+ } else {
321
+ this._showToast({ type: 'error', message: 'Only "DONE" order can create return order.' })
322
+ }
323
+ }
324
+ }
325
+ },
324
326
  {
325
327
  type: 'boolean',
326
328
  name: 'orderRemark',
@@ -964,4 +966,4 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
964
966
  }
965
967
  }
966
968
 
967
- window.customElements.define('b2c-order-requests', B2cOrderRequests)
969
+ window.customElements.define('b2c-order-requests', B2cOrderRequests)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.417",
3
+ "version": "4.3.419",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -66,7 +66,7 @@
66
66
  "@things-factory/attachment-ui": "^4.3.381",
67
67
  "@things-factory/auth-ui": "^4.3.381",
68
68
  "@things-factory/barcode-ui": "^4.3.381",
69
- "@things-factory/biz-ui": "^4.3.381",
69
+ "@things-factory/biz-ui": "^4.3.419",
70
70
  "@things-factory/board-service": "^4.3.381",
71
71
  "@things-factory/board-ui": "^4.3.381",
72
72
  "@things-factory/code-ui": "^4.3.381",
@@ -89,9 +89,9 @@
89
89
  "@things-factory/pdf": "^4.3.381",
90
90
  "@things-factory/print-proxy-service": "^4.3.381",
91
91
  "@things-factory/print-ui": "^4.3.381",
92
- "@things-factory/product-base": "^4.3.398",
92
+ "@things-factory/product-base": "^4.3.419",
93
93
  "@things-factory/resource-ui": "^4.3.381",
94
- "@things-factory/sales-ui": "^4.3.417",
94
+ "@things-factory/sales-ui": "^4.3.419",
95
95
  "@things-factory/scene-data-transform": "^4.3.381",
96
96
  "@things-factory/scene-excel": "^4.3.381",
97
97
  "@things-factory/scene-firebase": "^4.3.381",
@@ -105,10 +105,10 @@
105
105
  "@things-factory/scene-visualizer": "^4.3.381",
106
106
  "@things-factory/setting-ui": "^4.3.381",
107
107
  "@things-factory/system-ui": "^4.3.381",
108
- "@things-factory/transport-base": "^4.3.381",
108
+ "@things-factory/transport-base": "^4.3.419",
109
109
  "@things-factory/tutorial-ui": "^4.3.381",
110
- "@things-factory/warehouse-base": "^4.3.417",
111
- "@things-factory/worksheet-base": "^4.3.417"
110
+ "@things-factory/warehouse-base": "^4.3.419",
111
+ "@things-factory/worksheet-base": "^4.3.419"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.381",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "0cab82d71d74eab693238c9f527c86ccfa60d7cf"
120
+ "gitHead": "0deb9f2fde83fd1b0b912eaaeb8694a2fdec270f"
121
121
  }