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.
 
 
 

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