Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

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