1
0

2 コミット db44d21afc ... 2816759cf7

作者 SHA1 メッセージ 日付
  ylong 2816759cf7 feat(财务): 添加商城账户总览数据和商城明细选项 3 日 前
  ylong 7f6eb848a2 feat(客户详情): 添加搜索记录功能及订单统计 3 日 前

+ 15 - 0
src/views/customer/list/components/customer-detail.vue

@@ -26,6 +26,16 @@
                     <el-text>总订单数</el-text>
                 </template>
             </el-statistic>
+            <el-statistic :value="detail.sellNum" style="margin-left: 80px">
+                <template #title>
+                    <el-text>卖书订单数</el-text>
+                </template>
+            </el-statistic>
+            <el-statistic :value="detail.buyNum" style="margin-left: 80px">
+                <template #title>
+                    <el-text>买书订单数</el-text>
+                </template>
+            </el-statistic>
         </div>
 
         <el-tabs v-model="activeName" class="demo-tabs flex-1">
@@ -44,6 +54,10 @@
             <el-tab-pane label="意见反馈" name="fallback">
                 <fallback-info :userId="currentRow.id" />
             </el-tab-pane>
+            <el-tab-pane label="搜索记录" name="searchLog">
+                <search-log :row="currentRow" />
+            </el-tab-pane>
+            
         </el-tabs>
     </ele-drawer>
 </template>
@@ -52,6 +66,7 @@
     import baseInfo from '@/views/customer/list/components/detail/base-info.vue';
     import accountChange from '@/views/customer/list/components/detail/account-change.vue';
     import scanLog from '@/views/customer/list/components/detail/scan-log.vue';
+    import searchLog from '@/views/customer/list/components/detail/search-log.vue';
     import recommendInfo from '@/views/customer/list/components/detail/recommend-info.vue';
     import fallbackInfo from '@/views/customer/list/components/detail/fallback-info.vue';
     import request from '@/utils/request';

+ 55 - 0
src/views/customer/list/components/detail/search-log.vue

@@ -0,0 +1,55 @@
+<template>
+    <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns" :tools="false"
+        :bodyStyle="{ padding: 0 }" />
+</template>
+
+<script setup>
+import { ref, reactive, watch } from 'vue';
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
+
+defineOptions({ name: 'SearchLog' });
+
+const props = defineProps({
+    row: {
+        type: Object,
+        default() {
+            return {};
+        }
+    }
+});
+/** 页面组件实例 */
+const pageRef = ref(null);
+
+const pageConfig = reactive({
+    fileName: '搜索记录',
+    cacheKey: 'searchLogTable'
+});
+
+watch(
+    () => props.row,
+    (row) => {
+        if (!row || (row && !row.id)) return;
+        pageConfig.pageUrl = `/user/userSearchLog/getUserSearchLogList/${row.id}`;
+        pageRef.value?.reload();
+    },
+    {
+        immediate: true,
+        deep: true
+    }
+);
+
+/** 表格列配置 */
+const columns = ref([
+    { label: '序号', type: 'index', align: 'center', width: 60 },
+    { label: '搜索词', prop: 'keyword', align: 'center' },
+    { label: '点击商品', prop: 'bookName', align: 'center' },
+    { label: '搜索时间', prop: 'createTime', align: 'center' },
+    { label: '是否加购', prop: 'isAddCart', align: 'center' },
+    { label: '是否下单', prop: 'isOrdered', align: 'center' }
+]);
+
+//刷新表格
+function reload(where) {
+    pageRef.value?.reload(where);
+}
+</script>

+ 65 - 76
src/views/finance/cashFlow/index.vue

@@ -10,12 +10,10 @@
 
         <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
             <template #toolbar>
-                <el-radio-group
-                    @change="handleStatusChange"
-                    v-model="useStatus"
-                >
+                <el-radio-group @change="handleStatusChange" v-model="useStatus">
                     <el-radio-button label="全部明细" value="" />
                     <el-radio-button label="佣金明细" value="1" />
+                    <el-radio-button label="商城明细" value="5" />
                     <el-radio-button label="书款明细" value="2" />
                     <el-radio-button label="提现明细" value="3" />
                     <el-radio-button label="其他" value="4" />
@@ -28,18 +26,14 @@
                         row.plat == 1
                             ? '微信余额'
                             : row.plat == 2
-                              ? '支付宝余额'
-                              : '--'
+                                ? '支付宝余额'
+                                : '--'
                     }}
                 </div>
             </template>
 
             <template #changeType="{ row }">
-                <dict-data
-                    code="account_change_type"
-                    type="text"
-                    :model-value="row.changeType"
-                />
+                <dict-data code="account_change_type" type="text" :model-value="row.changeType" />
             </template>
 
             <template #orderId="{ row }">
@@ -50,12 +44,7 @@
 
             <template #action="{ row }">
                 <div>
-                    <el-button
-                        type="primary"
-                        link
-                        v-permission="'finance:cashFlow:detail'"
-                        @click="handleDetail(row)"
-                    >
+                    <el-button type="primary" link v-permission="'finance:cashFlow:detail'" @click="handleDetail(row)">
                         [详情]
                     </el-button>
                 </div>
@@ -67,71 +56,71 @@
 </template>
 
 <script setup>
-    import { ref, reactive } from 'vue';
-    import CommonTable from '@/components/CommonPage/CommonTable.vue';
-    import pageSearch from './components/page-search.vue';
-    import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
+import { ref, reactive } from 'vue';
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
+import pageSearch from './components/page-search.vue';
+import OrderDetail from '@/views/recycleOrder/components/order-detail.vue';
 
-    defineOptions({ name: 'Withdrawal' });
-    const checkList = ref([]);
+defineOptions({ name: 'Withdrawal' });
+const checkList = ref([]);
 
-    const useStatus = ref('');
-    function handleStatusChange(value) {
-        pageRef.value.reload({ type: value });
+const useStatus = ref('');
+function handleStatusChange(value) {
+    pageRef.value.reload({ type: value });
+}
+
+/** 表格列配置 */
+const columns = ref([
+    { label: '交易时间', prop: 'createTime', align: 'center', width: 180 },
+    { label: '用户UID', prop: 'userId', align: 'center' },
+    { label: '客户昵称', prop: 'nickName', align: 'center', width: 150 },
+    {
+        label: '支付单号/流水号',
+        prop: 'tradeNo',
+        align: 'center',
+        minWidth: 160
+    },
+    { label: '对方账户', prop: 'plat', align: 'center', slot: 'plat' },
+    { label: '变动金额', prop: 'changeMoney', align: 'center' },
+    { label: '变动后金额', prop: 'afterMoney', align: 'center' },
+    {
+        label: '订单编号',
+        prop: 'orderId',
+        align: 'center',
+        minWidth: 120,
+        slot: 'orderId'
+    },
+    {
+        label: '交易类型',
+        prop: 'changeTypeName',
+        align: 'center',
+        slot: 'changeType'
     }
+]);
 
-    /** 表格列配置 */
-    const columns = ref([
-        { label: '交易时间', prop: 'createTime', align: 'center', width: 180 },
-        { label: '用户UID', prop: 'userId', align: 'center' },
-        { label: '客户昵称', prop: 'nickName', align: 'center', width: 150 },
-        {
-            label: '支付单号/流水号',
-            prop: 'tradeNo',
-            align: 'center',
-            minWidth: 160
-        },
-        { label: '对方账户', prop: 'plat', align: 'center', slot: 'plat' },
-        { label: '变动金额', prop: 'changeMoney', align: 'center' },
-        { label: '变动后金额', prop: 'afterMoney', align: 'center' },
-        {
-            label: '订单编号',
-            prop: 'orderId',
-            align: 'center',
-            minWidth: 120,
-            slot: 'orderId'
-        },
-        {
-            label: '交易类型',
-            prop: 'changeTypeName',
-            align: 'center',
-            slot: 'changeType'
-        }
-    ]);
+/** 页面组件实例 */
+const pageRef = ref(null);
+const orderDetailRef = ref(null);
 
-    /** 页面组件实例 */
-    const pageRef = ref(null);
-    const orderDetailRef = ref(null);
+const pageConfig = reactive({
+    pageUrl: '/user/userAccountInfo/changeLogList',
+    exportUrl: '/user/userAccountInfo/export',
+    fileName: '用户账户流水记录',
+    cacheKey: 'userAccountChangeLogTable'
+});
 
-    const pageConfig = reactive({
-        pageUrl: '/user/userAccountInfo/changeLogList',
-        exportUrl: '/user/userAccountInfo/export',
-        fileName: '用户账户流水记录',
-        cacheKey: 'userAccountChangeLogTable'
-    });
+//刷新表格
+function reload(where) {
+    pageRef.value?.reload(where);
+}
 
-    //刷新表格
-    function reload(where) {
-        pageRef.value?.reload(where);
-    }
+//订单详情
+function handleOrderId(row) {
+    orderDetailRef.value?.handleOpen(row);
+}
 
-    //订单详情
-    function handleOrderId(row) {
-        orderDetailRef.value?.handleOpen(row);
-    }
-
-    //详情
-    function handleDetail(row) {
-        console.log(row);
-    }
+//详情
+function handleDetail(row) {
+    console.log(row);
+}
 </script>

+ 50 - 0
src/views/finance/overview/index.vue

@@ -81,6 +81,31 @@ function updateStateList(data) {
                 },
             ],
         },
+        {
+            title: "商城账户总览",
+            children: [
+                {
+                    name: "累计成交金额",
+                    number: data.mallTotalMoney || 0,
+                },
+                {
+                    name: "已支付未发货金额",
+                    number: data.mallPaidUnShippedMoney || 0,
+                },
+                {
+                    name: "已发货未收款金额",
+                    number: data.mallShippedUnCollectedMoney || 0,
+                },
+                {
+                    name: "已收款金额",
+                    number: data.mallCollectedMoney || 0,
+                },
+                {
+                    name: "退款金额",
+                    number: data.mallRefundMoney || 0,
+                },
+            ],
+        },
         {
             title: "佣金总览",
             children: [
@@ -152,6 +177,31 @@ const stateList = ref([
             },
         ],
     },
+    {
+        title: "商城账户总览",
+        children: [
+            {
+                name: "累计成交金额",
+                number: 0,
+            },
+            {
+                name: "已支付未发货金额",
+                number: 0,
+            },
+            {
+                name: "已发货未收款金额",
+                number: 0,
+            },
+            {
+                name: "已收款金额",
+                number: 0,
+            },
+            {
+                name: "退款金额",
+                number: 0,
+            },
+        ],
+    },
     {
         title: "佣金总览",
         children: [