fix:交接表单调整

This commit is contained in:
shijing 2025-09-25 09:28:19 +08:00
parent a842a1a358
commit ff210937e9
1 changed files with 14 additions and 6 deletions

View File

@ -189,7 +189,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-col :md="12" :sm="24" v-if="mtype==30||type==50">
<el-form-item label="更改批次">
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
</el-form-item>
@ -216,7 +216,7 @@
</el-col>
<el-col :md="12" :sm="24" v-if="change_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="新批次号" :disabled="type==50"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -596,7 +596,9 @@ export default {
data = that.materialOptions.filter((item) => {
return that.selectItems.indexOf(item.id)>-1;
});
that.form.new_batch = data[0].batch+'g';
if(that.type==50){
that.form.new_batch = data[0].batch+'-G';
}
let materialId = data[0].material;
if(that.type==50){}else{
let params = {
@ -773,7 +775,9 @@ export default {
let hasArr = [];
that.materialOptions.forEach((item) => {
if(item.batch == res.batch){
that.form.new_batch = res.batch+'g';
if(that.type==50){
that.form.new_batch = data[0].batch+'-G';
}
hasArr.push(item);
let params = {material: item.material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
@ -827,7 +831,9 @@ export default {
if(arr2.length>0){
that.$message.error("该批次已存在")
}else{
that.form.new_batch = arr[0].batch+'g';
if(that.type==50){
that.form.new_batch = data[0].batch+'-G';
}
let params = {material: arr[0].material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
that.mgroupOptions = res0;
@ -882,7 +888,9 @@ export default {
}else{//handoverb
that.materialOptions.forEach((item) => {
if(item.id == res[0].wm){
that.form.new_batch = item.batch+'g';
if(that.type==50){
that.form.new_batch = data[0].batch+'-G';
}
let params = {material: item.material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
that.mgroupOptions = res1;