<style>
    .page_AccountPageList tr th,.page_AccountPageList tr td{
        padding: 10px 20px;
        text-align: left;
    }
</style>
<template>
    <div class="flexOne page_AccountPageList">
        <div class='query-box'>
			<ul>
				<li>
                    <input type="button" class="hollowFixedBtn" :value="$t('pub.returnBack')" @click="goUrl()"/>
                </li>
			</ul>
        </div>
        <table class="singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0" cellpadding="0" v-loading="loading">
            <tr>
                <th width='200px'>{{$t('fnc.bieming')}}</th>
                <th>{{$t('fnc.zhanghuleixing')}}</th>
                <th>{{$t('hotel.hotel_Currency')}}</th>
                <th>{{$t('fnc.yueacc')}}</th>
                <th>{{$t('fnc.bwbyue')}}</th>
                <th>{{$t('admin.admin_czPerson')}}</th>
                <th width='200px'>{{$t('fnc.caozuoriqi')}}</th>
            </tr>
            <tr v-for="(item,index) in dataList" :key="index">
                <td>{{item.Alias}}</td>
                <td>{{item.AccountTypeName}}</td>
                <td>{{item.CurrencyName}}</td>
                <td>¥{{item.Initialbalance}}</td>
                <td>￥{{item.RBNInitialbalance}}</td>
                <td>{{item.emName}}</td>
                <td>{{item.CreateDate}}</td>
            </tr>
        </table>
        <div>
            <el-pagination 
                background
                @current-change="handleCurrentChange" 
                :current-page.sync="currentPage"
                layout="total,prev, pager, next, jumper"
                :page-size=msg.pageSize 
                :total=total>
            </el-pagination>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            dataList:[],
            loading:false,
            total:0,
            currentPage:1,
            msg:{
                PageIndex:1,
                pageSize:15,
                BackId:0,
                TypeId:0,
                ID:0,
                BankType:0,
            },
        }
    },created(){
        this.msg.BackId = this.$route.query.BackId;
        this.msg.TypeId = this.$route.query.TypeId;
    },mounted(){
        this.getList()
    },methods:{
        handleCurrentChange(val) {
            this.msg.pageIndex = val;
            this.getList();
        },
        resetPageIndex(){
            this.msg.pageIndex=1;
            this.currentPage = 1
        },
        getList(){
            this.loading = true;
            this.apipost('FinancialInstitutions_post_GetAccountList',this.msg,r=>{
                if(r.data.resultCode==1){
                    this.total = r.data.data.count;
                    this.dataList = r.data.data.pageData;
                }
                this.loading = false;
            },null)
        },
        goUrl(){
            this.$router.go(-1)
        }
    }
}
</script>
