fix:上盘平磨handoverbw展示添加多选
This commit is contained in:
parent
e9a1c6041d
commit
0252ee2361
|
|
@ -117,6 +117,7 @@
|
|||
</template>
|
||||
<!-- 批次物料列表 wprList -->
|
||||
<template v-if="route_code=='shangpaipingmo'">
|
||||
<el-checkbox v-model="checkedStatus[bwIndex]" label="全选" @change="checkAllChange(bwIndex)" style="display: block;margin-top: -15px;"/>
|
||||
<span v-for="item2 in form.handoverb[bwIndex].handoverbw" :key="item2" style="margin-right: 10px;">
|
||||
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange(bwIndex)"/>
|
||||
</span>
|
||||
|
|
@ -364,6 +365,7 @@ export default {
|
|||
totalCount: 0,
|
||||
deptID:'',
|
||||
bwIndex:0,
|
||||
checkedStatus:[],
|
||||
userList: [],
|
||||
userList2: [],
|
||||
deptOptions:[],
|
||||
|
|
@ -427,6 +429,7 @@ export default {
|
|||
methods: {
|
||||
deletebw(index){
|
||||
let that = this;
|
||||
that.checkedStatus.splice(index,1);
|
||||
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
|
||||
this.form.handoverb[this.bwIndex].count--;
|
||||
let totalCount = 0;
|
||||
|
|
@ -613,6 +616,8 @@ export default {
|
|||
let that = this;
|
||||
that.mode = mode;
|
||||
that.mtype = mtype;
|
||||
that.checkedStatus=[];
|
||||
that.selectItems=[];
|
||||
if(mtype==30){
|
||||
that.change_batch = true;
|
||||
}
|
||||
|
|
@ -621,6 +626,8 @@ export default {
|
|||
that.totalCount = 0;
|
||||
data.forEach((item,index)=>{
|
||||
item.wm = item.id;
|
||||
that.checkedStatus.push(true)
|
||||
that.selectItems.push(item.id)
|
||||
that.totalCount += Number(item.count);
|
||||
that.getWprList(item.wm,index);
|
||||
})
|
||||
|
|
@ -699,9 +706,19 @@ export default {
|
|||
that.form.handoverb[index].handoverbw = handoverbw;
|
||||
})
|
||||
},
|
||||
checkAllChange(index){
|
||||
this.form.handoverb[index].handoverbw.forEach(item=>{
|
||||
item.checked = this.checkedStatus[index]
|
||||
})
|
||||
},
|
||||
handleChange(index){
|
||||
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
|
||||
this.form.handoverb[index].count = trueCount;
|
||||
if(trueCount==this.form.handoverb[index].handoverbw.length){
|
||||
this.checkedStatus[index] = true;
|
||||
}else{
|
||||
this.checkedStatus[index] = false;
|
||||
}
|
||||
this.countChange();
|
||||
},
|
||||
countChange(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue