Forráskód Böngészése

人力资源模块代码提交

wangqiang 1 éve
szülő
commit
96e6b0e9c0

+ 26 - 0
src/api/human/depart/HandoverAccountsService.js

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

+ 26 - 0
src/api/human/depart/HandoverComputerService.js

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

+ 26 - 0
src/api/human/depart/HandoverDraftService.js

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

+ 26 - 0
src/api/human/depart/HandoverImprestService.js

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

+ 26 - 0
src/api/human/depart/HandoverRecoveryService.js

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

+ 26 - 0
src/api/human/depart/HandoverService.js

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

+ 26 - 0
src/api/human/depart/HandoverSocialSecurityService.js

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

+ 4 - 1
src/views/common/UpLoadComponentV2.1.vue

@@ -1,6 +1,6 @@
 <!--文件上传组件-->
 <template>
-  <div>
+  <div :key="uploadKey">
     <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
     <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
                :limit="999" :http-request="httpRequest"
@@ -131,6 +131,7 @@
   export default {
     data () {
       return {
+		  uploadKey: '',
         progressFlag: false,
         loadProgress: 0,
         fileList: [],
@@ -511,6 +512,7 @@
           }
         }
         this.tableKey = Math.random()
+		  this.uploadKey = Math.random()
       },
       showFile (row) {
         openWindowOnUrl(row)
@@ -531,6 +533,7 @@
 		  await this.dataListNew.splice(index, 1)
 		  await this.dataList.splice(index, 1)
 		  this.tableKey = Math.random()
+		  this.uploadKey = Math.random()
       },
       /**
        * 关闭dialog时使用  清除el-upload中上传的文件

+ 21 - 1
src/views/dashboard/widgets/components/MyNoticePageList.vue

@@ -66,12 +66,16 @@
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
 	<RegisterPopup ref="registerPopup"></RegisterPopup>
 	<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
+	<DepartPopup ref="departPopup"></DepartPopup>
+	<DepartProvePopup ref="departProvePopup"></DepartProvePopup>
 </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 DepartPopup from '@/views/human/depart/handover/DepartPopup'
+	import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
 // import notifyService from "@/api/notify/notifyService";
 import noticeService from '@/api/flowable/NoticeService'
 import taskService from "@/api/flowable/taskService";
@@ -88,6 +92,8 @@ export default {
 		WareHouseHistoryPopup,
 		RegisterPopup,
 		KeyCardPopup,
+		DepartPopup,
+		DepartProvePopup,
 	},
 	data() {
 		return {
@@ -141,7 +147,21 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
-			} else {
+			}else if (row.taskName.includes('离职提醒')) {
+				this.$refs.departPopup.init(row.taskName)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else if (row.taskName.includes('请点击下载离职证明')) {
+				this.$refs.departProvePopup.init(row.taskName)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else {
 				this.inputForm = {
 					taskId: '',
 					noticeId: ''

+ 30 - 0
src/views/flowable/task/NoticePageList.vue

@@ -66,6 +66,9 @@
       </div>
     <WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
 	  <RegisterPopup ref="registerPopup"></RegisterPopup>
+	  <KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
+	  <DepartPopup ref="departPopup"></DepartPopup>
+	  <DepartProvePopup ref="departProvePopup"></DepartProvePopup>
   </div>
 </template>
 
@@ -74,6 +77,9 @@
   import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
   import taskService from '@/api/flowable/taskService'
   import noticeService from '@/api/flowable/noticeService'
+  import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
+  import DepartPopup from '@/views/human/depart/handover/DepartPopup'
+  import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
   import pick from 'lodash.pick'
   export default {
     data () {
@@ -108,6 +114,9 @@
     components: {
       WareHouseHistoryPopup,
 		RegisterPopup,
+		KeyCardPopup,
+		DepartPopup,
+		DepartProvePopup,
     },
     methods: {
       // 获取数据列表
@@ -150,6 +159,27 @@
 			}
 			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 if (row.taskName.includes('离职提醒')) {
+			this.$refs.departPopup.init(row.taskName)
+			this.inputForm = {
+				id: row.id
+			}
+			noticeService.stockUpdate(this.inputForm)
+			this.resetSearch()
+		}else if (row.taskName.includes('请点击下载离职证明')) {
+			this.$refs.departProvePopup.init(row.taskName)
+			this.inputForm = {
+				id: row.id
+			}
+			noticeService.stockUpdate(this.inputForm)
+			this.resetSearch()
 		}else {
           this.inputForm = {
             taskId: '',

+ 17 - 2
src/views/flowable/task/TaskForm.vue

@@ -697,6 +697,12 @@ export default {
 		// Process_1696643627713 工资卡信息完善
 		// Process_1696643401049 社保登记
 		// Process_1695781849405 员工入职
+		// Process_1698386333871 底稿归档检查
+		// Process_1698981918212 离职交接
+		// Process_1698387196829 电脑欠款回收
+		// Process_1699256313120 应收账款检查
+		// Process_1699321267272 社保账款检查
+		// Process_1699926014064 备用金检查
 
 		// 驳回
 		reject(vars) {
@@ -742,7 +748,13 @@ export default {
 				this.procDefId.includes('Process_1694745513202') ||
 				this.procDefId.includes('Process_1696643627713') ||
 				this.procDefId.includes('Process_1696643401049') ||
-				this.procDefId.includes('Process_1695781849405')
+				this.procDefId.includes('Process_1695781849405') ||
+				this.procDefId.includes('Process_1698386333871') ||
+				this.procDefId.includes('Process_1698981918212') ||
+				this.procDefId.includes('Process_1698387196829') ||
+				this.procDefId.includes('Process_1699256313120') ||
+				this.procDefId.includes('Process_1699321267272') ||
+				this.procDefId.includes('Process_1699926014064')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {
@@ -753,7 +765,10 @@ export default {
 					if (this.formType === '2') {
 						vars = {...vars, agree: false}
 						// await this.commit(vars) // 驳回
-						this.$refs.form.updateStatusById('reject', () => {
+						this.$refs.form.updateStatusById('reject', (assignee) => {
+							if (this.commonJS.isEmpty(this.auditForm.assignee)){
+								this.auditForm.assignee = assignee
+							}
 							taskService.audit({
 								taskId: this.taskId,
 								taskDefKey: this.taskDefKey,

+ 32 - 2
src/views/home/components/MyNoticePageList2.vue

@@ -59,11 +59,17 @@
 	</el-card>
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
 	<RegisterPopup ref="registerPopup"></RegisterPopup>
+	<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
+	<DepartPopup ref="departPopup"></DepartPopup>
+	<DepartProvePopup ref="departProvePopup"></DepartProvePopup>
 </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 DepartPopup from '@/views/human/depart/handover/DepartPopup'
+	import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
 // import notifyService from "@/api/notify/notifyService";
 import noticeService from '@/api/flowable/NoticeService'
 import taskService from "@/api/flowable/taskService";
@@ -79,6 +85,9 @@ export default {
 	components: {
 		WareHouseHistoryPopup,
 		RegisterPopup,
+		KeyCardPopup,
+		DepartPopup,
+		DepartProvePopup,
 	},
 	data() {
 		return {
@@ -133,7 +142,28 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
-			}else {
+			} else if (row.taskName === '门卡领取提醒') {
+				this.$refs.keyCardPopup.init()
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else if (row.taskName.includes('离职提醒')) {
+				this.$refs.departPopup.init(row.taskName)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			}else if (row.taskName.includes('请点击下载离职证明')) {
+				this.$refs.departProvePopup.init(row.taskName)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else {
 				this.inputForm = {
 					taskId: '',
 					noticeId: ''
@@ -194,7 +224,7 @@ export default {
 			this.refreshList();
 		},
 		resetSearch() {
-			this.$refs.searchForm.resetFields();
+			// this.$refs.searchForm.resetFields();
 			this.refreshList();
 		},
 		toPendingList () {

+ 239 - 0
src/views/human/depart/handover/ComputerArrearsAddForm.vue

@@ -0,0 +1,239 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverComputerService from '@/api/human/depart/HandoverComputerService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			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: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				}
+				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
+					handoverComputerService.findById(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
+				handoverComputerService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverComputerService.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.loading = true
+				this.inputForm.type = '2'
+				handoverComputerService.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.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverComputerService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '欠款回收') {
+									this.inputForm.type = '5'
+								}
+								if (data === '电脑款项检查' || data === '欠款校核') {
+									this.inputForm.assignee = this.inputForm.assigneeId
+								}
+							}
+							handoverComputerService.save(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
+					handoverComputerService.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'
+									} else {
+										this.inputForm.type = '2'
+									}
+								}
+							})
+							handoverComputerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverComputerService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverComputerService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 47 - 0
src/views/human/depart/handover/DepartPopup.vue

@@ -0,0 +1,47 @@
+<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); color: red">
+			{{works}}
+		</div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			</span>
+		</template>
+	</el-dialog>
+</template>
+
+<script>
+
+    export default {
+		data () {
+			return {
+				works: '',
+				visible: false,
+				loading: false,
+				isAdmin: false,
+			}
+		},
+		methods: {
+			init (works) {
+				this.visible = true
+				this.works = works
+			},
+			close () {
+				this.visible = false
+			},
+
+		}
+    }
+</script>
+
+<style scoped>
+</style>

+ 64 - 0
src/views/human/depart/handover/DepartProvePopup.vue

@@ -0,0 +1,64 @@
+<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);">
+			{{works}}
+
+			<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 {
+				works: '',
+				visible: false,
+				loading: false,
+				isAdmin: false,
+			}
+		},
+		methods: {
+			init (works) {
+				this.visible = true
+				this.works = works
+			},
+			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>

+ 217 - 0
src/views/human/depart/handover/DraftAddForm.vue

@@ -0,0 +1,217 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverDraftService from '@/api/human/depart/HandoverDraftService'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+				},
+				keyWatch: '',
+			}
+		},
+		created () {
+		},
+		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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+				}
+				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
+					handoverDraftService.findById(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
+				handoverDraftService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverDraftService.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.loading = true
+				this.inputForm.type = '2'
+				handoverDraftService.save(this.inputForm).then((data) => {
+					this.inputForm.title = `${this.$store.state.user.name} 发起了 [底稿归档检查]`
+					this.inputForm.id = data.businessId
+					this.inputForm.assignee = this.inputForm.draftAdministrator
+					callback(data.businessTable, data.businessId, this.inputForm)
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverDraftService.findById(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'
+						handoverDraftService.save(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
+					handoverDraftService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '4'
+							handoverDraftService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback(this.inputForm.assigneeId)
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverDraftService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverDraftService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 239 - 0
src/views/human/depart/handover/HandoverAccountsAddForm.vue

@@ -0,0 +1,239 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverAccountsService from '@/api/human/depart/HandoverAccountsService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			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: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				}
+				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
+					handoverAccountsService.findById(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
+				handoverAccountsService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverAccountsService.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.loading = true
+				this.inputForm.type = '2'
+				handoverAccountsService.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.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverAccountsService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '欠款回收') {
+									this.inputForm.type = '5'
+								}
+								if (data === '检查应收账款' || data === '欠款校核') {
+									this.inputForm.assignee = this.inputForm.assigneeId
+								}
+							}
+							handoverAccountsService.save(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
+					handoverAccountsService.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'
+									} else {
+										this.inputForm.type = '2'
+									}
+								}
+							})
+							handoverAccountsService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverAccountsService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverAccountsService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 44 - 20
src/views/human/depart/handover/HandoverAddForm.vue

@@ -61,7 +61,7 @@
 
 <script>
 	import SelectTree from '@/components/treeSelect/treeSelect.vue'
-	import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
+	import handoverService from '@/api/human/depart/HandoverService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 	import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
 
@@ -94,6 +94,8 @@
 					projectManager: '',
 					draftAdministrator: '',
 					remarks: '',
+					registrationId: '',
+					type: '',
 				},
 				keyWatch: '',
 			}
@@ -154,6 +156,8 @@
 					projectManager: '',
 					draftAdministrator: '',
 					remarks: '',
+					registrationId: '',
+					type: '',
 				}
 				if (method === 'add') {
 					this.title = `新建离职申请`
@@ -165,7 +169,7 @@
 				this.loading = false
 				this.$nextTick(() => {
 					this.loading = true
-					departRegistrationService.findById(this.inputForm.id).then((data) => {
+					handoverService.findById(this.inputForm.id).then((data) => {
 						this.fileList = []
 						this.fileList2 = []
 						if (this.status === 'audit' || this.status === 'taskFormDetail') {
@@ -193,7 +197,7 @@
 							this.inputForm.files = []
 						}
 						this.inputForm.id = this.businessId
-						departRegistrationService.save(this.inputForm).then((data) => {
+						handoverService.save(this.inputForm).then((data) => {
 							this.close()
 							this.$message.success(data)
 							this.$emit('refreshDataList')
@@ -212,7 +216,7 @@
 			},
 			reapplyForm (callback) {
 				this.loading = true
-				departRegistrationService.findById(this.inputForm.id).then((data) => {
+				handoverService.findById(this.inputForm.id).then((data) => {
 					if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -222,15 +226,35 @@
 					}
 				})
 			},
+			//暂存
+			saveForm (callback) {
+				// 暂存
+				this.loading = true
+				this.inputForm.type = '1'
+				if (this.commonJS.isEmpty(this.inputForm.registrationId)) {
+					this.inputForm.registrationId = this.businessId
+				}
+
+				handoverService.save(this.inputForm).then((data) => {
+					callback(data.businessTable, data.businessId, this.inputForm)
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
 			// 送审
 			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} 发起了 [离职申请]`
+						if (this.commonJS.isEmpty(this.inputForm.registrationId)) {
+							this.inputForm.registrationId = this.businessId
+						}
+						handoverService.save(this.inputForm).then((data) => {
+							this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职交接]`
 							this.inputForm.id = data.businessId
+							this.inputForm.assignee = this.inputForm.projectManager
 							callback(data.businessTable, data.businessId, this.inputForm)
 							this.$refs.inputForm.resetFields()
 							this.loading = false
@@ -247,7 +271,7 @@
 			// 通过
 			async agreeForm (callback) {
 				this.loading = true
-				departRegistrationService.findById(this.inputForm.id).then((data) => {
+				handoverService.findById(this.inputForm.id).then((data) => {
 					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
@@ -259,11 +283,11 @@
 
 								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
 									if (this.commonJS.isNotEmpty(data)) {
-										if (data === '办公室主任审批') {
+										if (data === '部门主任审批') {
 											this.inputForm.type = '5'
 										}
 									}
-									departRegistrationService.save(this.inputForm).then((data) => {
+									handoverService.save(this.inputForm).then((data) => {
 										callback(data.businessTable, data.businessId, this.inputForm)
 										this.loading = false
 									}).catch(() => {
@@ -282,36 +306,36 @@
 			updateStatusById (type, callback) {
 				if (type === 'reject') {
 					this.loading = true
-					departRegistrationService.findById(this.inputForm.id).then((data) => {
-
+					handoverService.findById(this.inputForm.id).then((data) => {
+						console.log('进入了驳回')
 						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.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((name) => {
+								if (this.commonJS.isNotEmpty(name)) {
+									if (name === '项目经理审批' || name === '项目经理重新审批') {
 										this.inputForm.type = '4'
 									}
 								}
-							})
-							departRegistrationService.updateStatusById(this.inputForm).then(() => {
-								this.loading = false
-								callback()
+								handoverService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
 							})
 						}
 					})
 				} else if (type === 'hold') {
 					this.loading = true
-					departRegistrationService.findById(this.inputForm.id).then((data) => {
+					handoverService.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(() => {
+							handoverService.updateStatusById(this.inputForm).then(() => {
 								this.loading = false
 								callback()
 							})

+ 239 - 0
src/views/human/depart/handover/HandoverImprestAddForm.vue

@@ -0,0 +1,239 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverImprestService from '@/api/human/depart/HandoverImprestService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			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: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				}
+				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
+					handoverImprestService.findById(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
+				handoverImprestService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverImprestService.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.loading = true
+				this.inputForm.type = '2'
+				handoverImprestService.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.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverImprestService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '欠款回收') {
+									this.inputForm.type = '5'
+								}
+								if (data === '备用金检查' || data === '欠款校核') {
+									this.inputForm.assignee = this.inputForm.assigneeId
+								}
+							}
+							handoverImprestService.save(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
+					handoverImprestService.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'
+									} else {
+										this.inputForm.type = '2'
+									}
+								}
+							})
+							handoverImprestService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverImprestService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverImprestService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 228 - 0
src/views/human/depart/handover/HandoverRecoveryAddForm.vue

@@ -0,0 +1,228 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverRecoveryService from '@/api/human/depart/HandoverRecoveryService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			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: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				}
+				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
+					handoverRecoveryService.findById(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
+				handoverRecoveryService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverRecoveryService.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.loading = true
+				this.inputForm.type = '2'
+				handoverRecoveryService.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.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverRecoveryService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '门卡注销') {
+									this.inputForm.type = '5'
+								}
+							}
+							handoverRecoveryService.save(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
+					handoverRecoveryService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverRecoveryService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverRecoveryService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 239 - 0
src/views/human/depart/handover/HandoverSocialSecurityAddForm.vue

@@ -0,0 +1,239 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+	</div>
+</template>
+
+<script>
+	import handoverSocialSecurityService from '@/api/human/depart/HandoverSocialSecurityService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+
+	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: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			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: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			getUpload () {
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					userId: '',
+					name: '',
+					procInsId: '',
+					handoverId: '',
+					assigneeId: '',
+					draftAdministrator: '',
+					type: '',
+				}
+				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
+					handoverSocialSecurityService.findById(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
+				handoverSocialSecurityService.save(this.inputForm).then((data) => {
+					this.close()
+					this.$message.success(data)
+					this.$emit('refreshDataList')
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			close () {
+				this.fileList = []
+				this.fileList2 = []
+				this.visible = false
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				handoverSocialSecurityService.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.loading = true
+				this.inputForm.type = '2'
+				handoverSocialSecurityService.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.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			// 通过
+			async agreeForm (callback) {
+				this.loading = true
+				handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
+					if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.loading = true
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '欠款回收') {
+									this.inputForm.type = '5'
+								}
+								if (data === '社保账款检查' || data === '欠款校核') {
+									this.inputForm.assignee = this.inputForm.assigneeId
+								}
+							}
+							handoverSocialSecurityService.save(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
+					handoverSocialSecurityService.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'
+									} else {
+										this.inputForm.type = '2'
+									}
+								}
+							})
+							handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				} else if (type === 'hold') {
+					this.loading = true
+					handoverSocialSecurityService.findById(this.inputForm.id).then((data) => {
+						if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.inputForm.type = '1'
+							handoverSocialSecurityService.updateStatusById(this.inputForm).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+		}
+	}
+</script>

+ 77 - 4
src/views/human/depart/registration/DepartRegistrationList.vue

@@ -51,6 +51,13 @@
 					<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 min-width="100" title="交接状态" fixed="right" align="center" field="handoverType">
+				<template #default="scope">
+					<el-button @click="handoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.handoverType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("cw_status", scope.row.handoverType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
 
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  #default="scope">
@@ -68,7 +75,10 @@
 					<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>
+					<el-button v-if="(scope.row.createById === $store.state.user.id) && haveComplete && (scope.row.handoverType === undefined || scope.row.handoverType === '0' || scope.row.handoverType === '1' || scope.row.handoverType === '3')" text type="primary" @click="handover(scope.row)">离职交接</el-button>
+					<!--借用撤回-->
+					<el-button v-if="haveComplete && scope.row.handoverType === '2' && (scope.row.createById === $store.state.user.id)" text type="primary" @click="rebackHandover(scope.row)">撤回离职交接</el-button>
+					<el-button v-if="scope.row.createById === $store.state.user.id&&haveComplete&& scope.row.handoverType === '4'" text type="primary"  @click="adjustHandover(scope.row)">驳回调整</el-button>
 				</div>
             </template>
           </vxe-column>
@@ -89,6 +99,7 @@
 </template>
 
 <script>
+	import handoverService from '@/api/human/depart/HandoverService'
   import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
   import processService from '@/api/flowable/ProcessService'
   import userService from '@/api/sys/UserService'
@@ -184,7 +195,7 @@
             this.procDefAuditKey = data.key
           }
         })
-		  processService.getByName('离职交接').then((data) => {
+		  processService.getByName('离职交接申请').then((data) => {
 			  if (!this.commonJS.isEmpty(data.id)) {
 				  this.handoverDefId = data.id
 				  this.handoverDefAuditKey = data.key
@@ -238,7 +249,7 @@
       },
 		// 查看离职申请流程结果
 		detail (row) {
-			if (row.reviewStatus !== '0' && row.reviewStatus !== '1') {
+			if (row.type !== '0' && row.type !== '1') {
 				// eslint-disable-next-line eqeqeq
 				taskService.getTaskDef({
 					procInsId: row.procInsId,
@@ -259,6 +270,29 @@
 				})
 			}
 		},
+		// 查看离职交接流程结果
+		handoverDetail (row) {
+			if (row.handoverType !== '0' && row.handoverType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.handoverProcInsId,
+					procDefId: this.handoverDefId
+				}).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.handoverId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
       // 自定义服务端导出
       exportMethod ({ options }) {
         // 传给服务端的参数
@@ -376,6 +410,12 @@
 			// 读取流程表单
 			let tabTitle = `发起流程【离职交接】`
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职交接]`
+			let businessId = ''
+			if (this.commonJS.isNotEmpty(row.handoverId)) {
+				businessId = row.handoverId
+			} else {
+				businessId = row.id
+			}
 			taskService.getTaskDef({ procDefId: this.handoverDefId,
 				status: 'startAndHold'}).then((data) => {
 				this.$router.push({
@@ -389,13 +429,46 @@
 						formType: data.formType,
 						formUrl: data.formUrl,
 						formTitle: processTitle,
-						businessId: row.id,
+						businessId: businessId,
 						isShow: false,
 						routePath: '/human/depart/registration/DepartRegistrationList'
 					}
 				})
 			})
 		},
+		// 撤回离职交接
+		rebackHandover (row) {
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => {
+				await handoverService.findById(row.handoverId).then((data) => {
+					if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.handoverProcInsId).then((data) => {
+							let form = {type: '3', id: row.handoverId}
+							handoverService.updateStatusById(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		adjustHandover (row) {
+			handoverService.findById(row.handoverId).then((data) => {
+				if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					row.id = row.handoverId
+					this.handover(row)
+				}
+			})
+		},
     }
   }
 </script>

+ 2 - 2
src/views/human/enrollment/registration/EnrollmentRegistrationList.vue

@@ -57,8 +57,8 @@
           <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="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>