AI销管
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

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