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.
 
 
 

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