fix:玻纤分批和检验表判断问题
This commit is contained in:
parent
29f986b5e0
commit
d43c63e085
|
|
@ -33,9 +33,9 @@
|
|||
<span style="margin: 0 0 0 20px;">选择物料:</span>
|
||||
<el-input ref="codeInput"
|
||||
placeholder="扫描交接物料"
|
||||
v-model="wm_in" clearable
|
||||
v-model="listItem.wm_in" clearable
|
||||
style="width: 120px;margin: 0 10px;"
|
||||
@change="formWminChange($index,wm_in)"
|
||||
@change="formWminChange($index,listItem.wm_in)"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-model="listItem.wpr"
|
||||
|
|
@ -177,6 +177,7 @@ export default {
|
|||
obj.batch = that.batchOrign.batch+"-"+that.addBactchNum;
|
||||
that.addBactchNum++;
|
||||
obj.count = 0;
|
||||
obj.wm_in = "";
|
||||
obj.handoverbw=[];
|
||||
that.form.handoverb.push(obj);
|
||||
})
|
||||
|
|
@ -208,23 +209,40 @@ export default {
|
|||
},
|
||||
formWminChange(index,number){
|
||||
let that = this;
|
||||
//放入对应的行中的handoverb中,并且在列表中disabled
|
||||
that.wprOptions.forEach(item=>{
|
||||
if(item.number== number){
|
||||
if(item.disabled){
|
||||
that.$message.error("该物料已被分配");
|
||||
that.form.handoverb[index].wpr = '';
|
||||
}else{
|
||||
// console.log('number',number.split(" "));
|
||||
let arrs = number.split(" ");
|
||||
that.form.handoverb[index].wm_in = "";
|
||||
if(arrs.length>1){
|
||||
that.form.handoverb[index].wpr = '';
|
||||
that.wprOptions.forEach(item=>{
|
||||
if(arrs.indexOf(item.number) > -1&&!item.disabled){
|
||||
item.disabled = true;
|
||||
let obj = {};
|
||||
obj.number = item.number;
|
||||
obj.wpr = item.id;
|
||||
that.form.handoverb[index].handoverbw.push(obj);
|
||||
that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length;
|
||||
that.form.handoverb[index].wpr = '';
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}else{
|
||||
//放入对应的行中的handoverb中,并且在列表中disabled
|
||||
that.wprOptions.forEach(item=>{
|
||||
if(item.number== number){
|
||||
if(item.disabled){
|
||||
that.$message.error("该物料已被分配");
|
||||
that.form.handoverb[index].wpr = '';
|
||||
}else{
|
||||
item.disabled = true;
|
||||
let obj = {};
|
||||
obj.number = item.number;
|
||||
obj.wpr = item.id;
|
||||
that.form.handoverb[index].handoverbw.push(obj);
|
||||
that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length;
|
||||
that.form.handoverb[index].wpr = '';
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$refs.codeInput.focus();
|
||||
},
|
||||
deleteWpr(index1,index2,wpr){
|
||||
|
|
@ -240,6 +258,7 @@ export default {
|
|||
batchAdd(){
|
||||
let that = this;
|
||||
let obj = { };
|
||||
obj.wm_in = "";
|
||||
obj.wm = that.batchOrign.id;
|
||||
obj.batch = that.batchOrign.batch+"-"+that.addBactchNum;
|
||||
that.addBactchNum++;
|
||||
|
|
@ -327,6 +346,7 @@ export default {
|
|||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-right: 20px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.circleCloseFilled{
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ export default {
|
|||
let judge = false;
|
||||
try {
|
||||
judge = eval(str);
|
||||
row[index][item.defect_name] = judge;
|
||||
that.mlogbwlist[editIndex][item.defect_name] = judge;
|
||||
}catch (error) {
|
||||
console.error('error',error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue