feat:上盘平魔合批时,handoverbw列表展示格式改成多选形式

This commit is contained in:
shijing 2025-11-19 09:06:10 +08:00
parent 9ed081e5be
commit 98e610113c
1 changed files with 35 additions and 7 deletions

View File

@ -96,7 +96,7 @@
controls-position="right"
:min="0"
:step="1"
:max="listItem.count_canhandover"
:max="Number(listItem.count_canhandover)"
:disabled="mode==='show'||listItem.tracking==20"
:step-strictly="true"
style="width: 100%"
@ -110,15 +110,23 @@
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
</el-col>
</el-row>
<el-card shadow="false" v-if="bwVisible" style="position: relative;">
<el-card shadow="never" v-if="bwVisible" style="position: relative;">
<template #header>
<div style="width: 10px;height: 35px;"></div>
<div style="width: 10px;height: 25px;"></div>
<el-icon style="position: absolute;right: 10px;top: 10px;font-size: 25px;" @click="bwVisibleClose"><el-icon-circle-close /></el-icon>
</template>
<div v-for="(item2,index2) in form.handoverb[bwIndex].handoverbw" :key="item2" style="display: flex;justify-content: space-between;padding-bottom: 10px;padding-left: 10px;">
<span>{{ item2.number }}</span>
<el-button @click="deletebw(index2)" type="primary">删除</el-button>
</div>
<!-- 批次物料列表 wprList -->
<template v-if="route_code=='shangpaipingmo'">
<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>
</template>
<template v-else>
<div v-for="(item2,index2) in form.handoverb[bwIndex].handoverbw" :key="item2" style="display: flex;justify-content: space-between;padding-bottom: 10px;padding-left: 10px;">
<span>{{ item2.number }}</span>
<el-button @click="deletebw(index2)" type="primary">删除</el-button>
</div>
</template>
</el-card>
<el-row>
<el-col :md="12" :sm="24">
@ -343,6 +351,7 @@ export default {
is_hidde:true,
},
wm_in:"",
route_code: "",
materials:[],
totalCount: 0,
deptID:'',
@ -369,6 +378,8 @@ export default {
that.form.mtype=30;
that.change_batch = true;
}
let arr = that.$route.path.split("/");
that.route_code = arr[2];
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
@ -641,12 +652,18 @@ export default {
res.forEach(wpritem=>{
let obj = {};
obj.wpr = wpritem.id;
obj.checked = true;
obj.number = wpritem.number;
handoverbw.push(obj);
})
that.form.handoverb[index].handoverbw = handoverbw;
})
},
handleChange(index){
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
this.form.handoverb[index].count = trueCount;
this.countChange();
},
countChange(){
let that = this;
let totalCount = 0;
@ -677,6 +694,17 @@ export default {
that.form.recive_mgroup = that.form.send_mgroup;
}
that.form.mtype=that.mtype;
if(that.route_code=='shangpaipingmo'){
that.form.handoverb.forEach(item=>{
let handoverbw = [];
item.handoverbw.forEach(item1=>{
if(item1.checked){
handoverbw.push(item1);
}
})
item.handoverbw = handoverbw;
})
}
//
if(that.mtype==20||that.mtype==30||that.type==40){
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {