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.
 
 
 

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