<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
<view class="container" catchtap="close">
  <image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>

  <view class="Fram">
    <!-- 选择门店 -->
    <view class="flex-vertical mabot">
      <!-- 门店 -->
      <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 class="flex-vertical mabot">
      <!-- 门店 -->
      <view class="flex-vertical-between head fs30">
        <view>美</view>
        <view>容</view>
        <view>师</view>
      </view>

      <!-- 选择美容师 -->
      <view class="rel fs26">
        <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">
          <view class="{{beautician_name==''?'color':''}} value ellipsis-1">{{beautician_name==''?'选择美容师':beautician_name}}</view>
          <view class="angle">∟</view>
        </view>
        <!-- 美容师下拉列表 -->
        <view class="beauticians abs" wx:if="{{beautician}}">
          <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->
          <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
            <view class="StaffName ellipsis-1">{{item.StaffName}}</view>
          </view>
          <view>
          </view>
        </view>
      </view>
      <view class="flex-center users" bindtap="nav_bea">
        <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image>
      </view>
    </view>

    <!-- 选择时间 -->
    <view class="flex-vertical mabot">
      <!-- 门店 -->
      <view class="head fs30">
        <view>预约时间</view>
      </view>

      <!-- 选择时间 -->
      <view class="flex-vertical-between fs26 select" data-url="/packageA/pages/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
        <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
        <view class="angle angler">∟</view>
      </view>
    </view>

    <!-- 备注 -->
    <view class="flex Remarks">
      <!-- 门店 -->
      <view class="flex-space-between head fs30">
        <view>备</view>
        <view>注</view>
      </view>
      <view class="flex fs26">
        <block wx:if="{{is_textea==1}}">
          <textarea class="textarea" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100">
          </textarea>
        </block>
        <block wx:else>
          <view class="textarea {{remarks==''?'color':''}}" bindtap="check_text">{{remarks==''?'填写备注':remarks}}
          </view>
        </block>
      </view>
    </view>
    <view wx:if="{{tment_count!=''}}" class="notes flex-level-right fs24 color">
      <view>注：剩余可预约人数{{tment_count}}人</view>
    </view>

    <view class="submitMax flex-space-center 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 form-type="submit" class="sub_appment flex-center">帮你预约</button>
        </form>
    </view>
  </view>

</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="onReachBottom">
    <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> -->