浏览代码

离职bug调整

wangqiang 1 年之前
父节点
当前提交
e8c19c2401

+ 109 - 0
src/views/flowable/task/TaskForm.vue

@@ -854,6 +854,111 @@ export default {
 				})
 			}
 		},
+		reject2(vars) {
+			if (this.procDefId.includes('Process_1667978088459') ||
+				this.procDefId.includes('Process_1668394732246') ||
+				this.procDefId.includes('Process_1668503117077') ||
+				this.procDefId.includes('Process_1669014216650') ||
+				this.procDefId.includes('Process_1669087010742') ||
+				this.procDefId.includes('Process_1668677901585') ||
+				this.procDefId.includes('Process_1670486210438') ||
+				this.procDefId.includes('Process_1668759076824') ||
+				this.procDefId.includes('Process_1670548572652') ||
+				this.procDefId.includes('Process_1670548572655') ||
+				this.procDefId.includes('Process_1669700915383') ||
+				this.procDefId.includes('Process_1669271524486') ||
+				this.procDefId.includes('Process_1669271524487') ||
+				this.procDefId.includes('Process_1669275081328') ||
+				this.procDefId.includes('Process_1669275380218') ||
+				this.procDefId.includes('Process_1672738002595') ||
+				this.procDefId.includes('Process_1662628133027') ||
+				this.procDefId.includes('Process_1663743217785') ||
+				this.procDefId.includes('Process_1664370362499') ||
+				this.procDefId.includes('Process_1666169509264') ||
+				this.procDefId.includes('Process_1666266316011') ||
+				this.procDefId.includes('Process_1666266494837') ||
+				this.procDefId.includes('Process_1666331430821') ||
+				this.procDefId.includes('Process_1666332258192') ||
+				this.procDefId.includes('Process_1665383385070') ||
+				this.procDefId.includes('Process_1665383385071') ||
+				this.procDefId.includes('Process_1665628043339') ||
+				this.procDefId.includes('Process_1665458731435') ||
+				this.procDefId.includes('Process_1669961023358') ||
+				this.procDefId.includes('Process_1673513775015') ||
+				this.procDefId.includes('Process_1673513595904') ||
+				this.procDefId.includes('Process_1673514092406') ||
+				this.procDefId.includes('Process_1673600899831') ||
+				this.procDefId.includes('Process_1673924346231') ||
+				this.procDefId.includes('Process_1673924346232') ||
+				this.procDefId.includes('Process_1667894339167') ||
+				this.procDefId.includes('Process_1678692643340') ||
+				this.procDefId.includes('Process_1683767097901') ||
+				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') ||
+				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')
+			) {
+				if (this.formType === '2') {
+					vars = {...vars, agree: false}
+					// await this.commit(vars) // 驳回
+					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,
+							procInsId: this.procInsId,
+							procDefId: this.procDefId,
+							vars: vars,
+							comment: this.auditForm,
+							assignee: this.auditForm.assignee
+						}).then((data) => {
+							this.$message.success('提交成功')
+							this.changeBusiness()
+							this.$refs.form.close()
+							// 我的通知
+							let createDate = ''
+							this.myNotice(data, this.procDefId, this.title, vars.userName, createDate)
+							useTabs.close()
+							// this.$router.push({path: '/flowable/task/TodoList'})
+							// this.cc(data)
+							if (this.$route.query.routePath) {
+								this.$router.push({path: this.$route.query.routePath})
+							} else {
+								var num = this.$route.query.num
+								if (num === '2') {
+									this.$router.push({path: '/sys/dashboard/workBench/Pending'})
+									this.cc(data)
+								} else if (num === '3') {
+									this.$router.push({path: '/sys/dashboard/workBench/PendingList'})
+									this.cc(data)
+								}else if (this.cs === 'cs') {
+									this.$router.push({path: '/dashboard/index'})
+									this.cc(data)
+								}else if (this.cs === 'cs2') {
+									this.$router.push({path: '/home'})
+									this.cc(data)
+								} else {
+									this.$router.push({path: '/flowable/task/TodoList'})
+									this.cc(data)
+								}
+							}
+						})
+					})
+				}
+			}
+		},
 		// 驳回至指定节点(节点是从0开始)
 		rejectToPointNum (num) {
 			this.$confirm(`确定驳回流程吗?`, '提示', {
@@ -1041,6 +1146,10 @@ export default {
 						if (this.commonJS.isNotEmpty(inputForm)) {
 							if (this.commonJS.isNotEmpty(inputForm.assignee)) {
 								this.auditForm.assignee = inputForm.assignee
+								if ( inputForm.imprestAmountArrears == 0) {
+									this.reject2();
+									return
+								}
 							}
 						}
 						vars = { ...vars, ...inputForm,recordType }

+ 99 - 5
src/views/human/depart/handover/ComputerArrearsAddForm.vue

@@ -1,9 +1,51 @@
 <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="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name" :disabled="true" ></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"
+							:disabled="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="disabledTest"
+					 label-width="100px" @submit.native.prevent>
+				<el-row :gutter="26">
+					<el-col :span="12">
+						<el-form-item label="备用金欠款金额" prop="imprestAmountArrears" :rules="[{required: true, message: '备用金欠款金额不能为空', trigger: 'blur'}]">
+							<el-input v-model="inputForm.imprestAmountArrears" maxlength="15" @input="inputForm.imprestAmountArrears = twoDecimalPlaces(inputForm.imprestAmountArrears)"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
 	</div>
 </template>
 
 <script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverComputerService from '@/api/human/depart/HandoverComputerService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 
@@ -24,6 +66,7 @@
 		},
 		data () {
 			return {
+				disabledTest: false,
 				title: '',
 				method: '',
 				visible: false,
@@ -31,11 +74,11 @@
 				inputForm: {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				},
 				keyWatch: '',
 			}
@@ -45,6 +88,7 @@
 			this.commonApi = new CommonApi()
 		},
 		components: {
+			SelectTree,
 		},
 		computed: {
 			bus: {
@@ -91,11 +135,11 @@
 				this.inputForm = {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				}
 				if (method === 'add') {
 					this.title = `新建电脑款项检查`
@@ -113,7 +157,7 @@
 						}
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-
+						this.determineDisabled()
 						this.loading = false
 					})
 				})
@@ -181,6 +225,9 @@
 									this.inputForm.assignee = this.inputForm.assigneeId
 								}
 							}
+							if (this.inputForm.imprestAmountArrears == 0) {
+								this.inputForm.type = '5'
+							}
 							handoverComputerService.save(this.inputForm).then((data) => {
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
@@ -234,6 +281,53 @@
 					})
 				}
 			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				str=str.replace(/\s+/g,"");
+				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
+			},
+			determineDisabled(){
+				this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+					if (this.commonJS.isNotEmpty(data)) {
+						console.log('data', data)
+						if (data === '欠款回收' || data === '欠款确认') {
+							this.disabledTest = true
+						} else if (data === '电脑款项检查' || data === '欠款校核') {
+							if (this.status !== 'audit' ){
+								this.disabledTest = true
+							}else {
+								this.disabledTest = false
+							}
+						}
+					} else {
+						this.disabledTest = true
+					}
+				})
+			}
 		}
 	}
 </script>

+ 37 - 4
src/views/human/depart/handover/DraftAddForm.vue

@@ -1,9 +1,41 @@
 <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="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name" :disabled="true" ></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"
+							:disabled="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
 	</div>
 </template>
 
 <script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverDraftService from '@/api/human/depart/HandoverDraftService'
 
 	export default {
@@ -31,9 +63,9 @@
 					userId: '',
 					name: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
+					type: '',
+					department: '',
 				},
 				keyWatch: '',
 			}
@@ -41,6 +73,7 @@
 		created () {
 		},
 		components: {
+			SelectTree,
 		},
 		computed: {
 			bus: {
@@ -88,9 +121,9 @@
 					userId: '',
 					name: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
+					type: '',
+					department: '',
 				}
 				if (method === 'add') {
 					this.title = `新建底稿归档`

+ 141 - 40
src/views/human/depart/handover/HandoverAccountsAddForm.vue

@@ -1,9 +1,51 @@
 <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="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name" :disabled="true" ></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"
+							:disabled="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="disabledTest"
+					 label-width="100px" @submit.native.prevent>
+				<el-row :gutter="26">
+					<el-col :span="12">
+						<el-form-item label="应收账款欠款金额" prop="imprestAmountArrears" :rules="[{required: true, message: '应收账款欠款金额不能为空', trigger: 'blur'}]">
+							<el-input v-model="inputForm.imprestAmountArrears" maxlength="15" @input="inputForm.imprestAmountArrears = twoDecimalPlaces(inputForm.imprestAmountArrears)"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
 	</div>
 </template>
 
 <script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverAccountsService from '@/api/human/depart/HandoverAccountsService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 
@@ -24,6 +66,7 @@
 		},
 		data () {
 			return {
+				disabledTest: false,
 				title: '',
 				method: '',
 				visible: false,
@@ -31,11 +74,11 @@
 				inputForm: {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				},
 				keyWatch: '',
 			}
@@ -45,6 +88,7 @@
 			this.commonApi = new CommonApi()
 		},
 		components: {
+			SelectTree,
 		},
 		computed: {
 			bus: {
@@ -91,11 +135,11 @@
 				this.inputForm = {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				}
 				if (method === 'add') {
 					this.title = `新建应收账款检查`
@@ -113,6 +157,7 @@
 						}
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.determineDisabled()
 
 						this.loading = false
 					})
@@ -181,6 +226,9 @@
 									this.inputForm.assignee = this.inputForm.assigneeId
 								}
 							}
+							if (this.inputForm.imprestAmountArrears == 0) {
+								this.inputForm.type = '5'
+							}
 							handoverAccountsService.save(this.inputForm).then((data) => {
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
@@ -194,46 +242,99 @@
 			},
 			// 修改状态
 			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(() => {
+				if (this.inputForm.imprestAmountArrears != 0) {
+					if (type === 'reject') {
+						this.loading = true
+
+						handoverAccountsService.findById(this.inputForm.id).then((data) => {
+							if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
 								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.$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
-								callback()
-							})
-						}
-					})
+								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+								throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							} else {
+								this.inputForm.type = '1'
+								handoverAccountsService.updateStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						})
+					}
+				} else {
+					callback()
 				}
 			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				str=str.replace(/\s+/g,"");
+				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
+			},
+			determineDisabled(){
+				this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+					if (this.commonJS.isNotEmpty(data)) {
+						console.log('data', data)
+						if (data === '欠款回收' || data === '欠款确认') {
+							this.disabledTest = true
+						} else if (data === '检查应收账款' || data === '欠款校核') {
+							if (this.status !== 'audit' ){
+								this.disabledTest = true
+							}else {
+								this.disabledTest = false
+							}
+						}
+					} else {
+						this.disabledTest = true
+					}
+
+				})
+			}
 		}
 	}
 </script>

+ 99 - 5
src/views/human/depart/handover/HandoverImprestAddForm.vue

@@ -1,9 +1,51 @@
 <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="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name" :disabled="true" ></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"
+							:disabled="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="disabledTest"
+					 label-width="100px" @submit.native.prevent>
+				<el-row :gutter="26">
+					<el-col :span="12">
+						<el-form-item label="备用金欠款金额" prop="imprestAmountArrears" :rules="[{required: true, message: '备用金欠款金额不能为空', trigger: 'blur'}]">
+							<el-input v-model="inputForm.imprestAmountArrears" maxlength="15" @input="inputForm.imprestAmountArrears = twoDecimalPlaces(inputForm.imprestAmountArrears)"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
 	</div>
 </template>
 
 <script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverImprestService from '@/api/human/depart/HandoverImprestService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 
@@ -24,6 +66,7 @@
 		},
 		data () {
 			return {
+				disabledTest: false,
 				title: '',
 				method: '',
 				visible: false,
@@ -31,11 +74,11 @@
 				inputForm: {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				},
 				keyWatch: '',
 			}
@@ -45,6 +88,7 @@
 			this.commonApi = new CommonApi()
 		},
 		components: {
+			SelectTree,
 		},
 		computed: {
 			bus: {
@@ -92,10 +136,10 @@
 					userId: '',
 					name: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
+					imprestAmountArrears: '',
 				}
 				if (method === 'add') {
 					this.title = `新建备用金检查`
@@ -113,7 +157,7 @@
 						}
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
-
+						this.determineDisabled()
 						this.loading = false
 					})
 				})
@@ -181,6 +225,9 @@
 									this.inputForm.assignee = this.inputForm.assigneeId
 								}
 							}
+							if (this.inputForm.imprestAmountArrears == 0) {
+								this.inputForm.type = '5'
+							}
 							handoverImprestService.save(this.inputForm).then((data) => {
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
@@ -234,6 +281,53 @@
 					})
 				}
 			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				str=str.replace(/\s+/g,"");
+				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
+			},
+			determineDisabled(){
+				this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+					if (this.commonJS.isNotEmpty(data)) {
+						console.log('data', data)
+						if (data === '欠款回收' || data === '欠款确认') {
+							this.disabledTest = true
+						} else if (data === '备用金检查' || data === '欠款校核') {
+							if (this.status !== 'audit' ){
+								this.disabledTest = true
+							}else {
+								this.disabledTest = false
+							}
+						}
+					} else {
+						this.disabledTest = true
+					}
+				})
+			}
 		}
 	}
 </script>

+ 100 - 4
src/views/human/depart/handover/HandoverSocialSecurityAddForm.vue

@@ -1,9 +1,51 @@
 <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="name" :rules="[{required: true, message: '姓名不能为空', trigger: 'blur'}]">
+						<el-input v-model="inputForm.name" :disabled="true" ></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"
+							:disabled="true"
+							:accordion="true"
+							size="default"
+							@getValue="(value) => {inputForm.department=value}"/>
+					</el-form-item>
+				</el-col>
+			</el-row>
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="disabledTest"
+					 label-width="100px" @submit.native.prevent>
+				<el-row :gutter="26">
+					<el-col :span="12">
+						<el-form-item label="社保款项欠款金额" prop="imprestAmountArrears" :rules="[{required: true, message: '社保款项欠款金额不能为空', trigger: 'blur'}]">
+							<el-input v-model="inputForm.imprestAmountArrears" maxlength="15" @input="inputForm.imprestAmountArrears = twoDecimalPlaces(inputForm.imprestAmountArrears)"></el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+		</el-form>
 	</div>
 </template>
 
 <script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
 	import handoverSocialSecurityService from '@/api/human/depart/HandoverSocialSecurityService'
 	import CommonApi from '@/api/cw/common/CommonApi'
 
@@ -24,6 +66,7 @@
 		},
 		data () {
 			return {
+				disabledTest: false,
 				title: '',
 				method: '',
 				visible: false,
@@ -31,11 +74,11 @@
 				inputForm: {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				},
 				keyWatch: '',
 			}
@@ -45,6 +88,7 @@
 			this.commonApi = new CommonApi()
 		},
 		components: {
+			SelectTree,
 		},
 		computed: {
 			bus: {
@@ -91,11 +135,11 @@
 				this.inputForm = {
 					userId: '',
 					name: '',
+					imprestAmountArrears: '',
 					procInsId: '',
-					handoverId: '',
 					assigneeId: '',
-					draftAdministrator: '',
 					type: '',
+					department: '',
 				}
 				if (method === 'add') {
 					this.title = `新建社保款项检查`
@@ -113,6 +157,7 @@
 						}
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.determineDisabled()
 
 						this.loading = false
 					})
@@ -181,6 +226,9 @@
 									this.inputForm.assignee = this.inputForm.assigneeId
 								}
 							}
+							if (this.inputForm.imprestAmountArrears == 0) {
+								this.inputForm.type = '5'
+							}
 							handoverSocialSecurityService.save(this.inputForm).then((data) => {
 								callback(data.businessTable, data.businessId, this.inputForm)
 								this.loading = false
@@ -234,6 +282,54 @@
 					})
 				}
 			},
+			twoDecimalPlaces (num) {
+				let str = num.toString()
+				str=str.replace(/\s+/g,"");
+				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
+			},
+			determineDisabled(){
+				this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+					if (this.commonJS.isNotEmpty(data)) {
+						console.log('data', data)
+						if (data === '欠款回收' || data === '欠款确认') {
+							this.disabledTest = true
+						} else if (data === '社保账款检查' || data === '欠款校核') {
+							if (this.status !== 'audit' ){
+								this.disabledTest = true
+							}else {
+								this.disabledTest = false
+							}
+						}
+					} else {
+						this.disabledTest = true
+					}
+
+				})
+			}
 		}
 	}
 </script>

+ 125 - 5
src/views/human/depart/registration/DepartRegistrationList.vue

@@ -15,7 +15,7 @@
       <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>-->
-          <el-button  type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+          <el-button v-if="!haveComplete" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 90px)">
@@ -64,6 +64,34 @@
 						{{$dictUtils.getDictLabel("status", scope.row.handoverType, '未开始')}} </el-button>
 				</template>
 			</vxe-column>
+			<vxe-column min-width="100" title="电脑款项状态" fixed="right" align="center" field="computerType">
+				<template #default="scope">
+					<el-button @click="computerHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.computerType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.computerType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="应收账款状态" fixed="right" align="center" field="accountsType">
+				<template #default="scope">
+					<el-button @click="accountsHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.accountsType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.accountsType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="社保账款状态" fixed="right" align="center" field="securityType">
+				<template #default="scope">
+					<el-button @click="securityHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.securityType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.securityType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="备用金状态" fixed="right" align="center" field="imprestType">
+				<template #default="scope">
+					<el-button @click="imprestHandoverDetail(scope.row)"
+							   :type="$dictUtils.getDictLabel('status_info', scope.row.imprestType, '')" effect="dark" >
+						{{$dictUtils.getDictLabel("status", scope.row.imprestType, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
 
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  #default="scope">
@@ -115,7 +143,7 @@
   export default {
     data () {
       return {
-		  // haveComplete: false,
+		  haveComplete: false,
         num: 0,
         searchForm: {
           projectNumber: '',
@@ -211,9 +239,9 @@
 				  this.handoverDefAuditKey = data.key
 			  }
 		  })
-		  // departRegistrationService.selectComplete().then((data) => {
-			// 	this.haveComplete = data
-		  // })
+		  departRegistrationService.selectComplete().then((data) => {
+				this.haveComplete = data
+		  })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -342,6 +370,98 @@
 				})
 			}
 		},
+		// 查看备用金流程结果
+		imprestHandoverDetail (row) {
+			if (row.imprestType !== '0' && row.imprestType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.imprestProcInsId,
+					procDefId: row.imprestProcDefId
+				}).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.imprestId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		// 查看电脑款项流程结果
+		computerHandoverDetail (row) {
+			if (row.computerType !== '0' && row.computerType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.computerProcInsId,
+					procDefId: row.computerProcDefId
+				}).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.computerId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		// 查看应收账款流程结果
+		accountsHandoverDetail (row) {
+			if (row.accountsType !== '0' && row.accountsType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.accountsProcInsId,
+					procDefId: row.accountsProcDefId
+				}).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.accountsId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
+		// 查看社保账款流程结果
+		securityHandoverDetail (row) {
+			if (row.securityType !== '0' && row.securityType !== '1') {
+				// eslint-disable-next-line eqeqeq
+				taskService.getTaskDef({
+					procInsId: row.securityProcInsId,
+					procDefId: row.securityProcDefId
+				}).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.securityId,
+							status: 'reback'
+						}
+					})
+				})
+			}
+		},
       // 自定义服务端导出
       exportMethod ({ options }) {
         // 传给服务端的参数