revenueReport.vue 4.0 KB

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