Explorar o código

管理员修改报销

sangwenwei hai 1 ano
pai
achega
1c9664d260

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

@@ -88,4 +88,19 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	findHistory (id) {
+		return request({
+			url: prefix + '/ccpmReimbursement/info/findHistory',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	findHiById (id) {
+		return request({
+			url: prefix + '/ccpmReimbursement/info/findHiById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

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

@@ -88,4 +88,18 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	findHistory (id) {
+		return request({
+			url: prefix + '/consultancyReimbursement/info/findHistory',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	findHiById (id) {
+		return request({
+			url: prefix + '/consultancyReimbursement/info/findHiById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
 }

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

@@ -96,4 +96,18 @@ export default class ReimbursementApprovalService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	findHistory (id) {
+		return request({
+			url: prefix + '/reimbursementApproval/info/findHistory',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	findHiById (id) {
+		return request({
+			url: prefix + '/reimbursementApproval/info/findHiById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
 }

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

@@ -81,4 +81,19 @@ export default class ReimbursementService {
 			params: {invoiceNumber: invoiceNumber,id:id}
 		})
 	}
+	findHistory (id) {
+		return request({
+			url: prefix + '/reimbursement/info/findHistory',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	findHiById (id) {
+		return request({
+			url: prefix + '/reimbursement/info/findHiById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

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

@@ -88,4 +88,19 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	findHistory (id) {
+		return request({
+			url: prefix + '/zsReimbursement/info/findHistory',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	findHiById (id) {
+		return request({
+			url: prefix + '/zsReimbursement/info/findHiById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

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

@@ -766,7 +766,7 @@
           if (method === 'edit' || method === 'view') { // 修改或者查看
             this.loading = true
             this.$refs.inputForm.resetFields()
-            this.reimbursementService.findById(this.inputForm.id).then((data) => {
+            this.reimbursementService.findHiById(this.inputForm.id).then((data) => {
               this.inputForm = this.recover(this.inputForm, data)
 				this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 				this.$refs.uploadComponent.clearUpload()

+ 20 - 2
src/views/consultancy/reimbursement/info/InfoList.vue

@@ -186,7 +186,10 @@
 
           <vxe-column title="操作" width="130px" fixed="right" align="center">
             <template  #default="scope">
-              <el-button v-if="hasPermission('consultancy:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+				<!--				管理员修改-->
+				<el-button v-if=" (scope.row.type === '5' && isAdmin)" text type="primary" @click="editForm(scope.row)">修改</el-button>
+
+				<el-button v-if="hasPermission('consultancy:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
               <el-button v-if="hasPermission('consultancy:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '4')" text type="primary"   @click="todo(scope.row)">驳回调整</el-button>
               <el-button v-if="hasPermission('consultancy:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '2')" text type="primary"   @click="reback(scope.row)">撤回</el-button>
               <el-button v-if="hasPermission('consultancy:info:del') && scope.row.createId === $store.state.user.id && (scope.row.type === '1')" text type="primary"   @click="del(scope.row.id)">删除</el-button>
@@ -209,6 +212,7 @@
 <!--        <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>-->
         <ProjectChooseForm ref="projectChooseForm" @getProgram="getProgram"></ProjectChooseForm>
         <InfoForm ref="infoForm" @refreshDataList="refreshList"></InfoForm>
+        <InfoUpdateForm ref="infoUpdateForm" @refreshDataList="refreshList"></InfoUpdateForm>
 <!--        <ProjectForm ref="projectForm" @refreshDataList="refreshList"></ProjectForm>-->
         <ProjectRecordsForm ref="projectRecordsForm" @refreshDataList="refreshList"></ProjectRecordsForm>
         <ContractNameForm ref="contractNameForm"></ContractNameForm>
@@ -231,6 +235,7 @@
   import ProjectRecordsForm from '@/views/cw/projectRecords/ProjectRecordsForm'
   import ContractNameForm from '@/views/cw/workContract/ContractNameForm'
   import userService from '@/api/sys/UserService'
+  import InfoUpdateForm from "./InfoUpdateForm";
   export default {
     data () {
       return {
@@ -264,6 +269,7 @@
 		  isZj:false,
 		  isDgsbxBmzr:false,
 		  isZjbry:false,
+		  isAdmin:false,
       }
     },
     // reimbursementService: null,
@@ -286,7 +292,8 @@
       // ProjectForm,
       ProjectRecordsForm,
       UserSelect,
-      ContractNameForm
+      ContractNameForm,
+		InfoUpdateForm
     },
     mounted () {
 		this.$nextTick(() => {
@@ -525,6 +532,10 @@
       view (id) {
         this.$refs.infoForm.init('view', id)
       },
+		//修改
+		editForm (row) {
+			this.$refs.infoUpdateForm.init('edit', row.id)
+		},
       // 查看报销项目
       viewProject (id) {
         // this.$refs.projectForm.init('view', id)
@@ -547,6 +558,12 @@
 				this.isZjbry = data
 			})
 		},
+		// 查询当前用户是否是管理员用户
+		checkIsAdmin () {
+			userService.is().then((data) => {
+				this.isAdmin = data
+			})
+		},
       // 获取数据列表
       refreshList () {
         this.loading = true
@@ -572,6 +589,7 @@
         // })
 		  this.checkIsZj()
 		  this.checkIsZjbry()
+		  this.checkIsAdmin()
         processService.getByName('咨询-报销审批').then((data) => {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionId = data.id

+ 6 - 3
src/views/reimbursement/info/InfoForm.vue

@@ -763,7 +763,7 @@
         detailKeyProcured: '',
         keyWatch: '',
 		  amountKey: '',
-		  invoiceReimbursementKey: ''
+		  invoiceReimbursementKey: '',
       }
     },
 	  provide() {
@@ -779,7 +779,8 @@
     },
     components: {
 		InvoiceReimbursementUpLoadComponent,
-      UpLoadComponent
+      	UpLoadComponent,
+
     },
     methods: {
 		getParentReimbursementType() {
@@ -830,7 +831,7 @@
           if (method === 'edit' || method === 'view') { // 修改或者查看
             this.loading = true
             this.$refs.inputForm.resetFields()
-            this.reimbursementService.findById(this.inputForm.id).then((data) => {
+            this.reimbursementService.findHiById(this.inputForm.id).then((data) => {
               this.inputForm = this.recover(this.inputForm, data)
               this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
               this.$refs.uploadComponent.clearUpload()
@@ -865,6 +866,7 @@
               if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
                 this.startPur(this.inputForm.purchaseId)
               }
+
               this.loading = false
             })
           }
@@ -1288,6 +1290,7 @@
 			]
 			return footerData
 		},
+
     }
   }
 </script>

+ 10 - 2
src/views/zs/reimbursement/info/InfoList.vue

@@ -269,6 +269,7 @@
 		  isZj:false,
 		  isDgsbxBmzr:false,
 		  isZjbry:false,
+		  isAdmin: false,
       }
     },
     // reimbursementService: null,
@@ -532,8 +533,8 @@
         this.$refs.infoForm.init('view', id)
       },
 		//修改
-		editForm(id) {
-			this.$refs.infoUpdateForm.init('edit', id)
+		editForm(row) {
+			this.$refs.infoUpdateForm.init('edit', row.id)
 		},
       // 查看报销项目
       viewProject (id) {
@@ -551,6 +552,12 @@
 				this.isZjbry = data
 			})
 		},
+		// 查询当前用户是否是管理员用户
+		checkIsAdmin () {
+			userService.is().then((data) => {
+				this.isAdmin = data
+			})
+		},
 		//查询当前用户是否是多公司报销(部门主任)
 		checkIsDgsbxBmzr(){
 			userService.isDgsbxBmzr().then((data)=>{
@@ -583,6 +590,7 @@
 		  this.checkIsZj()
 		  this.checkIsDgsbxBmzr()
 		  this.checkIsZjbry()
+		  this.checkIsAdmin()
         processService.getByName('中审-报销审批').then((data) => {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionId = data.id