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.
 
 
 

1388 lines
36 KiB

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