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.
 
 
 
 

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