Explorar el Código

销售漏斗、客户画像、项目画像、业务员画像、联系人画像、作业看板筛选已完成

qymljy hace 7 meses
padre
commit
db8c800712

+ 16 - 9
src/HDrpManagement/contactProfile/index.vue

@@ -26,7 +26,7 @@
 
         <div class="mt-10">
           <label class="search__label">{{$t('业务员')}}:</label>
-          <el-select v-model="people" class="inline-16" filterable :placeholder="$t('请选择业务员')" size="small"
+          <el-select v-model="people" class="inline-16" filterable :placeholder="$t('请选择业务员')" size="small" clearable
                      @change="peopleChange">
             <el-option
                 v-for="item in selectList.hr"
@@ -261,17 +261,19 @@ export default {
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":0
+          "isleave":0,
+          "depid":''
         }
       });
       this.selectList = res.data;
       this.selectList.dep = this.createMenu(res.data.dep);
     },
-    async personData(){
+    async personData(depid){
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":this.isleave
+          "isleave":this.isleave,
+          "depid":depid
         }
       })
       this.selectList.hr = res.data.hr
@@ -291,19 +293,24 @@ export default {
       this.$refs.list.param.content.where.isleave = this.isleave;
       this.people = ''
       this.$refs.list.param.content.dataid = this.$refs.list.param.content.type == 0 ? -1 : this.$refs.list.param.content.dataid
-      this.personData()
+      this.personData(this.$refs.list.param.content.dataid)
       this.$refs.list.listData()
     },
     depChange(val) {
       this.people = '';
       this.$refs.list.param.content.type = 1;
-      this.$refs.list.param.content.dataid = val[val.length - 1];
+      this.$refs.list.param.content.dataid = val[val.length - 1]?val[val.length - 1]:-1;
+      this.personData(val[val.length - 1]?val[val.length - 1]:-1)
       this.$refs.list.listData()
     },
     peopleChange() {
-      this.dep = '';
-      this.$refs.list.param.content.type = 0;
-      this.$refs.list.param.content.dataid = this.people;
+      if (this.people || this.dep[this.dep.length - 1]){
+        this.$refs.list.param.content.type = this.people? 0 : 1
+        this.$refs.list.param.content.dataid = this.people ? this.people : this.dep[this.dep.length - 1]
+      }else {
+        this.$refs.list.param.content.type = -1
+        this.$refs.list.param.content.dataid = ''
+      }
       this.$refs.list.listData()
     },
     handleSizeChange(val) {

+ 15 - 8
src/HDrpManagement/customerPortrait/index.vue

@@ -336,17 +336,19 @@ export default {
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":0
+          "isleave":0,
+          "depid":''
         }
       })
       this.selectList = res.data
       this.selectList.dep = this.createMenu(res.data.dep)
     },
-    async personData(){
+    async personData(depid){
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":this.form.isleave
+          "isleave":this.form.isleave,
+          "depid":depid
         }
       })
       this.selectList.hr = res.data.hr
@@ -356,7 +358,7 @@ export default {
       if (val == '状态'){
         this.form.people = ''
         this.$refs.list.param.content.dataid = this.$refs.list.param.content.type == 0 ? -1 : this.$refs.list.param.content.dataid
-        this.personData()
+        this.personData(this.$refs.list.param.content.dataid)
       }
       this.$refs.list.listData()
     },
@@ -374,13 +376,18 @@ export default {
     depChange(val){
       this.form.people = ''
       this.$refs.list.param.content.type = 1
-      this.$refs.list.param.content.dataid = val[val.length - 1]
+      this.$refs.list.param.content.dataid = val[val.length - 1]?val[val.length - 1]:-1
+      this.personData(val[val.length - 1]?val[val.length - 1]:-1)
       this.$refs.list.listData()
     },
     peopleChange(){
-      this.form.dep = ''
-      this.$refs.list.param.content.type = 0
-      this.$refs.list.param.content.dataid = this.form.people
+      if (this.form.people || this.form.dep[this.form.dep.length - 1]){
+        this.$refs.list.param.content.type = this.form.people? 0 : 1
+        this.$refs.list.param.content.dataid = this.form.people ? this.form.people : this.form.dep[this.form.dep.length - 1]
+      }else {
+        this.$refs.list.param.content.type = -1
+        this.$refs.list.param.content.dataid = ''
+      }
       this.$refs.list.listData()
     },
     handleSizeChange(val) {

+ 13 - 5
src/HDrpManagement/dataanalysis/index.vue

@@ -108,6 +108,7 @@ export default {
           "dataid":"", // 人员id或部门id
           "where":{
             "isleave":"1",
+            "depid":''
           }
         }
       },
@@ -213,12 +214,14 @@ export default {
     selectDep(val) {
       this.person = ''
       this.isDep = true
-      this.dataid = val[val.length -1]
+      this.dataid = val[val.length -1] ? val[val.length -1] : -1
       this.dataParam.content.type = 1
       this.dataParam.content.dataid = this.dataid
       this.tableParam.content.type = 1
       this.tableParam.content.dataid = this.dataid
+      this.depmentParam.content.depid = val[val.length -1] ? val[val.length -1] : -1
       this.$nextTick(()=>{
+        this.personData()
         this.$refs.assignment.queryList()
         this.$refs.sales.queryList()
         this.$refs.performance.queryList()
@@ -230,12 +233,17 @@ export default {
       /*this.$refs.selectPerson.clearCheckedNodes()*/
     },
     selectPerson(val){
-      this.depment = ''
-      this.dataid = val
+      if (val || this.depment[this.depment.length -1]){
+        this.dataParam.content.type = val ? 0 : 1
+        this.tableParam.content.type = val ? 0 : 1
+        this.dataid = val ? val : this.depment[this.depment.length -1]
+      }else {
+        this.dataParam.content.type = 0
+        this.tableParam.content.type = 0
+        this.dataid = -1
+      }
       this.isDep = false
-      this.dataParam.content.type = 0
       this.dataParam.content.dataid = this.dataid
-      this.tableParam.content.type = 0
       this.tableParam.content.dataid = this.dataid
       this.$nextTick(()=>{
         this.$refs.assignment.queryList()

+ 15 - 8
src/HDrpManagement/projectPortrait/index.vue

@@ -358,17 +358,19 @@ export default {
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":0
+          "isleave":0,
+          "depid":''
         }
       })
       this.selectList = res.data
       this.selectList.dep = this.createMenu(res.data.dep)
     },
-    async personData(){
+    async personData(depid){
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":this.form.isleave
+          "isleave":this.form.isleave,
+          "depid":depid
         }
       })
       this.selectList.hr = res.data.hr
@@ -389,20 +391,25 @@ export default {
       if (val == '状态'){
         this.form.people = ''
         this.$refs.list.param.content.dataid = this.$refs.list.param.content.type == 0?-1:this.$refs.list.param.content.dataid
-        this.personData()
+        this.personData(this.$refs.list.param.content.dataid)
       }
       this.$refs.list.listData()
     },
     depChange(val){
       this.form.people = ''
       this.$refs.list.param.content.type = 1
-      this.$refs.list.param.content.dataid = val[val.length - 1]
+      this.$refs.list.param.content.dataid = val[val.length - 1]?val[val.length - 1]:-1
+      this.personData(val[val.length - 1]?val[val.length - 1]:-1)
       this.$refs.list.listData()
     },
     peopleChange(){
-      this.form.dep = ''
-      this.$refs.list.param.content.type = 0
-      this.$refs.list.param.content.dataid = this.form.people
+      if (this.form.people || this.form.dep[this.form.dep.length - 1]){
+        this.$refs.list.param.content.type = this.form.people? 0 : 1
+        this.$refs.list.param.content.dataid = this.form.people ? this.form.people : this.form.dep[this.form.dep.length - 1]
+      }else {
+        this.$refs.list.param.content.type = -1
+        this.$refs.list.param.content.dataid = ''
+      }
       this.$refs.list.listData()
     },
     handleSizeChange(val) {

+ 15 - 8
src/HDrpManagement/salerPortrait/index.vue

@@ -249,17 +249,19 @@ export default {
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":0
+          "isleave":0,
+          "depid":''
         }
       })
       this.selectList = res.data
       this.selectList.dep = this.createMenu(res.data.dep)
     },
-    async personData(){
+    async personData(depid){
       let res = await this.$api.requested({
         "id": 20230620102004,
         "content": {
-          "isleave":this.isleave
+          "isleave":this.isleave,
+          "depid":depid
         }
       })
       this.selectList.hr = res.data.hr
@@ -279,19 +281,24 @@ export default {
       this.$refs.list.param.content.where.isleave = this.isleave
       this.people = ''
       this.$refs.list.param.content.dataid = this.$refs.list.param.content.type == 0 ? -1 :  this.$refs.list.param.content.dataid
-      this.personData()
+      this.personData(this.$refs.list.param.content.dataid)
       this.$refs.list.listData()
     },
     depChange(val){
       this.people = ''
       this.$refs.list.param.content.type = 1
-      this.$refs.list.param.content.dataid = val[val.length - 1]
+      this.$refs.list.param.content.dataid =  val[val.length - 1]?val[val.length - 1]:-1
+      this.personData(val[val.length - 1]?val[val.length - 1]:-1)
       this.$refs.list.listData()
     },
     peopleChange(){
-      this.dep = ''
-      this.$refs.list.param.content.type = 0
-      this.$refs.list.param.content.dataid = this.people
+      if (this.people || this.dep[this.dep.length - 1]){
+        this.$refs.list.param.content.type = this.people? 0 : 1
+        this.$refs.list.param.content.dataid = this.people ? this.people : this.dep[this.dep.length - 1]
+      }else {
+        this.$refs.list.param.content.type = -1
+        this.$refs.list.param.content.dataid = ''
+      }
       this.$refs.list.listData()
     },
     handleSizeChange(val) {

+ 16 - 5
src/views/mediaStatistics/modules/salesfunnel.vue

@@ -213,7 +213,8 @@ export default {
       depmentParam:{
         "id": 20230620102004,
         "content": {
-          "isleave":'1'
+          "isleave":'1',
+          "depid":''
         }
       },
       dataParam:{
@@ -284,6 +285,8 @@ export default {
       this.deplist = this.createMenu(res.data.dep)
       this.personnelList = res.data.hr
       this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+      this.depmentParam.content.depid = res.data.dep[0].departmentid
+      // this.personData()
       this.getProportion()
     },
     async getProportion () {
@@ -377,13 +380,21 @@ export default {
     selectDep(val) {
       this.person = ''
       this.dataParam.content.type = 1
-      this.dataParam.content.dataid = val[val.length -1]
+      this.dataParam.content.dataid = val[val.length -1] ? val[val.length -1] : -1
+      this.depmentParam.content.depid = val[val.length -1] ? val[val.length -1] : -1
+      this.personData()
       this.getProportionOfFileModel()
     },
     selectPerson(val){
-      this.depment = ''
-      this.dataParam.content.type = 0
-      this.dataParam.content.dataid = val
+      // this.depment = ''
+      if (val || this.depment[this.depment.length -1]){
+        this.dataParam.content.type = val ? 0 : 1
+        this.dataParam.content.dataid = val ? val : this.depment[this.depment.length -1]
+      }else {
+        this.dataParam.content.type = 0
+        this.dataParam.content.dataid = -1
+      }
+
       this.getProportionOfFileModel()
     },
     dataChange(val){

+ 17 - 9
src/views/salesData/index.vue

@@ -14,7 +14,7 @@
             </div>
             <div class="inline-16">
               <label  class="search__label" >{{$t('业务员')}}:</label>
-              <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small"  @change="selectPerson">
+              <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small"  @change="selectPerson" clearable>
                 <el-option
                     v-for="item in personnelList"
                     :key="item.index"
@@ -115,7 +115,8 @@ export default {
       depmentParam:{
         "id": 20230620102004,
         "content": {
-          "isleave":'1'
+          "isleave":'1',
+          "depid":''
         }
       },
       windowWidth: document.documentElement.clientWidth,  //实时屏幕宽度
@@ -427,15 +428,21 @@ export default {
       }else {
         this.person = ''
         this.dataid = ''
-        this.departmentid = val[val.length -1]
+        this.departmentid = val[val.length -1]?val[val.length -1]:-1
+        this.personData(this.departmentid)
         this.otherModel(this.departmentid,'1',this.isleave)
       }
     },
     selectPerson(val){
-      this.depment = ''
-      this.departmentid = ''
-      this.dataid = val
-      this.otherModel(val,'0',this.isleave)
+      let type = ''
+      if (val || this.depment[this.depment.length -1]){
+        type = val ? 0 : 1
+        this.dataid = val ? val : this.depment[this.depment.length -1]
+      }else {
+        type = 0
+        this.dataid = -1
+      }
+      this.otherModel(this.dataid,type,this.isleave)
     },
     leaveChange(){
       const type = this.depment?'1':'0'
@@ -445,11 +452,12 @@ export default {
       this.personData()
     },
     /*获取新的业务员列表*/
-    async personData(){
+    async personData(depid){
       let param = {
         id: 20230620102004,
         content: {
-          isleave:this.isleave
+          isleave:this.isleave,
+          depid:depid
         },
       }
       const res = await this.$api.requested(param)