SetMeal.wxml 2.69 KB
<wxs src="./marketing.wxs" module="marketing" />
<popup show="{{ show }}" title="选择套餐" bindconfirm="confirm" bindcancel="cancel">
  <view class="coupon-box">
    <search-input bindsearch="searchGoods" />
    <scroll-view class="set-meal" scroll-y  show-scrollbar="{{false}}" enhanced="{{true}}">
      <view class="sign-text">
        套餐
        <text>丨建议价</text>
      </view>
      <block wx:if="{{goodsList.length}}">
        <view class="goods-item" wx:for="{{ goodsList }}" wx:key=" {{item.packageGoods.packageCode}}">
          <view class="item-hd">
            <view class="icon" catchtap="choose" data-index="{{ index }}">
              <block wx:if="{{ item.active }}">
                <image src="/components/images/radio.png" />
              </block>
              <block wx:else>
                <view class="arc" />
              </block>
            </view>
            <!-- <checkbox value="{{item.packageCode}}" active="{{item.active}}" /> -->
            <view class="packageName-wrap" catchtap="choose" data-index="{{ index }}">
              <view class="packageName">{{item.packageGoods.packageAlias||item.packageGoods.packageName}}</view>
              <image wx:if="{{ marketing.isMarketingActive(item) }}" class="marketing-icon" src="/tabWorkOrder/images/activeIcon.png" mode="aspectFit" />
            </view>
            <block wx:if="{{ !item.active }}">
              <view class="total-price">¥{{item.packageGoods.upgradePrice}}</view>
            </block>
            <view class="control" wx:else>
              <view class="minus" catchtap="addCount" data-count="{{ -1 }}" data-index="{{ index }}" data-item="{{ item }}">-</view>
              <input type="number" catchtap="noScroll" class="input" value="{{ item.count || 1 }}" catchinput="input" data-index="{{ index }}" />
              <view class="add" catchtap="addCount" data-count="{{ 1 }}" data-index="{{ index }}" data-item="{{ item }}">+</view>
            </view>
          </view>
          <view class="item-bd" catchtap="choose"  data-index="{{ index }}">
            <view class="upgrade-item" wx:for="{{ item.packageGoods.goodsList }}" wx:for-item="i" wx:for-index="ind">
              <view class="dot"></view>
              <view class="name">{{i.goodsAlias||i.upgradeGoodsAlias||i.upgradeGoodsName}}</view>
              <view class="price">¥{{i.sellPrice}}</view>
            </view>
          </view>
        </view>
      </block>

      <block wx:else>
        <view class="nothing">暂无数据</view>
      </block>
    </scroll-view>
    <view class="select-text">
      已选套餐
      <view class="number">{{selectDataTotal || 0}}</view>
      件
    </view>
    <view class="safeAreaInset"></view>
  </view>
</popup>