| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form |
| | | class="opo-query-form" |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="70px" |
| | | > |
| | | <el-row :gutter="8"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="业务人员" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.pausername" |
| | | placeholder="请输入姓名" |
| | | clearable |
| | | size="small" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item align="left" label="业务组" prop="treatmenthospitalno"> |
| | | <el-select |
| | | v-model="queryParams.padeptno" |
| | | placeholder="请选择案例状态" |
| | | > |
| | | <el-option |
| | | v-for="item in deptList" |
| | | :label="item.deptName" |
| | | :value="item.deptId" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="费用类型"> |
| | | <el-select |
| | | v-model="queryParams.paexpensetype" |
| | | placeholder="请选择案例状态" |
| | | > |
| | | <el-option |
| | | v-for="item in reportlist" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="统计日期"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="月份范围"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="selecttime" |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="费用类型"> |
| | | <el-select |
| | | v-model="queryParams.paexpensetype" |
| | | placeholder="请选择费用类型" |
| | | > |
| | | <el-option |
| | | v-for="item in reportlist" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item align="left" label="报销部门" prop="padeptno"> |
| | | <el-select |
| | | v-model="queryParams.padeptno" |
| | | placeholder="请选择报销部门" |
| | | > |
| | | <el-option |
| | | v-for="item in deptList" |
| | | :label="item.deptName" |
| | | :value="item.deptId" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报销人员" prop="pauserno"> |
| | | <el-select |
| | | v-model="queryParams.pauserno" |
| | | placeholder="请选择报销人员" |
| | | clearable |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.username" |
| | | :label="item.nickname" |
| | | :value="item.username" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | :loading="exportLoading" |
| | | @click="handleExport" |
| | | >导出</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <!--<el-table v-loading="loading" border :data="donatebaseinfoList"> --> |
| | | <el-table |
| | | :data="jxidata" |
| | |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | > |
| | | <el-table-column label="序号" align="center" prop="id" width="100"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="序号" align="center" prop="id" width="50" /> |
| | | <el-table-column label="统计月份" align="center" prop="applymonth" /> |
| | | <el-table-column label="业务组" align="center" prop="deptmentName"> |
| | | </el-table-column> |
| | | <el-table-column label="业务组" align="center" prop="deptmentName" /> |
| | | <el-table-column label="专职人员" align="center" prop="username" /> |
| | | <el-table-column label="报销总金额" align="center" prop="amount" width="180" :formatter="amountFormatter" /> |
| | | <el-table-column label="专家费" align="center" prop="expertfee" width="160" :formatter="amountFormatter" /> |
| | | <el-table-column label="伦理专家费" align="center" prop="ethicalistfee" width="160" :formatter="amountFormatter" /> |
| | | <el-table-column label="医学成本" align="center" prop="medicalcost" width="160" :formatter="amountFormatter" /> |
| | | <el-table-column label="办公费" align="center" prop="officecost" width="160" :formatter="amountFormatter" /> |
| | | <el-table-column label="差旅费" align="center" prop="reimcost" width="160" :formatter="amountFormatter" /> |
| | | |
| | | <el-table-column label="金额" align="center" prop="amount" /> |
| | | |
| | | <el-table-column label="操作" align="center"> |
| | | <!-- <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" |
| | | >明细</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | |
| | | <div style="margin: 10px;text-align: right;"> |
| | |
| | | listsfeistatistics, |
| | | listbxiaostatistics, |
| | | listjixstatistics, |
| | | listanlstatistics |
| | | listanlstatistics, |
| | | exportExpenseStatistics |
| | | } from "@/api/project/statistics"; |
| | | |
| | | import { listUser } from "@/api/project/organization"; |
| | |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | import AnnexUpload from "@/views/project/components/annexupload"; |
| | | import { listDept } from "@/api/system/dept"; |
| | | |
| | | |
| | | export default { |
| | | //import引入的组件需要注入到对象中才能使用 |
| | |
| | | selecttime: "", |
| | | reportervalue: "", |
| | | reportlist: [ |
| | | { label: "差旅费", value: "1" }, |
| | | { label: "差旅费", value: "5" }, |
| | | { label: "专家费", value: "1" }, |
| | | { label: "伦理专家费", value: "2" }, |
| | | { label: "医学成本", value: "3" }, |
| | |
| | | qu: "" |
| | | }, |
| | | deptList: [], |
| | | userList: [], |
| | | // 遮罩层 |
| | | loading: false, |
| | | // 导出遮罩层 |
| | |
| | | this.queryParams.pabegtime = this.selecttime[0]; |
| | | this.queryParams.paendtime = this.selecttime[1]; |
| | | // if (this.queryParams.paendtime == this.queryParams.pabegtime) { |
| | | let num = Number(this.queryParams.paendtime.slice(5, 7)); |
| | | if (num < 9) { |
| | | let mon = Number(this.queryParams.paendtime.slice(6, 7)); |
| | | this.queryParams.paendtime = |
| | | this.queryParams.paendtime.slice(0, 5) + |
| | | "0" + |
| | | (mon + 1) + |
| | | "-" + |
| | | "01" + |
| | | " " + |
| | | "00" + |
| | | ":" + |
| | | "00" + |
| | | ":" + |
| | | "00"; |
| | | } |
| | | // this.queryParams.paendtime=this.queryParams.paendtime.slice(0,5)年 |
| | | else if (num >= 10) { |
| | | this.queryParams.paendtime = |
| | | this.queryParams.paendtime.slice(0, 5) + |
| | | (num + 1) + |
| | | "-" + |
| | | "01" + |
| | | " " + |
| | | "00" + |
| | | ":" + |
| | | "00" + |
| | | ":" + |
| | | "00"; |
| | | } else { |
| | | this.queryParams.paendtime = |
| | | this.queryParams.paendtime.slice(0, 5) + |
| | | "10" + |
| | | "-" + |
| | | "01" + |
| | | " " + |
| | | "00" + |
| | | ":" + |
| | | "00" + |
| | | ":" + |
| | | "00"; |
| | | } |
| | | // 结束时间取"所选结束月的次月 1 号",以包含整个结束月。 |
| | | // 原实现把月份 +1 后直接拼字符串,12 月会得到 13 月(2026-13-01), |
| | | // MySQL 报 Incorrect datetime value,存储过程直接 500。 |
| | | this.queryParams.paendtime = this.$moment(this.queryParams.paendtime) |
| | | .startOf("month") |
| | | .add(1, "month") |
| | | .format("YYYY-MM") |
| | | .concat("-01 00:00:00"); |
| | | this.queryParams.pabegtime = |
| | | this.queryParams.pabegtime + " " + "00" + ":" + "00" + ":" + "00"; |
| | | // } |
| | |
| | | listDept({}).then(response => { |
| | | this.deptList = response.data; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | getUserList() { |
| | | listUser().then(res => { |
| | | this.userList = res.data; |
| | | }); |
| | | }, |
| | | resetArr(Arr) { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | const queryParams = { |
| | | pabegtime: this.queryParams.pabegtime, |
| | | paendtime: this.queryParams.paendtime, |
| | | padeptno: this.queryParams.padeptno, |
| | | pauserno: this.queryParams.pauserno, |
| | | paexpensetype: this.queryParams.paexpensetype |
| | | }; |
| | | this.$modal |
| | | .confirm("是否确认导出当前筛选条件下的费用统计数据?") |
| | | .then(() => { |
| | | this.exportLoading = true; |
| | | return exportExpenseStatistics(queryParams); |
| | | }) |
| | | .then(response => { |
| | | this.$download.name(response.msg); |
| | | this.exportLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.exportLoading = false; |
| | | }); |
| | | }, |
| | | |
| | | // 表单重置 |
| | | reset() { |
| | |
| | | |
| | | this.reportervalue = ""; |
| | | |
| | | |
| | | this.queryParams = { |
| | | }; |
| | | this.queryParams = {}; |
| | | this.selecttime = []; |
| | | this.getTimeList(); |
| | | this.searchAddress = { |
| | |
| | | |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** 金额显示:保留两位小数,0.00 不显示 */ |
| | | formatAmount(value) { |
| | | if (value === null || value === undefined || value === "") { |
| | | return ""; |
| | | } |
| | | const num = Number(value); |
| | | if (!Number.isFinite(num) || num === 0) { |
| | | return ""; |
| | | } |
| | | return num.toFixed(2); |
| | | }, |
| | | amountFormatter(row, column, cellValue) { |
| | | return this.formatAmount(cellValue); |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | |
| | | |
| | | const values = data.map(item => Number(item[column.property])); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const total = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | |
| | | return prev; |
| | | } |
| | | }, 0); |
| | | sums[index] = sums[index].toFixed(2); // 保留2位小数,解决小数合计列; |
| | | // 合计保留 2 位小数;0.00 不显示 |
| | | sums[index] = total === 0 ? "" : Number(total).toFixed(2); |
| | | } else { |
| | | sums[index] = ""; |
| | | } |
| | |
| | | //获取列表 |
| | | this.getList(); |
| | | this.listDept(); |
| | | this.getUserList(); |
| | | } |
| | | |
| | | // //生命周期 - 挂载完成(可以访问DOM元素) |