chenrui
2025-06-06 ece2dfeb926d728b10db38038e4d12e9e9851c24
src/views/procurementManagement/paymentHistory/index.vue
@@ -10,6 +10,8 @@
    </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>
@@ -20,9 +22,10 @@
import { ref } from 'vue'
import { Search } from "@element-plus/icons-vue";
import {
  paymentHistoryList
  paymentHistoryListPage
} from "@/api/procurementManagement/paymentEntry.js";
const { proxy } = getCurrentInstance()
const isShowSummarySon = ref(true);
const tableColumn = ref([
  {
    label: '付款日期',
@@ -35,6 +38,9 @@
  {
    label: '付款金额',
    prop: 'currentPaymentAmount',
    formatData: (params) => {
      return parseFloat(params).toFixed(2);
    }
  },
  {
    label: '付款方式',
@@ -70,19 +76,26 @@
  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
  paymentHistoryList({ ...searchForm.value, ...page }).then(res => {
  paymentHistoryListPage({ ...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, ['currentPaymentAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 表格选择数据
const handleSelectionChange = (selection) => {
  selectedRows.value = selection