| | |
| | | :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" /> |
| | |
| | | type: Function, |
| | | default: () => { } |
| | | }, |
| | | summaryMethod: { |
| | | type: Function, |
| | | default: () => { } |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { } |
| | |
| | | <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" /> |
| | |
| | | </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> |
| | |
| | | } |
| | | }) |
| | | 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 = () => { |
| | |
| | | </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> |
| | |
| | | paymentHistoryList |
| | | } from "@/api/procurementManagement/paymentEntry.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const isShowSummarySon = ref(true); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: '付款日期', |
| | |
| | | total.value = res.total |
| | | }) |
| | | } |
| | | // 子表合计方法 |
| | | const summarizeMainTable1 = (param) => { |
| | | return proxy.summarizeTable(param, ['currentPaymentAmount'], { |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | }); |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |
| | |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | :show-summary="isShowSummary" |
| | | :summary-method="summarizeMainTable" |
| | | class="lims-table" |
| | | > |
| | | <el-table-column |
| | |
| | | :isSelection="false" |
| | | :tableLoading="tableLoadingSon" |
| | | :isShowSummary="isShowSummarySon" |
| | | :summaryMethod="summarizeMainTable1" |
| | | ></PIMTable> |
| | | <pagination |
| | | v-show="sonTotal > 0" |
| | |
| | | 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; |
| | |
| | | } |
| | | // 主表合计方法 |
| | | 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) => { |
| | |
| | | } |
| | | // 主表合计方法 |
| | | 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 = () => { |
| | |
| | | </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> |
| | |
| | | { |
| | | 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 = () => { |
| | |
| | | total.value = res.total |
| | | }) |
| | | } |
| | | // 子表合计方法 |
| | | const summarizeMainTable1 = (param) => { |
| | | return proxy.summarizeTable(param, ['receiptPaymentAmount'], { |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | }); |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |
| | |
| | | <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/> |
| | |
| | | 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) |
| | |
| | | }; |
| | | // 主表合计方法 |
| | | 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) => { |