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.
 
 
 

555 lines
13 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">首次到访</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.flag==0?'screen-record-chose':'screen-record-nochose']" @click="screen.flag=0">
  97. 标记
  98. </view>
  99. <view :class="[screen.flag==1?'screen-record-chose':'screen-record-nochose']" @click="screen.flag=1">
  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.arriveNum==0?'screen-record-chose':'screen-record-nochose']" @click="screen.arriveNum=0">
  110. 首次到访
  111. </view>
  112. <view :class="[screen.arriveNum==1?'screen-record-chose':'screen-record-nochose']" @click="screen.arriveNum=1">
  113. 第二次
  114. </view>
  115. <view :class="[screen.arriveNum==2?'screen-record-chose':'screen-record-nochose']" @click="screen.arriveNum=2">
  116. 第三次
  117. </view>
  118. <view :class="[screen.arriveNum==3?'screen-record-chose':'screen-record-nochose']" @click="screen.arriveNum=3">
  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. flag:'0',
  151. arriveNum:'0'
  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. // uni.navigateTo({
  211. // url: `/pages/main/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}`
  212. // })
  213. }
  214. })
  215. }
  216. },
  217. getMyCustom(){
  218. var parames = {
  219. pageNum: this.nextPage,
  220. pageSize: 10,
  221. query: {
  222. projectId:this.buildingID,
  223. time:1,
  224. staTime:this.staTime,
  225. endtime:this.endtime
  226. }
  227. };
  228. if(this.screen.agentId){
  229. parames.query.agentId = this.screen.agentId
  230. }
  231. this.$u.post("/customer/findbypage", parames).then(data => {
  232. var list = data.results || [];
  233. this.recordList = [...this.recordList, ...list];
  234. this.totalRecord=data.totalPage;
  235. })
  236. },
  237. //获取顾问列表
  238. getFreeList() {
  239. this.$u.get("/zkAgentPool/freeList?itemId="+this.buildingID).then(res => {
  240. this.freeList = res;
  241. this.freeList.forEach(item=>{
  242. item.label=item.name;
  243. item.value=item.agentId
  244. })
  245. })
  246. },
  247. tabtimetap(index){
  248. if (index == 3) {
  249. this.totalTimeShow = true;
  250. } else {
  251. this.activeTotal = index;
  252. this.staTime='';
  253. this.endtime='';
  254. }
  255. },
  256. //自定义时间
  257. totalTimeChange(e) {
  258. this.staTime=e.startDate;
  259. this.endtime=e.endDate;
  260. this.activeTotal=3;
  261. this.nextPage=1;
  262. this.recordList=[];
  263. this.getMyCustom();
  264. },
  265. // 筛选
  266. screenshow(){
  267. this.screenShow=true
  268. },
  269. actionSelectCallback(e){
  270. this.screen.agentId=e[0].value;
  271. this.screenShow=false;
  272. this.recordList=[];
  273. this.nextPage=1;
  274. this.getMyCustom();
  275. },
  276. reset(){
  277. this.screen={
  278. counselorName:'',
  279. record:'0',
  280. flag:'0',
  281. arriveNum:'0'
  282. }
  283. },
  284. screensure(){
  285. console.log(this.screen)
  286. this.screenShow=false
  287. },
  288. goSearch(){
  289. uni.navigateTo({
  290. url: '/pages/center/records/recordSearch'
  291. });
  292. },
  293. },
  294. }
  295. </script>
  296. <style lang="scss" scoped>
  297. .box {
  298. width: 100%;
  299. height: 100%;
  300. background: #F8F8F8;
  301. }
  302. .search-box{
  303. width: 100%;
  304. height: 102rpx;
  305. background: #FFFFFF;
  306. display: flex;
  307. align-items: center;
  308. justify-content: center;
  309. .search{
  310. width: 620rpx;
  311. height: 70rpx;
  312. display: flex;
  313. align-items: center;
  314. background: #F8F8F8;
  315. border-radius: 33rpx;
  316. .search-img{
  317. width: 26rpx;
  318. height: 30rpx;
  319. margin-left: 20rpx;
  320. .search-img1{
  321. width: 100%;
  322. height: 100%;
  323. margin-top: 2rpx;
  324. }
  325. }
  326. .search-text{
  327. font-size: 28rpx;
  328. font-weight: 400;
  329. color: #999999;
  330. margin-left:10rpx;
  331. }
  332. }
  333. .search-screen{
  334. width: 40rpx;
  335. height: 40rpx;
  336. margin-left: 30rpx;
  337. .search-screen1{
  338. width: 100%;
  339. height: 100%;
  340. }
  341. }
  342. }
  343. .content{
  344. .content-tips{
  345. background: #fff;
  346. padding: 0 20rpx;
  347. box-sizing: border-box;
  348. overflow: hidden;
  349. margin-top: 20rpx;
  350. .content-first{
  351. margin-top: 19rpx;
  352. display: flex;
  353. justify-content: space-between;
  354. .left{
  355. display: flex;
  356. .img{
  357. width: 52rpx;
  358. height: 52rpx;
  359. background: #FFFFFF;
  360. border: 1px solid #C9C9C9;
  361. border-radius: 50%;
  362. text-align: center;
  363. line-height: 52rpx;
  364. }
  365. .name{
  366. font-weight: 600;
  367. color: #333333;
  368. margin-left: 20rpx;
  369. margin-top: 11rpx;
  370. }
  371. .status{
  372. width: 110rpx;
  373. height: 42rpx;
  374. background: #FFF9F5;
  375. border-radius: 4rpx;
  376. font-size: 26rpx;
  377. font-weight: 400;
  378. color: #EC8D49;
  379. line-height: 42rpx;
  380. text-align: center;
  381. margin-left: 19rpx;
  382. margin-top: 11rpx;
  383. }
  384. }
  385. .right{
  386. display: flex;
  387. margin-top: 11rpx;
  388. .point{
  389. width: 12rpx;
  390. height: 12rpx;
  391. background: #2B6EFF;
  392. border-radius: 50%;
  393. margin-right: 9rpx;
  394. margin-top: 16rpx;
  395. }
  396. }
  397. }
  398. .content-sec{
  399. display: flex;
  400. justify-content: space-between;
  401. margin-top: 19rpx;
  402. .left{
  403. display: flex;
  404. .cus{
  405. font-size: 30rpx;
  406. font-weight: 400;
  407. color: #666666;
  408. line-height: 30rpx;
  409. }
  410. .arriveNum{
  411. font-size: 30rpx;
  412. font-weight: 400;
  413. line-height: 30rpx;
  414. margin-left: 10rpx;
  415. }
  416. }
  417. .right{
  418. width: 192rpx;
  419. height: 46rpx;
  420. background: #F4F8FD;
  421. border-radius: 6rpx;
  422. text-align: center;
  423. line-height: 46rpx;
  424. font-weight: 400;
  425. color: #2671E2;
  426. }
  427. }
  428. .content-last{
  429. margin: 30rpx 0;
  430. font-size: 30rpx;
  431. font-weight: 400;
  432. color: #666666;
  433. line-height: 30rpx;
  434. }
  435. }
  436. }
  437. // 这是弹出层
  438. .screen{
  439. // box-sizing: border-box;
  440. // padding: 0 30rpx;
  441. position:absolute;
  442. .screen-counselor{
  443. display: flex;
  444. height: 106rpx;
  445. // padding: 40rpx 30rpx 36rpx 30rpx;
  446. padding: 0 30rpx;
  447. box-sizing: border-box;
  448. border-bottom: 1px solid #CCCCCC;
  449. .screen-text{
  450. margin: 40rpx 0 36rpx 0;
  451. font-size: 30rpx;
  452. font-weight: 400;
  453. color: #333333;
  454. line-height: 30rpx;
  455. }
  456. .screen-sel{
  457. display: flex;
  458. justify-content: space-between;
  459. width: 500rpx;
  460. margin-left: 60rpx;
  461. .screen-sel-img{
  462. margin: 40rpx 0 36rpx 0;
  463. width: 14rpx;
  464. height: 30rpx;
  465. }
  466. .screen-inp{
  467. margin-top: 20rpx;
  468. }
  469. }
  470. }
  471. .screen-record{
  472. height: 192rpx;
  473. // width: 100%;
  474. overflow: hidden;
  475. padding: 0 30rpx;
  476. box-sizing: border-box;
  477. border-bottom: 1px solid #CCCCCC;
  478. .screen-record-text{
  479. margin-top: 36rpx;
  480. font-size: 30rpx;
  481. font-weight: 400;
  482. color: #333333;
  483. line-height: 30rpx;
  484. }
  485. .screen-record-tab{
  486. margin-top: 30rpx;
  487. display: flex;
  488. // justify-content: space-around;
  489. .screen-record-chose{
  490. width: 156rpx;
  491. height: 60rpx;
  492. background: #FFFFFF;
  493. border-radius: 4rpx;
  494. border: 1px solid #2671E2;
  495. text-align: center;
  496. line-height: 60rpx;
  497. margin-right: 22rpx;
  498. }
  499. .screen-record-nochose{
  500. width: 156rpx;
  501. height: 60rpx;
  502. background: #FFFFFF;
  503. border-radius: 4rpx;
  504. border: 1px solid #C9C9C9;
  505. text-align: center;
  506. line-height: 60rpx;
  507. margin-right: 22rpx;
  508. }
  509. }
  510. }
  511. .screen-foot{
  512. position: relative;
  513. left: 0rpx;
  514. bottom: 0rpx;
  515. height: 88rpx;
  516. display: flex;
  517. .screen-foot-reset{
  518. width: 50%;
  519. text-align: center;
  520. line-height: 88rpx;
  521. font-size: 30rpx;
  522. font-weight: 400;
  523. color: #666666;
  524. }
  525. .screen-foot-sure{
  526. width: 50%;
  527. text-align: center;
  528. line-height: 88rpx;
  529. font-size: 30rpx;
  530. font-weight: 400;
  531. color: #FFFFFF;
  532. background: #2671E2;
  533. }
  534. }
  535. }
  536. </style>