Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
29ac018af3
|
|
@ -799,8 +799,19 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
formTableSave(row) {
|
async formTableSave(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if (row.id && row.wpr && row._numberBeforeEdit !== undefined && row._numberBeforeEdit !== row.number) {
|
||||||
|
try {
|
||||||
|
await that.$confirm(
|
||||||
|
`物料编号将从“${row._numberBeforeEdit}”改为“${row.number}”,并同步修改关联的 WPR 及相关明细,是否继续?`,
|
||||||
|
"修改物料编号",
|
||||||
|
{ type: "warning" }
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = row.number;
|
obj.number = row.number;
|
||||||
obj.mlogb = row.mlogb;
|
obj.mlogb = row.mlogb;
|
||||||
|
|
@ -879,6 +890,9 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mlogbwlist.forEach((item, index) => {
|
that.mlogbwlist.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.id == row.id) {
|
||||||
|
if (item._numberBeforeEdit !== undefined) {
|
||||||
|
that.mlogbwlist[index].number = item._numberBeforeEdit;
|
||||||
|
}
|
||||||
that.mlogbwlist[index].isEdit = false;
|
that.mlogbwlist[index].isEdit = false;
|
||||||
if(that.mode == 'ins'&&that.route_code=='niuzhuan'&&(row.equip==''||row.equip==null)){
|
if(that.mode == 'ins'&&that.route_code=='niuzhuan'&&(row.equip==''||row.equip==null)){
|
||||||
that.mlogbwlist[index].work_start_time = null;
|
that.mlogbwlist[index].work_start_time = null;
|
||||||
|
|
@ -891,6 +905,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mlogbwlist.forEach((item, index) => {
|
that.mlogbwlist.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.id == row.id) {
|
||||||
|
that.mlogbwlist[index]._numberBeforeEdit = that.mlogbwlist[index].number;
|
||||||
that.mlogbwlist[index].isEdit = true;
|
that.mlogbwlist[index].isEdit = true;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){
|
if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){
|
||||||
|
|
|
||||||
|
|
@ -805,8 +805,19 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
formTableSave(row,index) {
|
async formTableSave(row,index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if (row.id && row.wpr && row._numberBeforeEdit !== undefined && row._numberBeforeEdit !== row.number) {
|
||||||
|
try {
|
||||||
|
await that.$confirm(
|
||||||
|
`物料编号将从“${row._numberBeforeEdit}”改为“${row.number}”,并同步修改关联的 WPR 及相关明细,是否继续?`,
|
||||||
|
"修改物料编号",
|
||||||
|
{ type: "warning" }
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
let editIndex = 0;
|
let editIndex = 0;
|
||||||
that.mlogbwlist.forEach((item,index) => {
|
that.mlogbwlist.forEach((item,index) => {
|
||||||
if(item.id==row.id){
|
if(item.id==row.id){
|
||||||
|
|
@ -867,13 +878,7 @@ export default {
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
that.$message.success("保存成功");
|
that.$message.success("保存成功");
|
||||||
that.mlogbwlist[editIndex].isEdit = false;
|
that.getList();
|
||||||
that.mlogbwlist[editIndex].equip_name = res.equip_name;
|
|
||||||
that.mlogbwlist[editIndex].equip_number = res.equip_number;
|
|
||||||
that.mlogbwlist[editIndex].tooling_name = res.tooling_name;
|
|
||||||
that.mlogbwlist[editIndex].tooling_number = res.tooling_number;
|
|
||||||
that.mlogbwlist[editIndex].work_start_time = res.work_start_time;
|
|
||||||
// that.getList();
|
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
|
@ -901,12 +906,16 @@ export default {
|
||||||
formTableCancel(row){
|
formTableCancel(row){
|
||||||
this.mlogbwlist.forEach((item, index) => {
|
this.mlogbwlist.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.id == row.id) {
|
||||||
|
if (item._numberBeforeEdit !== undefined) {
|
||||||
|
this.mlogbwlist[index].number = item._numberBeforeEdit;
|
||||||
|
}
|
||||||
this.mlogbwlist[index].isEdit = false;
|
this.mlogbwlist[index].isEdit = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formTableEdit(index) {
|
formTableEdit(index) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mlogbwlist[index]._numberBeforeEdit = that.mlogbwlist[index].number;
|
||||||
that.mlogbwlist[index].isEdit = true;
|
that.mlogbwlist[index].isEdit = true;
|
||||||
if(that.mgroupName=='喷码'){
|
if(that.mgroupName=='喷码'){
|
||||||
const wprTooling = that.mlogbwlist[index].wpr_pre_info?.tooling;
|
const wprTooling = that.mlogbwlist[index].wpr_pre_info?.tooling;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue