|
|
@@ -87,7 +87,7 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
|
|
|
- <a-table row-key="id" :loading="loading" :pagination="pagination"
|
|
|
+ <a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
|
:columns="(cloneColumns as TableColumnData[])" :scroll="scroll" :scrollbar="scrollbar"
|
|
|
:data="renderData" :bordered="{ headerCell: true }" :size="size" :load-more="loadMore"
|
|
|
@page-change="onPageChange">
|
|
|
@@ -128,10 +128,10 @@
|
|
|
</viewOrdersModal>
|
|
|
</template>
|
|
|
|
|
|
- <template #order_ord_amt_14="{ record }">
|
|
|
+ <template #order_ord_amt_12_14="{ record }">
|
|
|
<a-popover popup-container="body">
|
|
|
- <viewOrdersModal filter-type='order_ord_amt_12' :data="record">
|
|
|
- {{ amountFormat(record.order_ord_amt_12) }}
|
|
|
+ <viewOrdersModal filter-type='order_ord_amt_12_14' :data="record">
|
|
|
+ {{ amountFormat(record.order_ord_amt_12_14) }}
|
|
|
</viewOrdersModal>
|
|
|
<template #content>
|
|
|
|
|
|
@@ -156,9 +156,9 @@
|
|
|
</a-popover>
|
|
|
|
|
|
</template>
|
|
|
- <template #order_ord_tfee_14="{ record }">
|
|
|
+ <template #order_ord_tfee_12_14="{ record }">
|
|
|
<a-popover popup-container="body">
|
|
|
- <div>{{ amountFormat(record.order_ord_tfee_12 + record.order_ord_tfee_14) }}</div>
|
|
|
+ <div>{{ amountFormat(record.order_ord_tfee_12_14) }}</div>
|
|
|
<template #content>
|
|
|
<div style="min-width:400px;">
|
|
|
<a-row>
|
|
|
@@ -204,6 +204,7 @@
|
|
|
</template>
|
|
|
</a-popover>
|
|
|
</template>
|
|
|
+
|
|
|
<template #tool_total_count="{ record }">
|
|
|
<a-popover v-if="record.tool_total_count > 0" popup-container="body" trigger="click">
|
|
|
<a-tag color="green">{{ record.tool_total_count }}</a-tag>
|
|
|
@@ -212,6 +213,43 @@
|
|
|
</template>
|
|
|
</a-popover>
|
|
|
</template>
|
|
|
+
|
|
|
+ <template #summary-cell="{ column, record }">
|
|
|
+ <!--
|
|
|
+ { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right", "parent": { "title": "点击", "children": [ { "title": "点击人数", "dataIndex": "uclk_uv_56", "width": 100, "align": "right" }, { "title": "点击次数", "dataIndex": "uclk_pv_56", "width": 100, "align": "right" } ], "checked": true, "colSpan": 2 } }
|
|
|
+ { "title": "付款金额", "slotName": "pay_ord_amt_56", "dataIndex": "pay_ord_amt_56", "width": 150, "align": "right", "parent": { "title": "付款", "children": [ { "title": "付款笔数", "dataIndex": "pay_ord_num_56", "width": 100, "align": "right" }, { "title": "付款金额", "slotName": "pay_ord_amt_56", "dataIndex": "pay_ord_amt_56", "width": 150, "align": "right" }, { "title": "付款预估收入", "dataIndex": "pay_tk_disp_tfee_56", "width": 150, "align": "right" }, { "title": "付款人数", "dataIndex": "pay_ord_uv_56", "width": 120, "align": "right" } ], "checked": true, "colSpan": 4 } } -->
|
|
|
+
|
|
|
+
|
|
|
+ <template v-if="column.slotName == 'pay_ord_amt_56' ||
|
|
|
+ column.slotName == 'eff_ord_amt' ||
|
|
|
+ column.slotName == 'sett_ord_amt_56' ||
|
|
|
+ column.slotName == 'order_ord_amt' ||
|
|
|
+ column.slotName == 'order_ord_tfee' ||
|
|
|
+ column.slotName == 'pay_tk_disp_tfee_56' ||
|
|
|
+ column.slotName == 'sett_tk_disp_tfee_56' ||
|
|
|
+ column.slotName == 'order_ord_tfee_12_14' ||
|
|
|
+ column.slotName == 'order_ord_amt_12_14'">
|
|
|
+ <div>{{ amountFormat(record[column.dataIndex]) }}</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else-if="column.slotName == 'total_count'">
|
|
|
+ <a-tag v-if="record.total_count > 0" color="green">{{ record.total_count }}</a-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="column.slotName == 'parse_total_count'">
|
|
|
+ <a-tag v-if="record.parse_total_count > 0" color="green">{{ record.parse_total_count }}</a-tag>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="column.slotName == 'coupon_total_count'">
|
|
|
+ <a-tag v-if="record.coupon_total_count > 0" color="green">{{ record.coupon_total_count
|
|
|
+ }}</a-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <div>{{ toAmount(record[column.dataIndex]) }}</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+
|
|
|
</a-table>
|
|
|
</a-card>
|
|
|
</div>
|
|
|
@@ -299,6 +337,13 @@ const densityList = computed(() => [
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
+const toAmount = (val: any): any => {
|
|
|
+ console.log(val);
|
|
|
+ if (typeof val === 'number' && !Number.isNaN(val)) {
|
|
|
+ return parseFloat(val.toFixed(2));
|
|
|
+ }
|
|
|
+ return val;
|
|
|
+}
|
|
|
|
|
|
const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
@@ -337,6 +382,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '付款金额',
|
|
|
slotName: 'pay_ord_amt_56',
|
|
|
+ dataIndex: 'pay_ord_amt_56',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
// render: (e: any) => amountFormat(e.record.pay_ord_amt_56)
|
|
|
@@ -344,6 +390,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '付款预估收入',
|
|
|
dataIndex: 'pay_tk_disp_tfee_56',
|
|
|
+ slotName: 'pay_tk_disp_tfee_56',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
render: (e: any) => amountFormat(e.record.pay_tk_disp_tfee_56)
|
|
|
@@ -368,6 +415,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '有效付款金额',
|
|
|
slotName: 'eff_ord_amt',
|
|
|
+ dataIndex: 'eff_ord_amt',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
// render: (e: any) => amountFormat(e.record.eff_ord_amt)
|
|
|
@@ -393,6 +441,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '结算金额',
|
|
|
slotName: 'sett_ord_amt_56',
|
|
|
+ dataIndex: 'sett_ord_amt_56',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
// render: (e: any) => amountFormat(e.record.sett_ord_amt_56)
|
|
|
@@ -400,6 +449,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '结算预估收入',
|
|
|
dataIndex: 'sett_tk_disp_tfee_56',
|
|
|
+ slotName: 'sett_tk_disp_tfee_56',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
|
|
|
@@ -412,6 +462,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '结算金额',
|
|
|
slotName: 'order_ord_amt',
|
|
|
+ dataIndex: 'order_ord_amt',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
// render: (e: any) => amountFormat(e.record.order_ord_amt)
|
|
|
@@ -420,17 +471,20 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
title: '结算收入',
|
|
|
width: 120,
|
|
|
align: 'right',
|
|
|
+ dataIndex: 'order_ord_tfee',
|
|
|
render: (e: any) => amountFormat(e.record.order_ord_tfee)
|
|
|
},
|
|
|
{
|
|
|
title: '待结算金额',
|
|
|
- slotName: 'order_ord_amt_14',
|
|
|
+ slotName: 'order_ord_amt_12_14',
|
|
|
+ dataIndex: 'order_ord_amt_12_14',
|
|
|
width: 150,
|
|
|
align: 'right',
|
|
|
},
|
|
|
{
|
|
|
title: '待结算收入',
|
|
|
- slotName: 'order_ord_tfee_14',
|
|
|
+ slotName: 'order_ord_tfee_12_14',
|
|
|
+ dataIndex: 'order_ord_tfee_12_14',
|
|
|
width: 120,
|
|
|
align: 'right',
|
|
|
},
|
|
|
@@ -443,13 +497,13 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
title: '调用',
|
|
|
dataIndex: 'total_count',
|
|
|
slotName: 'total_count',
|
|
|
- width: 80,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
title: '成功',
|
|
|
dataIndex: 'success_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -461,7 +515,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '放弃',
|
|
|
dataIndex: 'abandon_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -477,15 +531,15 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
children: [
|
|
|
{
|
|
|
title: '调用',
|
|
|
- dataIndex: 'parse_total_count',
|
|
|
slotName: 'parse_total_count',
|
|
|
- width: 90,
|
|
|
+ dataIndex: 'parse_total_count',
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
title: '成功',
|
|
|
dataIndex: 'parse_success_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -497,7 +551,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '放弃',
|
|
|
dataIndex: 'parse_abandon_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -513,15 +567,15 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
children: [
|
|
|
{
|
|
|
title: '调用',
|
|
|
- dataIndex: 'coupon_total_count',
|
|
|
slotName: 'coupon_total_count',
|
|
|
- width: 90,
|
|
|
+ dataIndex: 'coupon_total_count',
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
title: '成功',
|
|
|
dataIndex: 'coupon_success_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -533,7 +587,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '放弃',
|
|
|
dataIndex: 'coupon_abandon_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -551,13 +605,13 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
title: '调用',
|
|
|
dataIndex: 'tool_total_count',
|
|
|
slotName: 'tool_total_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
title: '成功',
|
|
|
dataIndex: 'tool_success_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -569,7 +623,7 @@ const columns = computed<TableColumnData[]>(() => [
|
|
|
{
|
|
|
title: '放弃',
|
|
|
dataIndex: 'tool_abandon_count',
|
|
|
- width: 90,
|
|
|
+ width: 100,
|
|
|
align: 'right'
|
|
|
},
|
|
|
{
|
|
|
@@ -622,7 +676,15 @@ const fetchData = async (
|
|
|
const { data } = await queryTkReportDailys(params);
|
|
|
console.log(data);
|
|
|
if (!data) return;
|
|
|
- renderData.value = data.list;
|
|
|
+ let list: TableData[] = [];
|
|
|
+
|
|
|
+ list = data.list.map((item: TkReportRecord) => ({
|
|
|
+ ...item,
|
|
|
+ order_ord_amt_12_14: item.order_ord_amt_12 + item.order_ord_amt_14,
|
|
|
+ order_ord_tfee_12_14: item.order_ord_tfee_12 + item.order_ord_tfee_14,
|
|
|
+ }));
|
|
|
+
|
|
|
+ renderData.value = list;
|
|
|
pagination.current = data.page;
|
|
|
pagination.total = data.count;
|
|
|
|
|
|
@@ -657,6 +719,8 @@ const loadMore = async (
|
|
|
if (!data) return;
|
|
|
list = data.list.map((item: TkReportRecord) => ({
|
|
|
...item,
|
|
|
+ order_ord_amt_12_14: item.order_ord_amt_12 + item.order_ord_amt_14,
|
|
|
+ order_ord_tfee_12_14: item.order_ord_tfee_12 + item.order_ord_tfee_14,
|
|
|
isLeaf: false,
|
|
|
}));
|
|
|
} else {
|
|
|
@@ -674,6 +738,8 @@ const loadMore = async (
|
|
|
if (!data) return;
|
|
|
list = data.list.map((item: TkReportRecord) => ({
|
|
|
...item,
|
|
|
+ order_ord_amt_12_14: item.order_ord_amt_12 + item.order_ord_amt_14,
|
|
|
+ order_ord_tfee_12_14: item.order_ord_tfee_12 + item.order_ord_tfee_14,
|
|
|
isLeaf: true,
|
|
|
}));
|
|
|
}
|