|
@@ -38,11 +38,14 @@
|
|
|
:settings="{ showIndex: true, stripe: true }"
|
|
|
:loading="mixins_onQuery"
|
|
|
:data="mixins_list"
|
|
|
+ :updateFlag="true"
|
|
|
:pageset="mixins_pageset"
|
|
|
@page-change="pageChange"
|
|
|
>
|
|
|
- <template slot-scope="scope" :slot="'type' + index" v-for="(item, index) in blockArr">
|
|
|
- <div :key="index" class="111">{{ scope.row['details'][index].amount }}</div>
|
|
|
+ <template slot-scope="scope" :slot="item.md5Key" v-for="(item, index) in tableInsert">
|
|
|
+ <div :key="index">
|
|
|
+ {{ activeName(item, scope.row['details']) }}
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</zz-table>
|
|
|
</div>
|
|
@@ -85,6 +88,7 @@ export default {
|
|
|
times: [],
|
|
|
communityArr: [],
|
|
|
blockArr: [],
|
|
|
+ tableInsert: [],
|
|
|
thisObjCommunit: {}
|
|
|
};
|
|
|
},
|
|
@@ -100,47 +104,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
mounted() {},
|
|
|
- watch: {
|
|
|
- mixins_list(val) {
|
|
|
- if (!!val) {
|
|
|
- this.cols = [
|
|
|
- {
|
|
|
- label: '社区名称',
|
|
|
- prop: 'communityName'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '房间',
|
|
|
- prop: 'houseDetail'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '业主',
|
|
|
- prop: 'residentName'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '物业费标准(元/月)',
|
|
|
- prop: 'chargingStandard'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '月数',
|
|
|
- prop: 'months'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '合计',
|
|
|
- prop: 'totalAmount'
|
|
|
- }
|
|
|
- ];
|
|
|
- if (val.length) {
|
|
|
- val[0].details.map((item, index) => {
|
|
|
- this.cols.splice(5 + index, 0, {
|
|
|
- label: this.typeName(item),
|
|
|
- prop: 'type' + index,
|
|
|
- slot: 'type' + index
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
initSearchData(time) {
|
|
|
this.mixins_query = {
|
|
@@ -150,8 +113,11 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
initSearchAll() {
|
|
|
- this.mixins_search();
|
|
|
- this.getTopTable();
|
|
|
+ new Promise((resolve) => {
|
|
|
+ this.getTopTable(resolve);
|
|
|
+ }).then(() => {
|
|
|
+ this.mixins_search();
|
|
|
+ });
|
|
|
},
|
|
|
typeName(item) {
|
|
|
let name = '';
|
|
@@ -177,6 +143,15 @@ export default {
|
|
|
}
|
|
|
return name;
|
|
|
},
|
|
|
+ activeName(item, arr) {
|
|
|
+ let amount = '--';
|
|
|
+ arr.map((its) => {
|
|
|
+ if (its.md5Key == item.md5Key) {
|
|
|
+ amount = its.amount;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
exportExcel() {
|
|
|
this.__exportExcel('/sc-charge/charge/report/export/excel', this.mixins_query);
|
|
|
},
|
|
@@ -201,19 +176,56 @@ export default {
|
|
|
|
|
|
.catch(function () {});
|
|
|
},
|
|
|
- getTopTable() {
|
|
|
+ getTopTable(resolve) {
|
|
|
+ this.cols = [
|
|
|
+ {
|
|
|
+ label: '社区名称',
|
|
|
+ prop: 'communityName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '房间',
|
|
|
+ prop: 'houseDetail'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业主',
|
|
|
+ prop: 'residentName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '物业费标准(元/月)',
|
|
|
+ prop: 'chargingStandard'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '月数',
|
|
|
+ prop: 'months'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '合计',
|
|
|
+ prop: 'totalAmount'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ let tableInsert = [];
|
|
|
this.$http.post('/sc-charge/charge/report/total', this.mixins_query).then(({ data, status, msg }) => {
|
|
|
if (status == 0) {
|
|
|
if (!!data && data.details.length) {
|
|
|
let arr = [{ label: '总收费', val: data.totalAmount }];
|
|
|
data.details.map((item, index) => {
|
|
|
arr.push({ label: this.typeName(item), val: item.amount });
|
|
|
+ tableInsert.push({
|
|
|
+ md5Key: item.md5Key
|
|
|
+ });
|
|
|
+ this.cols.splice(5 + index, 0, {
|
|
|
+ label: this.typeName(item),
|
|
|
+ slot: item.md5Key
|
|
|
+ });
|
|
|
});
|
|
|
+ this.tableInsert = tableInsert;
|
|
|
this.blockArr = arr;
|
|
|
} else {
|
|
|
+ this.tableInsert = [];
|
|
|
this.blockArr = [];
|
|
|
}
|
|
|
}
|
|
|
+ resolve && resolve();
|
|
|
});
|
|
|
},
|
|
|
communityChange(e) {
|
|
@@ -263,7 +275,7 @@ export default {
|
|
|
padding-right: 60px;
|
|
|
}
|
|
|
&.blockColor {
|
|
|
- width: 150px;
|
|
|
+ min-width: 150px;
|
|
|
text-align: left;
|
|
|
border-right: 1px solid #eee;
|
|
|
&:last-child {
|