123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <div class="main">
- <div class="search">
- <el-select v-model="mixins_query.communityId" placeholder="选择社区" @change="communityChange">
- <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
- </el-select>
- <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
- <div class="search-icon">
- <el-tooltip class="item" effect="light" placement="bottom" content="导出">
- <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel"></i>
- </el-tooltip>
- </div>
- </div>
- <div class="table-top">
- {{ `${new Date().getFullYear()}年${thisObjCommunit['communityName']}缴纳物业管理费情况表` }}
- </div>
- <zz-table
- :cols="cols"
- :settings="{ showIndex: false, stripe: true, summaryCol: summaryColData, hideFoot: true }"
- :loading="mixins_onQuery"
- :summaryData="{}"
- :data="mixins_list"
- >
- <template slot-scope="scope" slot="quarter">
- <span v-if="scope.row.quarter === 1">缴第一季度(1-3月) </span>
- <span v-if="scope.row.quarter === 2">缴第二季度(4-6月)</span>
- <span v-if="scope.row.quarter === 3">缴第三季度(7-9月) </span>
- <span v-if="scope.row.quarter === 4">缴第四季度(10-12月) </span>
- <span v-if="scope.row.quarter === 5">缴纳{{ new Date().getFullYear() }}年之前欠费</span>
- </template>
- </zz-table>
- </div>
- </template>
- <script>
- import list from '@utils/list.js';
- export default {
- mixins: [list],
- data() {
- return {
- cols: [
- {
- label: '缴费情况',
- prop: 'quarter',
- slot: 'quarter'
- },
- {
- label: '01月',
- prop: 'january'
- },
- {
- label: '02月',
- prop: 'february'
- },
- {
- label: '03月',
- prop: 'march'
- },
- {
- label: '04月',
- prop: 'april'
- },
- {
- label: '05月',
- prop: 'may'
- },
- {
- label: '06月',
- prop: 'june'
- },
- {
- label: '07月',
- prop: 'july'
- },
- {
- label: '08月',
- prop: 'august'
- },
- {
- label: '09月',
- prop: 'september'
- },
- {
- label: '10月',
- prop: 'october'
- },
- {
- label: '11月',
- prop: 'november'
- },
- {
- label: '12月',
- prop: 'december'
- },
- {
- label: '合计',
- prop: 'total'
- }
- ],
- mixins_post: 'get',
- summaryColData: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
- communityArr: [],
- thisObjCommunit: {}
- };
- },
- created() {
- new Promise((resolve) => {
- this.getorgTree(resolve);
- }).then(() => {
- this.mixins_dataUrl = '/sc-charge/charge/report/months/list';
- this.mixins_query = {
- chargeType: 1,
- year: new Date().getFullYear(),
- communityId: this.thisObjCommunit.id
- };
- this.mixins_search();
- });
- },
- mounted() {},
- methods: {
- exportExcel() {
- this.__exportExcel('/sc-charge/charge/report/months/export/excel', this.mixins_query);
- },
- getorgTree(resolve) {
- this.$http
- .get('/sc-community/assets/community/list')
- .then((data) => {
- this.communityArr = data.data;
- this.thisObjCommunit = this.communityArr[0];
- this.$store.commit('setAreaSelect', data.data);
- resolve && resolve();
- })
- .catch(function () {});
- },
- communityChange(e) {
- this.communityArr.find((item) => {
- if (item.id == e) {
- this.thisObjCommunit = item;
- this.mixins_search();
- }
- });
- },
- getList() {
- if (!this.mixins_dataUrl) {
- this.mixins_onQuery = false;
- return;
- }
- let data = Object.assign({}, this.mixins_pageset, this.mixins_query);
- this.mixins_onQuery = true;
- this.$http[this.mixins_post](this.mixins_dataUrl, data)
- .then(({ status, data, msg }) => {
- this.mixins_onQuery = false;
- if (0 === status) {
- this.mixins_list = data;
- } else {
- this.$message.error(msg);
- }
- })
- .catch((err) => {
- this.mixins_onQuery = false;
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .table-top {
- height: 60px;
- line-height: 60px;
- background: white;
- text-align: center;
- }
- </style>
|