From b123be9ae5228248e456ac6fbbe59ddc2c1ca34d Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期五, 06 六月 2025 14:09:26 +0800 Subject: [PATCH] 销售合同号/部门新增编号 --- src/views/salesManagement/invoiceLedger/index.vue | 29 ++++++++--------------------- 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/views/salesManagement/invoiceLedger/index.vue b/src/views/salesManagement/invoiceLedger/index.vue index 53ee516..db08cab 100644 --- a/src/views/salesManagement/invoiceLedger/index.vue +++ b/src/views/salesManagement/invoiceLedger/index.vue @@ -42,7 +42,7 @@ <el-table-column label="浜у搧澶х被" prop="productCategory" /> <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" /> <el-table-column label="鍙戠エ鍙�" prop="invoiceNo" show-overflow-tooltip/> - <el-table-column label="鍙戠エ閲戦(鍏�)" prop="invoiceTotal" show-overflow-tooltip/> + <el-table-column label="鍙戠エ閲戦(鍏�)" prop="invoiceTotal" show-overflow-tooltip :formatter="formattedNumber"/> <el-table-column label="绋庣巼" prop="taxRate" show-overflow-tooltip/> <el-table-column label="寮�绁ㄤ汉" prop="invoicePerson" show-overflow-tooltip/> <el-table-column label="寮�绁ㄦ棩鏈�" prop="invoiceDate" show-overflow-tooltip/> @@ -243,6 +243,9 @@ }) const matchFileType = ref(['pdf']) const uploadModal = ref(false) +const formattedNumber = (row, column, cellValue) => { + return parseFloat(cellValue).toFixed(2); +}; // 鏌ヨ鍒楄〃 /** 鎼滅储鎸夐挳鎿嶄綔 */ const handleQuery = () => { @@ -268,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) => { -- Gitblit v1.9.3