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.
 
 
 

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