Blame view

src/components/owner/ownerDetailAccount.vue 4.12 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
c85e0853   wuxw   业主详情开发完成
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    <div class="margin-top">
      <el-row>
        <el-col :span="24" class="text-right">
          <el-button type="primary" size="small" style="margin-left:10px"
            v-if="ownerDetailAccountInfo.accounts.length <1 && hasPrivilege('502023032809461736')"
            @click="_prestoreAccount1()">
            {{ $t('ownerDetailAccount.prestore') }}
          </el-button>
        </el-col>
      </el-row>
      <div class="margin-top">
        <el-table :data="ownerDetailAccountInfo.accounts" style="width: 100%">
          <el-table-column prop="acctId" :label="$t('ownerDetailAccount.acctId')" align="center"></el-table-column>
          <el-table-column prop="acctName" :label="$t('ownerDetailAccount.acctName')" align="center"></el-table-column>
          <el-table-column prop="link" :label="$t('ownerDetailAccount.phone')" align="center"></el-table-column>
          <el-table-column prop="acctTypeName" :label="$t('ownerDetailAccount.acctType')" align="center"></el-table-column>
          <el-table-column prop="amount" :label="$t('ownerDetailAccount.amount')" align="center"></el-table-column>
          <el-table-column prop="createTime" :label="$t('ownerDetailAccount.createTime')" align="center"></el-table-column>
          <el-table-column :label="$t('common.operation')" align="center" width="200">
            <template slot-scope="scope">
              <el-button-group>
                <el-button size="mini" @click="_prestoreAccount(scope.row)"
                  v-if="hasPrivilege('502023032809461736')">
                  {{ $t('ownerDetailAccount.prestore') }}
                </el-button>
                <el-button size="mini" @click="_accountDetail(scope.row)">
                  {{ $t('ownerDetailAccount.detail') }}
                </el-button>
              </el-button-group>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination
          @current-change="handleCurrentChange"
          :current-page="pagination.currentPage"
          :page-size="pagination.pageSize"
          :total="pagination.total"
          layout="total, prev, pager, next, jumper">
        </el-pagination>
      </div>
  
51b1efce   wuxw   优化账户预存通知bug
43
      <prestore-account ref="prestoreAccount" @success="notify"></prestore-account>
c85e0853   wuxw   业主详情开发完成
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
    </div>
  </template>
  
  <script>
  import PrestoreAccount from '@/components/account/prestoreAccount'
  import { queryCommunityOwnerAccount } from '@/api/owner/ownerDetailAccountApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'OwnerDetailAccount',
    components: {
      PrestoreAccount
    },
    data() {
      return {
        ownerDetailAccountInfo: {
          accounts: [],
          ownerId: '',
          name: '',
        },
        pagination: {
          currentPage: 1,
          pageSize: 10,
          total: 0
        }
      }
    },
    methods: {
      open(ownerId, ownerName, link) {
        this.ownerDetailAccountInfo.ownerId = ownerId
        this.ownerDetailAccountInfo.ownerName = ownerName
        this.ownerDetailAccountInfo.link = link
        this._loadOwnerDetailAccountData(1, this.pagination.pageSize)
      },
51b1efce   wuxw   优化账户预存通知bug
78
79
80
      notify(){
        this._loadOwnerDetailAccountData(1, this.pagination.pageSize)
      },
c85e0853   wuxw   业主详情开发完成
81
82
83
84
85
86
87
88
89
90
      _loadOwnerDetailAccountData(page, row) {
        const params = {
          communityId: getCommunityId(),
          ownerId: this.ownerDetailAccountInfo.ownerId,
          page: page,
          row: row
        }
  
        queryCommunityOwnerAccount(params).then(response => {
          this.ownerDetailAccountInfo.accounts = response.data
f9f29297   wuxw   v1.9 分页 record 传给...
91
          this.pagination.total = response.total
c85e0853   wuxw   业主详情开发完成
92
93
94
95
96
        }).catch(error => {
          console.error('请求失败处理', error)
        })
      },
      _accountDetail(account) {
dd88fe5d   wuxw   优化业主详情页面
97
        this.$router.push(`/views/account/accountDetailManage?acctId=${account.acctId}`)
c85e0853   wuxw   业主详情开发完成
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
      },
      _prestoreAccount(account) {
        this.$refs.prestoreAccount.open({
          ownerId: this.ownerDetailAccountInfo.ownerId,
          acctType: account.acctType,
          tel: account.link,
          roomId: account.roomId
        })
      },
      _prestoreAccount1() {
        this.$refs.prestoreAccount.open({})
      },
      handleCurrentChange(val) {
        this._loadOwnerDetailAccountData(val, this.pagination.pageSize)
      },
    },
    created() {
c85e0853   wuxw   业主详情开发完成
115
116
117
118
119
120
121
    }
  }
  </script>
  
  <style scoped>
  /* 样式同上一个组件 */
  </style>