stat_situation.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="page-box-bg-fff m-t20 r-30 p-30">
  3. <StatisticsTitle :genre="genre" :leftText="leftText" :rightText="'全部'" @onHandle="onHandle"></StatisticsTitle>
  4. <view class="row-justify-c m-b25">
  5. <view class="subsection">
  6. <uv-subsection :list="list" :bgColor="'#DBE8DB'" :activeColor="'#0FB160'" :inactiveColor="'#121212'"
  7. :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
  8. custom-item-style="border-radius: 30rpx;" :current="current" @change="onChange"></uv-subsection>
  9. </view>
  10. </view>
  11. <view class="">
  12. <view class="sys-from-background-color m-b16 r-20 p-20 finance_item sys-weight-400"
  13. v-for="(item,index) in businessList" :key="index">
  14. <view class="" >
  15. <view class="row-justify-sb center">
  16. <view class="row-c">
  17. <text class="size-26 text-color-666">客户:</text>
  18. <text class="size-26 text-color-12 sys-weight-500">{{item.name}}</text>
  19. </view>
  20. <view class="row-c">
  21. <text class="size-24 text-color-666">客户经理:</text>
  22. <text class="size-26 text-color-12sys-weight-500">{{item.user_name}}</text>
  23. </view>
  24. </view>
  25. <view class="page-box-bg-fff row-justify-sb center size-24 p-tb16 p-lr40 r-20 m-t20">
  26. <text class="text-color-E21 sys-weight-600">{{item.total_money}}万</text>
  27. <text>{{item.status_str}}</text>
  28. <view class="">
  29. <text class="text-color-12">{{item.use_date}}</text>
  30. <text class="text-color-666">用款</text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <en-blank v-if="businessList.length<=0"></en-blank>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. import PeakChart from "@/common/chart/peak_chart.vue";
  41. import StatisticsTitle from "./statistics_title.vue";
  42. import {getBusinessList, getUseList} from "@/api/statistics";
  43. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  44. export default {
  45. name: 'stat_situation',
  46. components: {
  47. EnBlank,
  48. PeakChart,
  49. StatisticsTitle
  50. },
  51. props: {
  52. type: {
  53. type: Number,
  54. default: 1
  55. },
  56. genre: {
  57. type: Number,
  58. default: 3
  59. },
  60. leftText: {
  61. type: String,
  62. default: '情况说明'
  63. },
  64. 'dateTypeObj':{
  65. default:()=>{
  66. return {
  67. dateType:4,
  68. selectDate:'2023-02-25',
  69. money_type:1,
  70. censusUserType:0,
  71. product_id:5,
  72. }
  73. }
  74. },
  75. },
  76. data() {
  77. return {
  78. list: ['到访情况', '预计出款'],
  79. current:0,
  80. useNum:0,
  81. usePage:1,
  82. useList:[],
  83. businessNum:0,
  84. businessPage:1,
  85. businessList:[],
  86. };
  87. },
  88. methods: {
  89. onChange(e){
  90. this.current=e
  91. this.startList()
  92. },
  93. startList(){
  94. if(this.dateTypeObj.censusUserType>0){
  95. if(this.current===0){
  96. this.getBusinessList()
  97. }else {
  98. this.getUseList()
  99. }
  100. }
  101. },
  102. // 到访记录
  103. getBusinessList(){
  104. this.dateTypeObj.page=1
  105. getBusinessList(this.dateTypeObj).then((res)=>{
  106. if(res.code === 1){
  107. this.businessNum = res.data.totalNum
  108. this.businessList = res.data.items
  109. }
  110. })
  111. },
  112. // 预计出款
  113. getUseList(){
  114. this.dateTypeObj.page=1
  115. getUseList(this.dateTypeObj).then((res)=>{
  116. this.useNum = res.data.totalNum
  117. this.useNum = res.data.items
  118. })
  119. },
  120. },
  121. }
  122. </script>
  123. <style lang="scss" scoped>
  124. .subsection {
  125. width: 350rpx;
  126. }
  127. .finance_item:last-child {
  128. margin-bottom: 0;
  129. }
  130. </style>