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.
 
 
 

573 lines
14 KiB

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