Commit 19d69f13 authored by renjintao's avatar renjintao

routinghcorder

parent 8a9f5109
...@@ -171,7 +171,8 @@ export default { ...@@ -171,7 +171,8 @@ export default {
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
wfstatu: 1
}; };
}, },
props: { props: {
...@@ -194,31 +195,31 @@ export default { ...@@ -194,31 +195,31 @@ export default {
Api.GetCodeByType(parma) Api.GetCodeByType(parma)
.then(res => { .then(res => {
this.entity.changeorderCode = res.result; this.entity.changeorderCode = res.result;
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.then(res1 => {
if (res1.success) {
let wfStatus = res1.result.status;
if (wfStatus == 0) {
this.submitShow = true;
this.wfstatu = 1;
// this.entity.approvalStatus = 4;
} else {
// this.entity.approvalStatus = 1;
this.submitShow = false;
this.wfstatu = 3;
}
}
})
.catch(err => {
this.$Message.error("操作失败");
console.warn(err);
});
}) })
.cathc(err => { .cathc(err => {
this.$Message.error("数据连接错误"); this.$Message.error("数据连接错误");
}); });
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.then(res1 => {
alret(JSON.stringify(res1))
if (res1.success) {
let wfStatus = res1.result.status;
if (wfStatus == 0) {
this.submitShow = true;
// this.entity.approvalStatus = 4;
} else {
// this.entity.approvalStatus = 1;
this.submitShow = false;
}
}
})
.catch(err => {
this.$Message.error("操作失败");
console.warn(err);
});
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
...@@ -226,25 +227,27 @@ export default { ...@@ -226,25 +227,27 @@ export default {
this.disabled = true; this.disabled = true;
this.entity.handlingOpinions = this.entity.handlingOpinionsId; this.entity.handlingOpinions = this.entity.handlingOpinionsId;
this.entity.routingHeaderId = this.headid; this.entity.routingHeaderId = this.headid;
this.entity.status = 1; this.entity.status = this.wfstatu;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
if (this.checked) { if (this.wfstatu == 1) {
let params = { if (this.checked) {
changeorder_code: this.entity.changeorderCode, let params = {
pageindex: 1, changeorder_code: this.entity.changeorderCode,
pageSize: 10 pageindex: 1,
}; pageSize: 10
Api.getpaged1(params).then(res => { };
this.$refs.changeSendReview.info.changeInfo = Api.getpaged1(params).then(res => {
res.result.items[0]; this.$refs.changeSendReview.info.changeInfo =
this.$refs.changeSendReview.changeorder_code = this.entity.changeorderCode; res.result.items[0];
}); this.$refs.changeSendReview.changeorder_code = this.entity.changeorderCode;
this.$refs.changeSendReview.modalInfo = true; });
this.$refs.changeSendReview.modalInfo = true;
}
} }
} else { } else {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
......
...@@ -135,7 +135,8 @@ export default { ...@@ -135,7 +135,8 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
wfstatu: 1
}; };
}, },
props: { props: {
...@@ -150,13 +151,34 @@ export default { ...@@ -150,13 +151,34 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.then(res1 => {
if (res1.success) {
let wfStatus = res1.result.status;
if (wfStatus == 0) {
this.submitShow = true;
this.wfstatu=1
// this.entity.approvalStatus = 4;
} else {
// this.entity.approvalStatus = 1;
this.submitShow = false;
this.wfstatu=3
}
}
})
.catch(err => {
this.$Message.error("操作失败");
console.warn(err);
});
}); });
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.status = 1;//修改后(未通过审核或新建的)的状态都为待送审 this.entity.status = this.wfstatu; //修改后(未通过审核或新建的)的状态都为待送审
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
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