選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

1391 行
36 KiB

  1. <template>
  2. <view class="box">
  3. <view class="top-search">
  4. <view class="search-box">
  5. <view class="search" @click="goSearch">
  6. <view class="search-img">
  7. <image class="search-img1" src="../../../static/images/search.png" mode=""></image>
  8. </view>
  9. <view class="search-text">输入客户姓名/手机号</view>
  10. </view>
  11. </view>
  12. <image class="filter-icon" @click="screenShow = true"
  13. src="https://static.quhouse.com/f4feade4a19d413085b591612179457f.png" mode="" />
  14. </view>
  15. <!-- 选择器 -->
  16. <view class="boxtittab" style="border: none">
  17. <view class="tabbox" @click="soltishow = true" :style="sortFilter=='排序'?'color:#666':'color:#409eff'">
  18. {{ sortFilter }}
  19. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  20. </view>
  21. <view class="tabbox" @click="timeshow = true" :style="arriveFilter=='到访时间'?'color:#666':'color:#409eff'">
  22. {{ arriveFilter }}
  23. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  24. </view>
  25. <view class="tabbox" @click="selectshow = true"
  26. :style="receptionDuration=='所属顾问'?'color:#666':'color:#409eff'">
  27. {{ receptionDuration }}
  28. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  29. </view>
  30. <view class="tabbox" @click="huaxiangShow = true">
  31. 画像标签
  32. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
  33. </view>
  34. </view>
  35. <view class="count" v-if="recordList.length > 0">
  36. 筛选结果:<text>{{ totalRecords }} </text>条
  37. </view>
  38. <view class="content">
  39. <view v-if="recordList.length == 0" style="width: 100%; height: 100%; display: flex; align-items: center">
  40. <view style="width: 100%; padding-top: 200rpx; background: #ffffff">
  41. <view style="width: 100%; text-align: center">
  42. <image style="width: 220rpx; height: 200rpx"
  43. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  44. </view>
  45. <view style="
  46. text-align: center;
  47. width: 100%;
  48. margin-top: 20rpx;
  49. color: #999999;
  50. ">暂无数据</view>
  51. </view>
  52. </view>
  53. <view v-if="recordList.length != 0" class="content-tips" v-for="(item, index) in recordList" :key="index"
  54. @click="gotoDetail(item.id)">
  55. <view class="content-first">
  56. <view class="left">
  57. <view v-if="item.level.length == 0"></view>
  58. <view class="img" v-else-if="item.level == 1">A</view>
  59. <view class="img" v-else-if="item.level == 2">B</view>
  60. <view class="img" v-else-if="item.level == 3">C</view>
  61. <view class="img" v-else-if="item.level == 4">D</view>
  62. <view class="test">{{ item.name }}</view>
  63. </view>
  64. <view class="right">
  65. <view class="test">销讲执行:<text class="blue">{{ max100(item.fraction)}}%</text></view>
  66. </view>
  67. </view>
  68. <view class="content-sec">
  69. <view class="content-sec-lab">
  70. <view class="content-sec-lab1">手机号码:{{ item.phone || "--" }}</view>
  71. <view class="content-sec-lab1" style="width: 44%">到访次数:{{ item.visitRecord || 0 }}次/{{
  72. item.mm || 0
  73. }}min</view>
  74. </view>
  75. <view class="content-sec-lab">
  76. <view class="content-sec-lab1">挖掘执行/成功:{{ max100(item.wordFraction) }}%/{{ max100(item.wordFinishFraction) }}%</view>
  77. <view class="content-sec-lab1" style="width: 44%">
  78. 客户意向率:{{ `${item.levelFraction||'0'}%` }}
  79. </view>
  80. <!-- <view class="content-sec-lab1" style="width: 44%"
  81. >画像标签:<text style="font-weight: 600">{{
  82. item.demand.cusSemanticWordsList.length || 0
  83. }}</text></view
  84. > -->
  85. </view>
  86. <view class="content-sec-lab">
  87. <view class="content-sec-lab1">所属顾问:{{ item.agentName || "--" }}</view>
  88. <view class="content-sec-lab1" style="width: 44%">客户阶段:{{ item.stageName || "--" }}</view>
  89. </view>
  90. <view class="content-sec-lab">
  91. <view class="content-sec-lab1">上次到访:{{ item.createTime || "--" }}</view>
  92. </view>
  93. </view>
  94. <view class="content-last">
  95. <view v-if="userInfo.dataCode == 6" class="content-last-tab" @click.stop="gotoFollowUp(item.id)">
  96. <image class="icon" src="https://static.quhouse.com/3730fc3a185c4d65ae6a1821601038ab.png"
  97. mode="" />
  98. 写跟进
  99. </view>
  100. <view class="content-last-tab" v-if="checkAuthority('客户编辑')" @click.stop="goedit(item)">
  101. <image class="icon" src="https://static.quhouse.com/5daebdec0aad4f63a62d3720437034bc.png"
  102. mode="" />
  103. 打标签
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 更多筛选 -->
  109. <u-popup v-model="screenShow" mode="top" height="900">
  110. <view class="screen">
  111. <scroll-view scroll-y="true" style="height: 750rpx;">
  112. <!-- 销讲业务 -->
  113. <view class="screen-record">
  114. <view class="screen-record-text" @click="showTemplate=!showTemplate">
  115. 销讲业务
  116. <image v-if="showTemplate" class="arrow"
  117. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  118. <image v-else class="arrow"
  119. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  120. </view>
  121. <view class="screen-record-tab" v-if="showTemplate">
  122. <block v-for="(item,index) in templateList" :key="index">
  123. <view class="screen-record-item"
  124. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  125. @click="choice(item)">
  126. {{item.templateName}}
  127. </view>
  128. </block>
  129. </view>
  130. </view>
  131. <!-- 接待时长 -->
  132. <view class="screen-record">
  133. <view class="screen-record-text" @click="jiedaiArrow = !jiedaiArrow">
  134. 接待时长
  135. <image v-if="jiedaiArrow" class="arrow"
  136. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  137. <image v-else class="arrow"
  138. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  139. </view>
  140. <view class="screen-record-tab" v-if="jiedaiArrow">
  141. <block v-for="(item, index) in jiedaiList" :key="index">
  142. <view class="screen-record-item" :class="[
  143. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  144. ]" @click="choice(item)">
  145. {{ item.label }}
  146. </view>
  147. </block>
  148. </view>
  149. </view>
  150. <!-- 客户等级 -->
  151. <view class="screen-record">
  152. <view class="screen-record-text" @click="levelArrow = !levelArrow">
  153. 意向等级
  154. <image v-if="levelArrow" class="arrow"
  155. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  156. <image v-else class="arrow"
  157. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  158. </view>
  159. <view class="screen-record-tab" v-if="levelArrow">
  160. <block v-for="(item, index) in levelList" :key="index">
  161. <view class="screen-record-item" :class="[
  162. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  163. ]" @click="choice(item)">
  164. {{ item.label }}
  165. </view>
  166. </block>
  167. </view>
  168. </view>
  169. <!-- 客户来源 -->
  170. <view class="screen-record">
  171. <view class="screen-record-text" @click="sourceArrow = !sourceArrow">
  172. 客户来源
  173. <image v-if="sourceArrow" class="arrow"
  174. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  175. <image v-else class="arrow"
  176. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  177. </view>
  178. <view class="screen-record-tab" v-if="sourceArrow">
  179. <block v-for="(item, index) in sourceList" :key="index">
  180. <view class="screen-record-item" :class="[
  181. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  182. ]" @click="choice(item)">
  183. {{ item.label }}
  184. </view>
  185. </block>
  186. </view>
  187. </view>
  188. <!-- 客户阶段 -->
  189. <view class="screen-record">
  190. <view class="screen-record-text" @click="jieduanArrow = !jieduanArrow">
  191. 客户阶段
  192. <image v-if="jieduanArrow" class="arrow"
  193. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  194. <image v-else class="arrow"
  195. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  196. </view>
  197. <view class="screen-record-tab" v-if="jieduanArrow">
  198. <block v-for="(item, index) in phaseList" :key="index">
  199. <view class="screen-record-item" :class="[
  200. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  201. ]" @click="choice(item)">
  202. {{ item.label }}
  203. </view>
  204. </block>
  205. </view>
  206. </view>
  207. <!-- 需求挖掘率 -->
  208. <view class="screen-record">
  209. <view class="screen-record-text" @click="wajueArrow = !wajueArrow">
  210. 需求挖掘率
  211. <image v-if="wajueArrow" class="arrow"
  212. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  213. <image v-else class="arrow"
  214. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  215. </view>
  216. <view class="screen-record-tab" v-if="wajueArrow">
  217. <block v-for="(item, index) in wajueList" :key="index">
  218. <view class="screen-record-item" :class="[
  219. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  220. ]" @click="choice(item)">
  221. {{ item.label }}
  222. </view>
  223. </block>
  224. </view>
  225. </view>
  226. <!-- 销讲执行率 -->
  227. <view class="screen-record">
  228. <view class="screen-record-text" @click="xiaojiangArrow = !xiaojiangArrow">
  229. 销讲执行率
  230. <image v-if="xiaojiangArrow" class="arrow"
  231. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  232. <image v-else class="arrow"
  233. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  234. </view>
  235. <view class="screen-record-tab" v-if="xiaojiangArrow">
  236. <block v-for="(item, index) in xiaojiangList" :key="index">
  237. <view class="screen-record-item" :class="[
  238. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  239. ]" @click="choice(item)">
  240. {{ item.label }}
  241. </view>
  242. </block>
  243. </view>
  244. </view>
  245. <!-- 到访次数 -->
  246. <view class="screen-record">
  247. <view class="screen-record-text" @click="visitArrow = !visitArrow">
  248. 到访次数
  249. <image v-if="visitArrow" class="arrow"
  250. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  251. <image v-else class="arrow"
  252. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  253. </view>
  254. <view class="screen-record-tab" v-if="visitArrow">
  255. <block v-for="(item, index) in visitList" :key="index">
  256. <view class="screen-record-item" :class="[
  257. item.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  258. ]" @click="choice(item)">
  259. {{ item.label }}
  260. </view>
  261. </block>
  262. </view>
  263. </view>
  264. </scroll-view>
  265. <view class="screen-foot">
  266. <view class="screen-foot-reset" @click="reset"> 重置 </view>
  267. <view class="screen-foot-sure" @click="screensure"> 确定 </view>
  268. </view>
  269. </view>
  270. </u-popup>
  271. <!-- 选择顾问的选择框 -->
  272. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  273. <!-- 客户阶段 -->
  274. <!-- <u-select
  275. v-model="selectPhaseShow"
  276. :list="phaseList"
  277. @confirm="selectPhase"
  278. ></u-select> -->
  279. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  280. <!-- 到访时间 -->
  281. <u-popup v-model="timeshow" mode="bottom">
  282. <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
  283. @click="tabtimetap(5, '接待时间')">
  284. 全部</view>
  285. <view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
  286. @click="tabtimetap(0, '今天')">
  287. 今天</view>
  288. <view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
  289. @click="tabtimetap(1, '昨天')">
  290. 昨天</view>
  291. <view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
  292. @click="tabtimetap(2, '近7天')">
  293. 近7天</view>
  294. <view class="timeview" :style="{ color: activeTotal == 6 ? '#2B6EFF' : '#333333' }"
  295. @click="tabtimetap(6, '近30天')">
  296. 近30天</view>
  297. <view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
  298. 自定义</view>
  299. </u-popup>
  300. <!-- 画像标签 -->
  301. <u-popup v-model="huaxiangShow" mode="top" height="850">
  302. <view class="screen">
  303. <scroll-view scroll-y="true" style="height: 700rpx;">
  304. <view class="screen-record" v-if="item.children.length" v-for="(item,index) in huaxiangList"
  305. :key="index">
  306. <view class="screen-record-text" @click="choice(item)">
  307. {{item.name}}
  308. <image v-if="item.isShow" class="arrow"
  309. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  310. <image v-else class="arrow"
  311. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  312. </view>
  313. <view class="screen-record-tab" v-if="item.isShow">
  314. <block v-for="(subitem, ind) in item.children" :key="ind">
  315. <view class="screen-record-item" :class="[
  316. subitem.isShow ? 'screen-record-chose' : 'screen-record-nochose',
  317. ]" @click="choice(subitem)">
  318. {{ subitem.name }}
  319. </view>
  320. </block>
  321. </view>
  322. </view>
  323. </scroll-view>
  324. <view class="screen-foot">
  325. <view class="screen-foot-reset" @click="resetHuaXiang"> 重置 </view>
  326. <view class="screen-foot-sure" @click="screensure"> 确定 </view>
  327. </view>
  328. </view>
  329. </u-popup>
  330. <!-- 排序 -->
  331. <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select>
  332. <!-- 加载组件 -->
  333. <loading v-model="LOADING"></loading>
  334. </view>
  335. </template>
  336. <script>
  337. import loading from "@/components/loading/index.vue";
  338. const config = require("@/config");
  339. export default {
  340. components: {
  341. loading,
  342. },
  343. data() {
  344. return {
  345. huaxiangShow: false,
  346. wajueArrow: true,
  347. jieduanArrow: true,
  348. sourceArrow: true,
  349. levelArrow: true,
  350. zixunArrow: true,
  351. jiedaiArrow: true,
  352. luyinArrow: true,
  353. visitArrow: true,
  354. xiaojiangArrow: true,
  355. huaxiangList: [],
  356. orderBylist: [{
  357. label: "创建时间倒序",
  358. value: "1",
  359. },
  360. {
  361. label: "创建时间正序",
  362. value: "2",
  363. },
  364. {
  365. label: "接待时间倒序",
  366. value: "3",
  367. },
  368. {
  369. label: "接待时间正序",
  370. value: "4",
  371. },
  372. {
  373. label: "执行率倒序",
  374. value: "5",
  375. },
  376. {
  377. label: "执行率正序",
  378. value: "6",
  379. },
  380. {
  381. label: "接访次数正序",
  382. value: "7",
  383. },
  384. {
  385. label: "接访次数倒序",
  386. value: "8",
  387. },
  388. {
  389. label: "需求挖掘率正序",
  390. value: "9",
  391. },
  392. {
  393. label: "需求挖掘率倒序",
  394. value: "10",
  395. },
  396. ],
  397. zixunList: [{
  398. label: "一期住宅",
  399. value: 1,
  400. isShow: false,
  401. },
  402. {
  403. label: "二期住宅",
  404. value: 2,
  405. isShow: false,
  406. },
  407. {
  408. label: "三期住宅",
  409. value: 3,
  410. isShow: false,
  411. },
  412. {
  413. label: "商铺",
  414. value: 4,
  415. isShow: false,
  416. },
  417. ],
  418. jiedaiList: [{
  419. label: "0~15min",
  420. value: 1,
  421. isShow: false,
  422. },
  423. {
  424. label: "16~30min",
  425. value: 2,
  426. isShow: false,
  427. },
  428. {
  429. label: "31~60min",
  430. value: 3,
  431. isShow: false,
  432. },
  433. {
  434. label: "61~90min",
  435. value: 4,
  436. isShow: false,
  437. },
  438. {
  439. label: "91min及以上",
  440. value: 5,
  441. isShow: false,
  442. },
  443. ],
  444. wajueList: [{
  445. label: "31%及以下",
  446. value: 1,
  447. isShow: false,
  448. },
  449. {
  450. label: "31%~50%",
  451. value: 2,
  452. isShow: false,
  453. },
  454. {
  455. label: "51%~70%",
  456. value: 3,
  457. isShow: false,
  458. },
  459. {
  460. label: "71%及以上",
  461. value: 4,
  462. isShow: false,
  463. },
  464. ],
  465. xiaojiangList: [{
  466. label: "30%及以下",
  467. value: 1,
  468. isShow: false,
  469. },
  470. {
  471. label: "31%~50%",
  472. value: 2,
  473. isShow: false,
  474. },
  475. {
  476. label: "51%~70%",
  477. value: 3,
  478. isShow: false,
  479. },
  480. {
  481. label: "71%及以上",
  482. value: 4,
  483. isShow: false,
  484. },
  485. ],
  486. screenShow: false,
  487. selectshow: false,
  488. selectPhaseShow: false, //客户阶段
  489. buildingID: "",
  490. screen: {
  491. staTime: "",
  492. endTime: "",
  493. orderBy: "", // 排序
  494. agentId: "", //顾问
  495. sourceIds: [], // 客户来源
  496. level: [], // 客户等级
  497. visitRecord: [], // 到访次数
  498. // zixunVal: [],// 咨询业务
  499. wajueVal: [], // 需求挖掘
  500. xiaojiangVal: [], //销讲执行率
  501. jiedaiVal: [], // 接待时长
  502. validInvalid: null, // 录音标识
  503. clientStage: [], // 客户阶段 clientStage
  504. },
  505. recordList: [],
  506. nextPage: 1,
  507. totalRecord: "",
  508. freeList: [],
  509. userInfo: {},
  510. phaseList: [], //客户阶段
  511. isnorefresh: "",
  512. activeTotal: 5,
  513. totalTimeShow: false,
  514. timeshow: false,
  515. soltishow: false,
  516. totalRecords: "",
  517. visitList: [{
  518. label: "首次到访",
  519. value: 1,
  520. isShow: false,
  521. },
  522. {
  523. label: "2次到访",
  524. value: 2,
  525. isShow: false,
  526. },
  527. {
  528. label: "3次到访",
  529. value: 3,
  530. isShow: false,
  531. },
  532. {
  533. label: "3次以上",
  534. value: 4,
  535. isShow: false,
  536. },
  537. ],
  538. levelList: [{
  539. label: "A",
  540. value: 1,
  541. isShow: false,
  542. },
  543. {
  544. label: "B",
  545. value: 2,
  546. isShow: false,
  547. },
  548. {
  549. label: "C",
  550. value: 3,
  551. isShow: false,
  552. },
  553. {
  554. label: "D",
  555. value: 4,
  556. isShow: false,
  557. },
  558. ],
  559. sourceList: [], //客户来源
  560. keywordsIds: [], // 画像标签
  561. isRefresh: false,
  562. // 筛选文字展示
  563. sortFilter: "排序",
  564. arriveFilter: "到访时间",
  565. receptionDuration: "所属顾问",
  566. templateList: [], // 销讲业务
  567. showTemplate: true, // 展示销讲业务
  568. };
  569. },
  570. onLoad(options) {
  571. this.LOADING = true;
  572. this.isnorefresh = options.refresh;
  573. if (options.dataType) this.activeTotal = options.dataType
  574. if (options.staTime) this.screen.staTime = options.staTime
  575. if (options.endTime) this.screen.endTime = options.endTime
  576. },
  577. onShow() {
  578. // dataCode: 身份标识 2:项目总、3:客服、4:策划、5:经理、6:置业顾问
  579. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  580. if (this.isnorefresh == "refresh") {
  581. this.buildingID = uni.getStorageSync("buildingID").id;
  582. this.nextPage = 1;
  583. this.recordList = [];
  584. this.isRefresh = false;
  585. this.getMyCustom();
  586. this.getFreeList();
  587. this.getWordMiningList();
  588. this.getCustomPhase();
  589. this.getFromSource();
  590. this.getMarketingBusiness();
  591. this.isnorefresh = "";
  592. }
  593. },
  594. onPullDownRefresh() {
  595. this.resetFilter();
  596. this.isRefresh = true;
  597. this.nextPage = 1;
  598. this.getMyCustom();
  599. setTimeout(() => {
  600. uni.stopPullDownRefresh();
  601. }, 1000);
  602. },
  603. onReachBottom() {
  604. if (this.totalRecord == this.nextPage) {
  605. uni.showToast({
  606. icon: "none",
  607. title: "到底了",
  608. duration: 2000,
  609. });
  610. return;
  611. } else {
  612. this.nextPage += 1;
  613. this.isRefresh = false;
  614. this.getMyCustom();
  615. }
  616. },
  617. methods: {
  618. // 跳转编辑
  619. goedit(data) {
  620. uni.navigateTo({
  621. url: `/pages/center/consumer/edit?id=${data.id}&projectId=${data.projectId}`
  622. })
  623. },
  624. // 获取销讲业务
  625. getMarketingBusiness() {
  626. this.$u.get('/customer/marketingBusiness', {
  627. houseId: this.buildingID,
  628. }).then(res => {
  629. this.templateList = res.map(item => {
  630. return {
  631. ...item,
  632. isShow: false,
  633. }
  634. })
  635. })
  636. },
  637. max100(num) {
  638. if (num > 100) {
  639. return 100
  640. } else if (!num) {
  641. return 0;
  642. } else {
  643. return num;
  644. }
  645. },
  646. // 获取客户来源
  647. getFromSource() {
  648. this.$u.get(config.service.sourceList, {
  649. houseId: this.buildingID
  650. })
  651. .then((res) => {
  652. console.log(res)
  653. if (res.length) {
  654. this.sourceList = res.map((item) => {
  655. return {
  656. label: item.sourceName,
  657. value: item.id,
  658. isShow: false
  659. }
  660. })
  661. } else {
  662. this.sourceList = []
  663. }
  664. })
  665. },
  666. // 过滤
  667. resetFilter() {
  668. this.sortFilter = "排序";
  669. this.receptionDuration = "所属顾问";
  670. this.arriveFilter = "到访时间";
  671. this.screen.orderBy = '';
  672. this.screen.staTime = "";
  673. this.screen.endTime = "";
  674. this.nextPage = 1;
  675. this.activeTotal = 5;
  676. this.recordList = [];
  677. },
  678. choice(item) {
  679. item.isShow = !item.isShow;
  680. },
  681. //选择标签
  682. selectCallback2(e) {
  683. this.sortFilter = e[0].label;
  684. this.screen.orderBy = e[0].value;
  685. this.nextPage = 1;
  686. this.recordList = [];
  687. this.isRefresh = false;
  688. this.getMyCustom();
  689. },
  690. //选择录音时长
  691. timetap(index, text) {
  692. if (text) this.receptionDuration = text;
  693. this.nextPage = 1;
  694. this.recordList = [];
  695. this.isRefresh = false;
  696. this.getMyCustom();
  697. },
  698. //时间选择
  699. tabtimetap(index, text) {
  700. this.timeshow = false;
  701. if (text) this.arriveFilter = text;
  702. if (index == 4) {
  703. this.totalTimeShow = true;
  704. } else {
  705. this.activeTotal = index;
  706. this.screen.staTime = "";
  707. this.screen.endTime = "";
  708. this.nextPage = 1;
  709. this.recordList = [];
  710. this.isRefresh = false;
  711. this.getMyCustom();
  712. }
  713. },
  714. //自定义时间
  715. totalTimeChange(e) {
  716. this.screen.staTime = e.startDate;
  717. this.screen.endTime = e.endDate;
  718. this.activeTotal = 4;
  719. this.nextPage = 1;
  720. this.recordList = [];
  721. this.isRefresh = false;
  722. this.getMyCustom();
  723. },
  724. // 字典表接口
  725. getListByType() {
  726. this.$u
  727. .get("/matchKeywords/findPersonalMatchData", {
  728. customerId: this.customerId,
  729. })
  730. .then((res) => {
  731. // console.log(res)
  732. res.forEach((item1) => {
  733. item1.children.map((item) => {
  734. if (item.isInterval == 0) {
  735. item.label =
  736. item.name + item.unit + "-" + item.endName + item.unit;
  737. } else {
  738. item.label = item.name;
  739. }
  740. item.value = item.id;
  741. });
  742. });
  743. // console.log(res)
  744. this.allList = res;
  745. });
  746. },
  747. // 客户详情
  748. gotoDetail(id) {
  749. uni.navigateTo({
  750. url: `/pages/center/consumer/consumerDetail?id=${id}`,
  751. });
  752. },
  753. getMyCustom() {
  754. this.screen.visitRecord = []
  755. this.screen.jiedaiVal = []
  756. this.screen.wajueVal = []
  757. this.screen.xiaojiangVal = []
  758. this.screen.level = []
  759. this.screen.clientStage = []
  760. this.screen.sourceIds = []
  761. let dateType = 0;
  762. if (this.activeTotal == 5 || this.activeTotal == 4) {
  763. dateType = null;
  764. } else {
  765. dateType = this.activeTotal;
  766. }
  767. // 到访次数
  768. this.visitList.forEach(i => {
  769. if (i.isShow) this.screen.visitRecord.push(i.value)
  770. })
  771. // 接待时长
  772. this.jiedaiList.forEach(i => {
  773. if (i.isShow) this.screen.jiedaiVal.push(i.value)
  774. })
  775. // 需求挖掘
  776. this.wajueList.forEach(i => {
  777. if (i.isShow) this.screen.wajueVal.push(i.value)
  778. })
  779. // 销讲执行率
  780. this.xiaojiangList.forEach(i => {
  781. if (i.isShow) this.screen.xiaojiangVal.push(i.value)
  782. })
  783. // 客户等级
  784. this.levelList.forEach(i => {
  785. if (i.isShow) this.screen.level.push(i.value)
  786. })
  787. //客户阶段
  788. this.phaseList.forEach(i => {
  789. if (i.isShow) this.screen.clientStage.push(i.value)
  790. })
  791. // 客户来源
  792. this.sourceList.forEach(i => {
  793. if (i.isShow) this.screen.sourceIds.push(i.value)
  794. })
  795. var parames = {
  796. pageNum: this.nextPage,
  797. pageSize: 10,
  798. query: {
  799. projectId: this.buildingID,
  800. fractions: this.screen.xiaojiangVal.length ? this.screen.xiaojiangVal.join(',') : '', // 销讲执行率
  801. wordFractions: this.screen.wajueVal.length ? this.screen.wajueVal.join(',') : '', //需求挖掘
  802. visitRecordNum: this.screen.visitRecord.length ? this.screen.visitRecord.join(',') : '', //到访次数
  803. clientStages: this.screen.clientStage.length ? this.screen.clientStage.join(',') : '', // 客户阶段
  804. sourceIds: this.screen.sourceIds.length ? this.screen.sourceIds.join(',') : '', // 客户来源
  805. level: this.screen.level.length ? this.screen.level.join(',') : '', // 客户等级
  806. duractionNums: this.screen.jiedaiVal.length ? this.screen.jiedaiVal.join(',') : '', // 接待时长
  807. keywordsIds: this.keywordsIds.length ? this.keywordsIds.join(',') : '', // 画像标签
  808. dateType: dateType, // 接待时间
  809. staTime: this.screen.staTime,
  810. endTime: this.screen.endTime,
  811. agentId: this.screen.agentId, // 顾问
  812. orderBy: this.screen.orderBy == '' ? '' : this.screen.orderBy, // 排序
  813. },
  814. };
  815. let ars = []
  816. this.templateList.forEach(item => {
  817. if (item.isShow) {
  818. ars.push(item.id)
  819. }
  820. })
  821. parames.query.marketingBusiness = ars.join(',')
  822. this.$u.post("/customer/customerManagement", parames)
  823. .then((data) => {
  824. this.LOADING = false;
  825. // if (this.screen.staTime && this.screen.endTime) {
  826. // this.arriveFilter = `${this.screen.staTime}-${this.screen.endTime}`;
  827. // }
  828. var list = data.results || [];
  829. list.forEach((item) => {
  830. if (this.userInfo.dataCode == 6) {
  831. item.isshow = true;
  832. } else {
  833. item.isshow = false;
  834. }
  835. });
  836. list.forEach((item) => {
  837. if (item.demand.cusSemanticWordsList != null) {
  838. item.demand.cusSemanticWordsList.forEach((che) => {
  839. if (che.isInterval == 0) {
  840. che.name = che.name + che.unit + "-" + che.endName + che.unit;
  841. }
  842. });
  843. } else {
  844. item.demand.cusSemanticWordsList = []
  845. }
  846. });
  847. if (this.isRefresh) {
  848. this.recordList = list;
  849. } else {
  850. this.recordList = [...this.recordList, ...list];
  851. }
  852. this.totalRecord = data.totalPage;
  853. this.totalRecords = data.totalRecord;
  854. })
  855. .catch((e) => {
  856. this.LOADING = false;
  857. });
  858. },
  859. //获取画像标签
  860. getWordMiningList() {
  861. this.huaxiangList = [];
  862. this.$u.get("/corpus/findSelectedWordMiningTemplate", {
  863. houseId: this.buildingID,
  864. selected: 1
  865. })
  866. .then((res) => {
  867. // console.log(res)
  868. if (res.length) {
  869. res.forEach(item => {
  870. item.isShow = true;
  871. if (item.children.length) {
  872. item.children.forEach(subitem => {
  873. subitem.isShow = false;
  874. })
  875. }
  876. })
  877. }
  878. this.huaxiangList = res;
  879. });
  880. },
  881. //获取顾问列表
  882. getFreeList() {
  883. if (this.userInfo.dataCode == 6) {
  884. this.freeList = [{
  885. label: this.userInfo.name,
  886. value: this.userInfo.accountId
  887. }]
  888. } else {
  889. this.freeList = [];
  890. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  891. houseId: this.buildingID,
  892. })
  893. .then((res) => {
  894. this.freeList = res;
  895. this.freeList.forEach((item) => {
  896. item.label = item.name;
  897. item.value = item.accountId;
  898. });
  899. this.freeList.unshift({
  900. label: '全部',
  901. value: '',
  902. })
  903. });
  904. }
  905. },
  906. // 获取客户阶段数据
  907. getCustomPhase() {
  908. this.phaseList = [];
  909. this.$u
  910. .post("/customer/lifeTrackDefineList", {
  911. houseId: this.buildingID,
  912. })
  913. .then((res) => {
  914. if (res.length) {
  915. this.phaseList = res.map(item => {
  916. return {
  917. label: item.stageName,
  918. value: item.id,
  919. isShow: false
  920. }
  921. })
  922. } else {
  923. this.phaseList = []
  924. }
  925. });
  926. },
  927. //选择顾问
  928. actionSelectCallback(e) {
  929. this.screen.agentId = e[0].value;
  930. this.receptionDuration = e[0].label;
  931. this.nextPage = 1;
  932. this.recordList = [];
  933. this.screenShow = false;
  934. this.huaxiangShow = false;
  935. this.isRefresh = false;
  936. this.getMyCustom();
  937. },
  938. // 客户阶段
  939. selectPhase(e) {
  940. this.screen.clientStageName = e[0].label;
  941. this.screen.clientStage = e[0].value;
  942. },
  943. //重置
  944. reset() {
  945. this.screen = {
  946. agentId: "",
  947. visitRecord: [],
  948. record: [],
  949. clientStage: "",
  950. clientStageName: "",
  951. };
  952. this.sourceList.map((i) => {
  953. i.isShow = false;
  954. });
  955. this.wajueList.map((i) => {
  956. i.isShow = false;
  957. });
  958. this.phaseList.map((i) => {
  959. i.isShow = false;
  960. });
  961. this.jiedaiList.map((i) => {
  962. i.isShow = false;
  963. });
  964. this.xiaojiangList.map((i) => {
  965. i.isShow = false;
  966. });
  967. this.visitList.map((i) => {
  968. i.isShow = false;
  969. });
  970. this.levelList.map((i) => {
  971. i.isShow = false;
  972. });
  973. this.nextPage = 1;
  974. this.recordList = [];
  975. this.isRefresh = false;
  976. this.getMyCustom();
  977. },
  978. //重置画像标签选择
  979. resetHuaXiang() {
  980. if (this.huaxiangList.length) {
  981. this.huaxiangList.forEach(item => {
  982. item.isShow = true;
  983. if (item.children.length) {
  984. item.children.forEach(subitem => {
  985. subitem.isShow = false;
  986. })
  987. }
  988. })
  989. }
  990. },
  991. //筛选确认
  992. screensure() {
  993. this.nextPage = 1;
  994. this.recordList = [];
  995. this.keywordsIds = []
  996. this.screenShow = false;
  997. this.huaxiangShow = false;
  998. this.isRefresh = false;
  999. // 画像标签
  1000. this.huaxiangList.forEach(item => {
  1001. if (item.children.length) {
  1002. item.children.forEach(im => {
  1003. if (im.isShow) this.keywordsIds.push(im.id)
  1004. })
  1005. }
  1006. })
  1007. this.getMyCustom();
  1008. },
  1009. goSearch() {
  1010. uni.navigateTo({
  1011. url: "/pages/center/consumer/consumerSearch",
  1012. });
  1013. },
  1014. gotoFollowUp(id) {
  1015. uni.navigateTo({
  1016. url: `/pages/center/consumer/newFollowup/newFollowup?id=${id}`,
  1017. });
  1018. },
  1019. },
  1020. };
  1021. </script>
  1022. <style lang="scss" scoped>
  1023. .box {
  1024. width: 100%;
  1025. height: 100%;
  1026. background: #f8f8f8;
  1027. }
  1028. .count {
  1029. width: 100%;
  1030. height: 60rpx;
  1031. display: flex;
  1032. align-items: center;
  1033. justify-content: center;
  1034. background-color: #fff;
  1035. border-top: 1px solid #e0e0e0;
  1036. text {
  1037. color: #f71616;
  1038. }
  1039. }
  1040. .timeview {
  1041. height: 80rpx;
  1042. line-height: 80rpx;
  1043. width: 100%;
  1044. text-align: center;
  1045. border-bottom: 1px solid #f8f8f8;
  1046. }
  1047. //时间切换的样式
  1048. .boxtittab {
  1049. position: sticky;
  1050. top: var(--window-top);
  1051. z-index: 999;
  1052. width: 100;
  1053. height: 92rpx;
  1054. background: #ffffff;
  1055. display: flex;
  1056. align-items: center;
  1057. .tabbox {
  1058. flex: 1;
  1059. height: 100%;
  1060. text-align: center;
  1061. line-height: 92rpx;
  1062. color: #666666;
  1063. font-size: 28rpx;
  1064. overflow: hidden;
  1065. text-overflow: ellipsis;
  1066. display: -webkit-box;
  1067. /* 将对象作为弹性伸缩盒子模型显示 */
  1068. -webkit-line-clamp: 1;
  1069. /* 控制最多显示几行 */
  1070. -webkit-box-orient: vertical;
  1071. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  1072. }
  1073. }
  1074. .top-search {
  1075. display: flex;
  1076. align-items: center;
  1077. justify-content: space-between;
  1078. background: #fff;
  1079. padding-right: 30rpx;
  1080. .filter-icon {
  1081. width: 40rpx;
  1082. height: 40rpx;
  1083. padding: 15rpx;
  1084. }
  1085. .search-box {
  1086. width: 670rpx;
  1087. height: 102rpx;
  1088. background: #ffffff;
  1089. display: flex;
  1090. align-items: center;
  1091. justify-content: center;
  1092. .search {
  1093. width: 94%;
  1094. height: 70rpx;
  1095. display: flex;
  1096. align-items: center;
  1097. background: #f8f8f8;
  1098. border-radius: 33rpx;
  1099. .search-img {
  1100. width: 26rpx;
  1101. height: 30rpx;
  1102. margin-left: 20rpx;
  1103. .search-img1 {
  1104. width: 100%;
  1105. height: 100%;
  1106. margin-top: 2rpx;
  1107. }
  1108. }
  1109. .search-text {
  1110. font-size: 28rpx;
  1111. font-weight: 400;
  1112. color: #999999;
  1113. margin-left: 10rpx;
  1114. }
  1115. }
  1116. .search-screen {
  1117. width: 40rpx;
  1118. height: 40rpx;
  1119. margin-left: 30rpx;
  1120. .search-screen1 {
  1121. width: 100%;
  1122. height: 100%;
  1123. }
  1124. }
  1125. }
  1126. }
  1127. .content {
  1128. overflow: hidden;
  1129. .content-tips {
  1130. background: #fff;
  1131. margin-top: 20rpx;
  1132. overflow: hidden;
  1133. padding-bottom: 30rpx;
  1134. .content-first {
  1135. padding: 19rpx 30rpx;
  1136. display: flex;
  1137. justify-content: space-between;
  1138. box-sizing: border-box;
  1139. font-weight: 400;
  1140. color: #292929;
  1141. height: 90rpx;
  1142. font-size: 30rpx;
  1143. line-height: 30rpx;
  1144. .left {
  1145. display: flex;
  1146. .img {
  1147. width: 52rpx;
  1148. height: 52rpx;
  1149. border-radius: 50%;
  1150. text-align: center;
  1151. line-height: 50rpx;
  1152. margin-right: 20rpx;
  1153. color: #fff;
  1154. font-size: 30rpx;
  1155. background: #9f61c8;
  1156. }
  1157. .test {
  1158. margin-top: 11rpx;
  1159. font-weight: 500;
  1160. color: #333333;
  1161. font-size: 30rpx;
  1162. font-family: PingFangSC-Medium, PingFang SC;
  1163. }
  1164. }
  1165. .right {
  1166. display: flex;
  1167. .test {
  1168. margin-top: 11rpx;
  1169. .blue {
  1170. font-size: 32rpx;
  1171. font-family: PingFangSC-Medium, PingFang SC;
  1172. font-weight: 500;
  1173. color: #2671e2;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. .content-sec {
  1179. border-top: 1px solid #e0e0e0;
  1180. padding: 0 30rpx;
  1181. position: relative;
  1182. .content-sec-lab {
  1183. margin-top: 28rpx;
  1184. display: flex;
  1185. justify-content: space-between;
  1186. font-size: 30rpx;
  1187. font-weight: 400;
  1188. color: #666666;
  1189. line-height: 42rpx;
  1190. .content-sec-lab1 {
  1191. color: #333333;
  1192. word-break: break-all;
  1193. }
  1194. .content-sec-tips {
  1195. max-width: 160rpx;
  1196. height: 46rpx;
  1197. background: #f2f2f2;
  1198. border-radius: 6rpx;
  1199. text-align: center;
  1200. line-height: 26rpx;
  1201. overflow: hidden;
  1202. text-overflow: ellipsis;
  1203. white-space: nowrap;
  1204. font-size: 26rpx;
  1205. font-weight: 400;
  1206. color: #333333;
  1207. margin-right: 20rpx;
  1208. box-sizing: border-box;
  1209. padding: 10rpx 24rpx;
  1210. }
  1211. }
  1212. .content-sec-num {
  1213. position: absolute;
  1214. width: 200rpx;
  1215. height: 90rpx;
  1216. background: #f4f8fd;
  1217. border-radius: 12rpx;
  1218. font-weight: 400;
  1219. color: #2671e2;
  1220. line-height: 45rpx;
  1221. bottom: 30rpx;
  1222. right: 30rpx;
  1223. text-align: center;
  1224. }
  1225. }
  1226. .content-last {
  1227. padding: 0 24rpx;
  1228. display: flex;
  1229. justify-content: flex-end;
  1230. .content-last-tab {
  1231. margin-top: 20rpx;
  1232. width: 33.4%;
  1233. height: 78rpx;
  1234. text-align: center;
  1235. font-size: 30rpx;
  1236. font-weight: 400;
  1237. color: #333333;
  1238. line-height: 78rpx;
  1239. display: flex;
  1240. align-items: center;
  1241. justify-content: center;
  1242. border: 1px solid #2671e2;
  1243. border-radius: 16rpx;
  1244. .icon {
  1245. width: 40rpx;
  1246. height: 40rpx;
  1247. margin-right: 12rpx;
  1248. }
  1249. }
  1250. }
  1251. }
  1252. }
  1253. // 这是弹出层
  1254. .screen {
  1255. .screen-record {
  1256. overflow: hidden;
  1257. padding: 0 30rpx;
  1258. box-sizing: border-box;
  1259. border-bottom: 1px solid #e0e0e0;
  1260. .screen-record-text {
  1261. font-weight: 600;
  1262. padding: 30rpx 0;
  1263. font-size: 30rpx;
  1264. color: #333333;
  1265. line-height: 30rpx;
  1266. display: flex;
  1267. align-items: center;
  1268. justify-content: space-between;
  1269. .arrow {
  1270. width: 30rpx;
  1271. height: 14rpx;
  1272. }
  1273. }
  1274. .screen-record-tab {
  1275. margin-top: 30rpx;
  1276. padding-bottom: 10rpx;
  1277. display: flex;
  1278. flex-wrap: wrap;
  1279. .screen-record-item {
  1280. min-width: 150rpx;
  1281. padding: 0 14rpx;
  1282. height: 60rpx;
  1283. border-radius: 8rpx;
  1284. text-align: center;
  1285. line-height: 60rpx;
  1286. margin: 0 22rpx 22rpx 0;
  1287. &:nth-child(4n) {
  1288. margin-right: 0;
  1289. }
  1290. }
  1291. .screen-record-chose {
  1292. background: #f1f6fd;
  1293. color: #2671e2;
  1294. }
  1295. .screen-record-nochose {
  1296. background: #f7f8fa;
  1297. color: #333;
  1298. }
  1299. }
  1300. }
  1301. .screen-foot {
  1302. width: 100%;
  1303. height: 78rpx;
  1304. display: flex;
  1305. margin: 30rpx 30rpx 0;
  1306. .screen-foot-reset {
  1307. width: 176rpx;
  1308. height: 78rpx;
  1309. line-height: 78rpx;
  1310. background: #FFFFFF;
  1311. border-radius: 8rpx;
  1312. border: 1px solid #2671E2;
  1313. margin-right: 30rpx;
  1314. font-size: 30rpx;
  1315. font-family: PingFangSC-Regular, PingFang SC;
  1316. font-weight: 400;
  1317. color: #2671E2;
  1318. text-align: center;
  1319. }
  1320. .screen-foot-sure {
  1321. width: 484rpx;
  1322. height: 78rpx;
  1323. line-height: 78rpx;
  1324. background: #2671E2;
  1325. border: 1px solid #2671E2;
  1326. border-radius: 8rpx;
  1327. font-size: 30rpx;
  1328. font-family: PingFangSC-Regular, PingFang SC;
  1329. font-weight: 400;
  1330. color: #FFFFFF;
  1331. text-align: center;
  1332. }
  1333. }
  1334. }
  1335. </style>