<!--pages/more/downLine/distribution/distribution.wxml-->
<view class="header">
  <view class="header_title">Can withdraw </view>
  <view class="header_data">
    <view class="distribution_money">
      <view class="enable_money">¥ {{share_money}}</view>
      <view class="withdraw_detail" bindtap="showDetail">
        withdraw details<text class="iconfont icon-rightbutton"></text>
      </view>
    </view>
    <view class="success_withdraw">Successful withdrawal : ¥ {{userData.cash_finish}}</view>
  </view>
</view>
<view class="data">
  <view class="data_item">
    <view class="data_title">Cumulative commission</view>
    <view class="data_num">{{userData.share_finish}}</view>
    <view class="data_tips">All commissions</view>
  </view>
  <view class="data_item">
    <view class="data_title">Has applied for commission</view>
    <view class="data_num">{{userData.cash_wait}}</view>
    <view class="data_tips">Commission to be audited</view>
  </view>
</view>
<view class="tips">
  <view class="tips_content">Once the buyer confirms the receipt, he will receive a distribution commission immediately. After the settlement period (7 days), the commission can be withdrawn. During the settlement period, the buyer's return commission will be automatically deducted.</view>
  <!-- <view class="ps">注意：可用佣金满<text style="color: red">1</text>元后才能申请提现</view> -->
</view>
<view class="btn_box">
  <button  catchtap="showWithdraw" data-attr="content">I want to withdraw</button>
</view>

<block wx:if="{{withdrawFlag}}">
  <view class="mask" bindtap="showWithdraw">
    <view class="withdraw_wrapper" data-attr="content">
      <view class="title" data-attr="content">Please enter your information</view>
      <view class="withdraw_money" data-attr="content">
        <input placeholder-style="gray" placeholder="name" type="text" bindinput="syncInfo" data-info="name" data-attr="content" />
        <text class="iconfont icon-name" data-attr="content"></text>
      </view>
      <view class="withdraw_money" data-attr="content">
        <input placeholder-style="gray" placeholder="Bank" type="text" bindinput="syncInfo" data-info="bank" data-attr="content" />
        <text class="iconfont icon-bank" data-attr="content"></text>
      </view>
      <view class="withdraw_money" data-attr="content">
        <input placeholder-style="gray" placeholder="Bank card number" type="number" bindinput="syncInfo" data-info="card_num" data-attr="content" />
        <text class="iconfont icon-card" data-attr="content"></text>
      </view>
      <view class="withdraw_money" data-attr="content">
        <input placeholder-style="gray" placeholder="Withdrawal Amount" type="number" bindinput="syncInfo" data-info="money" data-attr="content" />
        <text class="iconfont icon-newbimoney" data-attr="content"></text>
      </view>
      <button data-attr="content" type="primary" bindtap="getWithdraw" disabled="{{!withdrawMoney||!withdrawName||!withdrawCard||!withdrawBank}}">Submit</button>
    </view>
  </view>
</block>