<cu-custom bgColor="bg-gradual-blue"  
 isBack="true"> 
  <block bindtap="back" slot="backText" >返回</block> 
  <view slot="content">{{Hotelinfo.HotelName}}({{Hotelinfo.Code}})</view> 
</cu-custom> 

<view class=" solids bg-white" style="height:70px ;width: 100%;font-weight: bold; ">
<view class="flex text-xl" style=" height:45% ;width: 100%;">  
<view class="solids"  wx:if="{{RoomIndex>=0}}"  style="height:100% ;width: 50%;">
<text class="text-black">房号:{{HostsDataFilters[RoomIndex].RoomNumber}}</text> 
</view>
<view class="solids"  wx:if="{{RoomIndex>=0}}"  style="height:100% ;width: 50%;">
  <text class="text-black">人脸设备在线：</text>
  <text class="text-blue">{{onlineFaceDevices}}/</text>
  <text class="text-black">{{HostsDataFilters.length}} </text>

</view>
</view>

<view class="cu-bar1 bg-white " style="height:50% ;width: 100%;" >
  <view class="solids"  style="width: 60%;">
    <input  class="solids cu-btn1" focus="true" bindinput="inputSearchForHotels"	confirm-type="search" style="width: 100%;" placeholder="请输入房号搜索房间"/>
  </view>

 <view class="flex"style="width: 40%;">
   <button class="cu-btn1  line-green margin-left " style="width: 100%;	margin:5rpx;" bindtap="SearchForHotels">搜索</button> 
   <button class="cu-btn1  line-green margin-left " style="width: 100%;	margin:5rpx;" bindtap="RefreshTheRoom">刷新</button> 
 </view>



</view>  


</view>

<scroll-view scroll-y  scroll-into-view="{{toView}}" id="myScroll"  style="height:{{scrollHeight}}rpx;" >
<view class='nav-list1 bg-white' style="margin-top: 20rpx;">    
    <view  bindtap="goFaceDetail"   data-room="{{item.RoomNumber}}"  data-hotel="{{Hotelinfo.HotelName}}"
  data-status="{{item.FaceStatus}}" data-faceSN="{{item.FaceSN}}" hover-class="navigator-hover" class="nav-li4 bg-{{item.FaceStatus===true? 'cyan':'gray'}}" wx:for="{{HostsDataFilters}}" id="msg-{{index}}" wx:key="index">
      <view style="font-size: 28rpx;justify-content:start" >{{item.RoomNumber}}</view>     
      <view style="font-size: 18rpx;justify-content:start;color:{{item.FaceSN && !item.FaceStatus ? 'red' : 'gray'}}"  >{{item.FaceSN || '未绑定'}}</view>     
    </view>
  </view>

</scroll-view>

<!-- 房间已经绑定人脸机弹窗提示 -->
<view class="cu-modal {{modal==-1?'show':''}}">
    <view class="cu-dialog">
        <view class="cu-bar bg-white justify-end">
            <view class="content">{{selHosts.RoomNumber}}已经绑定人脸机</view>
            <view class="action"  bindtap="GetHide" >
                <text class="cuIcon-close text-red"></text>
            </view>
        </view>

    <view class="padding-lg flex flex-wrap " >
         <view  class="basis-sm text-right">酒店：</view><view class="text-left basis-lg">{{Hotelinfo.HotelName}}</view>
        <view class="basis-sm text-right">房间：</view><view class="basis-lg text-left">{{message[1]}}</view>
        <view class="basis-sm text-right">人脸机SN：</view><view class="basis-lg text-left">{{message[0]}}</view>
        <view class=" text-left flex-sub text-sm text-gray">房间已经绑定人脸机，点击继续将执行扫描绑定；点击取消，将不会执行任何操作~</view>
    </view>



        <view class="cu-bar bg-white">
            <!-- <view class="action margin-0 flex-sub " data-type="0" bindtap="ErrorInfo">反馈错误</view>text-red  -->
      <view id="{{Hotelinfo.HotelName}}_{{message[1]}}_{{message[0]}}_{{Hotelinfo.Code}}_{{Hotelinfo.HotelId}}" class="action margin-0 flex-sub  text-green  solid-left" style="font-weight: 600;" bindtap="testinfo" >设置</view>
      <view id="{{Hotelinfo.HotelName}}_{{message[1]}}_{{message[0]}}_{{Hotelinfo.Code}}" class="action margin-0 flex-sub  text-green  solid-left" style="font-weight: 600;"  bindtap="OpenDoor" >开门</view>



            <!-- <view   class="action margin-0 flex-sub {{selHosts.FaceSN!=''?'show':''}} text-red solid-left" bindtap="JbSn" >解绑</view> -->
            <!-- <view class="action margin-0 flex-sub  solid-left" bindtap="GetHide" >取消</view> -->
            <!-- <view class="action margin-0 flex-sub text-green  solid-left" bindtap="{{FaceSNinput == 0?'GetFaceCode':'ShowInputsn'}}" >继续</view> -->
        </view>


    </view>
</view>

<!-- 绑定确认弹窗 -->
<view class="cu-modal {{modal=='-521'?'show':''}}">
    <view class="cu-dialog">
        <view class="cu-bar bg-white justify-end">
            <view class="content">绑定人脸设备</view>
            <view class="action"  bindtap="GetHide" >
                <text class="cuIcon-close text-red"></text>
            </view>
        </view>
        <view class="padding-lg flex flex-wrap " >
         <view  class="basis-sm text-right">酒店：</view><view class="text-left basis-lg">{{Hotelinfo.HotelName}}</view>
        <view class="basis-sm text-right">房间：</view><view class="basis-lg text-left">{{selHosts.RoomNumber}}</view>
        <view class="basis-sm text-right">人脸设备SN：</view> 
        <view class="basis-lg text-left">
            <textarea placeholder="请输入人脸设备SN" model:value="{{faceSNCode}}" name="input" style="width: 100%; height: 100rpx; border: 1rpx solid #ccc; border-radius: 4rpx; padding: 10rpx;" placeholder-style="color: #999;"></textarea>
        </view>
        <view class=" text-left flex-sub text-sm text-gray">确定为该房间绑定人脸设备SN，点击继续将执行绑定操作；点击取消，将不会执行任何操作~</view>
    </view>
        <view class="cu-bar bg-white">
            <view class="action margin-0 flex-sub text-green solid-left" bindtap="GetHide" >取消</view>
            <view class="action margin-0 flex-sub  solid-left" bindtap="GetFaceSNend" >继续</view>
        </view>
    </view>
</view>

<!-- SN已经被绑定弹窗提示 -->
<view class="cu-modal {{modal==-200?'show':''}}">
    <view class="cu-dialog">
        <view class="cu-bar bg-white justify-end">
            <view class="content">{{code}}已经被绑定
          
      </view>
     
            <view class="action"  bindtap="GetHide" >
                <text class="cuIcon-close text-red"></text>
            </view>
        </view>
        <view class="padding-xs flex flex-wrap justify-center " >
<view class="basis-xl text-sm" wx:for="{{bdHosts}}" >
<text  class=" text-right ">酒店：</text><text class="text-left  text-red">{{item.HotelName}}</text>
<text class="padding-left-xs   text-right   " >房间：</text><text class="text-left  text-red">{{item.RoomNumber}}</text>
<button class="cu-btn margin-left-xs  sm bg-red" wx:if="{{item.qx == 0}}"  data-index="{{index}}"  type="" bindtap="JbSn" >解绑</button>
<button class="cu-btn margin-left-xs sm bg-red" wx:if="{{item.qx != 0}}"  disabled >解绑</button>




</view>
        <view class="basis-xl">SN：<text class="text-left">{{faceSNCode}}</text></view>
        <view class="basis-xl text-left text-sm text-gray">SN已经被其他房间绑定，点击解绑将取消原有绑定，执行新的绑定；点击取消，将不会执行任何操作~</view>
   
    </view>
        <view class="cu-bar bg-white">  
            <view class="action margin-0 flex-sub text-green solid-left" bindtap="GetHide" >取消</view>
    
            <view wx:if="{{bdHosts.length<=0}}"  class="action margin-0 flex-sub  solid-left" data-type="false" bindtap="GetFaceSNend" >继续</view>
        </view>
    </view>
</view>



