Browse Source

预生产、装配上架校验提示

ljc_0803
lijuncheng 3 months ago
parent
commit
7b5f7f91d4
  1. 48
      src/mycomponents/scan/winScanPackage.vue
  2. 20
      src/pages/productPutaway/record/productPutawayRecord.vue

48
src/mycomponents/scan/winScanPackage.vue

@ -32,7 +32,13 @@
import { import {
getBalanceByFilter getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray,
getLocationAreaTypeName
} from '@/common/directory.js';
export default { export default {
name: 'winScanPack', name: 'winScanPack',
components: { components: {
@ -55,7 +61,8 @@
data() { data() {
return { return {
show: false, show: false,
businessType: null businessType: null,
scanResult:{}
} }
}, },
created() { created() {
@ -104,6 +111,7 @@
getScanResult(result) { getScanResult(result) {
if (result.success) { if (result.success) {
this.scanResult=result
this.getBalance(result, res => { this.getBalance(result, res => {
result.balance = res; result.balance = res;
this.$emit("getResult", result); this.$emit("getResult", result);
@ -130,14 +138,14 @@
value: this.businessType.outInventoryStatuses value: this.businessType.outInventoryStatuses
}) })
} }
if (this.businessType.outAreaTypes != null) { if (this.businessType.outAreaTypes ) {
filters.push({ filters.push({
column: "areaType", column: "areaType",
action: "in", action: "in",
value: this.businessType.outAreaTypes value: this.businessType.outAreaTypes
}) })
} }
if (this.businessType.outAreaCodes != null) { if (this.businessType.outAreaCodes ) {
filters.push({ filters.push({
column: "areaCode", column: "areaCode",
action: "in", action: "in",
@ -146,6 +154,30 @@
} }
return filters; return filters;
}, },
getQueryCondition() {
let condition = '按照以下条件:\n';
let label = this.scanResult.label;
let status = getInventoryStatusDesc(getDirectoryItemArray(this.businessType.outInventoryStatuses));
let areaType =getLocationAreaTypeName(this.businessType.outAreaTypes)
condition = condition + '物料号=[' + label.itemCode
+ ']\n箱码=[' + label.packingNumber +
']\n批次=[' +
label.batch +
']'
if (status) {
condition = condition + '\n库存状态=[' + status + ']'
}
if (areaType) {
condition = condition + '\n库区类型=[' + areaType + ']'
}
if (this.businessType.outAreaCodes) {
condition = condition + '\n库区代码=[' + this.businessType.outAreaCodes + ']'
}
return condition;
},
getBalance(result, callback) { getBalance(result, callback) {
let filters = []; let filters = [];
@ -201,9 +233,7 @@
params.filters = filters; params.filters = filters;
getBalanceByFilter(params).then(res1 => { getBalanceByFilter(params).then(res1 => {
if (res1.data.list.length == 0) { if (res1.data.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存余额', res => { this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额')
this.packGetFocus();
})
} else { } else {
res1.data.list.forEach(r => r.parentPackingNumber = packageInfo.number) res1.data.list.forEach(r => r.parentPackingNumber = packageInfo.number)
callback(res1.data.list) callback(res1.data.list)
@ -212,9 +242,7 @@
this.showErrorMessage(err.message); this.showErrorMessage(err.message);
}) })
} else { } else {
this.showErrorMessage('未查找到该包装的库存余额', res => { this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额')
this.packGetFocus();
})
} }
} }
}).catch(err => { }).catch(err => {

20
src/pages/productPutaway/record/productPutawayRecord.vue

@ -147,6 +147,7 @@
getScanResult(result) { getScanResult(result) {
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
let errorHint=""
result.balance.forEach( result.balance.forEach(
balance => { balance => {
let item = this.detailSource.find(res => { let item = this.detailSource.find(res => {
@ -180,14 +181,19 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + errorHint+="箱码[" + balance.packingNumber + "批次[" + balance.batch +
"]重复扫描") "]重复扫描\n"
} }
} }
} }
this.calcHandleQty(); this.calcHandleQty();
} }
) )
if(errorHint){
this.showErrorMessage(errorHint)
}else {
this.scanPopupGetFocus()
}
}, },
getRecommendLocation(balance) { getRecommendLocation(balance) {
@ -251,9 +257,6 @@
this.$forceUpdate(); this.$forceUpdate();
}, },
updateData() {
this.calcHandleQty();
},
removeItem(index, item) { removeItem(index, item) {
this.removeRecommendLocation([item.expectinNumber]); this.removeRecommendLocation([item.expectinNumber]);
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
@ -423,13 +426,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

Loading…
Cancel
Save