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


<!-- 项目的拖动 -->	
<view wx:if="{{!store && project && md && md.length>0}}" class="card" catchtouchmove='true'  style="left:{{wp[0]}}px;top:{{wp[1]}}px;">
			<view class="cp_btn t-c c-c7" bindtouchend="touchend1" bindtouchmove="touchmove1" catch:touchmove1  style="padding: 15rpx 0;" >
				<text class="iconfont icon-sandian" style="font-size: 40rpx;"></text>
			</view>
			<view style="overflow-y: auto; max-height:600rpx;">
			<block wx:for="{{project}}">				
					<view class="t-c pd20 {{prj_index==index?'hover':''}}" data-index="{{index}}" catchtap="getName">
						<text class="iconfont icon-meirong fs40"></text>
						<view class="fs24">{{item.ServiceName}}</view>
					</view>
				
			</block>
			</view>		
</view>
	
<image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>
<view class="pdb100">

	<!-- 选择日期 -->
	<picker class='pi' mode="date" value='{{datet}}' start="2019-1-1" bindchange='bindDateChenge'>
			  <view class="flex-vertical pdv20 jc-center">
				   <!-- 门店 -->
				   <view class="flex-vertical-between head fs30">
				     <view>日</view>
				     <view>期</view>
				   </view>
				   
				   <view class="flex-vertical-between fs26 select">
				     <view class="{{datet==''?'color':''}} value ellipsis-1">{{datet==""?'选择日期':datet}}</view>
				     <view class="angle">∟</view>
				   </view>
				   
			  </view>	  			  
	</picker>
	<!-- 选择门店 -->
    <view class="flex-vertical pdv20 jc-center">
      <!-- 门店 -->
      <view class="flex-vertical-between head fs30">
        <view>门</view>
        <view>店</view>
      </view>

      <!-- 选择门店 -->
      <view class="flex-vertical-between fs26 select" bindtap="onclickstore">
        <view class="{{store_name==''?'color':''}} value ellipsis-1">{{store_name==""?'选择服务门店':store_name}}</view>
        <view class="angle">∟</view>
      </view>
     </view>
	
	
	<!-- 拖入的田框,主内容 -->
	<view wx:if="{{md && md.length>0}}" class="table flex fs26" style="width: 100%;height: auto; overflow: hidden; margin-bottom: 10rpx;">
			<view class="left t-c">
				<view class="td pr" style="width: 120rpx">
					<view class="time-box" bindtap="pickTime"><view class="time">时间</view></view>
					<view class="md-box"><view class="md">美导</view></view>
				</view>
				<view class="td" style="width: 120rpx"  wx:for="{{timeArr}}">{{item}}</view>
			</view>
			<scroll-view scroll-x class="right" bindscroll="scroll">
				<view class="flex t-c">
					<!-- <view>
						<view class="td bg-pink">张三</view>
						<view class="td" wx:for="{{timeArr.length}}"></view>
					</view> -->
					<view wx:for="{{md}}">
						<view class="td bg-pink">{{item.StaffName}}</view>
						<!-- <view class="td content_view {{v[0][0]?'121':''}}">{{v[0][0]}}</view> -->
						<block wx:for="{{timeArr.length}}" wx:for-item="subitem"  wx:for-index="subindex">
							<view bindtap="sele_tab" data-index="{{index}}" data-subindex="{{subindex}}" 
							   class="td content_view {{v[index][subindex] && v[index][subindex]? 'active':''}} {{fil.is_no_time(item,subindex,timeArr,sele_project) ?'notactive':''}}">
								<!-- 当项目是当前选中的项目的时候 -->  
								<block wx:if="{{v[index][subindex] && v[index][subindex].ProjectID==sele_project.ProjectID}}">
									 <text>{{v[index][subindex]?v[index][subindex].ServiceName:''}}</text>
									 <text catchtap="close_this" data-txt="v[{{index}}][{{subindex}}]"  data-sindex="{{subindex}}"  class="close_this">×</text>									
								</block>                         
                            </view>
						</block>
					</view>
				</view>
			</scroll-view>   
  </view>
</view>

<view class="btn-box fs32">
	<navigator class="appment flex-center" url="/packageG/pages/user/my_service/tment_order_list">
		<view>我的预约</view>
	</navigator>
	<form report-submit='true' bindtap="sub_success">	
		<button wx:if="{{is_sub}}" class="sub_appment flex-center">预约中..</button>
		<button wx:else form-type="submit" class="sub_appment flex-center">提交预约</button>
	</form>
</view>


<!-- 门店列表显示 -->
<view wx:if="{{store}}" class="storeList fixed">
  <view class="choice flex-vertical-between fs32 storeListpadd">
    <view>选择服务门店</view>
    <icon bindtap="onclickstore" color="black" size="22" type="cancel"></icon>
  </view>
  <view class="searchbar flex-vertical-between storeListpadd">
    <input class="inputstore fs28" placeholder="{{key_word==''?'输入要搜索的门店':key_word}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="search_store" />
    <view class="search flex-center" bindtap="search_store">
      <view class="fs28">搜索</view>
    </view>
  </view>
  <!-- 选择门店 -->
  <scroll-view class="stores" scroll-y="{{isScroll}}" enable-back-to-top="true" bindscrolltolower="onGetBottom">
    <view class="store flex-vertical" wx:for="{{store_list}}" bindtap="choose_for_store" data-ind="{{index}}">
      <block wx:if="{{index==fir_pick_index}}">
        <icon class="icon" type="success" color="red" size="20"></icon>
      </block>
      <block wx:else>
        <view class="circular"></view>
      </block>
      <view class="store_name_dis">
        <view class="name_dis flex-vertical-between">
          <view class="store_name fs28 ellipsis-1">{{item.StorageName}}</view>
          <view wx:if="{{item.Distance!=1000000}}" class="store_dis flex fs22">
            <view class="ellipsis-1">距您:{{item.Distance}}km</view>
          </view>
        </view>
        <view class="store_address fs24 ellipsis-2">{{item.Address}}</view>
      </view>
    </view>
    <!-- 通过搜索的时候没有找到的提示语 -->
    <view wx:if="{{store_list.length<1 && is_search==1}}" class="flex-center fs28 notstore">
      <view>没有找到{{key_word}}门店</view>
    </view>

    <!-- 数据加载完毕 -->
    <view wx:if="{{ismore && store_list.length>1}}" class="flex-center fs28 notstore">
      <view>数据加载完毕</view>
    </view>
  </scroll-view>
  <!-- sub -->
  <view class="flex-center fs32" bindtap="choice_store">
    <view class="determine flex-center">
      <view>确定</view>
    </view>
  </view>
</view>
<!-- 蒙尘 -->
<view wx:if="{{store}}" class="disgraceful" bindtap="onclickstore"></view>
<warn id="warn"></warn>

<!--  制作一个圆球导航  -->
<!-- <nav_b id="nav_b"></nav_b> -->
<!--
<view class="copy" wx:if="{{copy_btn}}" style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">
	<text class="iconfont icon-meirong fs40"></text>
	<view class="fs24">{{sele_project.ServiceName}}</view>
</view>-->
<view class="flex ai-center jc-center">
  <nodata wx:if="{{md && md.length==0}}" />
</view>