<!--packageI/invoice/components/childInvoiced/childInvoiced.wxml-->
<wxs module="invoiceFn">
module.exports = {
  invoiceType: function (type) {
    switch (parseInt(type)) {
      case 0:
        return "电子发票"
      case 1:
        return "普通发票"
      case 2:
        return "专用发票"
    }
  }
}
</wxs>
<view class="child-invoiced" wx:if="{{invoiceList.length > 0}}">
  <view class="content-item" wx:for="{{invoiceList}}" wx:key="item.id">
    <van-cell title="{{item.rise_type==1?'个人':'单位'}}" value="{{invoiceFn.invoiceType(item.invoice_type)}}" title-width="200rpx"></van-cell>
    <van-cell title="开票金额" title-width="200rpx">
      <view style="color:#f15353">{{language['money']}}{{item.price}}</view>
    </van-cell>
    <van-cell title="订单号" title-width="200rpx">
      <view class="flex-a-c flex-j-sb">
        <view class="order-sn">{{item.order_sn}}</view>
        <view style="color: #f15353;font-size: 22rpx;" class="flex-a-c" bindtap="goOrderdetail" data-orderid="{{item.order_id}}">
            <text>订单详情 </text>
            <van-icon name="arrow"  style="margin-left: 8rpx;"/>
        </view>
      </view>
    </van-cell>
    <van-cell title="申请时间" value="{{item.created_at}}" title-width="200rpx"></van-cell>

    <van-cell>
      <view slot="title" class="shop-box-left flex-a-c">
        <icon class="iconfont icon-fontclass-dianpu"></icon>
        <text class="shop-name">{{item.shop_name}}</text>
      </view>
      <view style="text-align: right;">
        <view class="details" bindtap="toInvoiceDetail" data-invoiceid="{{item.id}}">查看详情</view>
      </view>
    </van-cell>
  </view>
  <view wx:if="{{!loading && finshed }}" class="finshed-class=">已经到底了~~~</view>
</view>

<van-empty wx:elif="{{!loading}}" image="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/empty-image-search.png"></van-empty>