shoppingCartProductCell.wxml 6.33 KB

<view class="commonProductCellContainer">
  <block tt:if="{{data.item.promotion_list.length}}">
    <view class="promotionViewContainer">
      <block tt:for="{{data.item.promotion_list}}" tt:for-item="promotionItem" tt:for-index="promotionIndex" tt:key="{{promotionIndex}}">
        <view class="promotionCell" data-promotion-item="{{promotionItem}}"  bindtap="shoppingCartProductAction" data-identifier="navToPromotionPage" tt:if="{{promotionIndex == 0 || data.item.isPromotionExpanded}}">
          <view class='promotionTitleContainer'>
            <view class='viewCenterStyle'>
              <image class="promotionIcon" src="../../../images/shoppingcart_promotion_icon@2x.png"></image>
            </view>
            <view class="promotionDesc">{{promotionItem.promotion_desc}}</view>
          </view>
          <view class='promotionRightContainer'>
            <view class="{{subPromotionItem.seldoutStyle ? 'statuString' : 'statuStringSeldOut'}}" tt:if="{{promotionItem.statuString.length > 0}}">{{promotionItem.statuString}}</view>
            <view class='viewCenterStyle'>
              <image class="rightArrow" src="../../../images/goodslist_screen_right_icon@2x.png"></image>
            </view>
          </view>
        </view>
      </block>
      <block tt:if="{{data.item.promotion_list.length > 1}}">
        <view class="promotioMoreArrowContainer" bindtap="shoppingCartProductAction" data-identifier="flexOrUnflexPromotion" data-type="{{data.index}}">
          <image class="promotioMoreArrow" tt:if="{{!data.item.isPromotionExpanded}}" src="../../../images/promotionDown@2x.png"></image>
          <image class="promotioMoreArrow" tt:if="{{data.item.isPromotionExpanded}}" src="../../../images/promotionUp@2x.png"></image>
        </view>
      </block>
    </view>
    <view class='sepLineStyle'>
    </view>
  </block>
  <block tt:if="{{data.item.sub_pool.length}}">
    <block tt:for="{{data.item.sub_pool}}" tt:for-item="subPoolItem" tt:for-index="subPoolIndex" tt:key="{{subPoolIndex}}">
      <block tt:for="{{subPoolItem.promotion_list}}" tt:for-item="subPromotionItem" tt:for-index="subPromotionIndex" tt:key="{{subPromotionIndex}}">
        <view class='cellLine' tt:if="{{subPoolIndex > 0}}">
        </view>
        <view class="subPromotionCell" data-promotion-item="{{subPromotionItem}}" bindtap="shoppingCartProductAction" data-identifier="navToPromotionPage" tt:if="{{subPromotionIndex == 0 || subPromotionItem.isPromotionExpanded}}">
          <view class='promotionTitleContainer'>
            <view style="flex-shrink: 0;">
              <view class="subPromotionTypeString">{{subPromotionItem.typeString}}</view>
            </view>
            <view class="promotionDesc">{{subPromotionItem.promotion_desc}}</view>
          </view>
          <view class='promotionRightContainer'>
            <view class="{{subPromotionItem.seldoutStyle ? 'statuString' : 'statuStringSeldOut'}}" tt:if="{{subPromotionItem.statuString.length > 0}}">{{subPromotionItem.statuString}}</view>
            <view class='viewCenterStyle'>
              <image class="rightArrow" src="../../../images/goodslist_screen_right_icon@2x.png"></image>
            </view>
          </view>
        </view>
      </block>
      <block tt:for="{{subPoolItem.goods_list}}" tt:for-item="subPoolGoodsItem" tt:key="{{index}}">
        <view class="cellLine" tt:if="{{subPoolIndex > 0 || (subPoolItem.promotion_list.length > 0)}}">
        </view>

        <view class="poolGoodCellContainer">          
          <shoppingCartOneProductCell data="{{{goodsItem:subPoolGoodsItem, isEditing:data.isEditing, deleteAnimation:data.deleteAnimation, tempSku:data.tempSku}}}"  bindshoppingCartProductAction="shoppingCartProductAction" bindmoveStart="moveStart" bindmoveEnd="moveEnd">
          </shoppingCartOneProductCell>
        </view>
      </block>
    </block>
  </block>
  <block tt:if="{{data.item.pool_type == 3 && data.item.pool_batch_no}}">
    <view class='bundleHeaderView'>
      <view class='titleContainer'>
        <view class='leftTitleContainer'>
          <image bindtap="shoppingCartProductAction" data-identifier="tapBundleProductHeader" data-bundledata='{{item}}' class='selectStatusImage' src="{{data.item.selected == 'Y' ? '../../../images/gwc_choose@2x.png' : '../../../images/gwc_n@2x.png'}}"></image>
          <view class='bundleFirstTitle'>优惠套装</view>
          <view class='bundleTitle'>{{data.item.pool_title}}</view>
        </view>
        <view tt:if="{{!data.isEditing}}" class='bundleBuyNumbText'>x {{data.item.pool_buy_number}}</view>
      </view>
      <view tt:if="{{data.isEditing}}" class='editNumberContainer'>
        <view class='bundleEidtLeftContainer'>
          <view class='bundleNumber'>套餐数量</view>
          <view class='bundleEidtView'>
            <view class='reduceActionBtn' bindtap='{{data.item.int_pool_buy_number > 1 ? "shoppingCartProductAction" : ""}}' data-identifier="bundleReduceTap" data-item='{{data.item}}'>
              <image class='reduceImage' src='{{data.item.int_pool_buy_number > 1 ? "../../../images/jian_h@2x.png" : "../../../images/jian_disable@2x.png"}}'></image>
            </view>
            <view class='buyNumberActionText'>
              <view class='currentNumber'>{{data.item.pool_buy_number}}</view>
            </view>
            <view class='addActionBtn' bindtap='{{data.item.int_pool_buy_number < data.item.int_pool_storage_number ? "shoppingCartProductAction" : ""}}'  data-identifier="bundleAddTap" data-item='{{data.item}}'>
              <image class='addImage' src='{{data.item.int_pool_buy_number < data.item.int_pool_storage_number ? "../../../images/and_normal@2x.png" : "../../../images/and_h@2x.png"}}'></image>
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class='sepLineStyle'>
    </view>
  </block>
  <block tt:if="{{data.item.goods_list.length}}">
    <block tt:for="{{data.item.goods_list}}" tt:for-item="goodsItem" tt:key="{{index}}">

      <view class='cellLine' tt:if="{{index> 0}}">
      </view>
      <view class="poolGoodCellContainer">
      <shoppingCartOneProductCell data="{{{goodsItem, isEditing:data.isEditing, deleteAnimation:data.deleteAnimation, tempSku:data.tempSku}}}" bindshoppingCartProductAction="shoppingCartProductAction" bindmoveStart="onMoveStart" bindmoveEnd="onMoveEnd"></shoppingCartOneProductCell>
      </view>
    </block>
  </block>
  <view class="bottonGray"></view>
</view>