1. 重复任务

main
赵培友 3 years ago
parent 73c9d59125
commit 3246a8a717
  1. 59
      src/views/plugin/workflow/mixins/ex-form.js

@ -245,22 +245,46 @@ export default {
} }
startProcess(form) startProcess(form)
.then((res) => { .then((res) => {
console.log(res) if (res.data.data === "类似任务已经发起过,是否要强制发起") {
// let item = 1; this.$confirm(res.data.data + "?", "提示", {
// if (item === 1) { confirmButtonText: "确定",
// this.visible = true; cancelButtonText: "取消",
// done(); type: "warning",
// this.loading = false; })
// } else { .then(() => {
// 强制发起重复任务
// } startProcess({ ...form, forcestart: true })
if (isExForm === true) { .then((res) => {
resolve(done); if (isExForm === true) {
resolve(done);
} else {
this.$message.success("发起成功");
this.handleCloseTag(
"/plugin/workflow/process/workorder"
);
done();
this.loading = false;
}
})
.catch(() => {
done();
this.loading = false;
});
})
.catch(() => {
done();
this.loading = false;
return;
});
} else { } else {
this.$message.success("发起成功"); if (isExForm === true) {
this.handleCloseTag("/plugin/workflow/process/workorder"); resolve(done);
done(); } else {
this.loading = false; this.$message.success("发起成功");
this.handleCloseTag("/plugin/workflow/process/workorder");
done();
this.loading = false;
}
} }
}) })
.catch(() => { .catch(() => {
@ -315,9 +339,10 @@ export default {
*/ */
handleCompleteTask(pass, variables) { handleCompleteTask(pass, variables) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const { comment, copyUser, assignee, attachment } = this.$refs.examineForm.examineForm; const { comment, copyUser, assignee, attachment } =
this.$refs.examineForm.examineForm;
// false隐藏 判断是否需要选择审批人 // false隐藏 判断是否需要选择审批人
let flag = this.$refs.examineForm.flag let flag = this.$refs.examineForm.flag;
if (flag && assignee === undefined) { if (flag && assignee === undefined) {
this.$message.error("请指定审批人!"); this.$message.error("请指定审批人!");
reject(); reject();

Loading…
Cancel
Save