|
@@ -19,15 +19,16 @@
|
|
|
<el-button type="primary" @click="submitForm">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table id="table" ref="table1" :data="tableData" border style="width: 100%" :height="tableHeight">
|
|
|
- <el-table-column label="日期" fixed align="left" header-align="center" min-width="140px">
|
|
|
+ <el-table id="table" ref="table1" :data="tableData" border style="width: 100%" show-summary
|
|
|
+ :summary-method="getSummaries">
|
|
|
+ <el-table-column label="日期" fixed align="center" header-align="center" min-width="140px">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{changeDate(scope.row.day)}}</span>
|
|
|
+ <span>{{scope.row.day?changeDate(scope.row.day):'总计'}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="渠道" fixed align="left" header-align="center" min-width="140px">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{changeDate(scope.row.day)}}</span>
|
|
|
+ <span>{{scope.row.channelCode||''}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="用户数量" header-align="center">
|
|
@@ -41,28 +42,44 @@
|
|
|
min-width="100px"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="新增订单数量" header-align="center">
|
|
|
- <el-table-column label="月包" prop="dailyAddMonthCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="年包" prop="dailyAddYearCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="终身" prop="dailyAddLifelongCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="小计" prop="dailyAddCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="月包" prop="dailyAddMonthCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="年包" prop="dailyAddYearCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="终身" prop="dailyAddLifelongCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="小计" prop="dailyAddCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="新增销售金额" header-align="center">
|
|
|
- <el-table-column label="月包" prop="dailyAddMonthAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="年包" prop="dailyAddYearAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="终身" prop="dailyAddLifelongAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="小计" prop="dailyAddAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="月包" prop="dailyAddMonthAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="年包" prop="dailyAddYearAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="终身" prop="dailyAddLifelongAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="小计" prop="dailyAddAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="退订订单数量" header-align="center">
|
|
|
- <el-table-column label="月包" prop="dailyRefundMonthCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="年包" prop="dailyRefundYearCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="终身" prop="dailyRefundLifelongCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="小计" prop="dailyRefundCount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="月包" prop="dailyRefundMonthCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="年包" prop="dailyRefundYearCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="终身" prop="dailyRefundLifelongCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="小计" prop="dailyRefundCount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="退订销售金额" header-align="center">
|
|
|
- <el-table-column label="月包" prop="dailyRefundMonthAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="年包" prop="dailyRefundYearAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="终身" prop="dailyRefundLifelongAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
- <el-table-column label="小计" prop="dailyRefundAmount" align="right" header-align="center" min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="月包" prop="dailyRefundMonthAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="年包" prop="dailyRefundYearAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="终身" prop="dailyRefundLifelongAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
+ <el-table-column label="小计" prop="dailyRefundAmount" align="right" header-align="center"
|
|
|
+ min-width="100px"></el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination style="text-align: center;" @current-change="handleCurrentChange"
|
|
@@ -74,11 +91,10 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import formatDate from "../../utils/formatTime";
|
|
|
-import { getCascaderChannel, getChannelData } from '@/api/develop.js'
|
|
|
+import { getCascaderChannel, getChannelData, getTotalData } from '@/api/develop.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- tableHeight: 500,
|
|
|
tableData: [],
|
|
|
skillParams: {
|
|
|
startDay: "",
|
|
@@ -90,13 +106,13 @@ export default {
|
|
|
pageNo: 1,
|
|
|
totalSize: 0
|
|
|
},
|
|
|
- options: []
|
|
|
+ options: [],
|
|
|
+ totalData: {}
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
this.skillParams.startDay = this.getYesterDay();
|
|
|
this.skillParams.endDay = this.getYesterDay();
|
|
|
- this.tableHeight = document.documentElement.clientHeight * 0.75;
|
|
|
let res = await getCascaderChannel()
|
|
|
let se = this.filterEmptyChildren(res.data)
|
|
|
console.log(se, 'sss');
|
|
@@ -123,10 +139,20 @@ export default {
|
|
|
this.tableData = res.data.list
|
|
|
this.pagination.totalSize = res.data.totalSize
|
|
|
this.pagination.pageNo = res.data.pageNo
|
|
|
+
|
|
|
+ let totalData = await getTotalData({
|
|
|
+ oneLevelCode: this.skillParams.channel[0],
|
|
|
+ twoLevelCode: this.skillParams.channel[1] ? this.skillParams.channel[1] : '',
|
|
|
+ threeLevelCode: this.skillParams.channel[2] ? this.skillParams.channel[2] : '',
|
|
|
+ startDay: this.skillParams.startDay, endDay: this.skillParams.endDay
|
|
|
+ })
|
|
|
+ this.totalData = totalData.data
|
|
|
+
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
},
|
|
|
filterEmptyChildren(child) {
|
|
|
let arr = []
|
|
@@ -165,6 +191,11 @@ export default {
|
|
|
changeDate(date) {
|
|
|
return formatDate(date, 4)
|
|
|
},
|
|
|
+ getSummaries() {
|
|
|
+ let value = ['合计', '']
|
|
|
+ value.push(...Object.values(this.totalData))
|
|
|
+ return value
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|