Forráskód Böngészése

收入列表增加:所属订单结算金额

dodo hold 2 éve
szülő
commit
012e96eb75

+ 10 - 10
src/router/routes/modules/taobao.ts

@@ -32,16 +32,16 @@ const TAOBAO: AppRouteRecordRaw = {
                 roles: ['*'],
             },
         },
-        {
-            path: 'income_report',
-            name: 'taobao_income_report',
-            component: () => import('@/views/taobao/income_report.vue'),
-            meta: {
-                locale: 'menu.taobao.income_report',
-                requiresAuth: true,
-                roles: ['*'],
-            },
-        },
+        // {
+        //     path: 'income_report',
+        //     name: 'taobao_income_report',
+        //     component: () => import('@/views/taobao/income_report.vue'),
+        //     meta: {
+        //         locale: 'menu.taobao.income_report',
+        //         requiresAuth: true,
+        //         roles: ['*'],
+        //     },
+        // },
         {
             path: 'report_daily',
             name: 'taobao_report_daily',

+ 9 - 0
src/utils/util.ts

@@ -0,0 +1,9 @@
+export function numberFormat(value: number): string {
+    return new Intl.NumberFormat('en-US').format(value);
+}
+export function amountFormat(value: number): string {
+    return `¥${new Intl.NumberFormat('en-US', {
+        minimumFractionDigits: 2,
+        maximumFractionDigits: 2,
+    }).format(value)}`;
+}

+ 4 - 4
src/views/taobao/bill_dailys.vue

@@ -160,7 +160,7 @@ const generateFormModel = () => {
         keyword,
         query_date: [],
         current: 1,
-        pageSize: 999,
+        pageSize: 30,
         sort: 'belongTime',
         order: 'descending',
     };
@@ -186,7 +186,7 @@ const scroll = {
 
 const basePagination: Pagination = {
     current: 1,
-    pageSize: 100,
+    pageSize: 30,
 };
 const pagination = reactive({
     ...basePagination,
@@ -286,7 +286,7 @@ const toAmount = (val: any): any => {
 const fetchData = async (
     params: TkSettleBillsParams = {
         current: 1,
-        pageSize: 100,
+        pageSize: 30,
         sort: 'belongTime',
         order: 'descending',
     }
@@ -334,7 +334,7 @@ const loadMore = async (
             const params: TkSettleBillsParams = {
                 query_date: [row.belongTime, row.belongTime],
                 current: 1,
-                pageSize: 999,
+                pageSize: 30,
                 sort: 'belongTime',
                 order: 'descending',
             };

+ 0 - 1
src/views/taobao/orders.vue

@@ -194,7 +194,6 @@ import { computed, ref, reactive, watch, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
 import useLoading from '@/hooks/loading';
 
-
 import {
     queryTkOrders,
     TkOrderRecord,

+ 151 - 80
src/views/taobao/report_daily.vue

@@ -89,7 +89,8 @@
 
             <a-table row-key="id" :loading="loading" :pagination="pagination"
                 :columns="(cloneColumns as TableColumnData[])" :scroll="scroll" :scrollbar="scrollbar"
-                :data="renderData" :bordered="false" :size="size" :load-more="loadMore" @page-change="onPageChange">
+                :data="renderData" :bordered="{ headerCell: true }" :size="size" :load-more="loadMore"
+                @page-change="onPageChange">
                 <template #xAxis="{ record }">
                     <template v-if="record.accountName !== '' && !record.isLeaf">
                         {{ record.accountName }}
@@ -120,6 +121,7 @@ import dayjs from 'dayjs';
 import { computed, ref, reactive, watch, nextTick } from 'vue';
 import { useI18n } from 'vue-i18n';
 import useLoading from '@/hooks/loading';
+import { numberFormat, amountFormat } from '@/utils/util';
 import {
     queryTkReport,
     queryTkReportDailys,
@@ -202,101 +204,170 @@ const columns = computed<TableColumnData[]>(() => [
         fixed: 'left',
     },
     {
-        title: '点击人数',
-        dataIndex: 'uclk_uv_56',
-        width: 100,
-    },
-    {
-        title: '点击次数',
-        dataIndex: 'uclk_pv_56',
-        width: 100,
-    },
-    {
-        title: '点击次数(修正)',
-        dataIndex: 'fix_uclk_pv_56',
-        width: 130,
-    },
-    {
-        title: '付款笔数',
-        dataIndex: 'pay_ord_num_56',
-        width: 100,
-    },
-    {
-        title: '付款金额',
-        dataIndex: 'pay_ord_amt_56',
-        width: 120,
-    },
-    {
-        title: '付款预估收入',
-        dataIndex: 'pay_tk_disp_tfee_56',
-        width: 120,
+        title: '点击',
+        children: [
+            {
+                title: '点击人数',
+                dataIndex: 'uclk_uv_56',
+                width: 100,
+                align: 'right'
+            },
+            {
+                title: '点击次数',
+                dataIndex: 'uclk_pv_56',
+                width: 100,
+                align: 'right'
+            },
+            {
+                title: '点击次数(修正)',
+                dataIndex: 'fix_uclk_pv_56',
+                width: 130,
+                align: 'right'
+            },
+        ]
     },
     {
-        title: '付款人数',
-        dataIndex: 'pay_ord_uv_56',
-        width: 100,
+        title: '付款',
+        children: [
+            {
+                title: '付款笔数',
+                dataIndex: 'pay_ord_num_56',
+                width: 100,
+                align: 'right',
+            },
+            {
+                title: '付款金额',
+                dataIndex: 'pay_ord_amt_56',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
+            },
+            {
+                title: '付款预估收入',
+                dataIndex: 'pay_tk_disp_tfee_56',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
+            },
+            {
+                title: '付款人数',
+                dataIndex: 'pay_ord_uv_56',
+                width: 120,
+                align: 'right',
+            },
+        ]
     },
     {
-        title: '有效付款笔数',
-        dataIndex: 'eff_ord_num',
-        width: 150,
+        title: '有效付款',
+        children: [
+            {
+                title: '有效付款笔数',
+                dataIndex: 'eff_ord_num',
+                width: 150,
+                align: 'right',
+            },
+            {
+                title: '有效付款金额',
+                dataIndex: 'eff_ord_amt',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
+            },
+            {
+                title: '有效付款预估收入',
+                dataIndex: 'eff_tk_disp_tfee',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
+            },
+        ]
     },
     {
-        title: '有效付款金额',
-        dataIndex: 'eff_ord_amt',
-        width: 150,
+        title: '结算',
+        children: [
+            {
+                title: '结算笔数',
+                dataIndex: 'sett_ord_num_56',
+                width: 100,
+                align: 'right',
+            },
+            {
+                title: '结算金额',
+                dataIndex: 'sett_ord_amt_56',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_ord_amt_56)
+            },
+            {
+                title: '结算预估收入',
+                dataIndex: 'sett_tk_disp_tfee_56',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.sett_tk_disp_tfee_56)
+            },
+        ]
     },
     {
-        title: '有效付款预估收入',
-        dataIndex: 'eff_tk_disp_tfee',
-        width: 150,
+        title: '所属订单结算金额',
+        children: [
+            {
+                title: '结算金额',
+                width: 150,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.order_ord_amt)
+            },
+            {
+                title: '结算收入',
+                width: 120,
+                align: 'right',
+                render: (e: any) => amountFormat(e.record.order_ord_tfee)
+            },
+        ]
     },
     {
-        title: '结算笔数',
-        dataIndex: 'sett_ord_num_56',
-        width: 100,
-    },
-    {
-        title: '结算金额',
-        dataIndex: 'sett_ord_amt_56',
-        width: 120,
-    },
-    {
-        title: '结算预估收入',
-        dataIndex: 'sett_tk_disp_tfee_56',
-        width: 150,
+        title: 'API调用',
+        children: [
+            {
+                title: '调用总数',
+                dataIndex: 'total_count',
+                slotName: 'total_count',
+                width: 100,
+                align: 'right'
+            },
+            {
+                title: '转链成功',
+                dataIndex: 'success_count',
+                width: 100,
+                align: 'right'
+            },
+            {
+                title: '转链成功(%)',
+                dataIndex: 'success_percentage',
+                width: 120,
+                align: 'right'
+            },
+            {
+                title: '放弃转链',
+                dataIndex: 'abandon_count',
+                width: 100,
+                align: 'right'
+            },
+            {
+                title: '放弃转链(%)',
+                dataIndex: 'abandon_percentage',
+                width: 120,
+                align: 'right'
+            },
+        ]
     },
+
     {
         title: '最后更新时间',
         dataIndex: 'last_time',
         width: 200,
+        align: 'center'
     },
-    {
-        title: 'API调用',
-        dataIndex: 'total_count',
-        slotName: 'total_count',
-        width: 100,
-    },
-    {
-        title: '转链成功',
-        dataIndex: 'success_count',
-        width: 100,
-    },
-    {
-        title: '转链成功(%)',
-        dataIndex: 'success_percentage',
-        width: 110,
-    },
-    {
-        title: '放弃转链',
-        dataIndex: 'abandon_count',
-        width: 100,
-    },
-    {
-        title: '放弃转链(%)',
-        dataIndex: 'abandon_percentage',
-        width: 110,
-    },
+
     {
         title: '收藏人数',
         dataIndex: 'uclt_uv_56',