<!--pages/more/downLine/distribution/distribution.wxml-->
<view class="header">
  <view class="header_title">可提现佣金（元）</view>
  <view class="header_data">
    <view class="distribution_money">
      <view class="enable_money">{{userData.share_finish}}</view>
      <view class="withdraw_detail" bindtap="showDetail">
        提现明细<text class="iconfont icon-rightbutton"></text>
      </view>
    </view>
    <view class="success_withdraw">成功提现：{{userData.cash_finish}}</view>
  </view>
</view>
<view class="data">
  <view class="data_item">
    <view class="data_title">累计佣金</view>
    <view class="data_num">{{userData.cash_finish+userData.share_finish}}</view>
    <view class="data_tips">所有佣金</view>
  </view>
  <view class="data_item">
    <view class="data_title">已申请佣金</view>
    <view class="data_num">{{userData.cash_wait}}</view>
    <view class="data_tips">待审核的佣金</view>
  </view>
</view>
<view class="tips">
  <view class="tips_content">买家确认收货后，立即获得分销佣金。结算期（7天）后，佣金可提现。结算期内，买家退货佣金将自动扣除。</view>
  <view class="ps">注意：可用佣金满<text style="color: red">1</text>元后才能申请提现</view>
</view>
<view class="btn_box">
  <button disabled="{{userData.share_finish < 1}}" catchtap="showWithdraw" data-attr="content">我要提现</button>
</view>

<block wx:if="{{withdrawFlag}}">
  <view class="mask" bindtap="showWithdraw">
    <view class="withdraw_wrapper" data-attr="content">
      <view class="title" data-attr="content">请输入您的提现信息</view>
      <view class="withdraw_money" data-attr="content">
        <input placeholder-style="gray" placeholder="姓名" 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="开户行" 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="银行卡号" 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="提现金额" 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}}">提交</button>
    </view>
  </view>
</block>