From ca8eff0fe6df41a16872a9ee16cdbb8b1895ab40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com>
Date: Thu, 29 Aug 2024 18:03:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/api/app/dashboard.js                      | 12 +++++
 src/router/mchRouter.js                       | 47 +++++--------------
 src/store/modules/user.js                     |  2 +-
 src/views/dashboard/component/TodoList.vue    |  2 +-
 .../mch/index/components/MchUserProfile.vue   | 25 +++-------
 src/views/mch/index/index.vue                 |  6 +--
 src/views/system/smUser/index.vue             |  2 +-
 7 files changed, 38 insertions(+), 58 deletions(-)
 create mode 100644 src/api/app/dashboard.js

diff --git a/src/api/app/dashboard.js b/src/api/app/dashboard.js
new file mode 100644
index 0000000..aaf9dd7
--- /dev/null
+++ b/src/api/app/dashboard.js
@@ -0,0 +1,12 @@
+import request from '@/utils/request'
+
+/**
+ * 用户分成月报表
+ */
+export function appBonusDailyAmount(params) {
+  return request({
+    url: '/app/dashboard/bonusDailyAmount',
+    method: 'get',
+    params
+  })
+}
diff --git a/src/router/mchRouter.js b/src/router/mchRouter.js
index 421572a..5847762 100644
--- a/src/router/mchRouter.js
+++ b/src/router/mchRouter.js
@@ -4,6 +4,19 @@ import Layout from '@/layout/index.vue'
  * 商户中心路由
  */
 export const mchRoutes = [
+  {
+    path: '/share',
+    component: Layout,
+    hidden: false,
+    alwaysShow: true,
+    meta: {
+      title: '推广管理',
+      icon: 'user'
+    },
+    children: [
+
+    ]
+  },
   {
     path: '/business',
     component: Layout,
@@ -170,38 +183,4 @@ export const mchRoutes = [
       },
     ]
   },
-  {
-    path: '/dev',
-    component: Layout,
-    hidden: false,
-    alwaysShow: true,
-    meta: {
-      title: '开发管理',
-      icon: 'code'
-    },
-    children: [
-      {
-        path: 'access',
-        hidden: false,
-        component: () => import('@/views/mch/access/index.vue'),
-        name: "MchAccess",
-        meta: {
-          noCache: false,
-          title: '秘钥管理',
-          icon: 'key',
-        },
-      },
-      {
-        path: 'doc',
-        component: () => import('@/views/mch/devDoc/index.vue'),
-        hidden: false,
-        name: 'DevDoc',
-        meta: {
-          noCache: false,
-          title: '开发文档',
-          icon: 'documentation'
-        },
-      }
-    ]
-  },
 ]
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index d2b6fb3..9d058a8 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -99,7 +99,7 @@ const user = {
           setUserType(userType);
           commit('SET_USER_TYPE', userType)
           if (userType === UserType.APP) {
-            commit('SET_TITLE', "创特物联-商户中心")
+            commit('SET_TITLE', "创亿康-商户中心")
           }
           resolve(res)
         }).catch(error => {
diff --git a/src/views/dashboard/component/TodoList.vue b/src/views/dashboard/component/TodoList.vue
index 673913c..9f1e656 100644
--- a/src/views/dashboard/component/TodoList.vue
+++ b/src/views/dashboard/component/TodoList.vue
@@ -8,7 +8,7 @@
       <div class="unit">条</div>
     </div>
     <div class="todo-item" @click="$router.push('/complaint/mchApply?status=0')">
-      <div class="label"><svg-icon icon-class="apply"/> 商家合作申请</div>
+      <div class="label"><svg-icon icon-class="apply"/> 商家合作</div>
       <div class="value">
         <count-to :start-val="0" :end-val="data.mchApplyCount" :duration="3000"/>
       </div>
diff --git a/src/views/mch/index/components/MchUserProfile.vue b/src/views/mch/index/components/MchUserProfile.vue
index cdbe877..4474b17 100644
--- a/src/views/mch/index/components/MchUserProfile.vue
+++ b/src/views/mch/index/components/MchUserProfile.vue
@@ -1,31 +1,20 @@
 <template>
   <div class="profile" v-loading="loading">
     <el-avatar :src="avatar" :size="64" style="margin:2em auto;"/>
-    <el-row type="flex" style="margin-bottom: 1em">
-      <el-statistic title="设备数" :value="user.deviceCount" suffix="台"/>
-      <el-statistic :title="FieldName.STORE" :value="user.storeCount" suffix="家"/>
-    </el-row>
     <el-row type="flex" style="margin-bottom: 1em">
       <el-statistic title="总收入" :value="user.totalIncome" :precision="2" suffix="元"/>
       <el-statistic title="总提现" :value="user.withDrawlAmount" :precision="2" suffix="元"/>
       <el-statistic title="账户余额" :value="user.balance" suffix="元" :precision="2"/>
     </el-row>
+    <el-row type="flex" style="margin-bottom: 1em">
+      <el-statistic :title="FieldName.AGENT" :value="user.agentCount" suffix="人"/>
+      <el-statistic :title="FieldName.BIZ" :value="user.bizManCount" suffix="人"/>
+      <el-statistic :title="FieldName.INVESTOR" :value="user.investorCount" suffix="人"/>
+      <el-statistic title="设备数" :value="user.deviceCount" suffix="台"/>
+      <el-statistic :title="FieldName.STORE" :value="user.storeCount" suffix="家"/>
+    </el-row>
     <el-row>
       <line-field label="绑定手机" :value="user.phonenumber"/>
-      <line-field label="设备服务费">
-        <template v-if="user.serviceRate == null || user.serviceType == null">跟随渠道</template>
-        <template v-else>
-          <dict-tag :options="dict.type.service_type" :value="user.serviceType" size="mini"/>
-          {{user.serviceRate}} {{serviceUnit(user.serviceType)}}
-        </template>
-      </line-field>
-      <line-field label="提现服务费">
-        <template v-if="user.withdrawServiceRate == null || user.withdrawServiceType == null">跟随渠道</template>
-        <template v-else>
-          <dict-tag :options="dict.type.withdraw_service_type" :value="user.withdrawServiceType" size="mini"/>
-          {{user.withdrawServiceRate}} {{serviceUnit(user.withdrawServiceType)}}
-        </template>
-      </line-field>
     </el-row>
   </div>
 </template>
diff --git a/src/views/mch/index/index.vue b/src/views/mch/index/index.vue
index 2d41b41..7719287 100644
--- a/src/views/mch/index/index.vue
+++ b/src/views/mch/index/index.vue
@@ -4,9 +4,9 @@
       <el-card class="card-box">
         <mch-user-profile/>
       </el-card>
-      <el-card  class="card-box" header="收款账户">
-        <mch-account/>
-      </el-card>
+<!--      <el-card  class="card-box" header="收款账户">-->
+<!--        <mch-account/>-->
+<!--      </el-card>-->
     </el-col>
     <el-col :xl="18" :lg="16" :md="14" :sm="12" :xs="24">
       <el-scrollbar style="max-height: calc(100vh - 148px);">
diff --git a/src/views/system/smUser/index.vue b/src/views/system/smUser/index.vue
index 97986c4..724b6ac 100644
--- a/src/views/system/smUser/index.vue
+++ b/src/views/system/smUser/index.vue
@@ -25,7 +25,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item :label="`直属${FieldName.AGENT}`" prop="agentName">
+      <el-form-item :label="`直属${FieldName.AGENT}`" prop="agentName" :label-width="`${FieldName.AGENT.length + 3}em`">
         <el-input
           v-model="queryParams.agentName"
           :placeholder="`请输入直属${FieldName.AGENT}名称`"