fix:交接表单标题,改版默认更改批次号,原批次号+g

This commit is contained in:
shijing 2025-09-24 13:05:18 +08:00
parent 5166ee2b68
commit 8922fb610d
1 changed files with 18 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template>
<el-dialog
:title="titleMap[mode]"
:title="titleMap[mode+type]"
v-model="visible"
width="1000px"
:size="1000"
@ -191,7 +191,7 @@
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="更改批次">
<el-switch v-model="change_batch"></el-switch>
<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">
@ -255,8 +255,14 @@ export default {
loading: false,
mode: "add",
titleMap: {
add: "新增交接记录",
edit: "编辑交接记录",
add10: "新增交接记录",
add20: "新增返工记录",
add40: "新增废品入库",
add50: "新增改版记录",
edit10: "编辑交接记录",
edit20: "编辑返工记录",
edit40: "编辑废品入库",
edit50: "编辑改版记录",
show: "查看交接记录",
},
lists:[],//
@ -354,6 +360,9 @@ export default {
mounted() {
let that = this;
that.form.type = that.type;
if(that.type==50){
that.change_batch = true;
}
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
@ -384,8 +393,6 @@ export default {
}
}else if(that.type==40){//
that.getMaterialNotok();
}else if(that.type==60){
}
that.getMgroupOptions();
},
@ -579,7 +586,7 @@ export default {
},
clearSelect(){
let that = this;
that.totalCount = 0;
that.totalCount = 0;
that.form.handoverb = [];
},
materialChange() {
@ -589,6 +596,7 @@ export default {
data = that.materialOptions.filter((item) => {
return that.selectItems.indexOf(item.id)>-1;
});
that.form.new_batch = data[0].batch+'g';
let materialId = data[0].material;
if(that.type==50){}else{
let params = {
@ -765,6 +773,7 @@ export default {
let hasArr = [];
that.materialOptions.forEach((item) => {
if(item.batch == res.batch){
that.form.new_batch = res.batch+'g';
hasArr.push(item);
let params = {material: item.material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
@ -818,6 +827,7 @@ export default {
if(arr2.length>0){
that.$message.error("该批次已存在")
}else{
that.form.new_batch = arr[0].batch+'g';
let params = {material: arr[0].material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
that.mgroupOptions = res0;
@ -872,6 +882,7 @@ export default {
}else{//handoverb
that.materialOptions.forEach((item) => {
if(item.id == res[0].wm){
that.form.new_batch = item.batch+'g';
let params = {material: item.material,type: that.type};
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
that.mgroupOptions = res1;