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.
 
 
 

791 lines
18 KiB

  1. <template>
  2. <view class="box">
  3. <view class="content">
  4. <view class="content-tips" @click="goedit()">
  5. <view class="content-first">
  6. <view class="left">
  7. <view class="img">{{customerInfo.name.slice(0,1) || '--'}}</view>
  8. <view class="test">{{customerInfo.name || '--'}}</view>
  9. <view class="edit">
  10. <image class="screen-sel-img" src="../../../static/images/edit.png" mode=""></image>
  11. </view>
  12. </view>
  13. <!-- <view class="right">
  14. <view class="point"></view>
  15. <view class="test">定金</view>
  16. </view> -->
  17. </view>
  18. <view class="content-sec">
  19. <view class="content-sec-lab">
  20. 手机号码:<view class="content-sec-lab1">{{customerInfo.phone || '--'}}</view>
  21. </view>
  22. <view class="content-sec-lab">
  23. 客户标签:
  24. <view class="content-sec-tips">投资</view>
  25. <view class="content-sec-tips">理财专用</view>
  26. <view class="content-sec-tips">学区</view>
  27. </view>
  28. <view class="content-sec-lab">
  29. 顾问姓名:<view class="content-sec-lab1">{{customerInfo.agentName}}</view>
  30. </view>
  31. <view class="content-sec-lab">
  32. 添加时间:<view class="content-sec-lab1">{{customerInfo.createTime}}</view>
  33. </view>
  34. <view class="content-sec-num">
  35. <view class="">{{customerInfo.visitRecord}}次到访</view>
  36. <view class="">{{customerInfo.fraction || '0'}}% | {{customerInfo.fraction || '0'}}分</view>
  37. </view>
  38. </view>
  39. <view class="content-last">
  40. <view class="content-last-con">
  41. 备注:{{customerInfo.demand.remarks ? customerInfo.demand.remarks : "暂无"}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="tabchange">
  47. <view class="tab">
  48. <view class="tabbox">
  49. <view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">接待记录</view>
  50. </view>
  51. <view class="tabbox">
  52. <view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1)">跟进记录</view>
  53. </view>
  54. <view class="tabbox">
  55. <view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">执行率</view>
  56. </view>
  57. </view>
  58. <view class="tabactive1" v-if="activeTotal==0">
  59. <view class="content-tips" v-for="(item,index) in Thevisitingrecords" :key="index" @click="tapThevisiting(item)">
  60. <view class="content-first">
  61. <view class="left">
  62. <view class="img">{{item.agentName.slice(0,1) || '--'}}</view>
  63. <view class="name">{{item.agentName || '--'}}</view>
  64. <view class="status">代接待</view>
  65. </view>
  66. <!-- <view class="right">
  67. <view class="point"></view>
  68. <view class="">优秀案例</view>
  69. </view> -->
  70. </view>
  71. <view class="content-sec">
  72. <view class="left">
  73. <view class="cus">客户:{{item.name || ''}} |</view>
  74. <view class="arriveNum">{{item.visitRecord}}次到访</view>
  75. </view>
  76. <view class="right">{{item.fraction || '0'}}% | {{item.fraction || '0'}}分</view>
  77. </view>
  78. <view class="content-last">{{item.createTime}} | 80分钟</view>
  79. </view>
  80. </view>
  81. <view class="tabactive2" v-if="activeTotal==1">
  82. <view class="tab2-tips" v-for="(item,index) in fllowList" :key="index">
  83. <view class="tab2-first">
  84. <view class="tab2-first-1">
  85. <view class="tab2-first-left">
  86. <view class="img">{{item.agentName.slice(0,1) || '--'}}</view>
  87. <view class="name">{{item.agentName || '||'}}</view>
  88. </view>
  89. <view class="tab2-first-right">{{item.createTime}}</view>
  90. </view>
  91. <view class="tab2-first-foot">{{item.remarks || '--'}}</view>
  92. </view>
  93. <!-- <view class="tab2-sec">
  94. <view class="tab-sec-edit">编辑记录</view>
  95. </view> -->
  96. </view>
  97. </view>
  98. <!-- <view class="tabactive" v-if="activeTotal==2">执行率</view> -->
  99. <!-- 评分 -->
  100. <view v-if="activeTotal==2" class="tabactive rate-box" >
  101. <view class="title">总执行率 {{totalRate}}%</view>
  102. <view v-for="(item,index) in ratelist" :key="index" class="u-m-b-14">
  103. <view class="level1">
  104. <view class="level-name u-line-1">
  105. {{item.name}}
  106. </view>
  107. <view class="level-progress">
  108. <view class="color" :style="{width: item.ratepercent/item.rate*100+'%'}"></view>
  109. </view>
  110. <view class="level-rate">{{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}%</view>
  111. <image v-if="!item.show" class="arrow rotatearrow" @click="changeshow(item,1)" src="/static/images/down.png"
  112. mode="" />
  113. <image v-else class="arrow" @click="changeshow(item,0)" src="/static/images/up.png" mode="" />
  114. </view>
  115. <view class="level1-subbox" v-if="item.show">
  116. <view class="sub-name" v-for="(subitem,i) in item.children" :key="i">
  117. <view class="subitem-name u-line-1" @tap="clickaudeopal(subitem)">{{subitem.name}}</view>
  118. <image class="checkimg" v-if="!subitem.selected" src="/static/images/rate-checked.png" mode="" />
  119. <image class="checkimg" v-else src="/static/images/rate-nocheck.png" mode="" />
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="pon-foot">
  126. <view class="foot-tab" @click="goRemind">添加提醒</view>
  127. <!-- <view class="foot-tab">拨打电话</view> -->
  128. <view class="foot-tab" @click="followRecordAdd()">写跟进</view>
  129. </view>
  130. </view>
  131. </template>
  132. <script>
  133. export default{
  134. data(){
  135. return{
  136. activeTotal: 0,
  137. customerId:'',
  138. customerInfo:{
  139. name:'',
  140. createTime:'',
  141. agentName:''
  142. },
  143. Thevisitingrecords:[],
  144. totalRate:[],
  145. ratelist:[],
  146. fllowList:[],
  147. }
  148. },
  149. onLoad(options) {
  150. this.customerId = options.id;
  151. },
  152. onShow() {
  153. this.getCustomerInfo()
  154. this.tabtimetap(0)
  155. },
  156. methods:{
  157. // 获取到访记录
  158. getVisitList() {
  159. this.$u.get("/customer/findByPhoneAndProject?id=" + this.customerId, ).then(res => {
  160. this.Thevisitingrecords = res
  161. })
  162. },
  163. // 获取客户信息
  164. getCustomerInfo() {
  165. const that = this;
  166. this.$u.get("/customer/findById", {
  167. id: this.customerId
  168. }).then(res => {
  169. this.customerInfo = res;
  170. })
  171. },
  172. tabtimetap(idx){
  173. this.activeTotal=idx
  174. if(idx==0){
  175. this.getVisitList()
  176. }else if(idx==1){
  177. this.getFollowList()
  178. }else{
  179. this.getRatelist()
  180. }
  181. },
  182. tapThevisiting(item) {
  183. if(item.yon!=0){
  184. uni.showToast({
  185. icon:'none',
  186. title: '暂无录音',
  187. duration: 2000
  188. });
  189. return
  190. }else{
  191. const parames = {
  192. pageNum: 1,
  193. pageSize: 100,
  194. query: {
  195. customerId: item.id,
  196. }
  197. }
  198. var item={
  199. bg:0,
  200. customerId:item.id,
  201. id:''
  202. }
  203. this.$u.post("/corpus/findByPage", parames).then(res => {
  204. if(res[0].recordDuration>360){
  205. let newobj = res[0];
  206. uni.navigateTo({
  207. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}`
  208. })
  209. }else{
  210. let newobj = res[0];
  211. uni.navigateTo({
  212. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}`
  213. })
  214. }
  215. })
  216. }
  217. },
  218. // 获取跟进记录
  219. getFollowList() {
  220. this.fllowList=[];
  221. this.$u.post("/customer/getCusStage", {
  222. customerId: this.customerId
  223. }).then(res => {
  224. this.fllowList = res;
  225. })
  226. },
  227. // 新增跟进
  228. followRecordAdd() {
  229. uni.navigateTo({
  230. url: `/pages/center/consumer/newFollowup/newFollowup?id=${this.customerId}`
  231. })
  232. },
  233. // 去编辑
  234. goedit(){
  235. // console.log('去编辑')
  236. uni.navigateTo({
  237. url:'/pages/center/consumer/edit'
  238. })
  239. },
  240. // 去添加提醒
  241. goRemind(){
  242. uni.navigateTo({
  243. url:'/pages/center/consumer/remind'
  244. })
  245. },
  246. //评分点击
  247. clickaudeopal(item){
  248. if(item.selected==0){
  249. uni.navigateTo({
  250. url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
  251. })
  252. }
  253. },
  254. changeshow(item, type) {
  255. if (type == 1) {
  256. item.show = true
  257. } else {
  258. item.show = false
  259. }
  260. },
  261. // 获取评分
  262. getRatelist() {
  263. this.$u.get("/customer/findzkMByCusId", {
  264. cusId: this.customerId
  265. }).then(res => {
  266. if (res.length) {
  267. let level1 = []
  268. let level2rate = 0
  269. res.forEach(item => {
  270. if (item.pid == 0) {
  271. level1.push({
  272. id: item.marketingId,
  273. rate: item.fraction,
  274. name: item.name,
  275. sort: item.sort,
  276. show: false,
  277. ratepercent: 0,
  278. children: []
  279. })
  280. } else {
  281. if (item.selected == 0) {
  282. level2rate += item.fraction
  283. }
  284. }
  285. })
  286. this.totalRate = level2rate
  287. res.forEach(subitem => {
  288. let subitempid = subitem.pid
  289. level1.forEach(item => {
  290. if (subitempid == item.id) {
  291. if (subitem.selected == 0) {
  292. item.ratepercent += subitem.fraction
  293. }
  294. item.children.push({
  295. id: subitem.id,
  296. rate: subitem.fraction,
  297. selected: subitem.selected,
  298. name: subitem.name,
  299. marketingId:subitem.marketingId
  300. })
  301. }
  302. })
  303. })
  304. level1[0].show = true;
  305. this.ratelist = level1
  306. }
  307. })
  308. },
  309. }
  310. }
  311. </script>
  312. <style lang="scss" scoped>
  313. .box {
  314. width: 100%;
  315. height: 100%;
  316. background: #F8F8F8;
  317. }
  318. // 评分
  319. .rate-box {
  320. padding: 10rpx 20rpx;
  321. background-color: #FFFFFF;
  322. .date {
  323. width: 300rpx;
  324. height: 33rpx;
  325. font-size: 24rpx;
  326. font-weight: 400;
  327. color: #333333;
  328. line-height: 33rpx;
  329. letter-spacing: 1rpx;
  330. margin-bottom: 8rpx;
  331. }
  332. .title {
  333. width: 100%;
  334. height: 42rpx;
  335. font-size: 30rpx;
  336. font-weight: 500;
  337. color: #333333;
  338. line-height: 42rpx;
  339. letter-spacing: 2rpx;
  340. margin-bottom: 20rpx;
  341. }
  342. .level1 {
  343. display: flex;
  344. align-items: center;
  345. .level-name {
  346. width: 104rpx;
  347. height: 33rpx;
  348. font-size: 24rpx;
  349. font-weight: 500;
  350. color: #333333;
  351. line-height: 33rpx;
  352. letter-spacing: 1rpx;
  353. margin-right: 10rpx;
  354. }
  355. .level-progress {
  356. flex: 1;
  357. border-radius: 11rpx;
  358. height: 21rpx;
  359. background-color: #BEE4FF;
  360. position: relative;
  361. .color {
  362. width: 0;
  363. position: absolute;
  364. top: 0;
  365. left: 0;
  366. height: 21rpx;
  367. border-radius: 11rpx 0 0 11rpx;
  368. background-color: #008EF2;
  369. }
  370. }
  371. .level-rate {
  372. width: 65rpx;
  373. height: 33rpx;
  374. font-size: 24rpx;
  375. font-weight: 500;
  376. color: #333333;
  377. line-height: 33rpx;
  378. letter-spacing: 1rpx;
  379. margin: 0 20rpx 0 15rpx;
  380. }
  381. .arrow {
  382. width: 37rpx;
  383. height: 21rpx;
  384. padding: 5rpx 20rpx;
  385. }
  386. .rotatearrow {
  387. transform: rotate(270deg);
  388. }
  389. }
  390. .level1-subbox {
  391. display: flex;
  392. margin-top: 20rpx;
  393. flex-wrap: wrap;
  394. .sub-name {
  395. width: 50%;
  396. display: flex;
  397. margin-bottom: 18rpx;
  398. .subitem-name {
  399. width: 104rpx;
  400. height: 33rpx;
  401. font-size: 24rpx;
  402. font-weight: 400;
  403. color: #999999;
  404. line-height: 33rpx;
  405. letter-spacing: 1rpx;
  406. margin-right: 12rpx;
  407. }
  408. .checkimg {
  409. width: 27rpx;
  410. height: 27rpx;
  411. }
  412. }
  413. }
  414. }
  415. .tab{
  416. height: 88rpx;
  417. border-bottom: 1px solid #E0E0E0;
  418. background: #FFFFFF;
  419. display: flex;
  420. align-items: center;
  421. .tabbox {
  422. flex: 1;
  423. height: 100%;
  424. text-align: center;
  425. line-height: 92rpx;
  426. color: #666666;
  427. font-size: 28rpx;
  428. display: flex;
  429. justify-content: center;
  430. .activecllasscet {
  431. border-bottom: 2px solid #2671E2;
  432. color: #2671E2;
  433. font-weight: 600;
  434. }
  435. }
  436. }
  437. .content{
  438. // height: 1000rpx;/
  439. overflow: hidden;
  440. border-top: 1px solid #E0E0E0;
  441. .content-tips{
  442. background: #fff;
  443. // box-sizing: border-box;
  444. margin-bottom: 20rpx;
  445. overflow: hidden;
  446. .content-first{
  447. padding: 19rpx 30rpx;
  448. display: flex;
  449. justify-content: space-between;
  450. box-sizing: border-box;
  451. // border-top: 1px solid #E0E0E0;
  452. font-weight: 400;
  453. color: #292929;
  454. height: 90rpx;
  455. font-size: 30rpx;
  456. line-height: 30rpx;
  457. .left{
  458. display: flex;
  459. .img{
  460. // margin-top: 19rpx;
  461. width: 52rpx;
  462. height: 52rpx;
  463. border: 1px solid #E0E0E0;
  464. border-radius: 50%;
  465. text-align: center;
  466. line-height: 50rpx;
  467. }
  468. .test{
  469. margin-top: 11rpx;
  470. margin-left: 20rpx;
  471. font-weight: 500;
  472. color: #333333;
  473. }
  474. .edit{
  475. height: 30rpx;
  476. width: 30rpx;
  477. margin-left: 30rpx;
  478. margin-top: 11rpx;
  479. image{
  480. width: 100%;
  481. height: 100%;
  482. }
  483. }
  484. }
  485. .right{
  486. display: flex;
  487. .point{
  488. width: 12rpx;
  489. height: 12rpx;
  490. background: #2B6EFF;
  491. border-radius: 50%;
  492. margin-right: 9rpx;
  493. margin-top: 20rpx;
  494. }
  495. .test{
  496. margin-top: 11rpx;
  497. }
  498. }
  499. }
  500. .content-sec{
  501. border-top: 1px solid #E0E0E0;
  502. padding: 0 30rpx;
  503. height: 270rpx;
  504. position: relative;
  505. .content-sec-lab{
  506. margin-top: 30rpx;
  507. display: flex;
  508. font-size: 30rpx;
  509. font-weight: 400;
  510. color: #666666;
  511. line-height: 30rpx;
  512. .content-sec-lab1{
  513. color: #333333;
  514. }
  515. .content-sec-tips{
  516. max-width:174rpx ;
  517. height: 46rpx;
  518. background: #F2F2F2;
  519. border-radius: 6rpx;
  520. text-align: center;
  521. line-height: 26rpx;
  522. overflow: hidden;
  523. text-overflow:ellipsis;
  524. white-space: nowrap;
  525. font-size: 26rpx;
  526. font-weight: 400;
  527. color: #333333;
  528. margin-right: 24rpx;
  529. box-sizing: border-box;
  530. padding: 10rpx 24rpx;
  531. }
  532. }
  533. .content-sec-num{
  534. position: absolute;
  535. width: 190rpx;
  536. height: 90rpx;
  537. background: #F4F8FD;
  538. border-radius: 12rpx;
  539. font-weight: 400;
  540. color: #2671E2;
  541. line-height: 45rpx;
  542. bottom: 30rpx;
  543. right: 30rpx;
  544. text-align: center;
  545. }
  546. }
  547. .content-last{
  548. padding: 30rpx;
  549. height: 168rpx;
  550. .content-last-con{
  551. width: 690rpx;
  552. height: 108rpx;
  553. background: #F8F8F8;
  554. border-radius: 8rpx;
  555. padding: 14rpx 20rpx;
  556. font-size: 28rpx;
  557. font-weight: 400;
  558. color: #333333;
  559. line-height: 40rpx;
  560. }
  561. }
  562. }
  563. }
  564. .tabchange{
  565. // background: #FFFFFF;
  566. overflow: hidden;
  567. .tabactive1{
  568. .content-tips{
  569. background: #fff;
  570. padding: 0 30rpx;
  571. box-sizing: border-box;
  572. overflow: hidden;
  573. margin-bottom: 20rpx;
  574. .content-first{
  575. margin-top: 19rpx;
  576. display: flex;
  577. justify-content: space-between;
  578. .left{
  579. display: flex;
  580. .img{
  581. width: 52rpx;
  582. height: 52rpx;
  583. background: #FFFFFF;
  584. border: 1px solid #C9C9C9;
  585. border-radius: 50%;
  586. text-align: center;
  587. line-height: 52rpx;
  588. }
  589. .name{
  590. font-weight: 600;
  591. color: #333333;
  592. margin-left: 20rpx;
  593. margin-top: 11rpx;
  594. }
  595. .status{
  596. width: 110rpx;
  597. height: 42rpx;
  598. background: #FFF9F5;
  599. border-radius: 4rpx;
  600. font-size: 26rpx;
  601. font-weight: 400;
  602. color: #EC8D49;
  603. line-height: 42rpx;
  604. text-align: center;
  605. margin-left: 19rpx;
  606. margin-top: 11rpx;
  607. }
  608. }
  609. .right{
  610. display: flex;
  611. margin-top: 11rpx;
  612. .point{
  613. width: 12rpx;
  614. height: 12rpx;
  615. background: #2B6EFF;
  616. border-radius: 50%;
  617. margin-right: 9rpx;
  618. margin-top: 16rpx;
  619. }
  620. }
  621. }
  622. .content-sec{
  623. display: flex;
  624. justify-content: space-between;
  625. margin-top: 19rpx;
  626. .left{
  627. display: flex;
  628. .cus{
  629. font-size: 30rpx;
  630. font-weight: 400;
  631. color: #666666;
  632. line-height: 30rpx;
  633. }
  634. .arriveNum{
  635. font-size: 30rpx;
  636. font-weight: 400;
  637. line-height: 30rpx;
  638. margin-left: 10rpx;
  639. }
  640. }
  641. .right{
  642. width: 192rpx;
  643. height: 46rpx;
  644. background: #F4F8FD;
  645. border-radius: 6rpx;
  646. text-align: center;
  647. line-height: 46rpx;
  648. font-weight: 400;
  649. color: #2671E2;
  650. }
  651. }
  652. .content-last{
  653. margin: 30rpx 0;
  654. font-size: 30rpx;
  655. font-weight: 400;
  656. color: #666666;
  657. line-height: 30rpx;
  658. }
  659. }
  660. }
  661. .tabactive2{
  662. .tab2-tips{
  663. background: #fff;
  664. height: 270rpx;
  665. overflow: auto;
  666. margin-bottom: 20rpx;
  667. .tab2-first{
  668. // height: 150rpx;
  669. border-bottom: 1px solid #E0E0E0;
  670. padding: 0 30rpx;
  671. margin-top: 19rpx;
  672. box-sizing: border-box;
  673. .tab2-first-1{
  674. display: flex;
  675. justify-content: space-between;
  676. // height: 75rpx;
  677. .tab2-first-left{
  678. display: flex;
  679. .img{
  680. width: 52rpx;
  681. height: 52rpx;
  682. background: #FFFFFF;
  683. border: 1px solid #C9C9C9;
  684. border-radius: 50%;
  685. text-align: center;
  686. line-height: 52rpx;
  687. }
  688. .name{
  689. font-weight: 600;
  690. color: #333333;
  691. margin-left: 20rpx;
  692. margin-top: 11rpx;
  693. }
  694. }
  695. .tab2-first-right{
  696. font-size: 30rpx;
  697. font-weight: 400;
  698. color: #666666;
  699. margin-top: 11rpx;
  700. }
  701. }
  702. .tab2-first-foot{
  703. margin-top: 19rpx;
  704. margin-bottom: 30rpx;
  705. font-size: 30rpx;
  706. font-weight: 400;
  707. color: #666666;
  708. line-height: 30rpx;
  709. }
  710. }
  711. .tab2-sec{
  712. height: 120rpx;
  713. padding: 30rpx;
  714. float: right;
  715. .tab-sec-edit{
  716. width: 156rpx;
  717. height: 60rpx;
  718. background: #FFFFFF;
  719. border-radius: 4px;
  720. border: 1px solid #2671E2;
  721. text-align: center;
  722. line-height: 60rpx;
  723. font-weight: 400;
  724. color: #2671E2;
  725. }
  726. }
  727. }
  728. }
  729. }
  730. .pon-foot{
  731. position: fixed;
  732. width: 750rpx;
  733. height: 100rpx;
  734. background: #FFFFFF;
  735. box-shadow: 0px -2rpx 8rpx 0rpx rgba(224, 224, 224, 0.5);
  736. bottom: 0;
  737. display: flex;
  738. justify-content: space-around;
  739. align-items: center;
  740. // padding-top: 24rpx;
  741. box-sizing: border-box;
  742. // padding: ;
  743. .foot-tab{
  744. text-align: center;
  745. width: 270rpx;
  746. height: 70rpx;
  747. line-height: 70rpx;
  748. background: #2671E2;
  749. box-shadow: 0px -2rpx 8rpx 0px rgba(224, 224, 224, 0.5);
  750. border-radius: 6rpx;
  751. font-size: 30rpx;
  752. font-weight: 400;
  753. color: #FFFFFF;
  754. }
  755. }
  756. </style>