Browse Source

Merge branch 'new_web' of http://39.108.172.131:3000/Shannon_mu/SmartCommunity into new_web

D4THYL3\long 3 years ago
parent
commit
631cdee1a6

+ 23 - 48
operationSupport/src/views/payService/propertyFee/stepPage/bulk.vue

@@ -38,20 +38,8 @@ export default {
                 },
                 {
                     label: '费用名称',
-                    prop: 'chargeType',
-                    format(val) {
-                        if (val == '1') {
-                            return '物业费';
-                        } else if (val == '2') {
-                            return '水费';
-                        } else if (val == '3') {
-                            return '电费';
-                        } else if (val == '4') {
-                            return '车位费';
-                        } else if (val == '5') {
-                            return '二次供水费';
-                        }
-                    }
+                    prop: 'chargeName',
+                    width: '200'
                 },
                 {
                     label: '计费日期',
@@ -103,43 +91,33 @@ export default {
         submit() {
             this.$refs.form.validate((valid) => {
                 if (valid) {
-                    let isValid = true;
                     let billList = this.tabList.map((item, index) => {
-                        if (!!item.sumTotle) {
-                            return {
-                                amount: item.sumTotle,
-                                billId: item.id
-                            };
-                        } else {
-                            isValid = false;
-                        }
+                        return {
+                            amount: item.amount,
+                            billId: item.id
+                        };
                     });
                     let installData = {
                         payType: this.formData.payType,
                         remark: this.formData.remark,
                         billList: billList
                     };
-                    if (!isValid) {
-                        this.$message.error('实收金额必填');
-                        return;
-                    } else {
-                        var loading = this.$loading();
-                        this.$http
-                            .post('/sc-charge/charge/bill/payee', installData)
-                            .then(({ status, msg }) => {
-                                if (status == 0) {
-                                    this.$message.success(msg);
-                                    this.params.callback();
-                                    this.$emit('close');
-                                } else {
-                                    this.$message.error(msg);
-                                }
-                                loading.close();
-                            })
-                            .catch(() => {
-                                loading.close();
-                            });
-                    }
+                    var loading = this.$loading();
+                    this.$http
+                        .post('/sc-charge/charge/bill/payee', installData)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.params.callback();
+                                this.$emit('close');
+                            } else {
+                                this.$message.error(msg);
+                            }
+                            loading.close();
+                        })
+                        .catch(() => {
+                            loading.close();
+                        });
                 }
             });
         },
@@ -151,9 +129,6 @@ export default {
             this.$http
                 .post('/sc-charge/charge/bill/findUserBillDetailList', ids)
                 .then((res) => {
-                    res.map((item) => {
-                        item.sumTotle = '';
-                    });
                     this.tabList = res;
                 })
                 .catch(() => {
@@ -161,7 +136,7 @@ export default {
                 });
         },
         typeTimeTransition(start, end) {
-           let text = '';
+            let text = '';
             if (!!end) {
                 let f = start.slice(5, 7),
                     l = end.slice(5, 7);

+ 59 - 47
operationSupport/src/views/payService/statisticalReport/chargeStatistics.vue

@@ -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 {