Ver código fonte

增加水费导出

zhangW 1 ano atrás
pai
commit
9683d1a8f3

+ 175 - 239
operationSupport/src/views/payService/waterManagement/index.vue

@@ -1,130 +1,61 @@
 <template>
-  <div class="main">
-    <div
-      class="search"
-      v-if="viewActive == 'index'"
-    >
-      <el-input
-        clearable
-        placeholder="输入房间号/业主/手机号"
-        class="search-input"
-        v-trim
-        v-model.trim="mixins_query.queryValue"
-      ></el-input>
-      <el-select
-        v-model="mixins_query.communityId"
-        placeholder="选择社区"
-        clearable
-      >
-        <el-option
-          v-for="(item, index) in communityArr"
-          :key="index"
-          :label="item.communityName"
-          :value="item.id"
-        ></el-option>
-      </el-select>
-      水费余额
-      <el-select
-        class="width90"
-        v-model="mixins_query.symbol"
-        clearable
-      >
-        <el-option
-          label="="
-          :value="1"
-        ></el-option>
-        <el-option
-          label=">"
-          :value="2"
-        ></el-option>
-        <el-option
-          label=">="
-          :value="3"
-        ></el-option>
-        <el-option
-          label="<"
-          :value="4"
-        ></el-option>
-        <el-option
-          label="<="
-          :value="5"
-        ></el-option>
-      </el-select>
-      <el-input
-        class="search-input"
-        v-trim
-        v-model.trim="mixins_query.balance"
-        clearable
-        placeholder="请输入数值"
-      />
-      <el-button
-        type="primary"
-        class="search-btn"
-        @click="mixins_search"
-        icon="el-icon-search"
-      >查询 </el-button>
-    </div>
-    <div
-      class="roles-wrap"
-      v-if="viewActive == 'index'"
-    >
-      <zz-table
-        :cols="cols"
-        :settings="{ showIndex: true, stripe: true }"
-        :loading="mixins_onQuery"
-        :data="mixins_list"
-        :pageset="mixins_pageset"
-        @page-change="pageChange"
-      >
-        <template
-          slot-scope="scope"
-          slot="opt"
-        >
-          <div class="opt">
-            <el-tooltip
-              effect="light"
-              placement="bottom"
-              content="充值"
-            >
-              <i
-                class="zoniot_font zoniot-icon-chongzhi"
-                @click="addOrEdit(scope.row)"
-              ></i>
-            </el-tooltip>
-            <el-tooltip
-              effect="light"
-              placement="bottom"
-              content="充值记录"
-            >
-              <i
-                class="zoniot_font zoniot-icon-chongzhijilu"
-                @click="lookRechargeRecord(scope.row)"
-              ></i>
-            </el-tooltip>
-            <el-tooltip
-              effect="light"
-              placement="bottom"
-              content="扣费记录"
+    <div class="main">
+        <div class="search" v-if="viewActive == 'index'">
+            <el-input
+                clearable
+                placeholder="输入房间号/业主/手机号"
+                class="search-input"
+                v-trim
+                v-model.trim="mixins_query.queryValue"
+            ></el-input>
+            <el-select v-model="mixins_query.communityId" placeholder="选择社区" clearable>
+                <el-option v-for="(item, index) in communityArr" :key="index" :label="item.communityName" :value="item.id"></el-option>
+            </el-select>
+            水费余额
+            <el-select class="width90" v-model="mixins_query.symbol" clearable>
+                <el-option label="=" :value="1"></el-option>
+                <el-option label=">" :value="2"></el-option>
+                <el-option label=">=" :value="3"></el-option>
+                <el-option label="<" :value="4"></el-option>
+                <el-option label="<=" :value="5"></el-option>
+            </el-select>
+            <el-input class="search-input" v-trim v-model.trim="mixins_query.balance" clearable placeholder="请输入数值" />
+            <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="roles-wrap" v-if="viewActive == 'index'">
+            <zz-table
+                :cols="cols"
+                :settings="{ showIndex: true, stripe: true }"
+                :loading="mixins_onQuery"
+                :data="mixins_list"
+                :pageset="mixins_pageset"
+                @page-change="pageChange"
             >
-              <i
-                class="zoniot_font zoniot-icon-koufeijilu"
-                @click="lookChargebackRecord(scope.row)"
-              ></i>
-            </el-tooltip>
-          </div>
-        </template>
-      </zz-table>
-    </div>
+                <template slot-scope="scope" slot="opt">
+                    <div class="opt">
+                        <el-tooltip effect="light" placement="bottom" content="充值">
+                            <i class="zoniot_font zoniot-icon-chongzhi" @click="addOrEdit(scope.row)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="充值记录">
+                            <i class="zoniot_font zoniot-icon-chongzhijilu" @click="lookRechargeRecord(scope.row)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="扣费记录">
+                            <i class="zoniot_font zoniot-icon-koufeijilu" @click="lookChargebackRecord(scope.row)"></i>
+                        </el-tooltip>
+                    </div>
+                </template>
+            </zz-table>
+        </div>
 
-    <chargeback-record
-      v-if="viewActive == 'chargeback'"
-      :params="thisLookData"
-    ></chargeback-record>
-    <recharge-record
-      v-if="viewActive == 'recharge'"
-      :params="thisLookData"
-    ></recharge-record>
-  </div>
+        <chargeback-record v-if="viewActive == 'chargeback'" :params="thisLookData"></chargeback-record>
+        <recharge-record v-if="viewActive == 'recharge'" :params="thisLookData"></recharge-record>
+    </div>
 </template>
 
 <script>
@@ -132,128 +63,133 @@ import ChargebackRecord from '../ChargebackRecord.vue';
 import RechargeRecord from '../RechargeRecord.vue';
 import list from '@utils/list.js';
 export default {
-  mixins: [list],
-  components: {
-    ChargebackRecord,
-    RechargeRecord
-  },
-  // name: 'waterManagement',
-  data () {
-    return {
-      viewActive: 'index',
-      cols: [
-        {
-          label: '社区名称',
-          prop: 'communityName'
-        },
-        {
-          label: '房间',
-          prop: 'assets'
-        },
-        {
-          label: '业主',
-          prop: 'residentName'
+    mixins: [list],
+    components: {
+        ChargebackRecord,
+        RechargeRecord
+    },
+    // name: 'waterManagement',
+    data() {
+        return {
+            viewActive: 'index',
+            cols: [
+                {
+                    label: '社区名称',
+                    prop: 'communityName'
+                },
+                {
+                    label: '房间',
+                    prop: 'assets'
+                },
+                {
+                    label: '业主',
+                    prop: 'residentName'
+                },
+                {
+                    label: '业主手机号',
+                    prop: 'residentPhone'
+                },
+                {
+                    label: '水费余额(元)',
+                    prop: 'balance'
+                },
+                {
+                    label: '最后扣费时间',
+                    prop: 'lastPayTime'
+                },
+                {
+                    label: '操作',
+                    width: '120',
+                    slot: 'opt'
+                }
+            ],
+            communityArr: [],
+            mixins_post: 'post',
+            thisLookData: {}
+        };
+    },
+    created() {
+        this.getorgTree();
+        this.mixins_dataUrl = '/sc-charge/house/account/page';
+        this.mixins_query = {
+            accountType: 2
+        };
+        this.mixins_search();
+    },
+    mounted() {},
+    methods: {
+        getorgTree() {
+            this.$http
+                .get('/sc-community/assets/community/list')
+                .then((data) => {
+                    this.communityArr = data.data;
+                    this.$store.commit('setAreaSelect', data.data);
+                })
+
+                .catch(function () {});
         },
-        {
-          label: '业主手机号',
-          prop: 'residentPhone'
+
+        exportExcel() {
+            this.__exportExcel('/sc-charge/house/account/export/excel', this.mixins_query);
         },
-        {
-          label: '水费余额(元)',
-          prop: 'balance'
+
+        lookRechargeRecord(row) {
+            this.thisLookData = {
+                accountType: 2,
+                paymentType: 1,
+                id: row.houseId,
+                name: row.communityName + row.assets
+            };
+            this.viewActive = 'recharge';
+            // this.$router.push({
+            //     path: '/RechargeRecord',
+            //     query: {
+            //         accountType: 2,
+            //         paymentType: 1,
+            //         id: row.houseId,
+            //         name: row.communityName + row.assets
+            //     }
+            // });
         },
-        {
-          label: '最后扣费时间',
-          prop: 'lastPayTime'
+        lookChargebackRecord(row) {
+            this.thisLookData = {
+                accountType: 2,
+                paymentType: 2,
+                id: row.houseId,
+                name: row.communityName + row.assets
+            };
+            this.viewActive = 'chargeback';
+
+            // this.$router.push({
+            //     path: '/ChargebackRecord',
+            //     query: {
+            //         accountType: 2,
+            //         paymentType: 2,
+            //         id: row.houseId,
+            //         name: row.communityName + row.assets
+            //     }
+            // });
         },
-        {
-          label: '操作',
-          width: '120',
-          slot: 'opt'
+        addOrEdit(row) {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/payService/waterManagement/stepPage/add.vue',
+                    width: '524px',
+                    height: '424px',
+                    props: {
+                        data: row,
+                        callback: resolve
+                    },
+                    title: '水费充值'
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
         }
-      ],
-      communityArr: [],
-      mixins_post: 'post',
-      thisLookData: {}
-    };
-  },
-  created () {
-    this.getorgTree();
-    this.mixins_dataUrl = '/sc-charge/house/account/page';
-    this.mixins_query = {
-      accountType: 2
-    };
-    this.mixins_search();
-  },
-  mounted () { },
-  methods: {
-    getorgTree () {
-      this.$http
-        .get('/sc-community/assets/community/list')
-        .then((data) => {
-          this.communityArr = data.data;
-          this.$store.commit('setAreaSelect', data.data);
-        })
-
-        .catch(function () { });
-    },
-    lookRechargeRecord (row) {
-      this.thisLookData = {
-        accountType: 2,
-        paymentType: 1,
-        id: row.houseId,
-        name: row.communityName + row.assets
-      };
-      this.viewActive = 'recharge';
-      // this.$router.push({
-      //     path: '/RechargeRecord',
-      //     query: {
-      //         accountType: 2,
-      //         paymentType: 1,
-      //         id: row.houseId,
-      //         name: row.communityName + row.assets
-      //     }
-      // });
-    },
-    lookChargebackRecord (row) {
-      this.thisLookData = {
-        accountType: 2,
-        paymentType: 2,
-        id: row.houseId,
-        name: row.communityName + row.assets
-      };
-      this.viewActive = 'chargeback';
-
-      // this.$router.push({
-      //     path: '/ChargebackRecord',
-      //     query: {
-      //         accountType: 2,
-      //         paymentType: 2,
-      //         id: row.houseId,
-      //         name: row.communityName + row.assets
-      //     }
-      // });
-    },
-    addOrEdit (row) {
-      new Promise((resolve) => {
-        this.$store.dispatch('addPopup', {
-          url: '/payService/waterManagement/stepPage/add.vue',
-          width: '524px',
-          height: '424px',
-          props: {
-            data: row,
-            callback: resolve
-          },
-          title: '水费充值'
-        });
-      }).then(() => {
-        this.mixins_search();
-      });
     }
-  }
 };
 </script>
-<style scoped lang='scss'>
+<style scoped lang="scss">
 .search {
     font-size: 12px;
     color: #424656;
@@ -261,4 +197,4 @@ export default {
 .width90 {
     width: 90px;
 }
-</style>
+</style>