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.
 
 
 

722 lines
15 KiB

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