<!--pages/rentManagement/rentManagement.wxml-->
<view class="d-fixed">
  <van-field value="{{selectRoomName}}" label="房源选择" disabled placeholder="请选择房源" bind:click-input="selectRoomMethods">
    <van-button slot="button" size="mini" type="primary"  bindtap="clearSelect">
      清空
    </van-button>
  </van-field>
  <van-search value="{{ searchValue }}" placeholder="请输入租客名称" use-action-slot bind:change="onChange">
    <view slot="action" bind:tap="onClick">搜索</view>
  </van-search>
</view>
<view class="loglist">
    <view wx:for="{{list}}" :key="index" class="box" style="margin-bottom: 10px;">
      <van-cell-group>
        <van-cell title="租客:" value="{{item.name}}" />
        <van-cell title="电话:" value="{{item.phone}}" />
        <van-cell title="地址:" value="{{item.address}}" />
        <van-cell title="租金:" value="{{item.monthRent}}" />
        <van-cell title="合约状态:" value="{{item.status===0?'待签约':item.status===1?'已签约':item.status===2?'已欠费':item.status===3?'已退租':item.status===4?'已删除':item.status===5?'已到期':'未知'}}" />
        <van-cell title="签约时间:" value="{{item.signingTime}}" />
        <van-cell title="到期时间:" value="{{item.contractTime}}" />
        <van-cell title="操作:" wx:if="{{item.status == 1 ||item.status == 2 }}">
          <van-button slot="right-icon" type="primary" round size="mini" bindtap="rentMethods" data-item="{{item}}">去交租</van-button>
        </van-cell>
      </van-cell-group>
    </view>
</view>
<van-dialog
  use-slot
  title="支付方式"
  show="{{ show }}"
  show-cancel-button
  bind:close="onClose"
  bind:confirm="confirmMethods"
>
<van-radio-group value="{{ radio }}" bind:change="onChangeRadio" class="groupRadio">
  <van-radio name="2" class="radioView">现金</van-radio>
  <van-radio name="3" class="radioView">刷卡</van-radio>
  <van-radio name="0" class="radioView">微信支付</van-radio>
</van-radio-group>
</van-dialog>

<van-popup show="{{ showOne }}" bind:close="onCloseOne"  position="bottom" custom-style="height: 60%">
    <tree
    dataTree="{{dataList}}"
    selectKey="{{selectKey}}"
    bind:select="handleSelect"
    isSelectLastNode="true"
    isOpenAll="{{false}}"
  ></tree>
  </van-popup>