| | |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="来票金额"> |
| | | <el-input-number |
| | | v-model="filters.ticketsAmount" |
| | | style="width: 180px" |
| | | placeholder="请输入" |
| | | :min="0" |
| | | :precision="2" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getTableData">搜索</el-button> |
| | | <el-button @click="resetFilters"> 重置 </el-button> |
| | |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="downLoadFile(row)" |
| | | @click="openEdit(row)" |
| | | > |
| | | 附件 |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="openEdit(row)" |
| | | @click="downLoadFile(row)" |
| | | > |
| | | 编辑 |
| | | 附件 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | |
| | | purchaseContractNumber: undefined, // 采购合同号 |
| | | supplierName: undefined, // 供应商 |
| | | createdAt: [], // 来票日期 |
| | | ticketsAmount: undefined, // 来票金额 |
| | | }, |
| | | [ |
| | | { |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "项目名称", |
| | | prop: "projectName", |
| | | width: 240, |
| | | }, |
| | | { |
| | | label: "供应商名称", |
| | | prop: "supplierName", |
| | | width: 240, |
| | | }, |
| | | { |
| | | label: "产品大类", |
| | | prop: "productCategory", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "开票日期", |
| | | label: "来票日期", |
| | | prop: "createdAt", |
| | | width: 110, |
| | | }, |
| | | { |
| | | label: "开票金额", |
| | | label: "来票金额", |
| | | prop: "ticketsAmount", |
| | | width: 200, |
| | | formatData: (cell) => { |
| | |
| | | } |
| | | ); |
| | | |
| | | // 主表合计方法 |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable( |
| | | const sums = proxy.summarizeTable( |
| | | param, |
| | | [ |
| | | "taxInclusiveTotalPrice", |
| | | "ticketsAmount", |
| | | "unTicketsPrice", |
| | | "invoiceAmount", |
| | | ], |
| | | ["ticketsAmount", "unTicketsPrice", "invoiceAmount"], |
| | | { |
| | | ticketsNum: { noDecimal: true }, // 不保留小数 |
| | | futureTickets: { noDecimal: true }, // 不保留小数 |
| | | ticketsNum: { noDecimal: true }, |
| | | futureTickets: { noDecimal: true }, |
| | | } |
| | | ); |
| | | |
| | | const keySet = new Set(); |
| | | let taxInclusiveSum = 0; |
| | | (param.data || []).forEach((row) => { |
| | | const key = `${row.purchaseContractNumber ?? ""}\n${row.salesContractNo ?? ""}\n${row.productCategory ?? ""}\n${row.specificationModel ?? ""}`; |
| | | if (keySet.has(key)) return; |
| | | keySet.add(key); |
| | | const val = Number(row.taxInclusiveTotalPrice); |
| | | if (!isNaN(val)) taxInclusiveSum += val; |
| | | }); |
| | | const taxInclusiveIndex = (param.columns || []).findIndex( |
| | | (c) => c.property === "taxInclusiveTotalPrice" |
| | | ); |
| | | if (taxInclusiveIndex !== -1) { |
| | | sums[taxInclusiveIndex] = taxInclusiveSum.toFixed(2); |
| | | } |
| | | return sums; |
| | | }; |
| | | |
| | | const handleSelectionChange = (val) => { |
| | |
| | | const handleDelete = (row) => { |
| | | let ids = []; |
| | | ids.push(row.id); |
| | | ElMessageBox.confirm("该开票台账将被删除,是否确认删除", { |
| | | ElMessageBox.confirm("该来票台账将被删除,是否确认删除", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |