Browse Source

修改直接发料扫描父子包装问题

hella_online_20240819
lijuncheng 3 months ago
parent
commit
f5e31ee1e5
  1. 79
      src/pages/issue/record/directIssue.vue
  2. 71
      src/pages/repleinsh/record/directRepleinshRecord.vue

79
src/pages/issue/record/directIssue.vue

@ -243,15 +243,74 @@
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
//
//
//,
if (pack.parentNumber) {
var checkData = item.subList.find(r => {
if (r.packingNumber == pack.parentNumber &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.showErrorMessage("箱码[" + pack.number + "]批次[" + balance.batch +
"]的父包装已经扫描")
console.log("父包装已经扫描")
} else {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
} else {
//
var checkData = item.subList.find(r => {
if (r.parentNumber == pack.number &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
item.subList = [];
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
})
console.log("扫描的是父包装,是否移除子包装")
} else {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
}
item.subList.push(newDetail);
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {
@ -386,11 +445,11 @@
// },
commit() {
if(this.positionInfo=='请选择生产线'||!this.positionInfo){
if (this.positionInfo == '请选择生产线' || !this.positionInfo) {
this.showErrorMessage("请选择生产线")
return
}
uni.showLoading({
title: "提交中....",
mask: true

71
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -267,15 +267,70 @@
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
//
//
//,
if (pack.parentNumber) {
var checkData = item.subList.find(r => {
if (r.packingNumber == pack.parentNumber &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.showErrorMessage("箱码[" + pack.number + "]批次[" + balance.batch +
"]的父包装已经扫描")
console.log("父包装已经扫描")
} else {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
} else {
//
var checkData = item.subList.find(r => {
if (r.parentNumber == pack.number &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
item.subList = [];
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
})
console.log("扫描的是父包装,是否移除子包装")
} else {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
}
}
item.subList.push(newDetail);
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {

Loading…
Cancel
Save