Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

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