| | |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" |
| | | :isShowSummary="isShowSummarySon" |
| | | :summaryMethod="summarizeMainTable1" |
| | | :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" |
| | | :total="total"></PIMTable> |
| | | </div> |
| | |
| | | import { ref } from 'vue' |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { |
| | | receiptPaymentHistoryList |
| | | receiptPaymentHistoryListPage |
| | | } from "@/api/salesManagement/receiptPayment.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const tableColumn = ref([ |
| | |
| | | { |
| | | label: '回款金额', |
| | | prop: 'receiptPaymentAmount', |
| | | formatData: (params) => { |
| | | return parseFloat(params).toFixed(2); |
| | | } |
| | | }, |
| | | { |
| | | label: '回款方式', |
| | |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | | const { receipt_payment_type } = proxy.useDict("receipt_payment_type") |
| | | |
| | | const isShowSummarySon = ref(true); |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | const pagination = ({ current, limit }) => { |
| | | page.current = current; |
| | | page.size = limit; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList() |
| | | } |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | receiptPaymentHistoryList({ ...searchForm.value, ...page }).then(res => { |
| | | receiptPaymentHistoryListPage({ ...searchForm.value, ...page }).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.rows |
| | | tableData.value = res.records |
| | | total.value = res.total |
| | | }) |
| | | } |
| | | // 子表合计方法 |
| | | const summarizeMainTable1 = (param) => { |
| | | return proxy.summarizeTable(param, ['receiptPaymentAmount'], { |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | }); |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |