Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

1381 строка
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.createTime || "--" }}</view>
  91. </view>
  92. </view>
  93. <view class="content-last" v-if="item.isshow">
  94. <view class="content-last-tab">
  95. <!-- <image class="icon" src="https://static.quhouse.com/5daebdec0aad4f63a62d3720437034bc.png" mode="" />
  96. 添加提醒 -->
  97. </view>
  98. <view class="content-last-tab">
  99. <!-- <image class="icon" src="https://static.quhouse.com/b867df5efc72480f8c1f3bc9399c7d6c.png" mode="" />
  100. 拨打电话 -->
  101. </view>
  102. <view class="content-last-tab" @click.stop="gotoFollowUp(item.id)">
  103. <image class="icon" src="https://static.quhouse.com/3730fc3a185c4d65ae6a1821601038ab.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. },
  576. onShow() {
  577. // dataCode: 身份标识 2:项目总、3:客服、4:策划、5:经理、6:置业顾问
  578. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  579. if (this.isnorefresh == "refresh") {
  580. this.buildingID = uni.getStorageSync("buildingID").id;
  581. this.nextPage = 1;
  582. this.recordList = [];
  583. this.isRefresh = false;
  584. this.getMyCustom();
  585. this.getFreeList();
  586. this.getWordMiningList();
  587. this.getCustomPhase();
  588. this.getFromSource();
  589. this.getMarketingBusiness();
  590. this.isnorefresh = "";
  591. }
  592. },
  593. onPullDownRefresh() {
  594. this.resetFilter();
  595. this.isRefresh = true;
  596. this.nextPage = 1;
  597. this.getMyCustom();
  598. setTimeout(() => {
  599. uni.stopPullDownRefresh();
  600. }, 1000);
  601. },
  602. onReachBottom() {
  603. if (this.totalRecord == this.nextPage) {
  604. uni.showToast({
  605. icon: "none",
  606. title: "到底了",
  607. duration: 2000,
  608. });
  609. return;
  610. } else {
  611. this.nextPage += 1;
  612. this.isRefresh = false;
  613. this.getMyCustom();
  614. }
  615. },
  616. methods: {
  617. // 获取销讲业务
  618. getMarketingBusiness() {
  619. this.$u.get('/customer/marketingBusiness', {
  620. houseId: this.buildingID,
  621. }).then(res => {
  622. this.templateList = res.map(item => {
  623. return {
  624. ...item,
  625. isShow: false,
  626. }
  627. })
  628. })
  629. },
  630. max100(num) {
  631. if (num > 100) {
  632. return 100
  633. } else if (!num) {
  634. return 0;
  635. } else {
  636. return num;
  637. }
  638. },
  639. // 获取客户来源
  640. getFromSource() {
  641. this.$u.get(config.service.sourceList, {
  642. houseId: this.buildingID
  643. })
  644. .then((res) => {
  645. console.log(res)
  646. if (res.length) {
  647. this.sourceList = res.map((item) => {
  648. return {
  649. label: item.sourceName,
  650. value: item.id,
  651. isShow: false
  652. }
  653. })
  654. } else {
  655. this.sourceList = []
  656. }
  657. })
  658. },
  659. // 过滤
  660. resetFilter() {
  661. this.sortFilter = "排序";
  662. this.receptionDuration = "所属顾问";
  663. this.arriveFilter = "到访时间";
  664. this.screen.orderBy = '';
  665. this.screen.staTime = "";
  666. this.screen.endTime = "";
  667. this.nextPage = 1;
  668. this.activeTotal = 5;
  669. this.recordList = [];
  670. },
  671. choice(item) {
  672. item.isShow = !item.isShow;
  673. },
  674. //选择标签
  675. selectCallback2(e) {
  676. this.sortFilter = e[0].label;
  677. this.screen.orderBy = e[0].value;
  678. this.nextPage = 1;
  679. this.recordList = [];
  680. this.isRefresh = false;
  681. this.getMyCustom();
  682. },
  683. //选择录音时长
  684. timetap(index, text) {
  685. if (text) this.receptionDuration = text;
  686. this.nextPage = 1;
  687. this.recordList = [];
  688. this.isRefresh = false;
  689. this.getMyCustom();
  690. },
  691. //时间选择
  692. tabtimetap(index, text) {
  693. this.timeshow = false;
  694. if (text) this.arriveFilter = text;
  695. if (index == 4) {
  696. this.totalTimeShow = true;
  697. } else {
  698. this.activeTotal = index;
  699. this.screen.staTime = "";
  700. this.screen.endTime = "";
  701. this.nextPage = 1;
  702. this.recordList = [];
  703. this.isRefresh = false;
  704. this.getMyCustom();
  705. }
  706. },
  707. //自定义时间
  708. totalTimeChange(e) {
  709. this.screen.staTime = e.startDate;
  710. this.screen.endTime = e.endDate;
  711. this.activeTotal = 4;
  712. this.nextPage = 1;
  713. this.recordList = [];
  714. this.isRefresh = false;
  715. this.getMyCustom();
  716. },
  717. // 字典表接口
  718. getListByType() {
  719. this.$u
  720. .get("/matchKeywords/findPersonalMatchData", {
  721. customerId: this.customerId,
  722. })
  723. .then((res) => {
  724. // console.log(res)
  725. res.forEach((item1) => {
  726. item1.children.map((item) => {
  727. if (item.isInterval == 0) {
  728. item.label =
  729. item.name + item.unit + "-" + item.endName + item.unit;
  730. } else {
  731. item.label = item.name;
  732. }
  733. item.value = item.id;
  734. });
  735. });
  736. // console.log(res)
  737. this.allList = res;
  738. });
  739. },
  740. // 客户详情
  741. gotoDetail(id) {
  742. uni.navigateTo({
  743. url: `/pages/center/consumer/consumerDetail?id=${id}`,
  744. });
  745. },
  746. getMyCustom() {
  747. this.screen.visitRecord = []
  748. this.screen.jiedaiVal = []
  749. this.screen.wajueVal = []
  750. this.screen.xiaojiangVal = []
  751. this.screen.level = []
  752. this.screen.clientStage = []
  753. this.screen.sourceIds = []
  754. let dateType = 0;
  755. if (this.activeTotal == 5 || this.activeTotal == 4) {
  756. dateType = null;
  757. } else {
  758. dateType = this.activeTotal;
  759. }
  760. // 到访次数
  761. this.visitList.forEach(i => {
  762. if (i.isShow) this.screen.visitRecord.push(i.value)
  763. })
  764. // 接待时长
  765. this.jiedaiList.forEach(i => {
  766. if (i.isShow) this.screen.jiedaiVal.push(i.value)
  767. })
  768. // 需求挖掘
  769. this.wajueList.forEach(i => {
  770. if (i.isShow) this.screen.wajueVal.push(i.value)
  771. })
  772. // 销讲执行率
  773. this.xiaojiangList.forEach(i => {
  774. if (i.isShow) this.screen.xiaojiangVal.push(i.value)
  775. })
  776. // 客户等级
  777. this.levelList.forEach(i => {
  778. if (i.isShow) this.screen.level.push(i.value)
  779. })
  780. //客户阶段
  781. this.phaseList.forEach(i => {
  782. if (i.isShow) this.screen.clientStage.push(i.value)
  783. })
  784. // 客户来源
  785. this.sourceList.forEach(i => {
  786. if (i.isShow) this.screen.sourceIds.push(i.value)
  787. })
  788. var parames = {
  789. pageNum: this.nextPage,
  790. pageSize: 10,
  791. query: {
  792. projectId: this.buildingID,
  793. fractions: this.screen.xiaojiangVal.length ? this.screen.xiaojiangVal.join(',') : '', // 销讲执行率
  794. wordFractions: this.screen.wajueVal.length ? this.screen.wajueVal.join(',') : '', //需求挖掘
  795. visitRecordNum: this.screen.visitRecord.length ? this.screen.visitRecord.join(',') : '', //到访次数
  796. clientStages: this.screen.clientStage.length ? this.screen.clientStage.join(',') : '', // 客户阶段
  797. sourceIds: this.screen.sourceIds.length ? this.screen.sourceIds.join(',') : '', // 客户来源
  798. level: this.screen.level.length ? this.screen.level.join(',') : '', // 客户等级
  799. duractionNums: this.screen.jiedaiVal.length ? this.screen.jiedaiVal.join(',') : '', // 接待时长
  800. keywordsIds: this.keywordsIds.length ? this.keywordsIds.join(',') : '', // 画像标签
  801. dateType: dateType, // 接待时间
  802. staTime: this.screen.staTime,
  803. endTime: this.screen.endTime,
  804. agentId: this.screen.agentId, // 顾问
  805. orderBy: this.screen.orderBy == '' ? '' : this.screen.orderBy, // 排序
  806. },
  807. };
  808. let ars = []
  809. this.templateList.forEach(item => {
  810. if (item.isShow) {
  811. ars.push(item.id)
  812. }
  813. })
  814. parames.query.marketingBusiness = ars.join(',')
  815. this.$u.post("/customer/customerManagement", parames)
  816. .then((data) => {
  817. this.LOADING = false;
  818. // if (this.screen.staTime && this.screen.endTime) {
  819. // this.arriveFilter = `${this.screen.staTime}-${this.screen.endTime}`;
  820. // }
  821. var list = data.results || [];
  822. list.forEach((item) => {
  823. if (this.userInfo.dataCode == 6) {
  824. item.isshow = true;
  825. } else {
  826. item.isshow = false;
  827. }
  828. });
  829. list.forEach((item) => {
  830. if (item.demand.cusSemanticWordsList != null) {
  831. item.demand.cusSemanticWordsList.forEach((che) => {
  832. if (che.isInterval == 0) {
  833. che.name = che.name + che.unit + "-" + che.endName + che.unit;
  834. }
  835. });
  836. } else {
  837. item.demand.cusSemanticWordsList = []
  838. }
  839. });
  840. if (this.isRefresh) {
  841. this.recordList = list;
  842. } else {
  843. this.recordList = [...this.recordList, ...list];
  844. }
  845. this.totalRecord = data.totalPage;
  846. this.totalRecords = data.totalRecord;
  847. })
  848. .catch((e) => {
  849. this.LOADING = false;
  850. });
  851. },
  852. //获取画像标签
  853. getWordMiningList() {
  854. this.huaxiangList = [];
  855. this.$u.get("/corpus/findSelectedWordMiningTemplate", {
  856. houseId: this.buildingID,
  857. selected: 1
  858. })
  859. .then((res) => {
  860. // console.log(res)
  861. if (res.length) {
  862. res.forEach(item => {
  863. item.isShow = true;
  864. if (item.children.length) {
  865. item.children.forEach(subitem => {
  866. subitem.isShow = false;
  867. })
  868. }
  869. })
  870. }
  871. this.huaxiangList = res;
  872. });
  873. },
  874. //获取顾问列表
  875. getFreeList() {
  876. if (this.userInfo.dataCode == 6) {
  877. this.freeList = [{
  878. label: this.userInfo.name,
  879. value: this.userInfo.accountId
  880. }]
  881. } else {
  882. this.freeList = [];
  883. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  884. houseId: this.buildingID,
  885. })
  886. .then((res) => {
  887. this.freeList = res;
  888. this.freeList.forEach((item) => {
  889. item.label = item.name;
  890. item.value = item.accountId;
  891. });
  892. this.freeList.unshift({
  893. label: '全部',
  894. value: '',
  895. })
  896. });
  897. }
  898. },
  899. // 获取客户阶段数据
  900. getCustomPhase() {
  901. this.phaseList = [];
  902. this.$u
  903. .post("/customer/lifeTrackDefineList", {
  904. houseId: this.buildingID,
  905. })
  906. .then((res) => {
  907. if (res.length) {
  908. this.phaseList = res.map(item => {
  909. return {
  910. label: item.stageName,
  911. value: item.id,
  912. isShow: false
  913. }
  914. })
  915. } else {
  916. this.phaseList = []
  917. }
  918. });
  919. },
  920. //选择顾问
  921. actionSelectCallback(e) {
  922. this.screen.agentId = e[0].value;
  923. this.receptionDuration = e[0].label;
  924. this.nextPage = 1;
  925. this.recordList = [];
  926. this.screenShow = false;
  927. this.huaxiangShow = false;
  928. this.isRefresh = false;
  929. this.getMyCustom();
  930. },
  931. // 客户阶段
  932. selectPhase(e) {
  933. this.screen.clientStageName = e[0].label;
  934. this.screen.clientStage = e[0].value;
  935. },
  936. //重置
  937. reset() {
  938. this.screen = {
  939. agentId: "",
  940. visitRecord: [],
  941. record: [],
  942. clientStage: "",
  943. clientStageName: "",
  944. };
  945. this.sourceList.map((i) => {
  946. i.isShow = false;
  947. });
  948. this.wajueList.map((i) => {
  949. i.isShow = false;
  950. });
  951. this.phaseList.map((i) => {
  952. i.isShow = false;
  953. });
  954. this.jiedaiList.map((i) => {
  955. i.isShow = false;
  956. });
  957. this.xiaojiangList.map((i) => {
  958. i.isShow = false;
  959. });
  960. this.visitList.map((i) => {
  961. i.isShow = false;
  962. });
  963. this.levelList.map((i) => {
  964. i.isShow = false;
  965. });
  966. this.nextPage = 1;
  967. this.recordList = [];
  968. this.isRefresh = false;
  969. this.getMyCustom();
  970. },
  971. //重置画像标签选择
  972. resetHuaXiang() {
  973. if (this.huaxiangList.length) {
  974. this.huaxiangList.forEach(item => {
  975. item.isShow = true;
  976. if (item.children.length) {
  977. item.children.forEach(subitem => {
  978. subitem.isShow = false;
  979. })
  980. }
  981. })
  982. }
  983. },
  984. //筛选确认
  985. screensure() {
  986. this.nextPage = 1;
  987. this.recordList = [];
  988. this.keywordsIds = []
  989. this.screenShow = false;
  990. this.huaxiangShow = false;
  991. this.isRefresh = false;
  992. // 画像标签
  993. this.huaxiangList.forEach(item => {
  994. if (item.children.length) {
  995. item.children.forEach(im => {
  996. if (im.isShow) this.keywordsIds.push(im.id)
  997. })
  998. }
  999. })
  1000. this.getMyCustom();
  1001. },
  1002. goSearch() {
  1003. uni.navigateTo({
  1004. url: "/pages/center/consumer/consumerSearch",
  1005. });
  1006. },
  1007. gotoFollowUp(id) {
  1008. uni.navigateTo({
  1009. url: `/pages/center/consumer/newFollowup/newFollowup?id=${id}`,
  1010. });
  1011. },
  1012. },
  1013. };
  1014. </script>
  1015. <style lang="scss" scoped>
  1016. .box {
  1017. width: 100%;
  1018. height: 100%;
  1019. background: #f8f8f8;
  1020. }
  1021. .count {
  1022. width: 100%;
  1023. height: 60rpx;
  1024. display: flex;
  1025. align-items: center;
  1026. justify-content: center;
  1027. background-color: #fff;
  1028. border-top: 1px solid #e0e0e0;
  1029. text {
  1030. color: #f71616;
  1031. }
  1032. }
  1033. .timeview {
  1034. height: 80rpx;
  1035. line-height: 80rpx;
  1036. width: 100%;
  1037. text-align: center;
  1038. border-bottom: 1px solid #f8f8f8;
  1039. }
  1040. //时间切换的样式
  1041. .boxtittab {
  1042. position: sticky;
  1043. top: var(--window-top);
  1044. z-index: 999;
  1045. width: 100;
  1046. height: 92rpx;
  1047. background: #ffffff;
  1048. display: flex;
  1049. align-items: center;
  1050. .tabbox {
  1051. flex: 1;
  1052. height: 100%;
  1053. text-align: center;
  1054. line-height: 92rpx;
  1055. color: #666666;
  1056. font-size: 28rpx;
  1057. overflow: hidden;
  1058. text-overflow: ellipsis;
  1059. display: -webkit-box;
  1060. /* 将对象作为弹性伸缩盒子模型显示 */
  1061. -webkit-line-clamp: 1;
  1062. /* 控制最多显示几行 */
  1063. -webkit-box-orient: vertical;
  1064. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  1065. }
  1066. }
  1067. .top-search {
  1068. display: flex;
  1069. align-items: center;
  1070. justify-content: space-between;
  1071. background: #fff;
  1072. padding-right: 30rpx;
  1073. .filter-icon {
  1074. width: 40rpx;
  1075. height: 40rpx;
  1076. padding: 15rpx;
  1077. }
  1078. .search-box {
  1079. width: 670rpx;
  1080. height: 102rpx;
  1081. background: #ffffff;
  1082. display: flex;
  1083. align-items: center;
  1084. justify-content: center;
  1085. .search {
  1086. width: 94%;
  1087. height: 70rpx;
  1088. display: flex;
  1089. align-items: center;
  1090. background: #f8f8f8;
  1091. border-radius: 33rpx;
  1092. .search-img {
  1093. width: 26rpx;
  1094. height: 30rpx;
  1095. margin-left: 20rpx;
  1096. .search-img1 {
  1097. width: 100%;
  1098. height: 100%;
  1099. margin-top: 2rpx;
  1100. }
  1101. }
  1102. .search-text {
  1103. font-size: 28rpx;
  1104. font-weight: 400;
  1105. color: #999999;
  1106. margin-left: 10rpx;
  1107. }
  1108. }
  1109. .search-screen {
  1110. width: 40rpx;
  1111. height: 40rpx;
  1112. margin-left: 30rpx;
  1113. .search-screen1 {
  1114. width: 100%;
  1115. height: 100%;
  1116. }
  1117. }
  1118. }
  1119. }
  1120. .content {
  1121. overflow: hidden;
  1122. .content-tips {
  1123. background: #fff;
  1124. margin-top: 20rpx;
  1125. overflow: hidden;
  1126. padding-bottom: 30rpx;
  1127. .content-first {
  1128. padding: 19rpx 30rpx;
  1129. display: flex;
  1130. justify-content: space-between;
  1131. box-sizing: border-box;
  1132. font-weight: 400;
  1133. color: #292929;
  1134. height: 90rpx;
  1135. font-size: 30rpx;
  1136. line-height: 30rpx;
  1137. .left {
  1138. display: flex;
  1139. .img {
  1140. width: 52rpx;
  1141. height: 52rpx;
  1142. border-radius: 50%;
  1143. text-align: center;
  1144. line-height: 50rpx;
  1145. margin-right: 20rpx;
  1146. color: #fff;
  1147. font-size: 30rpx;
  1148. background: #9f61c8;
  1149. }
  1150. .test {
  1151. margin-top: 11rpx;
  1152. font-weight: 500;
  1153. color: #333333;
  1154. font-size: 30rpx;
  1155. font-family: PingFangSC-Medium, PingFang SC;
  1156. }
  1157. }
  1158. .right {
  1159. display: flex;
  1160. .test {
  1161. margin-top: 11rpx;
  1162. .blue {
  1163. font-size: 32rpx;
  1164. font-family: PingFangSC-Medium, PingFang SC;
  1165. font-weight: 500;
  1166. color: #2671e2;
  1167. }
  1168. }
  1169. }
  1170. }
  1171. .content-sec {
  1172. border-top: 1px solid #e0e0e0;
  1173. padding: 0 30rpx;
  1174. position: relative;
  1175. .content-sec-lab {
  1176. margin-top: 28rpx;
  1177. display: flex;
  1178. justify-content: space-between;
  1179. font-size: 30rpx;
  1180. font-weight: 400;
  1181. color: #666666;
  1182. line-height: 42rpx;
  1183. .content-sec-lab1 {
  1184. color: #333333;
  1185. word-break: break-all;
  1186. }
  1187. .content-sec-tips {
  1188. max-width: 160rpx;
  1189. height: 46rpx;
  1190. background: #f2f2f2;
  1191. border-radius: 6rpx;
  1192. text-align: center;
  1193. line-height: 26rpx;
  1194. overflow: hidden;
  1195. text-overflow: ellipsis;
  1196. white-space: nowrap;
  1197. font-size: 26rpx;
  1198. font-weight: 400;
  1199. color: #333333;
  1200. margin-right: 20rpx;
  1201. box-sizing: border-box;
  1202. padding: 10rpx 24rpx;
  1203. }
  1204. }
  1205. .content-sec-num {
  1206. position: absolute;
  1207. width: 200rpx;
  1208. height: 90rpx;
  1209. background: #f4f8fd;
  1210. border-radius: 12rpx;
  1211. font-weight: 400;
  1212. color: #2671e2;
  1213. line-height: 45rpx;
  1214. bottom: 30rpx;
  1215. right: 30rpx;
  1216. text-align: center;
  1217. }
  1218. }
  1219. .content-last {
  1220. display: flex;
  1221. height: 42rpx;
  1222. margin-top: 30rpx;
  1223. .content-last-tab {
  1224. width: 33.4%;
  1225. text-align: center;
  1226. font-size: 30rpx;
  1227. font-weight: 400;
  1228. color: #333333;
  1229. line-height: 78rpx;
  1230. display: flex;
  1231. align-items: center;
  1232. justify-content: center;
  1233. .icon {
  1234. width: 40rpx;
  1235. height: 40rpx;
  1236. margin-right: 12rpx;
  1237. }
  1238. }
  1239. }
  1240. }
  1241. }
  1242. // 这是弹出层
  1243. .screen {
  1244. .screen-record {
  1245. overflow: hidden;
  1246. padding: 0 30rpx;
  1247. box-sizing: border-box;
  1248. border-bottom: 1px solid #e0e0e0;
  1249. .screen-record-text {
  1250. font-weight: 600;
  1251. padding: 30rpx 0;
  1252. font-size: 30rpx;
  1253. color: #333333;
  1254. line-height: 30rpx;
  1255. display: flex;
  1256. align-items: center;
  1257. justify-content: space-between;
  1258. .arrow {
  1259. width: 30rpx;
  1260. height: 14rpx;
  1261. }
  1262. }
  1263. .screen-record-tab {
  1264. margin-top: 30rpx;
  1265. padding-bottom: 10rpx;
  1266. display: flex;
  1267. flex-wrap: wrap;
  1268. .screen-record-item {
  1269. min-width: 150rpx;
  1270. padding: 0 14rpx;
  1271. height: 60rpx;
  1272. border-radius: 8rpx;
  1273. text-align: center;
  1274. line-height: 60rpx;
  1275. margin: 0 22rpx 22rpx 0;
  1276. &:nth-child(4n) {
  1277. margin-right: 0;
  1278. }
  1279. }
  1280. .screen-record-chose {
  1281. background: #f1f6fd;
  1282. color: #2671e2;
  1283. }
  1284. .screen-record-nochose {
  1285. background: #f7f8fa;
  1286. color: #333;
  1287. }
  1288. }
  1289. }
  1290. .screen-foot {
  1291. width: 100%;
  1292. height: 78rpx;
  1293. display: flex;
  1294. margin: 30rpx 30rpx 0;
  1295. .screen-foot-reset {
  1296. width: 176rpx;
  1297. height: 78rpx;
  1298. line-height: 78rpx;
  1299. background: #FFFFFF;
  1300. border-radius: 8rpx;
  1301. border: 1px solid #2671E2;
  1302. margin-right: 30rpx;
  1303. font-size: 30rpx;
  1304. font-family: PingFangSC-Regular, PingFang SC;
  1305. font-weight: 400;
  1306. color: #2671E2;
  1307. text-align: center;
  1308. }
  1309. .screen-foot-sure {
  1310. width: 484rpx;
  1311. height: 78rpx;
  1312. line-height: 78rpx;
  1313. background: #2671E2;
  1314. border: 1px solid #2671E2;
  1315. border-radius: 8rpx;
  1316. font-size: 30rpx;
  1317. font-family: PingFangSC-Regular, PingFang SC;
  1318. font-weight: 400;
  1319. color: #FFFFFF;
  1320. text-align: center;
  1321. }
  1322. }
  1323. }
  1324. </style>