|
@@ -155,6 +155,7 @@ export default {
|
|
|
treeCopyList: [],
|
|
|
demand: "",
|
|
|
nextDealManList: "",
|
|
|
+ isLastManStatus: false,
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -187,58 +188,126 @@ export default {
|
|
|
this.demand = res.data;
|
|
|
});
|
|
|
},
|
|
|
- submitWork() {
|
|
|
- //生成需求决策编号
|
|
|
- if (this.clicknextName === "起草人发送") {
|
|
|
- this.getDemand();
|
|
|
+ async getLastManList(e) {
|
|
|
+ let _this = this;
|
|
|
+ let obj = {
|
|
|
+ url: _this.$url.formList.getComplateLastMan, //开始工作流接口
|
|
|
+ data: e,
|
|
|
+ // status: "form",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ let res = await this.common.httpPost(obj, success);
|
|
|
+ function success(data) {
|
|
|
+ console.log(data);
|
|
|
}
|
|
|
- if (!this.list.taskId) {
|
|
|
- this.$message.error("请先保存表单后处理");
|
|
|
- return false;
|
|
|
+ },
|
|
|
+ async nextWorks(lists, list) {
|
|
|
+ let _this = this;
|
|
|
+ let obj = {
|
|
|
+ url: _this.$url.formList.nextWork, //下一步工作流接口
|
|
|
+ data: lists,
|
|
|
+ status: "form",
|
|
|
+ };
|
|
|
+ await this.common.httpPost(obj, success);
|
|
|
+ function success(data) {
|
|
|
+ console.log(_this.nodes);
|
|
|
+ let updateList = {
|
|
|
+ taskId: data.taskid,
|
|
|
+ id: _this.list.id,
|
|
|
+ resourceId: _this.nodes.currentShape[0].resourceId,
|
|
|
+ };
|
|
|
+ list.taskid = data.taskid
|
|
|
+ _this.setUpdate(updateList);
|
|
|
+ _this.getLastManList(list);
|
|
|
+
|
|
|
}
|
|
|
- if (this.TransferStatus === true) {
|
|
|
- if (this.backThree.length > 0) {
|
|
|
- this.nextWork();
|
|
|
- } else {
|
|
|
- this.$message.error("请选择候选人");
|
|
|
- return false;
|
|
|
- }
|
|
|
- } else {
|
|
|
+ },
|
|
|
+ submitWork() {
|
|
|
+ //多人会签处理环节
|
|
|
+ if (this.manyPeopleStatus == true) {
|
|
|
let list = {
|
|
|
userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
|
|
|
+ taskid: this.list.taskId, //表单标识
|
|
|
+ procinstid: this.list.processId,
|
|
|
+ taskName: this.clicknextName, //流程节点
|
|
|
+ userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
|
|
|
+ content: this.textarea, //意见内容
|
|
|
+ };
|
|
|
+ let lists = {
|
|
|
+ userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
|
|
|
taskId: this.list.taskId, //表单标识
|
|
|
taskName: this.clicknextName, //流程节点
|
|
|
userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
|
|
|
content: this.textarea, //意见内容
|
|
|
- // resolution: this.nodes.currentShape[0].condition.resolution, //流程图线节点
|
|
|
- // nextDealMan: this.backThree[0].loginNoStr || '', //下一步处理人
|
|
|
};
|
|
|
- if (this.treeCopyList.length) {
|
|
|
- //抄送
|
|
|
- list.copyman = this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ if (this.manyPeopleStatus == true) {
|
|
|
+ list.lastmanList = this.nextDealManList;
|
|
|
}
|
|
|
if (this.nodes.currentShape) {
|
|
|
- list.resolution = this.nodes.currentShape[0].condition.resolution;
|
|
|
- list.approve = this.nodes.currentShape[0].condition.approve;
|
|
|
+ lists.resolution = this.nodes.currentShape[0].condition.resolution;
|
|
|
+ lists.approve = this.nodes.currentShape[0].condition.approve;
|
|
|
+ }
|
|
|
+ if (this.backThree.length > 0) {
|
|
|
+ lists.nextDealMan = "admin";
|
|
|
}
|
|
|
- if (this.clicknextName === "") {
|
|
|
- this.$message.error("请选择流程节点");
|
|
|
+ this.nextWorks(lists, list);
|
|
|
+ } else {
|
|
|
+ //生成需求决策编号
|
|
|
+ if (this.clicknextName === "起草人发送") {
|
|
|
+ this.getDemand();
|
|
|
+ }
|
|
|
+ if (!this.list.taskId) {
|
|
|
+ this.$message.error("请先保存表单后处理");
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.backThree.length > 0) {
|
|
|
- if (this.manyPeopleStatus == true) {
|
|
|
- list.nextDealManList = this.nextDealManList;
|
|
|
+ if (this.TransferStatus === true) {
|
|
|
+ if (this.backThree.length > 0) {
|
|
|
+ this.nextWork();
|
|
|
} else {
|
|
|
- list.nextDealMan = this.backThree[0].loginNoStr;
|
|
|
+ this.$message.error("请选择候选人");
|
|
|
+ return false;
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.clicknextName === "流程结束") {
|
|
|
- } else {
|
|
|
- this.$message.error("请选择候选人");
|
|
|
+ let list = {
|
|
|
+ userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
|
|
|
+ taskId: this.list.taskId, //表单标识
|
|
|
+ taskName: this.clicknextName, //流程节点
|
|
|
+ userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
|
|
|
+ content: this.textarea, //意见内容
|
|
|
+ // resolution: this.nodes.currentShape[0].condition.resolution, //流程图线节点
|
|
|
+ // nextDealMan: this.backThree[0].loginNoStr || '', //下一步处理人
|
|
|
+ };
|
|
|
+ if (this.treeCopyList.length) {
|
|
|
+ //抄送
|
|
|
+ list.copyman = this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ }
|
|
|
+ if (this.nodes.currentShape) {
|
|
|
+ list.resolution = this.nodes.currentShape[0].condition.resolution;
|
|
|
+ list.approve = this.nodes.currentShape[0].condition.approve;
|
|
|
+ }
|
|
|
+ if (this.clicknextName === "") {
|
|
|
+ this.$message.error("请选择流程节点");
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.backThree.length > 0) {
|
|
|
+ if (this.manyPeopleStatus == true) {
|
|
|
+ list.nextDealManList = this.nextDealManList;
|
|
|
+ } else {
|
|
|
+ list.nextDealMan = this.backThree[0].loginNoStr;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.clicknextName === "流程结束") {
|
|
|
+ } else {
|
|
|
+ ror("请选择候选人");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.$message.er;
|
|
|
+ }
|
|
|
+ this.nextWork(list);
|
|
|
}
|
|
|
- this.nextWork(list);
|
|
|
}
|
|
|
},
|
|
|
async nextWork(list) {
|
|
@@ -319,6 +388,28 @@ export default {
|
|
|
// }
|
|
|
});
|
|
|
},
|
|
|
+ async getqueryMultiTaskId() {
|
|
|
+ let list = {
|
|
|
+ procinstid: this.list.processId,
|
|
|
+ userId: JSON.parse(window.sessionStorage.userInfo).loginNo,
|
|
|
+ // procinstid:this.fromList.processId
|
|
|
+
|
|
|
+ // taskId:e.taskId
|
|
|
+ };
|
|
|
+ let _this = this;
|
|
|
+ let obj = {
|
|
|
+ url: this.$url.formList.getQueryMultiTaskId, //流程追踪接口
|
|
|
+ data: list,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ };
|
|
|
+ let res = await this.common.httpPost(obj, success);
|
|
|
+ function success(data) {
|
|
|
+ console.log(data);
|
|
|
+ _this.list.taskId = data.taskid;
|
|
|
+ }
|
|
|
+ },
|
|
|
//查询路径接口
|
|
|
getNextPath(e, status) {
|
|
|
let list = {
|
|
@@ -344,13 +435,14 @@ export default {
|
|
|
if (status === 1) {
|
|
|
//第一次进入取路径
|
|
|
this.initialList = res.data.body;
|
|
|
- // if (res.data.body.nextShapes[0].multi !== null) {
|
|
|
- // if (res.data.body.nextShapes[0].multi.multi === "true") {
|
|
|
- // this.manyPeopleStatus = true; //转派按钮生效
|
|
|
- // } else {
|
|
|
- // this.manyPeopleStatus = false;
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (res.data.body.nextShapes[0].multi !== null) {
|
|
|
+ if (res.data.body.nextShapes[0].multi.multi === "true") {
|
|
|
+ this.getqueryMultiTaskId();
|
|
|
+ // this.isLastManStatus = true;
|
|
|
+ } else {
|
|
|
+ // this.isLastManStatus = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (res.data.body.nextShapes[0].loop !== null) {
|
|
|
if (res.data.body.nextShapes[0].loop.loop === "true") {
|
|
|
this.transferStatus = true; //转派按钮生效
|