瀏覽代碼

入离职调整

wangqiang 1 年之前
父節點
當前提交
959219feeb

+ 23 - 18
src/views/human/depart/handover/ComputerArrearsAddForm.vue

@@ -218,27 +218,32 @@
 						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
-								}
-							}
-							if (this.inputForm.imprestAmountArrears == 0) {
-								this.inputForm.type = '5'
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '欠款回收') {
+											this.inputForm.type = '5'
+										}
+										if (data === '电脑款项检查' || data === '欠款校核') {
+											this.inputForm.assignee = this.inputForm.assigneeId
+										}
+									}
+									if (data === '电脑款项检查' & this.inputForm.imprestAmountArrears === 0) {
+										this.inputForm.type = '5'
+									}
+									handoverComputerService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
 							}
-							handoverComputerService.save(this.inputForm).then((data) => {
-								callback(data.businessTable, data.businessId, this.inputForm)
-								this.loading = false
-							}).catch(() => {
-								this.loading = false
-							})
 						})
 
+
 					}
 				})
 			},

+ 25 - 18
src/views/human/depart/handover/HandoverAccountsAddForm.vue

@@ -219,27 +219,34 @@
 						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
-								}
-							}
-							if (this.inputForm.imprestAmountArrears == 0) {
-								this.inputForm.type = '5'
+
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '欠款回收') {
+											this.inputForm.type = '5'
+										}
+										if (data === '检查应收账款' || data === '欠款校核') {
+											this.inputForm.assignee = this.inputForm.assigneeId
+										}
+									}
+									if (data === '检查应收账款' & this.inputForm.imprestAmountArrears === 0) {
+										this.inputForm.type = '5'
+									}
+									handoverAccountsService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
 							}
-							handoverAccountsService.save(this.inputForm).then((data) => {
-								callback(data.businessTable, data.businessId, this.inputForm)
-								this.loading = false
-							}).catch(() => {
-								this.loading = false
-							})
 						})
 
+
+
 					}
 				})
 			},

+ 23 - 18
src/views/human/depart/handover/HandoverImprestAddForm.vue

@@ -218,25 +218,30 @@
 						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
-								}
-							}
-							if (this.inputForm.imprestAmountArrears == 0) {
-								this.inputForm.type = '5'
+
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '欠款回收') {
+											this.inputForm.type = '5'
+										}
+										if (data === '备用金检查' || data === '欠款校核') {
+											this.inputForm.assignee = this.inputForm.assigneeId
+										}
+									}
+									if (data === '备用金检查' & this.inputForm.imprestAmountArrears === 0) {
+										this.inputForm.type = '5'
+									}
+									handoverImprestService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
 							}
-							handoverImprestService.save(this.inputForm).then((data) => {
-								callback(data.businessTable, data.businessId, this.inputForm)
-								this.loading = false
-							}).catch(() => {
-								this.loading = false
-							})
 						})
 
 					}

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

@@ -1,5 +1,6 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
 	<div>
+		<span style="color: red;">因离职,需将门禁卡上交</span>
 	</div>
 </template>
 

+ 23 - 18
src/views/human/depart/handover/HandoverSocialSecurityAddForm.vue

@@ -219,25 +219,30 @@
 						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
-								}
-							}
-							if (this.inputForm.imprestAmountArrears == 0) {
-								this.inputForm.type = '5'
+
+						this.$refs['inputForm'].validate(async (valid) => {
+							if (valid) {
+								this.loading = true
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+									if (this.commonJS.isNotEmpty(data)) {
+										if (data === '欠款回收') {
+											this.inputForm.type = '5'
+										}
+										if (data === '社保账款检查' || data === '欠款校核') {
+											this.inputForm.assignee = this.inputForm.assigneeId
+										}
+									}
+									if (data === '社保账款检查' & this.inputForm.imprestAmountArrears === 0) {
+										this.inputForm.type = '5'
+									}
+									handoverSocialSecurityService.save(this.inputForm).then((data) => {
+										callback(data.businessTable, data.businessId, this.inputForm)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
 							}
-							handoverSocialSecurityService.save(this.inputForm).then((data) => {
-								callback(data.businessTable, data.businessId, this.inputForm)
-								this.loading = false
-							}).catch(() => {
-								this.loading = false
-							})
 						})
 
 					}

+ 3 - 1
src/views/human/practice/reimburseRegister/ReimburseRegisterAddForm.vue

@@ -48,7 +48,7 @@
 						</el-form-item>
 					</el-col>
 				</el-form>
-				<el-form v-else style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+				<el-form v-else-if="this.commonJS.isNotEmpty(this.inputForm.type) & this.inputForm.type !== '4'" style="width: 100%" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
 						 :disabled="true" label-width="110px" @submit.native.prevent>
 					<el-col :span="12">
 						<el-form-item label="是否实习结束" prop="completePractice" :rules="[{required: true, message: '是否实习结束不能为空', trigger: 'change'}]">
@@ -184,6 +184,7 @@
 					allReimbursementAmount: '',
 					reimbuserName: '',
 					completePractice: '',
+					type: '',
 					detailList: [],
 				},
 				keyWatch: '',
@@ -248,6 +249,7 @@
 					allReimbursementAmount: '',
 					reimbuserName: '',
 					completePractice: '',
+					type: '',
 					detailList: [],
 				}
 				if (method === 'add') {