fix:只有合批才展示更改批次

This commit is contained in:
shijing 2025-09-09 14:57:47 +08:00
parent c85bac30e4
commit b20337454c
1 changed files with 21 additions and 16 deletions

View File

@ -161,7 +161,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="type==10"> <el-col :md="12" :sm="24" v-if="type==10&&mtype==30">
<el-form-item label="更改批次"> <el-form-item label="更改批次">
<el-switch v-model="change_batch"></el-switch> <el-switch v-model="change_batch"></el-switch>
</el-form-item> </el-form-item>
@ -171,7 +171,7 @@
<el-input v-model="form.note" placeholder="处理备注"></el-input> <el-input v-model="form.note" placeholder="处理备注"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="type==10&&change_batch"> <el-col :md="12" :sm="24" v-if="change_batch">
<el-form-item label="新批次号" prop="new_batch"> <el-form-item label="新批次号" prop="new_batch">
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input> <el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
</el-form-item> </el-form-item>
@ -327,6 +327,7 @@ export default {
fileList:[], fileList:[],
userList: [], userList: [],
userList2: [], userList2: [],
handoverbIds:[],
mgroupOptions: [], mgroupOptions: [],
materialOptions: [], materialOptions: [],
addShow: false, addShow: false,
@ -519,11 +520,14 @@ export default {
this.visible = true; this.visible = true;
return this; return this;
}, },
//handoverb
materialChange0(){ materialChange0(){
let that = this; let that = this;
that.form.handoverb = []; // that.form.handoverb = [];
// that.handoverbIds = [];
that.totalCount = 0; that.totalCount = 0;
that.selectObjs.forEach(item=>{ that.selectObjs.forEach(item=>{
if(that.handoverbIds.indexOf(item.id)==-1){
let obj = {}; let obj = {};
obj.wm = item.id; obj.wm = item.id;
obj.state = item.state; obj.state = item.state;
@ -537,6 +541,7 @@ export default {
that.totalCount += Number(obj.count); that.totalCount += Number(obj.count);
that.form.handoverb.push(obj); that.form.handoverb.push(obj);
that.getResaveMgroups(obj.material); that.getResaveMgroups(obj.material);
}
}) })
}, },
countChange(){ countChange(){