revenueReport.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!-- 营收统计 -->
  2. <template>
  3. <view class="container">
  4. <view class="table">
  5. <view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
  6. <view class="table-box">
  7. <TableRanking :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData"
  8. @pageChange="pageChange" />
  9. </view>
  10. </view>
  11. <view class="total">
  12. <view>
  13. 车辆<text>{{ totalData.vehicleCount || 0 }}</text>辆,应收金额<text>{{ totalData.payAmount || 0 }}</text>元,实收金额<text>{{ totalData.realAmount || 0 }}</text>元,
  14. 欠费金额<text>{{ totalData.amtOwe || 0 }}</text>元,其中贵州银行快捷支付<text>{{ totalData.quickAmt || 0 }}</text>元,贵州银行聚合支付<text>{{ totalData.unionAmt || 0 }}</text>元,微信支付<text>{{ totalData.wechatAmt || 0 }}</text>元,无感支付<text>{{ totalData.unconsAmt || 0 }}</text>元,现金支付<text>{{ totalData.cashAmt || 0 }}</text>元
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import TableRanking from '@/components/tableRanking.vue'
  21. export default {
  22. components: {
  23. TableRanking
  24. },
  25. props: {
  26. tableTh: {
  27. type: Array,
  28. default: () => {
  29. return [{
  30. field: '停车场/路段',
  31. width: 120,
  32. key: 'roadName'
  33. },
  34. {
  35. field: '车辆(辆)',
  36. width: 80,
  37. key: 'vehicleCount'
  38. },
  39. {
  40. field: '应收金额(元)',
  41. width: 80,
  42. key: 'payAmount'
  43. },
  44. {
  45. field: '实收金额(次)',
  46. width: 80,
  47. key: 'realAmount'
  48. },
  49. {
  50. field: '欠费金额(元)',
  51. width: 80,
  52. key: 'amtOwe'
  53. },
  54. {
  55. field: '贵州银行快捷支付(元)',
  56. width: 150,
  57. key: 'quickAmt'
  58. },
  59. {
  60. field: '贵州银行聚合支付(元)',
  61. width: 150,
  62. key: 'unionAmt'
  63. },
  64. {
  65. field: '微信(元)',
  66. width: 80,
  67. key: 'wechatAmt'
  68. },
  69. {
  70. field: '无感(元)',
  71. width: 80,
  72. key: 'unconsAmt'
  73. },
  74. {
  75. field: '现金(元)',
  76. width: 80,
  77. key: 'cashAmt'
  78. }
  79. ]
  80. }
  81. }
  82. },
  83. data() {
  84. return {
  85. loading: false,
  86. tableData: {
  87. current: 1,
  88. total: 0,
  89. list: []
  90. },
  91. totalData: {},
  92. currentDate: [],
  93. beginTime: undefined,
  94. endTime: undefined
  95. }
  96. },
  97. methods: {
  98. getData(data) {
  99. if (data.length) {
  100. this.beginTime = data[0]
  101. this.endTime = data[1]
  102. }
  103. this.currentDate = data
  104. this.tableData.current = 1
  105. this.getIncomeTotal()
  106. this.getIncomeList()
  107. },
  108. getIncomeTotal() {
  109. uni.$u.api.statisticalReportApi.getIncomeTotalApi({
  110. beginTime: this.beginTime,
  111. endTime: this.endTime
  112. }).then(res => {
  113. if (res.code === 200) {
  114. this.totalData = res.data
  115. }
  116. })
  117. },
  118. getIncomeList() {
  119. this.loading = true
  120. uni.$u.api.statisticalReportApi.getIncomeListApi({
  121. beginTime: this.beginTime,
  122. endTime: this.endTime,
  123. pageNum: this.tableData.current,
  124. pageSize: 10
  125. }).then(res => {
  126. if (res.code === 200) {
  127. this.tableData.list = res.rows
  128. this.tableData.total = res.total
  129. }
  130. this.loading = false
  131. })
  132. },
  133. pageChange(cur) {
  134. this.tableData.current = cur
  135. this.getIncomeList()
  136. }
  137. }
  138. }
  139. </script>
  140. <style lang="scss" scoped>
  141. @import './report.scss';
  142. </style>