md
This commit is contained in:
parent
2133acb7da
commit
4ea5b940a7
@ -11,6 +11,8 @@
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
>
|
||||
|
||||
<div slot="toolbar">
|
||||
@ -337,6 +339,7 @@ export default {
|
||||
return str.replace(/^\s+|\s+$/g, '');
|
||||
},
|
||||
|
||||
|
||||
handleDownPDFOld(row) {
|
||||
let settleBillName=row.companyName;
|
||||
let pdfUrl=row.filePath;
|
||||
@ -465,6 +468,34 @@ export default {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
//指定列求和
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
if (
|
||||
column.property === 'openMoney'
|
||||
) {
|
||||
const values = data.map(item => Number(item.openMoney));
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] = sums[index].toFixed(2); //保留0位小数
|
||||
}
|
||||
});
|
||||
return sums
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisSettleInvoiceChRecord/export', {
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
<span v-if="emisSettleInvoiceRecord.invoiceType==9"> 其它手工开票</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开票金额" :span="1">¥{{ emisSettleInvoiceRecord.applyMoney }}</el-descriptions-item>
|
||||
<el-descriptions-item label="加开税点" :span="1">¥{{ emisSettleInvoiceRecord.addTaxRate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="加开金额" :span="1">¥{{ emisSettleInvoiceRecord.addOpenMoney }}</el-descriptions-item>
|
||||
<el-descriptions-item label="加开税点" :span="1">{{ emisSettleInvoiceRecord.addTaxRate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="加开金额" :span="1"><span v-if="emisSettleInvoiceRecord.addOpenMoney&&emisSettleInvoiceRecord.addOpenMoney>0">¥{{ emisSettleInvoiceRecord.addOpenMoney }}</span></el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="开票备注" :span="3">{{ emisSettleInvoiceRecord.remark }}</el-descriptions-item>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user