|
|
@ -30,7 +30,7 @@ |
|
|
|
<div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">客户账单汇总列表</div> |
|
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList" show-summary :summary-method="getSummaries" /> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%"> |
|
|
@ -54,10 +54,10 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="outerVisible" width="60%"> |
|
|
|
<el-dialog :visible.sync="outerVisible" width="80%"> |
|
|
|
<div> |
|
|
|
<el-table :key="outerKey" :data="outerList" :index="index" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" show-summary :summary-method="getSummaries" /> |
|
|
|
<el-table-column label="操作" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="small" @click="lookInfo(scope.row)">查看</el-button> |
|
|
@ -74,7 +74,7 @@ |
|
|
|
<el-table-column prop="createTime" label="生成时间" align="center" width="170" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="innerVisible" width="50%" append-to-body> |
|
|
|
<el-dialog :visible.sync="innerVisible" width="70%" append-to-body> |
|
|
|
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="8" class="tlineheightb"> |
|
|
@ -227,6 +227,53 @@ export default { |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
// 合计 |
|
|
|
getSummaries(param) { |
|
|
|
const { columns, data } = param |
|
|
|
const sums = [] |
|
|
|
columns.forEach((column, index) => { |
|
|
|
if (index === 0) { |
|
|
|
sums[index] = '合计' |
|
|
|
return |
|
|
|
} |
|
|
|
const values = data.map(item => Number(item[column.property])) |
|
|
|
if (column.property === 'reveivableMoney') { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
|
return prev + curr |
|
|
|
} else { |
|
|
|
return prev |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
this.formobj.withRebate = sums[index] += '' |
|
|
|
} else if (column.property === 'subscriptionMoney') { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
|
return prev + curr |
|
|
|
} else { |
|
|
|
return prev |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
this.formobj.distributionMoneyTotal = sums[index] += '' |
|
|
|
} else if (column.property === 'noSubscriptionMoney') { |
|
|
|
sums[index] = values.reduce((prev, curr) => { |
|
|
|
const value = Number(curr) |
|
|
|
if (!isNaN(value)) { |
|
|
|
return prev + curr |
|
|
|
} else { |
|
|
|
return prev |
|
|
|
} |
|
|
|
}, 0) |
|
|
|
sums[index] += '' |
|
|
|
this.formobj.distributionMoneyTotal = sums[index] += '' |
|
|
|
} |
|
|
|
}) |
|
|
|
return sums |
|
|
|
}, |
|
|
|
// ----------功能打开结束-------- |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|