|
@@ -35,8 +35,95 @@
|
|
|
<btnSelect :btn-title="['全部','本年','本季','本月','上月','去年']" :date-type="dateType" @btnClick="btnClick"></btnSelect>
|
|
<btnSelect :btn-title="['全部','本年','本季','本月','上月','去年']" :date-type="dateType" @btnClick="btnClick"></btnSelect>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <dataBoard title="联系人数据概况" :mainData="maninInfo" heightNew="145px"></dataBoard>
|
|
|
|
|
- <dataDetail></dataDetail>
|
|
|
|
|
|
|
+ <dataBoard title="联系人数据概况" :mainData="maninInfo" heightNew="145px" @goDetail="goDetail"></dataBoard>
|
|
|
|
|
+ <dataDetail ref="detailRef" :param="paramDetail" :person="person" :departmentid="depment" :layout="tablecols" :title="detailTitle" :titleHeader="titleHeader" height="calc(100vh - 225px)" tableType="联系人数据概况">
|
|
|
|
|
+ <template slot="custom">
|
|
|
|
|
+ <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" disabled>
|
|
|
|
|
+ <el-option :label="$t('在职')" value="1"></el-option>
|
|
|
|
|
+ <el-option :label="$t('离职')" value="2"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inline-16 mt-10" v-if="typeSelect">
|
|
|
|
|
+ <label class="search__label">{{ $t("客户类型") }}:</label>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="inline-16"
|
|
|
|
|
+ v-model="paramDetail.content.where.type"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :placeholder="$t('请选择')"
|
|
|
|
|
+ @change="selectChange"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in option.typeData"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="$t(item.value)"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-10 inline-16" v-if="statusSelect">
|
|
|
|
|
+ <label class="search__label">{{ $t("合作状态") }}:</label>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="inline-16"
|
|
|
|
|
+ v-model="paramDetail.content.where.status"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :placeholder="$t('请选择')"
|
|
|
|
|
+ @change="selectChange"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in option.status"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="$t(item.value)"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="mt-10 inline-16" v-if="tradingstatusSelect">
|
|
|
|
|
+ <label class="search__label">{{ $t("成交状态") }}:</label>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="inline-16"
|
|
|
|
|
+ v-model="paramDetail.content.where.tradingstatus"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :placeholder="$t('请选择')"
|
|
|
|
|
+ @change="selectChange"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in option.tradingstatus"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="$t(item.value)"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inline-16 mt-10" v-if="tagSelect">
|
|
|
|
|
+ <span class="search__label">{{$t('标签')}}:</span>
|
|
|
|
|
+ <el-select v-model="tags" :placeholder="$t('请选择标签')" size="small" @change="selectChange" clearable @clear="selectChange" filterable class="inline-16" multiple>
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in tagList"
|
|
|
|
|
+ :key="item.index"
|
|
|
|
|
+ :label="$t(item.tag)"
|
|
|
|
|
+ :value="item.tag"
|
|
|
|
|
+ :disabled="hasDisabledTag(item)">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inline-16" v-if="associationSelect">
|
|
|
|
|
+ <label class="search__label">{{ $t('关联') }}:</label>
|
|
|
|
|
+ <el-select v-model="paramDetail.content.where.contactstype" :placeholder="$t('请选择关联')" size="small" @change="selectChange" clearable @clear="selectChange" class="inline-16">
|
|
|
|
|
+ <el-option :label="$t(`关联线索`)" value="关联线索"></el-option>
|
|
|
|
|
+ <el-option :label="$t(`关联客户`)" value="关联客户"></el-option>
|
|
|
|
|
+ <el-option :label="$t(`关联项目`)" value="关联项目"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </dataDetail>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</normal-layout>
|
|
</normal-layout>
|
|
@@ -80,7 +167,66 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- maninInfo:''
|
|
|
|
|
|
|
+ maninInfo:'',
|
|
|
|
|
+ paramDetail:{
|
|
|
|
|
+ "id": 2025072213574102,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "type": 1,
|
|
|
|
|
+ "dataid": 58,
|
|
|
|
|
+ "dateType": "本年",
|
|
|
|
|
+ "where": {
|
|
|
|
|
+ "isleave": "",
|
|
|
|
|
+ "condition": "",
|
|
|
|
|
+ "tag": [],
|
|
|
|
|
+ "contactstype": "", //关联线索,关联客户,关联项目
|
|
|
|
|
+ "type":"",
|
|
|
|
|
+ "status":"",
|
|
|
|
|
+ "tradingstatus":""
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ tablecols:'',
|
|
|
|
|
+ detailTitle:'',
|
|
|
|
|
+ tagList:[],
|
|
|
|
|
+ tags:[],
|
|
|
|
|
+ tagSelect:false,
|
|
|
|
|
+ associationSelect:false,
|
|
|
|
|
+ typeSelect:false,
|
|
|
|
|
+ statusSelect:false,
|
|
|
|
|
+ tradingstatusSelect:false,
|
|
|
|
|
+ titleHeader:'',
|
|
|
|
|
+ option: {
|
|
|
|
|
+ typeData: [],
|
|
|
|
|
+ customerClassification: [],
|
|
|
|
|
+ customerGrade: [],
|
|
|
|
|
+ industryData: [],
|
|
|
|
|
+ tagData: [],
|
|
|
|
|
+ status: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "潜在",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "合作中",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "暂缓",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "已终止",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ tradingstatus: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "未成交",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "已成交",
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: "多次成交",
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -271,6 +417,105 @@ export default {
|
|
|
tooltip:'统计联系人关联的项目订单下单金额。'
|
|
tooltip:'统计联系人关联的项目订单下单金额。'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
+ },
|
|
|
|
|
+ goDetail(data){
|
|
|
|
|
+ this.titleHeader = data
|
|
|
|
|
+ this.tagSelect = false
|
|
|
|
|
+ this.associationSelect = false
|
|
|
|
|
+ this.typeSelect = false
|
|
|
|
|
+ this.statusSelect = false
|
|
|
|
|
+ this.tradingstatusSelect = false
|
|
|
|
|
+ if (data == '联系人总数'){
|
|
|
|
|
+ this.paramDetail.id =2025072213574102
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).contactsTotalTable.tablecols
|
|
|
|
|
+ this.tagSelect = true
|
|
|
|
|
+ this.associationSelect = true
|
|
|
|
|
+ this.getTagList()
|
|
|
|
|
+ }else if (data == '联系人跟进次数'){
|
|
|
|
|
+ this.paramDetail.id = 2025072213575402
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).contactsFollowTable.tablecols
|
|
|
|
|
+ }else if (data == '关联客户数'){
|
|
|
|
|
+ this.paramDetail.id = 2025072213580402
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).associatedCustomersTable.tablecols
|
|
|
|
|
+ this.typeSelect = true
|
|
|
|
|
+ this.statusSelect = true
|
|
|
|
|
+ this.tradingstatusSelect = true
|
|
|
|
|
+ this.tagSelect = true
|
|
|
|
|
+ this.getSelectData()
|
|
|
|
|
+ this.getTagList()
|
|
|
|
|
+ }else if (data == '关联项目数'){
|
|
|
|
|
+ this.paramDetail.id = 2025072213581302
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).associatedProjectsTable.tablecols
|
|
|
|
|
+ }else if (data == '关联客户成交金额'){
|
|
|
|
|
+ this.paramDetail.id = 2025072213582002
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).associatedAmountTable.tablecols
|
|
|
|
|
+ }else if (data == '关联项目成交金额'){
|
|
|
|
|
+ this.paramDetail.id = 2025072213582602
|
|
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).associatedAmountTable.tablecols
|
|
|
|
|
+ }
|
|
|
|
|
+ this.detailTitle = this.$t(this.dateType) + '_' + this.$t(data)
|
|
|
|
|
+ this.titleHeader = data
|
|
|
|
|
+ this.paramDetail.content.dataid = this.paramMain.content.dataid
|
|
|
|
|
+ this.paramDetail.content.type = this.paramMain.content.type
|
|
|
|
|
+ this.paramDetail.content.dateType = this.paramMain.content.dateType
|
|
|
|
|
+ this.paramDetail.content.where.isleave = this.paramMain.content.where.isleave
|
|
|
|
|
+ this.$refs.detailRef.onShow()
|
|
|
|
|
+ },
|
|
|
|
|
+ /*获取联系人标签*/
|
|
|
|
|
+ async getTagList () {
|
|
|
|
|
+ console.log('联系人标签')
|
|
|
|
|
+ console.log(this.titleHeader,'titleHeader')
|
|
|
|
|
+ if (this.titleHeader == '联系人总数'){
|
|
|
|
|
+ let res = await this.$api.requested({
|
|
|
|
|
+ "id": 20220929085401,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "ownertable":"sys_phonebook",
|
|
|
|
|
+ "ownerid":102
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.tagList = res.data.option
|
|
|
|
|
+ }else if (this.titleHeader == '关联客户数'){
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ id: 20221013104401,
|
|
|
|
|
+ content: {
|
|
|
|
|
+ isExport: 1,
|
|
|
|
|
+ pageNumber: 1,
|
|
|
|
|
+ pageSize: 100,
|
|
|
|
|
+ sys_systemtagid: 2,
|
|
|
|
|
+ where: {
|
|
|
|
|
+ condition: "",
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ this.tagList = res.data
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ selectChange(){
|
|
|
|
|
+ this.paramDetail.content.where.tag = this.tags
|
|
|
|
|
+ this.$refs.detailRef.listData()
|
|
|
|
|
+ },
|
|
|
|
|
+ hasDisabledTag (item) {
|
|
|
|
|
+ let arr = []
|
|
|
|
|
+ let arr2 = []
|
|
|
|
|
+ arr = this.tagList.filter(item=>{
|
|
|
|
|
+ return this.tags.includes(item.tag)
|
|
|
|
|
+ })
|
|
|
|
|
+ arr.forEach(e=>{
|
|
|
|
|
+ arr2 = arr2.concat(e.mutextag)
|
|
|
|
|
+ })
|
|
|
|
|
+ arr2 = this.tags.length === 0?[]:arr2
|
|
|
|
|
+ let _isSame = arr2.some(tag=>item.tag === tag)
|
|
|
|
|
+ return _isSame
|
|
|
|
|
+ },
|
|
|
|
|
+ clearSearchValue () {
|
|
|
|
|
+ this.$store.dispatch('clearSearchValue')
|
|
|
|
|
+ this.$refs.detailRef.listData(this.paramDetail.content.pageNumber = 1)
|
|
|
|
|
+ },
|
|
|
|
|
+ /*获取自定义选项数据*/
|
|
|
|
|
+ async getSelectData(){
|
|
|
|
|
+ const res = await this.$store.dispatch("optiontypeselect", "customertypemx")
|
|
|
|
|
+ this.option.typeData = res.data
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -284,6 +529,9 @@ export default {
|
|
|
that.windowWidth = window.fullWidth; // 宽
|
|
that.windowWidth = window.fullWidth; // 宽
|
|
|
})()
|
|
})()
|
|
|
};
|
|
};
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ // this.tablecols = this.tool.tabelCol(this.$route.name).contactsTotalTable.tablecols
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|