stat_finance.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <view class="page-box-bg-fff m-t20 r-30 p-30 finance_content">
  3. <StatisticsTitle :genre="0" :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 row-justify-sb center m-b16 r-20 p-20 finance_item"
  13. v-for="(item,index) in dataList" :key="index">
  14. <view class="row-c">
  15. <image class="wh-60" src="/static/img/index/index-avatar.png" mode=""></image>
  16. <view class="column m-l16">
  17. <text class="size-28 text-color-12 sys-weight-400">{{item.name}}</text>
  18. <text class="size-24 text-color-8F9 sys-weight-400">{{item.created_at}}</text>
  19. </view>
  20. </view>
  21. <text class="size-28 text-color-12 sys-weight-600">{{item.money}}万</text>
  22. </view>
  23. <en-blank v-if="totalNum<=0"></en-blank>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import StatisticsTitle from "./statistics_title.vue";
  29. import {getSysMoneyList} from "@/api/statistics";
  30. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  31. export default {
  32. name: 'stat-finance',
  33. props:{
  34. 'dateTypeObj':{
  35. default:()=>{
  36. return {
  37. dateType:4,
  38. selectDate:'2023-02-25',
  39. money_type:1,
  40. censusUserType:0,
  41. product_id:5,
  42. }
  43. }
  44. },
  45. 'pageType':{
  46. default:1
  47. }
  48. },
  49. components: {
  50. EnBlank,
  51. StatisticsTitle
  52. },
  53. watch:{
  54. 'dateTypeObj':function () {
  55. if(this.dateTypeObj.censusUserType>0){
  56. this.startList()
  57. }
  58. }
  59. },
  60. data() {
  61. return {
  62. current: 0,
  63. list: ['放款', '回款'],
  64. dataList:[],
  65. totalNum:0,
  66. page:1
  67. };
  68. },
  69. methods: {
  70. onHandle(e){
  71. console.log(e)
  72. },
  73. onChange(e) {
  74. this.current = e
  75. this.startList()
  76. },
  77. startList(){
  78. this.dataList=[]
  79. this.page=1
  80. this.totalNum=0
  81. this.getSysMoneyList()
  82. },
  83. getSysMoneyList(){
  84. let fromData = {
  85. dateType:this.dateTypeObj.dateType,
  86. selectDate:this.dateTypeObj.selectDate,
  87. pageNum:this.pageType===1?5:15,
  88. page:this.page,
  89. moneyType:this.current+1,
  90. }
  91. getSysMoneyList(fromData).then((res)=>{
  92. if(res.code === 1){
  93. this.dataList = res.data.items
  94. this.totalNum = res.data.totalNum
  95. }else{
  96. this.dataList = []
  97. this.totalNum = 0
  98. }
  99. ++this.page
  100. })
  101. },
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .finance_content {
  107. // min-height: 600rpx;
  108. }
  109. .subsection {
  110. width: 350rpx;
  111. }
  112. .finance_item:last-child {
  113. margin-bottom: 0;
  114. }
  115. </style>