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.
 
 
 

560 lines
14 KiB

  1. <template>
  2. <view class="box">
  3. <view>
  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 class="search-screen" @click="screenshow">
  12. <image class="search-screen1" src="../../../static/images/screen.png" mode=""></image>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="content">
  17. <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="gotoDetail(item.id)">
  18. <view class="content-first">
  19. <view class="left">
  20. <view class="img">{{item.name.slice(0,1)}}</view>
  21. <view class="test">{{item.name}}</view>
  22. </view>
  23. <!-- <view class="right">
  24. <view class="point"></view>
  25. <view class="test">定金</view>
  26. </view> -->
  27. </view>
  28. <view class="content-sec">
  29. <view class="content-sec-lab">
  30. 手机号码:<view class="content-sec-lab1">{{item.phone || '--'}}</view>
  31. </view>
  32. <view class="content-sec-lab">
  33. 客户标签:
  34. <!-- <view class="content-sec-tips" v-for="(che,ind) in item.demand.cusSemanticWords" :key='ind'>{{che.name}}</view> -->
  35. </view>
  36. <view class="content-sec-lab">
  37. 顾问姓名:<view class="content-sec-lab1">{{item.agentName}}</view>
  38. </view>
  39. <view class="content-sec-lab">
  40. 添加时间:<view class="content-sec-lab1">{{item.createTime}}</view>
  41. </view>
  42. <view class="content-sec-num">
  43. <view class="">{{item.visitRecord}}次到访</view>
  44. <view class="">{{item.fraction || '0'}}% | {{item.fraction || '0'}}分</view>
  45. </view>
  46. </view>
  47. <view class="content-last" v-if="item.isshow==true">
  48. <!-- <view class="content-last-tab">添加提醒</view>
  49. <view class="content-last-tab">拨打电话</view> -->
  50. <view class="content-last-tab" @click.stop="gotoFollowUp(item.id)">写跟进</view>
  51. </view>
  52. </view>
  53. </view>
  54. <u-popup v-model="screenShow" mode="top" >
  55. <view class="screen">
  56. <!-- 顾问选择 -->
  57. <view class="screen-counselor">
  58. <view class="screen-text">
  59. 所属顾问
  60. </view>
  61. <view class="screen-sel">
  62. <u-input v-model="screen.agentIdtext" type="text" placeholder='请选择' @click="selectshow = true" class="screen-inp" disabled />
  63. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  64. </view>
  65. </view>
  66. <view class="screen-counselor">
  67. <view class="screen-text">
  68. 客户标签
  69. </view>
  70. <view class="screen-sel">
  71. <u-input v-model="screen.cunsumerTips" type="text" placeholder='请选择' @click="selectTipshow = true" class="screen-inp" disabled />
  72. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  73. </view>
  74. </view>
  75. <!-- 录音标示 -->
  76. <view class="screen-record">
  77. <view class="screen-record-text">
  78. 客户等级
  79. </view>
  80. <view class="screen-record-tab">
  81. <view :class="[screen.record==0?'screen-record-chose':'screen-record-nochose']" @click="screen.record=0">
  82. A
  83. </view>
  84. <view :class="[screen.record==1?'screen-record-chose':'screen-record-nochose']" @click="screen.record=1">
  85. B
  86. </view>
  87. <view :class="[screen.record==2?'screen-record-chose':'screen-record-nochose']" @click="screen.record=2">
  88. C
  89. </view>
  90. <view :class="[screen.record==3?'screen-record-chose':'screen-record-nochose']" @click="screen.record=3">
  91. D
  92. </view>
  93. </view>
  94. </view>
  95. <!-- <view class="screen-record">
  96. <view class="screen-record-text">
  97. 客户阶段
  98. </view>
  99. <view class="screen-record-tab">
  100. <view v-for="(item,index) in stageList" :key="index">
  101. <view :class="[screen.stage==index?'screen-record-chose':'screen-record-nochose']" @click="screen.stage=index" style="width: 120rpx;">
  102. {{item}}
  103. </view>
  104. </view>
  105. </view>
  106. </view> -->
  107. <view class="screen-record">
  108. <view class="screen-record-text">
  109. 到访次数
  110. </view>
  111. <view class="screen-record-tab">
  112. <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" @click="screen.visitRecord=1">
  113. 首次到访
  114. </view>
  115. <view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']" @click="screen.visitRecord=2">
  116. 第二次
  117. </view>
  118. <view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']" @click="screen.visitRecord=3">
  119. 第三次
  120. </view>
  121. <view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" @click="screen.visitRecord=4">
  122. 三次以上
  123. </view>
  124. </view>
  125. </view>
  126. <view class="screen-foot">
  127. <view class="screen-foot-reset" @click="reset">
  128. 重置
  129. </view>
  130. <view class="screen-foot-sure" @click="screensure">
  131. 确定
  132. </view>
  133. </view>
  134. </view>
  135. </u-popup>
  136. <!-- 选择顾问的选择框 -->
  137. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  138. <!-- 客户标签 -->
  139. <u-select v-model="selectTipshow" :list="list1" @confirm="selectCallback"></u-select>
  140. <!-- 时间选择器 -->
  141. </view>
  142. </template>
  143. <script>
  144. export default{
  145. data(){
  146. return{
  147. value:'',
  148. screenShow:false,
  149. selectshow:false,
  150. selectTipshow:false,
  151. buildingID:'',
  152. screen:{
  153. agentId:'',
  154. agentIdtext:'',
  155. visitRecord:'',
  156. record:null,
  157. cunsumerTips:''
  158. },
  159. stageList:['未知','到访','意向','定金','成交'],
  160. recordList:[],
  161. nextPage:1,
  162. totalRecord:'',
  163. freeList:[],
  164. userInfo:{}
  165. }
  166. },
  167. onShow() {
  168. this.buildingID = uni.getStorageSync('buildingID').id;
  169. this.recordList=[]
  170. this.getMyCustom()
  171. this.getFreeList()
  172. },
  173. onReachBottom() {
  174. if(this.totalRecord==this.nextPage){
  175. uni.showToast({
  176. icon:'none',
  177. title: '到底了',
  178. duration: 2000
  179. });
  180. return
  181. }else{
  182. this.nextPage+=1;
  183. this.getMyCustom();
  184. }
  185. },
  186. methods:{
  187. // 客户详情
  188. gotoDetail(id) {
  189. uni.navigateTo({
  190. url: `/pages/center/consumer/consumerDetail?id=${id}`
  191. })
  192. },
  193. getMyCustom(){
  194. var parames = {
  195. pageNum: this.nextPage,
  196. pageSize: 10,
  197. query: {
  198. projectId:this.buildingID,
  199. }
  200. };
  201. if (this.screen.agentId.length > 0) {
  202. parames.query.agentId = this.screen.agentId;
  203. }
  204. if (this.screen.visitRecord.length > 0) {
  205. parames.query.visitRecord = this.screen.visitRecord;
  206. }
  207. if (this.screen.visitRecord > 0) {
  208. parames.query.visitRecord = this.screen.visitRecord;
  209. }
  210. if(this.screen.record==0){
  211. parames.query.levels= ["1"]
  212. }else if(this.screen.record==1){
  213. parames.query.levels= ["2"]
  214. }else if(this.screen.record==2){
  215. parames.query.levels= ["3"]
  216. }else if(this.screen.record==3){
  217. parames.query.levels= ["4"]
  218. }else{
  219. parames.query.levels=''
  220. }
  221. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  222. this.$u.post("/customer/customerManagement", parames).then(data => {
  223. var list = data.results || [];
  224. list.forEach(item=>{
  225. if(this.userInfo.dataCode == 6){
  226. item.isshow=true;
  227. }else{
  228. item.isshow=false;
  229. }
  230. })
  231. this.recordList = [...this.recordList, ...list];
  232. this.totalRecord=data.totalPage;
  233. })
  234. },
  235. //获取顾问列表
  236. getFreeList() {
  237. this.$u.get("/zkAgentPool/freeList?itemId="+this.buildingID).then(res => {
  238. this.freeList = res;
  239. this.freeList.forEach(item=>{
  240. item.label=item.name;
  241. item.value=item.agentId
  242. })
  243. })
  244. },
  245. // 筛选
  246. screenshow(){
  247. this.screenShow=true
  248. },
  249. //选择顾问
  250. actionSelectCallback(e){
  251. this.screen.agentId=e[0].value;
  252. this.screen.agentIdtext=e[0].label;
  253. },
  254. //选择标签
  255. selectCallback(e){
  256. console.log(e[0].label)
  257. },
  258. //重置
  259. reset(){
  260. this.screen={
  261. agentId:'',
  262. agentIdtext:'',
  263. visitRecord:'',
  264. record:null,
  265. cunsumerTips:''
  266. }
  267. this.recordList=[];
  268. this.getMyCustom();
  269. },
  270. //筛选确认
  271. screensure(){
  272. this.screenShow=false;
  273. this.nextPage=1;
  274. this.recordList=[];
  275. this.getMyCustom();
  276. },
  277. goSearch(){
  278. uni.navigateTo({
  279. url: '/pages/center/consumer/consumerSearch'
  280. });
  281. },
  282. gotoFollowUp(id) {
  283. uni.navigateTo({
  284. url: `/pages/center/consumer/newFollowup/newFollowup?id=${id}`
  285. })
  286. },
  287. }
  288. }
  289. </script>
  290. <style lang="scss" scoped>
  291. .box {
  292. width: 100%;
  293. height: 100%;
  294. background: #F8F8F8;
  295. }
  296. .search-box{
  297. width: 100%;
  298. height: 102rpx;
  299. background: #FFFFFF;
  300. display: flex;
  301. align-items: center;
  302. justify-content: center;
  303. .search{
  304. width: 620rpx;
  305. height: 70rpx;
  306. display: flex;
  307. align-items: center;
  308. background: #F8F8F8;
  309. border-radius: 33rpx;
  310. .search-img{
  311. width: 26rpx;
  312. height: 30rpx;
  313. margin-left: 20rpx;
  314. .search-img1{
  315. width: 100%;
  316. height: 100%;
  317. margin-top: 2rpx;
  318. }
  319. }
  320. .search-text{
  321. font-size: 28rpx;
  322. font-weight: 400;
  323. color: #999999;
  324. margin-left:10rpx;
  325. }
  326. }
  327. .search-screen{
  328. width: 40rpx;
  329. height: 40rpx;
  330. margin-left: 30rpx;
  331. .search-screen1{
  332. width: 100%;
  333. height: 100%;
  334. }
  335. }
  336. }
  337. .content{
  338. // height: 1000rpx;/
  339. overflow: hidden;
  340. border-top: 1px solid #E0E0E0;
  341. .content-tips{
  342. background: #fff;
  343. // box-sizing: border-box;
  344. margin-bottom: 20rpx;
  345. overflow: hidden;
  346. .content-first{
  347. padding: 19rpx 30rpx;
  348. display: flex;
  349. justify-content: space-between;
  350. box-sizing: border-box;
  351. // border-top: 1px solid #E0E0E0;
  352. font-weight: 400;
  353. color: #292929;
  354. height: 90rpx;
  355. font-size: 30rpx;
  356. line-height: 30rpx;
  357. .left{
  358. display: flex;
  359. .img{
  360. // margin-top: 19rpx;
  361. width: 52rpx;
  362. height: 52rpx;
  363. border: 1px solid #E0E0E0;
  364. border-radius: 50%;
  365. text-align: center;
  366. line-height: 50rpx;
  367. }
  368. .test{
  369. margin-top: 11rpx;
  370. margin-left: 20rpx;
  371. font-weight: 500;
  372. color: #333333;
  373. }
  374. }
  375. .right{
  376. display: flex;
  377. .point{
  378. width: 12rpx;
  379. height: 12rpx;
  380. background: #2B6EFF;
  381. border-radius: 50%;
  382. margin-right: 9rpx;
  383. margin-top: 20rpx;
  384. }
  385. .test{
  386. margin-top: 11rpx;
  387. }
  388. }
  389. }
  390. .content-sec{
  391. border-top: 1px solid #E0E0E0;
  392. padding: 0 30rpx;
  393. padding-bottom: 30rpx;
  394. // height: 270rpx;
  395. position: relative;
  396. .content-sec-lab{
  397. margin-top: 30rpx;
  398. display: flex;
  399. font-size: 30rpx;
  400. font-weight: 400;
  401. color: #666666;
  402. line-height: 30rpx;
  403. .content-sec-lab1{
  404. color: #333333;
  405. }
  406. .content-sec-tips{
  407. max-width:174rpx ;
  408. height: 46rpx;
  409. background: #F2F2F2;
  410. border-radius: 6rpx;
  411. text-align: center;
  412. line-height: 26rpx;
  413. overflow: hidden;
  414. text-overflow:ellipsis;
  415. white-space: nowrap;
  416. font-size: 26rpx;
  417. font-weight: 400;
  418. color: #333333;
  419. margin-right: 24rpx;
  420. box-sizing: border-box;
  421. padding: 10rpx 24rpx;
  422. }
  423. }
  424. .content-sec-num{
  425. position: absolute;
  426. width: 190rpx;
  427. height: 90rpx;
  428. background: #F4F8FD;
  429. border-radius: 12rpx;
  430. font-weight: 400;
  431. color: #2671E2;
  432. line-height: 45rpx;
  433. bottom: 30rpx;
  434. right: 30rpx;
  435. text-align: center;
  436. }
  437. }
  438. .content-last{
  439. display: flex;
  440. border-top: 1px solid #E0E0E0;
  441. // padding: 0 30rpx;
  442. height: 78rpx;
  443. .content-last-tab{
  444. width: 33.4%;
  445. text-align: center;
  446. font-size: 30rpx;
  447. font-weight: 400;
  448. color: #333333;
  449. line-height: 78rpx;
  450. border-right: 1px solid #E0E0E0;
  451. }
  452. }
  453. }
  454. }
  455. // 这是弹出层
  456. .screen{
  457. // box-sizing: border-box;
  458. // padding: 0 30rpx;
  459. .screen-counselor{
  460. display: flex;
  461. height: 106rpx;
  462. // padding: 40rpx 30rpx 36rpx 30rpx;
  463. padding: 0 30rpx;
  464. box-sizing: border-box;
  465. border-bottom: 1px solid #CCCCCC;
  466. .screen-text{
  467. margin: 40rpx 0 36rpx 0;
  468. font-size: 30rpx;
  469. font-weight: 400;
  470. color: #333333;
  471. line-height: 30rpx;
  472. }
  473. .screen-sel{
  474. display: flex;
  475. justify-content: space-between;
  476. width: 500rpx;
  477. margin-left: 60rpx;
  478. .screen-sel-img{
  479. margin: 40rpx 0 36rpx 0;
  480. width: 14rpx;
  481. height: 30rpx;
  482. }
  483. .screen-inp{
  484. margin-top: 20rpx;
  485. }
  486. }
  487. }
  488. .screen-record{
  489. height: 192rpx;
  490. // width: 100%;
  491. overflow: hidden;
  492. padding: 0 30rpx;
  493. box-sizing: border-box;
  494. border-bottom: 1px solid #CCCCCC;
  495. .screen-record-text{
  496. margin-top: 36rpx;
  497. font-size: 30rpx;
  498. font-weight: 400;
  499. color: #333333;
  500. line-height: 30rpx;
  501. }
  502. .screen-record-tab{
  503. margin-top: 30rpx;
  504. display: flex;
  505. // justify-content: space-around;
  506. .screen-record-chose{
  507. width: 156rpx;
  508. height: 60rpx;
  509. background: #FFFFFF;
  510. border-radius: 4rpx;
  511. border: 1px solid #2671E2;
  512. text-align: center;
  513. line-height: 60rpx;
  514. margin-right: 22rpx;
  515. }
  516. .screen-record-nochose{
  517. width: 156rpx;
  518. height: 60rpx;
  519. background: #FFFFFF;
  520. border-radius: 4rpx;
  521. border: 1px solid #C9C9C9;
  522. text-align: center;
  523. line-height: 60rpx;
  524. margin-right: 22rpx;
  525. }
  526. }
  527. }
  528. .screen-foot{
  529. height: 88rpx;
  530. display: flex;
  531. .screen-foot-reset{
  532. width: 50%;
  533. text-align: center;
  534. line-height: 88rpx;
  535. font-size: 30rpx;
  536. font-weight: 400;
  537. color: #666666;
  538. }
  539. .screen-foot-sure{
  540. width: 50%;
  541. text-align: center;
  542. line-height: 88rpx;
  543. font-size: 30rpx;
  544. font-weight: 400;
  545. color: #FFFFFF;
  546. background: #2671E2;
  547. }
  548. }
  549. }
  550. </style>