@things-factory/operato-wms 4.0.35 → 4.0.39

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.
@@ -140,7 +140,6 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
140
140
  .config=${this.inventoryGristConfig}
141
141
  .data=${this.inventoryData}
142
142
  @record-change="${this._onProductChangeHandler.bind(this)}"
143
- @field-change="${this._onInventoryFieldChanged.bind(this)}"
144
143
  ></data-grist>
145
144
  </div>
146
145
  </div>
@@ -223,7 +222,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
223
222
  if (this.active) {
224
223
  if (changes.resourceId) {
225
224
  this._reverseKittingNo = changes.resourceId
226
- } else {
225
+ } else if (!this._reverseKittingNo) {
227
226
  this._reverseKittingNo = 'new'
228
227
  }
229
228
 
@@ -379,8 +378,9 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
379
378
 
380
379
  try {
381
380
  if (changedColumn === 'qty') {
382
- this._validateQty(changeRecord.qty)
381
+ this._validateQty(changeRecord.qty, changeRecord.remainQty)
383
382
  }
383
+ this._updateQtyAndUomValue(event.detail.row, changedColumn, event.detail.before, changeRecord)
384
384
  } catch (e) {
385
385
  const beforeValue = event.detail.before && event.detail.before[event.detail.column.name]
386
386
  if (beforeValue) {
@@ -392,42 +392,18 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
392
392
  }
393
393
  }
394
394
 
395
- _onInventoryFieldChanged(e) {
396
- let columnName = e.detail.column.name
395
+ _updateQtyAndUomValue(rowIndex, columnName, initialRecord, newRecord) {
397
396
  let roundedUomValue = 0
398
397
  let qty = 0
399
398
 
400
- if (columnName == 'uomValue' || columnName == 'qty' || columnName == 'inventory') {
401
- if (columnName == 'inventory') {
402
- if (
403
- e.detail.after.remainUomValue &&
404
- e.detail.after.remainQty &&
405
- e.detail.after.remainUomValue > 0 &&
406
- e.detail.after.remainQty > 0
407
- ) {
408
- qty = e.detail.record.qty || 0
409
-
410
- roundedUomValue = qty * (e.detail.after.remainUomValue / e.detail.after.remainQty)
399
+ if (columnName == 'qty' || columnName == 'uomValue') {
400
+ if (initialRecord?.remainQty && initialRecord?.remainUomValue) {
401
+ let packageUomValue = initialRecord.remainUomValue / initialRecord.remainQty
411
402
 
412
- roundedUomValue = parseFloat(roundedUomValue.toFixed(2))
413
- }
414
- } else {
415
- let packageUomValue = e.detail.record.remainUomValue / e.detail.record.remainQty
416
- if (
417
- e.detail.record.remainUomValue &&
418
- e.detail.record.remainQty &&
419
- e.detail.record.remainUomValue > 0 &&
420
- e.detail.record.remainQty > 0
421
- ) {
422
- if (columnName === 'qty') {
423
- qty = e.detail.after || 0
424
- } else {
425
- qty = Math.round(e.detail.after / packageUomValue)
426
- }
403
+ if (columnName == 'qty') qty = newRecord.qty || 0
404
+ else qty = Math.round(newRecord.uomValue / packageUomValue)
427
405
 
428
- roundedUomValue = qty * packageUomValue
429
- roundedUomValue = parseFloat(roundedUomValue.toFixed(2))
430
- }
406
+ roundedUomValue = Math.round(qty * packageUomValue * 100) / 100
431
407
  }
432
408
  }
433
409
 
@@ -435,20 +411,16 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
435
411
  ...this.inventoryData,
436
412
  ...this.inventoryGrist.dirtyData,
437
413
  records: this.inventoryGrist.dirtyData.records.map((record, idx) => {
438
- // const factor = this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value ? e.detail.row : e.detail.record.id
439
-
440
- if ((columnName == 'uomValue' || columnName == 'qty' || columnName == 'inventory') && idx === e.detail.row) {
414
+ if (idx == rowIndex && (columnName == 'qty' || columnName == 'uomValue')) {
441
415
  if (columnName == 'uomValue') record.qty = qty
442
416
  record.uomValue = roundedUomValue
443
417
  }
444
418
 
445
- let returnObj = {
419
+ return {
446
420
  ...record,
447
421
  ...record.inventory,
448
422
  name: record.name ? record.name : idx
449
423
  }
450
-
451
- return returnObj
452
424
  })
453
425
  }
454
426
 
@@ -783,21 +755,25 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
783
755
  }
784
756
 
785
757
  checkInventoryValidity() {
786
- if (!this.inventoryGrist.dirtyData.records || !this.inventoryGrist.dirtyData.records.length) {
758
+ let records = this.inventoryGrist.dirtyData?.records
759
+
760
+ if (!records || !records.length) {
787
761
  throw new Error(i18next.t('text.there_is_no_inventory'))
788
762
  }
789
763
 
790
- if (this.inventoryGrist.dirtyData.records.some(record => !record.inventory && !record.inventory.id))
764
+ if (records.some(record => !record.inventory && !record.inventory.id))
791
765
  throw new Error(i18next.t('text.invalid_inventory'))
792
766
 
793
- if (this.inventoryGrist.dirtyData.records.some(record => !record.productCombination))
767
+ if (records.some(record => !record.productCombination))
794
768
  throw new Error(i18next.t('text.invalid_product_combination'))
795
769
 
770
+ records.forEach(record => this._validateQty(record.qty, record.remainQty))
771
+
796
772
  return true
797
773
  }
798
774
 
799
- _validateQty(qty) {
800
- if (qty <= 0) {
775
+ _validateQty(qty, remainQty) {
776
+ if (!qty || qty <= 0 || qty > remainQty) {
801
777
  throw new Error(i18next.t('text.invalid_quantity_input'))
802
778
  }
803
779
  }
@@ -45,7 +45,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
45
45
  _isReplacement: Boolean,
46
46
  _isRequireSerialNumberScanning: Boolean,
47
47
  _reusablePalletList: Object,
48
- _worksheetInfo: Object
48
+ _worksheetInfo: Object,
49
+ _locationName: String
49
50
  }
50
51
  }
51
52
 
@@ -341,7 +342,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
341
342
  <barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
342
343
  `
343
344
  : html`
344
- <label>${i18next.t('label.lot_barcode')}</label>
345
+ <label>${i18next.t('label.lot_id')}</label>
345
346
  <barcode-scanable-input name="palletId" custom-input></barcode-scanable-input>
346
347
  `}
347
348
  ${this._enableProductScanning
@@ -892,50 +893,49 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
892
893
  }
893
894
 
894
895
  async picking(e) {
895
- if (e.keyCode === 13) {
896
- e.preventDefault()
897
- try {
898
- await this.validatePicking()
899
-
900
- let response = {}
901
- if (this.crossDocking) {
902
- response = await this.pickCrossDocking()
903
- } else if (this._enableProductScanning || this._isCartonLabel) {
904
- response = await this.productBarcodePicking()
896
+ if (e.keyCode !== 13) return
897
+ e.preventDefault()
898
+ try {
899
+ await this.validatePicking()
900
+
901
+ let response = {}
902
+ if (this.crossDocking) {
903
+ response = await this.pickCrossDocking()
904
+ } else if (this._enableProductScanning || this._isCartonLabel) {
905
+ response = await this.productBarcodePicking()
906
+ } else {
907
+ if (this._isReplacement) {
908
+ this.openPalletReplacementPopup()
909
+ return
905
910
  } else {
906
- if (this._isReplacement) {
907
- this.openPalletReplacementPopup()
908
- return
909
- } else {
910
- response = await this.pickCommonPicking()
911
- }
911
+ response = await this.pickCommonPicking()
912
912
  }
913
+ }
913
914
 
914
- if (!response.errors) {
915
- if (this._isRequireSerialNumberScanning) this.serialInput.value = ''
916
- else if (this._enableProductScanning && !this._isRequireSerialNumberScanning)
917
- this.productBarcodeInput.value = ''
918
- else this.releaseQtyInput.value = ''
919
-
920
- if (!this._isCartonLabel && !this._isRequireSerialNumberScanning) {
921
- this.palletInput.value = ''
922
- // this._selectedTaskStatus = null
923
- this._selectedOrderInventory = null
924
- }
925
-
926
- if (!this.isWholePicking && !this._crossDocking && !this._isCartonLabel && this.locationInput)
927
- this.locationInput.value = ''
928
- if (this.refPickingType === PICKING_TYPES.PICKING.value) {
929
- this.fetchInventories(this.releaseGoodNo)
930
- } else {
931
- this.fetchInventories(this.taskNo)
932
- }
915
+ if (!response.errors) {
916
+ if (this._isRequireSerialNumberScanning) this.serialInput.value = ''
917
+ else if (this._enableProductScanning && !this._isRequireSerialNumberScanning)
918
+ this.productBarcodeInput.value = ''
919
+ else this.releaseQtyInput.value = ''
920
+
921
+ if (!this._isCartonLabel && !this._isRequireSerialNumberScanning) {
922
+ this.palletInput.value = ''
923
+ // this._selectedTaskStatus = null
924
+ this._selectedOrderInventory = null
933
925
  }
934
926
 
935
- this.isReplacement = false
936
- } catch (e) {
937
- this._showToast(e)
927
+ if (!this.isWholePicking && !this._crossDocking && !this._isCartonLabel && this.locationInput)
928
+ this.locationInput.value = ''
929
+ if (this.refPickingType === PICKING_TYPES.PICKING.value) {
930
+ this.fetchInventories(this.releaseGoodNo)
931
+ } else {
932
+ this.fetchInventories(this.taskNo)
933
+ }
938
934
  }
935
+
936
+ this.isReplacement = false
937
+ } catch (e) {
938
+ this._showToast(e)
939
939
  }
940
940
  }
941
941
 
@@ -1022,206 +1022,160 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1022
1022
  }
1023
1023
 
1024
1024
  async pickCommonPicking() {
1025
- if (this._isExecuting === false) {
1026
- this._isExecuting = true
1027
-
1028
- try {
1029
- const locationName =
1030
- this.isWholePicking || !this.locationInput
1031
- ? this._selectedOrderInventory.location.name
1032
- : this.locationInput.value
1033
- // 1. Check whether location is changed
1034
- if (this._selectedOrderInventory.location.name !== locationName) {
1035
- this.locationNameSplit = this.locationInput.value.split('-')
1036
- const zonePortions = this.locationNameSplit[0].match(/[a-zA-Z0-9]+/g)
1037
- const rowPortions = this.locationNameSplit[1].match(/[a-zA-Z0-9]+/g)
1038
- const columnPortions = this.locationNameSplit[2].match(/[a-zA-Z0-9]+/g)
1039
-
1040
- if (this.locationNameSplit.length === 3) {
1041
- this._incompleteLocationName = true
1042
- this.locations = await this.fetchLocations(zonePortions[0], rowPortions[0], columnPortions[0])
1043
- this._focusOnNewLocationInput()
1044
- throw new Error(i18next.t('text.please_select_the_location_again'))
1045
- } else if (this.locationNameSplit.length === 4) {
1046
- let relocateConfirmation = await CustomAlert({
1047
- title: i18next.t('title.relocate'),
1048
- text: i18next.t('text.are_you_sure'),
1049
- confirmButton: { text: i18next.t('button.relocate') },
1050
- cancelButton: { text: i18next.t('button.cancel') }
1051
- })
1025
+ if (this._isExecuting) throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
1026
+ this._isExecuting = true
1052
1027
 
1053
- if (!relocateConfirmation.isConfirmed) {
1054
- this._incompleteLocationName = false
1055
- this.locationNameSplit = []
1056
- return false
1028
+ try {
1029
+ switch (this.refPickingType) {
1030
+ case PICKING_TYPES.PICKING.value:
1031
+ return await client.mutate({
1032
+ mutation: gql`
1033
+ mutation picking(
1034
+ $worksheetDetailName: String!
1035
+ $worksheetType: String!
1036
+ $palletId: String
1037
+ $locationName: String!
1038
+ $releaseQty: Int!
1039
+ $binLocation: String
1040
+ $serialNumber: String
1041
+ ) {
1042
+ picking(
1043
+ worksheetDetailName: $worksheetDetailName
1044
+ worksheetType: $worksheetType
1045
+ palletId: $palletId
1046
+ locationName: $locationName
1047
+ releaseQty: $releaseQty
1048
+ binLocation: $binLocation
1049
+ serialNumber: $serialNumber
1050
+ )
1051
+ }
1052
+ `,
1053
+ variables: {
1054
+ worksheetDetailName: this._selectedOrderInventory.name,
1055
+ worksheetType: this.refPickingType,
1056
+ palletId: this.palletInput.value.trim(),
1057
+ locationName: this._locationName,
1058
+ releaseQty: this._isRequireSerialNumberScanning ? 1 : parseInt(this.releaseQtyInput.value),
1059
+ binLocation: this._hasBinPicking ? this.binLocationInput.value : null,
1060
+ serialNumber: this._isRequireSerialNumberScanning ? this.serialInput.value : null
1057
1061
  }
1058
- }
1059
- }
1060
-
1061
- switch (this.refPickingType) {
1062
- case PICKING_TYPES.PICKING.value:
1063
- return (
1064
- await client.mutate({
1065
- mutation: gql`
1066
- mutation picking(
1067
- $worksheetDetailName: String!
1068
- $worksheetType: String!
1069
- $palletId: String
1070
- $locationName: String!
1071
- $releaseQty: Int!
1072
- $binLocation: String
1073
- $serialNumber: String
1074
- ) {
1075
- picking(
1076
- worksheetDetailName: $worksheetDetailName
1077
- worksheetType: $worksheetType
1078
- palletId: $palletId
1079
- locationName: $locationName
1080
- releaseQty: $releaseQty
1081
- binLocation: $binLocation
1082
- serialNumber: $serialNumber
1083
- )
1084
- }
1085
- `,
1086
- variables: {
1087
- worksheetDetailName: this._selectedOrderInventory.name,
1088
- worksheetType: this.refPickingType,
1089
- palletId: this.palletInput.value.trim(),
1090
- locationName,
1091
- releaseQty: this._isRequireSerialNumberScanning ? 1 : parseInt(this.releaseQtyInput.value),
1092
- binLocation: this._hasBinPicking ? this.binLocationInput.value : null,
1093
- serialNumber: this._isRequireSerialNumberScanning ? this.serialInput.value : null
1094
- }
1095
- }),
1096
- (this._isExecuting = false)
1097
- )
1098
-
1099
- case PICKING_TYPES.BATCH_PICKING.value:
1100
- return (
1101
- await client.mutate({
1102
- mutation: gql`
1103
- mutation batchPicking(
1104
- $taskNo: String!
1105
- $worksheetType: String!
1106
- $palletId: String!
1107
- $locationName: String
1108
- $binLocationName: String
1109
- $releaseQty: Int!
1110
- ) {
1111
- batchPicking(
1112
- taskNo: $taskNo
1113
- worksheetType: $worksheetType
1114
- palletId: $palletId
1115
- locationName: $locationName
1116
- binLocationName: $binLocationName
1117
- releaseQty: $releaseQty
1118
- )
1119
- }
1120
- `,
1121
- variables: {
1122
- taskNo: this.taskNo,
1123
- worksheetType: this.refPickingType,
1124
- palletId: this.palletInput.value.trim(),
1125
- locationName,
1126
- binLocationName: this._hasBinPicking ? this.binLocationInput.value : null,
1127
- releaseQty: parseInt(this.releaseQtyInput.value)
1128
- }
1129
- }),
1130
- (this._isExecuting = false)
1131
- )
1132
- }
1133
- } catch (e) {
1134
- this._showToast(e)
1062
+ })
1063
+
1064
+ case PICKING_TYPES.BATCH_PICKING.value:
1065
+ return await client.mutate({
1066
+ mutation: gql`
1067
+ mutation batchPicking(
1068
+ $taskNo: String!
1069
+ $worksheetType: String!
1070
+ $palletId: String!
1071
+ $locationName: String
1072
+ $binLocationName: String
1073
+ $releaseQty: Int!
1074
+ ) {
1075
+ batchPicking(
1076
+ taskNo: $taskNo
1077
+ worksheetType: $worksheetType
1078
+ palletId: $palletId
1079
+ locationName: $locationName
1080
+ binLocationName: $binLocationName
1081
+ releaseQty: $releaseQty
1082
+ )
1083
+ }
1084
+ `,
1085
+ variables: {
1086
+ taskNo: this.taskNo,
1087
+ worksheetType: this.refPickingType,
1088
+ palletId: this.palletInput.value.trim(),
1089
+ locationName: this._locationName,
1090
+ binLocationName: this._hasBinPicking ? this.binLocationInput.value : null,
1091
+ releaseQty: parseInt(this.releaseQtyInput.value)
1092
+ }
1093
+ })
1135
1094
  }
1136
- } else {
1137
- throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
1095
+ } catch (e) {
1096
+ this._showToast(e)
1097
+ } finally {
1098
+ this._isExecuting = false
1138
1099
  }
1139
1100
  }
1140
1101
 
1141
1102
  async productBarcodePicking() {
1142
- if (this._isExecuting === false) {
1143
- this._isExecuting = true
1144
-
1145
- try {
1146
- switch (this.refPickingType) {
1147
- case PICKING_TYPES.PICKING.value:
1148
- return (
1149
- await client.mutate({
1150
- mutation: gql`
1151
- mutation scanProductPicking(
1152
- $worksheetDetailName: String!
1153
- $worksheetType: String!
1154
- $productBarcode: String!
1155
- $cartonId: String!
1156
- $binLocation: String
1157
- $serialNumber: String
1158
- ) {
1159
- scanProductPicking(
1160
- worksheetDetailName: $worksheetDetailName
1161
- worksheetType: $worksheetType
1162
- productBarcode: $productBarcode
1163
- cartonId: $cartonId
1164
- binLocation: $binLocation
1165
- serialNumber: $serialNumber
1166
- )
1167
- }
1168
- `,
1169
- variables: {
1170
- worksheetDetailName: this._selectedOrderInventory.name,
1171
- worksheetType: this.refPickingType,
1172
- productBarcode: this.productBarcodeInput.value.trim(),
1173
- cartonId: this.cartonInput.value.trim(),
1174
- serialNumber: this._isRequireSerialNumberScanning ? this.serialInput.value : null,
1175
- binLocation: this._hasBinPicking ? this.binLocationInput.value : null
1176
- }
1177
- }),
1178
- (this._isExecuting = false)
1179
- )
1103
+ if (this._isExecuting) throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
1104
+ this._isExecuting = true
1180
1105
 
1181
- case PICKING_TYPES.BATCH_PICKING.value:
1182
- return (
1183
- await client.mutate({
1184
- mutation: gql`
1185
- mutation scanProductBatchPicking(
1186
- $taskNo: String!
1187
- $worksheetType: String!
1188
- $cartonId: String!
1189
- $inventory: InventoryPatch!
1190
- $productBarcode: String!
1191
- $binLocationName: String
1192
- ) {
1193
- scanProductBatchPicking(
1194
- taskNo: $taskNo
1195
- worksheetType: $worksheetType
1196
- cartonId: $cartonId
1197
- inventory: $inventory
1198
- productBarcode: $productBarcode
1199
- binLocationName: $binLocationName
1200
- )
1201
- }
1202
- `,
1203
- variables: {
1204
- taskNo: this.taskNo,
1205
- worksheetType: this.refPickingType,
1206
- cartonId: this.cartonInput.value.trim(),
1207
- productBarcode: this.productBarcodeInput.value.trim(),
1208
- inventory: {
1209
- batchId: this._selectedOrderInventory.batchId,
1210
- packingType: this._selectedOrderInventory.packingType,
1211
- packingSize: this._selectedOrderInventory.packingSize,
1212
- product: { id: this._selectedOrderInventory.product.id }
1213
- },
1214
- binLocationName: this._hasBinPicking ? this.binLocationInput.value : null
1215
- }
1216
- }),
1217
- (this._isExecuting = false)
1218
- )
1219
- }
1220
- } catch (e) {
1221
- this._showToast(e)
1106
+ try {
1107
+ switch (this.refPickingType) {
1108
+ case PICKING_TYPES.PICKING.value:
1109
+ return await client.mutate({
1110
+ mutation: gql`
1111
+ mutation scanProductPicking(
1112
+ $worksheetDetailName: String!
1113
+ $worksheetType: String!
1114
+ $productBarcode: String!
1115
+ $cartonId: String!
1116
+ $binLocation: String
1117
+ $serialNumber: String
1118
+ ) {
1119
+ scanProductPicking(
1120
+ worksheetDetailName: $worksheetDetailName
1121
+ worksheetType: $worksheetType
1122
+ productBarcode: $productBarcode
1123
+ cartonId: $cartonId
1124
+ binLocation: $binLocation
1125
+ serialNumber: $serialNumber
1126
+ )
1127
+ }
1128
+ `,
1129
+ variables: {
1130
+ worksheetDetailName: this._selectedOrderInventory.name,
1131
+ worksheetType: this.refPickingType,
1132
+ productBarcode: this.productBarcodeInput.value.trim(),
1133
+ cartonId: this.cartonInput.value.trim(),
1134
+ serialNumber: this._isRequireSerialNumberScanning ? this.serialInput.value : null,
1135
+ binLocation: this._hasBinPicking ? this.binLocationInput.value : null
1136
+ }
1137
+ })
1138
+
1139
+ case PICKING_TYPES.BATCH_PICKING.value:
1140
+ return await client.mutate({
1141
+ mutation: gql`
1142
+ mutation scanProductBatchPicking(
1143
+ $taskNo: String!
1144
+ $worksheetType: String!
1145
+ $cartonId: String!
1146
+ $inventory: InventoryPatch!
1147
+ $productBarcode: String!
1148
+ $binLocationName: String
1149
+ ) {
1150
+ scanProductBatchPicking(
1151
+ taskNo: $taskNo
1152
+ worksheetType: $worksheetType
1153
+ cartonId: $cartonId
1154
+ inventory: $inventory
1155
+ productBarcode: $productBarcode
1156
+ binLocationName: $binLocationName
1157
+ )
1158
+ }
1159
+ `,
1160
+ variables: {
1161
+ taskNo: this.taskNo,
1162
+ worksheetType: this.refPickingType,
1163
+ cartonId: this.cartonInput.value.trim(),
1164
+ productBarcode: this.productBarcodeInput.value.trim(),
1165
+ inventory: {
1166
+ batchId: this._selectedOrderInventory.batchId,
1167
+ packingType: this._selectedOrderInventory.packingType,
1168
+ packingSize: this._selectedOrderInventory.packingSize,
1169
+ product: { id: this._selectedOrderInventory.product.id }
1170
+ },
1171
+ binLocationName: this._hasBinPicking ? this.binLocationInput.value : null
1172
+ }
1173
+ })
1222
1174
  }
1223
- } else {
1224
- throw new Error(i18next.t('text.previous_picking_is_still_executing_please_wait'))
1175
+ } catch (e) {
1176
+ this._showToast(e)
1177
+ } finally {
1178
+ this._isExecuting = false
1225
1179
  }
1226
1180
  }
1227
1181
 
@@ -1279,6 +1233,45 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1279
1233
  this._focusOnLocationNameInput()
1280
1234
  throw new Error(i18next.t('text.location_id_is_empty'))
1281
1235
  }
1236
+ // check if actual return location
1237
+ this._locationName =
1238
+ this.isWholePicking || !this.locationInput
1239
+ ? this._selectedOrderInventory.location.name
1240
+ : this.locationInput.value
1241
+ // 1. Check whether location is changed
1242
+ if (this._selectedOrderInventory.location.name !== this._locationName) {
1243
+ this.locationNameSplit = this.locationInput.value.split('-')
1244
+ if (this.locationNameSplit.length < 3) {
1245
+ this._focusOnLocationNameInput()
1246
+ throw new Error(i18next.t('text.invalid_return_location'))
1247
+ }
1248
+ const zonePortions = this.locationNameSplit[0].match(/[a-zA-Z0-9]+/g)
1249
+ const rowPortions = this.locationNameSplit[1].match(/[a-zA-Z0-9]+/g)
1250
+ const columnPortions = this.locationNameSplit[2].match(/[a-zA-Z0-9]+/g)
1251
+ if (this.locationNameSplit.length === 3) {
1252
+ this.locations = await this.fetchLocations(zonePortions[0], rowPortions[0], columnPortions[0])
1253
+ this._focusOnNewLocationInput()
1254
+ if (this.locations.length > 0) {
1255
+ this._incompleteLocationName = true
1256
+ throw new Error(i18next.t('text.please_select_the_location_again'))
1257
+ } else {
1258
+ throw new Error(i18next.t('text.invalid_return_location'))
1259
+ }
1260
+ } else if (this.locationNameSplit.length === 4) {
1261
+ let relocateConfirmation = await CustomAlert({
1262
+ title: i18next.t('title.relocate'),
1263
+ text: i18next.t('text.are_you_sure'),
1264
+ confirmButton: { text: i18next.t('button.relocate') },
1265
+ cancelButton: { text: i18next.t('button.cancel') }
1266
+ })
1267
+
1268
+ if (!relocateConfirmation.isConfirmed) {
1269
+ this._incompleteLocationName = false
1270
+ this.locationNameSplit = []
1271
+ return false
1272
+ }
1273
+ }
1274
+ }
1282
1275
  }
1283
1276
  }
1284
1277
  } else {
@@ -1481,6 +1474,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1481
1474
  .releaseGoodNo="${this.releaseGoodNo}"
1482
1475
  @reusable-pallet-info="${e => {
1483
1476
  this._reusablePalletList = e.detail
1477
+ const plasticPallet = this._reusablePalletList.records.map(itm => itm.name)
1478
+ this._worksheetInfo.plasticPallet = plasticPallet.toString()
1484
1479
  }}"
1485
1480
  ></outbound-reusable-pallet>
1486
1481
  `,
@@ -132,7 +132,7 @@ class ShowRoListPopup extends localize(i18next)(LitElement) {
132
132
  _selectReleaseOrder() {
133
133
  const selectedRO = this.grist.selected[0]
134
134
  if (selectedRO) {
135
- this.dispatchEvent(new CustomEvent('ro-selected', { detail: this.grist.selected[0] }))
135
+ this.dispatchEvent(new CustomEvent('ro-selected', { detail: { ro: selectedRO } }))
136
136
  history.back()
137
137
  } else {
138
138
  document.dispatchEvent(