stat_situation.vue 4.1 KB

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