<wxs module="filters" src="../../../utils/filter.wxs"></wxs>

<!-- tabbar -->
<view class="tab-hd" bindtap="clickTab">
	<view class="tab-hd-item {{currentTabIndex == index ? 'active':''}}"
				wx:for="{{tabArr}}"
				data-index="{{index}}">{{item}}</view>
</view>

<view class="tab-bd">
	<view class="list">

	<block wx:for="{{list.pageData}}">
		<view class="list-item" bindtap="viewDetails" data-formlistid="{{item.FormLIstID}}" data-title="{{item.ItemName}}" data-date="{{item.EndDate}}">
			<view class="pd20">
					<!-- <view class="fs26"><text class="c-9">卡项编号：</text></view> -->
					<view class="ellipsis-2 title fs28">{{item.ItemName}} ({{item.ItemNo}})</view>
					<view class="flex ai-center">
						<text class="rmb fs40 c-red">{{filters.show_default(item.VipPrice, '0')}}</text>
						<view class="fs22 del pdl10 c-c7">零售价<text class="rmb">{{filters.show_default(item.PosPrice, '0')}}</text></view>
					</view>
					<view class="fs24 c-red">*兑换截止日期：{{item.BeginDate}}至{{item.EndDate ? item.EndDate : '不限'}}</view>
			</view>
			
			<view class="pd20 bdt fs24 t-r">
				<block wx:if="{{currentTabIndex == 0}}">
					<view class="btn bg-gray white" wx:if="{{filters.isExpired(item.EndDate)}}">已过期</view>
					<view class="btn bg-red white" wx:else>立即兑换</view>
				</block>
				
				<block wx:if="{{currentTabIndex == 1}}">
					<view class="btn bg-gray white">已核销</view>
				</block>
			</view>
			
		</view>
	</block>
		
		
		<!-- <view class="list-item" wx:if="{{currentTabIndex == 1}}">
			<view class="pd20">
					<view class=""><text class="fs24 c-9">订单编号：</text>191561561565555</view>
					<view class="ellipsis-2 title">卡项名称卡项名称卡项名称卡项名称卡项名称卡项名称卡项名称卡项名称卡项名称项名称卡项名称卡项名称项名称卡项名称卡项名称项名称卡项名称卡项名称项名称卡项名称卡项名称项名称卡项名称卡项名称</view>
					<view class="flex ai-center">
						<text class="rmb fs40 c-red">2{{filters.price(item.group_price)}}</text>
						<view class="fs22 del pdl10 c-c7">零售价<text class="rmb">3{{item.market_price}}</text></view>
					</view>
					<view class="fs24 c-red">*兑换截止日期：2022-01-01至2022-12-31</view>
			</view>
			
			<view class="pd20 bdt fs24 t-r">
				<view class="btn bg-gray white">已核销</view>
			</view>
		</view> -->
		
	</view>
</view>




<view class="no-more" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底啦 ——</view>
<nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>


