@things-factory/operato-wms 4.0.34 → 4.0.38
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.
- package/Dockerfile +1 -45
- package/client/pages/bulk-operation/bulk-operation.js +2 -2
- package/client/pages/components/popup-reusable-pallet.js +8 -0
- package/client/pages/components/worksheet-information-popup.js +1 -1
- package/client/pages/inbound/putaway-product.js +41 -36
- package/client/pages/inbound/unload-product.js +68 -60
- package/client/pages/order/arrival-notice/create-arrival-notice.js +1 -1
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +21 -45
- package/client/pages/outbound/picking-product.js +224 -231
- package/client/pages/outbound/show-ro-list-popup.js +1 -1
- package/client/pages/outbound/sorting-product.js +23 -27
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +1 -1
- package/package.json +54 -54
- package/translations/en.json +8 -5
- package/translations/ko.json +6 -4
- package/translations/ms.json +6 -4
- package/translations/zh.json +6 -4
|
@@ -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.
|
|
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
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
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
|
-
|
|
907
|
-
this.openPalletReplacementPopup()
|
|
908
|
-
return
|
|
909
|
-
} else {
|
|
910
|
-
response = await this.pickCommonPicking()
|
|
911
|
-
}
|
|
911
|
+
response = await this.pickCommonPicking()
|
|
912
912
|
}
|
|
913
|
+
}
|
|
913
914
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
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.
|
|
936
|
-
|
|
937
|
-
this.
|
|
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
|
|
1026
|
-
|
|
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
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
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
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
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
|
-
}
|
|
1137
|
-
|
|
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
|
|
1143
|
-
|
|
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
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
(
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
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
|
-
}
|
|
1224
|
-
|
|
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 {
|
|
@@ -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:
|
|
135
|
+
this.dispatchEvent(new CustomEvent('ro-selected', { detail: { ro: selectedRO } }))
|
|
136
136
|
history.back()
|
|
137
137
|
} else {
|
|
138
138
|
document.dispatchEvent(
|
|
@@ -22,10 +22,10 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
22
22
|
return {
|
|
23
23
|
_bizplaceName: String,
|
|
24
24
|
_enableProductScanning: Boolean,
|
|
25
|
-
_productName: String,
|
|
26
25
|
_selectedOrderInventory: Object,
|
|
27
26
|
_selectedTaskStatus: String,
|
|
28
27
|
_worksheetInfo: Object,
|
|
28
|
+
_selectedReleaseGood: Object,
|
|
29
29
|
config: Object,
|
|
30
30
|
data: Object,
|
|
31
31
|
releaseOrders: Array,
|
|
@@ -117,10 +117,6 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
117
117
|
.shadowRoot.querySelector('input')
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
get releaseGoodNoInput() {
|
|
121
|
-
return this.shadowRoot.querySelector('input[name=releaseGoodNo]')
|
|
122
|
-
}
|
|
123
|
-
|
|
124
120
|
get scannable() {
|
|
125
121
|
return this._selectedTaskStatus && this._selectedTaskStatus === WORKSHEET_STATUS.EXECUTING.value
|
|
126
122
|
}
|
|
@@ -335,7 +331,8 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
335
331
|
<show-ro-list-popup
|
|
336
332
|
.releaseOrders=${this.releaseOrders}
|
|
337
333
|
@ro-selected=${e => {
|
|
338
|
-
this.
|
|
334
|
+
this._selectedReleaseGood = e.detail.ro
|
|
335
|
+
this._fetchItemList(this._selectedReleaseGood.name)
|
|
339
336
|
}}
|
|
340
337
|
></show-ro-list-popup>
|
|
341
338
|
`,
|
|
@@ -417,27 +414,26 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
414
|
}
|
|
418
415
|
|
|
419
416
|
async _sorting(e) {
|
|
420
|
-
if (e.keyCode
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
let response
|
|
426
|
-
if (this._enableProductScanning) {
|
|
427
|
-
response = await this.scanProductSorting()
|
|
428
|
-
} else {
|
|
429
|
-
response = await this.commonSorting()
|
|
430
|
-
}
|
|
417
|
+
if (e.keyCode !== 13) return
|
|
418
|
+
e.preventDefault()
|
|
419
|
+
try {
|
|
420
|
+
this._validateSorting()
|
|
431
421
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
422
|
+
let response
|
|
423
|
+
if (this._enableProductScanning) {
|
|
424
|
+
response = await this.scanProductSorting()
|
|
425
|
+
} else {
|
|
426
|
+
response = await this.commonSorting()
|
|
427
|
+
}
|
|
435
428
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
429
|
+
if (!response.errors) {
|
|
430
|
+
if (this._enableProductScanning) this.productBarcodeInput.value = ''
|
|
431
|
+
else this.sortingQtyInput.value = ''
|
|
432
|
+
|
|
433
|
+
this._fetchItemList(this._selectedReleaseGood.name)
|
|
440
434
|
}
|
|
435
|
+
} catch (e) {
|
|
436
|
+
this._showToast(e)
|
|
441
437
|
}
|
|
442
438
|
}
|
|
443
439
|
|
|
@@ -450,7 +446,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
450
446
|
`,
|
|
451
447
|
variables: {
|
|
452
448
|
taskNo: this.taskNo,
|
|
453
|
-
releaseGoodNo: this.
|
|
449
|
+
releaseGoodNo: this._selectedReleaseGood.name,
|
|
454
450
|
productId: this._selectedOrderInventory?.product.id,
|
|
455
451
|
sortingQty: parseFloat(this.sortingQtyInput.value)
|
|
456
452
|
}
|
|
@@ -466,7 +462,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
466
462
|
`,
|
|
467
463
|
variables: {
|
|
468
464
|
taskNo: this.taskNo,
|
|
469
|
-
releaseGoodNo: this.
|
|
465
|
+
releaseGoodNo: this._selectedReleaseGood.name,
|
|
470
466
|
productBarcode: this.productBarcodeInput.value.trim()
|
|
471
467
|
}
|
|
472
468
|
})
|
|
@@ -498,7 +494,7 @@ class SortingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
498
494
|
}
|
|
499
495
|
`,
|
|
500
496
|
variables: {
|
|
501
|
-
releaseGoodNo: this.
|
|
497
|
+
releaseGoodNo: this._selectedReleaseGood.name
|
|
502
498
|
}
|
|
503
499
|
})
|
|
504
500
|
if (!response.errors) {
|
|
@@ -247,7 +247,7 @@ class PopupCombinationSets extends localize(i18next)(LitElement) {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
`,
|
|
250
|
-
variables: { id: reverseKittingOrder.id, patch: { issue } }
|
|
250
|
+
variables: { id: reverseKittingOrder.id, patch: { issue, cuFlag: 'M' } }
|
|
251
251
|
})
|
|
252
252
|
|
|
253
253
|
if (!response.errors) {
|