sangwenwei hace 1 año
padre
commit
8ebf257a31

+ 16 - 0
src/api/jy/BorrowService.js

@@ -114,4 +114,20 @@ export default class BorrowService{
 		})
 	}
 
+	backSourceData(id) {
+		return request({
+			url: prefix + "/borrow/backSourceData",
+			method: "get",
+			params: { id: id },
+		});
+	}
+
+	getByReId (id) {
+		return request({
+			url: prefix +'/borrow/getByReId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

+ 4 - 4
src/views/jy/borrowMoney/BorrowDia.vue

@@ -40,7 +40,7 @@
 				<el-col :span="12">
 					<el-form-item label="借款金额(大写)" prop="money"
 								  :rules="[]">
-						<el-input :disabled="true" v-model="inputForm.money"></el-input>
+						<el-input :disabled="true" v-model="inputForm.money" placeholder="请输入借款金额"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -56,13 +56,13 @@
 				<el-col :span="12">
 					<el-form-item label="还款金额(大写)" prop="refund"
 								  :rules="[]">
-						<el-input :disabled="true" v-model="inputForm.refund"></el-input>
+						<el-input :disabled="true" v-model="inputForm.refund" placeholder="请输入还款金额"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
 					<el-form-item label="剩余借款金额" prop="finalMoney"
 								  :rules="[]">
-						<el-input :disabled="true" v-model="inputForm.finalMoney"></el-input>
+						<el-input :disabled="true" v-model="inputForm.finalMoney" placeholder="请输入剩余借款金额"></el-input>
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -200,7 +200,7 @@
 					this.loading = true
 					if (this.commonJS.isNotEmpty(this.inputForm.id)) {
 						console.log('this.inputForm.id', this.inputForm.id)
-						this.borrowService.queryById(this.inputForm.id).then((data)=>{
+						this.borrowService.getByReId(this.inputForm.id).then((data)=>{
 							console.log('this.inputForm', this.inputForm)
 							this.inputForm = this.recover(this.inputForm, data)
 							if (this.commonJS.isEmpty(this.inputForm.createName)){

+ 28 - 2
src/views/jy/borrowMoney/BorrowMoneyList.vue

@@ -136,7 +136,7 @@
 								<el-button v-if="hasPermission('borrow:edit')&&scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
 								<el-button v-if="hasPermission('borrow:edit')&&scope.row.status === '5'&&scope.row.createById === $store.state.user.id &&(commonJS.isEmpty(scope.row.refundStatus) ||scope.row.refundStatus === '0' || scope.row.refundStatus === '1' || scope.row.refundStatus === '5' || scope.row.refundStatus=== '3')" text type="primary" size="small" @click="addRefund(scope.row)">还款申请</el-button>
 								<el-button v-if="hasPermission('borrow:edit')&&scope.row.createById === $store.state.user.id && scope.row.refundStatus==='2'" text type="primary" size="small" @click="rebackAccount(scope.row)">还款撤回</el-button>
-<!--								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.refundStatus==='3'" text type="primary" size="small" @click="rebackRequest(scope.row)">取消还款</el-button>-->
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.refundStatus==='3'" text type="primary" size="small" @click="rebackRequest(scope.row)">取消还款</el-button>
 
 								<el-button v-if="hasPermission('borrow:edit')&&scope.row.refundStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineAccount(scope.row)">还款审核</el-button>
 								<el-button v-if="hasPermission('borrow:edit')&&scope.row.refundStatus === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjustAccount(scope.row)">还款驳回调整</el-button>
@@ -574,7 +574,7 @@
 					})
 				}
 			},
-			// 撤回用车结算
+			// 还款撤回
 			rebackAccount (row) {
 				this.$confirm(`确定要撤回该申请吗?`, '提示', {
 					confirmButtonText: '确定',
@@ -667,6 +667,32 @@
 					}
 				})
 			},
+			//取消还款
+			rebackRequest (row) {
+				this.borrowService.queryById(row.refundId).then((data) => {
+					if (data.refundStatus !== '3') { // status的值不等于“撤回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.$confirm(`确定要取消修改申请吗?`, '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							this.borrowService.backSourceData(row.refundId).then((data) => {
+								if (data.result === 'success') {
+									this.$message.success('取消修改申请成功')
+								} else {
+									this.$message.error('取消修改申请失败')
+								}
+								this.refreshList()
+							}).catch(() => {
+								this.refreshList()
+							})
+						})
+					}
+				})
+			},
 
 
 

+ 14 - 3
src/views/jy/daily/MeetingForm.vue

@@ -8,7 +8,7 @@
 			@close="close"
 			@keyup.enter.native=""
 			v-model="visible">
-		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'|| method === 'view'"
 				 label-width="160px" @submit.native.prevent>
 			<el-divider content-position="left"><i class="el-icon-document"></i>
 				会议室预约
@@ -186,9 +186,17 @@
 					createDate:'',
 					remarks:'',
 				}
-				this.visible= true
-				this.inputForm.id = id
+				if (method === 'add') {
+					this.title = `新建会议室预约信息`
+				} else if (method === 'edit') {
+					this.inputForm.id = id
+					this.title = '修改会议室预约信息'
+				} else if (method === 'view') {
+					this.inputForm.id = id
+					this.title = '查看会议室预约信息'
+				}
 				this.loading = false
+				this.visible= true
 				this.$nextTick(() => {
 					this.$refs.inputForm.resetFields()
 					this.loading = true
@@ -206,6 +214,9 @@
 							if (this.commonJS.isEmpty(this.inputForm.createDate)) {
 								this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
 							}
+							if(this.commonJS.isNotEmpty(data.startTime)){
+								this.inputForm.startTime = data.startTime
+							}
 						})
 						this.loading = false
 					}

+ 32 - 3
src/views/jy/daily/MeetingRoomForm.vue

@@ -286,22 +286,51 @@
 						this.$message.error('请输入会议标题')
 						this.loading = false
 					}
+					if (this.commonJS.isNotEmpty(this.inputForm.startDate)){
+						const now = this.moment(new Date()).format('YYYY-MM-DD'); // 获取当前时间
+						console.log('now',now)
+						if (new Date(now) > new Date(this.inputForm.startDate)){
+							this.loading = false
+							this.$message.error('请选择今天或之后的日期')
+							throw new Error()
+						}
+					}
 					if (this.commonJS.isNotEmpty(this.inputForm.startTime)){
+						console.log('this.dateList',this.dateList)
 						for (let i = 0; i <this.dateList.length ; i++) {
-							console.log('this.dateList',this.dateList)
 							if (this.dateList[i].disabled === true && this.dateList[i].value === this.inputForm.startTime){
-								this.$message.error('会议室当前无空余,请选择其他时间')
 								this.loading = false
-								return
+								this.$message.error('会议室当前无空余,请选择其他时间')
+								throw new Error()
 							}
 						}
 					}
 
+
 					// 送审  待审核
 					this.inputForm.status = '2'
 				} else if (status === 'agree') {
 					this.inputForm.status= '5'
 				} else if (status === 'reapply') {
+					if (this.commonJS.isNotEmpty(this.inputForm.startDate)){
+						const now = this.moment(new Date()).format('YYYY-MM-DD'); // 获取当前时间
+						console.log('now',now)
+						if (new Date(now) > new Date(this.inputForm.startDate)){
+							this.loading = false
+							this.$message.error('请选择今天或之后的日期')
+							throw new Error()
+						}
+					}
+					if (this.commonJS.isNotEmpty(this.inputForm.startTime)){
+						console.log('this.dateList',this.dateList)
+						for (let i = 0; i <this.dateList.length ; i++) {
+							if (this.dateList[i].disabled === true && this.dateList[i].value === this.inputForm.startTime){
+								this.loading = false
+								this.$message.error('会议室当前无空余,请选择其他时间')
+								throw new Error()
+							}
+						}
+					}
 					this.inputForm.status = '2'
 				}
 				this.$refs['inputForm'].validate((valid) => {

+ 8 - 4
src/views/jy/daily/MeetingRoomList.vue

@@ -81,7 +81,11 @@
 					:data="dataList"
 					:checkbox-config="{}">
 					<vxe-column type="seq" width="60" title="序号"></vxe-column>
-					<vxe-column min-width="160" align="center" title="标题" field="title"></vxe-column>
+					<vxe-column min-width="160" align="center" title="标题" field="title">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.title}}</el-link>
+						</template>
+					</vxe-column>
 					<vxe-column min-width="160" align="center" title="会议开始时间" field="startDateTime"></vxe-column>
 					<vxe-column min-width="160" align="center" title="会议时长" field="duration">
 						<template #default="scope">
@@ -274,11 +278,11 @@
 			},
 			// 查看
 			view (row) {
-				this.dialogTableVisible=true
-				console.log('z',this.gridData)
+				console.log('row',row)
+				this.$refs.meetingForm.init('view',row.id)
 			},
 			adminEdit(id){
-				this.$refs.MeetingForm.init('edit',id)
+				this.$refs.meetingForm.init('edit',id)
 			},
 			// 查询当前用户是否是管理员用户
 			checkIsAdmin () {

+ 3 - 0
src/views/jy/drive/DriveApplyForm.vue

@@ -232,6 +232,9 @@
 							if (this.status === 'audit' || this.status === 'taskFormDetail') {
 								method = 'view'
 							}
+							if (this.commonJS.isEmpty(this.inputForm.projectList)) {
+								this.inputForm.projectList=[]
+							}
 							console.log('me',method)
 							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'driveApply',null,null,null,null,null)
 							this.loading = false

+ 5 - 1
src/views/jy/humanResources/EntryDia.vue

@@ -300,7 +300,11 @@
 					<el-form-item label="试用期限" prop="timeLimit" :rules="[
 							  {required: true, message:'请填写试用期限', trigger: 'blur'}
 						   ]">
-						<el-input style="width: 93%" v-model="inputForm.timeLimit" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>个月
+						<el-input style="width: 100%" v-model="inputForm.timeLimit" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10">
+							<template #suffix>
+								个月
+							</template>
+						</el-input>
 					</el-form-item>
 				</el-col>
 						<el-col :span="12">

+ 5 - 1
src/views/jy/humanResources/EntryForm.vue

@@ -292,7 +292,11 @@
 								<el-form-item label="试用期限" prop="timeLimit" :rules="[
 							  {required: true, message:'请填写试用期限', trigger: 'blur'}
 						   ]">
-									<el-input style="width: 95%" v-model="inputForm.timeLimit" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>个月
+									<el-input style="width: 100%" v-model="inputForm.timeLimit" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10">
+										<template #suffix>
+											个月
+										</template>
+									</el-input>
 								</el-form-item>
 							</el-col>
 						<el-col :span="12">

+ 1 - 1
src/views/jy/humanResources/EntryList.vue

@@ -170,7 +170,7 @@
 								<el-button v-if="hasPermission('entry:edit') && scope.row.type==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
 								<el-button v-if="hasPermission('entry:edit') && scope.row.type === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
 								<!--转正申请								-->
-								<el-button v-if="hasPermission('entry:edit') && scope.row.type === '5' && scope.row.onJobStatus === '1' &&(scope.row.applyStatus === '0'||scope.row.applyStatus === '1'|| scope.row.applyStatus === '3')" text type="primary" size="small" @click="apply(scope.row)">转正申请</el-button>
+								<el-button v-if="hasPermission('entry:edit') && scope.row.userId === $store.state.user.id && scope.row.type === '5' && scope.row.onJobStatus === '1' &&(scope.row.applyStatus === '0'||scope.row.applyStatus === '1'|| scope.row.applyStatus === '3')" text type="primary" size="small" @click="apply(scope.row)">转正申请</el-button>
 								<el-button v-if="hasPermission('entry:edit') && scope.row.applyStatus==='2'" text type="primary" size="small" @click="rebackApply(scope.row)">撤回</el-button>
 
 								<el-button v-if="hasPermission('entry:edit') && scope.row.applyStatus==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examineApply(scope.row)">审核</el-button>

+ 25 - 6
src/views/jy/humanResources/RegularForm.vue

@@ -64,7 +64,7 @@
 						</el-radio-group>
 					</el-form-item>
 				</el-col>
-				<el-col :span="12" v-show="inputForm.isPass === '1'">
+				<el-col :span="12" v-show="inputForm.isEmploy === '0'">
 					<el-form-item label="是否顺延一个月" prop="isPostpone"
 								  :rules="[{required: true, message:'请选择是否留用', trigger:'blur'}
 								]">
@@ -257,12 +257,16 @@
 							this.loading = false
 							this.$message.error('请选择是否留用')
 							throw new Error()
+						}else {
+							if (this.inputForm.isEmploy === '0'){
+								if (this.commonJS.isEmpty(this.inputForm.isPostpone)){
+									this.loading = false
+									this.$message.error('请选择是否顺延')
+									throw new Error()
+								}
+							}
 						}
-						if (this.commonJS.isEmpty(this.inputForm.isPostpone)){
-							this.loading = false
-							this.$message.error('请选择是否顺延')
-							throw new Error()
-						}
+
 					}
 				}
 				await this.entryService.queryByApplyId(this.inputForm.id).then((data) => {
@@ -323,6 +327,21 @@
 										this.loading = false
 									})
 								})
+							}else {
+								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=>{
+									if (this.commonJS.isNotEmpty(da)) {
+										if (da === '人事管理员审核') {
+											this.inputForm.status = '5'
+										}
+									}
+									let param = {status: this.inputForm.status, id: this.inputForm.id}
+									this.entryService.saveApplyForm(this.inputForm).then((item) => {
+										callback(data.businessTable, data.businessId, this.inputForm,'',item.isPass,item.isEmploy)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								})
 							}
 
 						}

+ 1 - 1
src/views/jy/project/ContractForm.vue

@@ -155,7 +155,7 @@
       list () {
         this.loading = true
         this.searchForm.createBy = this.$store.state.user.id
-		  this.workContractService.list({
+		  this.projectInfoService.findContractPageList({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'orders': this.tablePage.orders,