소스 검색

报销调整

sangwenwei 5 달 전
부모
커밋
397f5ae388

+ 8 - 0
src/api/ccpm/reimbursement/ReimbursementService.js

@@ -156,4 +156,12 @@ export default class ReimbursementService {
 		})
 	}
 
+	findFileByReimId (id) {
+		return request({
+			url: prefix + '/ccpmReimbursement/info/findFileByReimId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

+ 8 - 0
src/api/consultancy/reimbursement/ReimbursementService.js

@@ -153,4 +153,12 @@ export default class ReimbursementService {
 			data: param
 		})
 	}
+
+	findFileByReimId (id) {
+		return request({
+			url: prefix + '/consultancyReimbursement/info/findFileByReimId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
 }

+ 7 - 0
src/api/cw/reimbursementApproval/ReimbursementApprovalService.js

@@ -183,5 +183,12 @@ export default class ReimbursementApprovalService {
 			data: param
 		})
 	}
+	findFileByReimId (id) {
+		return request({
+			url: prefix + '/reimbursementApproval/info/findFileByReimId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
 
 }

+ 8 - 0
src/api/sys/ReimbursementService.js

@@ -163,4 +163,12 @@ export default class ReimbursementService {
 		})
 	}
 
+	findFileByReimId (id) {
+		return request({
+			url: prefix + '/reimbursement/info/findFileByReimId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

+ 8 - 0
src/api/zs/reimbursement/ReimbursementService.js

@@ -155,4 +155,12 @@ export default class ReimbursementService {
 		})
 	}
 
+	findFileByReimId (id) {
+		return request({
+			url: prefix + '/zsReimbursement/info/findFileByReimId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

+ 1 - 1
src/views/ccpm/reimbursement/info/InfoList.vue

@@ -666,7 +666,7 @@
             query: {
               isShow: false,
               formReadOnly: true,
-              formTitle: `${data.title}`,
+              formTitle: `${data.taskName}`,
               routePath: '/ccpm/reimbursement/info/InfoList',   // 数据处理后需要跳转的页面路径
               cUser: cUser,
               title: `审批【${data.taskName || ''}】`,

+ 45 - 0
src/views/ccpm/reimbursement/info/ReimbursementForm.vue

@@ -787,6 +787,7 @@
         inputForm: {
 			reimbursementType: '1',
           userId: '',
+          createById: '',
           userName: '',
           no: '',
           department: '',
@@ -908,6 +909,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+			createById: '',
           no: '',
           department: '',
           reimDate: '',
@@ -1594,6 +1596,49 @@
           })
         }
       },
+
+		//文件补充
+		fileApply(callback){
+			let processDefinitionIdFile = "";
+			let procDefKeyFile = "";
+			this.$confirm(`确定要对该报销进行文件补充吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				this.reimbursementService.findFileByReimId(this.inputForm.id).then((resData) =>{
+					if (resData && this.commonJS.isNotEmpty(resData.status) && resData.status !== '1' && resData.status !== '5'){
+						this.loading = false
+						this.$message.error('文件补充流程已经发起,请勿重复发起')
+						throw new Error('文件补充流程已经发起,请勿重复发起')
+					}else {
+						processService.getByName('项目-报销文件补充').then((data) => {
+							console.log('file',data)
+							if (!this.commonJS.isEmpty(data.id)) {
+								processDefinitionIdFile = data.id
+								procDefKeyFile = data.key
+								let title = `发起流程【项目-报销文件补充】`
+								let describe = `[项目-报销文件补充]`
+								this.inputForm.fileStatus = '2'
+								this.reimbursementService.saveFile(this.inputForm).then((da) => {
+									let newTitle = `${this.$store.state.user.name} 发起了 ${da.name} 的 [${da.no}] - ` + describe
+									callback(da.businessTable, da.businessId, this.inputForm,'',this.inputForm.createById,newTitle,title,processDefinitionIdFile,procDefKeyFile)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							}
+						})
+					}
+				})
+			})
+
+		},
+		//取消按钮
+		cancel(){
+			this.close()
+		},
       footerMethod ({ columns, data }) {
         const footerData = [
           columns.map((column, columnIndex) => {

+ 45 - 0
src/views/consultancy/reimbursement/info/ReimbursementForm.vue

@@ -788,6 +788,7 @@
         inputForm: {
 			reimbursementType: '1',
           userId: '',
+          createById: '',
           userName: '',
           no: '',
           department: '',
@@ -906,6 +907,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+			createById: '',
           no: '',
           department: '',
           reimDate: '',
@@ -1535,6 +1537,49 @@
           })
         }
       },
+		//文件补充
+		fileApply(callback){
+			let processDefinitionIdFile = "";
+			let procDefKeyFile = "";
+			this.$confirm(`确定要对该报销进行文件补充吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				this.reimbursementService.findFileByReimId(this.inputForm.id).then((resData) =>{
+					if (resData && this.commonJS.isNotEmpty(resData.status) && resData.status !== '1' && resData.status !== '5'){
+						this.loading = false
+						this.$message.error('文件补充流程已经发起,请勿重复发起')
+						throw new Error('文件补充流程已经发起,请勿重复发起')
+					}else {
+						processService.getByName('咨询-报销文件补充').then((data) => {
+							console.log('file',data)
+							if (!this.commonJS.isEmpty(data.id)) {
+								processDefinitionIdFile = data.id
+								procDefKeyFile = data.key
+								let title = `发起流程【咨询-报销文件补充】`
+								let describe = `[咨询-报销文件补充]`
+								this.inputForm.fileStatus = '2'
+								this.reimbursementService.saveFile(this.inputForm).then((da) => {
+									let newTitle = `${this.$store.state.user.name} 发起了 ${da.name} 的 [${da.no}] - ` + describe
+									callback(da.businessTable, da.businessId, this.inputForm,'',this.inputForm.createById,newTitle,title,processDefinitionIdFile,procDefKeyFile)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							}
+						})
+					}
+				})
+			})
+
+		},
+		//取消按钮
+		cancel(){
+			this.close()
+		},
+
       footerMethod ({ columns, data }) {
         const footerData = [
           columns.map((column, columnIndex) => {

+ 49 - 2
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -934,7 +934,8 @@
 					formTitle: '',
 					departmentName: '',
 					businessFlag: '',
-					paymentStatus:''
+					paymentStatus:'',
+					createById:''
 				},
 				keyWatch: '',
 				amountKey: '',
@@ -1060,7 +1061,8 @@
 					purchaseId: '',
 					departmentName: '',
 					businessFlag: '',
-					paymentStatus:''
+					paymentStatus:'',
+					createById:''
 				}
 				if (method === 'add') {
 					this.title = `新建报销类型`
@@ -1074,6 +1076,7 @@
 					this.loading = true
 					this.$refs.inputForm.resetFields()
 					this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
+						console.log('data',data)
 						this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
 						this.$refs.uploadComponent.clearUpload()
 						if (this.status === 'audit' || this.status === 'taskFormDetail') {
@@ -1712,6 +1715,7 @@
 								this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 								this.inputForm.files = this.$refs.uploadComponent.getDataList()
 								this.inputForm.type = '2'
+								this.inputForm.procInsId = data.procInsId
 								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
 									if (this.commonJS.isNotEmpty(data)) {
 										if (data === '所长报销审核人') {
@@ -1786,6 +1790,49 @@
 					})
 				}
 			},
+			//文件补充
+			fileApply(callback){
+				let processDefinitionIdFile = "";
+				let procDefKeyFile = "";
+				this.$confirm(`确定要对该报销进行文件补充吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.reimbursementApprovalService.findFileByReimId(this.inputForm.id).then((resData) =>{
+						if (resData && this.commonJS.isNotEmpty(resData.status) && resData.status !== '1' && resData.status !== '5'){
+							this.loading = false
+							this.$message.error('文件补充流程已经发起,请勿重复发起')
+							throw new Error('文件补充流程已经发起,请勿重复发起')
+						}else {
+							processService.getByName('会计-报销文件补充').then((data) => {
+								console.log('file',data)
+								if (!this.commonJS.isEmpty(data.id)) {
+									processDefinitionIdFile = data.id
+									procDefKeyFile = data.key
+									let title = `发起流程【会计-报销文件补充】`
+									let describe = `[会计-报销文件补充]`
+									this.inputForm.fileStatus = '2'
+									this.reimbursementApprovalService.saveFile(this.inputForm).then((da) => {
+										let newTitle = `${this.$store.state.user.name} 发起了 ${da.name} 的 [${da.no}] - ` + describe
+										callback(da.businessTable, da.businessId, this.inputForm,'',this.inputForm.createById,newTitle,title,processDefinitionIdFile,procDefKeyFile)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								}
+							})
+						}
+					})
+				})
+
+			},
+			//取消按钮
+			cancel(){
+				this.close()
+			},
+
 			footerMethod ({ columns, data }) {
 				const footerData = [
 					columns.map((column, columnIndex) => {

+ 106 - 1
src/views/flowable/task/TaskForm.vue

@@ -302,6 +302,7 @@ import { shallowRef } from 'vue'
 import CollectService from '@/api/materialManagement/CollectService'
 import WareHouseService from '@/api/materialManagement/WareHouseService'
 import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
+import pick from "lodash.pick";
 export default {
 	collectService: null,
 	wareHouseService: null,
@@ -1322,6 +1323,18 @@ export default {
 				})
 			}
 		},
+		// 关闭
+		cancel () {
+			this.changeBusiness()
+			useTabs.close()
+			if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
+				this.$router.push({path: this.$route.query.routePath})
+			} else {
+				this.$router.push({
+					path: '/dashboard/index',
+				})
+			}
+		},
 		// 自定义按钮提交
 		commit(vars) {
 			if (this.formType === "2") {
@@ -1508,12 +1521,104 @@ export default {
 				case '_flow_reback':// 撤回
 					this.reback()
 					break
-
+				case '_fileApply':// 文件补充
+					this.fileApply()
+					break
+				case '_cancel':// 关闭
+					this.cancel()
+					break
 				default:
 					this.commit(vars); // 自定义按钮提交
 			}
 		},
 
+		//文件补充
+		fileApply(vars){
+			if (this.formType === "2") {
+				// 外置表单
+				this.$refs.form.fileApply(
+					(businessTable, businessId, inputForm,recordType,createById,newTitle,title,procDefId,procDefKey) => {
+						vars = { ...vars, ...inputForm ,recordType}
+						console.log(vars)
+						if (procDefId) {
+							this.procDefId = procDefId
+						}
+						if (procDefKey) {
+							this.procDefKey = procDefKey
+							inputForm.procDefKey = procDefKey
+						}
+						// if (newTitle) {
+						// 	this.title = newTitle
+						// }
+						if (title) {
+							this.formTitle = title
+						}
+						if (recordType) {
+							this.recordType = recordType
+						}
+						if (inputForm.days){
+							this.days=inputForm.days
+						}
+
+						let assignee = createById
+						if (!this.commonJS.isEmpty(createById)) {
+							assignee = createById
+						}
+						taskService
+							.start({
+								procDefId: this.procDefId,
+								procDefKey: this.procDefKey,
+								businessTable: businessTable,
+								businessId: businessId,
+								...vars,
+								title: newTitle,
+								assignee: assignee,
+								recordType: this.recordType,
+								days: this.days,
+							})
+							.then((data) => {
+								this.$message.success("启动成功");
+								// this.changeBusiness()
+								// useTabs.close();
+								// if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
+								// 	this.$router.push({path: this.$route.query.routePath})
+								// } else {
+								// 	this.$router.push({
+								// 		path: '/dashboard/index',
+								// 	})
+								// }
+								// this.cc(data);
+							});
+					}
+				);
+			} else {
+				// 动态表单
+				this.$refs.form.submitStartFormData(
+					{
+						processDefinitionId: this.procDefId,
+						...vars,
+						title: this.title,
+						assignee: this.auditForm.assignee,
+					},
+					(data) => {
+						this.changeBusiness()
+						useTabs.close();
+						if (!this.commonJS.isEmpty(this.$route.query.routePath)) {
+							this.$router.push({path: this.$route.query.routePath})
+						} else {
+							this.$router.push({
+								path: '/sys/dashboard/workBench/PendingList',
+								query: {
+									num: 3
+								}
+							})
+						}
+						this.cc(data);
+					}
+				);
+			}
+
+		},
 
 
 		myNotice (taskId, proDefId, title, userName, createDate) {

+ 49 - 0
src/views/reimbursement/info/ReimbursementForm.vue

@@ -855,6 +855,7 @@
 				inputForm: {
 					reimbursementType: '1',
 					userId: '',
+					createById: '',
 					userName: '',
 					no: '',
 					department: '',
@@ -993,6 +994,7 @@
 				this.inputForm = {
 					reimbursementType: '1',
 					userId: '',
+					createById: '',
 					userName: '',
 					no: '',
 					department: '',
@@ -1025,6 +1027,8 @@
 					this.reimbursementService.findById(this.inputForm.id).then((data) => {
 						this.inputForm = this.recover(this.inputForm, data)
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						console.log('data',data)
+						console.log('this.inputForm',this.inputForm)
 						this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
 						this.$refs.uploadComponent.clearUpload()
 						if (this.status === 'audit' || this.status === 'taskFormDetail') {
@@ -1597,6 +1601,7 @@
 								this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 								this.inputForm.files = this.$refs.uploadComponent.getDataList()
 								this.inputForm.type = '2'
+								this.inputForm.procInsId = data.procInsId
 								taskService.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
 									if (this.commonJS.isNotEmpty(data)) {
 										if (data === '所长报销审核人') {
@@ -1673,6 +1678,50 @@
 					}
 				}
 			},
+			//文件补充
+			fileApply(callback){
+				let processDefinitionIdFile = "";
+				let procDefKeyFile = "";
+				this.$confirm(`确定要对该报销进行文件补充吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.reimbursementService.findFileByReimId(this.inputForm.id).then((resData) =>{
+						if (resData && this.commonJS.isNotEmpty(resData.status) && resData.status !== '1' && resData.status !== '5'){
+							this.loading = false
+							this.$message.error('文件补充流程已经发起,请勿重复发起')
+							throw new Error('文件补充流程已经发起,请勿重复发起')
+						}else {
+							processService.getByName('评估-报销文件补充').then((data) => {
+								console.log('file',data)
+								if (!this.commonJS.isEmpty(data.id)) {
+									processDefinitionIdFile = data.id
+									procDefKeyFile = data.key
+									let title = `发起流程【评估-报销文件补充】`
+									let describe = `[评估-报销文件补充]`
+									this.inputForm.fileStatus = '2'
+									this.reimbursementService.saveFile(this.inputForm).then((da) => {
+										let newTitle = `${this.$store.state.user.name} 发起了 ${da.name} 的 [${da.no}] - ` + describe
+										callback(da.businessTable, da.businessId, this.inputForm,'',this.inputForm.createById,newTitle,title,processDefinitionIdFile,procDefKeyFile)
+										this.loading = false
+									}).catch(() => {
+										this.loading = false
+									})
+								}
+							})
+						}
+					})
+				})
+
+			},
+			//取消按钮
+			cancel(){
+				this.close()
+			},
+
+
 			// 修改状态
 			// updateStatusById (type) {
 			//   if (type === 'reject') {

+ 46 - 1
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -795,6 +795,7 @@
         inputForm: {
 			reimbursementType: '1',
           userId: '',
+			createById: '',
           userName: '',
           no: '',
           department: '',
@@ -916,6 +917,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+          createById: '',
           no: '',
           department: '',
           reimDate: '',
@@ -1505,7 +1507,7 @@
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
 			  this.inputForm.type = '2'
-            this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+			  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
               if (this.commonJS.isNotEmpty(data)) {
 				  if (data === '所长报销审核人') {
 					  this.inputForm.type = '5'
@@ -1545,6 +1547,49 @@
           })
         }
       },
+		//文件补充
+		fileApply(callback){
+			let processDefinitionIdFile = "";
+			let procDefKeyFile = "";
+			this.$confirm(`确定要对该报销进行文件补充吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				this.reimbursementService.findFileByReimId(this.inputForm.id).then((resData) =>{
+					if (resData && this.commonJS.isNotEmpty(resData.status) && resData.status !== '1' && resData.status !== '5'){
+						this.loading = false
+						this.$message.error('文件补充流程已经发起,请勿重复发起')
+						throw new Error('文件补充流程已经发起,请勿重复发起')
+					}else {
+						processService.getByName('中审-报销文件补充').then((data) => {
+							console.log('file',data)
+							if (!this.commonJS.isEmpty(data.id)) {
+								processDefinitionIdFile = data.id
+								procDefKeyFile = data.key
+								let title = `发起流程【中审-报销文件补充】`
+								let describe = `[中审-报销文件补充]`
+								this.inputForm.fileStatus = '2'
+								this.reimbursementService.saveFile(this.inputForm).then((da) => {
+									let newTitle = `${this.$store.state.user.name} 发起了 ${da.name} 的 [${da.no}] - ` + describe
+									callback(da.businessTable, da.businessId, this.inputForm,'',this.inputForm.createById,newTitle,title,processDefinitionIdFile,procDefKeyFile)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							}
+						})
+					}
+				})
+			})
+
+		},
+		//取消按钮
+		cancel(){
+			this.close()
+		},
+
       footerMethod ({ columns, data }) {
         const footerData = [
           columns.map((column, columnIndex) => {