Your Name 1 year ago
parent
commit
1a5a20aa8f
2 changed files with 19 additions and 14 deletions
  1. 2 2
      src/api/develop.js
  2. 17 12
      src/pages/reader/develop.vue

+ 2 - 2
src/api/develop.js

@@ -64,8 +64,8 @@ export function getSaleUser(params) {
   return service({
     url:
       process.env.NODE_ENV == "production"
-        ? "http://reader-api.efunbox.cn/cms" + "/sale/user"
-        : "http://resources.ai160.com/cms" + "/sale/user",
+        ? "https://reader-api.ai160.com/cms" + "/sale/user"
+        : "https://reader-api.ai160.com/cms" + "/sale/user",
     method: "get",
     params
   });

+ 17 - 12
src/pages/reader/develop.vue

@@ -22,14 +22,16 @@
             </el-form-item>
           </el-form>
         </el-tab-pane>
-        <el-tab-pane label="分销发展报告" name="second">
+        <el-tab-pane label="推荐官发展报告" name="second">
           <el-form :model="skillParams" ref="skillParams2" class="clearfix topForm" style="float: left">
             <div class="leftForm-skill">
-              <el-form-item class="pruductForm-skill" prop="saleUserId" label="渠道选择"
-                :rules="[{ required: true, message: '请选择分销', trigger: 'blur' }]">
-                <el-select v-model="skillParams.saleUserId" placeholder="请选择分销" style="width:160px">
+              <el-form-item class="pruductForm-skill" prop="saleUserId" label="推荐官选择"
+                :rules="[{ required: true, message: '请选择推荐官', trigger: 'blur' }]">
+                <!--     <el-select v-model="skillParams.saleUserId" placeholder="请选择推荐官" style="width:160px">
                   <el-option v-for="item in options2" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                </el-select>
+                </el-select> -->
+                <el-cascader :options="options2" v-model="skillParams.saleUserId" :props="{ checkStrictly: true ,}"
+                  clearable></el-cascader>
               </el-form-item>
               <el-form-item class=" dateForm-skill" name="data" label="查询日期" style="display:flex">
                 <el-date-picker style="width:140px" v-model="skillParams.startDay" type="date"
@@ -52,9 +54,9 @@
             <span>{{scope.row.day?changeDate(scope.row.day):'总计'}}</span>
           </template>
         </el-table-column>
-        <el-table-column label="渠道" fixed align="left" header-align="center" min-width="140px">
+        <el-table-column label="渠道" fixed align="left" header-align="center" min-width="220px">
           <template slot-scope="scope">
-            <span>{{scope.row.channelName||''}}</span>
+            <span>{{scope.row.oneChannelName}}-{{scope.row.twoChannelName}}-{{scope.row.channelName||''}}</span>
           </template>
         </el-table-column>
         <el-table-column label="用户数量" header-align="center">
@@ -170,10 +172,9 @@ export default {
     this.skillParams.startDay = this.getYesterDay();
     this.skillParams.endDay = this.getYesterDay();
     let res = await getCascaderChannel()
-    let se = this.filterEmptyChildren(res.data)
-    this.options = se
+    this.options = this.filterEmptyChildren(res.data)
     let res2 = await getSaleUser()
-    this.options2 = res2.data
+    this.options2 = this.filterEmptyChildren(res2.data)
   },
   methods: {
     handleClick() {
@@ -221,14 +222,18 @@ export default {
         this.$refs['skillParams2'].validate(async valid => {
           if (valid) {
             let res = await getChannelData2(Object.assign({
-              saleUserId: this.skillParams.saleUserId,
+              oneLevelCode: this.skillParams.saleUserId[0],
+              twoLevelCode: this.skillParams.saleUserId[1] ? this.skillParams.saleUserId[1] : '',
+              threeLevelCode: this.skillParams.saleUserId[2] ? this.skillParams.saleUserId[2] : '',
               startDay: this.skillParams.startDay, endDay: this.skillParams.endDay
             }, this.pagination))
             this.tableData = res.data.list
             this.pagination.totalSize = res.data.totalSize
             this.pagination.pageNo = res.data.pageNo
             let totalData = await getTotalData2({
-              saleUserId: this.skillParams.saleUserId,
+              oneLevelCode: this.skillParams.saleUserId[0],
+              twoLevelCode: this.skillParams.saleUserId[1] ? this.skillParams.saleUserId[1] : '',
+              threeLevelCode: this.skillParams.saleUserId[2] ? this.skillParams.saleUserId[2] : '',
               startDay: this.skillParams.startDay, endDay: this.skillParams.endDay
             })
             this.totalData = totalData.data