Commit 5f9fdd5b authored by 康振飞's avatar 康振飞

工艺克隆

parent efd4f629
......@@ -132,7 +132,7 @@ export default {
padding-left: 10px;
}
.tree {
height: calc(100vh - 200px);
height: calc(100vh - 215px);
overflow: auto;
}
}
......
......@@ -202,6 +202,7 @@ export default {
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
console.log(this.title)
console.log(this.eid)
if (this.eid > 0) {
this.load(this.eid);
}
......@@ -216,8 +217,29 @@ export default {
} else {
this.entity.fileId = "";
}
Api.create(this.entity)
.then(r => {
if(this.title=='克隆'){
var parmese = {
"headerId": this.eid,
"code": this.entity.code
}
debugger
Api.cloneheader(parmese).then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("克隆成功");
this.$emit("on-ok");
} else {
this.$Message.error("克隆失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("克隆失败");
console.warn(err);
});
// this.cloneData(parmese)
}else{
Api.create(this.entity).then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
......@@ -231,9 +253,18 @@ export default {
this.$Message.error("保存失败");
console.warn(err);
});
}
}
});
},
// 克隆工艺
cloneData(parmese){
console.warn(parmese)
Api.cloneheader(parmese).then(r => {
// this.disabled = false;
console.log(r)
})
},
handleClose() {
this.$emit("on-close");
},
......@@ -259,7 +290,7 @@ export default {
}
},
load(v) {
Api.get({ id: v }).then(r => { //Number parseInt
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.entity.isEffect = parseInt(r.result.isEffect);
this.entity.id = 0;
......@@ -275,6 +306,7 @@ export default {
this.entity = this.$u.clone(this.v);
},
eid(v) {
// console.log("id:",v)
if (v != 0) {
this.load(v);
}
......
......@@ -10,6 +10,9 @@ export default {
create(params){
return Api.post(`${technologyUrl}routingheader/create`,params);
},
cloneheader(params){
return Api.post(`${technologyUrl}routingheader/cloneheader`,params);
},
update(params){
return Api.post(`${technologyUrl}routingheader/update`,params);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment