gaoluyang
昨天 89a87a389d1e1a1a363aa39637694c044511af98
数字展示修改
已修改9个文件
143 ■■■■ 文件已修改
src/components/PIMTable/PIMTable.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/invoiceEntry/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentEntry/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentHistory/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/paymentLedger/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/invoiceLedger/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPayment/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPaymentHistory/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/receiptPaymentLedger/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PIMTable/PIMTable.vue
@@ -3,6 +3,7 @@
    :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)"
    :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey"
    style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @current-change="currentChange" :show-summary="isShowSummary"
            :summary-method="summaryMethod"
    @selection-change="handleSelectionChange" class="lims-table">
    <el-table-column align="center" type="selection" width="55"  v-if="isSelection"/>
    <el-table-column align="center" label="序号" type="index" width="60" />
@@ -123,6 +124,10 @@
    type: Function,
    default: () => { }
  },
  summaryMethod: {
    type: Function,
    default: () => { }
  },
  rowClick: {
    type: Function,
    default: () => { }
src/views/procurementManagement/invoiceEntry/index.vue
@@ -107,9 +107,7 @@
          <el-form-item label="产品信息:" prop="entryDate">
          </el-form-item>
        </el-row>
        <el-table :data="productData" border @selection-change="productSelected" show-summary style="width: 100%">
          :summary-method="summarizeChildrenTable"
          >
        <el-table :data="productData" border @selection-change="productSelected" show-summary style="width: 100%" :summary-method="summarizeChildrenTable">
          <el-table-column align="center" label="序号" type="index" width="60" />
          <el-table-column label="产品大类" prop="productCategory" />
          <el-table-column label="规格型号" prop="specificationModel" />
src/views/procurementManagement/paymentEntry/index.vue
@@ -14,6 +14,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>
@@ -201,7 +203,15 @@
  }
})
const { searchForm, form, rules } = toRefs(data)
const isShowSummarySon = ref(true);
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(param, ['invoiceAmount', 'paymentAmountTotal', 'unPaymentAmountTotal'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 查询列表
/** 搜索按钮操作 */
const handleQuery = () => {
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>
@@ -23,6 +25,7 @@
  paymentHistoryList
} from "@/api/procurementManagement/paymentEntry.js";
const { proxy } = getCurrentInstance()
const isShowSummarySon = ref(true);
const tableColumn = ref([
  {
    label: '付款日期',
@@ -86,6 +89,13 @@
    total.value = res.total
  })
}
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(param, ['currentPaymentAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 表格选择数据
const handleSelectionChange = (selection) => {
  selectedRows.value = selection
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"
@@ -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;
src/views/salesManagement/invoiceLedger/index.vue
@@ -271,26 +271,10 @@
}
// 主表合计方法
const summarizeMainTable = (param) => {
  const { columns, data } = param;
  const sums = [];
  columns.forEach((column, index) => {
    if (index === 0) {
      sums[index] = '合计';
      return;
    }
    const prop = column.property;
    if (['invoiceAmount'].includes(prop)) {
      const values = data.map(item => Number(item[prop]));
      if (!values.every(value => isNaN(value))) {
        sums[index] = values.reduce((acc, val) => (!isNaN(val) ? acc + val : acc), 0);
      } else {
        sums[index] = '';
      }
    } else {
      sums[index] = '';
    }
  })
  return sums;
  return proxy.summarizeTable(param, ['invoiceTotal'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 打开弹框
const openForm = (row) => {
src/views/salesManagement/receiptPayment/index.vue
@@ -199,26 +199,10 @@
}
// 主表合计方法
const summarizeMainTable = (param) => {
  const { columns, data } = param;
  const sums = [];
  columns.forEach((column, index) => {
    if (index === 0) {
      sums[index] = '合计';
      return;
    }
    const prop = column.property;
    if (['invoiceAmount','receiptPaymentAmount'].includes(prop)) {
      const values = data.map(item => Number(item[prop]));
      if (!values.every(value => isNaN(value))) {
        sums[index] = values.reduce((acc, val) => (!isNaN(val) ? acc + val : acc), 0);
      } else {
        sums[index] = '';
      }
    } else {
      sums[index] = '';
    }
  })
  return sums;
  return proxy.summarizeTable(param, ['invoiceTotal', 'receiptPaymentAmountTotal', 'noReceiptAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 打开弹框
const openForm = () => {
src/views/salesManagement/receiptPaymentHistory/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>
@@ -35,6 +37,9 @@
  {
    label: '回款金额',
    prop: 'receiptPaymentAmount',
    formatData: (params) => {
      return parseFloat(params).toFixed(2);
    }
  },
  {
    label: '回款方式',
@@ -77,7 +82,7 @@
})
const { searchForm } = toRefs(data)
const { receipt_payment_type } = proxy.useDict("receipt_payment_type")
const isShowSummarySon = ref(true);
// 查询列表
/** 搜索按钮操作 */
const handleQuery = () => {
@@ -97,6 +102,13 @@
    total.value = res.total
  })
}
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(param, ['receiptPaymentAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 表格选择数据
const handleSelectionChange = (selection) => {
  selectedRows.value = selection
src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -35,7 +35,7 @@
        <el-table :data="receiptRecord" border
                  :row-key="row => row.id"
                  show-summary
                  :summary-method="summarizeMainTable"
                  :summary-method="summarizeMainTable1"
                  height="calc(100vh - 18.5em)">
          <el-table-column align="center" label="序号" type="index" width="60" />
          <el-table-column label="发生日期" prop="receiptPaymentDate" show-overflow-tooltip/>
@@ -60,7 +60,7 @@
  receiptPaymentListPage
} from "../../../api/salesManagement/receiptPayment.js";
import Pagination from "../../../components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const tableData = ref([])
const receiptRecord = ref([])
const tableLoading = ref(false)
@@ -112,26 +112,17 @@
};
// 主表合计方法
const summarizeMainTable = (param) => {
  const { columns, data } = param;
  const sums = [];
  columns.forEach((column, index) => {
    if (index === 0) {
      sums[index] = '合计';
      return;
    }
    const prop = column.property;
    if (['invoiceAmount','receiptPaymentAmount','unReceiptPaymentAmount'].includes(prop)) {
      const values = data.map(item => Number(item[prop]));
      if (!values.every(value => isNaN(value))) {
        sums[index] = values.reduce((acc, val) => (!isNaN(val) ? acc + val : acc), 0);
      } else {
        sums[index] = '';
      }
    } else {
      sums[index] = '';
    }
  })
  return sums;
  return proxy.summarizeTable(param, ['invoiceTotal', 'receiptPaymentAmount', 'unReceiptPaymentAmount'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
// 子表合计方法
const summarizeMainTable1 = (param) => {
  return proxy.summarizeTable(param, ['receiptPaymentAmount', 'noReceiptAmount', 'invoiceTotal'], {
    ticketsNum: { noDecimal: true }, // 不保留小数
    futureTickets: { noDecimal: true }, // 不保留小数
  });
};
const receiptPaymentList = (id) => {