فهرست منبع

作业看板新增联系人tab

qymljy 4 ماه پیش
والد
کامیت
9ba8eb4f42

+ 24 - 3
src/HDrpManagement/dataanalysis/index.vue

@@ -47,6 +47,9 @@
               <el-tab-pane :label="$t(`客户`)" name="客户">
                 <customer ref="customer" :param="tableParam" :isDep="isDep" :dataid="dataid" :isPerson="isPerson"></customer>
               </el-tab-pane>
+              <el-tab-pane :label="$t(`联系人`)" name="联系人">
+                <contact ref="contact" :param="tableParam" :isDep="isDep" :dataid="dataid" :isPerson="isPerson"></contact>
+              </el-tab-pane>
               <el-tab-pane :label="$t(`项目商机`)" name="项目商机">
                 <project ref="project" :param="tableParam" :isDep="isDep" :dataid="dataid" :isPerson="isPerson"></project>
               </el-tab-pane>
@@ -72,6 +75,7 @@ import customer from './modules/customer'
 import project from './modules/project'
 import documents from './modules/documents'
 import normalLayout from '@/components/normal-basic-layout/normalData'
+import contact from './modules/contact'
 export default {
   name: "index",
   data(){
@@ -112,7 +116,7 @@ export default {
         "content": {
           "pageNumber": 1,
           "pageSize": 10,
-          "dataType":"",//1 线索新增列表 2 线索更新列表 3 线索跟进列表4 客户新增列表 5 客户更新列表 6 客户跟进列表 7 项目新增列表8 项目更新列表 9 项目跟进列表 10 报价单列表 11 合同列表
+          "dataType":"",//1 线索新增列表 2 线索更新列表 3 线索跟进列表4 客户新增列表 5 客户更新列表 6 客户跟进列表 7 项目新增列表8 项目更新列表 9 项目跟进列表 10 报价单列表 11 合同列表 12 联系人新增 13 联系人更进 14 联系人更新
           "type":'',//0 按人搜素 1 按部门搜索
           "dataid":"",// 人员id或部门id
           "dateType":'',
@@ -126,7 +130,7 @@ export default {
     }
   },
   components:{
-    assignmentData,salesData,performanceData,clue,customer,project,documents,normalLayout
+    assignmentData,salesData,performanceData,clue,customer,project,documents,normalLayout,contact
   },
   methods:{
     async departmentrtment() {
@@ -284,6 +288,10 @@ export default {
       }else if (this.tabName === '作业单据'){
         this.$refs.documents.queryQuotation()
         this.$refs.documents.queryContract()
+      }else if (this.tabName === '联系人'){
+        this.$refs.contact.queryAdd()
+        this.$refs.contact.queryUpdate()
+        this.$refs.contact.queryFollow()
       }
     },
     clickFull(type,time,val){
@@ -329,8 +337,21 @@ export default {
         this.$refs.project.$refs.quickFow.select = time
         this.$refs.project.$refs.quickFow.selectData(val)
         this.$refs.project.$refs.fowFullRef.enterFullscreen()
+      }else if (type == '新增联系人'){
+        this.tabName = '联系人'
+        this.$refs.contact.disabled = true
+        this.$refs.contact.selectAdd = time
+        this.$refs.contact.$refs.quickAdd.select = time
+        this.$refs.contact.$refs.quickAdd.selectData(val)
+        this.$refs.contact.$refs.addFullRef.enterFullscreen()
+      }else if (type == '联系人跟进'){
+        this.tabName = '联系人'
+        this.$refs.contact.disabled = true
+        this.$refs.contact.selectFow = time
+        this.$refs.contact.$refs.quickFow.select = time
+        this.$refs.contact.$refs.quickFow.selectData(val)
+        this.$refs.contact.$refs.fowFullRef.enterFullscreen()
       }
-
     }
 
   },

+ 16 - 16
src/HDrpManagement/dataanalysis/modules/assignmentData.vue

@@ -36,14 +36,14 @@
                   <div class="title-font" style="color: #16BDFF">{{list.bzkhgj}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('新增联系人','周',2)">
                   <div>{{$t(`新增联系人`)}}</div>
                   <div class="title-font" style="color: #F09E00">{{list.bzlxxz}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('联系人跟进','周',2)">
                   <div>{{$t(`联系人跟进`)}}</div>
                   <div class="title-font" style="color: #FF7602">{{list.bzlxgj}}</div>
                 </div>
@@ -99,14 +99,14 @@
                   <div class="title-font" style="color: #16BDFF">{{list.bykhgj}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('新增联系人','月',3)">
                   <div>{{$t(`新增联系人`)}}</div>
                   <div class="title-font" style="color: #F09E00">{{list.bylxxz}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('联系人跟进','月',3)">
                   <div>{{$t(`联系人跟进`)}}</div>
                   <div class="title-font" style="color: #FF7602">{{list.bylxgj}}</div>
                 </div>
@@ -162,14 +162,14 @@
                   <div class="title-font" style="color: #16BDFF">{{list.sykhgj}}</div>
                 </div>
               </el-col>
-              <el-col :span="3">
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('新增联系人','上月',5)">
                   <div>{{$t(`新增联系人`)}}</div>
                   <div class="title-font" style="color: #F09E00">{{list.sylxxz}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('联系人跟进','上月',5)">
                   <div>{{$t(`联系人跟进`)}}</div>
                   <div class="title-font" style="color: #FF7602">{{list.sylxgj}}</div>
                 </div>
@@ -225,14 +225,14 @@
                   <div class="title-font" style="color: #16BDFF">{{list.bnkhgj}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('新增联系人','年',4)">
                   <div>{{$t(`新增联系人`)}}</div>
                   <div class="title-font" style="color: #F09E00">{{list.bnlxxz}}</div>
                 </div>
               </el-col>
-              <el-col :span="3" >
-                <div>
+              <el-col :span="3" class="titleHover">
+                <div @click="onClick('联系人跟进','年',4)">
                   <div>{{$t(`联系人跟进`)}}</div>
                   <div class="title-font" style="color: #FF7602">{{list.bnlxgj}}</div>
                 </div>

+ 314 - 0
src/HDrpManagement/dataanalysis/modules/contact.vue

@@ -0,0 +1,314 @@
+<template>
+  <div>
+    <el-scrollbar>
+      <div style="margin: auto;">
+        <div id="contactAddFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
+          <div style="display: flex;justify-content: space-between">
+            <div>
+              <span style="font-size: 16px;color: #333">{{$t(`新增联系人`)}}</span>
+            </div>
+            <div>
+              <quickDate class="inline-16" ref="quickAdd" @selectQuick="selectQuickAdd" :disabled="disabled"></quickDate>
+              <fullScreen ref="addFullRef" class="inline-16" domId="contactAddFull" @onFull="onFull('新增')" @backFull="backFull('新增')"></fullScreen>
+            </div>
+          </div>
+          <tableLayout style="margin-top: 10px" :layout="tablecolsAdd" :data="listAdd" :opwidth="200" :width="true" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
+            <template v-slot:customcol="scope">
+              <div v-if="scope.column.columnname === 'tag'">
+                <div v-if="scope.column.data.tag">
+                  <div v-if="scope.column.data.tag.length > 0">
+                    <el-tag v-for="item in scope.column.data.tag" :key="item.index" :type="item ==='支持者'?'warning':item ==='反对者'?'danger':''" size="mini" style="margin:0 5px 0 0">
+                      {{$t(item)}}
+                    </el-tag>
+                  </div>
+                  <div v-else>--</div>
+                </div>
+                <div v-else>--</div>
+              </div>
+              <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
+            </template>
+          </tableLayout>
+          <div class="container normal-panel" style="text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChangeAdd"
+                @current-change="handleCurrentChangeAdd"
+                :current-page="currentPageAdd"
+                :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
+                :page-size="isFull ?100:10"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="totalAdd">
+            </el-pagination>
+          </div>
+        </div>
+        <div id="contactUpdFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
+          <div style="display: flex;justify-content: space-between">
+            <div>
+              <span style="font-size: 16px;color: #333">{{$t(`更新联系人`)}}</span>
+            </div>
+            <div>
+              <quickDate class="inline-16"  ref="quickUpd" @selectQuick="selectQuickUpd"></quickDate>
+              <fullScreen ref="updFullRef" class="inline-16" domId="contactUpdFull" @onFull="onFull('更新')" @backFull="backFull('更新')"></fullScreen>
+            </div>
+          </div>
+          <tableLayout style="margin-top: 10px" :layout="tablecolsUpdate" :data="listUpdate" :opwidth="200" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
+            <template v-slot:customcol="scope">
+              <p>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
+            </template>
+          </tableLayout>
+          <div class="container normal-panel" style="text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChangeUpdate"
+                @current-change="handleCurrentChangeUpdate"
+                :current-page="currentPageUpdate"
+                :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
+                :page-size="isFull ?100:10"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="totalUpdate">
+            </el-pagination>
+          </div>
+        </div>
+        <div id="contactFowFull" style="background: #FFFFFF" :style="{padding:isFull ?'16px':0}">
+          <div style="display: flex;justify-content: space-between">
+            <div>
+              <span style="font-size: 16px;color: #333">{{$t(`跟进联系人`)}}</span>
+            </div>
+            <div>
+              <quickDate class="inline-16" ref="quickFow" @selectQuick="selectQuickFow" :disabled="disabled"></quickDate>
+              <fullScreen ref="fowFullRef" class="inline-16" domId="contactFowFull" @onFull="onFull('跟进')" @backFull="backFull('跟进')"></fullScreen>
+            </div>
+          </div>
+          <tableLayout style="margin-top: 10px" :layout="tablecolsFollow" :data="listFollow" :opwidth="200" :custom="true" :height="isFull ?'calc(100vh - 150px)':tableHeight">
+            <template v-slot:customcol="scope">
+              <p v-if="scope.column.columnname === 'followname'">
+              <span v-if="scope.column.data.followname.length > 0">
+                <span v-for="(item,index) in scope.column.data.followname">
+                <span v-if="index === scope.column.data.followname.length -1">
+                  {{$t(item)}}
+                </span>
+                <span v-else>
+                  {{item + ','}}
+                </span>
+              </span>
+              </span>
+                <span v-else>--</span>
+              </p>
+              <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
+            </template>
+          </tableLayout>
+          <div class="container normal-panel" style="text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChangeFollow"
+                @current-change="handleCurrentChangeFollow"
+                :current-page="currentPageFollow"
+                :page-sizes="isFull ?[100,150, 200, 250]:[10,20, 50, 100, 200]"
+                :page-size="isFull ?100:10"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="totalFollow">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </el-scrollbar>
+  </div>
+</template>
+
+<script>
+import quickDate from "@/HDrpManagement/dataanalysis/components/quickDate";
+import tableLayout from '@/components/table/index9'
+import fullScreen from "@/views/salesData/components/fullScreen";
+export default {
+  name: "contact",
+  props:['param','isDep','dataid','isPerson'],
+  components:{quickDate,tableLayout,fullScreen},
+  data() {
+    return {
+      listAdd:[],
+      tablecolsAdd:[],
+      listUpdate:[],
+      tablecolsUpdate:[],
+      tableHeight:'',
+      currentPageAdd:0,
+      totalAdd:0,
+      currentPageUpdate:0,
+      totalUpdate:0,
+      listFollow:[],
+      tablecolsFollow:[],
+      currentPageFollow:0,
+      totalFollow:0,
+      begindate:'',
+      enddate:'',
+      selectAdd:'月',
+      selectUpd:'月',
+      selectFow:'月',
+      sort:[
+        {
+          reversed : 0,
+          sorted: 1,
+          sortid: 207,
+          sortname: "新增,更新排序"
+        },
+        {
+          reversed : 0,
+          sorted: 1,
+          sortid: 208,
+          sortname: "跟进排序"
+        }
+      ],
+      isFull:false,
+      disabled:false
+    }
+  },
+  methods:{
+    async queryAdd(type){
+      this.$refs.quickAdd.select = type?type:this.selectAdd
+      this.param.content.dataType = 12
+      this.param.content.where.begindate = this.selectAdd ? '' :this.begindate
+      this.param.content.where.enddate = this.selectAdd ? '' : this.enddate
+      this.param.content.dateType = type?type:this.selectAdd
+      this.param.content.dataid = this.dataid
+      this.param.content.type = this.isDep?1:0
+      this.param.content.sort = [this.sort[0]]
+      const res = await this.$api.requested(this.param)
+      this.listAdd = res.data
+      this.currentPageAdd = res.pageNumber
+      this.totalAdd = res.total
+    },
+    handleSizeChangeAdd(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryAdd()
+    },
+    handleCurrentChangeAdd(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryAdd()
+    },
+    async queryUpdate(type){
+      this.$refs.quickUpd.select = type?type:this.selectUpd
+      this.param.content.dataType = 14
+      this.param.content.where.begindate = this.selectUpd ? '' :this.begindate
+      this.param.content.where.enddate = this.selectUpd ? '' : this.enddate
+      this.param.content.dateType = type?type:this.selectUpd
+      this.param.content.dataid = this.dataid
+      this.param.content.type = this.isDep?1:0
+      this.param.content.sort = [this.sort[0]]
+      const res = await this.$api.requested(this.param)
+      this.listUpdate = res.data
+      this.currentPageUpdate = res.pageNumber
+      this.totalUpdate = res.total
+    },
+    handleSizeChangeUpdate(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryUpdate()
+    },
+    handleCurrentChangeUpdate(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryUpdate()
+    },
+    async queryFollow(type){
+      this.$refs.quickFow.select = type?type:this.selectFow
+      this.param.content.dataType = 13
+      this.param.content.where.begindate = this.selectFow ? '' :this.begindate
+      this.param.content.where.enddate = this.selectFow ? '' : this.enddate
+      this.param.content.dateType = type?type:this.selectFow
+      this.param.content.dataid = this.dataid
+      this.param.content.type = this.isDep?1:0
+      this.param.content.sort = [this.sort[1]]
+      const res = await this.$api.requested(this.param)
+      this.listFollow = res.data
+      this.currentPageFollow = res.pageNumber
+      this.totalFollow = res.total
+    },
+    handleSizeChangeFollow(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryFollow()
+    },
+    handleCurrentChangeFollow(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryFollow()
+    },
+    /*日期筛选*/
+    selectQuickAdd(begindate,enddate,select){
+      this.begindate = begindate
+      this.enddate = enddate
+      this.selectAdd = select
+      this.param.content.pageNumber = 1
+      this.queryAdd()
+    },
+    selectQuickUpd(begindate,enddate,select){
+      this.begindate = begindate
+      this.enddate = enddate
+      this.selectUpd = select
+      this.param.content.pageNumber = 1
+      this.queryUpdate()
+    },
+    selectQuickFow(begindate,enddate,select){
+      this.begindate = begindate
+      this.enddate = enddate
+      this.selectFow = select
+      this.param.content.pageNumber = 1
+      this.queryFollow()
+    },
+    onFull(type){
+      if (type == '新增'){
+        this.param.content.dataType = 12
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 100
+        this.queryAdd()
+        this.isFull = true
+      }else if (type == '更新'){
+        this.param.content.dataType = 14
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 100
+        this.queryUpdate()
+        this.isFull = true
+      }else if (type == '跟进'){
+        this.param.content.dataType = 13
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 100
+        this.queryFollow()
+        this.isFull = true
+      }
+    },
+    backFull(type){
+      if (type == '新增'){
+        this.param.content.dataType = 12
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 10
+        this.queryAdd()
+        this.disabled = false
+        this.isFull = false
+      }else if (type == '更新'){
+        this.param.content.dataType = 14
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 10
+        this.queryUpdate()
+        this.isFull = false
+      }else if (type == '跟进'){
+        this.param.content.dataType = 13
+        this.param.content.pageNumber = 1
+        this.param.content.pageSize = 10
+        this.queryFollow()
+        this.disabled = false
+        this.isFull = false
+      }
+    }
+  },
+  created() {
+    this.tablecolsAdd = this.tool.tabelCol(this.$route.name).contactAdd.tablecols
+    this.tablecolsUpdate = this.tool.tabelCol(this.$route.name).contactUpdate.tablecols
+    this.tablecolsFollow = this.tool.tabelCol(this.$route.name).contactFollow.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>