liujq 2 years ago
parent
commit
902737c73f

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.743d7c2c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.b13b8cae.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a6b7baaa.1b4c4690.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a6b7baaa.25f50ad7.js


+ 4 - 1
src/api/user.js

@@ -22,9 +22,12 @@ export default {
   admuserauthlist: params => { // 认证列表
     return getRequestNoSort('/adm/user/auth/list', params, 'loading')
   },
-  admuserauthedit: params => { // 认证审核
+  admuserauthedit: params => { // 认证审核 
     return getRequestNoSort('/adm/user/auth/edit', params, 'loading')
   },
+  admdeptauthedit: params => { // 认证审核 渠道
+    return getRequestNoSort('/adm/dept/auth/edit', params, 'loading')
+  },
   admuseradmin: params => { // admin
     return getRequestNoSort('/adm/user/admin', params, 'loading')
   },

+ 1 - 1
src/views/plan/components/searchForm/Index.vue

@@ -29,8 +29,8 @@ export default {
       if (newForm.startEndTime) {
         newForm.start_at = newForm.startEndTime[0]
         newForm.end_at = newForm.startEndTime[1]
-        delete newForm.startEndTime
       }
+      delete newForm.startEndTime
       this.$emit('change', newForm)
     },
     toExportExcel () {

+ 26 - 5
src/views/report/components/searchForm/Index.vue

@@ -3,6 +3,7 @@
     <base-form slot="content" ref="ruleForm" :data="searchData">
       <div slot="footer">
         <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
+        <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出</el-button>
         <!-- <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加客户</el-button> -->
       </div>
     </base-form>
@@ -19,17 +20,18 @@ export default {
   data() {
     return {
       searchData: [
+        { label: '客户状态', key: 'report_state', type: 'select', options: this.$dictData.report_state},
+        { label: '报备进度', key: 'report_step', type: 'select', options: this.$dictData.report_step},
+        { label: '意向楼盘', key: 'estate_id', type: 'selectRemote',
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
+        },
+        { label: '时间', label2: '开始时间', label3: '结束时间', key: 'startEndTime', type: 'datePicker'},
         { label: '中介渠道', key: 'user_id', type: 'selectRemote',
           remoteParams: { skey: 'search', api: `user.admusersearch`, opKey: 'nickname', opVal: 'id' },
         },
         { label: '电话', key: 'phone' },
         { label: '姓名', key: 'name' },
         { label: '性别', key: 'sex', type: 'select', options: this.$dictData.sex},
-        { label: '客户状态', key: 'report_state', type: 'select', options: this.$dictData.report_state},
-        { label: '报备进度', key: 'report_step', type: 'select', options: this.$dictData.report_step},
-        { label: '意向楼盘', key: 'estate_id', type: 'selectRemote',
-          remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
-        },
         { label: '备注', key: 'remark' },
       ]
     }
@@ -42,7 +44,26 @@ export default {
     searchHandle() {
       const oldform = this.$refs.ruleForm.baseForm
       const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+      }
+      delete newForm.startEndTime
       this.$emit('change', newForm)
+    },
+    toExportExcel () {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+        delete newForm.startEndTime
+      } else {
+        this.$msgw('请选择导出的时间范围')
+        return
+      }
+      const token = window.sessionStorage.getItem('fp_token')
+      window.open(`https://api.fangpiaovip.com/adm/report/export?token=${encodeURIComponent(token)}&start_at=${newForm.start_at}&end_at=${newForm.end_at}&estate_id=${newForm.estate_id}&report_state=${newForm.report_state}&report_step=${newForm.report_step}`)
     }
   }
 }

+ 2 - 2
src/views/user/auth.vue

@@ -95,11 +95,11 @@ export default {
       if (obj) {
         const params = obj
         let apiStr = 'admuserauthedit'
-        if (obj.id) apiStr = 'admuserauthedit'
+        if (this.curObj.group_type == 1) apiStr = 'admdeptauthedit'
         this.$api.user[apiStr]({
           ...params
         }).then(data => {
-          this.$msgs(obj.id ? '修改成功' : '修改成功')
+          this.$msgs('操作成功')
           this.fetchData()
           this.isDtlShow = false
         })

+ 3 - 14
src/views/user/components/popup/AuthEdit.vue

@@ -53,20 +53,9 @@ export default {
       } else {
         params.auth_state = '1'
       }
-      if (params.group_type == 2) {
-        this.formData = [
-          { label: '处理', key: 'auth_state', rules: 1, type: 'select', class: 'c-2', options: [{val: '1', key: '通过'}, {val: '3', key: '拒绝'}] },
-          { label: '角色', key: 'group_type', rules: 1, class: 'c-2', type: 'select', options: this.$dictData.group_type, changeHandle: this.groupTypeChange },
-          { label: '渠道(非必填)', key: 'dept_id', type: 'selectRemote',
-            remoteParams: { skey: 'dept_name', api: `user.admdeptlist`, opKey: 'dept_name', opVal: 'id' },
-          }
-        ]
-      } else {
-        this.formData = [
-          { label: '处理', key: 'auth_state', rules: 1, type: 'select', class: 'c-2', options: [{val: '1', key: '通过'}, {val: '3', key: '拒绝'}] },
-          { label: '角色', key: 'group_type', rules: 1, class: 'c-2', type: 'select', options: this.$dictData.group_type, changeHandle: this.groupTypeChange },
-        ]
-      }
+      this.formData = [
+        { label: '处理', key: 'auth_state', rules: 1, type: 'select', class: 'c-2', options: [{val: '1', key: '通过'}, {val: '3', key: '拒绝'}] },
+      ]
       this.setDefaultValue(params)
     },
     groupTypeChange () {

+ 22 - 2
src/views/user/components/searchForm/Auth.vue

@@ -2,7 +2,7 @@
   <base-form slot="content" ref="ruleForm" :data="searchData">
     <div slot="footer">
       <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
-      <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
+      <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出</el-button>
     </div>
   </base-form>
 </template>
@@ -16,6 +16,8 @@ export default {
   data() {
     return {
       searchData: [
+        { label: '推荐人', key: 'referrer' },
+        { label: '时间', label2: '开始时间', label3: '结束时间', key: 'startEndTime', type: 'datePicker'},
         { label: '手机号', key: 'phone' },
         { label: '昵称', key: 'nickname' },
         { label: '角色', key: 'group_type', type: 'select', options: this.$dictData.group_type},
@@ -23,7 +25,6 @@ export default {
         // { label: '角色', key: 'role_id', type: 'selectRemote',
         //   remoteParams: { skey: 'name', api: `base.admroleslist`, opKey: 'name', opVal: 'id' },
         // },
-        { label: '推荐人', key: 'referrer' },
       ]
     }
   },
@@ -31,7 +32,26 @@ export default {
     searchHandle() {
       const oldform = this.$refs.ruleForm.baseForm
       const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+      }
+      delete newForm.startEndTime
       this.$emit('change', newForm)
+    },
+    toExportExcel () {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+        delete newForm.startEndTime
+      } else {
+        this.$msgw('请选择导出的时间范围')
+        return
+      }
+      const token = window.sessionStorage.getItem('fp_token')
+      window.open(`https://api.fangpiaovip.com/adm/user/auth/export?token=${encodeURIComponent(token)}&start_at=${newForm.start_at}&end_at=${newForm.end_at}&referrer=${newForm.referrer}`)
     }
   }
 }

Some files were not shown because too many files changed in this diff