|
|
|
|
@ -225,14 +225,6 @@ export default { |
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.$refs.form.validate((valid, done, msg) => { |
|
|
|
|
// if (this.$refs.examineForm && this.$refs.examineForm.examineForm) {
|
|
|
|
|
// let flag = this.$refs.examineForm.examineForm.$assignee
|
|
|
|
|
// if(flag === "") {
|
|
|
|
|
// this.$message.error("请指定审批人!")
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
let form = this.deepClone(this.form); |
|
|
|
|
if (this.$refs.examineForm && this.$refs.examineForm.examineForm) { |
|
|
|
|
const { copyUser, assignee } = this.$refs.examineForm.examineForm; |
|
|
|
|
@ -245,13 +237,15 @@ export default { |
|
|
|
|
this.$message.error("请指定审批人!"); |
|
|
|
|
done(); |
|
|
|
|
this.loading = false; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 判断是不是数组
|
|
|
|
|
if (typeof form.uploadrecord == "string") { |
|
|
|
|
form.uploadrecord = form.uploadrecord.split(""); |
|
|
|
|
} |
|
|
|
|
startProcess(form) |
|
|
|
|
.then(() => { |
|
|
|
|
.then((res) => { |
|
|
|
|
console.log(res) |
|
|
|
|
// let item = 1;
|
|
|
|
|
// if (item === 1) {
|
|
|
|
|
// this.visible = true;
|
|
|
|
|
@ -321,8 +315,15 @@ export default { |
|
|
|
|
*/ |
|
|
|
|
handleCompleteTask(pass, variables) { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
const { comment, copyUser, assignee, attachment } = |
|
|
|
|
this.$refs.examineForm.examineForm; |
|
|
|
|
const { comment, copyUser, assignee, attachment } = this.$refs.examineForm.examineForm; |
|
|
|
|
// false隐藏 判断是否需要选择审批人
|
|
|
|
|
let flag = this.$refs.examineForm.flag |
|
|
|
|
if (flag && assignee === undefined) { |
|
|
|
|
this.$message.error("请指定审批人!"); |
|
|
|
|
reject(); |
|
|
|
|
this.submitLoading = false; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!pass && !comment) { |
|
|
|
|
this.$message.error("请填写批复意见"); |
|
|
|
|
this.submitLoading = false; |
|
|
|
|
|