<!--packageE/appointment/client/appointment/appointment.wxml-->
<van-tabs title-active-color="#f49f19" bind:change="changeTags"  color="#f49f19">
    <van-tab title="进行中">
        <view class="blank" wx:if="{{projectList.length<=0}}">
          <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png"></image>
          <text>还没有记录哦</text>
        </view>
        <view class="project_box" wx:for="{{projectList}}" wx:key="id">
        	<view class="project_list">
				<view class="list_left">
					<view style="width: 5rem;height: 5rem;flex: 0 0 5rem">
						<image src="{{item.has_one_order_project.project_thumb}}" alt=""></image>
					</view>
					<view class="list_title">
						<p>{{item.has_one_order_project.project_title}}</p>
						<view style="display: flex">
							<view class="list_trtitle">
								<view style="color:#f49f19;">
									<icon style="font-size: 14px" class="iconfont icon-dengdaichuli"></icon>
									<text>{{item.begin_time}}</text>
								</view>
								<view>
									<icon style="color:#f49f19;" class="iconfont icon-stores_staff"></icon>
									<text class="store_name">{{item.has_one_worker.name}}</text>
									<text class="list_address text_border" style="width: 7.5rem">{{item.has_one_store.store_name}}</text>
								</view>
							</view>
							<!-- <view class="list_right">
								<text class="state" bindtap="createQrc"  data-item="{{item}}">核销</text>
							</view> -->
						</view>
					</view>
				</view>
			</view>
			<view class="bottom">
				<view class="bottom-address">
					<icon style="color:#f49f19;" class="iconfont icon-order_locate"></icon>
					<text class="list_address">{{item.has_one_store.address}}</text>
				</view>
				<view class="distance">{{item.has_one_store.distance}}{{item.has_one_store.unit}}</view>
			</view>
			<view style="text-align: left;margin: 0.5rem" wx:if="{{item.remark}}">
				备注：{{item.remark}}
			</view>
					<view class="bottom-box">
            <view class="cancel-box" bindtap="cancelIt" wx:if="{{item.show_cancel == 1}}" data-item="{{item}}">取消预约</view>
            <view class="sure-box" bindtap="createQrc"  data-item="{{item}}">核销</view>
          </view>
        </view>
      </van-tab>
    <van-tab title="已完成">
        <view class="blank" wx:if="{{projectList.length<=0}}">
          	<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png"></image>
          	<text>还没有记录哦</text>
        </view>
        <view class="project_box" wx:for="{{projectList}}" wx:key="id">
          	<view class="project_list">
				<view class="list_left">
					<view style="width: 5rem;height: 5rem;flex: 0 0 5rem">
						<image src="{{item.has_one_order_project.project_thumb}}" alt=""></image>
					</view>
				<view class="list_title">
				<view>{{item.has_one_order_project.project_title}}</view>
					<view style="display: flex">
						<view class="list_trtitle">
							<view style="color:#f49f19;">
								<icon style="font-size: 14px;display:flex;align-items:center;" class="iconfont icon-dengdaichuli"></icon>
								<view>{{item.begin_time}}</view>
							</view>
							<view>
								<icon style="color:#f49f19;display:flex;" class="iconfont icon-stores_staff"></icon>
								<text class="store_name">{{item.has_one_worker.name}}</text>
								<text class="list_address text_border" style="width: 7.5rem">{{item.has_one_store.store_name}}</text>
							</view>
						</view>
						<view class="list_right">
							<text class="state1" wx:if="{{false}}" bindtap="toAppointment" data-item="{{item}}">再次预约</text>
							<text class="state1" bindtap="gotoEvaluate" data-serverid="{{item.id}}" wx:if="{{item.has_many_comment_count <= 0}}" >评价</text>
							<text class="state1" bindtap="gotoEvaluate" data-serverid="{{item.id}}" wx:else >评价详情</text>
						</view>
					</view>
				</view>
			</view>
        </view>
		<view class="bottom">
				<view class="bottom-address">
					<icon style="color:#f49f19;" class="iconfont icon-order_locate"></icon>
					<text class="list_address">{{item.has_one_store.address}}</text>
				</view>
				<view class="distance">{{item.has_one_store.distance}}{{item.has_one_store.unit}}</view>
		</view>
		<view style="text-align: left;margin: 0.5rem" wx:if="{{item.remark}}">
				备注：{{item.remark}}
		</view>
		</view>
    </van-tab>
		<van-tab title="已取消">
        <view class="blank" wx:if="{{projectList.length<=0}}">
          	<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png"></image>
          	<text>还没有记录哦</text>
        </view>
        <view class="project_box" wx:for="{{projectList}}" wx:key="id">
          	<view class="project_list">
				<view class="list_left">
					<view style="width: 5rem;height: 5rem;flex: 0 0 5rem">
						<image src="{{item.has_one_order_project.project_thumb}}" alt=""></image>
					</view>
				<view class="list_title">
				<view>{{item.has_one_order_project.project_title}}</view>
					<view style="display: flex">
						<view class="list_trtitle">
							<view style="color:#f49f19;">
								<icon style="font-size: 14px;display:flex;align-items:center;" class="iconfont icon-dengdaichuli"></icon>
								<view>{{item.begin_time}}</view>
							</view>
							<view>
								<icon style="color:#f49f19;display:flex;" class="iconfont icon-stores_staff"></icon>
								<text class="store_name">{{item.has_one_worker.name}}</text>
								<text class="list_address text_border" style="width: 7.5rem">{{item.has_one_store.store_name}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
        </view>
			<view class="bottom">
					<view class="bottom-address">
						<icon style="color:#f49f19;" class="iconfont icon-order_locate"></icon>
						<text class="list_address">{{item.has_one_store.address}}</text>
					</view>
					<view class="distance">{{item.has_one_store.distance}}{{item.has_one_store.unit}}</view>
			</view>
			<view style="text-align: left;margin: 0.5rem" wx:if="{{item.remark}}">
					备注：{{item.remark}}
			</view>
		</view>
    </van-tab>
</van-tabs>


	<van-popup show="{{ qrCodeFlag }}" custom-style="background:transparent;">
     <view class="questionWrapper">
          <image class="img" src="{{posterImageUrl}}"></image>
		  <view class="closeView">
			  <!-- <view class="close" bindtap="setQuestionFlag">我知道了</view> -->
			  
			  <icon bindtap="setQRCodeFlag" class="close iconfont icon-adsystem_icon_cancle"></icon>
		  </view>
     </view>
</van-popup>
