| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="器官名称" prop="organname"> |
| | | <el-input |
| | | v-model="queryParams.organname" |
| | | placeholder="请输入器官名称" |
| | | clearable |
| | | size="small" |
| | | style="width: 160px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="利用状态" prop="organState"> |
| | | <el-select |
| | | v-model="queryParams.organState" |
| | |
| | | v-loading="loading" |
| | | border |
| | | :data="organfeeList" |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | highlight-current-row |
| | | @current-change="handleCurrentChange" |
| | | > |
| | |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="210" |
| | | width="230" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | |
| | | addDonorchargeorgan, |
| | | updateDonorchargeorgan, |
| | | delDonorchargeorgan, |
| | | exportOrganfee |
| | | exportOrganfee, |
| | | getOrganfeeSummary |
| | | } from "@/api/project/donorcharge"; |
| | | import { listOrganization } from "@/api/project/organization"; |
| | | |
| | |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 合计(应收/实收/未回款) |
| | | summary: { |
| | | organchargeTotal: 0, |
| | | amountTotal: 0, |
| | | unreceivedTotal: 0 |
| | | }, |
| | | // 器官费用列表 |
| | | organfeeList: [], |
| | | // 表格当前选中行 |
| | |
| | | hospitalno: null, |
| | | hospitalnoIsNull: false, |
| | | donorname: null, |
| | | organname: null, |
| | | organState: null, |
| | | payStatus: null, |
| | | paymentid: null, |
| | |
| | | .finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | this.getSummary(); |
| | | }, |
| | | /** 查询合计(应收/实收/未回款),按当前查询条件统计全部结果 */ |
| | | getSummary() { |
| | | getOrganfeeSummary(this.queryParams) |
| | | .then(response => { |
| | | const data = response.data || {}; |
| | | this.summary = { |
| | | organchargeTotal: Number(data.organchargeTotal || 0), |
| | | amountTotal: Number(data.amountTotal || 0), |
| | | unreceivedTotal: Number(data.unreceivedTotal || 0) |
| | | }; |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | /** 表格底部合计行 */ |
| | | getSummaries({ columns }) { |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = "合计"; |
| | | return; |
| | | } |
| | | if (column.property === "organcharge") { |
| | | sums[index] = this.summary.organchargeTotal.toFixed(2); |
| | | } else if (column.property === "amount") { |
| | | sums[index] = this.summary.amountTotal.toFixed(2); |
| | | } else if (column.label === "未回款金额") { |
| | | sums[index] = this.summary.unreceivedTotal.toFixed(2); |
| | | } else { |
| | | sums[index] = ""; |
| | | } |
| | | }); |
| | | return sums; |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | |
| | | this.queryParams.hospitalnoIsNull = false; |
| | | this.queryParams.hospitalno = null; |
| | | this.queryParams.donorname = null; |
| | | this.queryParams.organname = null; |
| | | this.queryParams.organState = null; |
| | | this.queryParams.payStatus = null; |
| | | this.queryParams.starttime = null; |