fix:玻纤开凹面分批时类似喷码可多选

This commit is contained in:
shijing 2025-12-22 10:23:16 +08:00
parent 399d64800e
commit 9b87e28eb6
3 changed files with 42 additions and 12 deletions

View File

@ -160,7 +160,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="mtype!==30&&form.handoverb.length>0">
<el-col :md="12" :sm="24">
<el-form-item label="接收工段" prop="recive_mgroup">
<el-select
v-model="form.recive_mgroup"
@ -180,7 +180,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="mtype!==30">
<el-col :md="12" :sm="24">
<el-form-item label="接收人">
<el-select
v-model="form.recive_user"
@ -392,6 +392,7 @@ export default {
that.mtype=30;
that.change_batch = true;
}
that.form.recive_mgroup = "";
let arr = that.$route.path.split("/");
that.route_code = arr[2];
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
@ -407,9 +408,12 @@ export default {
that.form.material_changed = that.wmItem.material;
that.form.material_changed_fname = that.wmItem.material_name;
}
if(that.type==20||that.type==50){
that.form.recive_mgroup = that.mgroupId;
}
that.$nextTick(()=>{
console.log('that.type',that.type,'that.mtype',that.mtype)
if(that.type==20||that.type==50||(that.type==10&&that.mtype==30)||(that.mtype==30&&that.new_wm!=='')){
that.form.recive_mgroup = that.mgroupId;
}
})
// type=10
// type=20
// type=30
@ -755,9 +759,6 @@ export default {
let that = this;
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {
if(that.mtype==30){
that.form.recive_mgroup = that.form.send_mgroup;
}
that.form.mtype=that.mtype;
if(that.route_code=='shangpaipingmo'){
that.form.handoverb.forEach(item=>{
@ -771,7 +772,7 @@ export default {
})
}
//
if(that.mtype==20||that.mtype==30||that.type==40){
if(that.mtype==20||(that.mtype==30&&that.type==50&&that.new_wm!=='')||(that.mtype==30&&that.type==10)||that.type==40){
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
that.isSaveing = false;
that.$emit("success");

View File

@ -30,14 +30,16 @@
</el-form-item>
</el-col>
<el-col :span="14">
<span style="margin: 0 0 0 20px;">选择物料:</span>
<span style="margin: 0 0 0 20px;" v-if="route_code=='pengma'">选择物料:</span>
<el-input ref="codeInput"
v-if="route_code=='pengma'"
placeholder="扫描交接物料"
v-model="listItem.wm_in" clearable
style="width: 120px;margin: 0 10px;"
@change="formWminChange($index,listItem.wm_in)"
></el-input>
<el-select
v-if="route_code=='pengma'"
v-model="listItem.wpr"
placeholder="选择交接物料"
@change="wm_inChange($index)"
@ -54,7 +56,7 @@
<span style="margin: 0 20px;">数量{{ listItem.count }}</span>
<el-button v-if="mode!=='show'" type="danger" icon="el-icon-delete" @click="delMaterial($index)"></el-button>
</el-col>
<el-col :span="24" style="padding-left: 80px;margin-bottom: 20px;margin-top: -5px;">
<el-col v-if="route_code=='pengma'" style="padding-left: 80px;margin-bottom: 20px;margin-top: -5px;">
<div v-for="(item2,index2) in form.handoverb[$index].handoverbw" :key="item2.wpr" class="wprItem">
<span>{{ item2.number }}</span>
<el-icon class="circleCloseFilled" @click="deleteWpr($index,index2,item2.wpr)"><el-icon-circleClose-filled /></el-icon>
@ -63,6 +65,11 @@
<span>{{ item3 }}</span>
</div>
</el-col>
<el-col v-else-if="route_code=='kaiaomian'" :span="24" style="padding-left: 80px;margin-bottom: 20px;margin-top: -5px;">
<span v-for="(item2) in wprOptions" :key="item2.wpr" style="margin-right: 10px;">
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange($index)"/>
</span>
</el-col>
</el-row>
<el-row>
<el-col :md="12" :sm="24">
@ -141,6 +148,7 @@ export default {
trigger: "blur",
},
},
route_code:"",
batchOrign:{},
wprOptions: [],
materialOptions: [],
@ -152,6 +160,9 @@ export default {
},
mounted() {
let that = this;
let paths = that.$route.path;
let arr = paths.split("/");
that.route_code = arr[2];
that.form.type = that.type;
that.form.handle_date = that.form.send_date = that.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.form.recive_mgroup = that.mgroupId;
@ -162,6 +173,9 @@ export default {
getWpr(id){
let that = this;
that.$API.wpm.wpr.list.req({page:0,wm:id}).then((res) => {
res.forEach(item=>{
item.checked = false;
})
that.wprOptions = res;
});
},
@ -295,6 +309,21 @@ export default {
}
that.form.handoverb.splice(index,1);
},
handleChange(index){
let that = this;
that.form.handoverb[index].handoverbw = [];
let trueCount = this.wprOptions.filter(item => item.checked === true).length;
that.form.handoverb[index].count =trueCount;
this.wprOptions.forEach(item=>{
if(item.checked){
let obj = {};
obj.number = item.number;
obj.wpr = item.id;
item.disabled = true;
that.form.handoverb[index].handoverbw.push(obj);
}
})
},
//
submit() {
let that = this;

View File

@ -93,7 +93,7 @@
min-width="150"
>
<template #default="scope">
<span v-if="route_code=='pengma'" @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
<span v-if="route_code=='pengma'||route_code=='kaiaomian'" @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
<span v-else>{{scope.row.batch}}</span>
</template>
</el-table-column>