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.

index.vue 14 KiB

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