Browse Source

入职调整

sangwenwei 7 months ago
parent
commit
f6203cce41
2 changed files with 63 additions and 60 deletions
  1. 14 14
      src/views/jy/humanResources/EntryDia.vue
  2. 49 46
      src/views/jy/humanResources/EntryList.vue

+ 14 - 14
src/views/jy/humanResources/EntryDia.vue

@@ -580,20 +580,20 @@
 						this.days=data.days
 						this.inputForm.files=data.files
 						console.log('s',this.inputForm)
-						if (this.status === 'taskFormDetail') {
-							method = 'view'
-						}
-						if (this.commonJS.isNotEmpty(data.procInsId)){
-							this.commonApi.getTaskNameByProcInsId(data.procInsId).then((da)=> {
-								if (this.commonJS.isNotEmpty(da)) {
-									if (da === '人事审核') {
-										method = 'edit'
-									}else {
-										method = 'view'
-									}
-								}
-							})
-						}
+						// if (this.status === 'taskFormDetail') {
+						// 	method = 'view'
+						// }
+						// if (this.commonJS.isNotEmpty(data.procInsId)){
+						// 	this.commonApi.getTaskNameByProcInsId(data.procInsId).then((da)=> {
+						// 		if (this.commonJS.isNotEmpty(da)) {
+						// 			if (da === '人事审核') {
+						// 				method = 'edit'
+						// 			}else {
+						// 				method = 'view'
+						// 			}
+						// 		}
+						// 	})
+						// }
 
 						console.log('me',method)
 						if (this.commonJS.isEmpty(this.inputForm.files)){

+ 49 - 46
src/views/jy/humanResources/EntryList.vue

@@ -163,7 +163,7 @@
 								<el-button v-if="scope.row.loginFlag === '0'"   size="small" text type="primary"  @click="updateLoginFlag1(scope.row)">激活</el-button>
 							</div>
 							<div v-else>
-								<el-button v-if="hasPermission('entry:edit')&&(scope.row.type === '0'||scope.row.type === '1'|| scope.row.type === '3')&&scope.row.createById === $store.state.user.id" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<el-button v-if="hasPermission('entry:edit')&&(scope.row.type === '5'||scope.row.type === '0'||scope.row.type === '1'|| scope.row.type === '3')&&scope.row.createById === $store.state.user.id" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
 								<el-button text type="primary" size="small" v-if="hasPermission('entry:del') && scope.row.type==='0' || scope.row.type==='1'|| scope.row.type==='3'&&scope.row.createById === $store.state.user.id" @click="del(scope.row.id)">删除</el-button>
 								<!--              当前申请人撤回-->
 								<el-button v-if="hasPermission('entry:edit') && scope.row.createById === $store.state.user.id && scope.row.type==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
@@ -295,55 +295,58 @@
 			},
 			// 新增
 			add () {
+				this.$refs.entryDia.init('add',false);
 				// 读取流程表单
-				let tabTitle = `发起流程【嘉溢-入职申请】`
-				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
-				taskService.getTaskDef({ procDefId: this.processDefinitionId,
-					status: 'startAndHold'}).then((data) => {
-					this.$router.push({
-						path: '/flowable/task/TaskForm',
-						query: {
-							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-							procDefId: this.processDefinitionId,
-							procDefKey: this.procDefKey,
-							status: 'startAndHold',
-							title: tabTitle,
-							formType: data.formType,
-							formUrl: data.formUrl,
-							formTitle: processTitle,
-							businessId: 'false',
-							isShow: false,
-							routePath: '/jy/humanResources/EntryList'
-						}
-					})
-				})
+				// let tabTitle = `发起流程【嘉溢-入职申请】`
+				// let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
+				// taskService.getTaskDef({ procDefId: this.processDefinitionId,
+				// 	status: 'startAndHold'}).then((data) => {
+				// 	this.$router.push({
+				// 		path: '/flowable/task/TaskForm',
+				// 		query: {
+				// 			...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+				// 			procDefId: this.processDefinitionId,
+				// 			procDefKey: this.procDefKey,
+				// 			status: 'startAndHold',
+				// 			title: tabTitle,
+				// 			formType: data.formType,
+				// 			formUrl: data.formUrl,
+				// 			formTitle: processTitle,
+				// 			businessId: 'false',
+				// 			isShow: false,
+				// 			routePath: '/jy/humanResources/EntryList'
+				// 		}
+				// 	})
+				// })
 			},
 			// 修改
 			edit (row) {
-				let tabTitle = `发起流程【嘉溢-入职申请】`
-				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
-				taskService.getTaskDef({ procDefId: this.processDefinitionId,
-					businessId: row.id,
-					businessTable: 'staff_user_info',
-					status: 'startAndHold'}).then((data) => {
-					this.$router.push({
-						path: '/flowable/task/TaskForm',
-						query: {
-							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-							procDefId: this.processDefinitionId,
-							procDefKey: this.procDefKey,
-							status: 'startAndHold',
-							title: tabTitle,
-							formType: data.formType,
-							formUrl: data.formUrl,
-							formTitle: processTitle,
-							businessId: row.id,
-							businessTable: 'staff_user_info',
-							isShow: false,
-							routePath: '/jy/humanResources/EntryList'
-						}
-					})
-				})
+				this.$refs.entryDia.init('edit',row.id);
+
+				// let tabTitle = `发起流程【嘉溢-入职申请】`
+				// let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-入职申请]`
+				// taskService.getTaskDef({ procDefId: this.processDefinitionId,
+				// 	businessId: row.id,
+				// 	businessTable: 'staff_user_info',
+				// 	status: 'startAndHold'}).then((data) => {
+				// 	this.$router.push({
+				// 		path: '/flowable/task/TaskForm',
+				// 		query: {
+				// 			...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+				// 			procDefId: this.processDefinitionId,
+				// 			procDefKey: this.procDefKey,
+				// 			status: 'startAndHold',
+				// 			title: tabTitle,
+				// 			formType: data.formType,
+				// 			formUrl: data.formUrl,
+				// 			formTitle: processTitle,
+				// 			businessId: row.id,
+				// 			businessTable: 'staff_user_info',
+				// 			isShow: false,
+				// 			routePath: '/jy/humanResources/EntryList'
+				// 		}
+				// 	})
+				// })
 			},
 			// 查看
 			view (row) {