<import src="/common/common.wxml" />
<answer id='answer'></answer>
<view class="headTab ">
	<text class="{{headTab == 0 ? 'h-active' : ''}}" bindtap="switchTab" data-index="0">未开具</text>
	<!-- <text class="{{headTab == 0 ? 'h-active' : ''}}" bindtap="switchTab" data-index="0">未开具<text class="small">(服务)</text></text> -->
	<!-- <text class="{{headTab == 1 ? 'h-active' : ''}}" bindtap="switchTab" data-index="1">未开具<text class="small">(药品)</text></text> -->
	<text class="{{headTab == 1 ? 'h-active' : ''}}" bindtap="switchTab" data-index="1">已开具</text>
</view>
<view class="box" style='margin-top:80rpx;' wx:if='{{ishow}}'>
	<view wx:if='{{rechargeList==0}}'>
		<template is="noRecord" data="{{...noRecord}}" />
	</view>
	<view wx:else>
		<block wx:for="{{rechargeList}}" wx:key="index">
			<view class='record {{item.invoice !=0 &&headTab==1 ? "recordEnter" : ""}}' bindtap='goInvoicing' data-gid="{{item.id}}" data-invoice="{{item.invoice}}" data-money="{{item.money}}" data-descs="{{item.descs}}">
				<view class='up'>
					<view class='time'>
						<image src='/images/time_1.png'></image>
						<text>{{item.createtime}}</text>
					</view>
					<view class='money'>
						<text>{{item.money}}</text>元</view>
				</view>
				<view class='down'>
					<view class='con'>
						<text>{{item.descs}} | 电子发票</text>
					</view>
					<view style='float:right;'>
						<view class='con1'>
							<text style='color: #1384ff;' wx:if='{{item.invoice == 0}}'>待开票</text>
							<text wx:elif='{{item.invoice == 1}}'>已出票</text>
							<text wx:elif='{{item.invoice == 3 || item.invoice == 4}}' style='color: #1384ff;'>开票中</text>
							<text wx:else  style='color: #e6433f;'>开票失败</text>
						</view>
						<view class='xq'>
							<image src="/images/next.png"></image>
						</view>
					</view>
				</view>
			</view>
		</block>
		<view class="loading_box" wx:if='{{!success}}'>
			<view class="loading1" wx:if='{{scrollFlag}}'>
				<image src='/images/2.gif'></image>正在加载...
			</view>
			<view class="loading2" wx:if='{{scrollFlag1&&!scrollFlag}}'>没有更多了</view>
		</view>
	</view>
</view>
<view wx:else>
	<template is="loading" data="{{...loading}}" />
</view>
<login id='login' bind:refreshEvent="_refreshEvent">
</login>