Browse Source

Merge branch 'orangeUrgent' into allTestUrgent

qymljy 9 months ago
parent
commit
a4474ab3f7

+ 123 - 0
src/HDrpManagement/contactData/components/allRank.vue

@@ -0,0 +1,123 @@
+<template>
+  <div>
+    <el-button type="primary" size="small" @click="allClick">{{$t(btnTitle)}} ></el-button>
+    <el-drawer
+        :title="$t(allTitle)"
+        :visible.sync="drawerShow"
+        size="90%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onCLose"
+    >
+      <div class="drawer__panel" style="margin-bottom: 0!important;">
+        <depStatus class="inline-16 mt-10" ref="depStatusRef" @depData="queryList" @personData="queryList" @leaveData="queryList" :is-leave-show="false"></depStatus>
+        <el-date-picker
+            style="margin-right: 10px"
+            disabled
+            v-model="dateData"
+            size="small"
+            type="daterange"
+            :range-separator="$t('至')"
+            :start-placeholder="$t(`开始月份`)"
+            :end-placeholder="$t(`结束月份`)">
+        </el-date-picker>
+        <el-input style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+        </el-input>
+        <div class="mt-10 inline-15">
+          <exportFile :param="param" :columns="tablecols" :fileName="allTitle" :dataid="param.content.dataid"></exportFile>
+        </div>
+        <tableDetail :layout="tablecols" :data="list" :opwidth="200" :custom="true" height="calc(100vh - 210px)">
+          <template v-slot:customcol="scope">
+            <div v-if="scope.column.columnname === 'amount'">
+              {{tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥')}}
+            </div>
+            <div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
+          </template>
+        </tableDetail>
+        <div  class="container normal-panel" style="text-align:right">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="100"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import depStatus from './depStatus'
+import exportFile from '@/components/export_file/index'
+export default {
+  name: "allRank",
+  props:['btnTitle','allTitle','tablecols'],
+  components:{depStatus,exportFile},
+  data(){
+    return {
+      drawerShow:false,
+      list:[],
+      currentPage:0,
+      total:0,
+      param:{
+        "id": 2025072410065502,
+        "content": {
+          "type": 1,
+          "dataid": 54,
+          "dateType": "本年",
+          "where": {
+            "begdate": "",
+            "enddate": "",
+            "condition": "",
+            "isleave": ""
+          },
+          "pageSize": 100,
+          "pageNumber": 1
+        },
+      },
+      dateData:[]
+    }
+  },
+  methods:{
+    allClick(){
+      this.$emit('allClick')
+    },
+    queryList(id,type,isleave,state){
+      this.param.content.dataid = id
+      this.param.content.type = type
+      this.param.content.where.isleave = isleave
+      this.listData()
+    },
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    onCLose(){
+      this.param.content.where.condtion = ''
+      this.drawerShow = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 71 - 0
src/HDrpManagement/contactData/components/btnSelectInfo.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-button-group>
+      <el-button v-for="item in btnTitle" :key="item.index" :type="item === dataTypeNow ?'primary':''" size="small" @click="btnClick(item)">{{$t(item)}}</el-button>
+    </el-button-group>
+    <el-date-picker
+        style="margin-left: 10px"
+        v-model="dateData"
+        @change="onChange"
+        size="small"
+        format="yyyy-MM"
+        value-format="yyyy-MM"
+        type="monthrange"
+        :range-separator="$t('至')"
+        :start-placeholder="$t(`开始月份`)"
+        :end-placeholder="$t(`结束月份`)">
+    </el-date-picker>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "btnSelectInfo",
+  props:{
+    btnTitle: Array,
+    dateType:String
+  },
+  data(){
+    return {
+      dateData:[],
+      dataTypeNow:'本年'
+    }
+  },
+  methods:{
+    btnClick(data){
+      this.dataTypeNow = data
+      if (data == '本年'){
+        let year = new Date().getFullYear()
+        let begdate = year + '-01'
+        let enddate = year + '-12'
+        this.dateData = [begdate,enddate]
+      }else if (data == '本季'){
+        const now = new Date();
+        const quarterStartMonth = Math.floor(now.getMonth() / 3) * 3;
+        const quarterStartDate = new Date(now.getFullYear(), quarterStartMonth);
+        const quarterEndDate = new Date(now.getFullYear(), quarterStartMonth + 3);
+        this.dateData = [quarterStartDate,quarterEndDate]
+      }else if (data == '本月'){
+        const now = new Date();
+        const monthStartDate = new Date(now.getFullYear(), now.getMonth());
+        this.dateData = [monthStartDate,monthStartDate]
+      }
+      this.$emit('btnClick',data)
+    },
+    onChange(){
+      if (this.dateData){
+        this.dataTypeNow = ''
+      }
+      this.$emit('btnClick',this.dataTypeNow,this.dateData)
+    }
+  },
+  mounted() {
+    this.dataTypeNow = this.dateType
+    this.btnClick(this.dateType)
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 159 - 0
src/HDrpManagement/contactData/components/depStatus.vue

@@ -0,0 +1,159 @@
+<template>
+  <div>
+    <div class="inline-16">
+      <label  class="search__label" >{{$t('部门')}}:</label>
+      <el-cascader class="inline-16" placement="bottom" ref="selectdep" size="small" v-model="depment" :options="deplist" :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}"  @change="selectDep" clearable></el-cascader>
+    </div>
+    <div class="inline-16">
+      <label  class="search__label" >{{$t('业务员')}}:</label>
+      <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small" clearable @change="selectPerson">
+        <el-option
+            v-for="item in personnelList"
+            :key="item.index"
+            :label="$t(item.name)"
+            :value="item.userid">
+        </el-option>
+      </el-select>
+    </div>
+    <div class="mt-10 inline-16" v-if="isLeaveShow != false">
+      <p class="search__label">{{$t('状态')}}:</p>
+      <el-select v-model="isleave" clearable style="margin-right:10px" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" >
+        <el-option :label="$t('在职')" value="1"></el-option>
+        <el-option :label="$t('离职')" value="2"></el-option>
+      </el-select>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "depStatus",
+  props:['isLeaveShow'],
+  data(){
+    return {
+      depment:'',
+      person:'',
+      isleave:'1',
+      deplist:[],
+      personnelList:[],
+      depmentParam:{
+        "id": 20230620102004,
+        "content": {
+          "isleave":1
+        }
+      },
+    }
+  },
+  methods:{
+    /*部门人员列表*/
+    async departmentrtment() {
+      const res = await this.$api.requested(this.depmentParam)
+      this.deplist = this.createMenu(res.data.dep)
+      this.personnelList = res.data.hr
+      this.depment = ''
+      this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+      const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
+    },
+    /*部门结构处理*/
+    createMenu (array) {
+      var that = this
+      let arr = []
+      function convertToElementTree(node) {
+        // 新节点
+        if (node.subdep.length === 0){
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+          }
+        }else {
+          var elNode = {
+            label: node["depname"],
+            parentid:node['parentid'],
+            parentname:node['parentname'],
+            departmentid:node["departmentid"],
+            value:node["departmentid"],
+            remarks:node["remarks"],
+            isused:node["isused"],
+            changedate:node['changedate'],
+            changeby:node['changeby'],
+            createdate:node['createdate'],
+            createby:node['createby'],
+            depno:node['depno'],
+            disabled:that.pageOnlyRead,
+            children: []
+          }
+        }
+        if (node.subdep && node.subdep.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subdep.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.children.push(convertToElementTree(node.subdep[index]));
+          }
+        }
+        return elNode;
+      }
+      array.forEach((element) => {
+        arr.push(convertToElementTree(element))
+      });
+      return arr
+    },
+    /*选择部门*/
+    selectDep(val) {
+      console.log(val,'val2222')
+      if (val.length === 0){
+        const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
+        console.log(JSON.parse(sessionStorage.getItem('active_account')).userid)
+        this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+        this.$emit(`depData`,userid,'0')
+      }else {
+        this.person = ''
+        this.departmentid = val[val.length -1]
+        this.$emit(`depData`,this.departmentid,'1',this.isleave)
+      }
+    },
+    /*选择人员*/
+    selectPerson(val){
+      this.depment = ''
+      this.departmentid = ''
+      this.dataid = val
+      this.$emit(`personData`,val,'0',this.isleave)
+    },
+    /*选择在职状态*/
+    leaveChange(){
+      this.person = ''
+      const type = this.depment?'1':'0'
+      const dataid = type == 0?-1:this.departmentid
+      this.$emit(`leaveData`,dataid,type,this.isleave,'状态')
+      this.personData()
+    },
+    /*获取新的业务员列表*/
+    async personData(){
+      let param = {
+        id: 20230620102004,
+        content: {
+          isleave:this.isleave
+        },
+      }
+      const res = await this.$api.requested(param)
+      this.personnelList = res.data.hr
+    },
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 189 - 0
src/HDrpManagement/contactData/components/salesContribution.vue

@@ -0,0 +1,189 @@
+<template>
+  <div>
+    <dataTemPlate >
+      <template slot="content">
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane :label="$t(`联系人关联客户销售TOP10`)" name="关联客户">
+            <depStatus class="inline-16" ref="depStatusCusRef" @depData="listData" @personData="listData" @leaveData="listData"></depStatus>
+            <btnSelect ref="btnSelectCusRef" @btnClick="btnClick" class="inline-16"  :btnTitle="['本年','本季','本月']" dateType="本年"></btnSelect>
+            <allRank @allClick="allClick" ref="allRankCusRef" class="inline-16" btnTitle="全部排名" allTitle="联系人关联客户销售贡献度排行" :tablecols="tool.tabelCol(this.$route.name).associatedCustomers.tablecols"></allRank>
+            <tableDetail :layout="tablecols" :data="list" :opwidth="200" :custom="true" >
+              <template v-slot:customcol="scope">
+                <div v-if="scope.column.columnname === 'amount'">
+                  {{tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥')}}
+                </div>
+                <div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
+              </template>
+            </tableDetail>
+          </el-tab-pane>
+          <el-tab-pane :label="$t(`联系人关联项目销售TOP10`)" name="关联项目">
+            <depStatus @btnClick="handleClick" class="inline-16"  ref="depStatusProRef" @depData="listData" @personData="listData" @leaveData="listData"></depStatus>
+            <btnSelect ref="btnSelectProRef" @btnClick="btnClick" class="inline-16" :btnTitle="['本年','本季','本月']" dateType="本年"></btnSelect>
+            <allRank @allClick="allClick" ref="allRankProRef"  class="inline-16" btnTitle="全部排名" allTitle="联系人关联项目销售贡献度排行" :tablecols="tool.tabelCol(this.$route.name).associatedProject.tablecols"></allRank>
+            <tableDetail :layout="tablecols" :data="list" :opwidth="200" :custom="true">
+              <template v-slot:customcol="scope">
+                <div v-if="scope.column.columnname === 'amount'">
+                  {{tool.formatAmount(scope.column.data[scope.column.columnname],2,'¥')}}
+                </div>
+                <div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
+              </template>
+            </tableDetail>
+          </el-tab-pane>
+        </el-tabs>
+      </template>
+    </dataTemPlate>
+  </div>
+</template>
+
+<script>
+import dataTemPlate from '@/components/dataTemplate/index'
+import depStatus from './depStatus'
+import btnSelect from "./btnSelectInfo"
+import allRank from './allRank'
+export default {
+  name: "salesContribution",
+  components:{dataTemPlate,depStatus,btnSelect,allRank},
+  data(){
+    return {
+      activeName: '关联客户',
+      /*获取关联客户数据*/
+      paramCus:{
+        "id": 2025072410065502,
+        "content": {
+          "type": 1,
+          "dataid": 54,
+          "dateType": "本年",
+          "where": {
+            "begdate": "",
+            "enddate": "",
+            "condition": "",
+            "isleave": ""
+          },
+          "pageSize": 10,
+          "pageNumber": 1
+        },
+      },
+      /*获取关联项目数据*/
+      paramPro:{
+        "id": 2025072410070302,
+        "content": {
+          "type": 1,
+          "dataid": 54,
+          "dateType": "本年",
+          "where": {
+            "begdate": "",
+            "enddate": "",
+            "condition": "",
+            "isleave": ""
+          },
+          "pageSize": 10,
+          "pageNumber": 1
+        },
+      },
+      list:[],
+      tablecols:[],
+      currentPage:0,
+      total:0,
+      drawerShow:false,
+      allTitle:'关联客户'
+    }
+  },
+  methods:{
+    queryList(id,type,isleave,state){
+      if (this.activeName == '关联客户') {
+        this.paramCus.content.pageNumber = 1
+      }else if (this.activeName == '关联项目'){
+        this.paramPro.content.pageNumber = 1
+      }
+      this.listData(id,type,isleave,state)
+    },
+    async listData(id,type,isleave,state){
+      console.log(this.paramCus,'paramCus')
+      if (this.activeName == '关联客户') {
+        this.paramCus.content.pageNumber = 1
+        this.paramCus.content.pageSize = 10
+        this.paramCus.content.dataid = id
+        this.paramCus.content.type = type
+        this.paramCus.content.where.isleave = isleave
+      }else if (this.activeName == '关联项目'){
+        this.paramPro.content.pageNumber = 1
+        this.paramPro.content.pageSize = 10
+        this.paramPro.content.dataid = id
+        this.paramPro.content.type = type
+        this.paramPro.content.where.isleave = isleave
+      }
+      const res = await this.$api.requested(this.activeName == '关联客户'?this.paramCus:this.paramPro)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleClick(tab, event) {
+      if (this.activeName == '关联客户'){
+        this.tablecols = this.tool.tabelCol(this.$route.name).associatedCustomers.tablecols
+        this.listData(this.paramCus.content.dataid,this.paramCus.content.type,this.paramCus.content.where.isleave)
+      }else {
+        this.tablecols = this.tool.tabelCol(this.$route.name).associatedProject.tablecols
+        this.listData(this.paramPro.content.dataid,this.paramPro.content.type,this.paramPro.content.where.isleave)
+      }
+    },
+    btnClick(dateType,dateData){
+      if (this.activeName == '关联客户'){
+        if (dateType){
+          this.paramCus.content.dateType = dateType
+        }else {
+          this.paramCus.content.dateType = ''
+          this.paramCus.content.where.begdate = dateData[0]
+          this.paramCus.content.where.enddate = dateData[1]
+        }
+        this.listData(this.paramCus.content.dataid,this.paramCus.content.type,this.paramCus.content.where.isleave)
+      }else {
+        if (dateType){
+          this.paramPro.content.dateType = dateType
+        }else {
+          this.paramPro.content.dateType = ''
+          this.paramPro.content.where.begdate = dateData[0]
+          this.paramPro.content.where.enddate = dateData[1]
+        }
+        this.listData(this.paramPro.content.dataid,this.paramPro.content.type,this.paramPro.content.where.isleave)
+      }
+    },
+    allClick(){
+      if (this.activeName == '关联客户'){
+        this.$refs.allRankCusRef.drawerShow = true
+        this.$nextTick(()=>{
+          this.$refs.allRankCusRef.$refs.depStatusRef.deplist = this.$refs.depStatusCusRef.deplist
+          this.$refs.allRankCusRef.$refs.depStatusRef.personnelList = this.$refs.depStatusCusRef.personnelList
+          this.$refs.allRankCusRef.$refs.depStatusRef.depment = this.$refs.depStatusCusRef.depment
+          this.$refs.allRankCusRef.$refs.depStatusRef.person = this.$refs.depStatusCusRef.person
+          this.$refs.allRankCusRef.param = this.paramCus
+          this.$refs.allRankCusRef.param.content.pageSize = 100
+          this.$refs.allRankCusRef.dateData = this.$refs.btnSelectCusRef.dateData
+          this.$refs.allRankCusRef.listData()
+        })
+      }else {
+        this.$refs.allRankProRef.drawerShow = true
+        this.$nextTick(()=>{
+          this.$refs.allRankProRef.$refs.depStatusRef.deplist = this.$refs.depStatusProRef.deplist
+          this.$refs.allRankProRef.$refs.depStatusRef.personnelList = this.$refs.depStatusProRef.personnelList
+          this.$refs.allRankProRef.$refs.depStatusRef.depment = this.$refs.depStatusProRef.depment
+          this.$refs.allRankProRef.$refs.depStatusRef.person = this.$refs.depStatusProRef.person
+          this.$refs.allRankProRef.param = this.paramPro
+          this.$refs.allRankProRef.param.content.pageSize = 100
+          this.$refs.allRankProRef.dateData = this.$refs.btnSelectProRef.dateData
+          this.$refs.allRankProRef.listData()
+        })
+      }
+    },
+    onCLose(){
+      this.drawerShow = false
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).associatedCustomers.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 35 - 25
src/HDrpManagement/contactData/index.vue

@@ -7,30 +7,7 @@
       <template #content>
         <div style="overflow: auto;height: calc(100vh - 220px)" ref="rollRef" @scroll="handleScroll">
           <div style="display: flex;justify-content: space-between;margin: 10px 24px 20px 24px;">
-            <div>
-              <div class="inline-16">
-                <label  class="search__label" >{{$t('部门')}}:</label>
-                <el-cascader class="inline-16" placement="bottom" ref="selectdep" size="small" v-model="depment" :options="deplist" :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}"  @change="selectDep" clearable></el-cascader>
-              </div>
-              <div class="inline-16">
-                <label  class="search__label" >{{$t('业务员')}}:</label>
-                <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small" clearable @change="selectPerson">
-                  <el-option
-                      v-for="item in personnelList"
-                      :key="item.index"
-                      :label="$t(item.name)"
-                      :value="item.userid">
-                  </el-option>
-                </el-select>
-              </div>
-              <div class="mt-10 inline-16">
-                <p class="search__label">{{$t('状态')}}:</p>
-                <el-select v-model="isleave" clearable style="margin-right:10px" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" >
-                  <el-option :label="$t('在职')" value="1"></el-option>
-                  <el-option :label="$t('离职')" value="2"></el-option>
-                </el-select>
-              </div>
-            </div>
+            <depStatus ref="allDepRef" @depData="depData" @personData="depData" @leaveData="depData"></depStatus>
             <div>
               <btnSelect :btn-title="['全部','本年','本季','本月','上月','去年']" :date-type="dateType" @btnClick="btnClick"></btnSelect>
             </div>
@@ -183,6 +160,7 @@
               </div>
             </template>
           </dataDetail>
+          <salesContribution class="mt-10" ref="salesContributionRef"></salesContribution>
         </div>
       </template>
     </normal-layout>
@@ -194,9 +172,11 @@ import normalLayout from '@/components/normal-basic-layout/normalNew'
 import btnSelect from "@/components/btn_select/btnSelect";
 import dataBoard from '@/components/dataBoard/index'
 import dataDetail from '@/template/dataDetail/index'
+import salesContribution from './components/salesContribution'
+import depStatus from './components/depStatus'
 export default {
   name: "index",
-  components:{normalLayout,btnSelect,dataBoard,dataDetail},
+  components:{normalLayout,btnSelect,dataBoard,dataDetail,salesContribution,depStatus},
   data(){
     return {
       scrollData:'',
@@ -344,9 +324,25 @@ export default {
     async departmentrtment() {
       const res = await this.$api.requested(this.depmentParam)
       this.deplist = this.createMenu(res.data.dep)
+      this.$refs.allDepRef.deplist = this.deplist
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.deplist = this.deplist
+      this.$refs.salesContributionRef.$refs.depStatusProRef.deplist = this.deplist
+
       this.personnelList = res.data.hr
+      this.$refs.allDepRef.personnelList = this.personnelList
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.personnelList = this.personnelList
+      this.$refs.salesContributionRef.$refs.depStatusProRef.personnelList = this.personnelList
+
       this.depment = ''
+      this.$refs.allDepRef.depment = this.depment
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.depment = this.depment
+      this.$refs.salesContributionRef.$refs.depStatusProRef.depment = this.depment
+
       this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
+      this.$refs.allDepRef.person = this.person
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.person = this.person
+      this.$refs.salesContributionRef.$refs.depStatusProRef.person = this.person
+
       const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
       this.otherMethod(userid)
     },
@@ -446,12 +442,19 @@ export default {
       this.dateType = data
       this.queryMainData(this.paramMain.content.dataid,data)
     },
+    /*选择部门*/
+    depData(id,type,isleave,state){
+      this.otherModel(id,type,isleave,state)
+    },
     /*其他页面首次调用*/
     otherMethod(dataid){
       const userName = JSON.parse(sessionStorage.getItem('active_account')).name
       /*联系人数据概况*/
       this.paramMain.content.type = '0'
       this.queryMainData(dataid,this.dateType)
+      this.$refs.salesContributionRef.paramCus.content.dateType = '本年'
+      this.$refs.salesContributionRef.paramPro.content.dateType = '本年'
+      this.$refs.salesContributionRef.listData(dataid,0,1)
     },
     /*其他页面再次调用*/
     otherModel(dataid,type,isleave,state){
@@ -459,6 +462,13 @@ export default {
       this.paramMain.content.where.isleave = isleave
       this.paramMain.content.dataid = dataid
       this.queryMainData(dataid,this.dateType)
+      this.$refs.salesContributionRef.$refs.depStatusProRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.person = state == '状态' ? '' : type == 0 ? dataid : ''
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.depment = type == 0 ? '' : dataid
+      this.$refs.salesContributionRef.$refs.depStatusProRef.depment = type == 0 ? '' : dataid
+      this.$refs.salesContributionRef.$refs.depStatusProRef.isleave = isleave
+      this.$refs.salesContributionRef.$refs.depStatusCusRef.isleave = isleave
+      this.$refs.salesContributionRef.listData(dataid,type,isleave,state)
     },
     /*联系人数据概况*/
     async queryMainData(dataid,dateType){

+ 53 - 0
src/components/dataTemplate/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div>
+    <div class="div-box-new-margin">
+      <div class="div-box-new" :style="{height:heightNew}">
+        <div style="font-size: 16px;color: #333333;margin-bottom: 20px" v-if="isTitle">{{$t(title)}}</div>
+        <div>
+          <slot name="content"></slot>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:['heightNew','title','isTitle']
+}
+</script>
+
+<style scoped>
+.div-box-new{
+  margin-top: 16px;
+  width: 100%;
+  /* height: 210px;*/
+  border-radius: 2px;
+  border: 1px solid #e9e9e9;
+  background-color: #ffffff;
+  box-sizing: border-box;
+  box-shadow: -1px -1px 5px 0px rgba(0, 0, 0, 0.2);
+  padding: 16px
+}
+.div-border-new{
+  /*margin:0 30px 0 30px;*/
+  height: 150px
+}
+.div-border-new .item{
+  height: 33%;
+  width: 16.6%;
+  float: left;
+}
+.div-border-new .item .title{
+  font-size: 26px
+}
+.div-border-new .item .content-font-new{
+  font-size: 14px;
+  margin-right: 10px;
+  color: #000000A6;
+}
+.div-click:hover{
+  color: #3874f6 !important;
+}
+</style>