<!--packageI/invoice/invoiceCenter/invoiceCenter.wxml-->
<view class="invoice-center">
    <van-sticky offset-top="{{ 0 }}">
        <van-tabs active="{{ invoiceType }}" bind:change="changeTab"> 
            <van-tab title="已开票" name="{{1}}"></van-tab>
            <van-tab title="申请中发票" name="{{2}}"></van-tab>
            <van-tab title="申请开票" name="{{3}}"></van-tab>   
            <van-tab title="发票抬头" name="{{-1}}"></van-tab>
        </van-tabs>
    </van-sticky>

    <child-invoiced 
        wx:if="{{invoiceType == 1 || invoiceType == 2}}" invoiceType="{{invoiceType}}" invoiceList="{{invoiceList}}"
        loading="{{loading}}" finshed="{{finshed}}" finshed-class="finshed-class"
    ></child-invoiced>
    <child-order-list 
        wx:if="{{invoiceType == 3}}" invoiceType="{{invoiceType}}" orderList="{{orderList}}" sinvoice="{{sinvoice}}" bind:addSuccess="refreshComponent" loading="{{loading}}" finshed="{{finshed}}" finshed-class="finshed-class"
    ></child-order-list>
    <child-page-bearer
        wx:if="{{invoiceType == -1}}" bearerList="{{bearerList}}" bind:deleteBearers="refreshComponent"
        loading="{{loading}}" finshed="{{finshed}}" finshed-class="finshed-class"
    ></child-page-bearer>

    <view style="margin: 100rpx; text-align: center;">
        <van-loading wx:if="{{loading}}" size="24px">加载中...</van-loading>
    </view>
</view>
