sangwenwei il y a 1 an
Parent
commit
12e0ba02bc

+ 6 - 0
src/api/sys/userService.js

@@ -152,6 +152,12 @@ export default {
 			method: "get",
 		});
 	},
+	isSs:function() {
+		return request({
+			url: prefix + "/sys/user/isSs",
+			method: "get",
+		});
+	},
 
 	queryDetailList(ids) {
 		return request({

+ 60 - 0
src/views/ccpm/reimbursement/info/InfoList.vue

@@ -258,6 +258,7 @@
         loading: false,
 		  isZj:false,
 		  isZjbry:false,
+		  isSs:false,
       }
     },
     // reimbursementService: null,
@@ -366,6 +367,26 @@
 					}
 				})
 			})
+		}else if (this.isSs) {
+			taskService.getTaskDef({ procDefId: this.processDefinitionIdSs,
+				status: 'startAndHold'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionIdSs,
+						procDefKey: this.procDefKeySs,
+						status: 'startAndHold',
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessId: 'false',
+						isShow: false,
+						routePath: '/ccpm/reimbursement/info/InfoList'
+					}
+				})
+			})
 		} else {
 			taskService.getTaskDef({ procDefId: this.processDefinitionId,
 				status: 'startAndHold'}).then((data) => {
@@ -453,6 +474,30 @@
 					}
 				})
 			})
+		}else if(this.isSs){
+			taskService.getTaskDef({ procDefId: this.processDefinitionIdSs,
+				businessId: row.id,
+				businessTable: 'ccpm_reimbursement_info',
+				status: status
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionIdSs,
+						procDefKey: this.procDefKeySs,
+						status: status,
+						title: tabTitle,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'ccpm_reimbursement_info',
+						businessId: row.id,
+						isShow: false,
+						routePath: '/ccpm/reimbursement/info/InfoList'
+					}
+				})
+			})
 		}else {
 			taskService.getTaskDef({ procDefId: this.processDefinitionId,
 				businessId: row.id,
@@ -536,6 +581,12 @@
 				this.isZjbry = data
 			})
 		},
+		//判断当前用户是否是盛所团队部门主任
+		checkIsSs(){
+			userService.isSs().then((data)=>{
+				this.isSs = data
+			})
+		},
       // 获取数据列表
       refreshList () {
         this.loading = true
@@ -561,6 +612,7 @@
         // })
 		  this.checkIsZj()
 		  this.checkIsZjbry()
+		  this.checkIsSs()
         processService.getByName('项目-报销审批').then((data) => {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionId = data.id
@@ -593,6 +645,12 @@
 				  this.procDefKeyZjb = data.key
 			  }
 		  })
+		  processService.getByName('盛所项目-报销申请').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.processDefinitionIdSs = data.id
+				  this.procDefKeySs = data.key
+			  }
+		  })
       },
       // 删除
       del (id) {
@@ -634,6 +692,8 @@
 				}
 			}else if (this.isZjbry){
 				this.procDefId = this.processDefinitionIdZjb
+			}else if (this.isSs){
+				this.procDefId = this.processDefinitionIdSs
 			}else {
 				if (row.reimbursementType === '1') {
 					this.procDefId = this.processDefinitionIdInvoice

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

@@ -804,6 +804,7 @@
 		  invoiceReimbursementKey: '',
 		  isZj:false,
 		  isZjbry:false,
+		  isSs:false,
       }
     },
 	  provide() {
@@ -969,6 +970,9 @@
 			userService.isZjbry().then((data)=>{
 				this.isZjbry = data
 			})
+			userService.isSs().then((data)=>{
+				this.isSs = data
+			})
         })
       },
       // 表单提交
@@ -1322,6 +1326,26 @@
 					title = `发起流程【项目-报销审批-电子发票】`
 					describe = `[项目-报销审批-电子发票]`
 				}
+			}else if (this.isSs){
+				if (this.inputForm.reimbursementType === '0') {
+					await processService.getByName('盛所项目-报销申请').then((data) => {
+						if (!this.commonJS.isEmpty(data.id)) {
+							this.inputForm.procDefId = data.id
+							this.inputForm.procDefKey = data.key
+						}
+					})
+					title = `发起流程【项目-报销审批】`
+					describe = `[项目-报销审批]`
+				}else if (this.inputForm.reimbursementType === '1') {
+					await processService.getByName('盛所项目-报销申请').then((data) => {
+						if (!this.commonJS.isEmpty(data.id)) {
+							this.inputForm.procDefId = data.id
+							this.inputForm.procDefKey = data.key
+						}
+					})
+					title = `发起流程【项目-报销审批-电子发票】`
+					describe = `[项目-报销审批-电子发票]`
+				}
 			} else {
 				if (this.inputForm.reimbursementType === '0') {
 					await processService.getByName('项目-报销审批').then((data) => {
@@ -1458,6 +1482,9 @@
 				  if (data === '总经办人员审批') {
 					  this.inputForm.type = '5'
 				  }
+				  if (data === '盛所项目财务审批') {
+					  this.inputForm.type = '5'
+				  }
               }
               this.reimbursementService.save(this.inputForm).then((data) => {
                 callback(data.businessTable, data.businessId, this.inputForm)

+ 61 - 0
src/views/cw/reimbursementApproval/info/InfoList.vue

@@ -276,6 +276,7 @@
 		  isKjsz:false,
 		  isZj:false,
 		  isZjbry:false,
+		  isSs:false,
       }
     },
     reimbursementApprovalService: null,
@@ -351,6 +352,12 @@
 				this.isZjbry = data
 			})
 		},
+		//判断当前用户是否是盛所团队部门主任
+		checkIsSs(){
+			userService.isSs().then((data)=>{
+				this.isSs = data
+			})
+		},
       viewContract (id) {
         this.$refs.contractNameForm.init('view', id)
       },
@@ -400,6 +407,26 @@
 					  }
 				  })
 			  })
+		  }else if (this.isSs) {
+			  taskService.getTaskDef({ procDefId: this.processDefinitionIdSs,
+				  status: 'startAndHold'}).then((data) => {
+				  this.$router.push({
+					  path: '/flowable/task/TaskForm',
+					  query: {
+						  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						  procDefId: this.processDefinitionIdSs,
+						  procDefKey: this.procDefKeySs,
+						  status: 'startAndHold',
+						  title: tabTitle,
+						  formType: data.formType,
+						  formUrl: data.formUrl,
+						  formTitle: processTitle,
+						  businessId: 'false',
+						  isShow: false,
+						  routePath: '/cw/reimbursementApproval/info/InfoList'
+					  }
+				  })
+			  })
 		  } else {
 			  taskService.getTaskDef({ procDefId: this.processDefinitionId,
 				  status: 'startAndHold'}).then((data) => {
@@ -488,6 +515,30 @@
 					  }
 				  })
 			  })
+		  }else if(this.isSs){
+			  taskService.getTaskDef({ procDefId: this.processDefinitionIdSs,
+				  businessId: row.id,
+				  businessTable: 'cw_reimbursement_info',
+				  status: status
+			  }).then((data) => {
+				  this.$router.push({
+					  path: '/flowable/task/TaskForm',
+					  query: {
+						  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						  procDefId: this.processDefinitionIdSs,
+						  procDefKey: this.procDefKeySs,
+						  status: status,
+						  title: tabTitle,
+						  formType: data.formType,
+						  formUrl: data.formUrl,
+						  formTitle: processTitle,
+						  businessTable: 'cw_reimbursement_info',
+						  businessId: row.id,
+						  isShow: false,
+						  routePath: '/cw/reimbursementApproval/info/InfoList'
+					  }
+				  })
+			  })
 		  }else {
 			  taskService.getTaskDef({ procDefId: this.processDefinitionId,
 				  businessId: row.id,
@@ -558,6 +609,7 @@
 	  	this.checkIsKjsz()
 		  this.checkIsZj()
 		  this.checkIsZjbry()
+		  this.checkIsSs()
         processService.getByName('会计-报销审批').then((data) => {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionId = data.id
@@ -591,6 +643,13 @@
 				  this.procDefKeyZjb = data.key
 			  }
 		  })
+		  processService.getByName('盛所会计-报销申请').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.processDefinitionIdSs = data.id
+				  this.procDefKeySs = data.key
+			  }
+		  })
+
 
       },
       // 删除
@@ -628,6 +687,8 @@
 				}
 			}else if (this.isZjbry){
 				this.procDefId = this.processDefinitionIdZjb
+			}else if (this.isSs){
+				this.procDefId = this.processDefinitionIdSs
 			}else {
 				if (row.reimbursementType === '1') {
 					this.procDefId = this.processDefinitionIdInvoice

+ 28 - 1
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -927,6 +927,7 @@
 		  isKjsz:false,
 		  isZj:false,
 		  isZjbry:false,
+		  isSs:false,
       }
     },
 	  provide() {
@@ -1103,6 +1104,9 @@
 			userService.isZjbry().then((data)=>{
 				this.isZjbry = data
 			})
+			userService.isSs().then((data)=>{
+				this.isSs = data
+			})
 
         })
       },
@@ -1500,7 +1504,27 @@
 					  title = `发起流程【会计-报销审批-电子发票】`
 					  describe = `[会计-报销审批-电子发票]`
 				  }
-			  } else {
+			  }else if (this.isSs){
+				  if (this.inputForm.reimbursementType === '0') {
+					  await processService.getByName('盛所会计-报销申请').then((data) => {
+						  if (!this.commonJS.isEmpty(data.id)) {
+							  this.inputForm.procDefId = data.id
+							  this.inputForm.procDefKey = data.key
+						  }
+					  })
+					  title = `发起流程【会计-报销审批】`
+					  describe = `[会计-报销审批]`
+				  }else if (this.inputForm.reimbursementType === '1') {
+					  await processService.getByName('盛所会计-报销申请').then((data) => {
+						  if (!this.commonJS.isEmpty(data.id)) {
+							  this.inputForm.procDefId = data.id
+							  this.inputForm.procDefKey = data.key
+						  }
+					  })
+					  title = `发起流程【会计-报销审批-电子发票】`
+					  describe = `[会计-报销审批-电子发票]`
+				  }
+			  }  else {
 				  if (this.inputForm.reimbursementType === '0') {
 					  await processService.getByName('会计-报销审批').then((data) => {
 						  if (!this.commonJS.isEmpty(data.id)) {
@@ -1646,6 +1670,9 @@
 					  if (data === '总经办人员审批') {
 						  this.inputForm.type = '5'
 					  }
+					  if (data === '盛所财务管理员审批') {
+						  this.inputForm.type = '5'
+					  }
 
                   }
 					console.log('this.inputForm',this.inputForm)

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

@@ -757,6 +757,8 @@ export default {
 		// Process_1706680331785 咨询-所长报销
 		// Process_1706680660857 咨询-所长报销-电子发票
 		// Process_1708926975266 会计-撤回签章
+		// Process_1709102298565 盛所会计-报销申请
+		// Process_1709104787957 盛所项目-报销申请
 		// 驳回
 		reject(vars) {
 			if (this.procDefId.includes('Process_1667978088459') ||
@@ -834,7 +836,9 @@ export default {
 				this.procDefId.includes('Process_1706680073642') ||
 				this.procDefId.includes('Process_1706680331785') ||
 				this.procDefId.includes('Process_1706680660857') ||
-				this.procDefId.includes('Process_1708926975266')
+				this.procDefId.includes('Process_1708926975266') ||
+				this.procDefId.includes('Process_1709102298565') ||
+				this.procDefId.includes('Process_1709104787957')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {