選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

551 行
12 KiB

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