Browse Source

人力资源模块代码提交

wangqiang 1 năm trước cách đây
mục cha
commit
4d6efbcea5
40 tập tin đã thay đổi với 10437 bổ sung11 xóa
  1. 2 0
      src/api/AppPath.js
  2. 47 0
      src/api/human/depart/DepartRegistrationService.js
  3. 146 0
      src/api/human/enrollment/EnrollmentRegistrationService.js
  4. 47 0
      src/api/human/register/RegisterService.js
  5. 40 0
      src/api/human/register/ReimburseRegisterService.js
  6. 40 0
      src/api/human/register/ReimburseSubmitAccountService.js
  7. 54 0
      src/api/human/register/WorkLogService.js
  8. 8 0
      src/api/sys/areaService.js
  9. 21 1
      src/utils/common.js
  10. 26 6
      src/views/dashboard/widgets/components/MyNoticePageList.vue
  11. 12 2
      src/views/flowable/task/NoticePageList.vue
  12. 15 1
      src/views/flowable/task/TaskForm.vue
  13. 11 1
      src/views/home/components/MyNoticePageList2.vue
  14. 324 0
      src/views/human/depart/handover/HandoverAddForm.vue
  15. 338 0
      src/views/human/depart/registration/DepartRegistrationAddForm.vue
  16. 246 0
      src/views/human/depart/registration/DepartRegistrationEditForm.vue
  17. 401 0
      src/views/human/depart/registration/DepartRegistrationList.vue
  18. 755 0
      src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue
  19. 284 0
      src/views/human/enrollment/registration/EnrollmentRegistrationList.vue
  20. 219 0
      src/views/human/enrollment/registration/KeyCardForm.vue
  21. 63 0
      src/views/human/enrollment/registration/KeyCardPopup.vue
  22. 243 0
      src/views/human/enrollment/registration/RiceCardForm.vue
  23. 464 0
      src/views/human/enrollment/registration/SocialSecurityInfoAddForm.vue
  24. 721 0
      src/views/human/enrollment/registration/WageCardInfoAddForm.vue
  25. 136 0
      src/views/human/practice/logwrite/LocationPullForm.vue
  26. 447 0
      src/views/human/practice/logwrite/LogWriteAddForm.vue
  27. 315 0
      src/views/human/practice/logwrite/LogWriteEditForm.vue
  28. 408 0
      src/views/human/practice/logwrite/LogWriteList.vue
  29. 159 0
      src/views/human/practice/register/RegisterPopup.vue
  30. 545 0
      src/views/human/practice/register/RegistrationAddForm.vue
  31. 561 0
      src/views/human/practice/register/RegistrationEditForm.vue
  32. 289 0
      src/views/human/practice/register/RegistrationList.vue
  33. 182 0
      src/views/human/practice/reimburseRegister/ProgramPageForm.vue
  34. 457 0
      src/views/human/practice/reimburseRegister/ReimburseRegisterAddForm.vue
  35. 276 0
      src/views/human/practice/reimburseRegister/ReimburseRegisterChoose.vue
  36. 364 0
      src/views/human/practice/reimburseRegister/ReimburseRegisterEditForm.vue
  37. 405 0
      src/views/human/practice/reimburseRegister/ReimburseRegisterList.vue
  38. 532 0
      src/views/human/practice/reimburseRegister/ReimburseSubmitAccountAddForm.vue
  39. 430 0
      src/views/human/practice/reimburseRegister/ReimburseSubmitAccountEditForm.vue
  40. 404 0
      src/views/human/practice/reimburseRegister/ReimburseSubmitAccountList.vue

+ 2 - 0
src/api/AppPath.js

@@ -11,3 +11,5 @@ export const FINANCE_PATH = "/finance-server";
 export const PUBLIC_MODULES_PATH = "/public-modules-server";
 //中审
 export const CENTRECAREFUL_PATH = "/centrecareful-server";
+//人力资源
+export const REGISTER_PATH = "/human-server";

+ 47 - 0
src/api/human/depart/DepartRegistrationService.js

@@ -0,0 +1,47 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/departRegistration/list',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/departRegistration/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/departRegistration/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/departRegistration/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/departRegistration/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	selectComplete () {
+		return request({
+			url: prefix + '/departRegistration/selectComplete',
+			method: 'get',
+			params: {}
+		})
+	},
+}

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

@@ -0,0 +1,146 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/enrollmentRegistration/list',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	saveWageCard (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/saveWageCard`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	saveSocialCard (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/saveSocialCard`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	saveKeyCard (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/saveKeyCard`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	saveRiceCard (inputForm) {
+		return request({
+			url: prefix +  `/enrollmentRegistration/saveRiceCard`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	findWageCardById (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findWageCardById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	findSocialCardById (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findSocialCardById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	findKeyCardById (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findKeyCardById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	findRiceCardById (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findRiceCardById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/enrollmentRegistration/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	updateWageCardStatusById (param) {
+		return request({
+			url: prefix + '/enrollmentRegistration/updateWageCardStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	updateSocialCardStatusById (param) {
+		return request({
+			url: prefix + '/enrollmentRegistration/updateSocialCardStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	updateKeyCardStatusById (param) {
+		return request({
+			url: prefix + '/enrollmentRegistration/updateKeyCardStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	updateRiceCardStatusById (param) {
+		return request({
+			url: prefix + '/enrollmentRegistration/updateRiceCardStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/enrollmentRegistration/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	findIdCardOnly (idCard) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findIdCardOnly',
+			method: 'get',
+			params: {idCard: idCard}
+		})
+	},
+	findMobilePhoneOnly (mobilePhone) {
+		return request({
+			url: prefix + '/enrollmentRegistration/findMobilePhoneOnly',
+			method: 'get',
+			params: {mobilePhone: mobilePhone}
+		})
+	},
+	downloadFile () {
+		return request({
+			url: prefix + '/enrollmentRegistration/downloadFile',
+			method: 'get',
+			params: {},
+			responseType: 'blob'
+		})
+	}
+}

+ 47 - 0
src/api/human/register/RegisterService.js

@@ -0,0 +1,47 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/register/list',
+			method: 'get',
+			params: params
+		})
+	},
+	list2: function (params) {
+		return request({
+			url: prefix + '/register/list2',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/register/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/register/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/register/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/register/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+}

+ 40 - 0
src/api/human/register/ReimburseRegisterService.js

@@ -0,0 +1,40 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/reimburseRegister/list',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/reimburseRegister/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/reimburseRegister/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/reimburseRegister/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/reimburseRegister/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+}

+ 40 - 0
src/api/human/register/ReimburseSubmitAccountService.js

@@ -0,0 +1,40 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/reimburseSubmitAccount/list',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/reimburseSubmitAccount/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/reimburseSubmitAccount/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/reimburseSubmitAccount/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/reimburseSubmitAccount/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+}

+ 54 - 0
src/api/human/register/WorkLogService.js

@@ -0,0 +1,54 @@
+import request from "@/utils/httpRequest";
+import { REGISTER_PATH as prefix } from "../../AppPath";
+
+export default {
+	list: function (params) {
+		return request({
+			url: prefix + '/workLog/list',
+			method: 'get',
+			params: params
+		})
+	},
+	completeData: function (params) {
+		return request({
+			url: prefix + '/workLog/completeData',
+			method: 'get',
+			params: params
+		})
+	},
+	save (inputForm) {
+		return request({
+			url: prefix +  `/workLog/save`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+	findById (id) {
+		return request({
+			url: prefix + '/workLog/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusById (param) {
+		return request({
+			url: prefix + '/workLog/updateStatusById',
+			method: 'post',
+			data: param
+		})
+	},
+	remove (id) {
+		return request({
+			url: prefix + '/workLog/remove',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	getWorkDay (startTime,endTime) {
+		return request({
+			url: prefix + '/workLog/getWorkDay',
+			method: 'get',
+			params: {startTime:startTime,endTime:endTime}
+		})
+	}
+}

+ 8 - 0
src/api/sys/areaService.js

@@ -41,4 +41,12 @@ export default {
 			params: { extId: extId },
 		});
 	},
+
+	getAllArea: function (extId) {
+		return request({
+			url: prefix + "/sys/area/getAllArea",
+			method: "get",
+			params: { extId: extId },
+		});
+	},
 };

+ 21 - 1
src/utils/common.js

@@ -177,6 +177,26 @@ export default {
     } else {
       return true;
     }
-  }
+  },
+	/**
+	 * 判断一个文件的类型是否是图片
+	 * 目前用于给'el-upload'图片上传的':before-upload'属性使用,不是图片的话会上传失败并发出提示
+	 * @param file
+	 * @returns {boolean}
+	 */
+	isPic (file) {
+		let isJPG = true
+		if (this.isEmpty(file.type)) {
+			isJPG = false
+			Message.error('上传图片只能是 JPG/PNG/GIF/BMP 格式')
+			return isJPG
+		}
+		if (file.type !== 'image/jpeg' && file.type !== 'image/jpg' && file.type !== 'image/png' && file.type !== 'image/gif' && file.type !== 'image/bmp') {
+			isJPG = false
+			Message.error('上传图片只能是 JPG/PNG/GIF/BMP 格式')
+			return isJPG
+		}
+		return isJPG
+	}
 
 }

+ 26 - 6
src/views/dashboard/widgets/components/MyNoticePageList.vue

@@ -64,10 +64,14 @@
 		</vxe-pager>
 	</el-card>
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+	<RegisterPopup ref="registerPopup"></RegisterPopup>
+	<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
 </template>
 
 <script>
 	import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+	import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
+	import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
 // import notifyService from "@/api/notify/notifyService";
 import noticeService from '@/api/flowable/NoticeService'
 import taskService from "@/api/flowable/taskService";
@@ -82,15 +86,17 @@ export default {
 	},
 	components: {
 		WareHouseHistoryPopup,
+		RegisterPopup,
+		KeyCardPopup,
 	},
 	data() {
 		return {
 			dataList: [],
 			typeList: [],
-			searchForm: {
-				title: '',
-				taskName: ''
-			},
+			// searchForm: {
+			// 	title: '',
+			// 	taskName: ''
+			// },
 			tablePage: {
 				total: 0,
 				currentPage: 1,
@@ -121,6 +127,20 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
+			}else if (row.taskName === '实习日志超时提醒') {
+				this.$refs.registerPopup.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else if (row.taskName === '门卡领取提醒') {
+				this.$refs.keyCardPopup.init()
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
 			} else {
 				this.inputForm = {
 					taskId: '',
@@ -168,7 +188,7 @@ export default {
 				size: this.tablePage.pageSize,
 				orders: this.tablePage.orders,
 				isSelf: true,
-				...this.searchForm
+				// ...this.searchForm
 			}).then((data) => {
 				this.dataList = data.records
 				this.tablePage.total = data.total
@@ -182,7 +202,7 @@ export default {
 			this.refreshList();
 		},
 		resetSearch() {
-			this.$refs.searchForm.resetFields();
+			// this.$refs.searchForm.resetFields();
 			this.refreshList();
 		},
 		toPendingList () {

+ 12 - 2
src/views/flowable/task/NoticePageList.vue

@@ -65,11 +65,13 @@
         </div>
       </div>
     <WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+	  <RegisterPopup ref="registerPopup"></RegisterPopup>
   </div>
 </template>
 
 <script>
   import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+  import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
   import taskService from '@/api/flowable/taskService'
   import noticeService from '@/api/flowable/noticeService'
   import pick from 'lodash.pick'
@@ -104,7 +106,8 @@
       this.refreshList()
     },
     components: {
-      WareHouseHistoryPopup
+      WareHouseHistoryPopup,
+		RegisterPopup,
     },
     methods: {
       // 获取数据列表
@@ -140,7 +143,14 @@
           }
           noticeService.stockUpdate(this.inputForm)
           this.resetSearch()
-        } else {
+        }else if (row.taskName === '实习日志超时提醒') {
+			this.$refs.registerPopup.init(row.defId)
+			this.inputForm = {
+				id: row.id
+			}
+			noticeService.stockUpdate(this.inputForm)
+			this.resetSearch()
+		}else {
           this.inputForm = {
             taskId: '',
             noticeId: ''

+ 15 - 1
src/views/flowable/task/TaskForm.vue

@@ -690,6 +690,13 @@ export default {
 		// Process_1678692643340 会计-项目报告归档-苏州分部
 		// Process_1683767097901 物资管理-领用退回申请
 		// Process_1694762268070 报告-修改签字注师
+		// Process_1694652340089 实习登记
+		// Process_1694745513202 实习工作日志
+		// Process_1695090819012 实习报销登记
+		// Process_1695350752394 实习报销
+		// Process_1696643627713 工资卡信息完善
+		// Process_1696643401049 社保登记
+		// Process_1695781849405 员工入职
 
 		// 驳回
 		reject(vars) {
@@ -728,7 +735,14 @@ export default {
 				this.procDefId.includes('Process_1667894339167') ||
 				this.procDefId.includes('Process_1678692643340') ||
 				this.procDefId.includes('Process_1683767097901') ||
-				this.procDefId.includes('Process_1694762268070')
+				this.procDefId.includes('Process_1694762268070') ||
+				this.procDefId.includes('Process_1694652340089') ||
+				this.procDefId.includes('Process_1695090819012') ||
+				this.procDefId.includes('Process_1695350752394') ||
+				this.procDefId.includes('Process_1694745513202') ||
+				this.procDefId.includes('Process_1696643627713') ||
+				this.procDefId.includes('Process_1696643401049') ||
+				this.procDefId.includes('Process_1695781849405')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 11 - 1
src/views/home/components/MyNoticePageList2.vue

@@ -58,10 +58,12 @@
 		</div>
 	</el-card>
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+	<RegisterPopup ref="registerPopup"></RegisterPopup>
 </template>
 
 <script>
 	import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+	import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
 // import notifyService from "@/api/notify/notifyService";
 import noticeService from '@/api/flowable/NoticeService'
 import taskService from "@/api/flowable/taskService";
@@ -76,6 +78,7 @@ export default {
 	// },
 	components: {
 		WareHouseHistoryPopup,
+		RegisterPopup,
 	},
 	data() {
 		return {
@@ -123,7 +126,14 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
-			} else {
+			} else if (row.taskName === '实习日志超时提醒') {
+				this.$refs.registerPopup.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else {
 				this.inputForm = {
 					taskId: '',
 					noticeId: ''

+ 324 - 0
src/views/human/depart/handover/HandoverAddForm.vue

@@ -0,0 +1,324 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="(status === 'audit' || status === 'taskFormDetail')"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="所属部门" prop="department" :rules="[
+						{required: true, message:'请选择所属部门', trigger: 'blur'}
+					]">
+						<SelectTree
+							ref="officeTree"
+							:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+							:url="`/system-server/sys/office/treeData?type=2`"
+							:value="inputForm.department"
+							:accordion="true"
+							size="large"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="项目经理" prop="projectManager"
+								  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect1"
+											 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+											 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="底稿管理员" prop="draftAdministrator"
+								  :rules="[
+								  	{required: true, message: '底稿管理员不能为空', trigger: 'change'}
+                   ]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect2"
+											 :readonly="true" :limit='1' :modelValue="inputForm.draftAdministrator"
+											 @update:modelValue='(value, label) => {inputForm.draftAdministrator = value}'></UserSelectSignatory>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="备注" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					draftAdministrator: '',
+					remarks: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.commonApi = new CommonApi()
+		},
+		components: {
+			SelectTree,
+			UserSelectSignatory,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					draftAdministrator: '',
+					remarks: '',
+				}
+				if (method === 'add') {
+					this.title = `新建离职申请`
+				} else if (method === 'edit') {
+					this.title = '修改离职申请信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.name)){
+							this.inputForm.name = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.department)){
+							this.inputForm.department = this.$store.state.user.office.id
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						departRegistrationService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				departRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						departRegistrationService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职申请]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				departRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '办公室主任审批') {
+											this.inputForm.type = '5'
+										}
+									}
+									departRegistrationService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
+
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+								if (this.commonJS.isNotEmpty(data)) {
+									if (data === '部门主任审批') {
+										this.inputForm.type = '4'
+									}
+								}
+							})
+							departRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							departRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 338 - 0
src/views/human/depart/registration/DepartRegistrationAddForm.vue

@@ -0,0 +1,338 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="(status === 'audit' || status === 'taskFormDetail')"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="所属部门" prop="department" :rules="[
+						{required: true, message:'请选择所属部门', trigger: 'blur'}
+					]">
+						<SelectTree
+							ref="officeTree"
+							:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+							:url="`/system-server/sys/office/treeData?type=2`"
+							:value="inputForm.department"
+							:accordion="true"
+							size="large"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="项目经理" prop="projectManager"
+								  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect1"
+											 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+											 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="到岗日期" prop="arrivalDate" :rules="[{required: true, message: '到岗日期不能为空', trigger: 'change'}]">
+						<el-date-picker
+							style="width: 100%;"
+							v-model="inputForm.arrivalDate"
+							type="datetime"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							placeholder="选择到岗日期">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="预定离职日期" prop="departResignationDate" :rules="[{required: true, message: '预定离职日期不能为空', trigger: 'change'}]">
+						<el-date-picker
+							style="width: 100%;"
+							v-model="inputForm.departResignationDate"
+							type="datetime"
+							value-format="YYYY-MM-DD HH:mm:ss"
+							placeholder="选择预定离职日期">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="备注" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					arrivalDate: '',
+					departResignationDate: '',
+					remarks: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.commonApi = new CommonApi()
+		},
+		components: {
+			UserSelectSignatory,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					arrivalDate: '',
+					departResignationDate: '',
+					remarks: '',
+				}
+				if (method === 'add') {
+					this.title = `新建离职申请`
+				} else if (method === 'edit') {
+					this.title = '修改离职申请信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.name)){
+							this.inputForm.name = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.department)){
+							this.inputForm.department = this.$store.state.user.office.id
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						departRegistrationService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				departRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						departRegistrationService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职申请]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				departRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '办公室主任审批') {
+											this.inputForm.type = '5'
+										}
+									}
+									departRegistrationService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
+
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+								if (this.commonJS.isNotEmpty(data)) {
+									if (data === '部门主任审批') {
+										this.inputForm.type = '4'
+									}
+								}
+							})
+							departRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							departRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 246 - 0
src/views/human/depart/registration/DepartRegistrationEditForm.vue

@@ -0,0 +1,246 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-row>
+				<el-row>
+					<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="(status === 'audit' || status === 'taskFormDetail')"
+							 label-width="100px" @submit.native.prevent>
+
+						<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息</el-divider>
+						<el-row :gutter="26">
+							<el-col :span="12">
+								<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+									<el-input v-model="inputForm.name"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="所属部门" prop="department" :rules="[
+						{required: true, message:'请选择所属部门', trigger: 'blur'}
+					]">
+									<SelectTree
+										ref="officeTree"
+										:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+										:url="`/system-server/sys/office/treeData?type=2`"
+										:value="inputForm.department"
+										:accordion="true"
+										size="large"
+										@getValue="(value) => {inputForm.department=value}"/>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="项目经理" prop="projectManager"
+											  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+									<UserSelectSignatory style="width: 100%" ref="userSelect1"
+														 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+														 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="到岗日期" prop="arrivalDate" :rules="[{required: true, message: '到岗日期不能为空', trigger: 'change'}]">
+									<el-date-picker
+										style="width: 100%;"
+										v-model="inputForm.arrivalDate"
+										type="datetime"
+										value-format="YYYY-MM-DD HH:mm:ss"
+										placeholder="选择到岗日期">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="预定离职日期" prop="departResignationDate" :rules="[{required: true, message: '预定离职日期不能为空', trigger: 'change'}]">
+									<el-date-picker
+										style="width: 100%;"
+										v-model="inputForm.departResignationDate"
+										type="datetime"
+										value-format="YYYY-MM-DD HH:mm:ss"
+										placeholder="选择预定离职日期">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="备注" prop="remarks" :rules="[]">
+									<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+
+					</el-form>
+				</el-row>
+			</el-row>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					arrivalDate: '',
+					departResignationDate: '',
+					remarks: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.commonApi = new CommonApi()
+		},
+		components: {
+			UserSelectSignatory,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					department: '',
+					projectManager: '',
+					arrivalDate: '',
+					departResignationDate: '',
+					remarks: '',
+				}
+				if (method === 'add') {
+					this.title = `新建离职申请`
+				} else if (method === 'edit') {
+					this.title = '修改离职申请信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					departRegistrationService.findById(this.inputForm.id).then((data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.name)){
+							this.inputForm.name = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.department)){
+							this.inputForm.department = this.$store.state.user.office.id
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+
+						departRegistrationService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+		}
+	}
+</script>

+ 401 - 0
src/views/human/depart/registration/DepartRegistrationList.vue

@@ -0,0 +1,401 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目编号" prop="projectNumber">
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+        <template #buttons>
+          <el-button v-if="!haveComplete" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :print-config="{}"
+          :export-config="{
+                    remote: true,
+                    filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '入职登记信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="联系电话" field="mobilePhone"></vxe-column>
+		  <vxe-column min-width="160" align="center" title="所属部门" field="departmentName"></vxe-column>
+			<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+				<template #default="scope">
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("human_status", scope.row.type, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
+            <template  #default="scope">
+              <div v-if="isAdmin">
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+              </div>
+				<div v-else>
+					<el-button v-if="hasPermission('depart:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+					<el-button v-if="hasPermission('depart:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '2')" text type="primary"  @click="reback(scope.row)">撤回</el-button>
+					<el-button v-if="hasPermission('depart:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+					<!--              审核-->
+					<el-button v-if="scope.row.type==='2'&& checkIsAudit(scope.row)" text type="primary"  @click="examine(scope.row)">审核</el-button>
+					<!--              被驳回后当前申请人重新调整-->
+					<el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.type === '4'" text type="primary"  @click="adjust(scope.row)">驳回调整</el-button>
+					<el-button v-if="(scope.row.createById === $store.state.user.id) && haveComplete" text type="primary" @click="handover(scope.row)">离职交接</el-button>
+				</div>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+	  <DepartRegistrationEditForm ref="departRegistrationEditForm" @refreshList="refreshList"></DepartRegistrationEditForm>
+  </div>
+</template>
+
+<script>
+  import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
+  import processService from '@/api/flowable/ProcessService'
+  import userService from '@/api/sys/UserService'
+  import taskService from '@/api/flowable/TaskService'
+  import DepartRegistrationEditForm from "./DepartRegistrationEditForm";
+  import pick from "lodash.pick";
+  export default {
+    data () {
+      return {
+		  haveComplete: false,
+        num: 0,
+        searchForm: {
+          projectNumber: '',
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+		  handoverDefId: '',
+		  handoverDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    created () {
+    },
+    components: {
+		DepartRegistrationEditForm
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+		this.$nextTick(() => {
+			//将表格和工具栏进行关联
+			const $table = this.$refs.clientTable;
+			const $toolbar = this.$refs.toolbarRef;
+			$table.connect($toolbar);
+		})
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+		  this.$refs.departRegistrationEditForm.init('edit', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  departRegistrationService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('离职申请').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+		  processService.getByName('离职交接').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.handoverDefId = data.id
+				  this.handoverDefAuditKey = data.key
+			  }
+		  })
+		  departRegistrationService.selectComplete().then((data) => {
+				this.haveComplete = data
+		  })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+		  // 读取流程表单
+		  let tabTitle = `发起流程【离职申请】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职申请]`
+		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+			  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.processDefinitionAuditId,
+					  procDefKey: this.procDefKey,
+					  status: 'startAndHold',
+					  title: tabTitle,
+					  formType: data.formType,
+					  formUrl: data.formUrl,
+					  formTitle: processTitle,
+					  businessId: 'false',
+					  isShow: false,
+					  routePath: '/human/depart/registration/DepartRegistrationList'
+				  }
+			  })
+		  })
+      },
+		// 查看离职申请流程结果
+		detail (row) {
+			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionAuditId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '离职申请' + '流程详情',
+							formTitle: '离职申请' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return departRegistrationService.exportExcel(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            // console.log(err.response)
+          }
+        })
+      },
+		// 删除
+		del (id) {
+			let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+				return item.id
+			}).join(',')
+			this.$confirm(`确定删除所选项吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				departRegistrationService.remove(ids).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+		// 撤回
+		reback (row) {
+			this.$confirm(`确定撤回流程吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				processService.revokeProcIns(row.procInsId).then((data) => {
+					let param = {type: '3', id: row.id}
+					departRegistrationService.updateStatusById(param)
+					this.$message.success('回退成功')
+					this.refreshList()
+				})
+			})
+		},
+		// 审核
+		examine (row) {
+			departRegistrationService.findById(row.id).then((data) => {
+				if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todo(row)
+				}
+			})
+		},
+		// 审核或重新调整跳转
+		todo (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.taskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/human/depart/registration/DepartRegistrationList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+		// 驳回后调整
+		adjust (row) {
+			departRegistrationService.findById(row.id).then((data) => {
+				console.log('data', data)
+				if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todo(row)
+				}
+			})
+		},
+		// 查询当前登录人是否是数据的审核人
+		checkIsAudit (row) {
+			let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+			if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+				for (const userId of row.auditUserIds) {
+					if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+						return true
+					}
+				}
+			}
+			return false
+		},
+		handover (row) {
+			// 读取流程表单
+			let tabTitle = `发起流程【离职交接】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职交接]`
+			taskService.getTaskDef({ procDefId: this.handoverDefId,
+				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.handoverDefId,
+						procDefKey: this.handoverDefAuditKey,
+						status: 'startAndHold',
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessId: row.id,
+						isShow: false,
+						routePath: '/human/depart/registration/DepartRegistrationList'
+					}
+				})
+			})
+		},
+    }
+  }
+</script>

+ 755 - 0
src/views/human/enrollment/registration/EnrollmentRegistrationAddForm.vue

@@ -0,0 +1,755 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="性别" prop="sex"
+								  :rules="[
+								  	{required: true, message: '性别不能为空', trigger: 'change'}
+                 ]">
+						<el-radio-group v-model="inputForm.sex">
+							<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value" :key="item.value">{{item.label}}</el-radio>
+						</el-radio-group>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="年龄" prop="age" :rules="[{required: true, message: '年龄不能为空', trigger: 'change'}]">
+						<el-input v-model="inputForm.age" type="number"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出生日期" prop="birthday" :rules="[
+                  {required: true, message:'请填写出生日期', trigger: 'blur'}
+               ]">
+						<el-date-picker
+							style="width: 100%"
+							v-model="inputForm.birthday"
+							value-format="YYYY-MM-DD"
+							placeholder="选择日期"
+						>
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="政治面貌" prop="politicalOutlook" :rules="[]">
+						<el-input v-model="inputForm.politicalOutlook"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="籍贯" prop="nativePlace" :rules="[]">
+						<el-input v-model="inputForm.nativePlace"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="民族" prop="nation" :rules="[]">
+						<el-input v-model="inputForm.nation"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="婚姻状况" prop="maritalStatus" :rules="[]">
+						<el-input v-model="inputForm.maritalStatus"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="联系电话" prop="mobilePhone" :rules="[{required: true, message: '联系电话不能为空', trigger: 'change'}]">
+						<el-input v-model="inputForm.mobilePhone" @blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true,validator: validator.isCardId, trigger:'blur'}]">
+						<el-input v-model="inputForm.idCard" @blur="idCardOnly(inputForm.idCard)"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="家庭住址" prop="homeAddress" :rules="[]">
+						<el-input v-model="inputForm.homeAddress"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="常住住址" prop="permanentAddress" :rules="[]">
+						<el-input v-model="inputForm.permanentAddress"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="毕业院校" prop="graduatedFrom" :rules="[]">
+						<el-input v-model="inputForm.graduatedFrom"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="专业" prop="speciality" :rules="[]">
+						<el-input v-model="inputForm.speciality"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="开始时间" prop="startTime" :rules="[
+                  {required: true, message:'请填写开始时间', trigger: 'blur'}
+               ]">
+						<el-date-picker
+							style="width: 100%"
+							v-model="inputForm.startTime"
+							value-format="YYYY-MM-DD"
+							placeholder="选择日期"
+						>
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="毕业时间" prop="endTime" :rules="[
+                  {required: true, message:'请填写毕业时间', trigger: 'blur'}
+               ]">
+						<el-date-picker
+							style="width: 100%"
+							v-model="inputForm.endTime"
+							value-format="YYYY-MM-DD"
+							placeholder="选择日期"
+						>
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="学历" prop="education" :rules="[]">
+						<el-input v-model="inputForm.education"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="学历性质" prop="educationNature" :rules="[]">
+						<el-input v-model="inputForm.educationNature"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="是否毕业" prop="graduatedOrNot" :rules="[]">
+						<el-input v-model="inputForm.graduatedOrNot"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="英语等级" prop="englishLevel" :rules="[]">
+						<el-input v-model="inputForm.englishLevel"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="计算机等级" prop="ncre" :rules="[]">
+						<el-input v-model="inputForm.ncre"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="个人简介" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-form v-if="status === 'audit'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+						 label-width="110px" @submit.native.prevent>
+					<el-row :gutter="26">
+						<el-col :span="12">
+							<el-form-item label="所属部门" prop="department" :rules="[
+						{required: true, message:'请选择所属部门', trigger: 'blur'}
+					]">
+								<SelectTree
+									ref="officeTree"
+									:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+									:url="`/system-server/sys/office/treeData?type=2`"
+									:value="inputForm.department"
+									:accordion="true"
+									size="large"
+									@getValue="(value) => {inputForm.department=value}"/>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="进所日期" prop="entryDate" :rules="[
+                  {required: true, message:'请填写进所日期', trigger: 'blur'}
+               ]">
+								<el-date-picker
+									style="width: 100%"
+									v-model="inputForm.entryDate"
+									value-format="YYYY-MM-DD"
+									placeholder="选择日期"
+								>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同开始日期" prop="contractStartDate" :rules="[
+                  {required: true, message:'请填写合同开始日期', trigger: 'blur'}
+               ]">
+								<el-date-picker
+									style="width: 100%"
+									v-model="inputForm.contractStartDate"
+									value-format="YYYY-MM-DD"
+									placeholder="选择日期"
+								>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form>
+
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息(选填)</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="社保编号" prop="socialSecurityNumber" :rules="[]">
+						<el-input v-model="inputForm.socialSecurityNumber" maxlength="10"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保银行卡号" prop="socialSecurityBankNumber" :rules="[]">
+						<el-input v-model="inputForm.socialSecurityBankNumber" @change="checkBankNumber(inputForm.socialSecurityBankNumber)" maxlength="19"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保卡照片正面" prop="socialSecurityPictureFront" :rules="[]">
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess"
+								   v-model:file-list="fileList"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible">
+							<img w-full :src="inputForm.socialSecurityPictureFrontUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保卡照片反面" prop="socialSecurityPictureOpposite" :rules="[]">
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit2"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess2"
+								   v-model:file-list="fileList2"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview2(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload2(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove2(file,fileList2)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible2">
+							<img w-full :src="inputForm.socialSecurityPictureOppositeUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+	import OSSSerivce, {
+		httpRequest,
+		fileName,
+		toHref,
+	} from '@/api/sys/OSSService'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				hideUploadEdit: false, //隐藏上传按钮
+				hideUploadEdit2: false, //隐藏上传按钮
+				limitNum: 1,
+				fileList: [],
+				fileList2: [],
+				dialogImageUrl: '',
+				dialogVisible: false,
+				dialogVisible2: false,
+				disabled: false,
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				showViewer: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					sex: '',
+					age: '',
+					birthday: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					maritalStatus: '',
+					mobilePhone: '',
+					idCard: '',
+					homeAddress: '',
+					permanentAddress: '',
+					graduatedFrom: '',
+					speciality: '',
+					startTime: '',
+					endTime: '',
+					education: '',
+					educationNature: '',
+					graduatedOrNot: '',
+					englishLevel: '',
+					ncre: '',
+					department: '',
+					entryDate: '',
+					contractStartDate: '',
+					remarks: '',
+					type: '',
+					socialSecurityNumber: '',
+					socialSecurityBankNumber: '',
+					socialSecurityPictureFront: '',
+					socialSecurityPictureFrontUrl: '',
+					socialSecurityPictureOpposite: '',
+					socialSecurityPictureOppositeUrl: '',
+				},
+				keyWatch: '',
+			}
+		},
+		created () {
+			this.ossService = new OSSSerivce()
+		},
+		components: {
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			handleUploadSuccess(response, file,fileList) {
+				return this.handleAvatarSuccess(response,file,fileList,null,'front')
+			},
+			handleUploadSuccess2(response, file,fileList) {
+				return this.handleAvatarSuccess2(response,file,fileList,null,'front')
+			},
+			handleRemove(file, fileList) {
+				console.log(file);
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleRemove2(file) {
+				console.log(file);
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList2.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleDownload(file) {
+				toHref(file)
+			},
+			handleDownload2(file) {
+				toHref(file)
+			},
+			handlePictureCardPreview(file) {
+				this.dialogImageUrl = file.url;
+				this.dialogVisible = true;
+			},
+			handlePictureCardPreview2(file) {
+				this.dialogImageUrl = file.url;
+				this.dialogVisible2 = true;
+			},
+			async httpRequest (file) {
+				await httpRequest(file, fileName(file), this.directory, this.maxValue)
+			},
+
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					sex: '',
+					age: '',
+					birthday: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					maritalStatus: '',
+					mobilePhone: '',
+					idCard: '',
+					homeAddress: '',
+					permanentAddress: '',
+					graduatedFrom: '',
+					speciality: '',
+					startTime: '',
+					endTime: '',
+					education: '',
+					educationNature: '',
+					graduatedOrNot: '',
+					englishLevel: '',
+					ncre: '',
+					department: '',
+					entryDate: '',
+					contractStartDate: '',
+					remarks: '',
+					type: '',
+					socialSecurityNumber: '',
+					socialSecurityBankNumber: '',
+					socialSecurityPictureFront: '',
+					socialSecurityPictureFrontUrl: '',
+					socialSecurityPictureOpposite: '',
+					socialSecurityPictureOppositeUrl: '',
+				}
+				if (method === 'add') {
+					this.title = `新建入职登记`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					enrollmentRegistrationService.findById(this.inputForm.id).then(async (data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront)){
+							await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureFront).then((data) => {
+								console.log('data', data)
+								let file = {
+									url: data
+								}
+								this.fileList.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureOpposite)){
+							console.log('123')
+							await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureOpposite).then((data) => {
+								let file = {
+									url: data
+								}
+								this.fileList2.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.idCard)) {
+							this.loading = false
+							this.$message.error('身份证号码不能为空')
+							throw new Error('身份证号码不能为空')
+						}
+						this.inputForm.id = this.businessId
+						enrollmentRegistrationService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+
+						if (this.commonJS.isEmpty(this.inputForm.idCard)) {
+							this.loading = false
+							this.$message.error('身份证号码不能为空')
+							throw new Error('身份证号码不能为空')
+						}
+
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
+							this.loading = false
+							this.$message.error('社保银行卡号与社保卡照片不能为空');
+							throw new Error('社保银行卡号与社保卡照片不能为空')
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityBankNumber) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityPictureFront))) {
+							this.loading = false
+							this.$message.error('社保编号与社保卡照片不能为空');
+							throw new Error('社保编号与社保卡照片不能为空')
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront) && (this.commonJS.isEmpty(this.inputForm.socialSecurityNumber) || this.commonJS.isEmpty(this.inputForm.socialSecurityBankNumber))) {
+							this.loading = false
+							this.$message.error('社保编号与社保银行卡号不能为空');
+							throw new Error('社保编号与社保银行卡号不能为空')
+						}
+						this.inputForm.type = '2'
+						enrollmentRegistrationService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [入职登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.inputForm.type = '5'
+								console.log('this.inputForm',this.inputForm)
+								enrollmentRegistrationService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							enrollmentRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					enrollmentRegistrationService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							enrollmentRegistrationService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			//身份证号码唯一性判断
+			idCardOnly(idCard) {
+				enrollmentRegistrationService.findIdCardOnly(idCard).then((data) => {
+					if (data !== 0) {
+						this.$message.error('身份证号码已存在,请重新确认')
+						this.inputForm.idCard = ''
+						throw new Error('身份证号码已存在,请重新确认')
+					}
+				})
+
+			},
+			//联系电话唯一性判断
+			mobilePhoneOnly(mobilePhone) {
+				enrollmentRegistrationService.findMobilePhoneOnly(mobilePhone).then((data) => {
+					if (data !== 0) {
+						this.$message.error('手机码已存在,请重新确认')
+						this.inputForm.mobilePhone = ''
+						throw new Error('联系电话已存在,请重新确认')
+					}
+				})
+
+			},
+			checkBankNumber(bankNumber) {
+				if (!this.validateXG.isBankNum(bankNumber)) {
+					this.$message.error('请输入正确的社保银行卡号')
+					this.inputForm.socialSecurityBankNumber = ''
+					throw new Error('请输入正确的社保银行卡号')
+				}
+			},
+			handleAvatarSuccess (res, file, fileList, index, val) {
+				console.log('foleList', fileList)
+				if (val === 'front') {
+					this.inputForm.socialSecurityPictureFront = res.url
+					this.inputForm.socialSecurityPictureFrontUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			handleAvatarSuccess2 (res, file, fileList, index, val) {
+				console.log('foleList', fileList)
+				if (val === 'front') {
+					this.inputForm.socialSecurityPictureOpposite = res.url
+					this.inputForm.socialSecurityPictureOppositeUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			onPreview (url) {
+				if (url !== '' && url !== undefined && url !== null) {
+					this.url = url
+					this.showViewer = true
+				}
+			},
+			checkIsPic (file) {
+				return this.commonJS.isPic(file)
+			},
+		}
+	}
+</script>

+ 284 - 0
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -0,0 +1,284 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目编号" prop="projectNumber">
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+        <template #buttons>
+          <el-button type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :print-config="{}"
+          :export-config="{
+                    remote: true,
+                    filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '入职登记信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="政治面貌" field="politicalOutlook"></vxe-column>
+          <vxe-column min-width="160" align="center" title="民族" field="nation"></vxe-column>
+          <vxe-column min-width="160" align="center" title="联系电话" field="mobilePhone"></vxe-column>
+          <vxe-column min-width="160" align="center" title="毕业院校" field="graduatedFrom"></vxe-column>
+			<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+				<template #default="scope">
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("human_status", scope.row.type, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
+            <template  #default="scope">
+              <div v-if="isAdmin">
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+              </div>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+  import processService from '@/api/flowable/ProcessService'
+  import userService from '@/api/sys/UserService'
+  import taskService from '@/api/flowable/TaskService'
+  import pick from "lodash.pick";
+  export default {
+    data () {
+      return {
+        num: 0,
+        searchForm: {
+          projectNumber: '',
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: '',
+        haveProjectIds: ''
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+		this.$nextTick(() => {
+			//将表格和工具栏进行关联
+			const $table = this.$refs.clientTable;
+			const $toolbar = this.$refs.toolbarRef;
+			$table.connect($toolbar);
+		})
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  enrollmentRegistrationService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('员工入职').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+		  // 读取流程表单
+		  let tabTitle = `发起流程【员工入职】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [员工入职]`
+		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+			  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.processDefinitionAuditId,
+					  procDefKey: this.procDefKey,
+					  status: 'startAndHold',
+					  title: tabTitle,
+					  formType: data.formType,
+					  formUrl: data.formUrl,
+					  formTitle: processTitle,
+					  businessId: 'false',
+					  isShow: false,
+					  routePath: '/human/enrollment/registration/EnrollmentRegistrationList'
+				  }
+			  })
+		  })
+      },
+		// 查看员工入职流程结果
+		detail (row) {
+			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionAuditId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '员工入职' + '流程详情',
+							formTitle: '员工入职' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return enrollmentRegistrationService.exportExcel(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            // console.log(err.response)
+          }
+        })
+      },
+		// 删除
+		del (id) {
+			let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+				return item.id
+			}).join(',')
+			this.$confirm(`确定删除所选项吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				enrollmentRegistrationService.remove(ids).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+    }
+  }
+</script>

+ 219 - 0
src/views/human/enrollment/registration/KeyCardForm.vue

@@ -0,0 +1,219 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+	import OSSSerivce, {
+		httpRequest,
+		fileName,
+		toHref,
+	} from '@/api/sys/OSSService'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					procInsId: '',
+				},
+				keyWatch: '',
+			}
+		},
+		created () {
+			this.ossService = new OSSSerivce()
+		},
+		components: {
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+				}
+				if (method === 'add') {
+					this.title = `新建社保登记`
+				} else if (method === 'edit') {
+					this.title = '修改社保登记信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					enrollmentRegistrationService.findKeyCardById(this.inputForm.id).then( async (data) => {
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.loading = true
+				this.inputForm.id = this.businessId
+				enrollmentRegistrationService.saveKeyCard(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findKeyCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.loading = true
+				this.inputForm.type = '2'
+				enrollmentRegistrationService.saveKeyCard(this.inputForm).then((data) => {
+					this.inputForm.title = `${this.$store.state.user.name} 发起了 [门卡确认]`
+					this.inputForm.id = data.businessId
+					callback(data.businessTable, data.businessId, this.inputForm)
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				}).catch(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findKeyCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.inputForm.type = '5'
+						enrollmentRegistrationService.saveKeyCard(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					enrollmentRegistrationService.findKeyCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							enrollmentRegistrationService.updateKeyCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					enrollmentRegistrationService.findKeyCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							enrollmentRegistrationService.updateKeyCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 63 - 0
src/views/human/enrollment/registration/KeyCardPopup.vue

@@ -0,0 +1,63 @@
+<template>
+	<el-dialog
+		title="门卡领取通知"
+		:close-on-click-modal="false"
+		draggable
+		width="1100px"
+		height="500px"
+		@close="close"
+		append-to-body
+		v-model="visible">
+		<div style="height: calc(100% - 80px);">
+			门卡办理成功!请及时到办公室黄丽处领取门禁卡,并到物业处开通大楼门禁权限及获取餐补卡号,具体办理方法参考附件。获取餐补卡号后请及时在系统待办中填写!<br>
+			另:请到刘芸或崇祝艳处开通打印权限。(9楼10楼南边到刘芸处开通权限,北边到崇祝艳处开通权限,9楼前台位于北边)
+
+			<el-button type="primary" @click="downloadFirstAuditTpl">门禁开通注意事项</el-button>
+		</div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			</span>
+		</template>
+	</el-dialog>
+</template>
+
+<script>
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
+    export default {
+		data () {
+			return {
+				visible: false,
+				loading: false,
+				isAdmin: false,
+			}
+		},
+		methods: {
+			init () {
+				this.visible = true
+			},
+			close () {
+				this.visible = false
+			},
+			downloadFirstAuditTpl () {
+				// this.$utils.downloadExcel('/sys/project/import/template')
+				this.loading = true
+				enrollmentRegistrationService.downloadFile().then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadWord(res, '门禁卡开通注意事项')
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+			},
+
+		}
+    }
+</script>
+
+<style scoped>
+</style>

+ 243 - 0
src/views/human/enrollment/registration/RiceCardForm.vue

@@ -0,0 +1,243 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="餐补卡号" prop="riceNumber" :rules="[{required: true, message: '餐补卡号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.riceNumber"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+	import OSSSerivce, {
+		httpRequest,
+		fileName,
+		toHref,
+	} from '@/api/sys/OSSService'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					riceNumber: '',
+					procInsId: '',
+				},
+				keyWatch: '',
+			}
+		},
+		created () {
+			this.ossService = new OSSSerivce()
+		},
+		components: {
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+				}
+				if (method === 'add') {
+					this.title = `新建社保登记`
+				} else if (method === 'edit') {
+					this.title = '修改社保登记信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					enrollmentRegistrationService.findRiceCardById(this.inputForm.id).then( async (data) => {
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.id = this.businessId
+						enrollmentRegistrationService.saveRiceCard(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findRiceCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						enrollmentRegistrationService.saveRiceCard(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [完善餐补卡号]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findRiceCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate((valid) => {
+							if (valid) {
+								this.loading = true
+								this.inputForm.type = '5'
+								enrollmentRegistrationService.saveRiceCard(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					enrollmentRegistrationService.findRiceCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							enrollmentRegistrationService.updateRiceCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					enrollmentRegistrationService.findRiceCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							enrollmentRegistrationService.updateRiceCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 464 - 0
src/views/human/enrollment/registration/SocialSecurityInfoAddForm.vue

@@ -0,0 +1,464 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="(status === 'audit' || status === 'taskFormDetail') && testFlag"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 社保信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="社保编号" prop="socialSecurityNumber" :rules="[{required: true, message: '社保编号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.socialSecurityNumber" maxlength="10"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保银行卡号" prop="socialSecurityBankNumber" :rules="[{required: true, message: '社保银行卡号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.socialSecurityBankNumber" @change="checkBankNumber(inputForm.socialSecurityBankNumber)" maxlength="19"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保卡照片正面" prop="socialSecurityPictureFront" :rules="[]">
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess"
+								   v-model:file-list="fileList"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible">
+							<img w-full :src="inputForm.socialSecurityPictureFrontUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="社保卡照片反面" prop="socialSecurityPictureOpposite" :rules="[]">
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit2"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess2"
+								   v-model:file-list="fileList2"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview2(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload2(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove2(file,fileList2)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible2">
+							<img w-full :src="inputForm.socialSecurityPictureOppositeUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import OSSSerivce, {
+		httpRequest,
+		fileName,
+		toHref,
+	} from '@/api/sys/OSSService'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				testFlag: false,
+				limitNum: 1,
+				fileList: [],
+				fileList2: [],
+				hideUploadEdit: false, //隐藏上传按钮
+				hideUploadEdit2: false, //隐藏上传按钮
+				dialogVisible: false,
+				dialogVisible2: false,
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					name: '',
+					procInsId: '',
+					socialSecurityNumber: '',
+					socialSecurityBankNumber: '',
+					socialSecurityPictureFront: '',
+					socialSecurityPictureFrontUrl: '',
+					socialSecurityPictureOpposite: '',
+					socialSecurityPictureOppositeUrl: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.ossService = new OSSSerivce()
+			this.commonApi = new CommonApi()
+		},
+		components: {
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			handleRemove(file, fileList) {
+				console.log(file);
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleRemove2(file) {
+				console.log(file);
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList2.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleDownload(file) {
+				toHref(file)
+			},
+			handleDownload2(file) {
+				toHref(file)
+			},
+			handlePictureCardPreview(file) {
+				this.dialogVisible = true;
+			},
+			handlePictureCardPreview2(file) {
+				this.dialogVisible2 = true;
+			},
+			handleUploadSuccess(response, file,fileList) {
+				return this.handleAvatarSuccess(response,file,fileList,null,'front')
+			},
+			handleUploadSuccess2(response, file,fileList) {
+				return this.handleAvatarSuccess2(response,file,fileList,null,'front')
+			},
+			handleAvatarSuccess (res, file, fileList, index, val) {
+				console.log('foleList', fileList)
+				if (val === 'front') {
+					this.inputForm.socialSecurityPictureFront = res.url
+					this.inputForm.socialSecurityPictureFrontUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			handleAvatarSuccess2 (res, file, fileList, index, val) {
+				console.log('foleList', fileList)
+				if (val === 'front') {
+					this.inputForm.socialSecurityPictureOpposite = res.url
+					this.inputForm.socialSecurityPictureOppositeUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			checkBankNumber(bankNumber) {
+				if (!this.validateXG.isBankNum(bankNumber)) {
+					this.$message.error('请输入正确的社保银行卡号')
+					this.inputForm.socialSecurityBankNumber = ''
+					throw new Error('请输入正确的社保银行卡号')
+				}
+			},
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					socialSecurityNumber: '',
+					socialSecurityBankNumber: '',
+					socialSecurityPictureFront: '',
+					socialSecurityPictureFrontUrl: '',
+					socialSecurityPictureOpposite: '',
+					socialSecurityPictureOppositeUrl: '',
+				}
+				if (method === 'add') {
+					this.title = `新建社保登记`
+				} else if (method === 'edit') {
+					this.title = '修改社保登记信息'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					enrollmentRegistrationService.findSocialCardById(this.inputForm.id).then( async (data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityNumber)) {
+							this.testFlag = true
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureFront)){
+							await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureFront).then((data) => {
+								let file = {
+									url: data
+								}
+								this.fileList.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.socialSecurityPictureOpposite)){
+							await this.ossService.getTemporaryUrl(this.inputForm.socialSecurityPictureOpposite).then((data) => {
+								let file = {
+									url: data
+								}
+								this.fileList2.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						enrollmentRegistrationService.saveSocialCard(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findSocialCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						enrollmentRegistrationService.saveSocialCard(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [社保登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findSocialCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '审核') {
+											this.inputForm.type = '5'
+										}
+									}
+									enrollmentRegistrationService.saveSocialCard(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
+
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					enrollmentRegistrationService.findSocialCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							enrollmentRegistrationService.updateSocialCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					enrollmentRegistrationService.findSocialCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							enrollmentRegistrationService.updateSocialCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 721 - 0
src/views/human/enrollment/registration/WageCardInfoAddForm.vue

@@ -0,0 +1,721 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="(status === 'audit' || status === 'taskFormDetail') && testFlag"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 中信银行卡信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="中信银行卡号" prop="zxBankCardNumber" :rules="[{required: true, message: '中信银行卡号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.zxBankCardNumber" @change="checkBankNumber(inputForm.zxBankCardNumber,'zx')" maxlength="19"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="开户行" prop="zxAccountHolder" :rules="[{required: true, message: '开户行不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.zxAccountHolder" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="银行卡正面" prop="accountHolderFront" :rules="[]">
+						<!--<el-upload
+							class="avatar-uploader"
+							:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+							:show-file-list="false"
+							:on-success="handleAvatarSuccess"
+						>
+							<img v-if="imageUrl" :src="imageUrl" class="avatar" />
+							<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+						</el-upload>-->
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess"
+								   v-model:file-list="fileList"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!(status === 'audit' || status === 'taskFormDetail')"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible">
+							<img w-full :src="inputForm.accountHolderFrontUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="银行卡反面" prop="accountHolderOpposite" :rules="[]">
+						<!--<el-upload
+							class="avatar-uploader"
+							:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+							:show-file-list="false"
+							:on-success="handleAvatarSuccess"
+						>
+							<img v-if="imageUrl" :src="imageUrl" class="avatar" />
+							<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+						</el-upload>-->
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="hideUploadEdit2"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="handleUploadSuccess2"
+								   v-model:file-list="fileList2"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="handlePictureCardPreview2(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="handleDownload2(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!(status === 'audit' || status === 'taskFormDetail')"
+											  class="el-upload-list__item-delete"
+											  @click="handleRemove2(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="dialogVisible2">
+							<img w-full :src="inputForm.accountHolderOppositeUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i> 工商银行卡信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="工商银行卡号" prop="gsBankCardNumber" :rules="[{required: true, message: '工商银行卡号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.gsBankCardNumber" @change="checkBankNumber(inputForm.gsBankCardNumber,'gs')" maxlength="19"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="开户行" prop="gsAccountHolder" :rules="[{required: true, message: '开户行不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.gsAccountHolder" ></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="银行卡正面" prop="gsAccountHolderFront" :rules="[]">
+						<!--<el-upload
+							class="avatar-uploader"
+							:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+							:show-file-list="false"
+							:on-success="handleAvatarSuccess"
+						>
+							<img v-if="imageUrl" :src="imageUrl" class="avatar" />
+							<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+						</el-upload>-->
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="gsHideUploadEdit"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="gsHandleUploadSuccess"
+								   v-model:file-list="gsFileList"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="gsHandlePictureCardPreview(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="gsHandleDownload(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!(status === 'audit' || status === 'taskFormDetail')"
+											  class="el-upload-list__item-delete"
+											  @click="gsHandleRemove(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="gsDialogVisible">
+							<img w-full :src="inputForm.gsAccountHolderFrontUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="银行卡反面" prop="gsAccountHolderOpposite" :rules="[]">
+						<!--<el-upload
+							class="avatar-uploader"
+							:action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+							:show-file-list="false"
+							:on-success="handleAvatarSuccess"
+						>
+							<img v-if="imageUrl" :src="imageUrl" class="avatar" />
+							<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
+						</el-upload>-->
+						<el-upload :action="`${$http.BASE_URL}/public-modules-server/oss/file/webUpload/upload`"
+								   :limit="limitNum"
+								   :disabled="gsHideUploadEdit2"
+								   list-type="picture-card"
+								   :auto-upload="true"
+								   :on-success="gsHandleUploadSuccess2"
+								   v-model:file-list="gsFileList2"
+						>
+							<el-icon><Plus /></el-icon>
+
+							<template #file="{ file }">
+								<div>
+									<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+									<span class="el-upload-list__item-actions">
+										  <span
+											  class="el-upload-list__item-preview"
+											  @click="gsHandlePictureCardPreview2(file)"
+										  >
+											<el-icon><zoom-in /></el-icon>
+										  </span>
+										  <span
+											  v-if="!disabled"
+											  class="el-upload-list__item-delete"
+											  @click="gsHandleDownload2(file)"
+										  >
+											<el-icon><Download /></el-icon>
+										  </span>
+										  <span
+											  v-if="!(status === 'audit' || status === 'taskFormDetail')"
+											  class="el-upload-list__item-delete"
+											  @click="gsHandleRemove2(file,fileList)"
+										  >
+											<el-icon><Delete /></el-icon>
+										  </span>
+									</span>
+								</div>
+							</template>
+						</el-upload>
+						<el-dialog v-model="gsDialogVisible2">
+							<img w-full :src="inputForm.gsAccountHolderOppositeUrl" alt="Preview Image" :style="{ maxWidth: '100%', maxHeight: '100%' }"/>
+						</el-dialog>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import OSSSerivce, {
+		httpRequest,
+		fileName,
+		toHref,
+	} from '@/api/sys/OSSService'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				testFlag: false,
+				dialogVisible: false,
+				dialogVisible2: false,
+				hideUploadEdit: false, //控制上传点击
+				hideUploadEdit2: false, //控制上传点击
+				fileList: [],
+				fileList2: [],
+				gsDialogVisible: false,
+				gsDialogVisible2: false,
+				gsHideUploadEdit: false, //控制上传点击
+				gsHideUploadEdit2: false, //控制上传点击
+				gsFileList: [],
+				gsFileList2: [],
+				visible: false,
+				loading: false,
+				limitNum: 1,
+				// imageUrl: '',
+				inputForm: {
+					userId: '',
+					procInsId: '',
+					zxBankCardNumber: '',
+					zxAccountHolder: '',
+					gsAccountHolder: '',
+					gsBankCardNumber: '',
+					accountHolderFront: '',
+					accountHolderFrontUrl: '',
+					accountHolderOpposite: '',
+					accountHolderOppositeUrl: '',
+					gsAccountHolderFront: '',
+					gsAccountHolderFrontUrl: '',
+					gsAccountHolderOpposite: '',
+					gsAccountHolderOppositeUrl: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.ossService = new OSSSerivce()
+			this.commonApi = new CommonApi()
+		},
+		components: {
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			handleRemove(file, fileList) {
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleRemove2(file, fileList) {
+				this.hideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.fileList2.indexOf(file);
+				if (fileIndex !== -1) {
+					this.fileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			gsHandleRemove(file, fileList) {
+				this.gsHideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.gsFileList.indexOf(file);
+				if (fileIndex !== -1) {
+					this.gsFileList.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			gsHandleRemove2(file, fileList) {
+				this.gsHideUploadEdit = false
+				// 如果需要删除图片信息,可以根据file或其他标识从相应的数据结构中删除信息
+				const fileIndex = this.gsFileList2.indexOf(file);
+				if (fileIndex !== -1) {
+					this.gsFileList2.splice(fileIndex, 1); // 从fileList中删除该图片信息
+				}
+			},
+			handleDownload(file) {
+				toHref(file)
+			},
+			handleDownload2(file) {
+				toHref(file)
+			},
+			gsHandleDownload(file) {
+				toHref(file)
+			},
+			gsHandleDownload2(file) {
+				toHref(file)
+			},
+			handlePictureCardPreview(file) {
+				this.dialogVisible = true;
+			},
+			handlePictureCardPreview2(file) {
+				this.dialogVisible2 = true;
+			},
+			gsHandlePictureCardPreview(file) {
+				this.gsDialogVisible = true;
+			},
+			gsHandlePictureCardPreview2(file) {
+				this.gsDialogVisible2 = true;
+			},
+			handleUploadSuccess(response, file,fileList) {
+				return this.handleAvatarSuccess(response,file,fileList,null,'front')
+			},
+			handleUploadSuccess2(response, file,fileList) {
+				return this.handleAvatarSuccess2(response,file,fileList,null,'front')
+			},
+			gsHandleUploadSuccess(response, file,fileList) {
+				return this.gsHandleAvatarSuccess(response,file,fileList,null,'front')
+			},
+			gsHandleUploadSuccess2(response, file,fileList) {
+				return this.gsHandleAvatarSuccess2(response,file,fileList,null,'front')
+			},
+			handleAvatarSuccess (res, file, fileList, index, val) {
+				if (val === 'front') {
+					this.inputForm.accountHolderFront = res.url
+					this.inputForm.accountHolderFrontUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			handleAvatarSuccess2 (res, file, fileList, index, val) {
+				if (val === 'front') {
+					this.inputForm.accountHolderOpposite = res.url
+					this.inputForm.accountHolderOppositeUrl = res.lsUrl
+				}
+				this.hideUploadEdit2 = true
+				this.$forceUpdate()
+			},
+			gsHandleAvatarSuccess (res, file, fileList, index, val) {
+				if (val === 'front') {
+					this.inputForm.gsAccountHolderFront = res.url
+					this.inputForm.gsAccountHolderFrontUrl = res.lsUrl
+				}
+				this.hideUploadEdit = true
+				this.$forceUpdate()
+			},
+			gsHandleAvatarSuccess2 (res, file, fileList, index, val) {
+				if (val === 'front') {
+					this.inputForm.gsAccountHolderOpposite = res.url
+					this.inputForm.gsAccountHolderOppositeUrl = res.lsUrl
+				}
+				this.hideUploadEdit2 = true
+				this.$forceUpdate()
+			},
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					procInsId: '',
+					zxBankCardNumber: '',
+					zxAccountHolder: '',
+					gsAccountHolder: '',
+					gsBankCardNumber: '',
+					accountHolderFront: '',
+					accountHolderFrontUrl: '',
+					accountHolderOpposite: '',
+					accountHolderOppositeUrl: '',
+					gsAccountHolderFront: '',
+					gsAccountHolderFrontUrl: '',
+					gsAccountHolderOpposite: '',
+					gsAccountHolderOppositeUrl: '',
+				}
+				if (method === 'add') {
+					this.title = `新建工资卡信息登记`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					enrollmentRegistrationService.findWageCardById(this.inputForm.id).then( async (data) => {
+						this.fileList = []
+						this.fileList2 = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (this.commonJS.isNotEmpty(this.inputForm.zxBankCardNumber)) {
+							this.testFlag = true
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.accountHolderFront)){
+
+							await this.ossService.getTemporaryUrl(this.inputForm.accountHolderFront).then((data) => {
+								console.log('data', data)
+								let file = {
+									url: data
+								}
+								this.fileList.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.accountHolderOpposite)){
+							console.log('123')
+							await this.ossService.getTemporaryUrl(this.inputForm.accountHolderOpposite).then((data) => {
+								let file = {
+									url: data
+								}
+								this.fileList2.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.gsAccountHolderFront)){
+							await this.ossService.getTemporaryUrl(this.inputForm.gsAccountHolderFront).then((data) => {
+								let file = {
+									url: data
+								}
+								this.gsFileList.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.gsAccountHolderOpposite)){
+							await this.ossService.getTemporaryUrl(this.inputForm.gsAccountHolderOpposite).then((data) => {
+								let file = {
+									url: data
+								}
+								this.gsFileList2.push(file)
+								// this.inputForm.socialSecurityPictureFrontUrl = data
+							})
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						enrollmentRegistrationService.saveWageCard(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findWageCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						enrollmentRegistrationService.saveWageCard(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [工资卡信息登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				enrollmentRegistrationService.findWageCardById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '审核') {
+											this.inputForm.type = '5'
+										}
+									}
+									enrollmentRegistrationService.saveWageCard(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					enrollmentRegistrationService.findWageCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							enrollmentRegistrationService.updateWageCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					enrollmentRegistrationService.findWageCardById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							enrollmentRegistrationService.updateWageCardStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+						this.inputForm.type = '1'
+						enrollmentRegistrationService.updateWageCardStatusById(this.inputForm).then(() => {
+							this.loading = false
+							callback()
+						})
+					})
+				}
+			},
+			checkBankNumber(bankNumber,type) {
+				if (!this.validateXG.isBankNum(bankNumber)) {
+					if (type === 'zx' ){
+						this.inputForm.zxBankCardNumber = ''
+					} else if (type === 'gs') {
+						this.inputForm.gsBankCardNumber = ''
+					}
+					this.$message.error('请输入正确的银行卡号')
+					throw new Error('请输入正确的银行卡号')
+				}
+			},
+		}
+	}
+</script>
+
+<style scoped>
+	.avatar-uploader .avatar {
+		width: 178px;
+		height: 178px;
+		display: block;
+	}
+</style>
+
+<style>
+	.avatar-uploader .el-upload {
+		border: 1px dashed var(--el-border-color);
+		border-radius: 6px;
+		cursor: pointer;
+		position: relative;
+		overflow: hidden;
+		transition: var(--el-transition-duration-fast);
+	}
+
+	.avatar-uploader .el-upload:hover {
+		border-color: var(--el-color-primary);
+	}
+
+	.el-icon.avatar-uploader-icon {
+		font-size: 28px;
+		color: #8c939d;
+		width: 178px;
+		height: 178px;
+		text-align: center;
+	}
+</style>

+ 136 - 0
src/views/human/practice/logwrite/LocationPullForm.vue

@@ -0,0 +1,136 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="500px"
+      height="500px"
+      @close="close"
+      append-to-body
+	  v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="" prop="name">
+            <el-input v-model="searchForm.name" placeholder="请输入地区名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="300px"
+          :loading="loading"
+          size="small"
+          ref="userTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+          :checkbox-config="{}">
+          <vxe-column type="radio" width="50" ></vxe-column>
+
+          <vxe-column title="地区" min-width="180" field="name" align="left" tree-node></vxe-column>
+        </vxe-table>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgramForUser()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import areaService from '@/api/sys/areaService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+		  dataList: [],
+		  searchForm: {
+          name: ''
+        }
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    methods: {
+      init () {
+        this.title = '地区选择'
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgramForUser () {
+        let rows = []
+        if (this.commonJS.isEmpty(this.$refs.userTable.getRadioRecord())) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        let row = this.$refs.userTable.getRadioRecord()
+		  console.log('row.code', row.code)
+		  if (row.code === '100000' || row.code === 100000) {
+			  this.$message.error('请选择子集数据')
+			  return
+		  }
+        this.close()
+        rows.push(row)
+        this.$emit('getProgramForUser', rows)
+      },
+      list () {
+        this.loading = true
+		  areaService.getAllArea(this.searchForm.name).then((data) => {
+          this.dataList = data
+          this.loading = false
+          this.$nextTick(() => {
+            this.$refs.userTable.setAllTreeExpand(true)
+          })
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+  }
+</style>

+ 447 - 0
src/views/human/practice/logwrite/LogWriteAddForm.vue

@@ -0,0 +1,447 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="工作日志名称" prop="workName" :rules="[]">
+						<el-input v-model="inputForm.workName"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="开始时间" prop="startTime" :rules="[{required: true, message: '开始时间不能为空', trigger: 'blur'}]">
+						<el-date-picker
+							style="width: 100%;"
+							v-model="inputForm.startTime"
+							type="date"
+							value-format="YYYY-MM-DD"
+							placeholder="选择开始时间">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="结束时间" prop="endTime" :rules="[{required: true, message: '结束时间不能为空', trigger: 'blur'}]">
+						<el-date-picker
+							style="width: 100%;"
+							v-model="inputForm.endTime"
+							type="date"
+							value-format="YYYY-MM-DD"
+							placeholder="选择开始时间">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="实习天数" prop="internshipDays" :rules="[]">
+						<el-input
+							v-on:input="inputForm.internshipDays=inputForm.internshipDays.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							v-model="inputForm.internshipDays"
+							controls-position="right"
+							:controls="false"
+							style="width:100%;"
+							placeholder="请输入实习天数"
+							clearable
+						>
+						</el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="项目经理" prop="projectManager"
+								  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+											 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+											 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="备注" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				日志明细
+				<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('amount')" plain>
+					新增
+				</el-button>
+				<span style="margin-left: 25px;color: red" v-if="this.status === 'audit'">实际工作天数{{workDay}}天</span>
+			</el-divider>
+			<el-row  :gutter="15" >
+				<el-col :span="24">
+					<vxe-table
+						border
+						show-overflow
+						ref="amountTable"
+						class="vxe-table-element"
+						:data="inputForm.amountInfos"
+						style="margin-left: 5em"
+						:key="amountKey"
+						highlight-current-row
+						:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+					>
+						<vxe-table-column field="year" title="年" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.year" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="month" title="月" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.month" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="day" title="日" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.day" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="week" title="星期" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input v-model="scope.row.week" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="auditProjectUnitName" title="审计项目单位名称" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input v-model="scope.row.auditProjectUnitName" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="location" title="地点" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input v-model="scope.row.location" @focus="locationListForm(scope.$rowIndex)"></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="auditWorkContent" title="审计工作内容" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input v-model="scope.row.auditWorkContent" ></el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" width="100">
+							<template v-slot="scope">
+								<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'amount')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
+	<LocationPullForm ref="locationPullForm" @getProgramForUser="getProgramForUser"></LocationPullForm>
+</template>
+
+<script>
+	import workLogService from '@/api/human/register/WorkLogService'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+	import LocationPullForm from './LocationPullForm'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				workDay: '',
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				indexRow: '',
+				inputForm: {
+					userId: '',
+					workName: '',
+					startTime: '',
+					endTime: '',
+					internshipDays: '',
+					remarks: '',
+					projectManager: '',
+					amountInfos: [],
+				},
+				keyWatch: '',
+				amountKey: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			UserSelectSignatory,
+			LocationPullForm,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+
+			// 地点下拉弹窗
+			locationListForm (rowIndex) {
+				this.indexRow = rowIndex
+				this.$refs.locationPullForm.init()
+			},
+			getProgramForUser (rows) {
+				this.inputForm.amountInfos[this.indexRow].locationId = rows[0].id
+				this.inputForm.amountInfos[this.indexRow].location = rows[0].name
+				this.$forceUpdate()
+				this.indexRow = ''
+			},
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					workName: '',
+					userId: '',
+					startTime: '',
+					endTime: '',
+					internshipDays: '',
+					remarks: '',
+					projectManager: '',
+					amountInfos: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习工作日志`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				if (this.status === 'audit' || this.status === 'taskFormDetail') {
+					method = 'view'
+				}
+				console.log('this.status', this.status)
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					workLogService.findById(this.inputForm.id).then((data) => {
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (this.status === 'audit'){
+							//将开始时间与结束时间传入后台查询后台的实际工作时间接口,
+							workLogService.getWorkDay(this.inputForm.startTime,this.inputForm.endTime).then((data) => {
+								this.workDay = data
+							})
+						}
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						workLogService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.inputForm.amountInfos = []
+				this.workDay = ""
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				workLogService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 暂存
+			async saveForm (callback) {
+				this.loading = true
+				this.inputForm.type = '1'
+				workLogService.save(this.inputForm).then((data) => {
+					callback()
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				}).catch(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.inputForm.assignee = this.inputForm.projectManager
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
+						  this.$message.error('至少填写一条日志明细信息')
+						  this.loading = false
+						  return
+						}
+						this.loading = true
+						this.inputForm.type = '2'
+						workLogService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 - [实习-工作日志]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				workLogService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.inputForm.type = '5'
+								console.log('this.inputForm',this.inputForm)
+								workLogService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					workLogService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							workLogService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					workLogService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							workLogService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'amount') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
+						this.inputForm.amountInfos = []
+					}
+					this.$refs.amountTable.insertAt(d)
+					this.inputForm.amountInfos.push(d)
+					this.amountKey = Math.random()
+				}
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'amount') {
+					this.$refs.amountTable.remove(row)
+					this.inputForm.amountInfos.splice(rowIndex, 1)
+				}
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+</style>
+<style>
+	.vxe-select--panel {
+		z-index: 9997 !important
+	}
+</style>

+ 315 - 0
src/views/human/practice/logwrite/LogWriteEditForm.vue

@@ -0,0 +1,315 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-row>
+				<el-row>
+					<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'"
+							 label-width="100px" @submit.native.prevent>
+						<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+						<el-row :gutter="26">
+							<el-col :span="12">
+								<el-form-item label="工作日志名称" prop="workName" :rules="[]">
+									<el-input v-model="inputForm.workName"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="开始时间" prop="startTime" :rules="[{required: true, message: '开始时间不能为空', trigger: 'blur'}]">
+									<el-date-picker
+										style="width: 100%;"
+										v-model="inputForm.startTime"
+										type="date"
+										value-format="YYYY-MM-DD"
+										placeholder="选择开始时间">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="结束时间" prop="endTime" :rules="[{required: true, message: '结束时间不能为空', trigger: 'blur'}]">
+									<el-date-picker
+										style="width: 100%;"
+										v-model="inputForm.endTime"
+										type="date"
+										value-format="YYYY-MM-DD"
+										placeholder="选择开始时间">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="实习天数" prop="internshipDays" :rules="[]">
+									<el-input
+										v-on:input="inputForm.internshipDays=inputForm.internshipDays.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+										v-model="inputForm.internshipDays"
+										controls-position="right"
+										:controls="false"
+										style="width:100%;"
+										placeholder="请输入实习天数"
+										clearable
+									>
+									</el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="项目经理" prop="projectManager"
+											  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+									<UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+														 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+														 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="备注" prop="remarks" :rules="[]">
+									<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							日志明细
+							<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('amount')" plain>
+								新增
+							</el-button>
+						</el-divider>
+						<el-row  :gutter="15" >
+							<el-col :span="24">
+								<vxe-table
+									border
+									show-overflow
+									ref="amountTable"
+									class="vxe-table-element"
+									:data="inputForm.amountInfos"
+									style="margin-left: 5em"
+									:key="amountKey"
+									highlight-current-row
+									:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								>
+									<vxe-table-column field="year" title="年" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.year" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="month" title="月" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.month" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="day" title="日" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="4" v-model="scope.row.day" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="week" title="星期" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input v-model="scope.row.week" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="auditProjectUnitName" title="审计项目单位名称" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input v-model="scope.row.auditProjectUnitName" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="location" title="地点" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input v-model="scope.row.location" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="auditWorkContent" title="审计工作内容" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input v-model="scope.row.auditWorkContent" ></el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column title="操作" width="100">
+										<template v-slot="scope">
+											<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'amount')">删除</el-button>
+										</template>
+									</vxe-table-column>
+								</vxe-table>
+							</el-col>
+						</el-row>
+
+					</el-form>
+				</el-row>
+			</el-row>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import workLogService from '@/api/human/register/WorkLogService'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					workName: '',
+					startTime: '',
+					endTime: '',
+					internshipDays: '',
+					remarks: '',
+					projectManager: '',
+					amountInfos: [],
+				},
+				keyWatch: '',
+				amountKey: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			SelectTree
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					workName: '',
+					startTime: '',
+					endTime: '',
+					internshipDays: '',
+					remarks: '',
+					projectManager: '',
+					amountInfos: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习工作日志`
+				} else if (method === 'edit') {
+					this.title = '修改实习工作日志'
+				} else if (method === 'view') {
+					this.title = '查看实习工作日志'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					this.$refs.inputForm.resetFields()
+					workLogService.findById(this.inputForm.id).then((data) => {
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						workLogService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.visible = false
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'amount') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
+						this.inputForm.amountInfos = []
+					}
+					this.$refs.amountTable.insertAt(d)
+					this.inputForm.amountInfos.push(d)
+					this.amountKey = Math.random()
+				}
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'amount') {
+					this.$refs.amountTable.remove(row)
+					this.inputForm.amountInfos.splice(rowIndex, 1)
+				}
+			},
+		}
+	}
+</script>

+ 408 - 0
src/views/human/practice/logwrite/LogWriteList.vue

@@ -0,0 +1,408 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目编号" prop="projectNumber">
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('workLog:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :print-config="{}"
+          :export-config="{
+                    remote: true,
+                    filename: `实习日志${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '实习日志信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+			<vxe-column min-width="160" align="center" title="工作日志名称" field="workName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="开始时间" field="startTime"></vxe-column>
+          <vxe-column min-width="160" align="center" title="结束时间" field="endTime"></vxe-column>
+          <vxe-column min-width="160" align="center" title="实习天数" field="internshipDays"></vxe-column>
+          <vxe-column min-width="160" align="center" title="备注" field="remarks"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+			<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+				<template #default="scope">
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
+            <template  #default="scope">
+              <div v-if="isAdmin">
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="editForm(scope.row.id)">修改</el-button>
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+              </div>
+				<div v-else>
+					<el-button v-if="hasPermission('workLog:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+					<el-button v-if="hasPermission('workLog:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '2')" text type="primary"  @click="reback(scope.row)">撤回</el-button>
+					<el-button v-if="hasPermission('workLog:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+					<!--              审核-->
+					<el-button v-if="scope.row.type==='2'&& checkIsAudit(scope.row)" text type="primary"  @click="examine(scope.row)">审核</el-button>
+					<!--              被驳回后当前申请人重新调整-->
+					<el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.type === '4'" text type="primary"  @click="adjust(scope.row)">驳回调整</el-button>
+				</div>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+	  <LogWriteEditForm ref="logWriteEditForm" @refreshList="refreshList"></LogWriteEditForm>
+  </div>
+</template>
+
+<script>
+  import workLogService from '@/api/human/register/WorkLogService'
+  import processService from '@/api/flowable/ProcessService'
+  import userService from '@/api/sys/UserService'
+  import taskService from '@/api/flowable/TaskService'
+  import pick from "lodash.pick";
+  import LogWriteEditForm from "./LogWriteEditForm";
+  export default {
+    data () {
+      return {
+        num: 0,
+        searchForm: {
+          projectNumber: '',
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: '',
+        haveProjectIds: ''
+      }
+    },
+    created () {
+    },
+    components: {
+		LogWriteEditForm
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+		this.$nextTick(() => {
+			//将表格和工具栏进行关联
+			const $table = this.$refs.clientTable;
+			const $toolbar = this.$refs.toolbarRef;
+			$table.connect($toolbar);
+		})
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+      },
+      // 修改
+      editForm (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+		  this.$refs.logWriteEditForm.init('edit', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  workLogService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('实习工作日志').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+		// 修改
+		edit (row) {
+			// 暂存修改
+			let status = ''
+			if (row.type === '1') {
+				status = 'startAndHold'
+			}
+			// 撤回或者驳回修改
+			if (row.type === '3') {
+				status = 'startAndClose'
+			} else if (row.status === '4') {
+				status = 'reapplyFlag'
+			}
+			// 读取流程表单
+			let tabTitle = `发起流程【实习-工作日志】`
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-工作日志]`
+			taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+				businessId: row.id,
+				businessTable: 'human_resources_practice_registration_work_log',
+				status: status
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionAuditId,
+						procDefKey: this.procDefKey,
+						status: status,
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'human_resources_practice_registration_work_log',
+						businessId: row.id,
+						isShow: false,
+						routePath: '/human/logwrite/LogWriteList'
+					}
+				})
+			})
+		},
+      start () {
+		  // 读取流程表单
+		  let tabTitle = `发起流程【实习-工作日志】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-工作日志]`
+		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+			  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.processDefinitionAuditId,
+					  procDefKey: this.procDefKey,
+					  status: 'startAndHold',
+					  title: tabTitle,
+					  formType: data.formType,
+					  formUrl: data.formUrl,
+					  formTitle: processTitle,
+					  businessId: 'false',
+					  isShow: false,
+					  routePath: '/human/logwrite/LogWriteList'
+				  }
+			  })
+		  })
+      },
+		// 撤回
+		reback (row) {
+			this.$confirm(`确定撤回流程吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				processService.revokeProcIns(row.procInsId).then((data) => {
+					let param = {type: '3', id: row.id}
+					workLogService.updateStatusById(param)
+					this.$message.success('回退成功')
+					this.refreshList()
+				})
+			})
+		},
+		// 审核
+		examine (row) {
+			workLogService.findById(row.id).then((data) => {
+				if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todo(row)
+				}
+			})
+		},
+		// 查看流程结果
+		detail (row) {
+			if (!this.commonJS.isEmpty(row.type) && row.type !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionAuditId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '实习-工作日志' + '流程详情',
+							formTitle: '实习-工作日志' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		// 审核或重新调整跳转
+		todo (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.taskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/human/logwrite/LogWriteList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+		// 驳回后调整
+		adjust (row) {
+			console.log('row', row)
+			workLogService.findById(row.id).then((data) => {
+				console.log('data', data)
+				if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todo(row)
+				}
+			})
+		},
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return workLogService.exportExcel(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            // console.log(err.response)
+          }
+        })
+      },
+		// 删除
+		del (id) {
+			let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+				return item.id
+			}).join(',')
+			this.$confirm(`确定删除所选项吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				workLogService.remove(ids).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+		// 查询当前登录人是否是数据的审核人
+		checkIsAudit (row) {
+			let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+			if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+				for (const userId of row.auditUserIds) {
+					if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+						return true
+					}
+				}
+			}
+			return false
+		}
+    }
+  }
+</script>

+ 159 - 0
src/views/human/practice/register/RegisterPopup.vue

@@ -0,0 +1,159 @@
+<template>
+  <div>
+    <el-dialog
+      title="实习人员信息"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+<!--        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>-->
+<!--          &lt;!&ndash; 搜索框&ndash;&gt;-->
+<!--          <el-form-item label="商品名称" prop="tradeName">-->
+<!--            <el-input v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>-->
+<!--          </el-form-item>-->
+
+<!--          <el-form-item>-->
+<!--            <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>-->
+<!--            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>-->
+<!--          </el-form-item>-->
+<!--        </el-form>-->
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
+			<vxe-column min-width="160" align="center" title="实习开始时间" field="practiceStartDay"></vxe-column>
+			<vxe-column min-width="160" align="center" title="实习结束时间" field="practiceCompleteDay"></vxe-column>
+			<vxe-column min-width="160" align="center" title="实习天数" field="practiceWorkDays"></vxe-column>
+			<vxe-column min-width="160" align="center" title="最后填写日志时间" field="lastCreateTime"></vxe-column>
+          <vxe-column min-width="160" align="center" title="日志名称" field="workName">
+			  <template #default="scope">
+				  <el-link  type="primary" :underline="false" @click="view(scope.row.workId)">{{scope.row.workName}}</el-link>
+			  </template>
+		  </vxe-column>
+          <vxe-column min-width="160" align="center" title="实习状态" field="practiceStatus"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			</span>
+		</template>
+    </el-dialog>
+	  <LogWriteEditForm ref="logWriteEditForm" @refreshList="refreshList"></LogWriteEditForm>
+  </div>
+</template>
+
+<script>
+	import registerService from '@/api/human/register/RegisterService'
+	import LogWriteEditForm from "../logwrite/LogWriteEditForm";
+  export default {
+    data () {
+      return {
+        visible: false,
+        num: 0,
+        searchForm: {
+          id: '',
+        },
+        basicId: '',
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    created () {
+    },
+    components: {
+		LogWriteEditForm
+    },
+    methods: {
+      init (basicId) {
+        console.log('basicId', basicId)
+        this.visible = true
+        this.basicId = basicId
+        this.refreshList()
+      },
+      // 获取数据列表
+      refreshList () {
+        this.searchForm.id = this.basicId
+        this.loading = true
+		  registerService.list2({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      resetSearch () {
+        // this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      close () {
+        // this.$refs.searchForm.resetFields()
+        this.visible = false
+        this.typeTest = ''
+      },
+      // 查看
+      view (workId) {
+		  this.$refs.logWriteEditForm.init('view', workId)
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0px;
+    padding-bottom: 15px;
+  }
+</style>

+ 545 - 0
src/views/human/practice/register/RegistrationAddForm.vue

@@ -0,0 +1,545 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="性别" prop="sex"
+								  :rules="[
+								  	{required: true, message: '性别不能为空', trigger: 'change'}
+                 ]">
+						<el-radio-group v-model="inputForm.sex">
+							<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value" :key="item.value">{{item.label}}</el-radio>
+						</el-radio-group>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true, message: '身份证号码不能为空', trigger: 'change'}]">
+						<el-input v-model="inputForm.idCard"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="出生地" prop="nativePlace" :rules="[]">
+						<el-input v-model="inputForm.nativePlace"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="民族" prop="nation" :rules="[]">
+						<el-input v-model="inputForm.nation"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="政治面貌" prop="politicalOutlook" :rules="[]">
+						<el-input v-model="inputForm.politicalOutlook"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="毕业院校" prop="graduatedFrom" :rules="[]">
+						<el-input v-model="inputForm.graduatedFrom"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="专业" prop="speciality" :rules="[]">
+						<el-input v-model="inputForm.speciality"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="联系电话" prop="mobilePhone" :rules="[{required: true, message: '联系电话不能为空', trigger: 'change'}]">
+						<el-input v-model="inputForm.mobilePhone"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="QQ号/微信号" prop="qqNum" :rules="[]">
+						<el-input v-model="inputForm.qqNum"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="简介" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-form v-if="status === 'audit' || status === 'taskFormDetail'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+						 label-width="110px" :disabled="status === 'taskFormDetail'"  @submit.native.prevent>
+					<el-row :gutter="15">
+						<el-col :span="12">
+							<el-form-item label="实习单位名称" prop="practiceUnitName" :rules="[]">
+								<el-input v-model="inputForm.practiceUnitName"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12" >
+							<el-form-item label="实习部门" prop="practiceOffice"
+										  :rules="[
+                                {required: true, message:'实习部门不能为空', trigger:'blur'}
+                   ]">
+								<SelectTree
+									ref="officeTree"
+									:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+									:url="`/system-server/sys/office/treeData?type=2`"
+									:value="inputForm.practiceOffice"
+									:accordion="true"
+									size="large"
+									@getValue="(value) => {inputForm.practiceOffice=value}"/>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目经理" prop="projectManager"
+										  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+								<UserSelectSignatory style="width: 100%" ref="userSelect1"
+													 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+													 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="实习开始日期" prop="practiceStartDay" :rules="[{required: true, message: '实习开始日期不能为空', trigger: 'change'}]">
+								<el-date-picker
+									style="width: 100%;"
+									v-model="inputForm.practiceStartDay"
+									type="datetime"
+									value-format="YYYY-MM-DD HH:mm:ss"
+									placeholder="选择实习开始日期">
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="实习结束日期" prop="practiceCompleteDay" :rules="[{required: true, message: '实习结束日期不能为空', trigger: 'change'}]">
+								<el-date-picker
+									style="width: 100%;"
+									v-model="inputForm.practiceCompleteDay"
+									type="datetime"
+									value-format="YYYY-MM-DD HH:mm:ss"
+									placeholder="选择实习结束日期">
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				实习经历
+				<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('amount')" plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15" >
+				<el-col :span="24">
+					<vxe-table
+						border
+						show-overflow
+						ref="amountTable"
+						class="vxe-table-element"
+						:data="inputForm.experiences"
+						style="margin-left: 5em"
+						:key="amountKey"
+						highlight-current-row
+						:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+					>
+						<vxe-table-column field="startTime" title="开始时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-date-picker
+									v-model="scope.row.startTime"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择开始时间"
+									style="width:100%"
+									size="default"
+									placement="bottom-start"
+									clearable>
+								</el-date-picker>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="endTime" title="结束时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-date-picker
+									v-model="scope.row.endTime"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择结束时间"
+									style="width:100%"
+									size="default"
+									placement="bottom-start"
+									clearable>
+								</el-date-picker>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="practiceUnit" title="实践单位" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写实践单位"  v-model="scope.row.practiceUnit"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="post" title="岗位" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写岗位" v-model="scope.row.post"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" width="100">
+							<template v-slot="scope">
+								<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'amount')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				家庭成员
+				<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('familyMembers')" plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15" >
+				<el-col :span="24">
+					<vxe-table
+						border
+						show-overflow
+						ref="familyTable"
+						class="vxe-table-element"
+						:data="inputForm.familyMembers"
+						style="margin-left: 5em"
+						:key="membersKey"
+						highlight-current-row
+						:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+					>
+						<vxe-table-column field="callName" title="称呼" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写称呼"  v-model="scope.row.callName"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="name" title="姓名" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写姓名" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="phone" title="联系方式" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写联系方式"  v-model="scope.row.phone"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="workUnit" title="工作单位" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input  placeholder="请填写工作单位"  v-model="scope.row.workUnit"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" width="100">
+							<template v-slot="scope">
+								<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'familyMembers')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+
+		</el-form>
+	</div>
+</template>
+
+<script>
+	import registerService from '@/api/human/register/RegisterService'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					practiceOffice: '',
+					name: '',
+					practiceUnitName: '',
+					qqNum: '',
+					sex: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					mobilePhone: '',
+					idCard: '',
+					graduatedFrom: '',
+					speciality: '',
+					practiceStartDay: '',
+					practiceCompleteDay: '',
+					remarks: '',
+					type: '',
+					projectManager: '',
+					experiences: [],
+					familyMembers: [],
+				},
+				keyWatch: '',
+				amountKey: '',
+				membersKey: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			SelectTree,
+			UserSelectSignatory,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					practiceOffice: '',
+					name: '',
+					practiceUnitName: '',
+					qqNum: '',
+					sex: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					mobilePhone: '',
+					idCard: '',
+					graduatedFrom: '',
+					speciality: '',
+					practiceStartDay: '',
+					practiceCompleteDay: '',
+					remarks: '',
+					type: '',
+					projectManager: '',
+					experiences: [],
+					familyMembers: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习登记`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						this.inputForm.id = this.businessId
+						registerService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshDataList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.inputForm.experiences = []
+				this.inputForm.familyMembers = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				registerService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						registerService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - [实习登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				registerService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.inputForm.type = '5'
+								console.log('this.inputForm',this.inputForm)
+								registerService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							registerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							registerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'amount') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.experiences)) {
+						this.inputForm.experiences = []
+					}
+					this.$refs.amountTable.insertAt(d)
+					this.inputForm.experiences.push(d)
+					this.amountKey = Math.random()
+				}
+				if (type === 'familyMembers') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.familyMembers)) {
+						this.inputForm.familyMembers = []
+					}
+					this.$refs.familyTable.insertAt(d)
+					this.inputForm.familyMembers.push(d)
+					this.amountKey = Math.random()
+				}
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'amount') {
+					this.$refs.amountTable.remove(row)
+					this.inputForm.experiences.splice(rowIndex, 1)
+				}
+				if (type === 'familyMembers') {
+					this.$refs.familyTable.remove(row)
+					this.inputForm.familyMembers.splice(rowIndex, 1)
+				}
+			},
+		}
+	}
+</script>

+ 561 - 0
src/views/human/practice/register/RegistrationEditForm.vue

@@ -0,0 +1,561 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-row>
+				<el-row>
+					<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+							 label-width="100px" @submit.native.prevent>
+
+						<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+						<el-row :gutter="26">
+							<el-col :span="12">
+								<el-form-item label="姓名" prop="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+									<el-input v-model="inputForm.name"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="性别" prop="sex"
+											  :rules="[
+								  	{required: true, message: '性别不能为空', trigger: 'change'}
+                 ]">
+									<el-radio-group v-model="inputForm.sex">
+										<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value" :key="item.value">{{item.label}}</el-radio>
+									</el-radio-group>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="身份证号码" prop="idCard" :rules="[{required: true, message: '身份证号码不能为空', trigger: 'change'}]">
+									<el-input v-model="inputForm.idCard"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="出生地" prop="nativePlace" :rules="[]">
+									<el-input v-model="inputForm.nativePlace"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="民族" prop="nation" :rules="[]">
+									<el-input v-model="inputForm.nation"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="政治面貌" prop="politicalOutlook" :rules="[]">
+									<el-input v-model="inputForm.politicalOutlook"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="毕业院校" prop="graduatedFrom" :rules="[]">
+									<el-input v-model="inputForm.graduatedFrom"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="专业" prop="speciality" :rules="[]">
+									<el-input v-model="inputForm.speciality"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="联系电话" prop="mobilePhone" :rules="[{required: true, message: '联系电话不能为空', trigger: 'change'}]">
+									<el-input v-model="inputForm.mobilePhone"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="QQ号/微信号" prop="qqNum" :rules="[]">
+									<el-input v-model="inputForm.qqNum"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="简介" prop="remarks" :rules="[]">
+									<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-form style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+									 label-width="110px" @submit.native.prevent>
+								<el-row :gutter="15">
+									<el-col :span="12">
+										<el-form-item label="实习单位名称" prop="practiceUnitName" :rules="[]">
+											<el-input v-model="inputForm.practiceUnitName"></el-input>
+										</el-form-item>
+									</el-col>
+									<el-col :span="12" >
+										<el-form-item label="实习部门" prop="practiceOffice"
+													  :rules="[
+                                {required: true, message:'实习部门不能为空', trigger:'blur'}
+                   ]">
+											<SelectTree
+												ref="officeTree"
+												:props="{
+										  value: 'id',             // ID字段名
+										  label: 'name',         // 显示名称
+										  children: 'children'    // 子级字段名
+										}"
+												:url="`/system-server/sys/office/treeData?type=2`"
+												:value="inputForm.practiceOffice"
+												:accordion="true"
+												size="large"
+												@getValue="(value) => {inputForm.practiceOffice=value}"/>
+										</el-form-item>
+									</el-col>
+									<el-col :span="12">
+										<el-form-item label="项目经理" prop="projectManager"
+													  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+											<UserSelectSignatory style="width: 100%" ref="userSelect1"
+																 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+																 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+										</el-form-item>
+									</el-col>
+									<el-col :span="12">
+										<el-form-item label="实习开始日期" prop="practiceStartDay" :rules="[{required: true, message: '实习开始日期不能为空', trigger: 'change'}]">
+											<el-date-picker
+												style="width: 100%;"
+												v-model="inputForm.practiceStartDay"
+												type="datetime"
+												value-format="YYYY-MM-DD HH:mm:ss"
+												placeholder="选择实习开始日期">
+											</el-date-picker>
+										</el-form-item>
+									</el-col>
+									<el-col :span="12">
+										<el-form-item label="实习结束日期" prop="practiceCompleteDay" :rules="[{required: true, message: '实习结束日期不能为空', trigger: 'change'}]">
+											<el-date-picker
+												style="width: 100%;"
+												v-model="inputForm.practiceCompleteDay"
+												type="datetime"
+												value-format="YYYY-MM-DD HH:mm:ss"
+												placeholder="选择实习结束日期">
+											</el-date-picker>
+										</el-form-item>
+									</el-col>
+								</el-row>
+							</el-form>
+						</el-row>
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							实习经历
+							<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('amount')" plain>
+								新增
+							</el-button>
+						</el-divider>
+						<el-row  :gutter="15" >
+							<el-col :span="24">
+								<vxe-table
+									border
+									show-overflow
+									ref="amountTable"
+									class="vxe-table-element"
+									:data="inputForm.experiences"
+									style="margin-left: 5em"
+									:key="amountKey"
+									highlight-current-row
+									:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								>
+									<vxe-table-column field="startTime" title="开始时间" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-date-picker
+												v-model="scope.row.startTime"
+												type="date"
+												value-format="YYYY-MM-DD"
+												placeholder="选择开始时间"
+												style="width:100%"
+												size="default"
+												placement="bottom-start"
+												clearable>
+											</el-date-picker>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="endTime" title="结束时间" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-date-picker
+												v-model="scope.row.endTime"
+												type="date"
+												value-format="YYYY-MM-DD"
+												placeholder="选择结束时间"
+												style="width:100%"
+												size="default"
+												placement="bottom-start"
+												clearable>
+											</el-date-picker>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="practiceUnit" title="实践单位" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写实践单位"  v-model="scope.row.practiceUnit"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="post" title="岗位" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写岗位" v-model="scope.row.post"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column title="操作" width="100">
+										<template v-slot="scope">
+											<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'amount')">删除</el-button>
+										</template>
+									</vxe-table-column>
+								</vxe-table>
+							</el-col>
+						</el-row>
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							家庭成员
+							<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " @click="insertEvent('familyMembers')" plain>
+								新增
+							</el-button>
+						</el-divider>
+						<el-row  :gutter="15" >
+							<el-col :span="24">
+								<vxe-table
+									border
+									show-overflow
+									ref="familyTable"
+									class="vxe-table-element"
+									:data="inputForm.familyMembers"
+									style="margin-left: 5em"
+									:key="membersKey"
+									highlight-current-row
+									:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								>
+									<vxe-table-column field="callName" title="称呼" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写称呼"  v-model="scope.row.callName"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="name" title="姓名" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写姓名" v-model="scope.row.name"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="phone" title="联系方式" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写联系方式"  v-model="scope.row.phone"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="workUnit" title="工作单位" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input  placeholder="请填写工作单位"  v-model="scope.row.workUnit"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column title="操作" width="100">
+										<template v-slot="scope">
+											<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'familyMembers')">删除</el-button>
+										</template>
+									</vxe-table-column>
+								</vxe-table>
+							</el-col>
+						</el-row>
+					</el-form>
+				</el-row>
+			</el-row>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import registerService from '@/api/human/register/RegisterService'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				inputForm: {
+					userId: '',
+					practiceOffice: '',
+					name: '',
+					practiceUnitName: '',
+					qqNum: '',
+					sex: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					mobilePhone: '',
+					idCard: '',
+					graduatedFrom: '',
+					speciality: '',
+					practiceStartDay: '',
+					practiceCompleteDay: '',
+					remarks: '',
+					type: '',
+					projectManager: '',
+					experiences: [],
+					familyMembers: [],
+				},
+				keyWatch: '',
+				amountKey: '',
+				membersKey: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			SelectTree,
+			UserSelectSignatory,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					practiceOffice: '',
+					name: '',
+					practiceUnitName: '',
+					qqNum: '',
+					sex: '',
+					politicalOutlook: '',
+					nativePlace: '',
+					nation: '',
+					mobilePhone: '',
+					idCard: '',
+					graduatedFrom: '',
+					speciality: '',
+					practiceStartDay: '',
+					practiceCompleteDay: '',
+					remarks: '',
+					type: '',
+					projectManager: '',
+					experiences: [],
+					familyMembers: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习登记`
+				} else if (method === 'edit') {
+					this.title = '修改实习登记'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					this.$refs.inputForm.resetFields()
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						registerService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.inputForm.experiences = []
+				this.inputForm.familyMembers = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				registerService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						registerService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - [实习登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				registerService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.inputForm.type = '5'
+								console.log('this.inputForm',this.inputForm)
+								registerService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							registerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					registerService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							registerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'amount') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.experiences)) {
+						this.inputForm.experiences = []
+					}
+					this.$refs.amountTable.insertAt(d)
+					this.inputForm.experiences.push(d)
+					this.amountKey = Math.random()
+				}
+				if (type === 'familyMembers') {
+					let d = {}
+					if (this.commonJS.isEmpty(this.inputForm.familyMembers)) {
+						this.inputForm.familyMembers = []
+					}
+					this.$refs.familyTable.insertAt(d)
+					this.inputForm.familyMembers.push(d)
+					this.amountKey = Math.random()
+				}
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'amount') {
+					this.$refs.amountTable.remove(row)
+					this.inputForm.experiences.splice(rowIndex, 1)
+				}
+				if (type === 'familyMembers') {
+					this.$refs.familyTable.remove(row)
+					this.inputForm.familyMembers.splice(rowIndex, 1)
+				}
+			},
+		}
+	}
+</script>

+ 289 - 0
src/views/human/practice/register/RegistrationList.vue

@@ -0,0 +1,289 @@
+<template>
+  <div class="page">
+    <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-form-item label="项目编号" prop="projectNumber">
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="jp-table top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+        <template #buttons>
+          <el-button type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :print-config="{}"
+          :export-config="{
+                    remote: true,
+                    filename: `实习登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '实习登记信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="政治面貌" field="politicalOutlook"></vxe-column>
+          <vxe-column min-width="160" align="center" title="民族" field="nation"></vxe-column>
+          <vxe-column min-width="160" align="center" title="联系电话" field="mobilePhone"></vxe-column>
+          <vxe-column min-width="160" align="center" title="毕业院校" field="graduatedFrom"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+			<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+				<template #default="scope">
+					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("human_status", scope.row.type, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+
+          <vxe-column title="操作" width="200px" fixed="right" align="center">
+            <template  #default="scope">
+              <div v-if="isAdmin">
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="edit(scope.row.id)">修改</el-button>
+                <el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+              </div>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+	  <RegistrationEditForm ref="registrationEditForm" @refreshList="refreshList"></RegistrationEditForm>
+  </div>
+</template>
+
+<script>
+  import registerService from '@/api/human/register/RegisterService'
+  import processService from '@/api/flowable/ProcessService'
+  import userService from '@/api/sys/UserService'
+  import taskService from '@/api/flowable/TaskService'
+  import RegistrationEditForm from './RegistrationEditForm'
+  import pick from "lodash.pick";
+  export default {
+    data () {
+      return {
+        num: 0,
+        searchForm: {
+          projectNumber: '',
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: '',
+        haveProjectIds: ''
+      }
+    },
+    created () {
+    },
+    components: {
+		RegistrationEditForm
+    },
+    computed: {
+      userName () {
+        return this.$store.state.user.name
+      },
+      user () {
+        this.createName = this.$store.state.user.name
+        return this.$store.state.user
+      }
+    },
+    mounted () {
+		this.$nextTick(() => {
+			//将表格和工具栏进行关联
+			const $table = this.$refs.clientTable;
+			const $toolbar = this.$refs.toolbarRef;
+			$table.connect($toolbar);
+		})
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+		  this.$refs.registrationEditForm.init('edit', id)
+      },
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        userService.is().then((data) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+		  registerService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        processService.getByName('实习登记').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+		  // 读取流程表单
+		  let tabTitle = `发起流程【实习登记】`
+		  let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习登记]`
+		  taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+			  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.processDefinitionAuditId,
+					  procDefKey: this.procDefAuditKey,
+					  status: 'startAndHold',
+					  title: tabTitle,
+					  formType: data.formType,
+					  formUrl: data.formUrl,
+					  formTitle: processTitle,
+					  businessId: 'false',
+					  isShow: false,
+					  routePath: '/human/practice/register/RegistrationList'
+				  }
+			  })
+		  })
+      },
+		// 查看实习登记流程结果
+		detail (row) {
+			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.procInsId,
+					procDefId: this.processDefinitionAuditId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							isShow: 'false',
+							readOnly: true,
+							title: '实习登记' + '流程详情',
+							formTitle: '实习登记' + '流程详情',
+							businessId: row.id,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return registerService.exportExcel(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            // console.log(err.response)
+          }
+        })
+      },
+		// 删除
+		del (id) {
+			let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+				return item.id
+			}).join(',')
+			this.$confirm(`确定删除所选项吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				registerService.remove(ids).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+    }
+  }
+</script>

+ 182 - 0
src/views/human/practice/reimburseRegister/ProgramPageForm.vue

@@ -0,0 +1,182 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div>
+          <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+            <!-- 搜索框-->
+            <el-form-item label="工作日志名称" prop="workName">
+              <el-input v-model="searchForm.workName" placeholder="请输入工作日志名称" clearable></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="list()"  icon="el-icon-search">查询</el-button>
+              <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+
+          <vxe-table
+            border="inner"
+            auto-resize
+            resizable
+            height="550px"
+            :loading="loading"
+            ref="projectTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :row-config="{isCurrent: true}"
+            :checkbox-config="{trigger: 'row'}"
+          >
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column type="checkbox" width="60px"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="工作日志名称" field="workName"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="开始时间" field="startTime"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="结束时间" field="endTime"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="实习天数" field="internshipDays"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="备注" field="remarks"></vxe-column>
+			  <vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+          </vxe-table>
+          <vxe-pager
+            background
+            :current-page="tablePage.currentPage"
+            :page-size="tablePage.pageSize"
+            :total="tablePage.total"
+            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+            @page-change="currentChangeHandle">
+          </vxe-pager>
+        </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import workLogService from '@/api/human/register/WorkLogService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
+        dataList: [],
+        dataList1: [],
+        searchForm: {
+			workName: '',
+        },
+        detail: '',
+        isShow: true,
+        num: true,// num为true是多选,false是单选
+		reportType:''
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    methods: {
+      /**
+       * @param isShow
+       *      isShow为空,则可以选择“项目”或填写“其他”
+       *      isShow为false,则只可以选择“项目”,并且弹出提示
+       *      isShow为‘1’,则只可以选择“项目”,不弹出提示
+       *      isShow为其他任何值,则只可以填写“其他”
+       * @param num
+       *      num为空或者true,则允许多选
+       *      num为其他任何值,则只可以单选
+       */
+      init (isShow, num) {
+        if (this.commonJS.isEmpty(num) || num === true) {
+          this.num = true // num为true是多选,false是单选
+        } else {
+          this.num = false
+        }
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgram () {
+        let rows
+		  if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
+			  this.$message.error('请至少选择一条数据')
+			  return
+		  }
+		  if (this.num === false) {
+			  if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+				  this.$message.error('最多选择一条数据')
+				  return
+			  }
+		  }
+		  rows = this.$refs.projectTable.getCheckboxRecords()
+
+        this.close()
+        this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.status = '5'
+		  workLogService.completeData({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 457 - 0
src/views/human/practice/reimburseRegister/ReimburseRegisterAddForm.vue

@@ -0,0 +1,457 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 label-width="100px" @submit.native.prevent>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+			<el-row :gutter="26">
+				<el-col :span="12">
+					<el-form-item label="登记名称" prop="reimbuserName" :rules="[{required: true, message: '登记名称不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.reimbuserName"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="项目经理" prop="projectManager"
+								  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+						<UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+											 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+											 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="银行卡号" prop="bankCardNumber" :rules="[{required: true, message: '银行卡号不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.bankCardNumber"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="总报销金额" prop="allReimbursementAmount" :rules="[{required: true, message: '总报销金额不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.allReimbursementAmount" :disabled="true"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="备注" prop="remarks" :rules="[]">
+						<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-form v-if="status === 'audit' || status === 'taskFormDetail'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+						 :disabled="status === 'audit' || status === 'taskFormDetail'" label-width="110px" @submit.native.prevent>
+					<el-col :span="12">
+						<el-form-item label="是否实习结束" prop="completePractice" :rules="[{required: true, message: '是否实习结束不能为空', trigger: 'change'}]">
+							<el-radio-group v-model="inputForm.completePractice">
+								<el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" >{{item.label}}</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+				</el-form>
+			</el-row>
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				报销明细
+				<el-button style="margin-left: 20px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.detailList"
+						style="margin-left: 5em"
+						keep-source
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="workName" align="center" title="日志名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写日志名称" :readonly="true" v-model="scope.row.workName"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createName" align="center" title="创建人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :readonly="true" placeholder="请填写创建人" v-model="scope.row.createName"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="internshipDays" align="center" title="实习天数" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input
+									v-on:input="scope.row.internshipDays=scope.row.internshipDays.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="scope.row.internshipDays"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="请输入实习天数"
+									clearable
+								>
+								</el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column   field="reimbursementAmount" align="center"   title="报销金额(元)" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input
+									v-on:input="scope.row.reimbursementAmount=scope.row.reimbursementAmount.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="scope.row.reimbursementAmount"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="请输入报销金额(元)"
+									clearable
+								>
+								</el-input>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
+		</el-form>
+		<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+	</div>
+</template>
+
+<script>
+	import ProgramPageForm from './ProgramPageForm'
+	import reimburseRegisterService from '@/api/human/register/ReimburseRegisterService'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+	import XEUtils from "xe-utils";
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				tableRules: {
+					reimbursementAmount: [
+						{ required: true, message: '请填写报销金额' }
+					]
+				},
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				indexRow: '',
+				inputForm: {
+					userId: '',
+					procInsId: '',
+					bankCardNumber: '',
+					remarks: '',
+					projectManager: '',
+					allReimbursementAmount: '',
+					reimbuserName: '',
+					completePractice: '',
+					detailList: [],
+				},
+				keyWatch: '',
+				baseKey: '',
+			}
+		},
+		created () {
+		},
+		components: {
+			UserSelectSignatory,
+			ProgramPageForm,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					bankCardNumber: '',
+					procInsId: '',
+					userId: '',
+					remarks: '',
+					projectManager: '',
+					allReimbursementAmount: '',
+					reimbuserName: '',
+					completePractice: '',
+					detailList: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习报销登记`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				if (this.status === 'audit' || this.status === 'taskFormDetail') {
+					method = 'view'
+				}
+				console.log('this.status', this.status)
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+						this.inputForm.detailList = []
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.detailList)) {
+							this.inputForm.detailList = []
+						}
+
+						this.loading = false
+					})
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.$refs.inputForm.detailList = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 暂存
+			async saveForm (callback) {
+				this.loading = true
+				this.inputForm.type = '1'
+				reimburseRegisterService.save(this.inputForm).then((data) => {
+					callback()
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				}).catch(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.inputForm.assignee = this.inputForm.projectManager
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						this.inputForm.type = '2'
+						reimburseRegisterService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 - [实习-报销登记]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								console.log('this.inputForm',this.inputForm)
+								reimburseRegisterService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							reimburseRegisterService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							reimburseRegisterService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.detailList.push({})
+					this.baseKey = Math.random()
+				}
+			},
+			footerMethod2({columns, data}) {
+				const footerData = [
+					columns.map((column, columnIndex) => {
+						if (columnIndex === 0) {
+							return '报销金额汇总(元)'
+						}
+						if (['reimbursementAmount'].includes(column.property)) {
+							this.inputForm.allReimbursementAmount = XEUtils.sum(data, column.property)
+							return XEUtils.sum(data, column.property)
+						}
+						return null
+					})
+				]
+				return footerData
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.detailList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				console.log('this.inputForm.detailList', this.inputForm.detailList)
+				if (this.commonJS.isEmpty(this.inputForm.detailList[0].workName) || this.inputForm.detailList.length === 1) {
+					this.$refs.programPageForm.init()
+				} else {
+					if (this.commonJS.isEmpty(this.inputForm.detailList[0].programId)) {
+						this.$refs.programPageForm.init('s')
+					} else {
+						this.$refs.programPageForm.init(false)
+					}
+				}
+				this.programRow = rowIndex
+			},
+			getProgram(rows) {
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.detailList[this.programRow]
+						r.workName = item.workName
+						r.createName = item.createName
+						r.internshipDays = item.internshipDays
+						r.workLogId = item.id
+						this.inputForm.detailList[this.programRow] = r
+					} else {
+						let r = {
+							workName: item.workName,
+							createName: item.createName,
+							internshipDays: item.internshipDays,
+							workLogId: item.id,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.detailList.push(r)
+						this.baseKey = Math.random()
+					}
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+</style>
+<style>
+	.vxe-select--panel {
+		z-index: 9997 !important
+	}
+</style>

+ 276 - 0
src/views/human/practice/reimburseRegister/ReimburseRegisterChoose.vue

@@ -0,0 +1,276 @@
+<template>
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1200px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-container>
+				<el-main style="padding-top: 0;padding-bottom: 0">
+					<div>
+						<el-form style="margin-bottom: 0"  :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+							<!-- 搜索框-->
+							<el-form-item label="项目名称" prop="name">
+								<el-input  v-model="searchForm.reimbuserName" placeholder="请输入项目名称" clearable></el-input>
+							</el-form-item>
+
+							<el-form-item>
+								<el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+								<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+							</el-form-item>
+						</el-form>
+						<div style="margin-bottom: 10px"><span style="color: #F56C6C">注:最多选择 10 条数据</span></div>
+						<vxe-table
+							border="inner"
+							auto-resize
+							resizable
+							height="400px"
+							:loading="loading"
+							ref="programTable"
+							show-header-overflow
+							show-overflow
+							highlight-hover-row
+							:menu-config="{}"
+							:print-config="{}"
+							@checkbox-all="selectAllEvent"
+							@checkbox-change="selectionChangeHandle"
+							:row-id="rowId"
+							:checkbox-config="{reserve: true}"
+							:sort-config="{remote:true}"
+							:data="dataList">
+							<vxe-column type="seq" width="60" title="序号"></vxe-column>
+							<vxe-column type="checkbox" width="60px"></vxe-column>
+							<vxe-column min-width="160" align="center" title="报销登记名称" field="reimbuserName"></vxe-column>
+							<vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+							<vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+							<vxe-column min-width="160" align="center" title="总报销金额" field="allReimbursementAmount"></vxe-column>
+							<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+
+						</vxe-table>
+						<vxe-pager
+							background
+							:current-page="tablePage.currentPage"
+							:page-size="tablePage.pageSize"
+							:total="tablePage.total"
+							:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+							:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+							@page-change="currentChangeHandle">
+						</vxe-pager>
+					</div>
+				</el-main>
+				<el-aside width="300px" v-if=" commonJS.isNotEmpty(dataListAllSelections.length) && dataListAllSelections.length > 0">
+					<el-tag
+						style="margin: 10px 0 0 0"
+						:key="tag.id"
+						v-for="(tag, index) in dataListAllSelections"
+						closable
+						:disable-transitions="false"
+						@close="del(tag, index)">
+						{{tag.reimbuserName.length>20?tag.reimbuserName.substring(0,20)+'...':tag.reimbuserName}}
+					</el-tag>
+				</el-aside>
+			</el-container>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button  @click="close()">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import reimburseRegisterService from '@/api/human/register/ReimburseRegisterService'
+	export default {
+		data () {
+			return {
+				title: '项目选择',
+				method: '',
+				visible: false,
+				loading: false,
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				dataList: [],
+				searchForm: {
+					reimbuserName: '',
+					createBy: '',
+					type: ''
+				},
+				detail: '',
+				dataListAllSelections: [],
+				rowId: 'id',
+			}
+		},
+		created () {
+		},
+		components: {
+		},
+		methods: {
+			init () {
+				this.visible = true
+				this.dataListAllSelections = []
+				this.tablePage.currentPage = 1
+				this.tablePage.pageSize = 10
+				this.searchForm = {
+					reimbuserName: '',
+					projectNumber: '',
+					createBy: ''
+				}
+				this.list()
+			},
+			// 表单提交
+			getProgram () {
+				let rows
+				if (this.commonJS.isEmpty(this.dataListAllSelections)) {
+					this.$message.error('请至少选择一条数据')
+					return
+				}
+				if (this.dataListAllSelections.length > 10) {
+					this.$message.error('最多选择10条数据')
+					return
+				}
+				rows = this.dataListAllSelections
+				let totalNum = 0; // 初始化总报销金额为0
+				for (let i = 0; i < rows.length; i++) {
+					let row = rows[i];
+					let reimbursementAmount = parseFloat(row.allReimbursementAmount); // 获取当前行的总报销金额
+					totalNum += reimbursementAmount; // 累加到总报销金额
+				}
+				rows.totalNum = totalNum
+				this.close()
+
+
+
+				this.$emit('getProgram', rows)
+			},
+			list () {
+				this.loading = true
+				this.searchForm.type = '5'
+				reimburseRegisterService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then(async (data) => {
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+
+					let isCheck = []
+					for (let i = 0; i < this.tablePage.pageSize; i++) {
+						for (let j = 0; j < this.dataListAllSelections.length; j++) {
+							if (this.commonJS.isNotEmpty(this.dataList[i]) && this.commonJS.isNotEmpty(this.dataListAllSelections[j])) {
+								if (this.dataList[i].id === this.dataListAllSelections[j].id) { // 符合条件的数据勾选
+									isCheck.push(this.dataList[i].id)
+								}
+							}
+						}
+					}
+					if (this.commonJS.isNotEmpty(isCheck)) {
+						for (let i = 0; i < this.tablePage.pageSize; i++) {
+							if (isCheck.includes(this.dataList[i].id)) {
+								await this.$refs.programTable.setCheckboxRow([this.dataList[i]], true)
+							} else {
+								await this.$refs.programTable.setCheckboxRow([this.dataList[i]], false)
+							}
+						}
+					} else {
+						for (let i = 0; i < this.tablePage.pageSize; i++) {
+							await this.$refs.programTable.setCheckboxRow([this.dataList[i]], false)
+						}
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({currentPage, pageSize}) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.list()
+			},
+			resetSearch () {
+				this.dataListAllSelections = []
+				this.searchForm = {
+					reimbuserName: '',
+					projectNumber: '',
+					createBy: ''
+				}
+				// this.$refs.programTable.clearCheckboxReserve() // 清除全部页的勾选
+				this.$refs.searchForm.resetFields()
+				this.list()
+			},
+			close () {
+				// this.$refs.programTable.clearCheckboxReserve()
+				this.dataListAllSelections = []
+				this.detail = ''
+				this.visible = false
+			},
+			// 全选/取消全选 时,右侧tag标签同步新增或删除改变
+			async selectAllEvent (event) {
+				this.dataListAllSelections = []
+				let thisPageDate = await this.$refs.programTable.getCheckboxRecords()
+				let otherPageDate = await this.$refs.programTable.getCheckboxReserveRecords()
+				if (this.commonJS.isNotEmpty(otherPageDate)) {
+					for (let i = 0; i < otherPageDate.length; i++) {
+						this.dataListAllSelections.push(otherPageDate[i])
+					}
+				}
+				if (this.commonJS.isNotEmpty(thisPageDate)) {
+					for (let i = 0; i < thisPageDate.length; i++) {
+						this.dataListAllSelections.push(thisPageDate[i])
+					}
+				}
+			},
+			// 当前页“选中/取消选中”数据时,“新增/删除”右侧tag标签
+			selectionChangeHandle (event) {
+				if (event.checked) { // 选中触发
+					let delIndex = -1
+					for (let i = 0; i < this.dataListAllSelections.length; i++) {
+						if (this.dataListAllSelections[i].id === event.row.id) {
+							delIndex = i
+						}
+					}
+					if (this.commonJS.isNotEmpty(delIndex) && delIndex === -1) {
+						this.dataListAllSelections.push(event.row)
+					}
+				} else { // 取消选中触发
+					let delIndex = -1
+					for (let i = 0; i < this.dataListAllSelections.length; i++) {
+						if (this.dataListAllSelections[i].id === event.row.id) {
+							delIndex = i
+						}
+					}
+					if (this.commonJS.isNotEmpty(delIndex) && delIndex !== -1) {
+						this.dataListAllSelections.splice(delIndex, 1)
+					}
+				}
+			},
+			// 删除tag标签时,取消勾选当前页对应的数据
+			async del (tag, index) {
+				this.dataListAllSelections.splice(index, 1)
+				let rows = await this.$refs.programTable.getCheckboxRecords()
+				await this.$refs.programTable.clearCheckboxRow()
+				for (let i = 0; i < this.dataList.length; i++) {
+					for (let j = 0; j < rows.length; j++) {
+						if (this.dataList[i].id !== tag.id && this.dataList[i].id === rows[j].id) {
+							await this.$refs.programTable.setCheckboxRow([this.dataList[i]], true)
+						}
+					}
+				}
+			}
+		}
+	}
+</script>
+<style>
+	.messageZindex {
+		z-index:9999 !important;
+	}
+</style>

+ 364 - 0
src/views/human/practice/reimburseRegister/ReimburseRegisterEditForm.vue

@@ -0,0 +1,364 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-row>
+				<el-row>
+					<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+							 label-width="100px" @submit.native.prevent>
+
+						<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+						<el-row :gutter="26">
+							<el-col :span="12">
+								<el-form-item label="登记名称" prop="reimbuserName" :rules="[{required: true, message: '登记名称不能为空', trigger: 'blur'}]">
+									<el-input v-model="inputForm.reimbuserName"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="项目经理" prop="projectManager"
+											  :rules="[
+								  	{required: true, message: '项目经理不能为空', trigger: 'change'}
+                   ]">
+									<UserSelectSignatory style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'"
+														 :readonly="true" :limit='1' :modelValue="inputForm.projectManager"
+														 @update:modelValue='(value, label) => {inputForm.projectManager = value}'></UserSelectSignatory>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="银行卡号" prop="bankCardNumber" :rules="[{required: true, message: '银行卡号不能为空', trigger: 'blur'}]">
+									<el-input v-model="inputForm.bankCardNumber"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="总报销金额" prop="allReimbursementAmount" :rules="[{required: true, message: '总报销金额不能为空', trigger: 'blur'}]">
+									<el-input v-model="inputForm.allReimbursementAmount" :disabled="true"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="12">
+								<el-form-item label="备注" prop="remarks" :rules="[]">
+									<el-input type="textarea" v-model="inputForm.remarks"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-divider content-position="left"><i class="el-icon-document"></i>
+							报销明细
+							<el-button style="margin-left: 20px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('base')"  plain>
+								新增
+							</el-button>
+						</el-divider>
+						<el-row  :gutter="15">
+							<el-col :span="24">
+								<vxe-table
+									border
+									:footer-method="footerMethod2"
+									show-overflow
+									show-footer
+									ref="baseTable"
+									:key="baseKey"
+									class="vxe-table-element"
+									:data="inputForm.detailList"
+									style="margin-left: 5em"
+									keep-source
+									highlight-current-row
+									:edit-rules="tableRules"
+									:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+								>
+									<vxe-table-column field="workName" align="center" title="日志名称" :edit-render="{}" show-overflow="title">
+										<template v-slot:edit="scope">
+											<el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写日志名称" :readonly="true" v-model="scope.row.workName"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="createName" align="center" title="创建人" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input :readonly="true" placeholder="请填写创建人" v-model="scope.row.createName"/>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column field="internshipDays" align="center" title="实习天数" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input
+												v-on:input="scope.row.internshipDays=scope.row.internshipDays.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+												v-model="scope.row.internshipDays"
+												controls-position="right"
+												:controls="false"
+												style="width:100%;"
+												placeholder="请输入实习天数"
+												clearable
+											>
+											</el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column   field="reimbursementAmount" align="center"   title="报销金额(元)" :edit-render="{}">
+										<template v-slot:edit="scope">
+											<el-input
+												v-on:input="scope.row.reimbursementAmount=scope.row.reimbursementAmount.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+												v-model="scope.row.reimbursementAmount"
+												controls-position="right"
+												:controls="false"
+												style="width:100%;"
+												placeholder="请输入报销金额(元)"
+												clearable
+											>
+											</el-input>
+										</template>
+									</vxe-table-column>
+									<vxe-table-column title="操作" align="center" width="100">
+										<template v-slot="scope">
+											<el-button type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+										</template>
+									</vxe-table-column>
+								</vxe-table>
+							</el-col>
+						</el-row>
+
+					</el-form>
+				</el-row>
+			</el-row>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+		<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+	</div>
+</template>
+
+<script>
+	import ProgramPageForm from './ProgramPageForm'
+	import reimburseRegisterService from '@/api/human/register/ReimburseRegisterService'
+	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
+	import XEUtils from "xe-utils";
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				tableRules: {
+					reimbursementAmount: [
+						{ required: true, message: '请填写报销金额' }
+					]
+				},
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				indexRow: '',
+				inputForm: {
+					userId: '',
+					procInsId: '',
+					bankCardNumber: '',
+					remarks: '',
+					projectManager: '',
+					reimbuserName: '',
+					allReimbursementAmount: '',
+					detailList: [],
+				},
+				keyWatch: '',
+				baseKey: '',
+			}
+		},
+		created () {
+		},
+		components: {
+			UserSelectSignatory,
+			ProgramPageForm,
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					procInsId: '',
+					bankCardNumber: '',
+					remarks: '',
+					projectManager: '',
+					reimbuserName: '',
+					allReimbursementAmount: '',
+					detailList: [],
+				}
+				if (method === 'add') {
+					this.title = `实习报销登记`
+				} else if (method === 'edit') {
+					this.title = '实习报销登记修改'
+				}
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					this.$refs.inputForm.resetFields()
+					reimburseRegisterService.findById(this.inputForm.id).then((data) => {
+						this.inputForm.detailList = []
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.detailList)) {
+							this.inputForm.detailList = []
+						}
+
+						this.loading = false
+					})
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						reimburseRegisterService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.$refs.inputForm.detailList = []
+				this.visible = false
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.detailList.push({})
+					this.baseKey = Math.random()
+				}
+			},
+			footerMethod2({columns, data}) {
+				const footerData = [
+					columns.map((column, columnIndex) => {
+						if (columnIndex === 0) {
+							return '报销金额汇总(元)'
+						}
+						if (['reimbursementAmount'].includes(column.property)) {
+							this.inputForm.allReimbursementAmount = XEUtils.sum(data, column.property)
+							return XEUtils.sum(data, column.property)
+						}
+						return null
+					})
+				]
+				return footerData
+			},
+			openProgramPageForm(rowIndex) {
+				console.log('this.inputForm.detailList', this.inputForm.detailList)
+				if (this.commonJS.isEmpty(this.inputForm.detailList[0].workName) || this.inputForm.detailList.length === 1) {
+					this.$refs.programPageForm.init()
+				} else {
+					if (this.commonJS.isEmpty(this.inputForm.detailList[0].programId)) {
+						this.$refs.programPageForm.init('s')
+					} else {
+						this.$refs.programPageForm.init(false)
+					}
+				}
+				this.programRow = rowIndex
+			},
+			getProgram(rows) {
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.detailList[this.programRow]
+						r.workName = item.workName
+						r.createName = item.createName
+						r.internshipDays = item.internshipDays
+						r.workLogId = item.id
+						this.inputForm.detailList[this.programRow] = r
+					} else {
+						let r = {
+							workName: item.workName,
+							createName: item.createName,
+							internshipDays: item.internshipDays,
+							workLogId: item.id,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.detailList.push(r)
+						this.baseKey = Math.random()
+					}
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.detailList.splice(rowIndex, 1)
+				}
+			},
+		}
+	}
+</script>

+ 405 - 0
src/views/human/practice/reimburseRegister/ReimburseRegisterList.vue

@@ -0,0 +1,405 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="项目编号" prop="projectNumber">
+				<el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('reimburseRegister:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:print-config="{}"
+					:export-config="{
+                    remote: true,
+                    filename: `实习报销登记${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '实习报销登记信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="报销登记名称" field="reimbuserName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="项目经理" field="projectManagerName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="创建人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="总报销金额" field="allReimbursementAmount"></vxe-column>
+					<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+					<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="200px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="editForm(scope.row.id)">修改</el-button>
+								<el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+							</div>
+							<div v-else>
+								<el-button v-if="hasPermission('reimburseRegister:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+								<el-button v-if="hasPermission('reimburseRegister:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '2')" text type="primary"  @click="reback(scope.row)">撤回</el-button>
+								<el-button v-if="hasPermission('reimburseRegister:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+								<!--              审核-->
+								<el-button v-if="scope.row.type==='2'&& checkIsAudit(scope.row)" text type="primary"  @click="examine(scope.row)">审核</el-button>
+								<!--              被驳回后当前申请人重新调整-->
+								<el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.type === '4'" text type="primary"  @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+		</div>
+		<ReimburseRegisterEditForm ref="reimburseRegisterEditForm" @refreshList="refreshList"></ReimburseRegisterEditForm>
+	</div>
+</template>
+
+<script>
+	import reimburseRegisterService from '@/api/human/register/ReimburseRegisterService'
+	import processService from '@/api/flowable/ProcessService'
+	import userService from '@/api/sys/UserService'
+	import taskService from '@/api/flowable/TaskService'
+	import pick from "lodash.pick";
+	import ReimburseRegisterEditForm from "./ReimburseRegisterEditForm";
+	export default {
+		data () {
+			return {
+				num: 0,
+				searchForm: {
+					projectNumber: '',
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false,
+				processDefinitionAuditId: '',
+				procDefAuditKey: '',
+				isAdmin: false,
+				create: '',
+				haveProjectIds: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			ReimburseRegisterEditForm
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.$nextTick(() => {
+				//将表格和工具栏进行关联
+				const $table = this.$refs.clientTable;
+				const $toolbar = this.$refs.toolbarRef;
+				$table.connect($toolbar);
+			})
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			// 新增
+			add () {
+			},
+			// 修改
+			editForm (id) {
+				id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				})[0]
+				this.$refs.reimburseRegisterEditForm.init('edit', id)
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				reimburseRegisterService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('实习报销登记').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionAuditId = data.id
+						this.procDefAuditKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			// 修改
+			edit (row) {
+				// 暂存修改
+				let status = ''
+				if (row.type === '1') {
+					status = 'startAndHold'
+				}
+				// 撤回或者驳回修改
+				if (row.type === '3') {
+					status = 'startAndClose'
+				} else if (row.status === '4') {
+					status = 'reapplyFlag'
+				}
+				// 读取流程表单
+				let tabTitle = `发起流程【实习-报销登记】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-报销登记]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+					businessId: row.id,
+					businessTable: 'human_resources_practice_reimburse_register',
+					status: status
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionAuditId,
+							procDefKey: this.procDefAuditKey,
+							status: status,
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessTable: 'human_resources_practice_reimburse_register',
+							businessId: row.id,
+							isShow: false,
+							routePath: '/human/practice/reimburseRegister/ReimburseRegisterList'
+						}
+					})
+				})
+			},
+			start () {
+				// 读取流程表单
+				let tabTitle = `发起流程【实习-报销登记】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-报销登记]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+					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.processDefinitionAuditId,
+							procDefKey: this.procDefAuditKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/human/practice/reimburseRegister/ReimburseRegisterList'
+						}
+					})
+				})
+			},
+			// 撤回
+			reback (row) {
+				this.$confirm(`确定撤回流程吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					processService.revokeProcIns(row.procInsId).then((data) => {
+						let param = {type: '3', id: row.id}
+						reimburseRegisterService.updateStatusById(param)
+						this.$message.success('回退成功')
+						this.refreshList()
+					})
+				})
+			},
+			// 审核
+			examine (row) {
+				reimburseRegisterService.findById(row.id).then((data) => {
+					if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 查看流程结果
+			detail (row) {
+				if (!this.commonJS.isEmpty(row.type) && row.type !== '1') {
+					// eslint-disable-next-line eqeqeq
+					taskService.getTaskDef({
+						procInsId: row.procInsId,
+						procDefId: this.processDefinitionAuditId
+					}).then((data) => {
+						this.$router.push({
+							path: '/flowable/task/TaskFormDetail',
+							query: {
+								...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+								isShow: 'false',
+								readOnly: true,
+								title: '实习-报销登记' + '流程详情',
+								formTitle: '实习-报销登记' + '流程详情',
+								businessId: row.id,
+								status: 'reback'
+							}
+						})
+					})
+				}
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/human/practice/reimburseRegister/ReimburseRegisterList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				console.log('row', row)
+				reimburseRegisterService.findById(row.id).then((data) => {
+					console.log('data', data)
+					if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 自定义服务端导出
+			exportMethod ({ options }) {
+				// 传给服务端的参数
+				const params = {
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm,
+					filename: options.filename,
+					sheetName: options.sheetName,
+					isHeader: options.isHeader,
+					original: options.original,
+					mode: options.mode,
+					selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+					exportFields: options.columns.map(column => column.property)
+				}
+				return reimburseRegisterService.exportExcel(params).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, options.filename)
+				}).catch(function (err) {
+					if (err.response) {
+						// console.log(err.response)
+					}
+				})
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					reimburseRegisterService.remove(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+		}
+	}
+</script>

+ 532 - 0
src/views/human/practice/reimburseRegister/ReimburseSubmitAccountAddForm.vue

@@ -0,0 +1,532 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-row>
+			<el-col :span="24">
+				<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+						 label-width="135px" @submit.native.prevent>
+					<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+					<el-row :gutter="0">
+						<el-col :span="12">
+							<el-form-item label="经办人" prop="operator">
+								<el-input v-model="inputForm.operator" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="报销编号" prop="no">
+								<el-input v-model="inputForm.no" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="所属部门" prop="operatorOffice">
+								<el-input v-model="inputForm.operatorOffice" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="报销日期" prop="reimDate" :rules="[{required: true, message:'请选择报销日期', trigger:'blur'}]">
+								<el-date-picker
+									placement="bottom-start"
+									v-model="inputForm.reimDate"
+									type="date"
+									value-format="YYYY-MM-DD"
+									style="width: 100%"
+									placeholder="选择日期">
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="备注" prop="remarks">
+								<el-input v-model="inputForm.remarks"
+										  type="textarea"
+										  :rows="5"
+										  maxlength="500"
+										  placeholder="请输入简介"
+										  show-word-limit>
+								</el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-divider content-position="left"><i class="el-icon-document"></i>
+						项目报销详情
+						<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('detail')" plain>
+							新增
+						</el-button>
+					</el-divider>
+					<el-row  :gutter="0" >
+						<el-col :span="24">
+							<vxe-table
+								border
+								show-footer
+								show-overflow
+								:footer-method="footerMethod"
+								ref="detailTable"
+								:key="detailKey"
+								class="vxe-table-element"
+								:data="inputForm.accountDetails"
+								style="margin-left: 5em;margin-bottom: 20px"
+								highlight-current-row
+								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								:edit-rules="validRules"
+							>
+								<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.userName" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input :disabled='true' v-model="scope.row.deptName" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="registerName" title="指定报销" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.registerName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="number" title="费用(元)" :edit-render="{}" :rules="[{required: true, message:'请输入费用', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" v-model="scope.row.number" @keyup.native="scope.row.number = twoDecimalPlaces(scope.row.number)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="receiptNumber" title="收据张数" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.receiptNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="days" title="出差天数" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.days" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="content" title="内容" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.content" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column title="操作" width="100">
+									<template v-slot="scope">
+										<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+				</el-form>
+				<el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
+					<el-tab-pane label="附件" name="enclosure">
+						<!--        合同文件-->
+						<UpLoadComponent ref="enclosure"></UpLoadComponent>
+					</el-tab-pane>
+				</el-tabs>
+			</el-col>
+		</el-row>
+
+		<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+		<RegisterChoose ref="registerChoose" @getProgram="getProgram"></RegisterChoose>
+	</div>
+</template>
+
+<script>
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import reimburseSubmitAccountService from '@/api/human/register/ReimburseSubmitAccountService'
+	import UserPullForm from '@/views/finance/invoice/UserPullForm'
+	import XEUtils from "xe-utils";
+	import RegisterChoose from './ReimburseRegisterChoose'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				validRules: {
+					userName: [
+						{required: true, message: '报销人不能为空'}
+					],
+					deptName: [
+						{required: true, message: '报销部门不能为空'}
+					],
+					registerName: [
+						{required: true, message: '指定报销不能为空'}
+					],
+					number: [
+						{required: true, message: '费用(元)不能为空'}
+					]
+				},
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				indexRow: '',
+				inputForm: {
+					userId: '',
+					procInsId: '',
+					operator: '',
+					no: '',
+					operatorOffice: '',
+					operatorOfficeId: '',
+					reimDate: '',
+					remarks: '',
+					totalNum: '',
+					accountDetails: [],
+					files: [],
+				},
+				activeName: 'enclosure',
+				keyWatch: '',
+				detailKey: '',
+			}
+		},
+		created () {
+		},
+		components: {
+			UpLoadComponent,
+			UserPullForm,
+			RegisterChoose,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.enclosure.setDividerName('附件', false)
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.enclosure.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.activeName = 'enclosure'
+				this.inputForm = {
+					userId: '',
+					procInsId: '',
+					operator: '',
+					no: '',
+					operatorOffice: '',
+					operatorOfficeId: '',
+					reimDate: '',
+					remarks: '',
+					totalNum: '',
+					accountDetails: [],
+					files: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习报销`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				if (this.status === 'audit' || this.status === 'taskFormDetail') {
+					method = 'view'
+				}
+				console.log('this.status', this.status)
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+						this.$refs.enclosure.clearUpload()
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.operator)) {
+							this.inputForm.operator = this.$store.state.user.name
+						}
+
+						if (this.commonJS.isEmpty(this.inputForm.operatorOffice)) {
+							this.inputForm.operatorOfficeId = this.$store.state.user.office.id
+							this.inputForm.operatorOffice = this.$store.state.user.office.name
+						}
+
+						this.$refs.enclosure.newUpload(this.method, this.inputForm.files, 'submitAccount', null, null, null, null, false)
+						this.loading = false
+					})
+					if (method !== 'edit' && method !== 'view') {
+						this.$refs.enclosure.newUpload(method, [], 'submitAccount', null, null, null, null, false)
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.$refs.enclosure.clearUpload()
+				this.inputForm.accountDetails = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startForm(callback)
+					}
+				})
+			},
+			// 暂存
+			async saveForm (callback) {
+				this.loading = true
+				if (this.$refs.enclosure.checkProgress()) {
+					this.loading = false
+					return
+				}
+				this.inputForm.type = '1'
+				this.inputForm.files = this.$refs.enclosure.getDataList()
+				reimburseSubmitAccountService.save(this.inputForm).then((data) => {
+					callback()
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				}).catch(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = false
+				})
+			},
+			// 送审
+			async startForm (callback) {
+				this.inputForm.assignee = this.inputForm.projectManager
+				this.$refs['inputForm'].validate(async (valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.$refs.enclosure.checkProgress()) {
+							this.loading = false
+							return
+						}
+						this.inputForm.type = '2'
+						this.inputForm.files = this.$refs.enclosure.getDataList()
+						reimburseSubmitAccountService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 - [实习-报销]`
+							this.inputForm.id = data.businessId
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								if (this.$refs.enclosure.checkProgress()) {
+									this.loading = false
+									return
+								}
+								if (this.commonJS.isEmpty(this.inputForm.files)) {
+									this.inputForm.files = []
+								}
+								this.inputForm.files = this.$refs.enclosure.getDataList()
+								this.inputForm.type = '5'
+								reimburseSubmitAccountService.save(this.inputForm).then((data) => {
+									callback(data.businessTable, data.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							} else {
+								this.loading = false
+							}
+						})
+					}
+				})
+			},
+			// 修改状态
+			updateStatusById (type, callback) {
+				if (type === 'reject') {
+					this.loading = true
+					reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							reimburseSubmitAccountService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							reimburseSubmitAccountService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			footerMethod ({ columns, data }) {
+				const footerData = [
+					columns.map((column, columnIndex) => {
+						if (columnIndex === 0) {
+							return '总报销费用'
+						}
+						if (['number'].includes(column.property)) {
+							// eslint-disable-next-line no-undef
+							this.inputForm.totalNum = XEUtils.sum(data, column.property)
+							return XEUtils.sum(data, column.property)
+						}
+						return null
+					})
+				]
+				return footerData
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'detail') {
+					let d = {
+						userName: this.$store.state.user.name,
+						deptName: this.$store.state.user.office.name,
+						userId: this.$store.state.user.id,
+						deptId: this.$store.state.user.office.id
+					}
+					if (this.commonJS.isEmpty(this.inputForm.accountDetails)) {
+						this.inputForm.accountDetails = []
+					}
+					this.$refs.detailTable.insertAt(d)
+					this.inputForm.accountDetails.push(d)
+					this.detailKey = Math.random()
+				}
+			},
+			// 报销人下拉弹窗
+			userPullListForm (rowIndex) {
+				this.indexRow = rowIndex
+				this.$refs.userPullForm.init()
+			},
+			getProgramForUser (rows) {
+				this.inputForm.accountDetails[this.indexRow].userId = rows[0].id
+				this.inputForm.accountDetails[this.indexRow].userName = rows[0].name
+				this.inputForm.accountDetails[this.indexRow].deptId = rows[0].parentId
+				this.inputForm.accountDetails[this.indexRow].deptName = rows[0].officeName
+				this.indexRow = ''
+				this.$forceUpdate()
+			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				var len1 = str.substr(0, 1)
+				var len2 = str.substr(1, 1)
+				// eslint-disable-next-line eqeqeq
+				if (str.length > 1 && len1 == 0 && len2 != '.') {
+					str = str.substr(1, 1)
+				}
+				// eslint-disable-next-line eqeqeq
+				if (len1 == '.') {
+					str = ''
+				}
+				// eslint-disable-next-line eqeqeq
+				if (str.indexOf('.') != -1) {
+					var str_ = str.substr(str.indexOf('.') + 1)
+					// eslint-disable-next-line eqeqeq
+					if (str_.indexOf('.') != -1) {
+						str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+					}
+					if (str_.length > 2) {
+						this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+						return (str = '')
+					}
+				}
+				// eslint-disable-next-line no-useless-escape
+				str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+				return str
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'detail') {
+					this.$refs.detailTable.remove(row)
+					this.inputForm.accountDetails.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm (rowIndex, row) {
+				this.indexRow = rowIndex
+				this.$refs.registerChoose.init()
+			},
+			getProgram (rows) {
+				if (this.commonJS.isNotEmpty(rows)) {
+					this.inputForm.accountDetails[this.indexRow].registerId = rows.map(item => { return item.id }).join(',')
+					this.inputForm.accountDetails[this.indexRow].registerName = rows.map(item => { return item.reimbuserName }).join(',')
+					this.inputForm.accountDetails[this.indexRow].number = rows.totalNum
+					this.detailKey = Math.random()
+				}
+				this.indexRow = ''
+				this.$forceUpdate()
+			},
+			tabHandleClick (event) {
+				// console.log(event)
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+</style>
+<style>
+	.vxe-select--panel {
+		z-index: 9997 !important
+	}
+</style>

+ 430 - 0
src/views/human/practice/reimburseRegister/ReimburseSubmitAccountEditForm.vue

@@ -0,0 +1,430 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			height="500px"
+			@close="close"
+			append-to-body
+			v-model="visible">
+			<el-row>
+				<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+						 label-width="135px" @submit.native.prevent>
+
+					<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+					<el-row :gutter="26">
+						<el-col :span="12">
+							<el-form-item label="经办人" prop="operator">
+								<el-input v-model="inputForm.operator" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="报销编号" prop="no">
+								<el-input v-model="inputForm.no" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="所属部门" prop="operatorOffice">
+								<el-input v-model="inputForm.operatorOffice" :disabled="true"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="报销日期" prop="reimDate" :rules="[{required: true, message:'请选择报销日期', trigger:'blur'}]">
+								<el-date-picker
+									placement="bottom-start"
+									v-model="inputForm.reimDate"
+									type="date"
+									value-format="YYYY-MM-DD"
+									style="width: 100%"
+									placeholder="选择日期">
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="备注" prop="remarks">
+								<el-input v-model="inputForm.remarks"
+										  type="textarea"
+										  :rows="5"
+										  maxlength="500"
+										  placeholder="请输入简介"
+										  show-word-limit>
+								</el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-divider content-position="left"><i class="el-icon-document"></i>
+						项目报销详情
+						<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('detail')" plain>
+							新增
+						</el-button>
+					</el-divider>
+					<el-row  :gutter="15" >
+						<el-col :span="24">
+							<vxe-table
+								border
+								show-footer
+								show-overflow
+								:footer-method="footerMethod"
+								ref="detailTable"
+								:key="detailKey"
+								class="vxe-table-element"
+								:data="inputForm.accountDetails"
+								style="margin-left: 5em"
+								highlight-current-row
+								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								:edit-rules="validRules"
+							>
+								<vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.userName" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input :disabled='true' v-model="scope.row.deptName" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="registerName" title="指定报销" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.registerName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="number" title="费用(元)" :edit-render="{}" :rules="[{required: true, message:'请输入费用', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" v-model="scope.row.number" @keyup.native="scope.row.number = twoDecimalPlaces(scope.row.number)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="receiptNumber" title="收据张数" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.receiptNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="days" title="出差天数" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.days" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="content" title="内容" :edit-render="{}">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.content" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column title="操作" width="100">
+									<template v-slot="scope">
+										<el-button size="small" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+				</el-form>
+				<el-tabs v-model="activeName" type="border-card" style="width: 100%;margin-top: 20px" @tab-click="tabHandleClick">
+					<el-tab-pane label="附件" name="enclosure">
+						<!--        合同文件-->
+						<UpLoadComponent ref="enclosure"></UpLoadComponent>
+					</el-tab-pane>
+				</el-tabs>
+			</el-row>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+		<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
+		<RegisterChoose ref="registerChoose" @getProgram="getProgram"></RegisterChoose>
+	</div>
+</template>
+
+<script>
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import reimburseSubmitAccountService from '@/api/human/register/ReimburseSubmitAccountService'
+	import UserPullForm from '@/views/finance/invoice/UserPullForm'
+	import XEUtils from "xe-utils";
+	import RegisterChoose from './ReimburseRegisterChoose'
+
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				validRules: {
+					userName: [
+						{required: true, message: '报销人不能为空'}
+					],
+					deptName: [
+						{required: true, message: '报销部门不能为空'}
+					],
+					registerName: [
+						{required: true, message: '指定报销不能为空'}
+					],
+					number: [
+						{required: true, message: '费用(元)不能为空'}
+					]
+				},
+				title: '',
+				method: '',
+				visible: false,
+				loading: false,
+				indexRow: '',
+				inputForm: {
+					userId: '',
+					procInsId: '',
+					operator: '',
+					no: '',
+					operatorOffice: '',
+					operatorOfficeId: '',
+					reimDate: '',
+					remarks: '',
+					totalNum: '',
+					accountDetails: [],
+					files: [],
+				},
+				activeName: 'enclosure',
+				keyWatch: '',
+				detailKey: '',
+			}
+		},
+		created () {
+		},
+		components: {
+			UserPullForm,
+			RegisterChoose,
+			UpLoadComponent,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.enclosure.setDividerName('附件', false)
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			},
+			name () {
+				return this.$store.state.user.name
+			},
+			userId () {
+				return this.$store.state.user.id
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.enclosure.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.activeName = 'enclosure'
+				this.inputForm = {
+					userId: '',
+					procInsId: '',
+					operator: '',
+					no: '',
+					operatorOffice: '',
+					operatorOfficeId: '',
+					reimDate: '',
+					remarks: '',
+					totalNum: '',
+					accountDetails: [],
+					files: [],
+				}
+				if (method === 'add') {
+					this.title = `新建实习报销`
+				} else if (method === 'edit') {
+					this.title = '修改报销类型'
+				}
+				if (this.status === 'audit' || this.status === 'taskFormDetail') {
+					method = 'view'
+				}
+				console.log('this.status', this.status)
+				this.inputForm.id = id
+				this.visible = true
+				this.loading = false
+				this.$nextTick(() => {
+					this.loading = true
+					reimburseSubmitAccountService.findById(this.inputForm.id).then((data) => {
+						this.$refs.enclosure.clearUpload()
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+
+						if (this.commonJS.isEmpty(this.inputForm.operator)) {
+							this.inputForm.operator = this.$store.state.user.name
+						}
+
+						if (this.commonJS.isEmpty(this.inputForm.operatorOffice)) {
+							this.inputForm.operatorOfficeId = this.$store.state.user.office.id
+							this.inputForm.operatorOffice = this.$store.state.user.office.name
+						}
+						this.$refs.enclosure.newUpload(method, this.inputForm.files, 'submitAccount', null, null, null, null, false)
+						this.loading = false
+					})
+					if (method !== 'edit' && method !== 'view') {
+						this.$refs.enclosure.newUpload(method, [], 'submitAccount', null, null, null, null, false)
+					}
+				})
+			},
+			// 表单提交
+			doSubmit () {
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (this.$refs.enclosure.checkProgress()) {
+							this.loading = false
+							return
+						}
+						this.inputForm.files = this.$refs.enclosure.getDataList()
+						reimburseSubmitAccountService.save(this.inputForm).then((data) => {
+							this.close()
+							this.$message.success(data)
+							this.$emit('refreshList')
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
+					}
+				})
+			},
+			close () {
+				this.$refs.inputForm.resetFields()
+				this.inputForm.accountDetails = []
+				this.$refs.enclosure.clearUpload()
+				this.visible = false
+			},
+			footerMethod ({ columns, data }) {
+				const footerData = [
+					columns.map((column, columnIndex) => {
+						if (columnIndex === 0) {
+							return '总报销费用'
+						}
+						if (['number'].includes(column.property)) {
+							// eslint-disable-next-line no-undef
+							this.inputForm.totalNum = XEUtils.sum(data, column.property)
+							return XEUtils.sum(data, column.property)
+						}
+						return null
+					})
+				]
+				return footerData
+			},
+			// 新增
+			async insertEvent (type) {
+				if (type === 'detail') {
+					let d = {
+						userName: this.$store.state.user.name,
+						deptName: this.$store.state.user.office.name,
+						userId: this.$store.state.user.id,
+						deptId: this.$store.state.user.office.id
+					}
+					if (this.commonJS.isEmpty(this.inputForm.accountDetails)) {
+						this.inputForm.accountDetails = []
+					}
+					this.$refs.detailTable.insertAt(d)
+					this.inputForm.accountDetails.push(d)
+					this.detailKey = Math.random()
+				}
+			},
+			// 报销人下拉弹窗
+			userPullListForm (rowIndex) {
+				this.indexRow = rowIndex
+				this.$refs.userPullForm.init()
+			},
+			getProgramForUser (rows) {
+				this.inputForm.accountDetails[this.indexRow].userId = rows[0].id
+				this.inputForm.accountDetails[this.indexRow].userName = rows[0].name
+				this.inputForm.accountDetails[this.indexRow].deptId = rows[0].parentId
+				this.inputForm.accountDetails[this.indexRow].deptName = rows[0].officeName
+				this.indexRow = ''
+				this.$forceUpdate()
+			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				var len1 = str.substr(0, 1)
+				var len2 = str.substr(1, 1)
+				// eslint-disable-next-line eqeqeq
+				if (str.length > 1 && len1 == 0 && len2 != '.') {
+					str = str.substr(1, 1)
+				}
+				// eslint-disable-next-line eqeqeq
+				if (len1 == '.') {
+					str = ''
+				}
+				// eslint-disable-next-line eqeqeq
+				if (str.indexOf('.') != -1) {
+					var str_ = str.substr(str.indexOf('.') + 1)
+					// eslint-disable-next-line eqeqeq
+					if (str_.indexOf('.') != -1) {
+						str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+					}
+					if (str_.length > 2) {
+						this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+						return (str = '')
+					}
+				}
+				// eslint-disable-next-line no-useless-escape
+				str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+				return str
+			},
+			// 删除
+			removeEvent (row, rowIndex, type) {
+				if (type === 'detail') {
+					this.$refs.detailTable.remove(row)
+					this.inputForm.accountDetails.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm (rowIndex, row) {
+				this.indexRow = rowIndex
+				this.$refs.registerChoose.init()
+			},
+			getProgram (rows) {
+				if (this.commonJS.isNotEmpty(rows)) {
+					this.inputForm.accountDetails[this.indexRow].registerId = rows.map(item => { return item.id }).join(',')
+					this.inputForm.accountDetails[this.indexRow].registerName = rows.map(item => { return item.reimbuserName }).join(',')
+					this.inputForm.accountDetails[this.indexRow].number = rows.totalNum
+					this.detailKey = Math.random()
+				}
+				this.indexRow = ''
+				this.$forceUpdate()
+			},
+			tabHandleClick (event) {
+				// console.log(event)
+			},
+		}
+	}
+</script>

+ 404 - 0
src/views/human/practice/reimburseRegister/ReimburseSubmitAccountList.vue

@@ -0,0 +1,404 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="项目编号" prop="projectNumber">
+				<el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('reimburseRegister:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:print-config="{}"
+					:export-config="{
+                    remote: true,
+                    filename: `实习-报销${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '实习-报销信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="报销编号" field="no"></vxe-column>
+					<vxe-column min-width="160" align="center" title="经办人" field="operator"></vxe-column>
+					<vxe-column min-width="160" align="center" title="报销日期" field="reimDate"></vxe-column>
+					<vxe-column min-width="160" align="center" title="报销金额(元)" field="totalNum"></vxe-column>
+					<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="200px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="editForm(scope.row.id)">修改</el-button>
+								<el-button v-if="
+                      scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
+							</div>
+							<div v-else>
+								<el-button v-if="hasPermission('reimburseRegister:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+								<el-button v-if="hasPermission('reimburseRegister:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '2')" text type="primary"  @click="reback(scope.row)">撤回</el-button>
+								<el-button v-if="hasPermission('reimburseRegister:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+								<!--              审核-->
+								<el-button v-if="scope.row.type==='2'&& checkIsAudit(scope.row)" text type="primary"  @click="examine(scope.row)">审核</el-button>
+								<!--              被驳回后当前申请人重新调整-->
+								<el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.type === '4'" text type="primary"  @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+		</div>
+		<ReimburseSubmitAccountEditForm ref="reimburseSubmitAccountEditForm" @refreshList="refreshList"></ReimburseSubmitAccountEditForm>
+	</div>
+</template>
+
+<script>
+	import reimburseSubmitAccountService from '@/api/human/register/ReimburseSubmitAccountService'
+	import processService from '@/api/flowable/ProcessService'
+	import userService from '@/api/sys/UserService'
+	import taskService from '@/api/flowable/TaskService'
+	import pick from "lodash.pick";
+	import ReimburseSubmitAccountEditForm from "./ReimburseSubmitAccountEditForm";
+	export default {
+		data () {
+			return {
+				num: 0,
+				searchForm: {
+					projectNumber: '',
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false,
+				processDefinitionAuditId: '',
+				procDefAuditKey: '',
+				isAdmin: false,
+				create: '',
+				haveProjectIds: ''
+			}
+		},
+		created () {
+		},
+		components: {
+			ReimburseSubmitAccountEditForm
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.$nextTick(() => {
+				//将表格和工具栏进行关联
+				const $table = this.$refs.clientTable;
+				const $toolbar = this.$refs.toolbarRef;
+				$table.connect($toolbar);
+			})
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			// 新增
+			add () {
+			},
+			// 修改
+			editForm (id) {
+				id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				})[0]
+				this.$refs.reimburseSubmitAccountEditForm.init('edit', id)
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				reimburseSubmitAccountService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('实习-报销').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionAuditId = data.id
+						this.procDefAuditKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			// 修改
+			edit (row) {
+				// 暂存修改
+				let status = ''
+				if (row.type === '1') {
+					status = 'startAndHold'
+				}
+				// 撤回或者驳回修改
+				if (row.type === '3') {
+					status = 'startAndClose'
+				} else if (row.status === '4') {
+					status = 'reapplyFlag'
+				}
+				// 读取流程表单
+				let tabTitle = `发起流程【实习-报销】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-报销]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+					businessId: row.id,
+					businessTable: 'human_resources_practice_reimburse_submit_account',
+					status: status
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionAuditId,
+							procDefKey: this.procDefKey,
+							status: status,
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessTable: 'human_resources_practice_reimburse_submit_account',
+							businessId: row.id,
+							isShow: false,
+							routePath: '/human/reimburseRegister/ReimburseSubmitAccountList'
+						}
+					})
+				})
+			},
+			start () {
+				// 读取流程表单
+				let tabTitle = `发起流程【实习-报销】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [实习-报销]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+					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.processDefinitionAuditId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/human/reimburseRegister/ReimburseSubmitAccountList'
+						}
+					})
+				})
+			},
+			// 撤回
+			reback (row) {
+				this.$confirm(`确定撤回流程吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					processService.revokeProcIns(row.procInsId).then((data) => {
+						let param = {type: '3', id: row.id}
+						reimburseSubmitAccountService.updateStatusById(param)
+						this.$message.success('回退成功')
+						this.refreshList()
+					})
+				})
+			},
+			// 审核
+			examine (row) {
+				reimburseSubmitAccountService.findById(row.id).then((data) => {
+					if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 查看流程结果
+			detail (row) {
+				if (!this.commonJS.isEmpty(row.type) && row.type !== '1') {
+					// eslint-disable-next-line eqeqeq
+					taskService.getTaskDef({
+						procInsId: row.procInsId,
+						procDefId: this.processDefinitionAuditId
+					}).then((data) => {
+						this.$router.push({
+							path: '/flowable/task/TaskFormDetail',
+							query: {
+								...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+								isShow: 'false',
+								readOnly: true,
+								title: '实习-报销' + '流程详情',
+								formTitle: '实习-报销' + '流程详情',
+								businessId: row.id,
+								status: 'reback'
+							}
+						})
+					})
+				}
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/human/reimburseRegister/ReimburseSubmitAccountList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				console.log('row', row)
+				reimburseSubmitAccountService.findById(row.id).then((data) => {
+					console.log('data', data)
+					if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 自定义服务端导出
+			exportMethod ({ options }) {
+				// 传给服务端的参数
+				const params = {
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm,
+					filename: options.filename,
+					sheetName: options.sheetName,
+					isHeader: options.isHeader,
+					original: options.original,
+					mode: options.mode,
+					selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+					exportFields: options.columns.map(column => column.property)
+				}
+				return reimburseSubmitAccountService.exportExcel(params).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, options.filename)
+				}).catch(function (err) {
+					if (err.response) {
+						// console.log(err.response)
+					}
+				})
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					reimburseSubmitAccountService.remove(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+		}
+	}
+</script>