Просмотр исходного кода

fix:提现任务抽离为新菜单

刘恒 1 год назад
Родитель
Сommit
66b1aa6ecc

+ 73 - 4
src/components/menu/SideMenu.vue

@@ -8,10 +8,48 @@
     :trigger="null"
     :trigger="null"
   >
   >
     <div :class="['logo', theme]">
     <div :class="['logo', theme]">
-      <router-link to="/agreement/agreement">
-        <img src="@/assets/img/title.png" />
-        <h1>晋掌柜控制台</h1>
-      </router-link>
+      <a-dropdown>
+        <div class="header-avatar" style="cursor: pointer">
+          <!-- <router-link to="/agreement/agreement"> -->
+          <div class="logo-title">
+            <img
+              src="@/assets/img/title.png"
+              style="width: 30px; height: 30px"
+            />
+            <h1 style="font-size: 18px; margin-right: 5px">晋掌柜控制台</h1>
+            <a-icon type="caret-down" />
+          </div>
+          <!-- </router-link> -->
+        </div>
+        <a-menu :class="['avatar-menu']" slot="overlay">
+          切换到
+          <a-menu-item>
+            <div
+              style="display: flex; align-items: center"
+              @click="toShopkeeper"
+            >
+              <img
+                src="@/assets/img/new_logo.png"
+                style="width: 30px; height: 30px"
+              />
+              <h1 style="font-size: 18px; margin-left: 5px">掌柜科技</h1>
+            </div>
+          </a-menu-item>
+          <a-menu-item>
+            <div style="display: flex; align-items: center" @click="toIndex">
+              <img
+                src="@/assets/img/title.png"
+                style="width: 30px; height: 30px"
+              />
+              <h1 style="font-size: 18px; margin-left: 5px">晋掌柜控制台</h1>
+            </div>
+          </a-menu-item>
+          <!-- <a-menu-item @click="Back">
+        <a-icon style="margin-right: 8px" type="poweroff" />
+        <span>返回掌柜</span>
+      </a-menu-item> -->
+        </a-menu>
+      </a-dropdown>
     </div>
     </div>
     <a-menu
     <a-menu
       style="width: 256px"
       style="width: 256px"
@@ -57,6 +95,8 @@
 <script>
 <script>
 // import IMenu from "./menu";
 // import IMenu from "./menu";
 import { mapState, mapGetters } from "vuex";
 import { mapState, mapGetters } from "vuex";
+import Cookies from "js-cookie";
+import CryptoJS from "crypto-js";
 export default {
 export default {
   name: "SideMenu",
   name: "SideMenu",
   // components: { IMenu },
   // components: { IMenu },
@@ -81,6 +121,11 @@ export default {
       default: "dark",
       default: "dark",
     },
     },
   },
   },
+  data() {
+    return {
+      process: process.env.VUE_APP_BASE_URL,
+    };
+  },
   computed: {
   computed: {
     sideTheme() {
     sideTheme() {
       return this.theme == "light" ? this.theme : "dark";
       return this.theme == "light" ? this.theme : "dark";
@@ -106,6 +151,18 @@ export default {
         path: "/" + parent.url + "/" + val.url,
         path: "/" + parent.url + "/" + val.url,
       });
       });
     },
     },
+    toIndex() {
+      this.$router.replace({
+        path: "/index",
+      });
+    },
+    toShopkeeper() {
+      let token = CryptoJS.AES.encrypt(
+        Cookies.get("Authorization").split(" ")[1],
+        "token"
+      ).toString();
+      window.location.href = this.process + "/#/login?token=" + token;
+    },
   },
   },
 };
 };
 </script>
 </script>
@@ -150,4 +207,16 @@ export default {
   box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
   box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
   background: #666666;
   background: #666666;
 }
 }
+.avatar-menu {
+  width: 200px;
+  padding-left: 5px;
+}
+.logo-title {
+  padding: 10px;
+}
+.logo-title:hover {
+  background: #f8f9fd;
+  box-shadow: inset 0px 0px 4px 0px rgba(0, 0, 0, 0.1);
+  border-radius: 4px;
+}
 </style>
 </style>

+ 3 - 1
src/components/menu/index.less

@@ -16,7 +16,9 @@
   .logo {
   .logo {
     height: 64px;
     height: 64px;
     position: relative;
     position: relative;
-    line-height: 64px;
+    // line-height: 64px;
+    display: flex;
+    align-items: center;
     padding-left: 24px;
     padding-left: 24px;
     -webkit-transition: all .3s;
     -webkit-transition: all .3s;
     transition: all .3s;
     transition: all .3s;

+ 21 - 0
src/layouts/header/HeaderAvatar.vue

@@ -15,6 +15,10 @@
         <a-icon style="margin-right: 8px" type="poweroff" />
         <a-icon style="margin-right: 8px" type="poweroff" />
         <span>退出登录</span>
         <span>退出登录</span>
       </a-menu-item>
       </a-menu-item>
+      <!-- <a-menu-item @click="Back">
+        <a-icon style="margin-right: 8px" type="poweroff" />
+        <span>返回掌柜</span>
+      </a-menu-item> -->
     </a-menu>
     </a-menu>
   </a-dropdown>
   </a-dropdown>
 </template>
 </template>
@@ -22,6 +26,8 @@
 <script>
 <script>
 import { mapState } from "vuex";
 import { mapState } from "vuex";
 import { logout } from "@/services/user";
 import { logout } from "@/services/user";
+// import Cookies from "js-cookie";
+// import CryptoJS from "crypto-js";
 
 
 export default {
 export default {
   name: "HeaderAvatar",
   name: "HeaderAvatar",
@@ -36,11 +42,26 @@ export default {
   created() {},
   created() {},
   methods: {
   methods: {
     logout() {
     logout() {
+      // console.log(
+      //   "http://localhost:8090/#/login?token=" +
+      //     Cookies.get("Authorization").split(" ")[1]
+      // );
+      // window.location.href =
+      //   +"http://localhost:8090/#/login?token=" +
+      //   Cookies.get("Authorization").split(" ")[1];
       logout();
       logout();
       // this.$router.push('/login')
       // this.$router.push('/login')
       // console.log(this.process);
       // console.log(this.process);
+
       window.location.href = this.process + "/#/login";
       window.location.href = this.process + "/#/login";
     },
     },
+    // Back() {
+    //   let token = CryptoJS.AES.encrypt(
+    //     Cookies.get("Authorization").split(" ")[1],
+    //     "token"
+    //   ).toString();
+    //   window.location.href = this.process + "/#/login?token=" + token;
+    // },
   },
   },
 };
 };
 </script>
 </script>

+ 82 - 5
src/pages/profit/profit.vue

@@ -40,8 +40,32 @@
           @change="onChange"
           @change="onChange"
           :loading="loading"
           :loading="loading"
         >
         >
-          <div slot="count" slot-scope="{ text }">
-            {{ text != "-" ? text + "次" : text }}
+          <div
+            slot="count"
+            slot-scope="{ text, record }"
+            @click="openDialog(record, 1)"
+          >
+            <a-button type="link">
+              {{ text }}
+            </a-button>
+          </div>
+          <div
+            slot="count1"
+            slot-scope="{ text, record }"
+            @click="openDialog(record, 2)"
+          >
+            <a-button type="link">
+              {{ text }}
+            </a-button>
+          </div>
+          <div
+            slot="count2"
+            slot-scope="{ text, record }"
+            @click="openDialog(record, 3)"
+          >
+            <a-button type="link">
+              {{ text }}
+            </a-button>
           </div>
           </div>
           <div slot="rate" slot-scope="{ text }">
           <div slot="rate" slot-scope="{ text }">
             {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
             {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
@@ -49,6 +73,25 @@
         </standard-table>
         </standard-table>
       </div>
       </div>
     </div>
     </div>
+    <a-modal
+      v-model="visible"
+      :title="title"
+      @ok="handleOk"
+      layout="inline"
+      width="50%"
+      :footer="null"
+    >
+      <a-table
+        :columns="columns1"
+        :dataSource="detailTable"
+        :pagination="false"
+        style="background: #fff"
+        rowKey="id"
+        :scroll="{ y: 600 }"
+        :loading="detailsLoading"
+      >
+      </a-table>
+    </a-modal>
   </div>
   </div>
 </template>
 </template>
           
           
@@ -101,17 +144,17 @@ const columns = [
       {
       {
         title: "人员成本",
         title: "人员成本",
         dataIndex: "laborCost",
         dataIndex: "laborCost",
-        // scopedSlots: { customRender: "count" },
+        scopedSlots: { customRender: "count" },
       },
       },
       {
       {
         title: "固定成本",
         title: "固定成本",
         dataIndex: "fixedCost",
         dataIndex: "fixedCost",
-        // scopedSlots: { customRender: "count" },
+        scopedSlots: { customRender: "count1" },
       },
       },
       {
       {
         title: "变动成本",
         title: "变动成本",
         dataIndex: "variableCost",
         dataIndex: "variableCost",
-        // scopedSlots: { customRender: "count" },
+        scopedSlots: { customRender: "count2" },
       },
       },
     ],
     ],
   },
   },
@@ -139,6 +182,21 @@ export default {
   //   mixins: [mixin],
   //   mixins: [mixin],
   data() {
   data() {
     return {
     return {
+      columns1: [
+        {
+          title: "类名",
+          dataIndex: "category",
+        },
+
+        {
+          title: "金额",
+          dataIndex: "applyAmount",
+        },
+      ],
+      detailTable: [],
+      detailsLoading: false,
+      visible: false,
+      title: "详情",
       formState: {
       formState: {
         dateType: "",
         dateType: "",
         year: "",
         year: "",
@@ -174,6 +232,25 @@ export default {
     // }, 1000);
     // }, 1000);
   },
   },
   methods: {
   methods: {
+    openDialog(val, type) {
+      // console.log(val, type);
+      this.detailTable = [];
+      this.visible = true;
+      this.detailsLoading = true;
+      this.$API.profit
+        .getDetails({
+          yearAndMonth: val.yearAndMonth,
+          expensesType: type,
+        })
+        .then((res) => {
+          // console.log(res);
+          if (res.data.code === 200) {
+            this.detailsLoading = false;
+
+            this.detailTable = [...res.data.data];
+          }
+        });
+    },
     onLoadData(treeNode) {
     onLoadData(treeNode) {
       return new Promise((resolve) => {
       return new Promise((resolve) => {
         if (treeNode.dataRef.children) {
         if (treeNode.dataRef.children) {

+ 196 - 77
src/pages/task/tixian.vue → src/pages/withdrawaltask/tixian.vue

@@ -1,6 +1,67 @@
 <template>
 <template>
   <div class="back-line-main">
   <div class="back-line-main">
     <div class="back-line-header">
     <div class="back-line-header">
+      <div class="back-line-header-amount">
+        <h2>合计</h2>
+        <div>
+          <dl>
+            <dt><span>总提现金额</span></dt>
+            <dd>
+              <span>{{ amount.allWithdrawalAmount || 0 }}</span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>总提现笔数</span></dt>
+            <dd>
+              <span>{{ amount.allWithdrawalNumber || 0 }}</span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>已提现金额</span></dt>
+            <dd>
+              <span>{{ amount.withdrawalAmount || 0 }}</span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>已提现笔数</span></dt>
+            <dd>
+              <span>{{ amount.withdrawalNumber || 0 }}</span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>未提现金额</span></dt>
+            <dd>
+              <span>
+                {{ amount.notWithdrawalAmount || 0 }}
+              </span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>未提现笔数</span></dt>
+            <dd>
+              <span>
+                {{ amount.notAllWithdrawalNumber || 0 }}
+              </span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>提现驳回金额</span></dt>
+            <dd>
+              <span>
+                {{ amount.failedWithdrawalAmount || 0 }}
+              </span>
+            </dd>
+          </dl>
+          <dl>
+            <dt><span>提现驳回笔数</span></dt>
+            <dd>
+              <span>
+                {{ amount.failedWithdrawalNumber || 0 }}
+              </span>
+            </dd>
+          </dl>
+        </div>
+      </div>
       <div class="back-line-header-title">
       <div class="back-line-header-title">
         <h2>提现任务</h2>
         <h2>提现任务</h2>
         <div>
         <div>
@@ -218,7 +279,7 @@
         </div>
         </div>
         <standard-table
         <standard-table
           bordered
           bordered
-          :columns="columns1"
+          :columns="[]"
           :dataSource="detailList"
           :dataSource="detailList"
           :pagination="pageInfo"
           :pagination="pageInfo"
           @change="detailsChange"
           @change="detailsChange"
@@ -273,52 +334,27 @@ import StandardTable from "@/components/table/StandardTable";
 import mixin from "../../minins/mixin";
 import mixin from "../../minins/mixin";
 
 
 const columns = [
 const columns = [
+  //数据列
+  { dataIndex: "id", title: "提现单号" },
+  { dataIndex: "userId", title: "业务员工号" },
+  { dataIndex: "userName", title: "业务员姓名" },
   {
   {
-    title: "用户名称",
-    dataIndex: "userName",
-  },
-
-  {
-    title: "真实姓名",
-    dataIndex: "realUserName",
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "银行卡号",
-    dataIndex: "bankNumber",
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "开户行",
-    dataIndex: "bankAccount",
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "开户行地址",
-    dataIndex: "bankAddress",
-    // scopedSlots: { customRender: "qutationCount" },
-
-    // sorter: true,
-    needTotal: true,
-  },
-  {
-    title: "创建时间",
-    dataIndex: "createTime",
-    needTotal: true,
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "审核时间",
-    dataIndex: "auditTime",
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "审核人名称",
-    dataIndex: "auditUserName",
-    // fixed: "right",
-    // width: 100,
-    // scopedSlots: { title: "title_slot", customRender: "quotationRate" },
+    dataIndex: "source",
+    title: "业务来源",
+    // formatter: this.managementSourceFormatter,
   },
   },
+  { dataIndex: "leaderId", title: "维护人工号" },
+  { dataIndex: "leaderName", title: "维护人" },
+  { dataIndex: "mobile", title: "电话" },
+  { dataIndex: "deptId", title: "机构代码" },
+  { dataIndex: "deptName", title: "机构名称" },
+  { dataIndex: "amount", title: "提现金额" },
+  { dataIndex: "surplusAmount", title: "账户余额" },
+  { dataIndex: "realUserName", title: "真实姓名" },
+  { dataIndex: "bankAddress", title: "开户行" },
+  { dataIndex: "bankAccount", title: "银行" },
+  { dataIndex: "bankNumber", title: "账号" },
+  { dataIndex: "createTime", title: "提现时间" },
 ];
 ];
 import manageminxin from "../../minins/manageMixin";
 import manageminxin from "../../minins/manageMixin";
 import moment from "moment";
 import moment from "moment";
@@ -344,6 +380,7 @@ export default {
         endDate: moment().format("YYYY-MM-DD"),
         endDate: moment().format("YYYY-MM-DD"),
         beginDate: moment().format("YYYY-MM-DD"),
         beginDate: moment().format("YYYY-MM-DD"),
       },
       },
+      amount: {},
       visible: false,
       visible: false,
       headerStyle: {
       headerStyle: {
         display: "flex",
         display: "flex",
@@ -486,6 +523,19 @@ export default {
             this.pagination.total = 0;
             this.pagination.total = 0;
           }
           }
         });
         });
+
+      this.$API.task
+        .getWithdrawalDrawal({
+          // pageNum: this.pagination.current,
+          // pageSize: this.pagination.defaultPageSize,
+          ...this.formState,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.amount = { ...res.data.data };
+            // this.detailList = res.data.data.records;
+          }
+        });
     },
     },
     onClear() {
     onClear() {
       this.$message.info("您清空了勾选的所有行");
       this.$message.info("您清空了勾选的所有行");
@@ -593,44 +643,113 @@ export default {
   }
   }
 }
 }
 
 
-dl {
-  width: 346px;
-  height: 78px;
-  background: #ffffff;
-  border-radius: 4px 4px 4px 4px;
-  border: 1px solid #f87f2c;
-  display: flex;
-  margin-left: 15px;
-  span {
-    color: #f87f2c;
+// dl {
+//   width: 346px;
+//   height: 78px;
+//   background: #ffffff;
+//   border-radius: 4px 4px 4px 4px;
+//   border: 1px solid #f87f2c;
+//   display: flex;
+//   margin-left: 15px;
+//   span {
+//     color: #f87f2c;
+//   }
+//   dt {
+//     width: 64px;
+//     height: 100%;
+//     background: #fff9f7;
+//     display: flex;
+//     align-items: center;
+//     justify-content: center;
+//     border-radius: 4px 0 0 4px;
+//     img {
+//       width: 40px;
+//       height: 40px;
+//     }
+//   }
+//   dd {
+//     padding: 8px 0;
+//     box-sizing: border-box;
+//     margin-left: 10px;
+//     p {
+//       margin: 0;
+//     }
+//     p:first-child {
+//       color: #aaa;
+//     }
+//     display: flex;
+//     flex-direction: column;
+//     // align-items: ;
+//     justify-content: space-between;
+//   }
+// }
+.back-line-header-amount {
+  h2 {
+    margin: 0;
   }
   }
-  dt {
-    width: 64px;
-    height: 100%;
-    background: #fff9f7;
+  > div {
+    flex: 1;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
-    justify-content: center;
-    border-radius: 4px 0 0 4px;
-    img {
-      width: 40px;
-      height: 40px;
+    justify-content: space-between;
+    > dl {
+      flex: none;
+      width: 180px;
+      height: 80px;
+      display: flex;
+      //   align-items: center;
+      justify-content: space-between;
+      flex-direction: column;
+      padding: 10px;
+      box-sizing: border-box;
+
+      border-radius: 4px 4px 4px 4px;
+
+      > dd {
+        display: flex;
+        // align-items: center;
+        justify-content: flex-end;
+        margin: 0;
+        font-family: PingFang SC, PingFang SC;
+        font-weight: 500;
+        font-size: 24px;
+        // color: rgba(0, 0, 0, 0.85);
+        // padding-left: 15px;
+        box-sizing: border-box;
+      }
     }
     }
-  }
-  dd {
-    padding: 8px 0;
-    box-sizing: border-box;
-    margin-left: 10px;
-    p {
-      margin: 0;
+    > dl:first-child {
+      background: url("../../assets/img/business1.png");
+      color: #11a6d3;
     }
     }
-    p:first-child {
-      color: #aaa;
+    > dl:nth-child(2) {
+      background: url("../../assets/img/business2.png");
+      color: #f87f2c;
+    }
+    > dl:nth-child(3) {
+      background: url("../../assets/img/business3.png");
+      color: #fab600;
+    }
+    > dl:nth-child(4) {
+      background: url("../../assets/img/business4.png");
+      color: #80be38;
+    }
+    > dl:nth-child(5) {
+      background: url("../../assets/img/business5.png");
+      color: #906cef;
+    }
+    > dl:nth-child(6) {
+      background: url("../../assets/img/business6.png");
+      color: #47a2eb;
+    }
+    > dl:nth-child(7) {
+      background: url("../../assets/img/business6.png");
+      color: #f879cd;
+    }
+    > dl:nth-child(8) {
+      background: url("../../assets/img/business1.png");
+      color: #11a6d3;
     }
     }
-    display: flex;
-    flex-direction: column;
-    // align-items: ;
-    justify-content: space-between;
   }
   }
 }
 }
 </style>
 </style>

+ 1 - 1
src/services/personnel.js

@@ -37,7 +37,7 @@ export async function getChannelDetails(data) {
 
 
 //获取渠道成员详情
 //获取渠道成员详情
 export async function getManageUser(data) {
 export async function getManageUser(data) {
-  return request(`/user/getTreeDeptUser`, METHOD.POST, data)
+  return request(`/user/getTreeUser`, METHOD.GET, data)
 }
 }
 //导出渠道及前线人员
 //导出渠道及前线人员
 export async function exportList(data) {
 export async function exportList(data) {

+ 7 - 2
src/services/profit.js

@@ -1,13 +1,18 @@
 
 
 import { request, METHOD, } from '@/utils/request'
 import { request, METHOD, } from '@/utils/request'
 
 
-//获取报价次数列表
+//获取利润分析列表
 export async function getProfitList(data) {
 export async function getProfitList(data) {
     return request("/profitAnalysis/getProfitAnalysisQueryList", METHOD.POST, data)
     return request("/profitAnalysis/getProfitAnalysisQueryList", METHOD.POST, data)
 }
 }
 
 
+//利润分析 营业
+export async function getDetails(data) {
+    return request("/profitAnalysis/getProfitAnalysisQueryDetailsList", METHOD.POST, data)
+}
 
 
 
 
 export default {
 export default {
-    getProfitList
+    getProfitList,
+    getDetails
 }
 }

+ 9 - 1
src/services/task.js

@@ -58,6 +58,13 @@ export async function getWithdrawalTask(data) {
 
 
     )
     )
 }
 }
+//提现任务合计
+export async function getWithdrawalDrawal(data) {
+    return request("/withdrawalTask/countWithdrawal", METHOD.POST, data,
+
+    )
+}
+// /withdrawalTask/countWithdrawal
 
 
 
 
 
 
@@ -74,5 +81,6 @@ export default {
     exportInsurancelList,
     exportInsurancelList,
     getChannelAgentDetails,
     getChannelAgentDetails,
     getQueryPageElectric,
     getQueryPageElectric,
-    getWithdrawalTask
+    getWithdrawalTask,
+    getWithdrawalDrawal
 }
 }