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.
 
 
 

1384 line
36 KiB

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