feat:上盘平魔合批时,handoverbw列表展示格式改成多选形式
This commit is contained in:
parent
9ed081e5be
commit
98e610113c
|
|
@ -96,7 +96,7 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:max="listItem.count_canhandover"
|
:max="Number(listItem.count_canhandover)"
|
||||||
:disabled="mode==='show'||listItem.tracking==20"
|
:disabled="mode==='show'||listItem.tracking==20"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
@ -110,15 +110,23 @@
|
||||||
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
<el-button type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-card shadow="false" v-if="bwVisible" style="position: relative;">
|
<el-card shadow="never" v-if="bwVisible" style="position: relative;">
|
||||||
<template #header>
|
<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>
|
<el-icon style="position: absolute;right: 10px;top: 10px;font-size: 25px;" @click="bwVisibleClose"><el-icon-circle-close /></el-icon>
|
||||||
</template>
|
</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;">
|
<!-- 批次物料列表 wprList -->
|
||||||
<span>{{ item2.number }}</span>
|
<template v-if="route_code=='shangpaipingmo'">
|
||||||
<el-button @click="deletebw(index2)" type="primary">删除</el-button>
|
<span v-for="item2 in form.handoverb[bwIndex].handoverbw" :key="item2" style="margin-right: 10px;">
|
||||||
</div>
|
<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-card>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -343,6 +351,7 @@ export default {
|
||||||
is_hidde:true,
|
is_hidde:true,
|
||||||
},
|
},
|
||||||
wm_in:"",
|
wm_in:"",
|
||||||
|
route_code: "",
|
||||||
materials:[],
|
materials:[],
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
|
|
@ -369,6 +378,8 @@ export default {
|
||||||
that.form.mtype=30;
|
that.form.mtype=30;
|
||||||
that.change_batch = true;
|
that.change_batch = true;
|
||||||
}
|
}
|
||||||
|
let arr = that.$route.path.split("/");
|
||||||
|
that.route_code = arr[2];
|
||||||
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
|
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
|
||||||
that.materialObj = materialObj;
|
that.materialObj = materialObj;
|
||||||
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
|
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
|
||||||
|
|
@ -641,12 +652,18 @@ export default {
|
||||||
res.forEach(wpritem=>{
|
res.forEach(wpritem=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wpr = wpritem.id;
|
obj.wpr = wpritem.id;
|
||||||
|
obj.checked = true;
|
||||||
obj.number = wpritem.number;
|
obj.number = wpritem.number;
|
||||||
handoverbw.push(obj);
|
handoverbw.push(obj);
|
||||||
})
|
})
|
||||||
that.form.handoverb[index].handoverbw = handoverbw;
|
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(){
|
countChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let totalCount = 0;
|
let totalCount = 0;
|
||||||
|
|
@ -677,6 +694,17 @@ export default {
|
||||||
that.form.recive_mgroup = that.form.send_mgroup;
|
that.form.recive_mgroup = that.form.send_mgroup;
|
||||||
}
|
}
|
||||||
that.form.mtype=that.mtype;
|
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){
|
if(that.mtype==20||that.mtype==30||that.type==40){
|
||||||
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue