chenrui
2025-06-06 5abe582142405569435c7cd0a479908aa5bff992
src/views/procurementManagement/paymentLedger/index.vue
@@ -32,6 +32,7 @@
            tooltip-effect="dark"
            @row-click="rowClick"
            :show-summary="isShowSummary"
            :summary-method="summarizeMainTable"
            class="lims-table"
          >
            <el-table-column
@@ -78,6 +79,7 @@
            :isSelection="false"
            :tableLoading="tableLoadingSon"
            :isShowSummary="isShowSummarySon"
            :summaryMethod="summarizeMainTable1"
          ></PIMTable>
          <pagination
              v-show="sonTotal > 0"
@@ -148,7 +150,7 @@
    prop: "happenTime",
  },
  {
    label: "发票金额",
    label: "发票金额(元)",
    prop: "invoiceAmount",
    formatData: (params) => {
      return parseFloat(params).toFixed(2);
@@ -175,7 +177,22 @@
const isShowSummarySon = ref(true);
const detailPageNum = ref(1);
const detailPageSize = ref(10);
const { proxy } = getCurrentInstance()
// 主表合计方法
const summarizeMainTable = (param) => {
  return proxy.summarizeTable(param, ['invoiceAmount', 'paymentAmount', 'payableAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(param, ['invoiceAmount', 'currentPaymentAmount', 'payableAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
/** 搜索按钮操作 */
const handleQuery = () => {
  page.current = 1;
@@ -220,10 +237,10 @@
const handlePagination = ({ page, limit }) => {
  sonPage.current = page;
  sonPage.size = limit;
  const start = (page - 1) * limit;
  const end = start + limit;
  originalTableDataSon.value = tableDataSon.value.slice(start, end);
}