propertyFeeStatistics.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class="main">
  3. <div class="search">
  4. <el-select v-model="mixins_query.communityId" placeholder="选择社区" @change="communityChange">
  5. <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
  6. </el-select>
  7. <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
  8. <div class="search-icon">
  9. <el-tooltip class="item" effect="light" placement="bottom" content="导出">
  10. <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel"></i>
  11. </el-tooltip>
  12. </div>
  13. </div>
  14. <div class="table-top">
  15. {{ `${new Date().getFullYear()}年${thisObjCommunit['communityName']}缴纳物业管理费情况表` }}
  16. </div>
  17. <zz-table
  18. :cols="cols"
  19. :settings="{ showIndex: false, stripe: true, summaryCol: summaryColData, hideFoot: true }"
  20. :loading="mixins_onQuery"
  21. :summaryData="{}"
  22. :data="mixins_list"
  23. >
  24. <template slot-scope="scope" slot="quarter">
  25. <span v-if="scope.row.quarter === 1">缴第一季度(1-3月) </span>
  26. <span v-if="scope.row.quarter === 2">缴第二季度(4-6月)</span>
  27. <span v-if="scope.row.quarter === 3">缴第三季度(7-9月) </span>
  28. <span v-if="scope.row.quarter === 4">缴第四季度(10-12月) </span>
  29. <span v-if="scope.row.quarter === 5">缴纳{{ new Date().getFullYear() }}年之前欠费</span>
  30. </template>
  31. </zz-table>
  32. </div>
  33. </template>
  34. <script>
  35. import list from '@utils/list.js';
  36. export default {
  37. mixins: [list],
  38. data() {
  39. return {
  40. cols: [
  41. {
  42. label: '缴费情况',
  43. prop: 'quarter',
  44. slot: 'quarter'
  45. },
  46. {
  47. label: '01月',
  48. prop: 'january'
  49. },
  50. {
  51. label: '02月',
  52. prop: 'february'
  53. },
  54. {
  55. label: '03月',
  56. prop: 'march'
  57. },
  58. {
  59. label: '04月',
  60. prop: 'april'
  61. },
  62. {
  63. label: '05月',
  64. prop: 'may'
  65. },
  66. {
  67. label: '06月',
  68. prop: 'june'
  69. },
  70. {
  71. label: '07月',
  72. prop: 'july'
  73. },
  74. {
  75. label: '08月',
  76. prop: 'august'
  77. },
  78. {
  79. label: '09月',
  80. prop: 'september'
  81. },
  82. {
  83. label: '10月',
  84. prop: 'october'
  85. },
  86. {
  87. label: '11月',
  88. prop: 'november'
  89. },
  90. {
  91. label: '12月',
  92. prop: 'december'
  93. },
  94. {
  95. label: '合计',
  96. prop: 'total'
  97. }
  98. ],
  99. mixins_post: 'get',
  100. summaryColData: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
  101. communityArr: [],
  102. thisObjCommunit: {}
  103. };
  104. },
  105. created() {
  106. new Promise((resolve) => {
  107. this.getorgTree(resolve);
  108. }).then(() => {
  109. this.mixins_dataUrl = '/sc-charge/charge/report/months/list';
  110. this.mixins_query = {
  111. chargeType: 1,
  112. year: new Date().getFullYear(),
  113. communityId: this.thisObjCommunit.id
  114. };
  115. this.mixins_search();
  116. });
  117. },
  118. mounted() {},
  119. methods: {
  120. exportExcel() {
  121. this.__exportExcel('/sc-charge/charge/report/months/export/excel', this.mixins_query);
  122. },
  123. getorgTree(resolve) {
  124. this.$http
  125. .get('/sc-community/assets/community/list')
  126. .then((data) => {
  127. this.communityArr = data.data;
  128. this.thisObjCommunit = this.communityArr[0];
  129. this.$store.commit('setAreaSelect', data.data);
  130. resolve && resolve();
  131. })
  132. .catch(function () {});
  133. },
  134. communityChange(e) {
  135. this.communityArr.find((item) => {
  136. if (item.id == e) {
  137. this.thisObjCommunit = item;
  138. this.mixins_search();
  139. }
  140. });
  141. },
  142. getList() {
  143. if (!this.mixins_dataUrl) {
  144. this.mixins_onQuery = false;
  145. return;
  146. }
  147. let data = Object.assign({}, this.mixins_pageset, this.mixins_query);
  148. this.mixins_onQuery = true;
  149. this.$http[this.mixins_post](this.mixins_dataUrl, data)
  150. .then(({ status, data, msg }) => {
  151. this.mixins_onQuery = false;
  152. if (0 === status) {
  153. this.mixins_list = data;
  154. } else {
  155. this.$message.error(msg);
  156. }
  157. })
  158. .catch((err) => {
  159. this.mixins_onQuery = false;
  160. });
  161. }
  162. }
  163. };
  164. </script>
  165. <style lang="scss" scoped>
  166. .table-top {
  167. height: 60px;
  168. line-height: 60px;
  169. background: white;
  170. text-align: center;
  171. }
  172. </style>