Browse Source

联系人数据bug修复

qymljy 9 months ago
parent
commit
01e8b8522d

+ 17 - 3
src/HDrpManagement/contactData/components/allRank.vue

@@ -11,13 +11,15 @@
         @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>
+        <depStatus class="inline-16 mt-10" ref="depStatusRef" @depData="queryList" @personData="queryList" @leaveData="queryList" :disabled="true"></depStatus>
         <el-date-picker
             style="margin-right: 10px"
-            disabled
+            @change="onChange"
             v-model="dateData"
             size="small"
-            type="daterange"
+            type="monthrange"
+            format="yyyy-MM"
+            value-format="yyyy-MM"
             :range-separator="$t('至')"
             :start-placeholder="$t(`开始月份`)"
             :end-placeholder="$t(`结束月份`)">
@@ -113,6 +115,18 @@ export default {
     onCLose(){
       this.param.content.where.condtion = ''
       this.drawerShow = false
+    },
+    onChange(){
+      if (this.dateData){
+        this.param.content.dataType = ""
+        this.param.content.where.begindate = this.dateData[0]
+        this.param.content.where.enddate = this.dateData[1]
+        this.listData()
+      }else {
+        this.param.content.where.begindate = ""
+        this.param.content.where.enddate = ""
+        this.listData()
+      }
     }
   }
 }

+ 4 - 4
src/HDrpManagement/contactData/components/depStatus.vue

@@ -2,11 +2,11 @@
   <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>
+      <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 :disabled="disabled"></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-select v-model="person" filterable :placeholder="$t('请选择')" size="small" clearable @change="selectPerson" :disabled="disabled">
         <el-option
             v-for="item in personnelList"
             :key="item.index"
@@ -17,7 +17,7 @@
     </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-select v-model="isleave" clearable style="margin-right:10px" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" :disabled="disabled">
         <el-option :label="$t('在职')" value="1"></el-option>
         <el-option :label="$t('离职')" value="2"></el-option>
       </el-select>
@@ -28,7 +28,7 @@
 <script>
 export default {
   name: "depStatus",
-  props:['isLeaveShow'],
+  props:['isLeaveShow','disabled'],
   data(){
     return {
       depment:'',

+ 3 - 1
src/HDrpManagement/contactData/components/salesContribution.vue

@@ -4,7 +4,7 @@
       <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>
+            <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" >
@@ -155,6 +155,7 @@ export default {
           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.$refs.depStatusRef.isleave = this.$refs.depStatusCusRef.isleave
           this.$refs.allRankCusRef.param = this.paramCus
           this.$refs.allRankCusRef.param.content.pageSize = 100
           this.$refs.allRankCusRef.dateData = this.$refs.btnSelectCusRef.dateData
@@ -167,6 +168,7 @@ export default {
           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.$refs.depStatusRef.isleave = this.$refs.depStatusProRef.isleave
           this.$refs.allRankProRef.param = this.paramPro
           this.$refs.allRankProRef.param.content.pageSize = 100
           this.$refs.allRankProRef.dateData = this.$refs.btnSelectProRef.dateData

+ 2 - 0
src/HDrpManagement/contactData/components/statisticsOfProject.vue

@@ -19,6 +19,8 @@
                 :label="$t(item.value)"
                 :value="item.value"
             >
+              <span style="float: left">{{ $t(item.value) }}</span>
+              <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?$t(item.remarks):$t('暂无描述') }}</span>
             </el-option>
           </el-select>
         </div>

+ 7 - 8
src/HDrpManagement/contactData/components/statisticsOfUnFollow.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <dataTemPlate ref="dataTemPlateRef" :isTitle="true" title="联系人未跟进天数分析" @list="listData" id="statisticsOfUnFollowFull">
+    <dataTemPlate ref="dataTemPlateRef" :isTitle="true" title="联系人未跟进天数分析" @list="listData" id="statisticsOfUnFollowFull" :isFull="isFull">
       <template slot="operation">
         <div class="mt-10 inline-16">
           <span class="search__label inline-16">{{$t('分析日期')}}:</span>
@@ -13,9 +13,7 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               size="small"
-              :range-separator="$t('至')"
-              :start-placeholder="$t('开始月份')"
-              :end-placeholder="$t('结束月份')">
+              :placeholder="$t(`选择日期`)">
           </el-date-picker>
         </div>
         <exportFile class="inline-16" :param="paramTable" :columns="tablecols" :dataid="paramChart.content.dataid" fileName="联系人未跟进天数分析"></exportFile>
@@ -24,7 +22,7 @@
       <template slot="content">
         <div :style="{height:heightDiv}">
           <div ref="statisticsOfUnFollowChart" :style="{height: heightChart}"></div>
-          <div :style="{height: heightChart}">
+          <div :style="{height: heightChart}" style="margin-top: 20px">
             <tableDetail :layout="tablecols" :data="tableList" :opwidth="200" :custom="true" fixed-name="operation" :height="heightTable">
               <template v-slot:customcol="scope">
                 <div v-if="scope.column.columnname === 'tag'">
@@ -209,13 +207,14 @@ export default {
     onFull(){
       // this.heightChart = this.windowWidth > 1136 ? 'calc(100vh - 70px)':'calc(100vh - 123px)'
       this.heightDiv = this.windowWidth > 1136 ? 'calc(100vh - 70px)':'calc(100vh - 123px)'
-      // this.heightTable = this.windowWidth > 1136 ? 'calc(100vh - 100px)':'calc(100vh - 153px)'
+      this.heightTable = this.windowWidth > 1136 ? 'calc(50vh - 130px)':'calc(50vh - 130px)'
+      // this.heightTable = '300px'
       this.isFull = true
     },
     /*退出全屏*/
     backFull(val){
-      this.heightChart = '100%'
-      this.heightDiv = '400px'
+      // this.heightChart = '100%'
+      this.heightDiv = '800px'
       this.heightTable = '360px'
       this.isFull = false
       this.$emit('backFull',val)

+ 50 - 3
src/HDrpManagement/contactData/index.vue

@@ -521,24 +521,66 @@ export default {
       this.paramMain.content.type = type
       this.paramMain.content.where.isleave = isleave
       this.paramMain.content.dataid = dataid
+      this.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.depment = type == 0 ? '' : dataid
+      this.isleave = isleave
       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)
+
+      /*近12月联系人新增分析*/
       this.$refs.contactsAddAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
       this.$refs.contactsAddAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
       this.$refs.contactsAddAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
       this.$refs.contactsAddAnalysisRef.listData(0,dataid,1,state,null)
-      this.$refs.contactsFollowAnalysisRef.listData(0,dataid,1,state,null)
+
+      /*联系人关联线索情况统计*/
+      this.$refs.statisticsOfCluesRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.statisticsOfCluesRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.statisticsOfCluesRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
       this.$refs.statisticsOfCluesRef.paramTable.content.pageNumber = 1
       this.$refs.statisticsOfCluesRef.listData(dataid,0,1,state,null)
+
+      /*联系人关联客户情况统计*/
+      this.$refs.statisticsOfCustomerRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.statisticsOfCustomerRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.statisticsOfCustomerRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
+      this.$refs.statisticsOfCustomerRef.paramTable.content.pageNumber = 1
       this.$refs.statisticsOfCustomerRef.listData(dataid,0,1,state,null)
+
+      /*联系人关联项目情况统计*/
+      this.$refs.statisticsOfProjectRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.statisticsOfProjectRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.statisticsOfProjectRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
+      this.$refs.statisticsOfProjectRef.paramTable.content.pageNumber = 1
       this.$refs.statisticsOfProjectRef.listData(dataid,0,1,state,null)
+
+      /*联系人跟进情况统计*/
+      this.$refs.statisticsOfFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.statisticsOfFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.statisticsOfFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
+      this.$refs.statisticsOfFollowRef.paramTable.content.pageNumber = 1
       this.$refs.statisticsOfFollowRef.listData(dataid,0,1,state,null)
+
+      /*近12月联系人跟进分析*/
+      this.$refs.contactsFollowAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.contactsFollowAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.contactsFollowAnalysisRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
+      this.$refs.contactsFollowAnalysisRef.listData(0,dataid,1,state,null)
+
+      /*联系人未跟进天数分析*/
+      this.$refs.statisticsOfUnFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.person = state == '状态' ? '' : type == 0  ? dataid : ''
+      this.$refs.statisticsOfUnFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.depment = type == 0 ? '' : dataid
+      this.$refs.statisticsOfUnFollowRef.$refs.dataTemPlateRef.$refs.depStatusRef.isleave = isleave
+      this.$refs.statisticsOfUnFollowRef.paramTable.content.pageNumber = 1
       this.$refs.statisticsOfUnFollowRef.listData(dataid,0,1,state,null)
     },
     /*联系人数据概况*/
@@ -582,14 +624,19 @@ export default {
         },
         {
           label:'关联客户成交金额',
-          value:this.tool.formatAmount(this.mainData.amount_customer,2,'¥'),
+          // value:this.tool.formatAmount(this.mainData.amount_customer,2,'¥'),
+          value:this.mainData.amount_customer < 10000 ? this.tool.formatAmount(this.mainData.amount_customer,2,'¥'):
+              this.tool.formatAmount(this.tool.unitConversion(this.mainData.amount_customer,10000),2,'¥'),
           isTooltip:true,
+          isTitle:this.mainData.amount_customer < 10000?false:true,
           tooltip:'统计联系人关联的客户标准、特殊订单下单金额。'
         },
         {
           label:'关联项目成交金额',
-          value:this.tool.formatAmount(this.mainData.amount_project,2,'¥'),
+          value:this.mainData.amount_project < 10000 ? this.tool.formatAmount(this.mainData.amount_project,2,'¥'):
+                this.tool.formatAmount(this.tool.unitConversion(this.mainData.amount_project,10000),2,'¥'),
           isTooltip:true,
+          isTitle:this.mainData.amount_project < 10000?false:true,
           tooltip:'统计联系人关联的项目订单下单金额。'
         }
       ]

+ 5 - 1
src/components/dataBoard/index.vue

@@ -8,7 +8,11 @@
         </div>
         <div class="div-border-new" :style="{height:heightNew}">
           <div class="item div-click" v-for="item in mainData" @click="detailClick(item.label)">
-            <p class="title">{{item.value}}</p>
+            <p class="title" v-if="item.isTitle">
+              {{item.value}}
+              <span style="font-size: 14px">{{$t('万')}}</span>
+            </p>
+            <p class="title" v-else>{{item.value}}</p>
             <span class="content-font-new">{{$t(item.label)}}</span>
             <el-tooltip placement="top" v-if="item.isTooltip">
               <div slot="content">{{$t(item.tooltip)}}</div>

+ 4 - 4
src/components/dataTemplate/depStatus.vue

@@ -2,11 +2,11 @@
   <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>
+      <el-cascader :append-to-body="!isFull" 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-select v-model="person" filterable :placeholder="$t('请选择')" size="small" clearable @change="selectPerson" :popper-append-to-body="!isFull">
         <el-option
             v-for="item in personnelList"
             :key="item.index"
@@ -17,7 +17,7 @@
     </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-select v-model="isleave" clearable style="margin-right:10px" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" :popper-append-to-body="!isFull">
         <el-option :label="$t('在职')" value="1"></el-option>
         <el-option :label="$t('离职')" value="2"></el-option>
       </el-select>
@@ -28,7 +28,7 @@
 <script>
 export default {
   name: "depStatus",
-  props:['isLeaveShow'],
+  props:['isLeaveShow','isFull'],
   data(){
     return {
       depment:'',

+ 2 - 2
src/components/dataTemplate/index.vue

@@ -8,7 +8,7 @@
             <div style="padding-top: -10px">{{$t(title)}}</div>
           </div>
           <div>
-            <depStatus class="inline-16" ref="depStatusRef" @depData="listData" @personData="listData" @leaveData="listData"></depStatus>
+            <depStatus class="inline-16" ref="depStatusRef" @depData="listData" @personData="listData" @leaveData="listData" :isFull="isFull"></depStatus>
             <slot name="operation"></slot>
           </div>
         </div>
@@ -24,7 +24,7 @@
 import depStatus from './depStatus'
 export default {
   name: "index",
-  props:['heightNew','title','isTitle','titleWidth'],
+  props:['heightNew','title','isTitle','titleWidth','isFull'],
   components:{depStatus},
   methods:{
     listData(dataid,type,isleave,state){

+ 16 - 0
src/template/dataDetail/index.vue

@@ -79,6 +79,22 @@
                 <div v-else-if="scope.column.columnname === 'depname'">
                   <span>{{scope.column.data['leader'][0]?scope.column.data['leader'][0].depname:'--'}}</span>
                 </div>
+                <div v-else-if="scope.column.columnname === 'tradingstatus'">
+                  <span
+                      :style="tool.getStatusColor(scope.column.data[[scope.column.columnname]])"
+                  >{{
+                      $t(scope.column.data[[scope.column.columnname]])
+                    }}</span
+                  >
+                </div>
+                <div v-else-if="scope.column.columnname === 'status'">
+                  <span
+                      :style="tool.getStatusColor(scope.column.data[[scope.column.columnname]])"
+                  >{{
+                      $t(scope.column.data[[scope.column.columnname]])
+                    }}</span
+                  >
+                </div>
                 <div v-else>
                   {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
                 </div>