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.
 
 
 

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