You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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