Browse Source

报销审批

sangwenwei 1 year ago
parent
commit
2653593943

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

@@ -67,4 +67,11 @@ export default class BorrowService{
 		})
 	}
 
+	listByUserId(){
+		return request({
+			url: prefix + "/borrow/listByUserId",
+			method: "get",
+		})
+	}
+
 }

+ 7 - 0
src/api/jy/PaymentService.js

@@ -51,4 +51,11 @@ export default class PaymentService{
 		})
 	}
 
+	listByUserId(){
+		return request({
+			url: prefix + "/payment/listByUserId",
+			method: "get",
+		})
+	}
+
 }

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

@@ -0,0 +1,62 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class ReimbursementService{
+	list (param) {
+		return request({
+			url: prefix +'/reimbursement/list',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/reimbursement/save`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	findById (id) {
+		return request({
+			url: prefix +'/reimbursement/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/reimbursement/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	remove (ids) {
+		return request({
+			url: prefix+"/reimbursement/remove",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/reimbursement/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+	queryByProIds (ids) {
+		return request({
+			url: prefix + '/reimbursement/queryByProIds',
+			method: 'get',
+			params: {ids: ids}
+		})
+	}
+
+}

+ 4 - 2
src/views/flowable/task/TaskForm.vue

@@ -714,7 +714,8 @@ export default {
 		// Process_1701655913359 嘉溢-文印申请
 		// Process_1701936620599 嘉溢-借款管理
 		// Process_1701946907362 嘉溢-借款归还
-		// Process_1702002020267 嘉溢-付款管理
+		// Process_1702002020267 嘉溢-付款管理\
+		// Process_1702277270803 嘉溢-报销管理
 
 		// 驳回
 		reject(vars) {
@@ -774,7 +775,8 @@ export default {
 				this.procDefId.includes('Process_1701655913359') ||
 				this.procDefId.includes('Process_1701936620599') ||
 				this.procDefId.includes('Process_1701946907362') ||
-				this.procDefId.includes('Process_1702002020267')
+				this.procDefId.includes('Process_1702002020267') ||
+				this.procDefId.includes('Process_1702277270803')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 151 - 0
src/views/jy/reimbursement/BorrowByUserIdForm.vue

@@ -0,0 +1,151 @@
+<template>
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			append-to-body
+			height="500px"
+			@close="close"
+			@keyup.enter.native="getWorkClient"
+			v-model="visibleChoose">
+			<div style="height: calc(100%);">
+				<vxe-table
+					border="inner"
+					auto-resize
+					height="400px"
+					resizable
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="40"></vxe-column>
+					<vxe-column type="radio" width="40px"></vxe-column>
+					<vxe-column min-width="160" align="center" title="借款编号" field="no">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.no}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="借款用途" field="reason"></vxe-column>
+					<vxe-column min-width="160" align="center" title="借款金额" field="moneyLower"></vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	// import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+	import BorrowService from '@/api/jy/BorrowService'
+	export default {
+		data () {
+			return {
+				title: '',
+				method: '',
+				visibleChoose: false,
+				loading: false,
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				dataList: [],
+				searchForm: {
+					projectName: '',
+					name: '',
+					no: '',
+					type: '',
+					industry: ''
+				},
+				projectId: ''
+			}
+		},
+		// workClientService: null,
+		BorrowService: null,
+		created () {
+			// this.workClientService = new WorkClientService()
+			this.borrowService = new BorrowService()
+		},
+		components: {
+		},
+		methods: {
+			init (deputy) {
+				this.title = '借款信息选择'
+				this.visibleChoose = true
+				this.list()
+			},
+			// 表单提交
+			getWorkClient () {
+				let row = this.$refs.clientTable.getRadioRecord()
+				console.log('row',row)
+				if (this.commonJS.isEmpty(row)) {
+					this.$message.error('请至少选择一条数据')
+				} else {
+					this.close()
+					this.$emit('getBorrow', row)
+
+				}
+			},
+			list () {
+				this.loading = true
+				this.borrowService.listByUserId({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+			},
+			// 当前页
+			currentChangeHandle ({currentPage, pageSize}) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.list()
+			},
+			resetSearch () {
+				// this.$refs.searchForm.resetFields()
+				this.list()
+			},
+			close () {
+				// this.$refs.searchForm.resetFields()
+				this.visibleChoose = false
+			}
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-dialog__body {
+		padding-top: 0;
+	}
+	/deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+		margin-bottom: 0px;
+	}
+</style>

+ 156 - 0
src/views/jy/reimbursement/CwReimbursementTypePullForm.vue

@@ -0,0 +1,156 @@
+<template>
+  <div>
+    <el-dialog
+      title="报销类型选择"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      append-to-body
+      @close="close"
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="报销类型名称" prop="name">
+            <el-input v-model="searchForm.name" placeholder="请输入报销类型名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="500px"
+          :loading="loading"
+          ref="typeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId',expandAll: true}"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="60" ></vxe-column>
+          <vxe-column title="报销内容名称" field="name" align="left" tree-node></vxe-column>
+          <vxe-column width="100" title="序号" field="sort"></vxe-column>
+        </vxe-table>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgramForType" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
+  import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        like: '',
+        officeId: ''
+      }
+    },
+    // reimbursementTypeService: null,
+    reimbursementApprovalTypeService: null,
+    created () {
+      // this.reimbursementTypeService = new ReimbursementTypeService()
+      this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
+    },
+    components: {
+    },
+    methods: {
+      init (like, deptName) {
+        console.log('进来了')
+        console.log('like', like)
+        if (like === '1') {
+          this.like = '1'
+        } else {
+          this.like = ''
+        }
+        this.officeId = deptName
+        console.log('this.officeId', this.officeId)
+        this.visible = true
+        this.list()
+      },
+      // 表单提交
+      getProgramForType () {
+        let rows
+        if (this.commonJS.isEmpty(this.$refs.typeTable.getRadioRecord())) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        rows = this.$refs.typeTable.getRadioRecord()
+        this.dataList.forEach((item) => {
+          if (item.parentId === rows.id) {
+            this.$message.error('只可以选择最小节点的数据')
+            throw new Error('只可以选择最小节点的数据')
+          }
+        })
+        this.$emit('getProgramForType', rows)
+        this.close()
+      },
+      list () {
+        this.loading = true
+        this.searchForm.like = this.like
+        this.searchForm.officeId = this.officeId
+        this.reimbursementApprovalTypeService.bxList({...this.searchForm}).then((data) => {
+          this.dataList = data
+          this.loading = false
+          this.$nextTick(() => {
+            this.$refs.typeTable.setAllTreeExpand(true)
+          })
+        })
+        // this.reimbursementTypeService.list({...this.searchForm}).then((data) => {
+        //   this.dataList = data
+        //   this.loading = false
+        // })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

File diff suppressed because it is too large
+ 1357 - 0
src/views/jy/reimbursement/InfoForm.vue


+ 154 - 0
src/views/jy/reimbursement/PaymentByUserIdForm.vue

@@ -0,0 +1,154 @@
+<template>
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1400px"
+			append-to-body
+			height="500px"
+			@close="close"
+			@keyup.enter.native="getWorkClient"
+			v-model="visibleChoose">
+			<div style="height: calc(100%);">
+				<vxe-table
+					border="inner"
+					auto-resize
+					height="400px"
+					resizable
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="40"></vxe-column>
+					<vxe-column type="radio" width="40px"></vxe-column>
+					<vxe-column min-width="160" align="center" title="付款编号" field="no">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.no}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="付款用途" field="reason"></vxe-column>
+					<vxe-column min-width="160" align="center" title="付款人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="付款人部门" field="officeName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="付款时间" field="paymentTime"></vxe-column>
+					<vxe-column min-width="160" align="center" title="付款金额" field="paymentLower"></vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	// import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+	import PaymentService from '@/api/jy/PaymentService'
+	export default {
+		data () {
+			return {
+				title: '',
+				method: '',
+				visibleChoose: false,
+				loading: false,
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				dataList: [],
+				searchForm: {
+					projectName: '',
+					name: '',
+					no: '',
+					type: '',
+					industry: ''
+				},
+				projectId: ''
+			}
+		},
+		// workClientService: null,
+		PaymentService: null,
+		created () {
+			// this.workClientService = new WorkClientService()
+			this.paymentService = new PaymentService()
+		},
+		components: {
+		},
+		methods: {
+			init (deputy) {
+				this.title = '借款信息选择'
+				this.visibleChoose = true
+				this.list()
+			},
+			// 表单提交
+			getWorkClient () {
+				let row = this.$refs.clientTable.getRadioRecord()
+				console.log('row',row)
+				if (this.commonJS.isEmpty(row)) {
+					this.$message.error('请至少选择一条数据')
+				} else {
+					this.close()
+					this.$emit('getPayment', row)
+
+				}
+			},
+			list () {
+				this.loading = true
+				this.paymentService.listByUserId({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+			},
+			// 当前页
+			currentChangeHandle ({currentPage, pageSize}) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.list()
+			},
+			resetSearch () {
+				// this.$refs.searchForm.resetFields()
+				this.list()
+			},
+			close () {
+				// this.$refs.searchForm.resetFields()
+				this.visibleChoose = false
+			}
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-dialog__body {
+		padding-top: 0;
+	}
+	/deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+		margin-bottom: 0px;
+	}
+</style>

+ 84 - 0
src/views/jy/reimbursement/ProgramForm.vue

@@ -0,0 +1,84 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="900px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <vxe-table
+        border="inner"
+        show-overflow
+        show-footer
+        ref="baseTable"
+        class="vxe-table-element"
+        :data="dataList"
+      >
+        <vxe-table-column type="seq" width="50" title="序号" align="center"></vxe-table-column>
+        <vxe-table-column min-width="300px" field="name" align="left" title="项目名称">
+          <template #default="scope">
+            <el-link type="primary" :underline="false" @click="openProjectForm(scope.row)" >{{scope.row.name}}</el-link>
+          </template>
+        </vxe-table-column>
+        <vxe-table-column width="250px" field="no" align="center" title="项目编号"></vxe-table-column>
+      </vxe-table>
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			</span>
+		</template>
+    </el-dialog>
+    <ProjectForm ref="projectForm"></ProjectForm>
+  </div>
+</template>
+
+<script>
+	import ProjectForm from '@/views/jy/project/ProjectDia'
+	import ReimbursementService from '@/api/jy/ReimbursementService'
+	export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        dataList: ''
+      }
+    },
+		ReimbursementService: null,
+    created () {
+      this.reimbursementService = new ReimbursementService()
+    },
+    components: {
+      ProjectForm
+    },
+    methods: {
+      init (id) {
+        this.method = 'view'
+        this.title = '查看项目信息'
+        this.visible = true
+        this.dataList = []
+        if (this.commonJS.isNotEmpty(id)) {
+          this.list(id)
+        }
+      },
+      async list (ids) {
+        this.loading = true
+        let resp = await this.reimbursementService.queryByProIds(ids)
+        if (resp) {
+          this.dataList = resp
+        }
+        this.loading = false
+      },
+      openProjectForm (row) {
+		  this.$refs.projectForm.init('view', row.id,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId,row.reportsSubmitId,row.archiveId,row.eiaId)
+      },
+      close () {
+        this.dataList = []
+        this.visible = false
+      }
+    }
+  }
+</script>

File diff suppressed because it is too large
+ 1340 - 0
src/views/jy/reimbursement/ReimbursementForm.vue


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

@@ -0,0 +1,568 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form m-b-10" v-if="searchVisible" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="报销时间" prop="dates">
+				<el-date-picker
+					style=""
+					placement="bottom-start"
+					value-format="YYYY-MM-DD h:m:s"
+					v-model="searchForm.dates"
+					type="datetimerange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="经办人" prop="handled">
+				<UserSelect :limit='1' :modelValue="searchForm.handled" @update:modelValue='(value, label) => {searchForm.handled = value}'></UserSelect>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销人" prop="reimBy">
+				<UserSelect :limit='1' :modelValue="searchForm.reimBy" @update:modelValue='(value, label) => {searchForm.reimBy = value}'></UserSelect>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销状态" prop="status">
+				<el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
+					<el-option
+						v-for="item in $dictUtils.getDictList('status')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销部门" prop="department">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                value: 'id',             // ID字段名
+                label: 'name',         // 显示名称
+                children: 'children'    // 子级字段名
+              }"
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.department"
+					:clearable="true"
+					:accordion="true"
+					size="default"
+					@getValue="(value,label) => {searchForm.department=label}"/>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销类型" prop="applyType">
+				<el-select v-model="searchForm.applyType" placeholder="请选择报销类型">
+					<el-option
+						v-for="item in $dictUtils.getDictList('jy_apply')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销类别" prop="remiType">
+				<SelectTree
+					ref="areaTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+					url="/finance-server/reimbursementApproval/type/treeData1?type=last"
+					:value="searchForm.remiType"
+					:clearable="true"
+					:accordion="true"
+					size="default"
+					@getValue="(value, label) => {searchForm.remiType=label}"/>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="报销金额" prop="amounts">
+				<InputNumber :disabled="false" :precision="num" :value="searchForm.amounts"
+							 @changefrom="(val)=>{searchForm.amounts[0]=val}"
+							 @changeto="(val)=>{searchForm.amounts[1]=val}"
+				></InputNumber>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
+				<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>-->
+				</template>
+				<template #tools>
+					<vxe-button
+						text
+						type="primary"
+						:title="searchVisible ? '收起检索' : '展开检索'"
+						icon="vxe-icon-search"
+						class="tool-btn"
+						@click="searchVisible = !searchVisible"
+					></vxe-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 80px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="infoTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					:sort-config="{remote:true}"
+					:export-config="{
+                    remote: true,
+                    filename: `会计报销数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: `会计报销数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column type="checkbox" width="60" ></vxe-column>
+					<vxe-column min-width="130" title="报销编号" field="no" align="center">
+						<template #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row.id)">{{scope.row.no}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="130" title="报销类型" field="applyType" align="center">
+						<template #default="scope">
+							{{$dictUtils.getDictLabel('jy_apply', scope.row.applyType, '')}}
+						</template>
+					</vxe-column>
+					<vxe-column min-width="130" title="报销类别" field="typeName" align="center"></vxe-column>
+					<vxe-column min-width="180" title="报销项目" field="projectName" align="center">
+						<template #default="scope">
+							<el-link  type="primary" :underline="false" v-if="scope.row.applyType === '4'" @click="viewProject(scope.row.projectId)">{{scope.row.projectName}}</el-link>
+							<span v-else>{{scope.row.applyType !== '4' ? '' : scope.row.projectName}}</span>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="100" title="经办人" field="createName" align="center"></vxe-column>
+					<vxe-column min-width="100" title="报销人" field="name" align="center"></vxe-column>
+					<vxe-column min-width="100" title="报销部门" field="deptName" align="center"></vxe-column>
+					<vxe-column min-width="100" title="报销日期" field="createTime" align="center"></vxe-column>
+					<vxe-column min-width="100" title="报销金额(元)" field="number" fixed="right" align="center"></vxe-column>
+					<vxe-column min-width="100" title="状态" fixed="right" align="center" field="status">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.status, '未开始')}} </el-button>
+						</template>
+					</vxe-column>
+
+					<vxe-column title="操作" min-width="130px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button v-if=" (scope.row.status === '5' )" text type="primary" @click="editForm(scope.row)">修改</el-button>
+								<el-button v-if=" (scope.row.status === '5')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+							</div>
+							<div v-else>
+								<el-button v-if="hasPermission('apply:edit') && scope.row.createById === $store.state.user.id && (scope.row.status === '1' || scope.row.status === '3' )" text type="primary"   @click="edit(scope.row)">修改</el-button>
+								<el-button v-if="hasPermission('apply:edit') && scope.row.createById === $store.state.user.id && (scope.row.status === '2')" text type="primary"  @click="reback(scope.row)">撤回</el-button>
+								<el-button v-if="hasPermission('apply:del') && scope.row.createById === $store.state.user.id && (scope.row.status === '1')" text type="primary"  @click="del(scope.row.id)">删除</el-button>
+								<!--              审核-->
+								<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary"  @click="examine(scope.row)">审核</el-button>
+								<!--              被驳回后当前申请人重新调整-->
+								<el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.status === '4'" text type="primary"  @click="adjust(scope.row)">驳回调整</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+				<ProjectListForm ref="projectListForm"></ProjectListForm>
+				<InfoForm ref="infoForm" @refreshDataList="refreshList"></InfoForm>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import ReimbursementService from '@/api/jy/ReimbursementService'
+	import InputNumber from '@/views/workContract/InputNumber.vue'
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import taskService from '@/api/flowable/TaskService'
+	import processService from '@/api/flowable/ProcessService'
+	import pick from 'lodash.pick'
+	import userService from '@/api/sys/UserService'
+	import ProjectListForm from './ProgramForm'
+	import InfoForm from './InfoForm'
+	export default {
+		data () {
+			return {
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				visable: false,
+				gridData: [],
+				searchForm: {
+					project: '',
+					dates: [],
+					handled: '',
+					reimBy: '',
+					status: [],
+					department: '',
+					remiType: '',
+					amounts: [],
+					reportNumber: '',
+					applyType: ''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				loading: false,
+				isAdmin: false
+			}
+		},
+		ReimbursementService: null,
+		created () {
+			this.reimbursementService = new ReimbursementService()
+		},
+		components: {
+			InputNumber,
+			SelectTree,
+			UserSelect,
+			ProjectListForm,
+			InfoForm,
+
+		},
+		mounted () {
+			this.$nextTick(() => {
+				//将表格和工具栏进行关联
+				const $table = this.$refs.infoTable;
+				const $toolbar = this.$refs.toolbarRef;
+				$table.connect($toolbar);
+			})
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.create = this.$store.state.user.id
+				console.log('createId', this.create)
+				return this.$store.state.user
+			}
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			viewContract (id) {
+				this.$refs.contractNameForm.init('view', id)
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				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) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/reimbursement/ReimbursementList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				// 暂存修改
+				let status = ''
+				if (row.status === '1') {
+					status = 'startAndHold'
+				}
+				// 撤回或者驳回修改
+				if (row.status === '3') {
+					status = 'startAndClose'
+				} else if (row.status === '4') {
+					status = 'reapplyFlag'
+				}
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-报销申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-报销申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'jy_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.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: status,
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessTable: 'jy_reimbursement_info',
+							businessId: row.id,
+							isShow: false,
+							routePath: '/jy/reimbursement/ReimbursementList'
+						}
+					})
+				})
+			},
+			// 撤回
+			reback (row) {
+				this.$confirm(`确定撤回流程吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					processService.revokeProcIns(row.procInsId).then((data) => {
+						let param = {status: '3', id: row.id}
+						this.reimbursementService.updateStatusById(param)
+						this.$message.success('回退成功')
+						this.refreshList()
+					})
+				})
+			},
+			// 查看
+			view (id) {
+				this.$refs.infoForm.init('view', id)
+			},
+			editForm (row) {
+				this.$refs.infoForm.init('edit', row.id)
+			},
+			// 查看报销项目
+			viewProject (id) {
+				this.$refs.projectListForm.init(id)
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.reimbursementService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('data',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-报销管理').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.infoTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.reimbursementService.remove(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			// 流程详情
+			detail (row) {
+				if (!this.commonJS.isEmpty(row.status) && row.status !== '1') {
+					taskService.getTaskDef({
+						procInsId: row.procInsId,
+						procDefId: row.processDefinitionId
+					}).then((data) => {
+						this.$router.push({
+							path: '/flowable/task/TaskFormDetail',
+							query: {
+								...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+								isShow: 'false',
+								readOnly: true,
+								title: '流程详情',
+								formTitle: '流程详情',
+								businessId: row.id,
+								status: 'reback'
+							}
+						})
+					})
+				}
+			},
+			openProgramPageForm (rowIndex) {
+				// 打开单选组件
+				this.$refs.projectChooseForm.init(null, false)
+			},
+			getProgram (rows) {
+				// rows[0].name // 项目名称、开票详情
+				// rows[0].contractName // 合同名称
+				// rows[0].no // 项目编号
+				// rows[0].clientName // 客户名称
+				// rows[0].client // 客户id
+				// rows[0].id // 项目id
+				// rows[0].location // 项目所在地
+				this.searchForm.project = rows.projectName
+			},
+			// 下载文档
+			exportFile () {
+				this.loading = true
+				this.reimbursementApprovalService.exportFile({
+					'itemType': '1',
+					...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)
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 自定义服务端导出
+			exportMethod ({ options }) {
+				// 传给服务端的参数
+				const params = {
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm,
+					filename: options.filename,
+					sheetName: options.sheetName,
+					isHeader: options.isHeader,
+					original: options.original,
+					mode: options.mode,
+					selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
+					exportFields: options.columns.map(column => column.property)
+				}
+				return this.reimbursementApprovalService.exportFile(params).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(res, options.filename)
+				}).catch(function (err) {
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				console.log('row', row)
+				this.reimbursementService.findById(row.id).then((data) => {
+					console.log('data', data)
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.reimbursementService.findById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				console.log('row.taskId', row.taskId)
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/reimbursement/ReimbursementList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			}
+		}
+	}
+</script>