diff --git a/src/views/reportform/chargeRate.vue b/src/views/reportform/chargeRate.vue index adcc333..c3e4e59 100644 --- a/src/views/reportform/chargeRate.vue +++ b/src/views/reportform/chargeRate.vue @@ -12,87 +12,64 @@ /> - + - - - 搜索 -
- 园区物业费收费率 - 数据统计时间:{{currentDate}} -
- - - - - - - - - - - - - - -
- 楼栋物业费收费率 - 数据统计时间:{{currentDate}} -
- - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -100,75 +77,45 @@ import { propertyFeeData } from '@/api/reportform' import moment from 'moment' export default { - name: 'ExpireReport', + name: 'ChangeRate', data() { return { cidList:JSON.parse(localStorage.cid) || [], // 园区列表 - role:localStorage.role, - // 数据列表 - dataList: [], - dataBuildList: [], - // 遍历表头 - // headers: [], - // headersBuild: [], - // 遮罩层 - loading: true, - // 总条数 - total: 0, - // 查询参数 - queryParams: { + role:localStorage.role, // 角色 + activeName: 'first', // 选项卡绑定值 + dataList: [], //园区物业费基本信息 + dataParkList: [], //园区物业费收费率 + dataBuildList: [], //楼栋物业费收费率 + loading: true, // 遮罩层 + total: 0, // 总条数 + queryParams: { // 查询参数 cid: undefined, - startDate: moment().subtract(1,'M').format('YYYY-MM'), - endDate: moment().format('YYYY-MM'), + startDate: moment().format('YYYY'), }, - currentDate: moment().format('YYYY-MM-DD') + currentDate: moment().format('YYYY-MM-DD'), // 当前日期 } }, created() { this.getList() }, methods: { - /** 查询角色列表 */ + // 查询角色列表 getList() { this.loading = true - propertyFeeData(this.queryParams).then( - response => { - this.dataList = response.data.cat_arr - this.dataBuildList = response.data.build_arr - // this.headers = [ - // 'cidname', - // 'totalhouseholds', - // 'constructionarea', - // 'unitprice', - // 'start_date', - // 'end_date', - // 'length_date', - // 'expect_money', - // 'receivable_money', - // 'percent' - // ] - // this.headersBuild = [ - // 'buildingname', - // 'totalhouseholds', - // 'constructionarea', - // 'unitprice', - // 'start_date', - // 'end_date', - // 'length_date', - // 'expect_money', - // 'receivable_money', - // 'percent', - // 'difference_value' - // ] - this.loading = false - } - ) + propertyFeeData(this.queryParams).then(({code, data}) => { + if (code == 200) { + this.dataList = data['build_arr'] || [] + this.dataParkList = data['park_statistics'] || [] + this.dataBuildList = data['building_statistics'] || [] + } + this.loading = false + }) }, - /** 搜索按钮操作 */ + // 搜索按钮操作 handleQuery() { - if (!this.queryParams.startDate || !this.queryParams.endDate) { + if (!this.queryParams.startDate) { this.$message({ - message: '请选择开始日期和结束日期', + message: '请选择年份', type: 'error' }) return