|
@@ -7,30 +7,7 @@
|
|
|
<template #content>
|
|
<template #content>
|
|
|
<div style="overflow: auto;height: calc(100vh - 220px)" ref="rollRef" @scroll="handleScroll">
|
|
<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 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>
|
|
<div>
|
|
|
<btnSelect :btn-title="['全部','本年','本季','本月','上月','去年']" :date-type="dateType" @btnClick="btnClick"></btnSelect>
|
|
<btnSelect :btn-title="['全部','本年','本季','本月','上月','去年']" :date-type="dateType" @btnClick="btnClick"></btnSelect>
|
|
|
</div>
|
|
</div>
|
|
@@ -183,6 +160,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</dataDetail>
|
|
</dataDetail>
|
|
|
|
|
+ <salesContribution class="mt-10" ref="salesContributionRef"></salesContribution>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</normal-layout>
|
|
</normal-layout>
|
|
@@ -194,9 +172,11 @@ import normalLayout from '@/components/normal-basic-layout/normalNew'
|
|
|
import btnSelect from "@/components/btn_select/btnSelect";
|
|
import btnSelect from "@/components/btn_select/btnSelect";
|
|
|
import dataBoard from '@/components/dataBoard/index'
|
|
import dataBoard from '@/components/dataBoard/index'
|
|
|
import dataDetail from '@/template/dataDetail/index'
|
|
import dataDetail from '@/template/dataDetail/index'
|
|
|
|
|
+import salesContribution from './components/salesContribution'
|
|
|
|
|
+import depStatus from './components/depStatus'
|
|
|
export default {
|
|
export default {
|
|
|
name: "index",
|
|
name: "index",
|
|
|
- components:{normalLayout,btnSelect,dataBoard,dataDetail},
|
|
|
|
|
|
|
+ components:{normalLayout,btnSelect,dataBoard,dataDetail,salesContribution,depStatus},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
scrollData:'',
|
|
scrollData:'',
|
|
@@ -344,9 +324,25 @@ export default {
|
|
|
async departmentrtment() {
|
|
async departmentrtment() {
|
|
|
const res = await this.$api.requested(this.depmentParam)
|
|
const res = await this.$api.requested(this.depmentParam)
|
|
|
this.deplist = this.createMenu(res.data.dep)
|
|
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.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.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.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
|
|
const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
|
|
|
this.otherMethod(userid)
|
|
this.otherMethod(userid)
|
|
|
},
|
|
},
|
|
@@ -446,12 +442,19 @@ export default {
|
|
|
this.dateType = data
|
|
this.dateType = data
|
|
|
this.queryMainData(this.paramMain.content.dataid,data)
|
|
this.queryMainData(this.paramMain.content.dataid,data)
|
|
|
},
|
|
},
|
|
|
|
|
+ /*选择部门*/
|
|
|
|
|
+ depData(id,type,isleave,state){
|
|
|
|
|
+ this.otherModel(id,type,isleave,state)
|
|
|
|
|
+ },
|
|
|
/*其他页面首次调用*/
|
|
/*其他页面首次调用*/
|
|
|
otherMethod(dataid){
|
|
otherMethod(dataid){
|
|
|
const userName = JSON.parse(sessionStorage.getItem('active_account')).name
|
|
const userName = JSON.parse(sessionStorage.getItem('active_account')).name
|
|
|
/*联系人数据概况*/
|
|
/*联系人数据概况*/
|
|
|
this.paramMain.content.type = '0'
|
|
this.paramMain.content.type = '0'
|
|
|
this.queryMainData(dataid,this.dateType)
|
|
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){
|
|
otherModel(dataid,type,isleave,state){
|
|
@@ -459,6 +462,13 @@ export default {
|
|
|
this.paramMain.content.where.isleave = isleave
|
|
this.paramMain.content.where.isleave = isleave
|
|
|
this.paramMain.content.dataid = dataid
|
|
this.paramMain.content.dataid = dataid
|
|
|
this.queryMainData(dataid,this.dateType)
|
|
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){
|
|
async queryMainData(dataid,dateType){
|