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.
 
 
 
 

672 lines
14 KiB

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