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