| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="报告日期"> |
| | | <el-form-item label="捐献日期"> |
| | | <el-date-picker |
| | | v-model="donatetimeRange" |
| | | type="daterange" |
| | |
| | | </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" |
| | |
| | | <el-table-column type="index" label="序号" width="55" align="center" /> |
| | | <el-table-column |
| | | prop="donatetime" |
| | | label="报告日期" |
| | | label="捐献日期" |
| | | width="120" |
| | | align="center" |
| | | > |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column prop="name" label="受体姓氏" width="120" align="center" /> |
| | | <el-table-column label="移植日期" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.receiveTime, "{y}-{m}-{d}") }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="器官状态" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ selectOrganState(scope.row.organState) }}</span> |
| | |
| | | width="120" |
| | | align="center" |
| | | /> |
| | | <el-table-column label="付款状态" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ payStatus(scope.row) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="amount" |
| | | label="实收金额" |
| | | width="120" |
| | | align="center" |
| | | /> |
| | | <el-table-column label="未付金额" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatReceivableDiff(scope.row) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="收款日期" width="120" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.organtime, "{y}-{m}-{d}") }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="organchargedesc" |
| | | label="备注" |
| | |
| | | <script> |
| | | import { |
| | | listDonorchargeorgan, |
| | | updateDonorchargeorgan |
| | | updateDonorchargeorgan, |
| | | exportOrganfee |
| | | } from "@/api/project/donorcharge"; |
| | | import { listOrganization } from "@/api/project/organization"; |
| | | |
| | |
| | | return { |
| | | // 遮罩层 |
| | | loading: false, |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | |
| | | { value: "3", label: "库存" }, |
| | | { value: "4", label: "失功" }, |
| | | { value: "5", label: "直系免除" }, |
| | | { value: "6", label: "不良事件" } |
| | | { value: "6", label: "不良事件" }, |
| | | { value: "7", label: "科研" } |
| | | ], |
| | | // 修改弹窗 |
| | | editOpen: false, |
| | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$modal |
| | | .confirm("是否确认导出器官费用数据?") |
| | | .then(() => { |
| | | this.exportLoading = true; |
| | | return exportOrganfee(queryParams); |
| | | }) |
| | | .then(response => { |
| | | this.$download.name(response.msg); |
| | | }) |
| | | .catch(() => {}) |
| | | .finally(() => { |
| | | this.exportLoading = false; |
| | | }); |
| | | }, |
| | | /** 应收金额-实收金额的差额(保留两位小数),应收金额为空时返回 null */ |
| | | receivableDiff(row) { |
| | | if ( |
| | | row.organcharge === null || |
| | | row.organcharge === undefined || |
| | | row.organcharge === "" |
| | | ) { |
| | | return null; |
| | | } |
| | | const receivable = Number(row.organcharge); |
| | | if (isNaN(receivable)) { |
| | | return null; |
| | | } |
| | | const received = Number(row.amount); |
| | | const diff = receivable - (isNaN(received) ? 0 : received); |
| | | return Math.round(diff * 100) / 100; |
| | | }, |
| | | /** 差额展示文本,固定两位小数 */ |
| | | formatReceivableDiff(row) { |
| | | const diff = this.receivableDiff(row); |
| | | return diff === null ? "" : diff.toFixed(2); |
| | | }, |
| | | /** 差额为 0 为已付,其它为未付 */ |
| | | payStatus(row) { |
| | | const diff = this.receivableDiff(row); |
| | | if (diff === null) { |
| | | return ""; |
| | | } |
| | | return diff === 0 ? "已付" : "未付"; |
| | | }, |
| | | /** 是否未收费:organ_charge_state 为 0 或为空 */ |
| | | isUncharged(row) { |
| | | const state = row.organChargeState; |