|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624 |
- <template>
- <view class="box">
- <view class="top-search">
- <view class="search-box">
- <view class="search" @click="goSearch">
- <view class="search-img">
- <image class="search-img1" src="../../../static/images/search.png" mode=""></image>
- </view>
- <view class="search-text">输入客户姓名/手机号</view>
- </view>
- </view>
-
- <template v-if="showFilterOption">
- <image @click="screenShow = true" class="filter-icon" src="@/static/images/iconFilter.png" mode="">
- </image>
- </template>
- <template v-else>
- <image class="filter-icon" @click="screenShow = true"
- src="https://static.quhouse.com/f4feade4a19d413085b591612179457f.png" mode="" />
- </template>
- </view>
- <!-- 选择器 -->
- <view class="boxtittab">
- <view class="tabbox" :class="{activeColor: sortFilter!=='排序'}" @click="soltishow = true">
- {{ sortFilter }}
- <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
- </view>
- <view class="tabbox" :class="{activeColor: arriveFilter!=='接待时间'}" @click="timeshow = true">
- {{ arriveFilter }}
- <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
- </view>
- <view class="tabbox" :class="{activeColor: agentIdtext!=='接待顾问'}" @click="selectshow=true">
- {{ agentIdtext }}
- <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
- </view>
- <view class="tabbox" :class="{activeColor: tagSign}" @click="huaxiangShow = true">
- 画像标签<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
- </view>
- </view>
-
- <!-- 筛选后的数量 -->
- <view class="count" v-if="recordList.length > 0">
- 筛选结果:<text>{{totalRecords}} </text>条
- </view>
-
- <view class="content">
- <view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
- <view style="width: 100%;height: 100%;padding-top: 200rpx;">
- <view style="width: 100%;text-align: center;">
- <image style="width: 220rpx;height: 200rpx;"
- src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
- </view>
- <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
- </view>
- </view>
- <view v-if="recordList.length" class="content-tips" v-for="(item,index) in recordList" :key='index'
- @click="gotoDetail(item.id)">
- <view class="content-first">
- <view class="left">
- <view v-if="item.level.length == 0"></view>
- <view class="img A" v-else-if="item.level == 1">A</view>
- <view class="img B" v-else-if="item.level == 2">B</view>
- <view class="img C" v-else-if="item.level == 3">C</view>
- <view class="img D" v-else-if="item.level == 4">D</view>
- <view class="test">{{item.name}}</view>
- </view>
- <view class="right">
-
- <view class="clientStageName">
- {{ item.fraction || 0 }}%
- </view>
- </view>
- </view>
- <view class="content-sec">
- <view class="content-sec-lab">
- <view class="content-sec-lab1">手机号码:{{ item.phone || "--" }}</view>
- <view class="content-sec-lab1" style="width: 44%">客户阶段:{{ item.clientStageName || '--' }}</view>
- </view>
- <view class="content-sec-lab">
- <view class="content-sec-lab1">负责顾问:{{ item.agentName || "--" }}</view>
- </view>
- <view class="content-sec-lab">
- <view class="content-sec-lab1">
- 挖掘执行/成功:{{ max100(item.wordFraction) }}%/{{ max100(item.wordFinishFraction) }}%</view>
- <view class="content-sec-lab1" style="width: 44%">
- 客户意向率:{{ `${item.levelFraction||'0'}%` }}
- </view>
- </view>
- <view class="content-sec-lab">
- <view class="content-sec-lab1">最近到访:{{ item.createTime || "--" }}</view>
- <view class="content-sec-lab1-min">
- 到访{{ item.visitRecord || 0 }}次/{{ item.mm || 0 }}min
- </view>
- </view>
- </view>
- <view class="content-last">
- <template v-if="permissions.commonly2">
- <view class="content-last-tab" @click.stop="gotoFollowUp(item)">
- <image src="/static/images/genjin-icon.png" mode="" />
- 写跟进
- </view>
- </template>
-
- <template v-if="CHECKAUTHORITY('khgl_bj')">
- <view class="content-last-tab" @click.stop="goedit(item)">
- <image class="icon" src="https://static.quhouse.com/5daebdec0aad4f63a62d3720437034bc.png"
- mode="" />
- 打标签
- </view>
- </template>
- </view>
- </view>
- </view>
- <!-- 更多筛选 -->
- <u-popup v-model="screenShow" mode="top" height="900">
- <view class="screen">
- <scroll-view scroll-y="true" style="height: 750rpx;">
- <!-- 销讲业务 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="showTemplate=!showTemplate">
- 销讲业务
- <image v-if="showTemplate" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="showTemplate">
- <block v-for="(item,index) in templateList" :key="index">
- <view class="screen-record-item"
- :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
- @click="choice(item)">
- {{item.templateName}}
- </view>
- </block>
- </view>
- </view>
- <!-- 接待时长 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="jiedaiArrow = !jiedaiArrow">
- 接待时长
- <image v-if="jiedaiArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="jiedaiArrow">
- <block v-for="(item, index) in jiedaiList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- <!-- 客户等级 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="levelArrow = !levelArrow">
- 意向等级
- <image v-if="levelArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="levelArrow">
- <block v-for="(item, index) in levelList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- <!-- 客户来源 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="sourceArrow = !sourceArrow">
- 客户来源
- <image v-if="sourceArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="sourceArrow">
- <block v-for="(item, index) in sourceList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- <!-- 客户阶段 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="jieduanArrow = !jieduanArrow">
- 客户阶段
- <image v-if="jieduanArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="jieduanArrow">
- <block v-for="(item, index) in phaseList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- <!-- 需求挖掘率 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="wajueArrow = !wajueArrow">
- 挖掘执行率
- <image v-if="wajueArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="wajueArrow">
- <block v-for="(item, index) in wajueList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
-
- <!-- 需求挖掘率 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="wajueArrows=!wajueArrows">
- 挖掘成功率
- <image v-if="wajueArrows" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="wajueArrows">
- <block v-for="(item,index) in wajueLists" :key="index">
- <view class="screen-record-item"
- :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
- @click="choice(item)">
- {{item.label}}
- </view>
- </block>
- </view>
- </view>
- <!-- 销讲执行率 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="xiaojiangArrow = !xiaojiangArrow">
- 销讲执行率
- <image v-if="xiaojiangArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="xiaojiangArrow">
- <block v-for="(item, index) in xiaojiangList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- <!-- 到访次数 -->
- <view class="screen-record">
- <view class="screen-record-text" @click="visitArrow = !visitArrow">
- 到访次数
- <image v-if="visitArrow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="visitArrow">
- <block v-for="(item, index) in visitList" :key="index">
- <view class="screen-record-item" :class="[
- item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </view>
- </scroll-view>
- <view class="screen-foot">
- <view class="screen-foot-reset" @click="reset"> 重置 </view>
- <view class="screen-foot-sure" @click="screensure"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <!-- 选择顾问的选择框 -->
- <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
- <!-- 自定义时间 -->
- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
- <!-- 选择接待时间 -->
- <u-popup v-model="timeshow" mode="bottom">
- <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
- @click="tabtimetap(5, '接待时间')">
- 全部</view>
- <view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
- @click="tabtimetap(0, '今天')">
- 今天</view>
- <view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
- @click="tabtimetap(1, '昨天')">
- 昨天</view>
- <view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
- @click="tabtimetap(2, '近7天')">
- 近7天</view>
- <view class="timeview" :style="{ color: activeTotal == 3 ? '#2B6EFF' : '#333333' }"
- @click="tabtimetap(3, '近30天')">
- 近30天</view>
- <view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
- 自定义</view>
- </u-popup>
- <!-- 排序 -->
- <u-popup v-model="soltishow" mode="bottom">
- <view class="soltishow" @tap.stop @touchmove.stop>
- <block v-for="(item, index) in orderBylist" :key="index">
- <view class="soltishow-item" :style="orderBy==item.value?'color: #2B6EFF':''"
- @click="selectCallback2(item)">
- {{ item.label }}
- </view>
- </block>
- </view>
- </u-popup>
- <!-- 画像标签 -->
- <u-popup v-model="huaxiangShow" mode="top" height="850">
- <view class="screen">
- <scroll-view scroll-y="true" style="height: 700rpx;">
- <view class="screen-record" v-if="item.children.length" v-for="(item,index) in huaxiangList"
- :key="index">
- <view class="screen-record-text" @click="choice(item)">
- {{item.name}}
- <image v-if="item.isShow" class="arrow"
- src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
- <image v-else class="arrow"
- src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
- </view>
- <view class="screen-record-tab" v-if="item.isShow">
- <block v-for="(subitem, ind) in item.children" :key="ind">
- <view class="screen-record-item" :class="[
- subitem.isShow ? 'screen-record-chose' : 'screen-record-nochose',
- ]" @click="choice(subitem)">
- {{ subitem.name }}
- </view>
- </block>
- </view>
- </view>
- </scroll-view>
- <view class="screen-foot">
- <view class="screen-foot-reset" @click="resetHuaXiang"> 重置 </view>
- <view class="screen-foot-sure" @click="screensure"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <!-- 加载组件 -->
- <u-loadings v-model="LOADING"></u-loadings>
- </view>
-
- </template>
-
- <script>
- var config = require("@/config");
- let _this
- export default {
- data() {
- return {
- keywordsIds: [], // 画像标签
- sourceList: [], //客户来源
- templateList: [], // 销讲业务
- showTemplate: true, // 展示销讲业务
- agentIdtext: '接待顾问',
- phaseList: [], // 客户阶段
- huaxiangShow: false,
- wajueArrow: true,
- wajueArrows: true,
- jieduanArrow: true,
- sourceArrow: true,
- levelArrow: true,
- zixunArrow: true,
- jiedaiArrow: true,
- luyinArrow: true,
- visitArrow: true,
- xiaojiangArrow: true,
- huaxiangList: [],
- orderBylist: [{
- label: '创建时间倒序',
- value: '1'
- },
- {
- label: '创建时间正序',
- value: '2'
- },
- {
- label: '接待时间倒序',
- value: '3'
- },
- {
- label: '接待时间正序',
- value: '4'
- },
- {
- label: '执行率正序',
- value: '5'
- },
- {
- label: '执行率倒序',
- value: '6'
- },
- {
- label: '接访次数正序',
- value: '7'
- },
- {
- label: '接访次数倒序',
- value: '8'
- },
- ],
- jiedaiList: [{
- label: "0~15min",
- value: 1,
- isShow: false,
- },
- {
- label: "16~30min",
- value: 2,
- isShow: false,
- },
- {
- label: "31~60min",
- value: 3,
- isShow: false,
- },
- {
- label: "61~90min",
- value: 4,
- isShow: false,
- },
- {
- label: "91min及以上",
- value: 5,
- isShow: false,
- },
- ],
- wajueList: [{
- label: "31%及以下",
- value: 1,
- isShow: false,
- },
- {
- label: "31%~50%",
- value: 2,
- isShow: false,
- },
- {
- label: "51%~70%",
- value: 3,
- isShow: false,
- },
- {
- label: "71%及以上",
- value: 4,
- isShow: false,
- },
- ],
- wajueLists: [{
- label: '30%及以下',
- value: 1,
- isShow: false,
- }, {
- label: '31%~50%',
- value: 2,
- isShow: false,
- }, {
- label: '51%~70%',
- value: 3,
- isShow: false,
- }, {
- label: '71%及以上',
- value: 4,
- isShow: false,
- }],
- xiaojiangList: [{
- label: "30%及以下",
- value: 1,
- isShow: false,
- },
- {
- label: "31%~50%",
- value: 2,
- isShow: false,
- },
- {
- label: "51%~70%",
- value: 3,
- isShow: false,
- },
- {
- label: "71%及以上",
- value: 4,
- isShow: false,
- },
- ],
- value: '',
- screenShow: false,
- selectshow: false,
- selectTipshow: false,
- buildingID: '',
- screen: {
- staTime: "",
- endTime: "",
- orderBy: "", // 排序
- agentId: "", //顾问
- sourceIds: [], // 客户来源
- level: [], // 客户等级
- visitRecord: [], // 到访次数
- wajueVal: [], // 需求挖掘
- xiaojiangVal: [], //销讲执行率
- jiedaiVal: [], // 接待时长
- validInvalid: null, // 录音标识
- clientStage: [], // 客户阶段 clientStage
- },
- stageList: ['未知', '到访', '意向', '定金', '成交'],
- recordList: [],
- nextPage: 1,
- totalRecord: '',
- totalRecords: '', // 总条数
- freeList: [],
- userInfo: {},
- isnorefresh: '',
- activeTotal: 5,
- activeTotal2: 0,
- totalTimeShow: false,
- timeshow: false,
- soltishow: false,
- permissions: {
- commonly1: false,
- commonly2: false
- },
- list: [], // 客户来源列表
- sourceId: '', // 选中的客户来源id
- // 不同等级之间的颜色
- colorName: [
- '', "A", "B", "C", "D"
- ],
- // 筛选文字展示
- sortFilter: '排序',
- arriveFilter: '接待时间',
- visitList: [{
- label: '首次到访',
- value: 1,
- isShow: false,
- }, {
- label: '2次到访',
- value: 2,
- isShow: false,
- }, {
- label: '3次到访',
- value: 3,
- isShow: false,
- }, {
- label: '3次以上',
- value: 4,
- isShow: false,
- }, ],
- levelList: [{
- label: 'A',
- value: 1,
- isShow: false,
- }, {
- label: 'B',
- value: 2,
- isShow: false,
- }, {
- label: 'C',
- value: 3,
- isShow: false,
- }, {
- label: 'D',
- value: 4,
- isShow: false,
- }, ],
- isRefresh: false,
- showFilterOption: false, // 筛选
- tagSign: false, // 画像标签active
- }
- },
-
- // computed: {
- // showFilterOption() {
- // return this.sortFilter !== '排序' || this.arriveFilter !== '接待时间' || this.agentIdtext !== '接待顾问'
- // }
- // },
-
- onLoad(options) {
- this.LOADING = true
- this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
- let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
- this.permissions.commonly1 = newmenulist.khgl_ck;
- this.permissions.commonly2 = newmenulist.khgl_gj;
- _this = this
- },
-
- onPullDownRefresh() {
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.LOADING = true
- this.nextPage = 1;
- this.isRefresh = true;
- this.resetFilter()
- this.reset()
- this.getFreeList()
- this.getFromSource();
- this.getMyCustom();
-
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 2000)
- },
-
- onShow() {
- this.getTabBarBadge()
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.updatebuildingID = uni.getStorageSync('updatebuildingID')
- if (this.isnorefresh != 'refresh' || this.updatebuildingID == 'updatebuildingID') {
- this.nextPage = 1;
- this.recordList = []
- this.getMyCustom()
- this.getFreeList()
- this.getWordMiningList();
- this.getCustomPhase();
- this.getFromSource();
- this.getMarketingBusiness(); // 销讲业务
- this.isRefresh = false;
- this.isnorefresh = 'refresh';
- uni.setStorageSync('updatebuildingID', '');
- }
- this.updateInit()
- },
- onReachBottom() {
- if (this.totalRecord == this.nextPage) {
- uni.showToast({
- icon: 'none',
- title: '到底了',
- duration: 2000
- });
- return
- } else {
- this.isRefresh = false;
- this.nextPage = this.nextPage + 1;
- this.getMyCustom();
- }
- },
- methods: {
-
- // 跳转编辑
- goedit(data) {
- uni.navigateTo({
- url: `/pages/center/consumer/edit?id=${data.id}&projectId=${data.projectId}`
- })
- },
- // 获取客户阶段数据
- getCustomPhase() {
- this.phaseList = [];
- this.$u
- .post("/customer/lifeTrackDefineList", {
- houseId: this.buildingID,
- })
- .then((res) => {
- if (res.length) {
- this.phaseList = res.map(item => {
- return {
- label: item.stageName,
- value: item.id,
- isShow: false
- }
- })
- } else {
- this.phaseList = []
- }
- });
- },
- // 获取客户来源
- getFromSource() {
- this.$u.get(config.service.sourceList, {
- houseId: this.buildingID
- })
- .then((res) => {
- if (res.length) {
- this.sourceList = res.map((item) => {
- return {
- label: item.sourceName,
- value: item.id,
- isShow: false
- }
- })
- } else {
- this.sourceList = []
- }
- })
- },
-
-
- max100(num) {
- if (num > 100) {
- return 100
- } else if (!num) {
- return 0;
- } else {
- return num;
- }
- },
- // 获取销讲业务
- getMarketingBusiness() {
- this.$u.get('/customer/marketingBusiness', {
- houseId: this.buildingID,
- }).then(res => {
- this.templateList = res.map(item => {
- return {
- ...item,
- isShow: false,
- }
- })
- })
- },
- updateInit() {
- this.$u.get(config.service.notReadNum, {
- id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
- projectId: uni.getStorageSync('buildingID').id
- }).then(res => {
- console.log(res)
- if (res > 0) {
- uni.setTabBarBadge({ //显示数字
- index: 4, //tabbar下标
- text: `${res}` //数字
- })
- } else {
- uni.removeTabBarBadge({
- index: 4
- })
- }
- }).catch(e => {
- uni.removeTabBarBadge({
- index: 4
- })
- })
- },
-
- filterFun() {
-
- },
- // 过滤
- resetFilter() {
- this.sortFilter = '排序';
- this.agentIdtext = '接待顾问';
- this.screen.orderBy = null;
- this.arriveFilter = '接待时间';
- this.screen.staTime = '';
- this.screen.endTime = '';
- this.nextPage = 1;
- this.activeTotal = 5;
- this.recordList = [];
- this.activeTotal2 = 0;
- },
- //选择排序
- selectCallback2(e) {
- this.sortFilter = e.label;
- this.screen.orderBy = e.value;
- this.nextPage = 1;
- this.recordList = [];
- this.soltishow = false;
- this.isRefresh = false;
- this.getMyCustom();
- },
- //时间选择
- tabtimetap(index, text) {
- this.timeshow = false;
- if (text) this.arriveFilter = text
- if (index == 4) {
- this.totalTimeShow = true;
- } else {
- this.activeTotal = index;
- this.screen.staTime = '';
- this.screen.endTime = '';
- this.nextPage = 1;
- this.isRefresh = false;
- this.recordList = [];
- this.getMyCustom();
- }
- },
- //自定义时间
- totalTimeChange(e) {
- this.screen.staTime = e.startDate;
- this.screen.endTime = e.endDate;
- this.activeTotal = 4;
- this.nextPage = 1;
- this.recordList = [];
- this.isRefresh = false;
- this.arriveFilter = this.screen.staTime + '-' + this.screen.endTime
- this.getMyCustom();
- },
-
- choice(item) {
- item.isShow = !item.isShow;
- },
- // 客户详情
- gotoDetail(id) {
- if (this.permissions.commonly1 == true) {
- uni.navigateTo({
- url: `/pages/center/consumer/consumerDetail?id=${id}`
- })
- }
- },
- getMyCustom() {
- this.screen.visitRecord = []
- this.screen.jiedaiVal = []
- this.screen.wajueVal = []
- this.screen.xiaojiangVal = []
- this.screen.level = []
- this.screen.clientStage = []
- this.screen.sourceIds = []
- let dateType = 0;
- if (this.activeTotal == 5 || this.activeTotal == 4) {
- dateType = null;
- } else {
- dateType = this.activeTotal;
- }
- // 到访次数
- this.visitList.forEach(i => {
- if (i.isShow) this.screen.visitRecord.push(i.value)
- })
- // 接待时长
- this.jiedaiList.forEach(i => {
- if (i.isShow) this.screen.jiedaiVal.push(i.value)
- })
- // 需求挖掘
- this.wajueList.forEach(i => {
- if (i.isShow) this.screen.wajueVal.push(i.value)
- })
- // 需求挖掘成功
- this.wajueLists.forEach(i => {
- if (i.isShow) this.screen.wajueVals.push(i.value)
- })
- // 销讲执行率
- this.xiaojiangList.forEach(i => {
- if (i.isShow) this.screen.xiaojiangVal.push(i.value)
- })
- // 客户等级
- this.levelList.forEach(i => {
- if (i.isShow) this.screen.level.push(i.value)
- })
- //客户阶段
- this.phaseList.forEach(i => {
- if (i.isShow) this.screen.clientStage.push(i.value)
- })
- // 客户来源
- this.sourceList.forEach(i => {
- if (i.isShow) this.screen.sourceIds.push(i.value)
- })
- var parames = {
- pageNum: this.nextPage,
- pageSize: 10,
- query: {
- projectId: this.buildingID,
- fractions: this.screen.xiaojiangVal.length ? this.screen.xiaojiangVal.join(',') : '', // 销讲执行率
- wordFractions: this.screen.wajueVal.length ? this.screen.wajueVal.join(',') : '', //需求挖掘
- visitRecordNum: this.screen.visitRecord.length ? this.screen.visitRecord.join(',') : '', //到访次数
- clientStages: this.screen.clientStage.length ? this.screen.clientStage.join(',') : '', // 客户阶段
- sourceIds: this.screen.sourceIds.length ? this.screen.sourceIds.join(',') : '', // 客户来源
- level: this.screen.level.length ? this.screen.level.join(',') : '', // 客户等级
- duractionNums: this.screen.jiedaiVal.length ? this.screen.jiedaiVal.join(',') : '', // 接待时长
- keywordsIds: this.keywordsIds.length ? this.keywordsIds.join(',') : '', // 画像标签
- dateType: dateType, // 接待时间
- staTime: this.screen.staTime,
- endTime: this.screen.endTime,
- agentId: this.screen.agentId, // 顾问
- orderBy: this.screen.orderBy == '' ? '' : this.screen.orderBy, // 排序
- },
- };
- let ars = []
- this.templateList.forEach(item => {
- if (item.isShow) {
- ars.push(item.id)
- }
- })
- parames.query.marketingBusiness = ars.join(',')
-
- this.$u.post("/customer/customerManagement", parames)
- .then((data) => {
- this.LOADING = false;
- var list = data.records || [];
- list.forEach((item) => {
- if (this.userInfo.dataCode == 6) {
- item.isshow = true;
- } else {
- item.isshow = false;
- }
- });
- if (this.isRefresh) {
- this.recordList = list;
- } else {
- this.recordList = [...this.recordList, ...list];
- }
- this.totalRecord = data.pages;
- this.totalRecords = data.total;
- })
- .catch((e) => {
- this.LOADING = false;
- });
- },
- getMyCustom1() {
- let dateType = 0;
- let recDurationInterval = 0;
- let orderBy = 0;
- if (this.activeTotal == 5) {
- dateType = null;
- } else if (this.activeTotal == 4) {
- dateType = null;
- } else {
- dateType = this.activeTotal;
- }
-
- if (this.activeTotal2 == 0) {
- recDurationInterval = null
- } else {
- recDurationInterval = this.activeTotal2
- }
-
- if (this.orderBy == 0) {
- orderBy = null;
- } else {
- orderBy = this.orderBy;
- }
-
- var parames = {
- pageNum: this.nextPage,
- pageSize: 10,
- query: {
- projectId: this.buildingID,
- keywordsId: this.screen.cunsumerTipsid,
- agentId: this.screen.agentId,
- dateType: dateType,
- staDate: this.screen.staTime,
- endDate: this.screen.endTime,
- recDurationInterval: recDurationInterval,
- orderBy: orderBy,
- sourceId: this.sourceId
- }
- };
- if (this.screen.visitRecord.length > 0) {
- parames.query.visitRecords = this.screen.visitRecord.join(',');
- }
- if (this.screen.record.length > 0) {
- parames.query.level = this.screen.record.join(',');
- }
- this.$u.post("/customer/customerManagement", parames).then(data => {
- this.LOADING = false
- var list = data.results || [];
- list.forEach(item => {
- if (item.demand.cusSemanticWordsList != null) {
- item.demand.cusSemanticWordsList.forEach(che => {
- if (che.isInterval == 0) {
- che.name = che.name + che.unit + '-' + che.endName + che.unit;
- }
- })
- }
- })
- if (this.isRefresh) {
- this.recordList = list;
- } else {
- console.log('我在这里被打印了', this.recordList)
- this.recordList = [...this.recordList, ...list];
- }
- this.totalRecord = data.totalPage;
- this.totalRecords = data.totalRecord;
- }).catch(e => {
- this.LOADING = false
- })
- },
- //获取顾问列表
- getFreeList() {
- this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
- houseId: this.buildingID
- }).then(res => {
- res.forEach(item => {
- item.label = item.name;
- item.value = item.accountId
- })
- res.unshift({
- label: '全部',
- value: ''
- })
- this.freeList = res
- console.log(this.freeList)
- })
- },
- //获取画像标签
- getWordMiningList() {
- this.huaxiangList = [];
- this.$u.get("/corpus/findSelectedWordMiningTemplate", {
- houseId: this.buildingID,
- selected: 1
- })
- .then((res) => {
- // console.log(res)
- if (res.length) {
- res.forEach(item => {
- item.isShow = true;
- if (item.children.length) {
- item.children.forEach(subitem => {
- subitem.isShow = false;
- })
- }
- })
- }
- this.huaxiangList = res;
- });
- },
-
- //选择顾问
- actionSelectCallback(e) {
- console.log(e)
- if (e[0].label == '全部') {
- this.agentIdtext = '接待顾问'
- this.screen.agentId = ''
- } else {
- this.screen.agentId = e[0].value;
- this.agentIdtext = e[0].label;
- }
- },
-
- //重置
- reset() {
- this.screen = {
- agentId: "",
- visitRecord: [],
- record: [],
- clientStage: "",
- clientStageName: "",
- };
- this.sourceList.map((i) => {
- i.isShow = false;
- });
- this.wajueList.map((i) => {
- i.isShow = false;
- });
- this.wajueLists.forEach(i => {
- i.isShow = false
- })
- this.phaseList.map((i) => {
- i.isShow = false;
- });
- this.jiedaiList.map((i) => {
- i.isShow = false;
- });
- this.xiaojiangList.map((i) => {
- i.isShow = false;
- });
- this.visitList.map((i) => {
- i.isShow = false;
- });
- this.levelList.map((i) => {
- i.isShow = false;
- });
- this.nextPage = 1;
- this.recordList = [];
- this.isRefresh = false;
- this.getMyCustom();
- },
- //重置画像标签选择
- resetHuaXiang() {
- if (this.huaxiangList.length) {
- this.huaxiangList.forEach(item => {
- item.isShow = true;
- if (item.children.length) {
- item.children.forEach(subitem => {
- subitem.isShow = false;
- })
- }
- })
- }
- },
-
- chooseMores() {
- let change1 = this.templateList.some(item => item.isShow == true)
- let change2 = this.jiedaiList.some(item => item.isShow == true)
- let change3 = this.levelList.some(item => item.isShow == true)
- let change4 = this.sourceList.some(item => item.isShow == true)
- let change5 = this.phaseList.some(item => item.isShow == true)
- let change6 = this.wajueList.some(item => item.isShow == true)
- let change9 = this.wajueLists.some(item => item.isShow == true)
- let change7 = this.xiaojiangList.some(item => item.isShow == true)
- let change8 = this.visitList.some(item => item.isShow == true)
- if (change1 || change2 || change3 || change4 || change5 || change6 || change7 || change8 || change9) {
- return true
- } else {
- return false
- }
- },
-
- chooseMore() {
- let a = false
- this.huaxiangList.forEach(item => {
- if (item.children.some(so => so.isShow == true)) {
- a = true
- }
- })
- return a
- },
-
- //筛选确认
- screensure() {
- this.showFilterOption = this.chooseMores()
- this.tagSign = this.chooseMore()
- this.nextPage = 1;
- this.recordList = [];
- this.keywordsIds = []
- this.screenShow = false;
- this.huaxiangShow = false;
- this.isRefresh = false;
- // 画像标签
- this.huaxiangList.forEach(item => {
- if (item.children.length) {
- item.children.forEach(im => {
- if (im.isShow) this.keywordsIds.push(im.id)
- })
- }
- })
- this.getMyCustom();
- },
- goSearch() {
- uni.navigateTo({
- url: '/pages/center/consumer/consumerSearch'
- });
- },
- gotoFollowUp(item) {
- uni.navigateTo({
- url: `/pages/center/consumer/newFollowup/newFollowup?id=${item.id}&level=${item.level}&clientStageName=${item.clientStageName}`
- })
- },
- },
-
- filters: {
- // 筛选等级展示文字
- levelText(level) {
- let str = '';
- switch (Number(level)) {
- case 1:
- str = "A"
- break;
- case 2:
- str = "B"
- break;
- case 3:
- str = "C"
- break;
- case 4:
- str = "D"
- break;
- default:
- str = ''
- break;
- }
- return str
- },
-
- // 加密手机
- phoneText(mobile) {
- if (!mobile) return '--'
- if (_this.userInfo.showPhoneStatus == 1) return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
- else return mobile
- },
-
- // 格式化时间
- formatTime(time) {
- if (!time) return
- return time.substring(5, time.length)
- }
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .box {
- width: 100vw;
- min-height: calc(100vh - var(--window-top));
- background: #F8F8F8;
- display: flex;
- flex-direction: column;
-
- .top-search {
- display: flex;
- align-items: center;
- justify-content: space-between;
- background: #fff;
- padding-right: 30rpx;
-
- .filter-icon {
- width: 40rpx;
- height: 40rpx;
- padding: 15rpx;
- }
-
- .search-box {
- width: 670rpx;
- height: 102rpx;
- background: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .search {
- width: 94%;
- height: 70rpx;
- display: flex;
- align-items: center;
- background: #f8f8f8;
- border-radius: 33rpx;
-
- .search-img {
- width: 26rpx;
- height: 30rpx;
- margin-left: 20rpx;
-
- .search-img1 {
- width: 100%;
- height: 100%;
- margin-top: 2rpx;
- }
- }
-
- .search-text {
- font-size: 28rpx;
- font-weight: 400;
- color: #999999;
- margin-left: 10rpx;
- }
- }
-
- .search-screen {
- width: 40rpx;
- height: 40rpx;
- margin-left: 30rpx;
-
- .search-screen1 {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
-
- .content {
- flex-grow: 1;
- }
- }
-
- .timeview {
- height: 90rpx;
- line-height: 90rpx;
- width: 100%;
- text-align: center;
- border-bottom: 1rpx solid #F8F8F8;
- }
-
- //时间切换的样式
- .boxtittab {
- position: sticky;
- top: var(--window-top);
- z-index: 999;
- width: 100;
- height: 72rpx;
- background: #FFFFFF;
- flex-shrink: 0;
- display: flex;
- align-items: center;
-
- .tabbox {
- flex: 1;
- height: 100%;
- text-align: center;
- line-height: 72rpx;
- color: #666666;
- font-size: 28rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- /* 将对象作为弹性伸缩盒子模型显示 */
- -webkit-line-clamp: 1;
- /* 控制最多显示几行 */
- -webkit-box-orient: vertical;
- /* 设置或检索伸缩盒对象的子元素的排列方式 */
- }
-
- .activeColor {
- color: #2671E2;
- font-weight: bold;
- }
- }
-
- .soltishow {
- width: 100%;
- min-height: 40vh;
-
- .soltishow-item {
- width: 100%;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
-
- .count {
- width: 100%;
- height: 82rpx;
- line-height: 82rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #f8f8f8;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
-
- text {
- color: #E7483C;
- }
- }
-
-
- .content {
- .content-tips {
- background: #fff;
- margin-bottom: 20rpx;
-
- .content-first {
- padding: 19rpx 30rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- color: #292929;
- height: 90rpx;
- font-size: 30rpx;
-
- .left {
- display: flex;
- align-items: center;
-
- .img {
- width: 48rpx;
- height: 48rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 16rpx;
- background: #E6625B;
- border-radius: 6rpx;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- }
-
- .A {
- background: #E6625B;
- }
-
- .B {
- background: #FF981E;
- }
-
- .C {
- background: #F6BD16;
- }
-
- .D {
- background: #E6625B;
- }
-
-
- .test {
- height: 42rpx;
- font-size: 30rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 42rpx;
- margin-right: 16rpx;
- }
- }
-
- .right {
- display: flex;
- align-items: center;
- color: #2671E2;
- font-size: 30rpx;
- align-items: flex-end;
-
- .clientStageName {
- font-size: 38rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: bold;
- // color: #FF981E;
- height: 48rpx;
- line-height: 48rpx;
- background: #FFFFFF;
- // border-radius: 4rpx;
- // border: 1rpx solid #FF981E;
- box-sizing: border-box;
- }
-
- .right-img {
- margin: 5rpx 0 0 10rpx;
- width: 14rpx;
- height: 30rpx;
- }
- }
- }
-
-
-
- .content-sec {
- border-top: 1px solid #e0e0e0;
- padding: 0 30rpx;
- position: relative;
-
- .content-sec-lab {
- margin-top: 28rpx;
- display: flex;
- justify-content: space-between;
- font-size: 30rpx;
- font-weight: 400;
- color: #666666;
- line-height: 42rpx;
-
- .content-sec-lab1 {
- color: #333333;
- word-break: break-all;
- }
-
- .content-sec-lab1-min {
- flex-shrink: 0;
- margin-bottom: 20rpx;
- padding: 0 10rpx;
- background: rgba($color: #2671e2, $alpha: 1);
- color: #fff;
- border-radius: 8rpx;
- }
-
- .content-sec-tips {
- max-width: 160rpx;
- height: 46rpx;
- background: #f2f2f2;
- border-radius: 6rpx;
- text-align: center;
- line-height: 26rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- margin-right: 20rpx;
- box-sizing: border-box;
- padding: 10rpx 24rpx;
- }
- }
-
- .content-sec-num {
- position: absolute;
- width: 200rpx;
- height: 90rpx;
- background: #f4f8fd;
- border-radius: 12rpx;
- font-weight: 400;
- color: #2671e2;
- line-height: 45rpx;
- bottom: 30rpx;
- right: 30rpx;
- text-align: center;
- }
- }
-
- .content-last {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding-bottom: 30rpx;
-
- .content-last-tab {
- width: 214rpx;
- height: 70rpx;
- line-height: 70rpx;
- background: #FFFFFF;
- border-radius: 8rpx;
- border: 1rpx solid #2671E2;
- box-sizing: border-box;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #2671E2;
- font-size: 30rpx;
- margin-right: 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-
- image {
- width: 40rpx;
- height: 40rpx;
- margin-right: 12rpx;
- }
-
-
- .icon {
- width: 40rpx;
- height: 40rpx;
- margin-right: 12rpx;
- }
- }
- }
-
- }
- }
-
- // 这是弹出层
- .screen {
- .screen-record {
- overflow: hidden;
- padding: 0 30rpx;
- box-sizing: border-box;
- border-bottom: 1px solid #e0e0e0;
-
- .screen-record-text {
- font-weight: 600;
- padding: 30rpx 0;
- font-size: 30rpx;
- color: #333333;
- line-height: 30rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .arrow {
- width: 30rpx;
- height: 14rpx;
- }
- }
-
- .screen-record-tab {
- margin-top: 30rpx;
- padding-bottom: 10rpx;
- display: flex;
- flex-wrap: wrap;
-
- .screen-record-item {
- min-width: 150rpx;
- padding: 0 14rpx;
- height: 60rpx;
- border-radius: 8rpx;
- text-align: center;
- line-height: 60rpx;
- margin: 0 22rpx 22rpx 0;
-
- &:nth-child(4n) {
- margin-right: 0;
- }
- }
-
- .screen-record-chose {
- background: #f1f6fd;
- color: #2671e2;
- }
-
- .screen-record-nochose {
- background: #f7f8fa;
- color: #333;
- }
- }
- }
-
- .screen-foot {
- width: 100%;
- height: 78rpx;
- display: flex;
- margin: 30rpx 30rpx 0;
-
- .screen-foot-reset {
- width: 176rpx;
- height: 78rpx;
- line-height: 78rpx;
- background: #FFFFFF;
- border-radius: 8rpx;
- border: 1px solid #2671E2;
- margin-right: 30rpx;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #2671E2;
- text-align: center;
- }
-
- .screen-foot-sure {
- width: 484rpx;
- height: 78rpx;
- line-height: 78rpx;
- background: #2671E2;
- border: 1px solid #2671E2;
- border-radius: 8rpx;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- text-align: center;
- }
- }
- }
- </style>
|