Browse Source

2022-9-20

codeMan 3 years ago
parent
commit
446fb65e10

+ 2 - 12
src/HManagement/clueManage/clue_public/index.vue

@@ -2,10 +2,9 @@
   <div>
     <div class="container normal-panel normal-margin flex">
       <distribution v-if="tool.checkAuth($route.name,'distribution')" @onSuccess="onSuccess"></distribution>
-      <exportBtn :params="params" :exportData="exportData" v-if="tool.checkAuth($route.name,'export')"></exportBtn>
+      <exportBtn :params="params" v-if="tool.checkAuth($route.name,'export')"></exportBtn>
     </div>
-    
-    <list ref="list" @seleteParams="seleteParams" @exportDataUpdata="exportDataUpdata">
+    <list ref="list">
       <template v-slot:detail="scope">
         <el-button class="inline-16" size="small" type="text" @click="$router.push({path:'/clueDetail',query:{id:scope.data.data.sat_orderclueid}})">详 情</el-button>
       </template>
@@ -35,7 +34,6 @@ import { log } from '@antv/g2plot/lib/utils'
 export default {
   data() {
     return {
-      exportData: '',
       params:''
     }
   },
@@ -50,14 +48,6 @@ export default {
   methods:{
     onSuccess () {
       this.$refs['list'].listData()
-    },
-    seleteParams(params) {
-      let temp = JSON.parse(JSON.stringify(params))
-      temp.content.isExport = true   
-      this.params = temp
-    },
-    exportDataUpdata(data) {
-      this.exportData = data
     }
   }
 }

+ 14 - 23
src/HManagement/clueManage/clue_public/modules/exportBtn.vue

@@ -2,7 +2,7 @@
   <div>
     <el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px" @click="submit">导 出</el-button>
     <el-dialog title="导出汇总" :visible.sync="dialogFormVisible" width="1200px">
-      <tableLayout :layout="tablecols" :data="exportData" :custom="true" :height="tableHieght">
+      <tableLayout :layout="tablecols" :data="exportData || []" :custom="true" :height="tableHieght">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname === 'status'">
             <span v-if="scope.column.data.status === '待分配'" style="color:#3874F6">{{scope.column.data.status}}</span>
@@ -34,38 +34,29 @@ export default {
   data() {
     return {
       dialogFormVisible:false,
+      exportData:'',
+      params:''
     };
   },
-  props:['exportData','params'],
+  props:[],
   computed:{
   },
   watch:{
   },
   methods: {
-    submit() {
+    async submit() {
+      this.params = JSON.parse(JSON.stringify(this.$parent.$refs.list.params))
+      this.params.content.pageNumber = 1
+      this.params.content.pageSize = 9999999
+      let res = await this.$api.requested(this.params)
+      this.exportData = res.data
       this.dialogFormVisible = true
     },
     async exportDataFun() {
-      let res
-      if(!this.params) {
-        res = await this.$api.requested({
-          "classname": "webmanage.saletool.orderclue.publicclue.PublicClue",
-          "method": "selectList",
-          "content": {
-              "isExport": true,
-              "pageNumber": 1,
-              "pageSize": 20,
-              "where": {
-                  "condition": "",
-                  "status": "",
-                  "startdate": "",
-                  "enddate": ""
-              }
-            }
-        })
-      } else {
-        res = await this.$api.requested(this.params)
-      }
+      if(this.exportData.length == 0) return
+      this.params.content.isExport = true
+      let res = await this.$api.requested(this.params)
+      this.params.content.isExport = false
       window.open(res.data[0].url,'_self')
     }
   },

+ 7 - 19
src/HManagement/clueManage/clue_public/modules/list.vue

@@ -48,7 +48,7 @@
         small
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
-        :current-page="currentPage"
+        :current-page="params.content.pageNumber"
         :page-size="params.content.pageSize"
         layout="total, prev, pager, next, jumper"
         :total="total">
@@ -84,7 +84,6 @@ export default {
       tablecols:[],
       list:[],
       total:0,
-      currentPage:0
     }
   },
   components:{TimeSelect},
@@ -94,25 +93,14 @@ export default {
     })
   },
   watch: {
-    params: {
-      handler(val) {
-        this.$emit('seleteParams',val)
-      },
-      deep:true
-    }
   },
   methods:{
-    async listData () {
+    async listData (callback) {
       const res = await this.$api.requested(this.params)
-      this.params.content.pageSize = 999999999
-      const res2 = await this.$api.requested(this.params)
-      this.params.content.pageSize = 20
       this.list = res.data
       this.total = res.total
-      this.currentPage = res.pageNumber
       console.log(this.list);
       
-      this.$emit('exportDataUpdata',res2.data)
       this.$store.dispatch('optiontypeselect','cluepublic')
     },
     handleSizeChange(val) {
@@ -128,20 +116,20 @@ export default {
     clearSelect() {
       this.params.content.where.startdate = ''
       this.params.content.where.enddate = ''
-      this.listData()
+      this.params.content.pageNumber = 1
+      this.listData('callback')
     },
     timeChange(data) {
-      
       this.params.content.where.startdate = data[0] + ' 01:00:00'
       this.params.content.where.enddate = data[1] + ' 23:59:59'
-      console.log(this.params.content.where);
-      this.listData()
+      this.params.content.pageNumber = 1
+      this.listData('callback')
     }
   },
   mounted (){
-    this.listData()
   },
   created () {
+    this.listData()
     //获取表结构
     this.tablecols = this.tool.tabelCol(this.$route.name)['cluePublicTable'].tablecols
   }

+ 12 - 5
src/HManagement/marketing/agent/modules/add_agent_btn.vue

@@ -10,7 +10,7 @@
         <el-form-item label="省市县" prop="result">
           <el-cascader
             :options="arealist"
-            :props="{ checkStrictly: true }"
+            :props="{ multiple: true }"
             clearable
             size="small"
             class="width-100"
@@ -59,17 +59,24 @@ export default {
   },
   methods: {
     createArea() {
+      
       this.$refs.ruleFrom.validate(async val => {
         if(val) {
+          let area = this.form.result.map(item => {
+            return {
+              "sa_agents_salescopeid":0,
+              "province":item[0],
+              "city":item[1] || '',
+              "county":item[2] || ''
+            }
+          })
           let res = await this.$api.requested({
             "classname": "webmanage.sale.agentscope.agentscope",
             "method": "insertormodify_areascope",
             "content": {
-                "sa_agents_salescopeid":0,
                 "sa_agentsid":this.$route.query.id,
-                "province":this.form.result[0],
-                "city":this.form.result[1] || '',
-                "county":this.form.result[2] || ''
+                "area": area
+                
             }
           })
           this.tool.showMessage(res,() => {

+ 4 - 1
src/HManagement/marketing/agent/modules/edit_agent.vue

@@ -101,7 +101,10 @@
           <!-- <Search /> -->
           <add-agent-btn :arealist="arealist" @areaAddSuccess="areaAddSuccess"></add-agent-btn>
         </div>
-        <tableLayout :layout="tablecols2" :data="agentAreaList" :custom="false" height="300px">
+        <tableLayout :layout="tablecols2" :data="agentAreaList" :custom="true" height="300px">
+          <template v-slot:customcol="scope">
+              <span>{{scope.column.data[scope.column.columnname] && scope.column.columnname != 'operation'?scope.column.data[scope.column.columnname]:'--'}}</span>
+          </template>
           <template v-slot:opreation="scope">
             <div class="handle">
               <delAgentArea :data="scope.data" type="text" @onAgentSuccess="onAgentSuccess" v-if="tool.checkAuth($route.name,'agent_area_delete')" />

+ 1 - 1
src/HManagement/roleManage/index.vue

@@ -9,7 +9,7 @@
           </div>
         </template>
         <template v-slot:edit="scope">
-          <el-button v-if="tool.checkAuth($route.name,'update')" type="text" size="small" @click="$router.push({path:'/roleEdit',query:{id:scope.data.roleid}})">编 辑</el-button>
+          <el-button v-if="tool.checkAuth($route.name,'update')" type="text" size="small" @click="$router.push({path:'/roleEdit',query:{id:scope.data.roleid,usertype:scope.data.usertype}})">编 辑</el-button>
         </template>   
       </list>
     </div>

+ 3 - 1
src/HManagement/roleManage/modules/auth_list.vue

@@ -131,7 +131,8 @@ export default {
               "systemname":"",
               "systemagentname":"",
               "systemmodulename":"",
-              "systemappname":""
+              "systemappname":"",
+              "usertype": ""
             }
         }
       },
@@ -153,6 +154,7 @@ export default {
         type:'error'
       })
       this.dialogTableVisible = true
+      this.param.content.where.usertype = this.$route.query.usertype
       this.query_all_auth()
     },
     handleClick(val) {

+ 1 - 1
src/HManagement/roleManage/modules/edit_role.vue

@@ -169,7 +169,7 @@ export default {
           "content": this.form
         }).then(res=>{
           this.tool.showMessage(res,()=>{
-            this.$router.replace({path:'/roleEdit',query:{id:res.data.roleid}})
+            this.$router.replace({path:'/roleEdit',query:{id:res.data.roleid,usertype:res.data.usertype}})
           })
         })
       })

+ 1 - 1
yos/index.html

@@ -1 +1 @@
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>美大营销管理平台</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.92d1213b.js"></script><link href="css/app.83be7ebe.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.25c4112b.js" nomodule></script><script defer="defer" src="js/app-legacy.611f618f.js" nomodule></script></head><body><noscript><strong>We're sorry but 美大营销管理平台 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link rel="icon" href="favicon.ico"><title>美大营销管理平台</title><script defer="defer" type="module" src="js/chunk-vendors.8e4fd6d5.js"></script><script defer="defer" type="module" src="js/app.2a130182.js"></script><link href="css/app.272a52a9.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.25c4112b.js" nomodule></script><script defer="defer" src="js/app-legacy.9656bec2.js" nomodule></script></head><body><noscript><strong>We're sorry but 美大营销管理平台 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>