Browse Source

修改发料任务查询已经有库存

lijuncheng0816
lijuncheng 4 months ago
parent
commit
6a3ce8cbeb
  1. 69
      src/pages/issue/coms/comScanIssuePack.vue

69
src/pages/issue/coms/comScanIssuePack.vue

@ -177,7 +177,8 @@
inputStyleObject: { inputStyleObject: {
fontSize: "100rpx" fontSize: "100rpx"
}, },
bussinessCode: 'Issue' bussinessCode: 'Issue',
toLocationAreaTypeList:[]
} }
}, },
created() { created() {
@ -232,6 +233,7 @@
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0]; that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode; that.toLocationCode = that.dataContent[0].toLocationCode;
that.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes)
// that.fromLocationList = that.getFromLocationList(); // that.fromLocationList = that.getFromLocationList();
} }
}, },
@ -266,7 +268,7 @@
} }
}, },
onScanResult(result) { queryBalance(result) {
try { try {
let that = this; let that = this;
// if (that.fromLocationCode == '') { // if (that.fromLocationCode == '') {
@ -408,14 +410,73 @@
this.$refs.comMessage.showQuestionMessage( this.$refs.comMessage.showQuestionMessage(
`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => { `扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => {
if (res) { if (res) {
this.onScanResult(result) this.getToLocationBalance(result)
} }
}); });
} else { } else {
this.onScanResult(result) this.getToLocationBalance(result)
} }
} }
}, },
//
getToLocationBalance(result) {
uni.showLoading({
title: '查询中',
mask: true
})
var filters = []
if (result.package.parentNumber) {
var packingNumber = result.package.parentNumber + "," + result.package.number;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: result.package.number
})
}
filters.push({
column: "itemCode",
action: "==",
value: result.package.itemCode
})
filters.push({
column: "batch",
action: "==",
value: result.package.batch
})
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
uni.hideLoading()
if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额");
} else {
this.queryBalance(result);
}
// callback(res.data)
}).catch(err => {
uni.hideLoading()
this.showErrorMessage(err.message);
})
},
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(this.label, balance, this.packageInfo);

Loading…
Cancel
Save