AI销管
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

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