No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

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