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.
 
 
 

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