stat_situation.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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="" v-if="current == 0">
  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 v-else>
  38. <view class="finance_item sys-from-background-color m-b16 r-20 p-30 row-justify-sb center"
  39. v-for="(item,index) in useList" :key="index" >
  40. <text class="size-28 text-color-12">{{item.name}}</text>
  41. <text class="size-28 text-color-E21 sys-weight-600 m-r10">{{item.total_money}}万</text>
  42. <view class="size-24">
  43. <text class="text-color-000">{{item.use_date}}</text>
  44. <text class="text-color-666">用款</text>
  45. </view>
  46. </view>
  47. <en-blank v-if="useList.length<=0"></en-blank>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import PeakChart from "@/common/chart/peak_chart.vue";
  53. import StatisticsTitle from "./statistics_title.vue";
  54. import StatRanking from "./stat_ranking.vue";
  55. import {
  56. getBusinessList,
  57. getUseList
  58. } from "@/api/statistics";
  59. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  60. export default {
  61. name: 'stat_situation',
  62. components: {
  63. EnBlank,
  64. PeakChart,
  65. StatisticsTitle,
  66. StatRanking
  67. },
  68. props: {
  69. type: {
  70. type: Number,
  71. default: 1
  72. },
  73. genre: {
  74. type: Number,
  75. default: 3
  76. },
  77. leftText: {
  78. type: String,
  79. default: '情况说明'
  80. },
  81. 'dateTypeObj': {
  82. default: () => {
  83. return {
  84. dateType: 4,
  85. selectDate: '2023-02-25',
  86. money_type: 1,
  87. censusUserType: 0,
  88. product_id: 5,
  89. }
  90. }
  91. },
  92. },
  93. data() {
  94. return {
  95. list: ['到访情况', '预计出款'],
  96. current: 0,
  97. useNum: 0,
  98. usePage: 1,
  99. useList: [],
  100. businessNum: 0,
  101. businessPage: 1,
  102. businessList: [],
  103. };
  104. },
  105. methods: {
  106. onChange(e) {
  107. this.current = e
  108. this.startList()
  109. },
  110. startList() {
  111. if (this.dateTypeObj.censusUserType > 0) {
  112. if (this.current === 0) {
  113. this.getBusinessList()
  114. } else {
  115. this.getUseList()
  116. }
  117. }
  118. },
  119. // 到访记录
  120. getBusinessList() {
  121. this.dateTypeObj.page = 1
  122. getBusinessList(this.dateTypeObj).then((res) => {
  123. if (res.code === 1) {
  124. this.businessNum = res.data.totalNum
  125. this.businessList = res.data.items
  126. }
  127. })
  128. },
  129. // 预计出款
  130. getUseList() {
  131. this.dateTypeObj.page = 1
  132. getUseList(this.dateTypeObj).then((res) => {
  133. if(res.code===1){
  134. this.useNum = res.data.totalNum
  135. this.useList = res.data.items
  136. }
  137. })
  138. },
  139. },
  140. }
  141. </script>
  142. <style lang="scss" scoped>
  143. .subsection {
  144. width: 350rpx;
  145. }
  146. .finance_item:last-child {
  147. margin-bottom: 0;
  148. }
  149. </style>