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.
 
 
 

826 lines
18 KiB

  1. <template>
  2. <view class="box">
  3. <!-- 搜索框点击跳转 -->
  4. <view>
  5. <view class="search-box">
  6. <view class="search" @click="goSearch">
  7. <view class="search-img">
  8. <image class="search-img1" src="../../../static/images/search.png" mode=""></image>
  9. </view>
  10. <view class="search-text">输入客户姓名/手机号</view>
  11. </view>
  12. <view class="search-screen" @click="screenshow">
  13. <image class="search-screen1" src="../../../static/images/screen.png" mode=""></image>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 选择器 -->
  18. <view class="choose">
  19. <u-tabs :list="receptionList" :activeItemStyle="activeItemStyle" :isScroll="false" lineColor="#2671E2" @change="reception" :current="current"></u-tabs>
  20. </view>
  21. <!-- <view class="boxtittab">
  22. <view class="tabbox">
  23. <view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">今日</view>
  24. </view>
  25. <view class="tabbox">
  26. <view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">昨日</view>
  27. </view>
  28. <view class="tabbox">
  29. <view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">近一周</view>
  30. </view>
  31. <view class="tabbox">
  32. <view :class="{ activecllasscet: activeTotal == 3 }" @click="tabtimetap(3)">自定义</view>
  33. </view>
  34. </view> -->
  35. <view class="content">
  36. <view v-if="recordList.length==0"
  37. style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;">
  38. <view style="width: 100%;padding: 200rpx 0;">
  39. <view style="width: 100%;text-align: center;">
  40. <image style="width: 220rpx;height: 200rpx;"
  41. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  42. </view>
  43. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  44. </view>
  45. </view>
  46. <template v-if="recordList.length != 0">
  47. <view class="content-tips" v-for="(item,index) in recordList" :key='index'
  48. @click="tapThevisiting(item)">
  49. <view class="content-first">
  50. <view class="left">
  51. <view class="tag-id">顾</view>
  52. <view class="name">{{item.agentName || '--'}}</view>
  53. <view class="status" v-if="item.replaceReception==1">代接待</view>
  54. </view>
  55. <view class="middle">自动结束{{ nowTime }}</view>
  56. <view class="right">
  57. <!-- 文字状态 -->
  58. <template v-if="false">
  59. <view v-if="item.markAdvisor==0" class="">未标记</view>
  60. <view v-if="item.markAdvisor==1" class="">已标记</view>
  61. </template>
  62. <!-- 文字状态 -->
  63. <template v-if="true">
  64. <image src="../static/image/note.png" class="img1" mode=""></image>
  65. <image src="../static/image/power.png" class="img2" mode=""></image>
  66. <image src="../../../static/images/Thtapedrive1.png" class="img3" mode=""></image>
  67. </template>
  68. </view>
  69. </view>
  70. <view class="content-sec">
  71. <view class="c-left">
  72. <view class="left">
  73. <view class="tag-id">客</view>
  74. <view class="cus">{{item.name || '--'}}</view>
  75. <view class="phone">{{ item.phone | encryptionPhone }}</view>
  76. </view>
  77. <template>
  78. <view class="percent">
  79. <image src="../static/image/percent.png" mode=""></image>
  80. {{item.fraction || '0'}}%
  81. </view>
  82. </template>
  83. </view>
  84. <view class="right">
  85. <view class="items">
  86. <image class="img" src="../static/image/people.png"></image>
  87. <text class="i-right">{{ item.visitRecord || "--" }}次到访</text>
  88. </view>
  89. <view class="items">
  90. <image class="img" src="../static/image/time.png"></image>
  91. <text class="i-right"> {{ item.createTime }} </text>
  92. </view>
  93. <view class="items">
  94. <image class="img" src="../static/image/voice.png"></image>
  95. <text class="i-right"> {{ item.mm || '0' }} </text>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="content-last">
  100. <template v-if="true">
  101. <view class="btns">接待延迟</view>
  102. </template>
  103. <template v-if="false">
  104. <view class="btns">重新接待</view>
  105. </template>
  106. <template v-if="true">
  107. <view class="btns">结束接待</view>
  108. </template>
  109. <template v-if="false">
  110. <view class="btns">指派顾问</view>
  111. </template>
  112. </view>
  113. </view>
  114. </template>
  115. </view>
  116. <u-popup v-model="screenShow" mode="top" height="590">
  117. <view class="screen">
  118. <!-- 顾问选择 -->
  119. <view class="screen-counselor">
  120. <view class="screen-text">
  121. 所属顾问
  122. </view>
  123. <view class="screen-sel">
  124. <u-input v-model="screen.counselorName" type="text" placeholder='请选择' @click="selectshow = true"
  125. class="screen-inp" disabled />
  126. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  127. </view>
  128. </view>
  129. <view class="screen-record">
  130. <view class="screen-record-text">
  131. 标记顾问
  132. </view>
  133. <view class="screen-record-tab">
  134. <view :class="[screen.markAdvisor==1?'screen-record-chose':'screen-record-nochose']"
  135. @click="screenvisitRecord(1)">
  136. 标记
  137. </view>
  138. <view :class="[screen.markAdvisor==0?'screen-record-chose':'screen-record-nochose']"
  139. @click="screenvisitRecord(0)">
  140. 未标记
  141. </view>
  142. </view>
  143. </view>
  144. <view class="screen-record">
  145. <view class="screen-record-text">
  146. 到访次数
  147. </view>
  148. <view class="screen-record-tab">
  149. <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']"
  150. @click="recordclick(1)">
  151. 首次到访
  152. </view>
  153. <view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']"
  154. @click="recordclick(2)">
  155. 第二次
  156. </view>
  157. <view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']"
  158. @click="recordclick(3)">
  159. 第三次
  160. </view>
  161. <view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']"
  162. @click="recordclick(4)">
  163. 三次以上
  164. </view>
  165. </view>
  166. </view>
  167. <view class="screen-foot">
  168. <view class="screen-foot-reset" @click="reset">
  169. 重置
  170. </view>
  171. <view class="screen-foot-sure" @click="screensure">
  172. 确定
  173. </view>
  174. </view>
  175. </view>
  176. </u-popup>
  177. <!-- 选择顾问的选择框 -->
  178. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  179. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  180. </view>
  181. </template>
  182. <script>
  183. export default {
  184. data() {
  185. return {
  186. activeTotal: 2,
  187. value: '',
  188. screenShow: false,
  189. selectshow: false,
  190. totalTimeShow: false,
  191. screen: {
  192. agentId: '', //顾问id
  193. record: '0',
  194. markAdvisor: null,
  195. visitRecord: null
  196. },
  197. freeList: [], //顾问
  198. recordList: [],
  199. buildingID: '',
  200. nextPage: 1,
  201. totalRecord: "",
  202. staTime: '',
  203. endtime: '',
  204. isnorefresh: '',
  205. receptionList: [ // 接待类型列表
  206. {
  207. name: '接待中'
  208. },
  209. {
  210. name: '未标记'
  211. },
  212. {
  213. name: '已标记'
  214. }
  215. ],
  216. current: 0, // 当前选中项下标
  217. activeItemStyle: {
  218. fontWeight: '400',
  219. color: '#2671E2'
  220. },
  221. nowTime: new Date().getFullYear(), // 获取到的当前时间
  222. }
  223. },
  224. onLoad(options) {
  225. this.isnorefresh = options.refresh;
  226. },
  227. onShow() {
  228. if (this.isnorefresh == 'refresh') {
  229. this.buildingID = uni.getStorageSync('buildingID').id;
  230. this.recordList = [];
  231. this.nextPage = 1;
  232. this.getMyCustom()
  233. this.getFreeList();
  234. this.isnorefresh = '';
  235. }
  236. },
  237. onReachBottom() {
  238. if (this.totalRecord == this.nextPage) {
  239. uni.showToast({
  240. icon: 'none',
  241. title: '到底了',
  242. duration: 2000
  243. });
  244. return
  245. } else {
  246. this.nextPage += 1;
  247. this.getMyCustom();
  248. }
  249. },
  250. methods: {
  251. // 接待类型
  252. reception(e) {
  253. this.current = e
  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. var item = {
  271. bg: 0,
  272. customerId: item.id,
  273. }
  274. this.$u.post("/corpus/findByPage", parames).then(res => {
  275. if (res == null) {
  276. uni.showToast({
  277. icon: "none",
  278. title: "暂无音频"
  279. })
  280. return
  281. } else {
  282. let newobj = res[0];
  283. if (res[0].merge == 0) {
  284. uni.navigateTo({
  285. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}`
  286. })
  287. } else {
  288. uni.navigateTo({
  289. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}`
  290. })
  291. }
  292. }
  293. })
  294. }
  295. },
  296. getMyCustom() {
  297. let dateType = 0;
  298. if (this.activeTotal == 3) {
  299. dateType = null;
  300. } else {
  301. dateType = this.activeTotal
  302. }
  303. var parames = {
  304. pageNum: this.nextPage,
  305. pageSize: 10,
  306. query: {
  307. projectId: this.buildingID,
  308. time: 1,
  309. staTime: this.staTime,
  310. endtime: this.endtime,
  311. visitRecord: this.screen.visitRecord,
  312. markAdvisor: this.screen.markAdvisor,
  313. dateType: dateType
  314. }
  315. };
  316. if (this.screen.agentId) {
  317. parames.query.agentId = this.screen.agentId
  318. }
  319. this.$u.post("/customer/findbypage", parames).then(data => {
  320. var list = data.results || [];
  321. this.recordList = [...this.recordList, ...list];
  322. this.totalRecord = data.totalPage;
  323. })
  324. },
  325. //获取顾问列表
  326. getFreeList() {
  327. this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => {
  328. this.freeList = res;
  329. this.freeList.forEach(item => {
  330. item.label = item.name;
  331. item.value = item.agentId
  332. })
  333. })
  334. },
  335. tabtimetap(index) {
  336. if (index == 3) {
  337. this.totalTimeShow = true;
  338. } else {
  339. this.activeTotal = index;
  340. this.staTime = '';
  341. this.endtime = '';
  342. this.nextPage = 1;
  343. this.recordList = [];
  344. this.getMyCustom();
  345. }
  346. },
  347. //自定义时间
  348. totalTimeChange(e) {
  349. this.staTime = e.startDate;
  350. this.endtime = e.endDate;
  351. this.activeTotal = 3;
  352. this.nextPage = 1;
  353. this.recordList = [];
  354. this.getMyCustom();
  355. },
  356. // 筛选
  357. screenshow() {
  358. this.screenShow = true
  359. },
  360. actionSelectCallback(e) {
  361. this.screen.agentId = e[0].value;
  362. this.screenShow = false;
  363. this.recordList = [];
  364. this.nextPage = 1;
  365. this.getMyCustom();
  366. },
  367. reset() {
  368. this.screen = {
  369. counselorName: '',
  370. record: '0',
  371. markAdvisor: null,
  372. visitRecord: null
  373. }
  374. this.screenShow = false;
  375. this.nextPage = 1;
  376. this.recordList = [];
  377. this.getMyCustom();
  378. },
  379. recordclick(i) {
  380. if (this.screen.visitRecord == i) {
  381. this.screen.visitRecord = null
  382. } else {
  383. this.screen.visitRecord = i
  384. }
  385. },
  386. screenvisitRecord(i) {
  387. if (this.screen.markAdvisor == i) {
  388. this.screen.markAdvisor = null
  389. } else {
  390. this.screen.markAdvisor = i
  391. }
  392. },
  393. screensure() {
  394. this.screenShow = false;
  395. this.recordList = [];
  396. this.nextPage = 1;
  397. this.getMyCustom();
  398. },
  399. goSearch() {
  400. uni.navigateTo({
  401. url: '/pages/center/records/recordSearch'
  402. });
  403. },
  404. },
  405. filters: {
  406. // 加密手机号 中间四位
  407. encryptionPhone(phone) {
  408. if (!phone) return
  409. let reg=/(\d{3})\d{4}(\d{4})/; //正则表达式
  410. return phone.toString().replace(reg, "$1****$2")
  411. },
  412. }
  413. }
  414. </script>
  415. <style lang="scss" scoped>
  416. .box {
  417. width: 100%;
  418. min-height: calc(100vh - var(--window-top));
  419. background: #F8F8F8;
  420. .boxtittab {
  421. border-top: none;
  422. border-color: #E0E0E0;
  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: 620rpx;
  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. margin-top: 20rpx;
  469. box-sizing: border-box;
  470. overflow: hidden;
  471. background: #fff;
  472. .content-first {
  473. padding: 0 30rpx;
  474. width: 100%;
  475. height: 92rpx;
  476. display: flex;
  477. align-items: center;
  478. justify-content: space-between;
  479. .left,
  480. .middle,
  481. .right {
  482. flex: 1;
  483. }
  484. .left {
  485. display: flex;
  486. align-items: center;
  487. .tag-id {
  488. margin: 0 12rpx 0 0;
  489. padding: 5rpx 11rpx;
  490. font-size: 30rpx;
  491. color: #2671E2;
  492. line-height: 42rpx;
  493. border: 1rpx solid #2671E2;
  494. border-radius: 50%;
  495. }
  496. .img {
  497. width: 52rpx;
  498. height: 52rpx;
  499. background: #FFFFFF;
  500. border: 1px solid #C9C9C9;
  501. border-radius: 50%;
  502. text-align: center;
  503. line-height: 52rpx;
  504. }
  505. .name {
  506. font-weight: 600;
  507. color: #333333;
  508. }
  509. .status {
  510. width: 110rpx;
  511. height: 42rpx;
  512. background: #FFF9F5;
  513. border-radius: 4rpx;
  514. font-size: 26rpx;
  515. font-weight: 400;
  516. color: #EC8D49;
  517. line-height: 42rpx;
  518. text-align: center;
  519. margin-left: 19rpx;
  520. margin-top: 11rpx;
  521. }
  522. }
  523. .middle {
  524. color: #E7483C;
  525. font-size: 30rpx;
  526. text-align: center;
  527. }
  528. .right {
  529. display: flex;
  530. justify-content: flex-end;
  531. .point {
  532. width: 12rpx;
  533. height: 12rpx;
  534. background: #2B6EFF;
  535. border-radius: 50%;
  536. margin-right: 9rpx;
  537. margin-top: 16rpx;
  538. }
  539. .img1 {
  540. width: 24rpx;
  541. height: 32rpx;
  542. }
  543. .img2 {
  544. margin-left: 24rpx;
  545. width: 22rpx;
  546. height: 32rpx;
  547. }
  548. .img3 {
  549. margin-left: 24rpx;
  550. width: 28rpx;
  551. height: 32rpx;
  552. }
  553. }
  554. }
  555. .content-sec {
  556. padding: 28rpx 30rpx 24rpx;
  557. border: 1rpx solid #E0E0E0;
  558. border-left: none;
  559. border-right: none;
  560. .c-left {
  561. width: 100%;
  562. display: flex;
  563. .percent {
  564. flex-shrink: 0;
  565. display: flex;
  566. align-items: center;
  567. font-size: 30rpx;
  568. color: #333;
  569. image {
  570. margin-right: 10rpx;
  571. width: 32rpx;
  572. height: 32rpx;
  573. }
  574. }
  575. }
  576. .left {
  577. flex-grow: 1;
  578. display: flex;
  579. align-items: center;
  580. .tag-id {
  581. margin: 0 12rpx 0 0;
  582. padding: 5rpx 11rpx;
  583. font-size: 30rpx;
  584. color: #fff;
  585. line-height: 42rpx;
  586. border: 1rpx solid #2671E2;
  587. background: #2671E2;
  588. border-radius: 50%;
  589. }
  590. .cus {
  591. font-size: 30rpx;
  592. font-weight: 600;
  593. color: #333;
  594. }
  595. .phone {
  596. margin-left: 20rpx;
  597. font-size: 30rpx;
  598. color: #333;
  599. }
  600. .arriveNum {
  601. font-size: 30rpx;
  602. font-weight: 400;
  603. margin-left: 10rpx;
  604. }
  605. }
  606. .right {
  607. margin-top: 24rpx;
  608. display: flex;
  609. justify-content: space-between;
  610. .items {
  611. display: flex;
  612. align-items: center;
  613. .img {
  614. margin-right: 10rpx;
  615. width: 30rpx;
  616. height: 30rpx;
  617. flex-shrink: 0;
  618. }
  619. .i-right {
  620. flex-shrink: 0;
  621. color: #333;
  622. font-size: 28rpx;
  623. }
  624. }
  625. }
  626. }
  627. .content-last {
  628. padding: 0 30rpx;
  629. height: 108rpx;
  630. display: flex;
  631. align-items: center;
  632. justify-content: flex-end;
  633. .btns {
  634. margin-left: 30rpx;
  635. height: 60rpx;
  636. padding: 0 18rpx;
  637. border: 1rpx solid #999999;
  638. font-size: 30rpx;
  639. border-radius: 30rpx;
  640. line-height: 60rpx;
  641. }
  642. }
  643. }
  644. }
  645. // 这是弹出层
  646. .screen {
  647. // box-sizing: border-box;
  648. // padding: 0 30rpx;
  649. position: absolute;
  650. .screen-counselor {
  651. display: flex;
  652. height: 106rpx;
  653. // padding: 40rpx 30rpx 36rpx 30rpx;
  654. padding: 0 30rpx;
  655. box-sizing: border-box;
  656. border-bottom: 1px solid #EEEEEE;
  657. .screen-text {
  658. margin: 40rpx 0 36rpx 0;
  659. font-size: 30rpx;
  660. font-weight: 400;
  661. color: #333333;
  662. line-height: 30rpx;
  663. }
  664. .screen-sel {
  665. display: flex;
  666. justify-content: space-between;
  667. width: 500rpx;
  668. margin-left: 60rpx;
  669. .screen-sel-img {
  670. margin: 40rpx 0 36rpx 0;
  671. width: 14rpx;
  672. height: 30rpx;
  673. }
  674. .screen-inp {
  675. margin-top: 20rpx;
  676. }
  677. }
  678. }
  679. .screen-record {
  680. height: 192rpx;
  681. // width: 100%;
  682. overflow: hidden;
  683. padding: 0 30rpx;
  684. box-sizing: border-box;
  685. border-bottom: 1px solid #EEEEEE;
  686. .screen-record-text {
  687. margin-top: 36rpx;
  688. font-size: 30rpx;
  689. font-weight: 400;
  690. color: #333333;
  691. line-height: 30rpx;
  692. }
  693. .screen-record-tab {
  694. margin-top: 30rpx;
  695. display: flex;
  696. // justify-content: space-around;
  697. .screen-record-chose {
  698. width: 156rpx;
  699. height: 60rpx;
  700. background: #2671E2;
  701. border-radius: 4rpx;
  702. border: 1px solid #2671E2;
  703. text-align: center;
  704. line-height: 60rpx;
  705. margin-right: 22rpx;
  706. color: #FFFFFF;
  707. }
  708. .screen-record-nochose {
  709. width: 156rpx;
  710. height: 60rpx;
  711. background: #FFFFFF;
  712. border-radius: 4rpx;
  713. border: 1px solid #C9C9C9;
  714. text-align: center;
  715. line-height: 60rpx;
  716. margin-right: 22rpx;
  717. }
  718. }
  719. }
  720. .screen-foot {
  721. width: 100%;
  722. height: 100rpx;
  723. display: flex;
  724. .screen-foot-reset {
  725. width: 50%;
  726. text-align: center;
  727. height: 100rpx;
  728. line-height: 100rpx;
  729. font-size: 30rpx;
  730. font-weight: 400;
  731. color: #666666;
  732. }
  733. .screen-foot-sure {
  734. width: 50%;
  735. text-align: center;
  736. line-height: 100rpx;
  737. height: 100rpx;
  738. font-size: 30rpx;
  739. font-weight: 400;
  740. color: #FFFFFF;
  741. background: #2671E2;
  742. }
  743. }
  744. }
  745. </style>