<view class="reward_queue">
  <view class="reward_header">
    <view class="header_box">
      <view class="img">
        <image src="{{avatar}}" mode="aspectFit|aspectFill|widthFix" />
      </view>
      <view class="head_name">
        <text class="span">{{nickname}}</text>
      </view>
    </view>
    <view class="reward_box">
      <view class="reward_a ul">
        <view class="li">
          <text class="span">{{language['money']}}</text>
          {{summarizing.finish_total}}
        </view>
        <view class="li">累计奖励</view>
      </view>
      <view class="reward_b ul">
        <view class="li">
          <text class="span">{{language['money']}}</text>
          {{summarizing.surplus_total}}
        </view>
        <view class="li">待奖励</view>
      </view>
      <view class="reward_c ul" catchtap="toDetail">
        <view class="li">
          查看详情
          <van-icon name="arrow" class="fa fa-angle-right"></van-icon>
        </view>
      </view>
    </view>
  </view>
  <view class="queue_content">
    <van-tabs active="{{ active }}" tab-active-class="ative" bind:change="handleClick1">
      <van-tab title="奖励队列">
        <view class="tabs_b" wx:if="{{chooseName === 'queue'}}">
          <van-tabs active="{{ active }}" tab-active-class="ative" bind:change="handleClick">
            <van-tab title="{{'商品（'+summarizing.goods_queue_count+'）'}}">
              <view class="queue_box" wx:for="{{rewardList}}" wx:key="index">
                <view class="queue_a">
                  <text class="span">奖励队列：{{item.id}}</text>
                </view>
                <view class="queue_b">
                  <view class="queue_top">
                    <view class="img">
                      <image src="{{item.source_thumb}}" mode="aspectFit|aspectFill|widthFix" />
                    </view>
                    <text class="span">{{item.source_name}}</text>
                    <button class="btn_a" wx:if="{{item.button.lucky_draw}}" data-item="{{item}}" catchtap="luckyDraw">
                      {{item.button.lucky_draw.name}}
                    </button>
                  </view>
                  <view class="queue_center">
                    <view class="reward_queue_a ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_total}}
                      </view>
                      <view class="li">奖励金额</view>
                    </view>
                    <view class="reward_queue_b ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_finish}}
                      </view>
                      <view class="li">已奖励</view>
                    </view>
                    <view class="reward_queue_c ul">
                      <view class="li">{{item.status_name}}</view>
                    </view>
                  </view>
                </view>
                <view class="queue_c" wx:if="{{!item.show}}" data-item="{{item}}" catchtap="showComplete">
                  <text class="span">展示完整信息</text>
                  <icon class="iconfont icon-down"></icon>
                </view>
                <view name="fade">
                  <view class="button_box " wx:if="{{item.show}}">
                    <view class="queue_c_down ul">
                      <view class="li">
                        <text class="span">订单编号</text>
                        <text class="span">{{item.order_sn}}</text>
                      </view>
                      <view class="li">
                        <text class="span">实付款</text>
                        <text class="span">{{language['money']}}{{item.price}}</text>
                      </view>
                      <view class="li">
                        <text class="span">奖励比例：</text>
                        <text class="span" class="span" n>{{item.ratio}}</text>
                      </view>
                    </view>
                    <view class="queue_bottom">
                      <button wx:if="{{item.button.exchange}}" data-item="{{item}}" class="button_side" catchtap="exchange">
                        {{item.button.exchange.name}}
                      </button>
                      <button wx:if="{{item.button.process}}" data-item="{{item}}" class="button_side" catchtap="toProcess">
                        {{item.button.process.name}}
                      </button>
                      <button wx:if="{{item.button.exchange_log}}" data-item="{{item}}" class="button_side" catchtap="exchangeLog">
                        {{item.button.exchange_log.name}}
                      </button>
                    </view>
                  </view>
                </view>
              </view>
            </van-tab>
            <van-tab title="{{'门店（'+summarizing.store_queue_count+'）'}}">
              <view class="queue_box" wx:for="{{rewardList}}" wx:key="index">
                <view class="queue_a">
                  <text class="span">奖励队列：{{item.id}}</text>
                </view>
                <view class="queue_b">
                  <view class="queue_top">
                    <view class="img">
                      <image src="{{item.source_thumb}}" mode="aspectFit|aspectFill|widthFix" />
                    </view>
                    <text class="span">{{item.source_name}}</text>
                    <button class="btn_a" wx:if="{{item.button.lucky_draw}}" data-item="{{item}}" catchtap="luckyDraw">
                      {{item.button.lucky_draw.name}}
                    </button>
                  </view>
                  <view class="queue_center">
                    <view class="reward_queue_a ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_total}}
                      </view>
                      <view class="li">奖励金额</view>
                    </view>
                    <view class="reward_queue_b ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_finish}}
                      </view>
                      <view class="li">已奖励</view>
                    </view>
                    <view class="reward_queue_c ul">
                      <view class="li">{{item.status_name}}</view>
                    </view>
                  </view>
                </view>
                <view class="queue_c" wx:if="{{!item.show}}" data-item="{{item}}" catchtap="showComplete">
                  <text class="span">展示完整信息</text>
                  <icon class="iconfont icon-down"></icon>
                </view>
                <transition name="fade">
                  <view class="button_box" wx:if="{{item.show}}">
                    <view class="queue_c_down ul">
                      <view class="li">
                        <text class="span">订单编号</text>
                        <text class="span">{{item.order_sn}}</text>
                      </view>
                      <view class="li">
                        <text class="span">实付款</text>
                        <text class="span">{{language['money']}}{{item.price}}</text>
                      </view>
                      <view class="li">
                        <text class="span">奖励比例：</text>
                        <text class="span">{{item.ratio}}</text>
                      </view>
                    </view>
                    <view class="queue_bottom">
                      <button wx:if="{{item.button.exchange}}" data-item="{{item}}" class="button_side" catchtap="exchange">
                        {{item.button.exchange.name}}
                      </button>
                      <button wx:if="{{item.button.process}}" data-item="{{item}}" class="button_side" catchtap="toProcess">
                        {{item.button.process.name}}
                      </button>
                      <button wx:if="{{item.button.exchange_log}}" data-item="{{item}}" class="button_side" catchtap="exchangeLog">
                        {{item.button.exchange_log.name}}
                      </button>
                    </view>
                  </view>
                </transition>
              </view>
            </van-tab>
            <van-tab title="{{'收银台（'+summarizing.cashier_queue_count+'）'}}">
              <view class="queue_box" wx:for="{{rewardList}}" wx:key="index">
                <view class="queue_a">
                  <text class="span">奖励队列：{{item.id}}</text>
                </view>
                <view class="queue_b">
                  <view class="queue_top">
                    <view class="img">
                      <image src="{{item.source_thumb}}" mode="aspectFit|aspectFill|widthFix" />
                    </view>
                    <text class="span">{{item.source_name}}</text>
                    <button class="btn_a" wx:if="{{item.button.lucky_draw}}" data-item="{{item}}" catchtap="luckyDraw">
                      {{item.button.lucky_draw.name}}
                    </button>
                  </view>
                  <view class="queue_center">
                    <view class="reward_queue_a ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_total}}
                      </view>
                      <view class="li">奖励金额</view>
                    </view>
                    <view class="reward_queue_b ul">
                      <view class="li">
                        <text class="span">{{language['money']}}</text>
                        {{item.amount_finish}}
                      </view>
                      <view class="li">已奖励</view>
                    </view>
                    <view class="reward_queue_c ul">
                      <view class="li">{{item.status_name}}</view>
                    </view>
                  </view>
                </view>
                <view class="queue_c" wx:if="{{!item.show}}" data-item="{{item}}" catchtap="showComplete">
                  <text class="span">展示完整信息</text>
                  <icon class="iconfont icon-down"></icon>
                </view>
                <transition name="fade">
                  <view class="button_box" wx:if="{{item.show}}">
                    <view class="queue_c_down ul">
                      <view class="li">
                        <text class="span">订单编号</text>
                        <text class="span">{{item.order_sn}}</text>
                      </view>
                      <view class="li">
                        <text class="span">实付款</text>
                        <text class="span">{{language['money']}}{{item.price}}</text>
                      </view>
                      <view class="li">
                        <text class="span">奖励队列：</text>
                        <text class="span">{{item.id}}</text>
                      </view>
                    </view>
                    <view class="queue_bottom">
                      <button wx:if="{{item.button.exchange}}" data-item="{{item}}" class="button_side" catchtap="exchange">
                        {{item.button.exchange.name}}
                      </button>
                      <button wx:if="{{item.button.process}}" data-item="{{item}}" class="button_side" catchtap="toProcess">
                        {{item.button.process.name}}
                      </button>
                      <button wx:if="{{item.button.exchange_log}}" data-item="{{item}}" class="button_side" catchtap="exchangeLog">
                        {{item.button.exchange_log.name}}
                      </button>
                    </view>
                  </view>
                </transition>
              </view>
            </van-tab>
          </van-tabs>
        </view>
      </van-tab>
      <van-tab title="奖励记录">
        <view class="queue_box" wx:if="{{chooseName === 'record'}}" wx:for="{{rewardList}}" wx:key="index">
          <view class="queue_a">
            <text class="span">奖励队列：{{item.queue_id}}</text>
          </view>
          <view class="queue_b">
            <view class="queue_top">
              <view class="img">
                <image src="{{item.source_thumb}}" mode="aspectFit|aspectFill|widthFix" />
              </view>
              <text class="span">{{item.source_name}}</text>
              <text class="span" class="money">{{language['money']}}{{item.amount}}</text>
            </view>
            <view class="queue_center">
              <view class="reward_queue_a ul">
                <view class="li">
                  <text class="span">{{language['money']}}</text>
                  {{item.amount_finish}}
                </view>
                <view class="li">已奖励金额</view>
              </view>
              <view class="reward_queue_b ul">
                <view class="li">
                  <text class="span">{{language['money']}}</text>
                  {{item.amount_surplus}}
                </view>
                <view class="li">未奖励金额</view>
              </view>
              <view class="reward_queue_c ul">
                <view class="li">{{item.status_name}}</view>
              </view>
            </view>
          </view>
          <view class="queue_c" wx:if="{{!item.show}}" data-item="{{item}}" catchtap="showComplete">
            <text class="span">展示完整信息</text>
            <icon class="iconfont icon-down"></icon>
          </view>
          <transition name="fade">
            <view class="queue_c_down ul" wx:if="{{item.show}}">
              <view class="li">
                <text class="span">订单编号</text>
                <text class="span">{{item.order_sn}}</text>
              </view>
              <view class="li">
                <text class="span">实付款</text>
                <text class="span">{{language['money']}}{{item.price}}</text>
              </view>
              <view class="li">
                <text class="span">奖励比例：</text>
                <text class="span">{{item.ratio}}</text>
              </view>
            </view>
          </transition>
        </view>
      </van-tab>
    </van-tabs>
  </view>
  <!-- 兑换类型弹窗 -->
  <van-popup show="{{show3}}" position="bottom" bind:click-overlay="leaveOut" custom-style="height:60%;">
    <view class="queue_type">
      <view class="h1">兑换类型</view>
      <view class="selete ul">
        <view class="li">兑换类型：</view>
        <view class="li">
          <input type="text" value="{{convertType}}" disabled placeholder="请选择" />
        </view>
      </view>
      <view class="type ul" wx:if="{{typeData.modules}}">
        <view class="li" wx:if="{{typeData.modules.love}}" data-love="{{typeData.modules.love}}" catchtap="chooseType">
          <text class="span">{{typeData.modules.love.name}}</text>
          <text class="{{convertTypeId===2 ? 'circle choose':'circle'}} span"></text>
        </view>
        <view class="li" wx:if="{{typeData.modules.point}}" data-point="{{typeData.modules.point}}" catchtap="chooseType">
          <text class="span">{{typeData.modules.point.name}}</text>
          <text class="span" class="{{convertTypeId===1 ? 'circle choose':'circle'}}"></text>
        </view>
      </view>
      <view class="queue_info ul">
        <view class="li">可用兑换金额：{{typeData.exchange_amount}}{{language['元']}}</view>
        <view class="li" wx:if="{{convertType}}">当前兑换比例：1{{language['元']}}={{convertTypeUnit}}{{convertType}}</view>
        <view class="li" wx:if="{{convertType}}">
          可兑换：{{convertTypeExchange_count}}{{convertType}}
        </view>
      </view>
      <button class="queue_btn" catchtap="SureExchange">确认兑换</button>
    </view>
  </van-popup>
  <!-- end -->
  <!-- 抽奖弹窗 -->
  <van-popup show="{{show1}}" bind:click-overlay="sureTakere" position="bottom" custom-style="height:60%;" style="-webkit-box-flex: 1;flex: 1;position: relative; overflow-y: auto;">
    <view class="prize_box">
      <view class="h1">抽奖提示</view>
      <view class="prize_content ul">
        <view class="li">当前默认奖励比例：{{chooseRatio}}。</view>
        <view class="li">如果您使用抽奖权益，最终奖励比例将以抽奖结
            果为准，可能高于、也可能低于默认奖励比例！</view>
      </view>
      <view class="prize_btn">
        <button catchtap="sureTake">确认抽奖</button>
        <button catchtap="sureTakere">取消</button>
      </view>
    </view>
  </van-popup>
  <!-- end -->
  <!-- 抽奖弹窗2 -->
  <van-popup show="{{show2}}" position="bottom" custom-style="height:60%;">
    <view class="prize_box">
      <view class="h1">抽奖结果</view>
      <view class="prize_content ul">
        <view class="li">{{msg}}</view>
      </view>
      <button class="ture_btn" catchtap="show2 = false">确认</button>
    </view>
  </van-popup>
  <!-- end -->
  <!-- 查看兑换记录弹窗 -->
  <van-popup show="{{show4}}" position="bottom" custom-style="height:60%;">
    <view class="reward_record" wx:if="{{exchangeLogs.exchange_amount}}">
      <view class="h1">兑换记录</view>
      <view class="ul">
        <view class="li">兑换金额:{{exchangeLogs.exchange_amount}}</view>
        <view class="li">兑换比例:{{exchangeLogs.exchange_unit}}</view>
        <view class="li">兑换:{{exchangeLogs.exchange_count}}</view>
      </view>
      <button class="button" catchtap="endReward">关闭</button>
    </view>
  </van-popup>
  <!-- end -->
</view>
<!-- <shopfoot></shopfoot> -->
