<!-- 分销员等级 -->
<!--pages/salesmanLevel/salesmanLevel.wxml-->

<!-- 头部等级展示 -->
<view class="top-wrapper">
  <view class="toplevelshow">
    <view class="level-txt">{{levelName}}</view>


    <view class="level-progress">
      <view class=" {{wxs.indexof(index+1)}} {{level == index ? 'current-level' : ''}} level-block"  wx:for="{{levelInfo}}" wx:key="index" data-index="{{index}}" bindtap="clinkLevel">
        <view class="square-block {{clickLevel == index ? 'current-bg' : ''}}" ></view>
        <view class="level-block-txt {{clickLevel == index ? 'current-color' : ''}}">{{item.name}}</view>
      </view>
    </view>
  </view>

</view>

<!-- 等级规则 -->
<view class="rules-wrapper">
  <view class="riles-title">
    <view class="horizontal"></view>
    <view class="riles-title-txt">等级规则</view>
    <view class="horizontal"></view>
  </view>

  <view class="introduction-rules {{clickLevel == index  ? 'current-rules':''}}" wx:for="{{levelInfo}}" wx:for-item="rank" wx:key="index">
    <view class="intro-level-tit"><view class="salesman" >{{rank.name}}</view></view>
    <view class="intron-rule">
      <view class="rule-desc-tit">
        <view class="intro-icon"><image src="../../images/icon/inviolable-rights.png"></image></view>
        <view class="intro-title">升级规则介绍</view>
      </view>

      <view class="condition-box">
        <view class="condition">
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.addupAmount}}"><view class="triangle"></view> 累计收益达到<text> ￥{{wxs.toPrice(rank.distributionLevelConditionDataVO.addupAmount)}}</text></view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.boundCustomers}}"><view class="triangle"></view> 绑定客户数量达到<text> {{rank.distributionLevelConditionDataVO.boundCustomers}} </text>人</view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.invitedVeeker}}"><view class="triangle"></view> 累计邀请分销员数量达到<text> {{rank.distributionLevelConditionDataVO.invitedVeeker}} </text>人</view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.invitedCustomers}}"><view class="triangle"></view> 累计邀请客户数量达到<text> {{rank.distributionLevelConditionDataVO.invitedCustomers}} </text>人</view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.payNumber}}"><view class="triangle"></view> 累计支付成功单数<text> {{rank.distributionLevelConditionDataVO.payNumber}} </text>笔</view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.sumOfConsumption}}"><view class="triangle"></view> 累计消费金额达到<text> ￥{{wxs.toPrice(rank.distributionLevelConditionDataVO.sumOfConsumption)}} </text></view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.successOrderNumber}}"><view class="triangle"></view> 累计成交订单达到<text> {{rank.distributionLevelConditionDataVO.successOrderNumber}} </text>笔</view>
          <view class="intro-detailed" wx:if="{{rank.levelSetConditionsSwitch.successTradingVolume}}"><view class="triangle"></view> 累计成交金额达到<text> ￥{{wxs.toPrice(rank.distributionLevelConditionDataVO.successTradingVolume)}} </text></view>
        </view>
      </view>

      <view class="buyprod" wx:if="{{rank.levelSetConditionsSwitch.commodity}}">
        <view class="buy-tit"><view class="triangle"></view> 购买指定商品</view>
        <view class="prod-msg" bindtap="toProdPage"  data-prodid="{{prod.prodId}}" wx:for="{{rank.distributionLevelConditionDataVO.commodity}}" wx:for-item="prod" wx:key="index">
          <view class="prod-img"><image src="{{prod.pic}}"></image></view>
          <view class="prod-name">
            <view class="prod-name-txt">
              {{prod.prodName}}
            </view>
          </view>
        </view>
      </view>
    </view>
    

  </view>

</view>

<!-- 立即升级 -->
<view class="upgrade-now" bindtap="applicationUpgrade" wx:if="{{clickLevel ==  level+1}}">
  <view class="upgrade">立即升级</view>
</view>


<wxs module="wxs" src="../../wxs/number.wxs" />


