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.
 
 
 

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