gaoluyang
2 天以前 fe631515b71782a10a750874f6d4582fe027cd22
src/views/equipmentManagement/ledger/index.vue
@@ -76,6 +76,8 @@
          size: pagination.pageSize,
          total: pagination.total,
        }"
        :isShowSummary="true"
        :summaryMethod="summaryMethod"
        @selection-change="handleSelectionChange"
        @pagination="changePage"
      >
@@ -103,6 +105,8 @@
import dayjs from "dayjs";
import QRCode from "qrcode";
import { ref } from "vue";
import { summarizeTable } from "@/utils/summarizeTable";
import {Search} from "@element-plus/icons-vue";
defineOptions({
  name: "设备台账",
@@ -127,7 +131,12 @@
} = usePaginationApi(
  getLedgerPage,
  {
    searchText: undefined,
    deviceName: undefined,
    deviceModel: undefined,
    supplierName: undefined,
    unit: undefined,
    entryDateStart: undefined,
    entryDateEnd: undefined,
  },
  [
    {
@@ -227,6 +236,20 @@
   pagination.pageSize = limit;
  onCurrentChange(page);
};
// 合计方法
const summaryMethod = (param) => {
  return summarizeTable(
    param,
    ['number', 'taxIncludingPriceTotal', 'unTaxIncludingPriceTotal', 'taxIncludingPriceUnit'],
    {
      number: { noDecimal: true },
      taxIncludingPriceTotal: { decimalPlaces: 2 },
      unTaxIncludingPriceTotal: { decimalPlaces: 2 }
    }
  );
};
const deleteRow = (id) => {
  ElMessageBox.confirm("此操作将永久删除该文件, 是否继续?", "提示", {
    confirmButtonText: "确定",