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.
 
 
 
 

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