Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

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