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

fix:业务数据新增页面接口调用

刘恒 2 лет назад
Родитель
Сommit
45cd89499a

+ 112 - 0
src/components/tree/userTree.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="tree">
+    <a-tree
+      v-if="treeData && treeData.length > 0"
+      :tree-data="treeData"
+      :title="'11'"
+      :replaceFields="replaceFields"
+      @select="onSelect"
+      :checkable="checkable"
+      @check="onCheck"
+      v-model="checkList"
+      :auto-expand-parent="autoExpandParent"
+      :expanded-keys="expandedKeys"
+      @expand="onExpand"
+      ref="tree"
+    >
+      <template slot="custom" slot-scope="item">
+        <span>{{ item }}</span>
+        <!-- <span style="color: #f50">({{ item.num }})</span> -->
+      </template>
+    </a-tree>
+  </div>
+</template>
+    
+    <script>
+// import mixin from "../../minins/mixin";
+import { mapState } from "vuex";
+export default {
+  name: "FormRow",
+  //   mixins: [mixin],
+  props: {
+    checkable: {
+      default: false,
+    },
+    // defaultCheckList: {
+    //   default: [],
+    // },
+  },
+  data() {
+    return {
+      treeData: [],
+      replaceFields: {
+        children: "children",
+        title: "name",
+        key: "id",
+      },
+      checkList: [],
+      autoExpandParent: true,
+      expandedKeys: [],
+    };
+  },
+  computed: {
+    ...mapState("setting", ["userInfo"]),
+  },
+  watch: {},
+  created() {},
+  mounted() {
+    this.getUserTree();
+  },
+  methods: {
+    onExpand(expandedKeys) {
+      this.expandedKeys = expandedKeys;
+      //expandedKeys
+      this.autoExpandParent = true;
+    },
+    setExpandKys(item) {
+      this.$nextTick(() => {
+        // this.$refs.tree.expandedKeys = ["99D17"];
+        // this.$refs.tree.defaultExpandedKeys = ["99D17"];
+        // console.log(this.$refs.tree);
+        // this.expandedKeys = ["99D17"];
+        // this.checkList = ["99D17"];
+        this.$API.sysManage
+          .getUserItem({
+            userId: item.userId,
+          })
+          .then((res) => {
+            if (res.data.code === 200) {
+              this.expandedKeys = res.data.data.deptIds;
+              this.checkList = res.data.data.deptIds;
+            }
+          });
+      });
+    },
+    getUserTree() {
+      // console.log(this.userInfo);
+      this.$API.business.getUserTree({}).then((res) => {
+        if (res.data.code === 200) {
+          this.treeData = res.data.data;
+        }
+      });
+    },
+
+    onSelect(keys) {
+      this.$emit("getList", keys[0]);
+    },
+    onCheck(checkedKeys) {
+      this.$emit("checkTree", checkedKeys);
+
+      // this.checkedKeys = checkedKeys;
+    },
+  },
+};
+</script>
+    
+  <style lang="less" scoped>
+.tree {
+  height: 900px;
+  overflow-y: auto;
+}
+</style>
+    

+ 79 - 93
src/pages/business/agent.vue

@@ -4,7 +4,7 @@
       <div><h2>组织树</h2></div>
       <div>
         <!-- <a-tree  :tree-data="treeData" /> -->
-        <tree @getList="getVerification"></tree>
+        <tree @getList="chooseUser"></tree>
       </div>
     </div>
     <div class="back-line-main">
@@ -15,24 +15,24 @@
             <dl>
               <dt><span>签单保费</span></dt>
               <dd>
-                <span>{{ BigOrder.frameno }}</span>
+                <span>{{ amount.sumPremium || 0 }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>签单保费总占比</span></dt>
               <dd>
-                <span>{{ BigOrder.orderNumber || 0 }}</span>
+                <span>{{
+                  amount.sumPremiumProportion
+                    ? (amount.sumPremiumProportion * 100).toFixed(2) + "%"
+                    : 0
+                }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>交强险保费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jqpremium }}
                 </span>
               </dd>
             </dl>
@@ -40,11 +40,7 @@
               <dt><span>车船税</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.taxamount }}
                 </span>
               </dd>
             </dl>
@@ -52,11 +48,7 @@
               <dt><span>商业保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.sypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -64,11 +56,7 @@
               <dt><span>非车保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -99,8 +87,8 @@
                 value="1"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 当天
@@ -109,8 +97,8 @@
                 value="2"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近7天
@@ -119,8 +107,8 @@
                 value="3"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近30天
@@ -131,27 +119,19 @@
         <a-form
           layout="inline"
           :model="formState"
-          style="padding: 0 0 0 15px; box-sizing: border-box"
+          style="padding: 15px; box-sizing: border-box"
         >
-          <a-form-item
-            label="业务员姓名"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="姓名" :colon="false">
             <a-input
-              placeholder="请输入业务员姓名"
+              placeholder="请输入姓名"
               v-model="formState.userName"
               allowClear
               style="width: 200px"
             ></a-input>
           </a-form-item>
-          <a-form-item
-            label="业务员工号"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="工号" :colon="false">
             <a-input
-              placeholder="请输入业务员工号"
+              placeholder="请输入工号"
               v-model="formState.userId"
               style="width: 200px"
               allowClear
@@ -180,12 +160,6 @@
           @change="onChange"
           :loading="loading"
         >
-          <div slot="count" slot-scope="{ text }">
-            {{ text != "-" ? text + "次" : text }}
-          </div>
-          <div slot="rate" slot-scope="{ text }">
-            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
-          </div>
           <div slot="operation" slot-scope="{ text, record }">
             <a-button type="link" @click="watchMessage({ text, record })"
               >详情</a-button
@@ -200,40 +174,40 @@
   <script>
 import StandardTable from "@/components/table/StandardTable";
 // import mixin from "../../minins/mixin";
-import tree from "@/components/tree/tree";
+import tree from "@/components/tree/userTree";
 import moment from "moment";
 
 const columns = [
   {
     title: "姓名",
-    dataIndex: "licenseno",
+    dataIndex: "userName",
   },
 
   {
     title: "工号",
-    dataIndex: "frameno",
+    dataIndex: "userId",
     // scopedSlots: { customRender: "parterCompanyName" },
   },
 
   {
     title: "签单保费",
-    dataIndex: "orderNumber",
+    dataIndex: "sumPremium",
   },
   {
     title: "交强险保费",
-    dataIndex: "closeRate",
+    dataIndex: "jqpremium",
   },
   {
     title: "车船税",
-    dataIndex: "namesimple",
+    dataIndex: "taxamount",
   },
   {
     title: "商业险保费",
-    dataIndex: "namesimple",
+    dataIndex: "sypremium",
   },
   {
     title: "非车险保费",
-    dataIndex: "namesimple",
+    dataIndex: "jypremium",
   },
   {
     title: "操作",
@@ -253,13 +227,11 @@ export default {
       formState: {
         dateType: undefined,
         time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        beginDate: moment().format("YYYY-MM-DD"),
-        endDate: moment().format("YYYY-MM-DD"),
-        licenseno: "",
+        createtimeStart: moment().format("YYYY-MM-DD"),
+        createtimeEnd: moment().format("YYYY-MM-DD"),
         userName: "",
-        mobile: "",
-        frameno: "",
         userId: "",
+        treeUserId: "",
       },
       backLinePersonnel: {},
       columns: columns,
@@ -286,7 +258,7 @@ export default {
         { title: "Expand to load", key: "1" },
         { title: "Tree Node", key: "2", isLeaf: true },
       ],
-      BigOrder: {},
+      amount: {},
     };
   },
   mounted() {
@@ -295,64 +267,67 @@ export default {
     // }, 1000);
   },
   methods: {
+    chooseUser(val) {
+      this.formState.treeUserId = val;
+      this.getVerification();
+    },
     getList() {
       this.pagination.current = 1;
       this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
     onChangeTime(val) {
-      // console.log(val);
-      this.formState.beginDate = val[0];
-      this.formState.endDate = val[1];
+      this.formState.createtimeStart = val[0];
+      this.formState.createtimeEnd = val[1];
       this.formState.dateType = undefined;
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
-    handleFinish() {
+    watchMessage(item) {
       //
-    },
-    wholeHandleChange() {
-      this.getProvinceList(this.formState.whole);
-    },
-    provinceHandleChange() {
-      this.getCityList(this.formState.provinceId);
-    },
-    cityHandleChange() {
-      this.getAreaList(this.formState.cityId);
-    },
-    countyHandleChange() {
-      this.getStoreList(this.formState.countyId);
+      item;
+      this.$router.push({
+        path: "/business/agent/message",
+        query: {
+          user: { ...item },
+          time: {
+            createtimeStart: this.formState.createtimeStart,
+            createtimeEnd: this.formState.createtimeEnd,
+          },
+        },
+      });
     },
 
     async getVerification() {
       this.loading = true;
 
-      this.$API.quote
-        .getBigOrderList({
+      this.$API.business
+        .getBusinessAgentList({
           pageNum: this.pagination.current,
           pageSize: this.pagination.defaultPageSize,
           ...this.formState,
+          managementSource: 2,
         })
         .then((res) => {
           if (res.data.code === 200) {
             this.loading = false;
-            this.tableList = res.data.data.content;
+            this.tableList = res.data.data.records;
             this.pagination = {
-              current: res.data.data.pageNum,
-              defaultPageSize: res.data.data.pageSize,
-              total: res.data.data.totalSize,
+              current: res.data.data.current,
+              defaultPageSize: res.data.data.size,
+              total: res.data.data.total,
             };
           }
         });
-      this.$API.quote
-        .getBigOrderMount({
-          // pageNum: this.pagination.current,
-          // pageSize: this.pagination.defaultPageSize,
+      this.$API.business
+        .getBusinessAgentTotalList({
           ...this.formState,
+          managementSource: 2,
         })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
-            this.BigOrder = { ...res.data.data };
+            this.amount = { ...res.data.data };
           }
         });
     },
@@ -360,9 +335,9 @@ export default {
       this.$message.info("您清空了勾选的所有行");
     },
 
-    onChange(pagination, filters, sorter, { currentDataSource }) {
+    onChange(pagination) {
       // this.$message.info('表格状态改变了')
-      console.log(pagination, filters, sorter, { currentDataSource });
+
       this.pagination = {
         current: pagination.current,
         defaultPageSize: pagination.pageSize,
@@ -477,6 +452,8 @@ export default {
     // background: #fff;
     .ant-form {
       display: flex;
+      padding-top: 10px;
+      box-sizing: border-box;
       > .ant-form-item {
         flex: none;
         /deep/.ant-form-item-control-wrapper {
@@ -494,7 +471,8 @@ export default {
     }
   }
   .table-title {
-    padding: 15px 15px 0;
+    padding: 15px;
+    border-bottom: 1px solid #eee;
     box-sizing: border-box;
     display: flex;
     align-items: center;
@@ -509,4 +487,12 @@ export default {
     }
   }
 }
+.ant-form {
+  display: flex;
+  padding-top: 10px;
+  box-sizing: border-box;
+}
+.ant-form-item {
+  display: flex;
+}
 </style>

+ 79 - 93
src/pages/business/channel.vue

@@ -4,7 +4,7 @@
       <div><h2>组织树</h2></div>
       <div>
         <!-- <a-tree  :tree-data="treeData" /> -->
-        <tree @getList="getVerification"></tree>
+        <tree @getList="chooseUser"></tree>
       </div>
     </div>
     <div class="back-line-main">
@@ -15,24 +15,24 @@
             <dl>
               <dt><span>签单保费</span></dt>
               <dd>
-                <span>{{ BigOrder.frameno }}</span>
+                <span>{{ amount.sumPremium || 0 }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>签单保费总占比</span></dt>
               <dd>
-                <span>{{ BigOrder.orderNumber || 0 }}</span>
+                <span>{{
+                  amount.sumPremiumProportion
+                    ? (amount.sumPremiumProportion * 100).toFixed(2) + "%"
+                    : 0
+                }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>交强险保费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jqpremium }}
                 </span>
               </dd>
             </dl>
@@ -40,11 +40,7 @@
               <dt><span>车船税</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.taxamount }}
                 </span>
               </dd>
             </dl>
@@ -52,11 +48,7 @@
               <dt><span>商业保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.sypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -64,11 +56,7 @@
               <dt><span>非车保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -99,8 +87,8 @@
                 value="1"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 当天
@@ -109,8 +97,8 @@
                 value="2"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近7天
@@ -119,8 +107,8 @@
                 value="3"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近30天
@@ -131,27 +119,19 @@
         <a-form
           layout="inline"
           :model="formState"
-          style="padding: 0 0 0 15px; box-sizing: border-box"
+          style="padding: 15px; box-sizing: border-box"
         >
-          <a-form-item
-            label="业务员姓名"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="姓名" :colon="false">
             <a-input
-              placeholder="请输入业务员姓名"
+              placeholder="请输入姓名"
               v-model="formState.userName"
               allowClear
               style="width: 200px"
             ></a-input>
           </a-form-item>
-          <a-form-item
-            label="业务员工号"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="工号" :colon="false">
             <a-input
-              placeholder="请输入业务员工号"
+              placeholder="请输入工号"
               v-model="formState.userId"
               style="width: 200px"
               allowClear
@@ -180,12 +160,6 @@
           @change="onChange"
           :loading="loading"
         >
-          <div slot="count" slot-scope="{ text }">
-            {{ text != "-" ? text + "次" : text }}
-          </div>
-          <div slot="rate" slot-scope="{ text }">
-            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
-          </div>
           <div slot="operation" slot-scope="{ text, record }">
             <a-button type="link" @click="watchMessage({ text, record })"
               >详情</a-button
@@ -200,40 +174,40 @@
   <script>
 import StandardTable from "@/components/table/StandardTable";
 // import mixin from "../../minins/mixin";
-import tree from "@/components/tree/tree";
+import tree from "@/components/tree/userTree";
 import moment from "moment";
 
 const columns = [
   {
     title: "姓名",
-    dataIndex: "licenseno",
+    dataIndex: "userName",
   },
 
   {
     title: "工号",
-    dataIndex: "frameno",
+    dataIndex: "userId",
     // scopedSlots: { customRender: "parterCompanyName" },
   },
 
   {
     title: "签单保费",
-    dataIndex: "orderNumber",
+    dataIndex: "sumPremium",
   },
   {
     title: "交强险保费",
-    dataIndex: "closeRate",
+    dataIndex: "jqpremium",
   },
   {
     title: "车船税",
-    dataIndex: "namesimple",
+    dataIndex: "taxamount",
   },
   {
     title: "商业险保费",
-    dataIndex: "namesimple",
+    dataIndex: "sypremium",
   },
   {
     title: "非车险保费",
-    dataIndex: "namesimple",
+    dataIndex: "jypremium",
   },
   {
     title: "操作",
@@ -253,13 +227,11 @@ export default {
       formState: {
         dateType: undefined,
         time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        beginDate: moment().format("YYYY-MM-DD"),
-        endDate: moment().format("YYYY-MM-DD"),
-        licenseno: "",
+        createtimeStart: moment().format("YYYY-MM-DD"),
+        createtimeEnd: moment().format("YYYY-MM-DD"),
         userName: "",
-        mobile: "",
-        frameno: "",
         userId: "",
+        treeUserId: "",
       },
       backLinePersonnel: {},
       columns: columns,
@@ -286,7 +258,7 @@ export default {
         { title: "Expand to load", key: "1" },
         { title: "Tree Node", key: "2", isLeaf: true },
       ],
-      BigOrder: {},
+      amount: {},
     };
   },
   mounted() {
@@ -295,64 +267,67 @@ export default {
     // }, 1000);
   },
   methods: {
+    chooseUser(val) {
+      this.formState.treeUserId = val;
+      this.getVerification();
+    },
     getList() {
       this.pagination.current = 1;
       this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
     onChangeTime(val) {
-      // console.log(val);
-      this.formState.beginDate = val[0];
-      this.formState.endDate = val[1];
+      this.formState.createtimeStart = val[0];
+      this.formState.createtimeEnd = val[1];
       this.formState.dateType = undefined;
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
-    handleFinish() {
+    watchMessage(item) {
       //
-    },
-    wholeHandleChange() {
-      this.getProvinceList(this.formState.whole);
-    },
-    provinceHandleChange() {
-      this.getCityList(this.formState.provinceId);
-    },
-    cityHandleChange() {
-      this.getAreaList(this.formState.cityId);
-    },
-    countyHandleChange() {
-      this.getStoreList(this.formState.countyId);
+      item;
+      this.$router.push({
+        path: "/business/agent/message",
+        query: {
+          user: { ...item },
+          time: {
+            createtimeStart: this.formState.createtimeStart,
+            createtimeEnd: this.formState.createtimeEnd,
+          },
+        },
+      });
     },
 
     async getVerification() {
       this.loading = true;
 
-      this.$API.quote
-        .getBigOrderList({
+      this.$API.business
+        .getBusinessAgentList({
           pageNum: this.pagination.current,
           pageSize: this.pagination.defaultPageSize,
           ...this.formState,
+          managementSource: 1,
         })
         .then((res) => {
           if (res.data.code === 200) {
             this.loading = false;
-            this.tableList = res.data.data.content;
+            this.tableList = res.data.data.records;
             this.pagination = {
-              current: res.data.data.pageNum,
-              defaultPageSize: res.data.data.pageSize,
-              total: res.data.data.totalSize,
+              current: res.data.data.current,
+              defaultPageSize: res.data.data.size,
+              total: res.data.data.total,
             };
           }
         });
-      this.$API.quote
-        .getBigOrderMount({
-          // pageNum: this.pagination.current,
-          // pageSize: this.pagination.defaultPageSize,
+      this.$API.business
+        .getBusinessAgentTotalList({
           ...this.formState,
+          managementSource: 1,
         })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
-            this.BigOrder = { ...res.data.data };
+            this.amount = { ...res.data.data };
           }
         });
     },
@@ -360,9 +335,9 @@ export default {
       this.$message.info("您清空了勾选的所有行");
     },
 
-    onChange(pagination, filters, sorter, { currentDataSource }) {
+    onChange(pagination) {
       // this.$message.info('表格状态改变了')
-      console.log(pagination, filters, sorter, { currentDataSource });
+
       this.pagination = {
         current: pagination.current,
         defaultPageSize: pagination.pageSize,
@@ -477,6 +452,8 @@ export default {
     // background: #fff;
     .ant-form {
       display: flex;
+      padding-top: 10px;
+      box-sizing: border-box;
       > .ant-form-item {
         flex: none;
         /deep/.ant-form-item-control-wrapper {
@@ -494,7 +471,8 @@ export default {
     }
   }
   .table-title {
-    padding: 15px 15px 0;
+    padding: 15px;
+    border-bottom: 1px solid #eee;
     box-sizing: border-box;
     display: flex;
     align-items: center;
@@ -509,4 +487,12 @@ export default {
     }
   }
 }
+.ant-form {
+  display: flex;
+  padding-top: 10px;
+  box-sizing: border-box;
+}
+.ant-form-item {
+  display: flex;
+}
 </style>

+ 56 - 115
src/pages/business/message.vue

@@ -15,24 +15,24 @@
             <dl>
               <dt><span>签单保费</span></dt>
               <dd>
-                <span>{{ BigOrder.frameno }}</span>
+                <span>{{ amount.sumPremium || 0 }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>签单保费总占比</span></dt>
               <dd>
-                <span>{{ BigOrder.orderNumber || 0 }}</span>
+                <span>{{
+                  amount.sumPremiumProportion
+                    ? (amount.sumPremiumProportion * 100).toFixed(2) + "%"
+                    : 0
+                }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>交强险保费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jqpremium }}
                 </span>
               </dd>
             </dl>
@@ -40,11 +40,7 @@
               <dt><span>车船税</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.taxamount }}
                 </span>
               </dd>
             </dl>
@@ -52,11 +48,7 @@
               <dt><span>商业保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.sypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -64,11 +56,7 @@
               <dt><span>非车保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -77,7 +65,7 @@
       </div>
       <div style="background-color: #fff; margin-top: 15px">
         <div class="table-title">
-          <h2>电销</h2>
+          <h2>保费详情</h2>
           <div>
             <span>时间筛选</span>
             <a-range-picker
@@ -99,8 +87,8 @@
                 value="1"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 当天
@@ -109,8 +97,8 @@
                 value="2"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近7天
@@ -119,8 +107,8 @@
                 value="3"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近30天
@@ -128,48 +116,6 @@
             </a-radio-group>
           </div>
         </div>
-        <a-form
-          layout="inline"
-          :model="formState"
-          style="padding: 0 0 0 15px; box-sizing: border-box"
-        >
-          <a-form-item
-            label="业务员姓名"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
-            <a-input
-              placeholder="请输入业务员姓名"
-              v-model="formState.userName"
-              allowClear
-              style="width: 200px"
-            ></a-input>
-          </a-form-item>
-          <a-form-item
-            label="业务员工号"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
-            <a-input
-              placeholder="请输入业务员工号"
-              v-model="formState.userId"
-              style="width: 200px"
-              allowClear
-            ></a-input>
-          </a-form-item>
-          <a-form-item
-            style="
-              flex: 1;
-              display: flex;
-              justify-content: flex-end;
-              padding-right: 15px;
-              box-sizing: border-box;
-              align-items: flex-end;
-            "
-          >
-            <a-button type="primary" @click="getList">查询</a-button>
-          </a-form-item>
-        </a-form>
 
         <standard-table
           bordered
@@ -180,12 +126,12 @@
           @change="onChange"
           :loading="loading"
         >
-          <div slot="count" slot-scope="{ text }">
-            {{ text != "-" ? text + "次" : text }}
-          </div>
-          <div slot="rate" slot-scope="{ text }">
-            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
+          <div slot="insuranceCompany" slot-scope="{ record }">
+            <img :src="record.logo" alt="" style="width: 24px; height: auto" />
+
+            {{ record.insuranceCompany }}
           </div>
+
           <div slot="operation" slot-scope="{ text, record }">
             <a-button type="link" @click="watchMessage({ text, record })"
               >详情</a-button
@@ -201,44 +147,39 @@
 import StandardTable from "@/components/table/StandardTable";
 // import mixin from "../../minins/mixin";
 
-import moment from "moment";
+// import moment from "moment";
 
 const columns = [
   {
-    title: "姓名",
-    dataIndex: "licenseno",
+    title: "保险公司",
+    dataIndex: "insuranceCompany",
+    scopedSlots: { customRender: "insuranceCompany" },
   },
 
   {
-    title: "工号",
-    dataIndex: "frameno",
-    // scopedSlots: { customRender: "parterCompanyName" },
+    title: "合作公司",
+    dataIndex: "partnerCompaniesName",
   },
 
   {
     title: "签单保费",
-    dataIndex: "orderNumber",
+    dataIndex: "sumPremium",
   },
   {
     title: "交强险保费",
-    dataIndex: "closeRate",
+    dataIndex: "jqpremium",
   },
   {
     title: "车船税",
-    dataIndex: "namesimple",
+    dataIndex: "taxamount",
   },
   {
     title: "商业险保费",
-    dataIndex: "namesimple",
+    dataIndex: "sypremium",
   },
   {
     title: "非车险保费",
-    dataIndex: "namesimple",
-  },
-  {
-    title: "操作",
-    dataIndex: "operation",
-    scopedSlots: { customRender: "operation" },
+    dataIndex: "jypremium",
   },
 ];
 
@@ -251,14 +192,9 @@ export default {
     return {
       formState: {
         dateType: undefined,
-        time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        beginDate: moment().format("YYYY-MM-DD"),
-        endDate: moment().format("YYYY-MM-DD"),
-        licenseno: "",
-        userName: "",
-        mobile: "",
-        frameno: "",
-        userId: "",
+        time: ["", ""],
+        createtimeStart: "",
+        createtimeEnd: "",
       },
       backLinePersonnel: {},
       columns: columns,
@@ -285,13 +221,20 @@ export default {
         { title: "Expand to load", key: "1" },
         { title: "Tree Node", key: "2", isLeaf: true },
       ],
-      BigOrder: {},
+      amount: {},
+      process: process.env.VUE_APP_API_BASE_URL,
     };
   },
   mounted() {
     this.getVerification();
     // setTimeout(() => {
     // }, 1000);
+    this.time = [
+      this.$route.query.time.createtimeStart,
+      this.$route.query.time.createtimeEnd,
+    ];
+    this.formState.createtimeStart = this.$route.query.time.createtimeStart;
+    this.formState.createtimeEnd = this.$route.query.time.createtimeEnd;
   },
   methods: {
     getList() {
@@ -301,8 +244,8 @@ export default {
     },
     onChangeTime(val) {
       // console.log(val);
-      this.formState.beginDate = val[0];
-      this.formState.endDate = val[1];
+      this.formState.createtimeStart = val[0];
+      this.formState.createtimeEnd = val[1];
       this.formState.dateType = undefined;
       this.getVerification();
     },
@@ -325,33 +268,31 @@ export default {
     async getVerification() {
       this.loading = true;
 
-      this.$API.quote
-        .getBigOrderList({
+      this.$API.business
+        .getBusinessAgentTotalDetails({
           pageNum: this.pagination.current,
           pageSize: this.pagination.defaultPageSize,
+          userId: this.$route.query.user.record.userId,
           ...this.formState,
         })
         .then((res) => {
           if (res.data.code === 200) {
             this.loading = false;
-            this.tableList = res.data.data.content;
+            this.tableList = res.data.data.records;
             this.pagination = {
-              current: res.data.data.pageNum,
-              defaultPageSize: res.data.data.pageSize,
-              total: res.data.data.totalSize,
+              current: res.data.data.current,
+              defaultPageSize: res.data.data.size,
+              total: res.data.data.total,
             };
           }
         });
-      this.$API.quote
-        .getBigOrderMount({
-          // pageNum: this.pagination.current,
-          // pageSize: this.pagination.defaultPageSize,
+      this.$API.business
+        .getBusinessAgentTotalList({
           ...this.formState,
         })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
-            this.BigOrder = { ...res.data.data };
+            this.amount = { ...res.data.data };
           }
         });
     },

+ 80 - 93
src/pages/business/sales.vue

@@ -3,7 +3,8 @@
     <div class="quote-tree" style="border-radius: 8px">
       <div><h2>组织树</h2></div>
       <div>
-        <tree @getList="getVerification"></tree>
+        <!-- <a-tree  :tree-data="treeData" /> -->
+        <tree @getList="chooseUser"></tree>
       </div>
     </div>
     <div class="back-line-main">
@@ -14,24 +15,24 @@
             <dl>
               <dt><span>签单保费</span></dt>
               <dd>
-                <span>{{ BigOrder.frameno }}</span>
+                <span>{{ amount.sumPremium || 0 }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>签单保费总占比</span></dt>
               <dd>
-                <span>{{ BigOrder.orderNumber || 0 }}</span>
+                <span>{{
+                  amount.sumPremiumProportion
+                    ? (amount.sumPremiumProportion * 100).toFixed(2) + "%"
+                    : 0
+                }}</span>
               </dd>
             </dl>
             <dl>
               <dt><span>交强险保费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jqpremium }}
                 </span>
               </dd>
             </dl>
@@ -39,11 +40,7 @@
               <dt><span>车船税</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.taxamount }}
                 </span>
               </dd>
             </dl>
@@ -51,11 +48,7 @@
               <dt><span>商业保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.sypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -63,11 +56,7 @@
               <dt><span>非车保险费</span></dt>
               <dd>
                 <span>
-                  {{
-                    BigOrder.closeRate
-                      ? (BigOrder.closeRate * 100).toFixed(2) + "%"
-                      : 0
-                  }}
+                  {{ amount.jypremium || 0 }}
                 </span>
               </dd>
             </dl>
@@ -98,8 +87,8 @@
                 value="1"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 当天
@@ -108,8 +97,8 @@
                 value="2"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近7天
@@ -118,8 +107,8 @@
                 value="3"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
                 近30天
@@ -130,27 +119,19 @@
         <a-form
           layout="inline"
           :model="formState"
-          style="padding: 0 0 0 15px; box-sizing: border-box"
+          style="padding: 15px; box-sizing: border-box"
         >
-          <a-form-item
-            label="业务员姓名"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="姓名" :colon="false">
             <a-input
-              placeholder="请输入业务员姓名"
+              placeholder="请输入姓名"
               v-model="formState.userName"
               allowClear
               style="width: 200px"
             ></a-input>
           </a-form-item>
-          <a-form-item
-            label="业务员工号"
-            :labelCol="{ span: 8 }"
-            :colon="false"
-          >
+          <a-form-item label="工号" :colon="false">
             <a-input
-              placeholder="请输入业务员工号"
+              placeholder="请输入工号"
               v-model="formState.userId"
               style="width: 200px"
               allowClear
@@ -179,12 +160,6 @@
           @change="onChange"
           :loading="loading"
         >
-          <div slot="count" slot-scope="{ text }">
-            {{ text != "-" ? text + "次" : text }}
-          </div>
-          <div slot="rate" slot-scope="{ text }">
-            {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
-          </div>
           <div slot="operation" slot-scope="{ text, record }">
             <a-button type="link" @click="watchMessage({ text, record })"
               >详情</a-button
@@ -199,40 +174,40 @@
   <script>
 import StandardTable from "@/components/table/StandardTable";
 // import mixin from "../../minins/mixin";
-import tree from "@/components/tree/tree";
+import tree from "@/components/tree/userTree";
 import moment from "moment";
 
 const columns = [
   {
     title: "姓名",
-    dataIndex: "licenseno",
+    dataIndex: "userName",
   },
 
   {
     title: "工号",
-    dataIndex: "frameno",
+    dataIndex: "userId",
     // scopedSlots: { customRender: "parterCompanyName" },
   },
 
   {
     title: "签单保费",
-    dataIndex: "orderNumber",
+    dataIndex: "sumPremium",
   },
   {
     title: "交强险保费",
-    dataIndex: "closeRate",
+    dataIndex: "jqpremium",
   },
   {
     title: "车船税",
-    dataIndex: "namesimple",
+    dataIndex: "taxamount",
   },
   {
     title: "商业险保费",
-    dataIndex: "namesimple",
+    dataIndex: "sypremium",
   },
   {
     title: "非车险保费",
-    dataIndex: "namesimple",
+    dataIndex: "jypremium",
   },
   {
     title: "操作",
@@ -252,13 +227,11 @@ export default {
       formState: {
         dateType: undefined,
         time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        beginDate: moment().format("YYYY-MM-DD"),
-        endDate: moment().format("YYYY-MM-DD"),
-        licenseno: "",
+        createtimeStart: moment().format("YYYY-MM-DD"),
+        createtimeEnd: moment().format("YYYY-MM-DD"),
         userName: "",
-        mobile: "",
-        frameno: "",
         userId: "",
+        treeUserId: "",
       },
       backLinePersonnel: {},
       columns: columns,
@@ -285,7 +258,7 @@ export default {
         { title: "Expand to load", key: "1" },
         { title: "Tree Node", key: "2", isLeaf: true },
       ],
-      BigOrder: {},
+      amount: {},
     };
   },
   mounted() {
@@ -294,64 +267,67 @@ export default {
     // }, 1000);
   },
   methods: {
+    chooseUser(val) {
+      this.formState.treeUserId = val;
+      this.getVerification();
+    },
     getList() {
       this.pagination.current = 1;
       this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
     onChangeTime(val) {
-      // console.log(val);
-      this.formState.beginDate = val[0];
-      this.formState.endDate = val[1];
+      this.formState.createtimeStart = val[0];
+      this.formState.createtimeEnd = val[1];
       this.formState.dateType = undefined;
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
-    handleFinish() {
+    watchMessage(item) {
       //
-    },
-    wholeHandleChange() {
-      this.getProvinceList(this.formState.whole);
-    },
-    provinceHandleChange() {
-      this.getCityList(this.formState.provinceId);
-    },
-    cityHandleChange() {
-      this.getAreaList(this.formState.cityId);
-    },
-    countyHandleChange() {
-      this.getStoreList(this.formState.countyId);
+      item;
+      this.$router.push({
+        path: "/business/agent/message",
+        query: {
+          user: { ...item },
+          time: {
+            createtimeStart: this.formState.createtimeStart,
+            createtimeEnd: this.formState.createtimeEnd,
+          },
+        },
+      });
     },
 
     async getVerification() {
       this.loading = true;
 
-      this.$API.quote
-        .getBigOrderList({
+      this.$API.business
+        .getBusinessAgentList({
           pageNum: this.pagination.current,
           pageSize: this.pagination.defaultPageSize,
           ...this.formState,
+          managementSource: 3,
         })
         .then((res) => {
           if (res.data.code === 200) {
             this.loading = false;
-            this.tableList = res.data.data.content;
+            this.tableList = res.data.data.records;
             this.pagination = {
-              current: res.data.data.pageNum,
-              defaultPageSize: res.data.data.pageSize,
-              total: res.data.data.totalSize,
+              current: res.data.data.current,
+              defaultPageSize: res.data.data.size,
+              total: res.data.data.total,
             };
           }
         });
-      this.$API.quote
-        .getBigOrderMount({
-          // pageNum: this.pagination.current,
-          // pageSize: this.pagination.defaultPageSize,
+      this.$API.business
+        .getBusinessAgentTotalList({
           ...this.formState,
+          managementSource: 3,
         })
         .then((res) => {
           if (res.data.code === 200) {
-            console.log(res);
-            this.BigOrder = { ...res.data.data };
+            this.amount = { ...res.data.data };
           }
         });
     },
@@ -359,9 +335,9 @@ export default {
       this.$message.info("您清空了勾选的所有行");
     },
 
-    onChange(pagination, filters, sorter, { currentDataSource }) {
+    onChange(pagination) {
       // this.$message.info('表格状态改变了')
-      console.log(pagination, filters, sorter, { currentDataSource });
+
       this.pagination = {
         current: pagination.current,
         defaultPageSize: pagination.pageSize,
@@ -476,6 +452,8 @@ export default {
     // background: #fff;
     .ant-form {
       display: flex;
+      padding-top: 10px;
+      box-sizing: border-box;
       > .ant-form-item {
         flex: none;
         /deep/.ant-form-item-control-wrapper {
@@ -493,7 +471,8 @@ export default {
     }
   }
   .table-title {
-    padding: 15px 15px 0;
+    padding: 15px;
+    border-bottom: 1px solid #eee;
     box-sizing: border-box;
     display: flex;
     align-items: center;
@@ -508,4 +487,12 @@ export default {
     }
   }
 }
+.ant-form {
+  display: flex;
+  padding-top: 10px;
+  box-sizing: border-box;
+}
+.ant-form-item {
+  display: flex;
+}
 </style>

+ 222 - 148
src/pages/sales/index.vue

@@ -1,22 +1,24 @@
 <template>
   <div class="quote">
-    <div class="quote-tree">
-      <div><h2>部门所属</h2></div>
+    <div class="quote-tree" style="border-radius: 8px">
+      <div><h2>组织树</h2></div>
       <div>
         <!-- <a-tree  :tree-data="treeData" /> -->
-        <tree @getList="getVerification"></tree>
+        <tree @getList="chooseUser"></tree>
       </div>
     </div>
     <div class="back-line-main">
-      <div class="back-line-header">
-        <div class="back-line-header-title">
-          <h2>财务应收</h2>
+      <!-- <div class="back-line-header"></div> -->
+      <div style="background-color: #fff">
+        <div class="table-title">
+          <h2>代理人</h2>
           <div>
             <span>时间筛选</span>
             <a-range-picker
               @change="onChangeTime"
               v-model="formState.time"
               value-format="YYYY-MM-DD"
+              style="margin-left: 10px"
             >
               <a-icon slot="suffixIcon" type="calendar" />
             </a-range-picker>
@@ -25,57 +27,92 @@
               button-style="solid"
               v-model="formState.dateType"
               @change="getVerification()"
+              style="margin-left: 10px"
             >
               <a-radio-button
                 value="1"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
-                近1月
+                当天
               </a-radio-button>
               <a-radio-button
                 value="2"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
-                近3月
+                近7天
               </a-radio-button>
               <a-radio-button
                 value="3"
                 @click="
                   (formState.time = []),
-                    (formState.beginDate = ''),
-                    (formState.endDate = '')
+                    (formState.createtimeStart = ''),
+                    (formState.createtimeEnd = '')
                 "
               >
-                近半年
+                近30天
               </a-radio-button>
             </a-radio-group>
           </div>
         </div>
+        <a-form
+          layout="inline"
+          :model="formState"
+          style="padding: 15px; box-sizing: border-box"
+        >
+          <a-form-item label="姓名" :colon="false">
+            <a-input
+              placeholder="请输入姓名"
+              v-model="formState.userName"
+              allowClear
+              style="width: 200px"
+            ></a-input>
+          </a-form-item>
+          <a-form-item label="工号" :colon="false">
+            <a-input
+              placeholder="请输入工号"
+              v-model="formState.userId"
+              style="width: 200px"
+              allowClear
+            ></a-input>
+          </a-form-item>
+          <a-form-item
+            style="
+              flex: 1;
+              display: flex;
+              justify-content: flex-end;
+              padding-right: 15px;
+              box-sizing: border-box;
+              align-items: flex-end;
+            "
+          >
+            <a-button type="primary" @click="getList">查询</a-button>
+          </a-form-item>
+        </a-form>
+
+        <standard-table
+          bordered
+          :columns="columns"
+          :dataSource="tableList"
+          :pagination="pagination"
+          @clear="onClear"
+          @change="onChange"
+          :loading="loading"
+        >
+          <div slot="operation" slot-scope="{ text, record }">
+            <a-button type="link" @click="watchMessage({ text, record })"
+              >详情</a-button
+            >
+          </div>
+        </standard-table>
       </div>
-      <standard-table
-        bordered
-        :columns="columns"
-        :dataSource="tableList"
-        :pagination="pagination"
-        @clear="onClear"
-        @change="onChange"
-        :loading="loading"
-      >
-        <div slot="count" slot-scope="{ text }">
-          {{ text != "-" ? text + "次" : text }}
-        </div>
-        <div slot="rate" slot-scope="{ text }">
-          {{ text != "-" ? (text * 100).toFixed(2) + "%" : text }}
-        </div>
-      </standard-table>
     </div>
   </div>
 </template>
@@ -88,76 +125,40 @@ import moment from "moment";
 
 const columns = [
   {
-    title: "保险公司",
-    dataIndex: "companyName",
+    title: "姓名",
+    dataIndex: "userName",
   },
 
   {
-    title: "合作公司",
-    dataIndex: "parterCompanyName",
+    title: "工号",
+    dataIndex: "userId",
     // scopedSlots: { customRender: "parterCompanyName" },
   },
-  {
-    title: "报价数",
-
-    // scopedSlots: { customRender: "qutationCount" },
-    children: [
-      {
-        title: "总报价",
-        dataIndex: "allNumber",
-        scopedSlots: { customRender: "count" },
-      },
-      {
-        title: "报价成功",
-        dataIndex: "orderSuccessNumber",
-        scopedSlots: { customRender: "count" },
-      },
-      {
-        title: "报价失败",
-        dataIndex: "areaCompanyErrNumber",
-        scopedSlots: { customRender: "count" },
-      },
-    ],
-  },
 
   {
-    title: "人工审核数",
-    dataIndex: "numberManual",
-    scopedSlots: { customRender: "count" },
+    title: "签单保费",
+    dataIndex: "sumPremium",
   },
   {
-    title: "核保数",
-    dataIndex: "underwritingCount",
-    scopedSlots: { customRender: "count" },
+    title: "交强险保费",
+    dataIndex: "jqpremium",
   },
   {
-    title: "承保数",
-    dataIndex: "qutationInsureCount",
-    scopedSlots: { customRender: "count" },
+    title: "车船税",
+    dataIndex: "taxamount",
   },
   {
-    title: "报价成功率",
-    dataIndex: "orderSuccessNumberRate",
-    scopedSlots: { customRender: "rate" },
+    title: "商业险保费",
+    dataIndex: "sypremium",
   },
   {
-    title: "核保通过率",
-    dataIndex: "passRate",
-    scopedSlots: { customRender: "rate" },
+    title: "非车险保费",
+    dataIndex: "jypremium",
   },
   {
-    title: "成交率",
-    dataIndex: "closeRate",
-    scopedSlots: { customRender: "rate" },
-
-    // scopedSlots: { customRender: "qutationCount" },
-  },
-  {
-    title: "承保率",
-    dataIndex: "contributionRate",
-    scopedSlots: { customRender: "rate" },
-
-    // scopedSlots: { customRender: "qutationCount" },
+    title: "操作",
+    dataIndex: "operation",
+    scopedSlots: { customRender: "operation" },
   },
 ];
 
@@ -170,15 +171,13 @@ export default {
   data() {
     return {
       formState: {
-        whole: "",
-        cityId: "",
-        countyId: "",
-        houseId: "",
-        provinceId: "",
-        dateType: "",
+        dateType: undefined,
         time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
-        beginDate: moment().format("YYYY-MM-DD"),
-        endDate: moment().format("YYYY-MM-DD"),
+        createtimeStart: moment().format("YYYY-MM-DD"),
+        createtimeEnd: moment().format("YYYY-MM-DD"),
+        userName: "",
+        userId: "",
+        treeUserId: "",
       },
       backLinePersonnel: {},
       columns: columns,
@@ -205,6 +204,7 @@ export default {
         { title: "Expand to load", key: "1" },
         { title: "Tree Node", key: "2", isLeaf: true },
       ],
+      amount: {},
     };
   },
   mounted() {
@@ -213,79 +213,77 @@ export default {
     // }, 1000);
   },
   methods: {
-    onLoadData(treeNode) {
-      return new Promise((resolve) => {
-        if (treeNode.dataRef.children) {
-          resolve();
-          return;
-        }
-        setTimeout(() => {
-          treeNode.dataRef.children = [
-            { title: "Child Node", key: `${treeNode.eventKey}-0` },
-            { title: "Child Node", key: `${treeNode.eventKey}-1` },
-          ];
-          this.treeData = [...this.treeData];
-          resolve();
-        }, 1000);
-      });
+    chooseUser(val) {
+      this.formState.treeUserId = val;
+      this.getVerification();
+    },
+    getList() {
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
+      this.getVerification();
     },
     onChangeTime(val) {
-      // console.log(val);
-      this.formState.beginDate = val[0];
-      this.formState.endDate = val[1];
+      this.formState.createtimeStart = val[0];
+      this.formState.createtimeEnd = val[1];
       this.formState.dateType = undefined;
+      this.pagination.current = 1;
+      this.pagination.defaultPageSize = 10;
       this.getVerification();
     },
-    handleFinish() {
+    watchMessage(item) {
       //
-    },
-    wholeHandleChange() {
-      this.getProvinceList(this.formState.whole);
-    },
-    provinceHandleChange() {
-      this.getCityList(this.formState.provinceId);
-    },
-    cityHandleChange() {
-      this.getAreaList(this.formState.cityId);
-    },
-    countyHandleChange() {
-      this.getStoreList(this.formState.countyId);
+      item;
+      this.$router.push({
+        path: "/business/agent/message",
+        query: {
+          user: { ...item },
+          time: {
+            createtimeStart: this.formState.createtimeStart,
+            createtimeEnd: this.formState.createtimeEnd,
+          },
+        },
+      });
     },
 
-    getVerification() {
+    async getVerification() {
       this.loading = true;
 
-      this.$API.quote
-        .getQuoteList({
+      this.$API.business
+        .getBusinessAgentList({
           pageNum: this.pagination.current,
           pageSize: this.pagination.defaultPageSize,
-          dateType: this.formState.dateType,
-          beginDate: this.formState.beginDate,
-          endDate: this.formState.endDate,
-          // provinceId: this.formState.provinceId,
-          // cityId: this.formState.cityId,
-          // countyId: this.formState.countyId,
-          // houseId: this.formState.houseId,
+          ...this.formState,
+          managementSource: 2,
         })
         .then((res) => {
           if (res.data.code === 200) {
             this.loading = false;
-            this.tableList = res.data.data.content;
+            this.tableList = res.data.data.records;
             this.pagination = {
-              current: res.data.data.pageNum,
-              defaultPageSize: res.data.data.pageSize,
-              total: res.data.data.totalSize,
+              current: res.data.data.current,
+              defaultPageSize: res.data.data.size,
+              total: res.data.data.total,
             };
           }
         });
+      this.$API.business
+        .getBusinessAgentTotalList({
+          ...this.formState,
+          managementSource: 2,
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.amount = { ...res.data.data };
+          }
+        });
     },
     onClear() {
       this.$message.info("您清空了勾选的所有行");
     },
 
-    onChange(pagination, filters, sorter, { currentDataSource }) {
+    onChange(pagination) {
       // this.$message.info('表格状态改变了')
-      console.log(pagination, filters, sorter, { currentDataSource });
+
       this.pagination = {
         current: pagination.current,
         defaultPageSize: pagination.pageSize,
@@ -318,15 +316,15 @@ export default {
   display: flex;
   flex-direction: column;
   .back-line-header {
-    padding: 15px;
+    // padding: 15px;
     box-sizing: border-box;
     .back-line-header-title {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      padding-bottom: 15px;
-      border-bottom: 1px solid #f0f0f0;
+      padding: 15px;
       box-sizing: border-box;
+      background: #ffffff;
+      box-shadow: 0px 2px 8px 0px rgba(141, 149, 176, 0.15);
+      border-radius: 8px 8px 8px 8px;
+      border: 2px solid rgba(255, 255, 255, 0.2);
       h2 {
         margin: 0;
       }
@@ -334,7 +332,57 @@ export default {
         flex: 1;
         display: flex;
         align-items: center;
-        justify-content: flex-end;
+        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;
+          }
+        }
+        > dl:first-child {
+          background: url("../../assets/img/business1.png");
+          color: #11a6d3;
+        }
+        > 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;
+        }
       }
       span {
         display: block;
@@ -347,11 +395,13 @@ export default {
   }
   > div {
     // height: 152px;
-    background: #fff;
+    // background: #fff;
     .ant-form {
       display: flex;
+      padding-top: 10px;
+      box-sizing: border-box;
       > .ant-form-item {
-        flex: 1;
+        flex: none;
         /deep/.ant-form-item-control-wrapper {
           width: 100%;
         }
@@ -366,5 +416,29 @@ export default {
       }
     }
   }
+  .table-title {
+    padding: 15px;
+    border-bottom: 1px solid #eee;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    h2 {
+      margin: 0;
+    }
+    > div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.ant-form {
+  display: flex;
+  padding-top: 10px;
+  box-sizing: border-box;
+}
+.ant-form-item {
+  display: flex;
 }
 </style>

+ 8 - 0
src/router/config.js

@@ -53,6 +53,14 @@ const router = new Router({
             },
           ]
         },
+        // {
+        //   path: '/agent',
+        //   name: '代理人',
+        //   component: PageView,
+        //   children: [
+
+        //   ]
+        // },
         {
           path: '/business/sales/message',
           name: '保费详情',

+ 24 - 1
src/services/business.js

@@ -8,10 +8,33 @@ export async function getBusinessList(data) {
 export async function getBusinessDetailList(data) {
     return request("/taskStatistics/getDistribution", METHOD.POST, data)
 }
+//获取业务数据代理人列表
+export async function getBusinessAgentList(data) {
+    return request("/taskStatistics/getBusinessAgentData", METHOD.POST, data)
+}
+//获取业务数据代理人总计
+export async function getBusinessAgentTotalList(data) {
+    return request("/taskStatistics/getBusinessAgentDataTotal", METHOD.POST, data)
+}
+//获取业务数据代理人总计
+export async function getBusinessAgentTotalDetails(data) {
+    return request("/taskStatistics/getBusinessAgentDataDetails", METHOD.POST, data)
+}
+
+//获取人员树
+export async function getUserTree(data) {
+    return request("/user/findTree", METHOD.GET, data)
+}
+
+
 
 
 
 export default {
     getBusinessList,
-    getBusinessDetailList
+    getBusinessDetailList,
+    getBusinessAgentList,
+    getBusinessAgentTotalList,
+    getUserTree,
+    getBusinessAgentTotalDetails
 }