Commit 19d69f13 authored by renjintao's avatar renjintao

routinghcorder

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