AI营销辅助 普强使用
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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