AI营销辅助 普强使用
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.
 
 
 

599 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.pachira.cn/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. onPullDownRefresh(){
  109. this.nextPage=1;
  110. this.isRefresh = true;
  111. this.getMyCustom()
  112. setTimeout(function () {
  113. uni.stopPullDownRefresh();
  114. }, 1000);
  115. },
  116. onShow() {
  117. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  118. if(this.isnorefresh=='refresh'){
  119. this.buildingID = uni.getStorageSync('buildingID').id;
  120. this.recordList=[];
  121. this.nextPage=1;
  122. this.isRefresh = false;
  123. this.getMyCustom()
  124. this.getFreeList();
  125. this.isnorefresh='';
  126. }
  127. var pages = getCurrentPages();
  128. pages[0].$vm.path='/pages/index/index'
  129. console.log(pages[0].$vm.path)
  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.isRefresh = false;
  141. this.nextPage+=1;
  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.isRefresh = false;
  157. this.recordList=[];
  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.isRefresh = false;
  171. this.recordList=[];
  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.isRefresh = false;
  182. this.recordList=[];
  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. // this.recordList = [...this.recordList, ...list];
  265. if(this.isRefresh){
  266. this.recordList = list;
  267. }else{
  268. this.recordList = [...this.recordList, ...list];
  269. }
  270. this.totalRecord=data.totalPage;
  271. this.totalRecords = data.totalRecord;
  272. })
  273. },
  274. //获取顾问列表
  275. getFreeList() {
  276. this.$u.get("/zkAgentPool/freeList?itemId="+this.buildingID).then(res => {
  277. this.freeList = res;
  278. this.freeList.forEach(item=>{
  279. item.label=item.name;
  280. item.value=item.agentId
  281. })
  282. })
  283. },
  284. //顾问确认
  285. actionSelectCallback(e){
  286. this.screen.agentId=e[0].value;
  287. this.recordList=[];
  288. this.isRefresh = false;
  289. this.nextPage=1;
  290. this.selectshow=false;
  291. this.getMyCustom();
  292. },
  293. },
  294. }
  295. </script>
  296. <style lang="scss" scoped>
  297. .box {
  298. width: 100%;
  299. height: 100%;
  300. background: #F8F8F8;
  301. }
  302. .count {
  303. width: 100%;
  304. height: 90rpx;
  305. display: flex;
  306. align-items: center;
  307. justify-content: center;
  308. background-color: #FBE4E4;
  309. text {
  310. color: #F71616;
  311. }
  312. }
  313. .timeview{
  314. height: 80rpx;
  315. line-height: 80rpx;
  316. width: 100%;
  317. text-align: center;
  318. border-bottom: 1px solid #F8F8F8;
  319. }
  320. //时间切换的样式
  321. .boxtittab {
  322. width: 100;
  323. height: 92rpx;
  324. background: #FFFFFF;
  325. border: 1px solid #E0E0E0;
  326. display: flex;
  327. align-items: center;
  328. .tabbox {
  329. flex: 1;
  330. height: 100%;
  331. text-align: center;
  332. line-height: 92rpx;
  333. color: #666666;
  334. font-size: 28rpx;
  335. }
  336. }
  337. .search-box{
  338. width: 100%;
  339. height: 102rpx;
  340. background: #FFFFFF;
  341. display: flex;
  342. align-items: center;
  343. justify-content: center;
  344. .search{
  345. width: 94%;
  346. height: 70rpx;
  347. display: flex;
  348. align-items: center;
  349. background: #F8F8F8;
  350. border-radius: 33rpx;
  351. .search-img{
  352. width: 26rpx;
  353. height: 30rpx;
  354. margin-left: 20rpx;
  355. .search-img1{
  356. width: 100%;
  357. height: 100%;
  358. margin-top: 2rpx;
  359. }
  360. }
  361. .search-text{
  362. font-size: 28rpx;
  363. font-weight: 400;
  364. color: #999999;
  365. margin-left:10rpx;
  366. }
  367. }
  368. .search-screen{
  369. width: 40rpx;
  370. height: 40rpx;
  371. margin-left: 30rpx;
  372. .search-screen1{
  373. width: 100%;
  374. height: 100%;
  375. }
  376. }
  377. }
  378. .content{
  379. .content-tips{
  380. background: #fff;
  381. padding: 0 20rpx;
  382. box-sizing: border-box;
  383. overflow: hidden;
  384. margin-top: 20rpx;
  385. .content-first{
  386. margin-top: 19rpx;
  387. display: flex;
  388. justify-content: space-between;
  389. .left{
  390. display: flex;
  391. .img{
  392. width: 52rpx;
  393. height: 52rpx;
  394. background: #FFFFFF;
  395. border: 1px solid #C9C9C9;
  396. border-radius: 50%;
  397. text-align: center;
  398. line-height: 52rpx;
  399. }
  400. .name{
  401. font-weight: 600;
  402. color: #333333;
  403. // margin-left: 20rpx;
  404. margin-top: 11rpx;
  405. }
  406. .status{
  407. width: 110rpx;
  408. height: 42rpx;
  409. background: #FFF9F5;
  410. border-radius: 4rpx;
  411. font-size: 26rpx;
  412. font-weight: 400;
  413. color: #EC8D49;
  414. line-height: 42rpx;
  415. text-align: center;
  416. margin-left: 19rpx;
  417. margin-top: 11rpx;
  418. }
  419. }
  420. .right{
  421. display: flex;
  422. margin-top: 11rpx;
  423. .point{
  424. width: 12rpx;
  425. height: 12rpx;
  426. background: #2B6EFF;
  427. border-radius: 50%;
  428. margin-right: 9rpx;
  429. margin-top: 16rpx;
  430. }
  431. }
  432. }
  433. .content-sec{
  434. display: flex;
  435. justify-content: space-between;
  436. margin-top: 19rpx;
  437. .left{
  438. display: flex;
  439. .cus{
  440. font-size: 30rpx;
  441. font-weight: 400;
  442. color: #666666;
  443. // line-height: 30rpx;
  444. }
  445. .arriveNum{
  446. font-size: 30rpx;
  447. font-weight: 400;
  448. // line-height: 30rpx;
  449. margin-left: 10rpx;
  450. }
  451. }
  452. .right{
  453. width: 120rpx;
  454. height: 46rpx;
  455. background: #F4F8FD;
  456. border-radius: 6rpx;
  457. text-align: center;
  458. line-height: 46rpx;
  459. font-weight: 400;
  460. color: #2671E2;
  461. }
  462. }
  463. .content-last{
  464. // margin: 30rpx 0;
  465. font-size: 30rpx;
  466. font-weight: 400;
  467. color: #666666;
  468. line-height: 30rpx;
  469. margin-top: 22rpx;
  470. margin-bottom: 30rpx;
  471. }
  472. }
  473. }
  474. // 这是弹出层
  475. .screen{
  476. // box-sizing: border-box;
  477. // padding: 0 30rpx;
  478. position:absolute;
  479. .screen-counselor{
  480. display: flex;
  481. height: 106rpx;
  482. // padding: 40rpx 30rpx 36rpx 30rpx;
  483. padding: 0 30rpx;
  484. box-sizing: border-box;
  485. border-bottom: 1px solid #EEEEEE;
  486. .screen-text{
  487. margin: 40rpx 0 36rpx 0;
  488. font-size: 30rpx;
  489. font-weight: 400;
  490. color: #333333;
  491. line-height: 30rpx;
  492. }
  493. .screen-sel{
  494. display: flex;
  495. justify-content: space-between;
  496. width: 500rpx;
  497. margin-left: 60rpx;
  498. .screen-sel-img{
  499. margin: 40rpx 0 36rpx 0;
  500. width: 14rpx;
  501. height: 30rpx;
  502. }
  503. .screen-inp{
  504. margin-top: 20rpx;
  505. }
  506. }
  507. }
  508. .screen-record{
  509. height: 192rpx;
  510. // width: 100%;
  511. overflow: hidden;
  512. padding: 0 30rpx;
  513. box-sizing: border-box;
  514. border-bottom: 1px solid #EEEEEE;
  515. .screen-record-text{
  516. margin-top: 36rpx;
  517. font-size: 30rpx;
  518. font-weight: 400;
  519. color: #333333;
  520. line-height: 30rpx;
  521. }
  522. .screen-record-tab{
  523. margin-top: 30rpx;
  524. display: flex;
  525. // justify-content: space-around;
  526. .screen-record-chose{
  527. width: 156rpx;
  528. height: 60rpx;
  529. background: #2671E2;
  530. border-radius: 4rpx;
  531. border: 1px solid #2671E2;
  532. text-align: center;
  533. line-height: 60rpx;
  534. margin-right: 22rpx;
  535. color: #FFFFFF;
  536. }
  537. .screen-record-nochose{
  538. width: 156rpx;
  539. height: 60rpx;
  540. background: #FFFFFF;
  541. border-radius: 4rpx;
  542. border: 1px solid #C9C9C9;
  543. text-align: center;
  544. line-height: 60rpx;
  545. margin-right: 22rpx;
  546. }
  547. }
  548. }
  549. .screen-foot{
  550. width: 100%;
  551. height: 100rpx;
  552. display: flex;
  553. .screen-foot-reset{
  554. width: 50%;
  555. text-align: center;
  556. height: 100rpx;
  557. line-height: 100rpx;
  558. font-size: 30rpx;
  559. font-weight: 400;
  560. color: #666666;
  561. }
  562. .screen-foot-sure{
  563. width: 50%;
  564. text-align: center;
  565. line-height: 100rpx;
  566. height: 100rpx;
  567. font-size: 30rpx;
  568. font-weight: 400;
  569. color: #FFFFFF;
  570. background: #2671E2;
  571. }
  572. }
  573. }
  574. </style>