Browse Source

添加撤回,审批人为空处理

huangguoce 3 tuần trước cách đây
mục cha
commit
0e013bba01

+ 7 - 0
src/api/human/enrollment/EnrollmentRegistrationService.js

@@ -260,6 +260,13 @@ export default {
 			responseType: "blob",
 		});
 	},
+	updateStatusByIdUserInfo(param) {
+		return request({
+			url: prefix + "/enrollmentRegistration/updateStatusByIdUserInfo",
+			method: "post",
+			data: param,
+		});
+	},
 	// 教育经历接口
 	saveEduInfo(data) {
 		return request({

+ 0 - 8
src/views/human/enrollment/registration/EnrollmentUserInfoAuditForm.vue

@@ -1155,7 +1155,6 @@ export default {
 		async agreeForm(callback) {
 			this.loading = true
 			enrollmentRegistrationService.findAuditInfoById(this.inputForm.id).then((data) => {
-				console.log("进来了");
 
 				if (data.status !== '2') { // 审核状态不是“审核中”,就弹出提示
 					this.loading = false
@@ -1286,14 +1285,8 @@ export default {
 			}
 		},
 		handleChange(value) {
-			console.log(value);
-			console.log(this.$refs.attachment);
 
 		},
-		// 教育经历处理
-		handleEduInfoChange(val) {
-			console.log(val);
-		},
 		// 教育经历
 		addEdu() {
 			this.$refs.EducationInfo.init("add", null, this.inputForm.userId)
@@ -1587,7 +1580,6 @@ export default {
 				let obj = this.$dictUtils.getDictList('sys_cert_profession_cost').find(item => {
 					return item.value == row.profession
 				})
-				console.log(obj);
 				if (obj) {
 					row.profession = obj.label
 				}

+ 47 - 4
src/views/sys/user/UserInfo.vue

@@ -94,7 +94,9 @@
 							<el-popover placement="left" :width="400" trigger="hover">
 								<template #reference>
 									<el-button style="margin-left: 10px;" v-if="auditStatus == 2"
-										type="primary">审批中</el-button> </template>
+										type="primary">审批中</el-button>
+								</template>
+
 								<!-- <el-table :data="flowData" ref="flowRef" style="width: 100%;"
 									highlight-current-row="true">
 									<el-table-column property="comment.status" label="节点" align="center" />
@@ -117,11 +119,14 @@
 								</el-result>
 							</el-popover>
 
+							<el-button style="margin-left: 10px;" v-if="auditStatus == 2" type="warning"
+								@click="handleRevoke">撤回</el-button>
+
 							<el-popover width="300" class="box-item" title="" :content="rejectMessage"
 								placement="top-start">
 								<template #reference>
 									<el-tag size="large" style="margin-left: 10px; max-width: 200px;font-size: 12px;"
-										v-if="auditStatus == 4" type="danger">
+										v-if="auditStatus == 4 && this.procInsId" type="danger">
 										<span>已驳回,原因:</span>
 										<span style="
         display: inline-block;
@@ -2062,7 +2067,8 @@ export default {
 			],
 			laborContractInfoList: [],
 			auditStatus: "0",
-			flowData: []
+			flowData: [],
+			procInsId: ""
 		};
 	},
 	created() {
@@ -2103,7 +2109,7 @@ export default {
 			this.loading = true
 			enrollmentRegistrationService.getUserInfoAudit({ userId: userId }).then(res => {
 				if (res) {
-
+					this.procInsId = res.procInsId
 					if (res.procInsId) {
 						taskService.historicTaskList(
 							res.procInsId
@@ -3152,6 +3158,43 @@ export default {
 				}
 			}
 		},
+		handleRevoke() {
+
+			this.$confirm('确定要撤回审批吗?', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				processService.revokeProcIns(this.procInsId).then(res => {
+					this.generalForm.idCardFront = this.$refs.idCardFront.getDataList()
+					this.generalForm.idCardBack = this.$refs.idCardBack.getDataList()
+					this.generalForm.email = this.concatForm.email
+					this.generalForm.eduInfoList = this.eduInfoList
+					this.generalForm.workInfoList = this.workInfoList
+					this.generalForm.certificateInfoList = this.certificateInfoList
+					this.generalForm.skillInfoList = this.skillInfoList
+					this.generalForm.rewardInfoList = this.rewardInfoList
+					this.generalForm.familyInfoList = this.familyInfoList
+					this.generalForm.trainingInfoList = this.trainingInfoList
+					this.generalForm.languageInfoList = this.languageInfoList
+					enrollmentRegistrationService.updateStatusByIdUserInfo(this.generalForm).then((data) => {
+						this.close()
+						this.$message.success(data.msg)
+						this.$refs.idCardBack.clearUpload()
+						this.$refs.idCardFront.clearUpload()
+						this.getDataInfo(this.userInfo.id)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+				})
+			}).catch(() => {
+				this.loading = false
+
+			});
+
+		}
 
 	},
 };