user5 пре 7 месеци
родитељ
комит
b3bdb1168b

+ 8 - 0
src/api/cw/reimbursementApproval/ReimbursementApprovalTypeService.js

@@ -44,4 +44,12 @@ export default class ReimbursementApprovalTypeService {
       params: {id: id}
     })
   }
+
+findReimbursementTypeSingleSelectById (typeId) {
+	return request({
+		url: prefix +'/reimbursementApproval/type/findReimbursementTypeSingleSelectById',
+		method: 'get',
+		params: {typeId: typeId}
+	})
+}
 }

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

@@ -75,5 +75,21 @@ export default class ReimbursementService{
 			params: {projectId: id}
 		})
 	}
+	exportReimbursementProjectFile (params) {
+		return request({
+			url: prefix + '/reimbursement/exportReimbursementProjectFile',
+			method: 'get',
+			params: params,
+			responseType: 'blob'
+		})
+	}
+	exportReimbursementProjectFileById (id) {
+		return request({
+			url: prefix + '/reimbursement/exportReimbursementProjectFileById',
+			method: 'get',
+			params: {id: id},
+			responseType: 'blob'
+		})
+	}
 
 }

+ 13 - 1
src/views/common/UpLoadComponent.vue

@@ -72,6 +72,7 @@
 		// eslint-disable-next-line no-unused-vars
 		handleRemove,
 		fileName,
+		exnameFix,
 		// eslint-disable-next-line no-unused-vars
 		beforeAvatarUpload,
 		// eslint-disable-next-line no-unused-vars
@@ -293,7 +294,18 @@
 				// if (file.status !== 'ready') {
 				//   return
 				// }
-				if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+
+				if (!exnameFix(file, '1', 'doc,docx,pdf')) {
+					for (let i = 0; i <this.dataListNew.length ; i++) {
+						this.deleteById(this.dataListNew[i],i,this.dataListNew)
+					}
+					this.fileList = []
+					this.dataListNew = []
+					// this.$message.error('文件仅支持 xml 格式!')
+					return
+				}
+
+				if (!beforeAvatarUpload(file, 1, this.maxValue)) {
 					this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
 					return
 				}

+ 13 - 2
src/views/jy/drive/DriveApplyForm.vue

@@ -268,7 +268,7 @@
 					// 	this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 					// 	throw new Error()
 					// } else {
-						this.inputForm.status= '2'
+						/*this.inputForm.status= '2'
 						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
 							if (this.commonJS.isNotEmpty(data)) {
 								if (data === '总经理审核') {
@@ -283,7 +283,18 @@
 							}).catch(() => {
 								this.loading = false
 							})
-						})
+						})*/
+
+					this.inputForm.status = '5'
+
+					let param = {status: this.inputForm.status, id: this.inputForm.id}
+					this.inputForm=JSON.stringify(this.inputForm)
+					this.driveService.updateStatusById(param).then(() => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
 					// }
 				})
 			},

+ 1 - 0
src/views/jy/inscription/InscriptionForm.vue

@@ -329,6 +329,7 @@
 								}else if (data === '部门主任审核'){
 									this.inputForm.minister=this.$store.state.user.id
 								}else if (data === '办公室审核'){
+									this.inputForm.status = '5'
 									this.inputForm.examiner=this.$store.state.user.id
 								}
 							}

+ 53 - 4
src/views/jy/reimbursement/ReimbursementForm.vue

@@ -1,4 +1,4 @@
-<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform" xmlns:c="http://www.w3.org/1999/XSL/Transform">
 	<div>
 		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled=" method==='view' || status === 'audit' ||status === 'taskFormDetail'"
 				 label-width="100px" @submit.native.prevent>
@@ -285,6 +285,15 @@
 					<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('project')" plain>
 						新增
 					</el-button>
+					<el-button v-if="inputForm.id"
+						ref="exportButton"
+						style="margin-left: 20px"
+						type="primary"
+						@click="exportReimbursementProjectFileById()"
+						:disabled="false"
+						plain>
+						导出报销详情
+					</el-button>
 				</el-divider>
 				<el-row  :gutter="15" >
 					<el-col :span="24">
@@ -445,6 +454,16 @@
 	import PaymentByUserIdForm from './PaymentByUserIdForm'
 	import ProjectForm from '@/views/materialManagement/userSeal/ProjectForm'
 	export default {
+		updated() {
+			this.$nextTick(() => {
+				const button = this.$refs.exportButton;
+				if (button) {
+					button.$el.disabled = false;
+					button.$el.classList.remove('is-disabled');
+				}
+			});
+		},
+
 		props: {
 			businessId: {
 				type: String,
@@ -461,6 +480,7 @@
 		},
 		data () {
 			return {
+				isButtonDisabled: false,
 				validRules: {
 					userName: [
 						{required: true, message: '报销人不能为空'}
@@ -574,6 +594,7 @@
 			},
 			getUpload () {
 			},
+
 			init (method, id) {
 				this.method = method
 				this.inputForm = {
@@ -700,6 +721,21 @@
 					this.inputForm.amountInfos.splice(rowIndex, 1)
 				}
 			},
+			// 下载文档
+			exportReimbursementProjectFileById () {
+				this.loading = true
+				this.reimbursementService.exportReimbursementProjectFileById(this.inputForm.id).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, '项目报销数据导出')
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+
+			},
 			// 新增
 			async insertEvent (type) {
 				if (type === 'borrows') {
@@ -1006,13 +1042,24 @@
 					}
 				})
 			},
-			openProgramPageForm3 (rowIndex, row) {
+			openProgramPageForm3: async function (rowIndex, row) {
 				if (this.commonJS.isEmpty(row.typeName)) {
 					this.$message.error('请选择报销类型')
 					return
 				}
+				console.log("row信息:", row)
 				this.indexRow = rowIndex
-				this.$refs.projectForm.init('', true)
+				//根据报销类型查询判定项目是否单选还是多选
+				await this.reimbursementApprovalTypeService.findReimbursementTypeSingleSelectById(row.typeId).then((data) => {
+						console.log('name', data.name)
+						console.log('data', data)
+						let name = data.name.toString()
+						if (name === '业务绩效费用报销') {
+							this.$refs.projectForm.init('', 1)
+						} else {
+							this.$refs.projectForm.init('', true)
+						}
+					})
 			},
 			openProgramPageForm4 (rowIndex, row) {
 				if (this.commonJS.isEmpty(row.typeName)) {
@@ -1048,7 +1095,7 @@
 				this.$forceUpdate()
 			},
 			getProgram (rows) {
-				console.log('rows',rows)
+				console.log('rows',rows)
 				this.inputForm.infoProjects[this.indexRow].projectId = rows.map(item => { return item.id }).join(',')
 				this.inputForm.infoProjects[this.indexRow].projectName = rows.map(item => { return item.name }).join(',')
 				// this.inputForm.infoProjects[this.indexRow].reportNumber = rows[0].no
@@ -1102,6 +1149,8 @@
 			getProgramForType4 (rows) {
 				this.inputForm.infoProjects[this.indexRow].typeId = rows.id
 				this.inputForm.infoProjects[this.indexRow].typeName = rows.name
+				this.inputForm.infoProjects[this.indexRow].projectId = ""
+				this.inputForm.infoProjects[this.indexRow].projectName = ""
 				this.indexRow = ''
 				this.$forceUpdate()
 			},

+ 26 - 0
src/views/jy/reimbursement/ReimbursementList.vue

@@ -91,6 +91,15 @@
 				<template #buttons>
 					<el-button v-if="hasPermission('apply:add')" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
 <!--					<el-button v-if="hasPermission('apply:del')" type="danger"  icon="el-icon-delete" @click="del()" :disabled="$refs.infoTable && $refs.infoTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+					<el-button ref="exportButton"
+							   style="margin-left: 20px"
+							   type="primary"
+							   @click="exportReimbursementProjectFile()"
+							   :disabled="false"
+							   plain>
+						导出报销详情
+					</el-button>
+
 				</template>
 				<template #tools>
 					<vxe-button
@@ -572,6 +581,23 @@
 					}
 				}
 				return false
+			},
+			// 下载文档
+			exportReimbursementProjectFile () {
+				this.loading = true
+				this.reimbursementService.exportReimbursementProjectFile({
+					...this.searchForm
+				}).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, '项目报销数据导出')
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+
 			}
 		}
 	}

+ 1 - 1
src/views/jy/tender/TenderList.vue

@@ -111,7 +111,7 @@
 					<vxe-column min-width="160" align="center" title="创建人部门" field="officeName"></vxe-column>
 					<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
 
-					<vxe-column title="操作" width="150px" fixed="right" align="center">
+					<vxe-column title="操作" width="250px" fixed="right" align="center">
 						<template  #default="scope">
 							<el-button v-if="hasPermission('tender:info:edit')&& scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="edit(scope.row.id)">修改</el-button>
 							<el-button v-else-if="hasPermission('tender:info:edit')&&isAdmin" text type="primary" size="small" @click="edit(scope.row.id)">修改</el-button>

+ 6 - 4
src/views/jy/workContractInfo/JyWorkContractList.vue

@@ -342,8 +342,9 @@
 			},
 			// 新增
 			add () {
+				this.$refs.contractAddForm.init('add', '')
 				// 读取流程表单
-				let tabTitle = `发起流程【嘉溢-合同登记】`
+				/*let tabTitle = `发起流程【嘉溢-合同登记】`
 				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-合同登记]`
 				taskService.getTaskDef({ procDefId: this.processDefinitionId,
 					status: 'startAndHold'}).then((data) => {
@@ -364,7 +365,7 @@
 							routePath: '/jy/workContractInfo/JyWorkContractList'
 						}
 					})
-				})
+				})*/
 			},
 			// 管理员修改
 			editForm (row) {
@@ -543,7 +544,8 @@
 			//修改
 			//暂存修改
 			updateFiled(row){
-				let tabTitle = `发起流程【嘉溢-合同登记】`
+				this.$refs.contractAddForm.init('edit', row.id)
+				/*let tabTitle = `发起流程【嘉溢-合同登记】`
 				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[嘉溢-合同登记]`
 				let status = 'startAndHold'
 				if (row.filedType === '3') {
@@ -571,7 +573,7 @@
 							routePath: '/jy/workContractInfo/JyWorkContractList'
 						}
 					})
-				})
+				})*/
 			},
 			// 归档详情
 			detailFiled (row) {