浏览代码

团练包分润完成

1
mo 3 年之前
父节点
当前提交
26a65609a1

+ 1 - 3
src/components/remote-search/index.vue

@@ -60,7 +60,7 @@ export default {
     // this.getList();
     //  (this.value)
     this.getOptions(this.value || "");
-    console.log(this.value)
+
   },
   methods: {
     async getList() {
@@ -78,8 +78,6 @@ export default {
       } else {
 
         this.list = this.selects[this.enumer[commit]];
-
-        console.log(this.selects,this.selects[this.enumer[commit]],this.enumer[commit])
       }
       const data = {};
       for (const item of this.list) {

+ 3 - 3
src/store/modules/selects.js

@@ -88,9 +88,9 @@ export default {
       state.tenantUsers = tenantUsers.map(tenantUser=>{
         return {
           ...tenantUser,
-          userId: tenantUser.userId,
-          userName: tenantUser.name,
-          realName: tenantUser.name
+          userId: tenantUser.id,
+          userName: tenantUser.realName,
+          realName: tenantUser.realName
         }
       })
     }

+ 62 - 22
src/views/agentManager/memberShareList.vue

@@ -6,6 +6,29 @@
       团练宝分润
     </h2>
     <div class="m-core">
+      <el-card header="" style="width:460px" class="myCard">
+        <statistic class="statistic" :cols="0">
+          <statistic-item>
+            <span>
+              意向机构
+            </span>
+            <span> <count-to :endVal="detail.tenantAgency" :decimals="2" /></span>
+          </statistic-item>
+             <statistic-item>
+            <span>
+              入驻机构
+
+            </span>
+            <span> <count-to :endVal="detail.preTenant" :decimals="2" /></span>
+          </statistic-item>
+             <statistic-item>
+            <span>
+              团练包销售数(个月)
+            </span>
+            <span> <count-to :endVal="detail.memberCount" :decimals="2" /></span>
+          </statistic-item>
+        </statistic>
+      </el-card>
       <save-form
         :inline="true"
         :model="searchForm"
@@ -39,7 +62,7 @@
         </el-form-item>
         <el-form-item>
           <el-date-picker
-          :clearable="false"
+            :clearable="false"
             v-model.trim="searchForm.timer"
             style="width: 420px"
             type="daterange"
@@ -84,12 +107,8 @@
             prop="tenantName"
             label="机构名称"
           ></el-table-column>
-          <el-table-column
-            align="center"
-            prop="activeDate"
-            label="激活时间"
-          >
-           <template slot-scope="scope">
+          <el-table-column align="center" prop="activeDate" label="激活时间">
+            <template slot-scope="scope">
               {{ scope.row.activeDate | formatTimer }}
             </template>
           </el-table-column>
@@ -123,16 +142,21 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import { getTimes } from "@/utils";
 import load from "@/utils/loading";
-import { getProxyUserList,getProxyDividend } from "./api";
+import { getProxyUserList, getProxyDividend } from "./api";
+import countTo from 'vue-count-to'
 export default {
-  components: { pagination },
+  components: { pagination ,   'count-to': countTo},
   data() {
     return {
       searchForm: {
         search: null,
         timer: [],
       },
-
+      detail:{
+        memberCount:0,
+          preTenant:0,
+          tenantAgency:0
+      },
       tableList: [],
       organList: [],
       rules: {
@@ -150,15 +174,15 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 获取分部
-     this.searchForm.timer = this.getInitDate()
+    this.searchForm.timer = this.getInitDate();
     this.init();
   },
   methods: {
     init() {
       this.getProxList();
-      this.getList()
+      this.getList();
     },
-   async getProxList() {
+    async getProxList() {
       try {
         const res = await getProxyUserList({
           page: 1,
@@ -168,7 +192,7 @@ export default {
         this.proxyList = res.data.rows;
       } catch (e) {}
     },
-   async getList() {
+    async getList() {
       let { timer, ...rest } = this.searchForm;
       let params = {
         ...rest,
@@ -176,20 +200,30 @@ export default {
         rows: this.rules.limit,
         ...getTimes(timer, ["startData", "endData"]),
       };
-      try{
-      const res = await getProxyDividend({...params})
-      this.tableList = res.data.rows;
-      this.rules.total = res.data.total;
-      }catch(e){
-        console.log(e)
+      try {
+        const res = await getProxyDividend({ ...params });
+        this.tableList = res.data.pageData.rows;
+        this.rules.total = res.data.pageData.total;
+        this.detail = {
+          memberCount:res.data.memberCount,
+          preTenant:res.data.preTenant,
+          tenantAgency:res.data.tenantAgency
+        }
+      } catch (e) {
+        console.log(e);
       }
     },
     search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet() {},
-       getInitDate() {
+    onReSet() {
+      this.$nextTick(()=>{
+         this.searchForm.timer = this.getInitDate();
+         this.search()
+      })
+    },
+    getInitDate() {
       const end = this.$helpers.dayjs(new Date()).format("YYYY-MM-DD");
       const start = this.$helpers
         .dayjs(new Date())
@@ -201,4 +235,10 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
+.myCard {
+  margin-bottom: 20px;
+ /deep/.el-card__body {
+    padding: 0 20px!important;
+  }
+}
 </style>

+ 11 - 2
src/views/organManager/components/organInfo.vue

@@ -403,6 +403,14 @@
           placeholder="请输入机构客服电话"
         ></el-input>
       </el-form-item>
+      <el-form-item label="推荐人" prop="recommender">
+        <remote-search
+          :disabled="isDisabled"
+          :commit="'setTenantUser'"
+          aria-placeholder="请选择推荐人"
+          v-model="form.recommender"
+        />
+      </el-form-item>
     </el-form>
   </div>
 </template>
@@ -465,6 +473,7 @@ export default {
         themeColor: "#00A79D",
         corporateChops: null,
         corporateFinanceChops: null,
+        recommender:null,
       },
       originPhone: null, // 是否已存在手机号
       errorPhone: null, // 手机号存在错误信息
@@ -520,8 +529,8 @@ export default {
     }
 
     this.$refs.form.clearValidate();
-    console.log(this.data,'data')
-    if (this.data.id&& this.$route.query.type == "create") { 
+    console.log(this.data, "data");
+    if (this.data.id && this.$route.query.type == "create") {
       this.checkPhone();
       //  验证表单 看看是否有异常
       this.onSubmit();