diff --git a/src/components/scUpload/multiple.vue b/src/components/scUpload/multiple.vue index 6867e257..0c113a98 100644 --- a/src/components/scUpload/multiple.vue +++ b/src/components/scUpload/multiple.vue @@ -1,22 +1,22 @@ - + - + + + - + @@ -143,6 +150,7 @@ { - this.$API.rpm.member.create - .req(this.formworker) - .then((res) => { - this.$message.success("项目成员添加成功"); - this.workerVisible = false; - this.btnloading = false; - this.getMemberList(); - }) - .catch((err) => { - this.btnloading = false; - return err; + let that = this; + that.btnloading = true; + that.formworker.rpj = that.form.id; + if(that.workDialogType=="add"){ + that.$refs.workerForm.validate(async (valid) => { + that.$API.rpm.member.create + .req(that.formworker) + .then((res) => { + that.$message.success("项目成员添加成功"); + that.workerVisible = false; + that.btnloading = false; + that.getMemberList(); + }) + .catch((err) => { + this.btnloading = false; + return err; + }); }); - }); + }else{ + let formworker = {}; + formworker.is_manager = that.formworker.is_manager; + formworker.rcertificates = that.formworker.rcertificates; + that.$API.rpm.member.update + .req(that.formworker.id,formworker) + .then((res) => { + that.$message.success("项目成员证书添加成功"); + that.workerVisible = false; + that.btnloading = false; + that.getMemberList(); + }) + .catch((err) => { + that.btnloading = false; + return err; + }); + } + }, leaveDialog(row){ - debugger; + // debugger; this.leaveVisible = true; this.leaveId=row.id; console.log(this.leaveId) }, preLeave(){ - debugger; + // debugger; this.btnloading = true; if(this.reason!=''){ this.$API.rpm.member.leave.req(this.leaveId,{reason:this.reason}).then(res=>{