AI销管
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.
 
 
 
 

1243 lines
30 KiB

  1. <template>
  2. <view class="box">
  3. <view style="flex-shrink: 0;">
  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. <!-- <image @click="filterFun" class="filter" src="../../../static/images/filter.png" mode="" /> -->
  12. </view>
  13. </view>
  14. <!-- 选择器 -->
  15. <view class="boxtittab">
  16. <view class="tabbox" :class="{activeColor: sortFilter!=='排序'}" @click="tapsoltishow">
  17. {{ sortFilter }}
  18. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  19. </view>
  20. <view class="tabbox" :class="{activeColor: arriveFilter!=='到访时间'}" @click="taptimeisshow">
  21. {{ arriveFilter }}
  22. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  23. </view>
  24. <view class="tabbox" :class="{activeColor: receptionDuration!=='接待时长'}" @click="taptimetuisshow">
  25. {{ receptionDuration }}
  26. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  27. </view>
  28. <view class="tabbox" @click="screenshow">
  29. 更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  30. </view>
  31. </view>
  32. <!-- 筛选后的数量 -->
  33. <view class="count" v-if="recordList.length > 0">
  34. 筛选结果:<text>{{totalRecords}} </text>条
  35. </view>
  36. <view class="content">
  37. <view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
  38. <view style="width: 100%;height: 100%;padding-top: 200rpx;">
  39. <view style="width: 100%;text-align: center;">
  40. <image style="width: 220rpx;height: 200rpx;"
  41. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  42. </view>
  43. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  44. </view>
  45. </view>
  46. <view v-if="recordList.length" class="content-tips" v-for="(item,index) in recordList" :key='index'
  47. @click="gotoDetail(item.id)">
  48. <view class="content-first">
  49. <view class="left">
  50. <view class="test">{{item.name}}</view>
  51. <template v-if="item.level > 0">
  52. <view class="img" :class="colorName[item.level]">{{ item.level | levelText }}</view>
  53. </template>
  54. <view v-if="item.clientStageName" class="clientStageName">{{ item.clientStageName }}</view>
  55. </view>
  56. <view class="right">
  57. <image class="right-img" src="../../../static/images/arrow-right.png" mode=""></image>
  58. </view>
  59. </view>
  60. <view class="content-sec">
  61. <view class="content-sec-lab">
  62. 客户手机:<view class="content-sec-lab1">{{item.phone | phoneText}}</view>
  63. </view>
  64. <view class="content-sec-lab">
  65. 负责顾问:<view class="content-sec-lab1">{{item.agentName || ''}}</view>
  66. </view>
  67. <view class="content-sec-lab" style="line-height: 46rpx;">
  68. 客户意向:
  69. <text v-if="item.demand.cusSemanticWordsList==null">暂无</text>
  70. <template v-else>
  71. <block v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>
  72. <view class="content-sec-tips" v-if="ind<=3">{{che.name}}</view>
  73. </block>
  74. </template>
  75. </view>
  76. <view class="content-sec-lab">
  77. 添加时间:<view class="content-sec-lab1">{{item.createTime | formatTime}}</view>
  78. </view>
  79. <view class="content-sec-num">
  80. <view>到访{{item.visitRecord || '--'}}次</view>
  81. <view>
  82. {{item.mm || '0'}}min/{{item.fraction || '0'}}%
  83. </view>
  84. </view>
  85. </view>
  86. <template v-if="permissions.commonly2">
  87. <view class="content-last">
  88. <!-- <view class="content-last-tab">
  89. <image src="/static/images/genjin-icon.png" mode="" />添加提醒</view>
  90. <view class="content-last-tab">
  91. <image src="/static/images/genjin-icon.png" mode="" />
  92. 打电话</view> -->
  93. <view class="content-last-tab" @click.stop="gotoFollowUp(item)">
  94. <image src="/static/images/genjin-icon.png" mode="" />
  95. 写跟进
  96. </view>
  97. </view>
  98. </template>
  99. </view>
  100. </view>
  101. <u-popup v-model="screenShow" mode="top">
  102. <view class="screen">
  103. <!-- 顾问选择 -->
  104. <view class="screen-counselor">
  105. <view class="screen-text">
  106. 所属顾问
  107. </view>
  108. <view class="screen-sel" @tap="selectshow = true">
  109. <input v-model="screen.agentIdtext" type="text" placeholder="请选择" class="screen-inp" disabled />
  110. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  111. </view>
  112. </view>
  113. <view class="screen-counselor">
  114. <view class="screen-text">
  115. 客户标签
  116. </view>
  117. <view class="screen-sel" @tap="selectTipshow = true">
  118. <input v-model="screen.cunsumerTips" type="text" placeholder="请选择" class="screen-inp"
  119. disabled />
  120. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  121. </view>
  122. </view>
  123. <!-- 录音标示 -->
  124. <view class="screen-record">
  125. <view class="screen-record-text">
  126. 客户等级
  127. </view>
  128. <view class="screen-record-tab">
  129. <block v-for="(item,index) in levelList" :key="index">
  130. <view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  131. @click="choiceLevel(index,item.value)">
  132. {{item.label}}
  133. </view>
  134. </block>
  135. </view>
  136. </view>
  137. <!-- 客户来源 -->
  138. <template v-if="list.length > 0">
  139. <view class="screen-record">
  140. <view class="screen-record-text">
  141. 客户来源
  142. </view>
  143. <view class="screen-record-tab">
  144. <block v-for="(item, index) in list" :key="index">
  145. <view @tap="sourceId = item.id; sourceIndex = index "
  146. :class="[sourceIndex == index ? 'screen-record-chose':'screen-record-nochose']">
  147. {{ item.sourceName }}
  148. </view>
  149. </block>
  150. </view>
  151. </view>
  152. </template>
  153. <view class="screen-record">
  154. <view class="screen-record-text">
  155. 到访次数
  156. </view>
  157. <view class="screen-record-tab">
  158. <block v-for="(item,index) in visitList" :key="index">
  159. <view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  160. @click="choice(index, item.value)">
  161. {{item.label}}
  162. </view>
  163. </block>
  164. <!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']"
  165. @click="screenvisitRecord(1)">
  166. 首次到访
  167. </view>
  168. <view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']"
  169. @click="screenvisitRecord(2)">
  170. 2次到访
  171. </view>
  172. <view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']"
  173. @click="screenvisitRecord(3)">
  174. 3次到访
  175. </view>
  176. <view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']"
  177. @click="screenvisitRecord(4)">
  178. 3次以上
  179. </view> -->
  180. </view>
  181. </view>
  182. <view class="screen-foot">
  183. <view class="screen-foot-reset" @click="reset">
  184. 重置
  185. </view>
  186. <view class="screen-foot-sure" @click="screensure">
  187. 确定
  188. </view>
  189. </view>
  190. </view>
  191. </u-popup>
  192. <!-- 选择顾问的选择框 -->
  193. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  194. <!-- 客户标签 -->
  195. <u-select v-model="selectTipshow" :list="findKeywordsList" @confirm="selectCallback"></u-select>
  196. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  197. <u-popup v-model="timeshow" mode="bottom">
  198. <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
  199. @click="tabtimetap(5, '到访时间')">
  200. 全部</view>
  201. <view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
  202. @click="tabtimetap(0, '今天')">
  203. 今天</view>
  204. <view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
  205. @click="tabtimetap(1, '昨天')">
  206. 昨天</view>
  207. <view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
  208. @click="tabtimetap(2, '近7天')">
  209. 近7天</view>
  210. <view class="timeview" :style="{ color: activeTotal == 3 ? '#2B6EFF' : '#333333' }"
  211. @click="tabtimetap(3, '近30天')">
  212. 近30天</view>
  213. <view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
  214. 自定义</view>
  215. </u-popup>
  216. <u-popup v-model="timetushow" mode="bottom">
  217. <view class="timeview" :style="{ color: activeTotal2 == 0 ? '#2B6EFF' : '#333333' }"
  218. @click="timetap(0, '接待时长')">全部
  219. </view>
  220. <view class="timeview" :style="{ color: activeTotal2 == 1 ? '#2B6EFF' : '#333333' }"
  221. @click="timetap(1, '0~15min')">
  222. 0~15min</view>
  223. <view class="timeview" :style="{ color: activeTotal2 == 2 ? '#2B6EFF' : '#333333' }"
  224. @click="timetap(2, '15~30min')">
  225. 15~30min</view>
  226. <view class="timeview" :style="{ color: activeTotal2 == 3 ? '#2B6EFF' : '#333333' }"
  227. @click="timetap(3, '30~60min')">
  228. 30~60min</view>
  229. <view class="timeview" :style="{ color: activeTotal2 == 4 ? '#2B6EFF' : '#333333' }"
  230. @click="timetap(4, '60~90min')">
  231. 60~90min</view>
  232. <view class="timeview" :style="{ color: activeTotal2 == 5 ? '#2B6EFF' : '#333333' }"
  233. @click="timetap(5, '90min以上')">
  234. 90min以上</view>
  235. </u-popup>
  236. <u-popup v-model="soltishow" mode="bottom">
  237. <view class="soltishow" @tap.stop @touchmove.stop>
  238. <block v-for="(item, index) in orderBylist" :key="index">
  239. <view class="soltishow-item" :style="orderBy==item.value?'color: #2B6EFF':''"
  240. @click="selectCallback2(item)">
  241. {{ item.label }}
  242. </view>
  243. </block>
  244. </view>
  245. </u-popup>
  246. <!-- <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select> -->
  247. <!-- 底部导航栏 -->
  248. <!-- <u-tabbar :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList">
  249. </u-tabbar> -->
  250. <!-- 加载组件 -->
  251. <u-loadings v-model="LOADING"></u-loadings>
  252. </view>
  253. </template>
  254. <script>
  255. import tabbarList from '@/utils/tabbar.js'
  256. let _this
  257. export default {
  258. data() {
  259. return {
  260. // tabbar配置项
  261. current: 1,
  262. tabbarList: tabbarList,
  263. //--- end --- tabbar配置项
  264. orderBylist: [{
  265. label: '创建时间倒序',
  266. value: '1'
  267. },
  268. {
  269. label: '创建时间正序',
  270. value: '2'
  271. },
  272. {
  273. label: '接待时间倒序',
  274. value: '3'
  275. },
  276. {
  277. label: '接待时间正序',
  278. value: '4'
  279. },
  280. {
  281. label: '执行率正序',
  282. value: '5'
  283. },
  284. {
  285. label: '执行率倒序',
  286. value: '6'
  287. },
  288. {
  289. label: '接访次数正序',
  290. value: '7'
  291. },
  292. {
  293. label: '接访次数倒序',
  294. value: '8'
  295. },
  296. ],
  297. value: '',
  298. screenShow: false,
  299. selectshow: false,
  300. selectTipshow: false,
  301. buildingID: '',
  302. screen: {
  303. agentId: '',
  304. agentIdtext: '',
  305. visitRecord: [],
  306. record: [],
  307. cunsumerTips: '',
  308. cunsumerTipsid: '',
  309. },
  310. stageList: ['未知', '到访', '意向', '定金', '成交'],
  311. recordList: [],
  312. nextPage: 1,
  313. totalRecord: '',
  314. totalRecords: '', // 总条数
  315. freeList: [],
  316. userInfo: {},
  317. findKeywordsList: [],
  318. isnorefresh: '',
  319. activeTotal: 5,
  320. activeTotal2: 0,
  321. totalTimeShow: false,
  322. timeshow: false,
  323. timetushow: false,
  324. soltishow: false,
  325. staTime: '',
  326. endtime: '',
  327. orderBy: '', // 排序的id
  328. permissions: {
  329. commonly1: false,
  330. commonly2: false
  331. },
  332. list: [], // 客户来源列表
  333. sourceId: '', // 选中的客户来源id
  334. sourceIndex: -1, // 选中项的下标
  335. // 不同等级之间的颜色
  336. colorName: [
  337. '', "A", "B", "C", "D"
  338. ],
  339. // 筛选文字展示
  340. sortFilter: '排序',
  341. arriveFilter: '到访时间',
  342. receptionDuration: '接待时长',
  343. visitList: [{
  344. label: '首次到访',
  345. value: 1,
  346. isShow: false,
  347. }, {
  348. label: '2次到访',
  349. value: 2,
  350. isShow: false,
  351. }, {
  352. label: '3次到访',
  353. value: 3,
  354. isShow: false,
  355. }, {
  356. label: '3次以上',
  357. value: 4,
  358. isShow: false,
  359. }, ],
  360. levelList: [{
  361. label: 'A',
  362. value: 1,
  363. isShow: false,
  364. }, {
  365. label: 'B',
  366. value: 2,
  367. isShow: false,
  368. }, {
  369. label: 'C',
  370. value: 3,
  371. isShow: false,
  372. }, {
  373. label: 'D',
  374. value: 4,
  375. isShow: false,
  376. }, ],
  377. isRefresh: false
  378. }
  379. },
  380. onLoad(options) {
  381. // _this = this
  382. // this.isnorefresh = 'refresh';
  383. // this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
  384. // console.log(this.userInfo.showPhoneStatus)
  385. // if (this.isnorefresh == 'refresh') {
  386. // this.buildingID = uni.getStorageSync('buildingID').id;
  387. // this.nextPage = 1;
  388. // this.recordList = []
  389. // this.getFreeList()
  390. // this.getfindKeywordsList()
  391. // this.getFromSource();
  392. // this.isRefresh = false;
  393. // this.getMyCustom()
  394. // }
  395. },
  396. onPullDownRefresh() {
  397. this.nextPage = 1;
  398. this.isRefresh = true;
  399. this.resetFilter()
  400. this.reset()
  401. this.getFreeList()
  402. this.getfindKeywordsList()
  403. this.getFromSource();
  404. this.getMyCustom();
  405. setTimeout(() => {
  406. uni.stopPullDownRefresh()
  407. }, 2000)
  408. },
  409. onShow() {
  410. this.LOADING = true
  411. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  412. this.permissions.commonly1 = newmenulist.khgl_ck;
  413. this.permissions.commonly2 = newmenulist.khgl_gj;
  414. _this = this
  415. this.isnorefresh = 'refresh';
  416. this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
  417. // console.log(this.userInfo.showPhoneStatus)
  418. this.nextPage = 1;
  419. this.$forceUpdate()
  420. this.recordList = []
  421. this.buildingID = uni.getStorageSync('buildingID').id;
  422. if (this.isnorefresh == 'refresh') {
  423. this.getFreeList()
  424. this.getfindKeywordsList()
  425. this.getFromSource();
  426. this.isRefresh = false;
  427. this.getMyCustom()
  428. } else {
  429. this.getMyCustom()
  430. }
  431. },
  432. onReachBottom() {
  433. if (this.totalRecord == this.nextPage) {
  434. uni.showToast({
  435. icon: 'none',
  436. title: '到底了',
  437. duration: 2000
  438. });
  439. return
  440. } else {
  441. this.isRefresh = false;
  442. this.nextPage = this.nextPage + 1;
  443. this.getMyCustom();
  444. }
  445. },
  446. methods: {
  447. filterFun() {
  448. },
  449. // 过滤
  450. resetFilter() {
  451. this.sortFilter = '排序';
  452. this.orderBy = null;
  453. this.arriveFilter = '到访时间';
  454. this.staTime = '';
  455. this.endtime = '';
  456. this.nextPage = 1;
  457. this.activeTotal = 5;
  458. this.recordList = [];
  459. this.receptionDuration = '接待时长';
  460. this.activeTotal2 = 0;
  461. },
  462. // 获取客户来源
  463. getFromSource() {
  464. this.$u.get('customer/findCustomerSourceList', {
  465. houseId: this.buildingID
  466. }).then(res => {
  467. console.log('我进来了')
  468. this.list = res
  469. })
  470. },
  471. tapsoltishow() {
  472. this.soltishow = true;
  473. },
  474. taptimetuisshow() {
  475. this.timetushow = true;
  476. },
  477. taptimeisshow() {
  478. this.timeshow = true;
  479. },
  480. //选择标签
  481. selectCallback2(e) {
  482. this.sortFilter = e.label;
  483. this.orderBy = e.value;
  484. this.nextPage = 1;
  485. this.recordList = [];
  486. this.soltishow = false
  487. this.isRefresh = false;
  488. this.getMyCustom();
  489. },
  490. //选择录音时长
  491. timetap(index, text) {
  492. if (text) this.receptionDuration = text
  493. this.timetushow = false;
  494. this.activeTotal2 = index;
  495. this.nextPage = 1;
  496. this.recordList = [];
  497. this.isRefresh = false;
  498. this.getMyCustom();
  499. },
  500. //时间选择
  501. tabtimetap(index, text) {
  502. this.timeshow = false;
  503. if (text) this.arriveFilter = text
  504. if (index == 4) {
  505. this.totalTimeShow = true;
  506. } else {
  507. this.activeTotal = index;
  508. this.staTime = '';
  509. this.endtime = '';
  510. this.nextPage = 1;
  511. this.isRefresh = false;
  512. this.recordList = [];
  513. this.getMyCustom();
  514. }
  515. },
  516. //自定义时间
  517. totalTimeChange(e) {
  518. this.staTime = e.startDate;
  519. this.endtime = e.endDate;
  520. this.activeTotal = 4;
  521. this.nextPage = 1;
  522. this.recordList = [];
  523. this.isRefresh = false;
  524. this.arriveFilter = this.staTime + '-' + this.endtime
  525. this.getMyCustom();
  526. },
  527. recordclick(i) {
  528. if (this.screen.record == i) {
  529. this.screen.record = null
  530. } else {
  531. this.screen.record = i
  532. }
  533. },
  534. choice(index, e) {
  535. if (this.visitList[index].isShow == true) {
  536. this.visitList[index].isShow = false;
  537. for (var i = 0; i < this.screen.visitRecord.length; i++) {
  538. if (this.screen.visitRecord[i] === e) {
  539. this.screen.visitRecord.splice(i, 1);
  540. }
  541. }
  542. } else {
  543. this.visitList[index].isShow = true;
  544. console.log(this.screen)
  545. this.screen.visitRecord.push(e)
  546. }
  547. },
  548. choiceLevel(index, e) {
  549. if (this.levelList[index].isShow == true) {
  550. this.levelList[index].isShow = false;
  551. for (var i = 0; i < this.screen.record.length; i++) {
  552. if (this.screen.record[i] === e) {
  553. this.screen.record.splice(i, 1);
  554. }
  555. }
  556. } else {
  557. this.levelList[index].isShow = true;
  558. this.screen.record.push(e)
  559. }
  560. },
  561. screenvisitRecord(i) {
  562. if (this.screen.visitRecord == i) {
  563. this.screen.visitRecord = ''
  564. } else {
  565. this.screen.visitRecord = i
  566. }
  567. },
  568. // 客户详情
  569. gotoDetail(id) {
  570. if (this.permissions.commonly1 == true) {
  571. uni.navigateTo({
  572. url: `/pages/center/consumer/consumerDetail?id=${id}`
  573. })
  574. }
  575. },
  576. getMyCustom() {
  577. let dateType = 0;
  578. let recDurationInterval = 0;
  579. let orderBy = 0;
  580. if (this.activeTotal == 5) {
  581. dateType = null;
  582. } else if (this.activeTotal == 4) {
  583. dateType = null;
  584. } else {
  585. dateType = this.activeTotal;
  586. }
  587. if (this.activeTotal2 == 0) {
  588. recDurationInterval = null
  589. } else {
  590. recDurationInterval = this.activeTotal2
  591. }
  592. if (this.orderBy == 0) {
  593. orderBy = null;
  594. } else {
  595. orderBy = this.orderBy;
  596. }
  597. var parames = {
  598. pageNum: this.nextPage,
  599. pageSize: 10,
  600. query: {
  601. projectId: this.buildingID,
  602. keywordsId: this.screen.cunsumerTipsid,
  603. agentId: this.screen.agentId,
  604. dateType: dateType,
  605. staDate: this.staTime,
  606. endDate: this.endtime,
  607. recDurationInterval: recDurationInterval,
  608. orderBy: orderBy,
  609. sourceId: this.sourceId
  610. }
  611. };
  612. console.log(this.screen.visitRecord)
  613. if (this.screen.visitRecord.length > 0) {
  614. parames.query.visitRecords = this.screen.visitRecord.join(',');
  615. }
  616. if (this.screen.record.length > 0) {
  617. parames.query.level = this.screen.record.join(',');
  618. }
  619. this.$u.post("/customer/customerManagement", parames).then(data => {
  620. this.LOADING = false
  621. // if (this.staTime && this.endtime) {
  622. // this.receptionDuration = `${this.staTime}-${this.endtime}`
  623. // }
  624. var list = data.results || [];
  625. console.log(list)
  626. list.forEach(item => {
  627. if (item.demand.cusSemanticWordsList != null) {
  628. item.demand.cusSemanticWordsList.forEach(che => {
  629. if (che.isInterval == 0) {
  630. che.name = che.name + che.unit + '-' + che.endName + che.unit;
  631. }
  632. })
  633. }
  634. })
  635. if (this.isRefresh) {
  636. this.recordList = list;
  637. } else {
  638. this.recordList = [...this.recordList, ...list];
  639. }
  640. this.totalRecord = data.totalPage;
  641. this.totalRecords = data.totalRecord;
  642. }).catch(e => {
  643. this.LOADING = false
  644. })
  645. },
  646. //获取顾问列表
  647. getFreeList() {
  648. this.freeList = []
  649. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  650. houseId: this.buildingID
  651. }).then(res => {
  652. this.freeList = res;
  653. this.freeList.forEach(item => {
  654. item.label = item.name;
  655. item.value = item.accountId
  656. })
  657. })
  658. },
  659. //获取客户标签
  660. getfindKeywordsList() {
  661. this.findKeywordsList = []
  662. this.$u.post("/customer/findKeywords", {
  663. houseId: this.buildingID
  664. }).then(res => {
  665. res.forEach(item => {
  666. if (item.isInterval == 0) {
  667. item.label = item.name + item.unit + '-' + item.endName + item.unit;
  668. } else {
  669. item.label = item.name
  670. }
  671. item.value = item.id;
  672. })
  673. this.findKeywordsList = res;
  674. })
  675. },
  676. // 筛选
  677. screenshow() {
  678. this.screenShow = true
  679. },
  680. //选择顾问
  681. actionSelectCallback(e) {
  682. this.screen.agentId = e[0].value;
  683. this.screen.agentIdtext = e[0].label;
  684. },
  685. //选择标签
  686. selectCallback(e) {
  687. this.screen.cunsumerTips = e[0].label;
  688. this.screen.cunsumerTipsid = e[0].value;
  689. },
  690. //重置
  691. reset() {
  692. this.screen = {
  693. agentId: '',
  694. agentIdtext: '',
  695. visitRecord: [],
  696. record: [],
  697. cunsumerTips: '',
  698. cunsumerTipsid: '',
  699. level: ''
  700. }
  701. this.visitList.map(i => {
  702. i.isShow = false
  703. })
  704. this.levelList.map(i => {
  705. i.isShow = false
  706. })
  707. this.nextPage = 1;
  708. this.recordList = [];
  709. this.sourceId = '';
  710. this.sourceIndex = -1;
  711. this.isRefresh = false;
  712. this.getMyCustom();
  713. },
  714. //筛选确认
  715. screensure() {
  716. this.nextPage = 1;
  717. this.recordList = [];
  718. this.screenShow = false;
  719. this.isRefresh = false;
  720. this.getMyCustom();
  721. },
  722. goSearch() {
  723. uni.navigateTo({
  724. url: '/pages/center/consumer/consumerSearch'
  725. });
  726. },
  727. gotoFollowUp(item) {
  728. uni.navigateTo({
  729. url: `/pages/center/consumer/newFollowup/newFollowup?id=${item.id}&level=${item.level}&clientStageName=${item.clientStageName}`
  730. })
  731. },
  732. },
  733. filters: {
  734. // 筛选等级展示文字
  735. levelText(level) {
  736. let str = '';
  737. switch (Number(level)) {
  738. case 1:
  739. str = "A"
  740. break;
  741. case 2:
  742. str = "B"
  743. break;
  744. case 3:
  745. str = "C"
  746. break;
  747. case 4:
  748. str = "D"
  749. break;
  750. default:
  751. str = ''
  752. break;
  753. }
  754. return str
  755. },
  756. // 加密手机
  757. phoneText(mobile) {
  758. if (!mobile) return '--'
  759. if (_this.userInfo.showPhoneStatus == 1) return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
  760. else return mobile
  761. },
  762. // 格式化时间
  763. formatTime(time) {
  764. if (!time) return
  765. return time.substring(5, time.length)
  766. }
  767. }
  768. }
  769. </script>
  770. <style lang="scss" scoped>
  771. .box {
  772. width: 100vw;
  773. min-height: calc(100vh - var(--window-top));
  774. background: #F8F8F8;
  775. display: flex;
  776. flex-direction: column;
  777. .content {
  778. flex-grow: 1;
  779. }
  780. }
  781. .timeview {
  782. height: 90rpx;
  783. line-height: 90rpx;
  784. width: 100%;
  785. text-align: center;
  786. border-bottom: 1rpx solid #F8F8F8;
  787. }
  788. //时间切换的样式
  789. .boxtittab {
  790. position: sticky;
  791. top: var(--window-top);
  792. z-index: 999;
  793. width: 100;
  794. height: 72rpx;
  795. background: #FFFFFF;
  796. flex-shrink: 0;
  797. display: flex;
  798. align-items: center;
  799. .tabbox {
  800. flex: 1;
  801. height: 100%;
  802. text-align: center;
  803. line-height: 72rpx;
  804. color: #666666;
  805. font-size: 28rpx;
  806. overflow: hidden;
  807. text-overflow: ellipsis;
  808. display: -webkit-box;
  809. /* 将对象作为弹性伸缩盒子模型显示 */
  810. -webkit-line-clamp: 1;
  811. /* 控制最多显示几行 */
  812. -webkit-box-orient: vertical;
  813. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  814. }
  815. .activeColor {
  816. color: #2671E2;
  817. font-weight: bold;
  818. }
  819. }
  820. .soltishow {
  821. width: 100%;
  822. min-height: 40vh;
  823. .soltishow-item {
  824. width: 100%;
  825. height: 80rpx;
  826. display: flex;
  827. align-items: center;
  828. justify-content: center;
  829. }
  830. }
  831. .search-box {
  832. width: 100%;
  833. height: 102rpx;
  834. background: #FFFFFF;
  835. display: flex;
  836. align-items: center;
  837. justify-content: center;
  838. .filter {
  839. width: 40rpx;
  840. height: 40rpx;
  841. margin-left: 30rpx;
  842. }
  843. .search {
  844. width: 620rpx;
  845. height: 70rpx;
  846. display: flex;
  847. align-items: center;
  848. background: #F8F8F8;
  849. border-radius: 33rpx;
  850. .search-img {
  851. width: 26rpx;
  852. height: 30rpx;
  853. margin-left: 20rpx;
  854. .search-img1 {
  855. width: 100%;
  856. height: 100%;
  857. margin-top: 2rpx;
  858. }
  859. }
  860. .search-text {
  861. font-size: 28rpx;
  862. font-weight: 400;
  863. color: #999999;
  864. margin-left: 10rpx;
  865. }
  866. }
  867. .search-screen {
  868. width: 40rpx;
  869. height: 40rpx;
  870. margin-left: 30rpx;
  871. .search-screen1 {
  872. width: 100%;
  873. height: 100%;
  874. }
  875. }
  876. }
  877. .count {
  878. width: 100%;
  879. height: 82rpx;
  880. line-height: 82rpx;
  881. display: flex;
  882. align-items: center;
  883. justify-content: center;
  884. background-color: #f8f8f8;
  885. font-size: 30rpx;
  886. font-family: PingFangSC-Regular, PingFang SC;
  887. font-weight: 400;
  888. color: #333333;
  889. text {
  890. color: #E7483C;
  891. }
  892. }
  893. .content {
  894. .content-tips {
  895. background: #fff;
  896. margin-bottom: 20rpx;
  897. .content-first {
  898. padding: 19rpx 30rpx;
  899. display: flex;
  900. justify-content: space-between;
  901. align-items: center;
  902. box-sizing: border-box;
  903. color: #292929;
  904. height: 90rpx;
  905. font-size: 30rpx;
  906. .left {
  907. display: flex;
  908. align-items: center;
  909. .img {
  910. width: 48rpx;
  911. height: 48rpx;
  912. line-height: 48rpx;
  913. text-align: center;
  914. margin-right: 16rpx;
  915. background: #E6625B;
  916. border-radius: 6rpx;
  917. font-size: 28rpx;
  918. font-family: PingFangSC-Regular, PingFang SC;
  919. font-weight: 400;
  920. color: #FFFFFF;
  921. }
  922. .clientStageName {
  923. margin-right: 20rpx;
  924. padding: 0 16rpx;
  925. font-size: 28rpx;
  926. font-family: PingFangSC-Regular, PingFang SC;
  927. font-weight: 400;
  928. color: #FF981E;
  929. height: 48rpx;
  930. line-height: 48rpx;
  931. background: #FFFFFF;
  932. border-radius: 4rpx;
  933. border: 1rpx solid #FF981E;
  934. box-sizing: border-box;
  935. }
  936. .A {
  937. background: #E6625B;
  938. }
  939. .B {
  940. background: #FF981E;
  941. }
  942. .C {
  943. background: #F6BD16;
  944. }
  945. .D {
  946. background: #E6625B;
  947. }
  948. .test {
  949. height: 42rpx;
  950. font-size: 30rpx;
  951. font-family: PingFangSC-Medium, PingFang SC;
  952. font-weight: 500;
  953. color: #333333;
  954. line-height: 42rpx;
  955. margin-right: 16rpx;
  956. }
  957. }
  958. .right {
  959. display: flex;
  960. align-items: center;
  961. color: #2671E2;
  962. font-size: 30rpx;
  963. .right-img {
  964. margin: 5rpx 0 0 10rpx;
  965. width: 14rpx;
  966. height: 30rpx;
  967. }
  968. }
  969. }
  970. .content-sec {
  971. border-top: 1rpx solid #E0E0E0;
  972. padding: 0 28rpx 28rpx;
  973. position: relative;
  974. .content-sec-lab {
  975. margin-top: 28rpx;
  976. display: flex;
  977. font-size: 30rpx;
  978. font-weight: 400;
  979. color: #333;
  980. line-height: 42rpx;
  981. .content-sec-lab1 {
  982. color: #333333;
  983. }
  984. .content-sec-tips {
  985. padding: 0 20rpx;
  986. height: 48rpx;
  987. background: #F4F8FD;
  988. border-radius: 6rpx;
  989. max-width: 160rpx;
  990. text-align: center;
  991. line-height: 48rpx;
  992. overflow: hidden;
  993. text-overflow: ellipsis;
  994. white-space: nowrap;
  995. font-weight: 400;
  996. margin-right: 12rpx;
  997. box-sizing: border-box;
  998. font-size: 28rpx;
  999. font-family: PingFangSC-Regular, PingFang SC;
  1000. color: #2671E2;
  1001. }
  1002. }
  1003. .content-sec-num {
  1004. position: absolute;
  1005. width: 196rpx;
  1006. height: 112rpx;
  1007. border-radius: 8rpx;
  1008. top: 28rpx;
  1009. right: 30rpx;
  1010. padding: 16rpx 20rpx;
  1011. background: #F4F8FD;
  1012. color: #2671E2;
  1013. line-height: 40rpx;
  1014. text-align: center;
  1015. }
  1016. }
  1017. .content-last {
  1018. display: flex;
  1019. justify-content: flex-end;
  1020. align-items: center;
  1021. padding-bottom: 30rpx;
  1022. .content-last-tab {
  1023. width: 214rpx;
  1024. height: 70rpx;
  1025. line-height: 70rpx;
  1026. background: #FFFFFF;
  1027. border-radius: 8rpx;
  1028. border: 1rpx solid #2671E2;
  1029. box-sizing: border-box;
  1030. font-family: PingFangSC-Regular, PingFang SC;
  1031. font-weight: 400;
  1032. color: #2671E2;
  1033. font-size: 30rpx;
  1034. margin-right: 30rpx;
  1035. display: flex;
  1036. align-items: center;
  1037. justify-content: center;
  1038. image {
  1039. width: 40rpx;
  1040. height: 40rpx;
  1041. margin-right: 12rpx;
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. // 这是弹出层
  1048. .screen {
  1049. // box-sizing: border-box;
  1050. // padding: 0 30rpx;
  1051. .screen-counselor {
  1052. display: flex;
  1053. height: 106rpx;
  1054. // padding: 40rpx 30rpx 36rpx 30rpx;
  1055. padding: 0 30rpx;
  1056. box-sizing: border-box;
  1057. border-bottom: 1px solid #E0E0E0;
  1058. .screen-text {
  1059. flex-shrink: 0;
  1060. margin: 40rpx 0 36rpx 0;
  1061. font-size: 30rpx;
  1062. font-weight: 400;
  1063. color: #333333;
  1064. line-height: 30rpx;
  1065. }
  1066. .screen-sel {
  1067. flex-grow: 1;
  1068. display: flex;
  1069. justify-content: flex-end;
  1070. align-items: center;
  1071. margin-left: 60rpx;
  1072. .screen-sel-img {
  1073. flex-shrink: 0;
  1074. margin: 40rpx 0 36rpx 0;
  1075. width: 14rpx;
  1076. height: 30rpx;
  1077. }
  1078. .screen-inp {
  1079. padding: 0 20rpx;
  1080. text-align: right;
  1081. }
  1082. }
  1083. }
  1084. .screen-record {
  1085. height: 192rpx;
  1086. // width: 100%;
  1087. overflow: hidden;
  1088. padding: 0 30rpx;
  1089. box-sizing: border-box;
  1090. border-bottom: 1px solid #E0E0E0;
  1091. .screen-record-text {
  1092. margin-top: 36rpx;
  1093. font-size: 30rpx;
  1094. font-weight: 400;
  1095. color: #333333;
  1096. line-height: 30rpx;
  1097. }
  1098. .screen-record-tab {
  1099. margin-top: 30rpx;
  1100. display: flex;
  1101. // justify-content: space-around;
  1102. .screen-record-chose {
  1103. width: 156rpx;
  1104. height: 60rpx;
  1105. background: #2671E2;
  1106. border-radius: 4rpx;
  1107. border: 1px solid #2671E2;
  1108. text-align: center;
  1109. line-height: 60rpx;
  1110. margin-right: 22rpx;
  1111. color: #FFFFFF;
  1112. }
  1113. .screen-record-nochose {
  1114. width: 156rpx;
  1115. height: 60rpx;
  1116. background: #FFFFFF;
  1117. border-radius: 4rpx;
  1118. border: 1px solid #C9C9C9;
  1119. text-align: center;
  1120. line-height: 60rpx;
  1121. margin-right: 22rpx;
  1122. }
  1123. }
  1124. }
  1125. .screen-foot {
  1126. width: 100%;
  1127. height: 88rpx;
  1128. display: flex;
  1129. .screen-foot-reset {
  1130. width: 50%;
  1131. text-align: center;
  1132. height: 88rpx;
  1133. line-height: 88rpx;
  1134. font-size: 30rpx;
  1135. font-weight: 400;
  1136. color: #666666;
  1137. }
  1138. .screen-foot-sure {
  1139. width: 50%;
  1140. text-align: center;
  1141. line-height: 88rpx;
  1142. height: 88rpx;
  1143. font-size: 30rpx;
  1144. font-weight: 400;
  1145. color: #FFFFFF;
  1146. background: #2671E2;
  1147. }
  1148. }
  1149. }
  1150. </style>