fix:混批加料表单

This commit is contained in:
shijing 2025-12-18 09:10:31 +08:00
parent b1e46f1bf3
commit ae2e7172b6
1 changed files with 15 additions and 7 deletions

View File

@ -198,12 +198,12 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="mtype==30||type==50">
<el-col :md="12" :sm="24" v-if="(mtype==30||type==50)&&new_wm==''">
<el-form-item label="更改批次">
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="type==50">
<el-col :md="12" :sm="24" v-if="type==50&&new_wm==''">
<el-form-item label="更改物料">
<xtSelect
:apiObj="apiObj"
@ -223,7 +223,7 @@
<el-input v-model="form.note" placeholder="处理备注"></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="change_batch">
<el-col :md="12" :sm="24" v-if="change_batch&&new_wm==''">
<el-form-item label="新批次号" prop="new_batch">
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
<span style="color: red;">请手动录入新批次号不要用已有批次</span>
@ -266,6 +266,10 @@ export default {
type: Object,
default: () => ({}),
},
new_wm:{
type: String,
default: "",
},
},
components: {
scanDialog
@ -385,7 +389,7 @@ export default {
let that = this;
that.form.type = that.type;
if(that.type==50){
that.form.mtype=30;
that.mtype=30;
that.change_batch = true;
}
let arr = that.$route.path.split("/");
@ -394,6 +398,10 @@ export default {
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
if(that.new_wm!==''){
that.mtype==30;
that.form.new_wm = that.new_wm;
}
if(that.wmItem.wm){
that.form.new_batch = that.wmItem.batch;
that.form.material_changed = that.wmItem.material;
@ -615,7 +623,9 @@ export default {
open(mode = "add",data,mtype) {
let that = this;
that.mode = mode;
that.mtype = mtype;
if(mtype!==undefined&&mtype!==null){
that.mtype = mtype;
}
that.checkedStatus=[];
that.selectItems=[];
if(mtype==30){
@ -631,9 +641,7 @@ export default {
that.totalCount += Number(item.count);
that.getWprList(item.wm,index);
})
console.log('that.isFeiPinku',that.isFeiPinku);
if(that.isFeiPinku){
console.log('data[0].material',data[0].material);
that.form.new_batch = data[0].batch;
that.form.material_changed = data[0].material;
that.form.material_changed_fname = data[0].material_name;