reallyReceivable.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!-- 应收实收分析 -->
  2. <template>
  3. <view class="container">
  4. <view class="table">
  5. <!-- <view class="table-date" v-if="params.queryDate">{{ params.title }}</view> -->
  6. <view class="table-box">
  7. <uni-table emptyText="暂无更多数据" :loading="loading">
  8. <!-- 表头行 -->
  9. <uni-tr>
  10. <uni-th class="table-box-th" align="center" v-for="(item, index) in tableTh" :key="index"
  11. :width="item.width || ''">{{ item.field }}
  12. </uni-th>
  13. </uni-tr>
  14. <!-- 表格数据行 -->
  15. <uni-tr v-for="(item, index) in tableData.list" :key="index">
  16. <uni-td class="table-box-td" align="center" v-for="(field, fIndex) in tableTh" :key="fIndex">
  17. {{ item[field.key] }}</uni-td>
  18. </uni-tr>
  19. </uni-table>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props: {
  27. tableTh: {
  28. type: Array,
  29. default: () => {
  30. return [{
  31. field: '时间',
  32. width: 120,
  33. key: 'statisTime'
  34. },
  35. {
  36. field: '应收金额(元)',
  37. width: 80,
  38. key: 'payAmount'
  39. },
  40. {
  41. field: '实收金额(元)',
  42. width: 80,
  43. key: 'realAmount'
  44. },
  45. {
  46. field: '逃费金额(元)',
  47. width: 80,
  48. key: 'runawayAmount'
  49. },
  50. {
  51. field: `“一分钱停车”减免`,
  52. width: 120,
  53. key: 'oneAmount'
  54. },
  55. {
  56. field: '“八折停车”减免',
  57. width: 110,
  58. key: 'eightAmount'
  59. },
  60. {
  61. field: '欠费金额(元)',
  62. width: 80,
  63. key: 'amtOwe'
  64. },
  65. {
  66. field: '退款金额(元)',
  67. width: 80,
  68. key: 'backAmount'
  69. }
  70. ]
  71. }
  72. }
  73. },
  74. data() {
  75. return {
  76. currentDate: [],
  77. tableData: {
  78. list: []
  79. },
  80. params: {
  81. reportType: 2,
  82. queryDate: '',
  83. title: ''
  84. },
  85. loading: false
  86. }
  87. },
  88. methods: {
  89. tabClick(item) {
  90. this.tabCurName = item.value
  91. this.getReallyReceivableList()
  92. },
  93. getData(obj) {
  94. this.params = obj
  95. this.getReallyReceivableList()
  96. },
  97. getReallyReceivableList() {
  98. this.loading = true
  99. uni.$u.api.statisticalReportApi.getReallyReceivableListApi(this.params).then(res => {
  100. if (res.code === 200) {
  101. this.tableData.list = res.data.itemList
  102. }
  103. this.loading = false
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. @import './../../styles/report.scss';
  111. </style>