123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <import-sjs
- name="utils"
- from="./index.sjs"
- />
- <import-sjs
- name="checkUtils"
- from="../mall-shopcar-button/index.sjs"
- />
- <import-sjs
- from="../utils-component/index.sjs"
- name="totalUtils"
- />
- <import-sjs
- from="../mall-index/index.sjs"
- name="carUtils"
- />
- <wrapper>
-
- <popup-container
- show="{{ popUpShow && globalCar.carts.length }}"
- title=""
- onClose="onClosePopup"
- disableScroll="{{globalCar.carts.length <= 4}}"
- >
-
- <view
- class="mall-car-popup-head"
- slot="header"
- >
- <am-checkbox
- ctrlChecked="{{utils.isCheckedAll(globalCar.carts || [])}}"
- onChange="checkedAllChange"
- />
- <view class="head-text">
- 全选(已选 {{utils.getCheckedNum(globalCar.carts || [])}} 件)
- </view>
- <view
- class="head-clear"
- onTap="clearCar"
- >
- <am-icon
- type="DeleteOutline"
- size="16"
- />
- <view class="head-clear-text">
- 清空
- </view>
- </view>
- </view>
- <view class="mall-car-container">
-
- <block a:for="{{globalCar.carts}}">
- <view
- key="{{'car'+item.skuId}}"
- class="car-item-container"
- >
- <view
- class="goods-item-checkbox"
- data-skuId="{{item.skuId}}"
- data-status="{{item.status}}"
- data-checkedState="{{item.checkedState}}"
- onTap="handelItemCheck"
- >
- <am-checkbox ctrlChecked="{{item.checkedState === 'Y'}}" />
- </view>
- <view class="car-goods-item">
- <goods-item
- targetId="#carBottomEnd"
- goodsItem="{{item}}"
- defaultNum="{{item.quantity}}"
- onItemChange="handelItemChange"
- showStock="{{item.stockStatus === 'Y'}}"
- showAuto="{{utils.isShowAuto(globalCar)}}"
- showBooking="{{item.userLimitType === 'BESPEAK' && !item.isbespeak}}"
- ></goods-item>
- </view>
- </view>
- </block>
- </view>
-
- <mall-footer-button
- a:if="{{showFlag && checkUtils.isOnlyDeliver(globalCar.carts)}}"
- selectNum="{{utils.getCheckedNum(globalCar.carts)}}"
- disCountTotalPrice="{{globalCar.disCountTotalPrice}}"
- totalPrice="{{globalCar.totalPrice}}"
- showTip="{{true}}"
- startDeliveryAmount="{{startDeliveryAmount}}"
- showColorCar="{{totalUtils.calcNumber(globalCar.disCountTotalPrice, globalCar.deliveryPackingFee || 0) >= startDeliveryAmount}}"
- buttonText="{{totalUtils.calcNumber(globalCar.disCountTotalPrice, globalCar.deliveryPackingFee || 0) >= startDeliveryAmount ? '去结算' : `差${totalUtils.calcNumber(startDeliveryAmount, totalUtils.calcNumber(globalCar.disCountTotalPrice, globalCar.deliveryPackingFee || 0), 'sub')}起送`}}"
- onConfirmClick="{{totalUtils.calcNumber(globalCar.disCountTotalPrice, globalCar.deliveryPackingFee || 0) >= startDeliveryAmount ? 'handelCreateOrder' : ''}}"
- />
- <mall-footer-button
- a:else
- selectNum="{{utils.getCheckedNum(globalCar.carts)}}"
- disCountTotalPrice="{{globalCar.disCountTotalPrice}}"
- totalPrice="{{globalCar.totalPrice}}"
- onConfirmClick="handelCreateOrder"
- />
- </popup-container>
-
- <popup-container
- show="{{ deliveryPopShow }}"
- title="选择结算商品"
- onClose="onClosePopup"
- backGroundColor="#f2f2f2"
- overFlow="unset"
- >
- <view
- class="choose-goods-header"
- slot="header"
- >选择结算商品
- <view class="choose-chancel-icon">
- <am-icon
- type="CloseOutline"
- size="15"
- onTap="cancelClick"
- />
- </view>
- </view>
- <view class="choose-goods-list">
- <deliver-card
- showFlag="{{showFlag}}"
- startDeliveryAmount="{{startDeliveryAmount}}"
- a:for="{{deliverTypeList}}"
- title="{{item.deliverType === 'SELF_PICK_UP_DELIVERY' ? '门店自提' : '发货速配'}}"
- item="{{item}}"
- itemIndex="{{index}}"
- isChecked="{{item.isChecked}}"
- onCheckBoxClick="onCheckBoxClick"
- />
- </view>
-
- <mall-footer-button
- a:if="{{showFlag && deliverTypeList[itemIndex].deliverType === 'DELIVERY_LOGISTICS' }}"
- selectNum="{{utils.getCheckedNum(deliverTypeList[itemIndex].carts)}}"
- disCountTotalPrice="{{deliverTypeList[itemIndex].disCountTotalPrice || 0}}"
- totalPrice="{{deliverTypeList[itemIndex].totalPrice || 0}}"
- packingFee="{{deliverTypeList[itemIndex].packingFee || 0}}"
- item="{{deliverTypeList[itemIndex]}}"
- showColorCar="{{deliverTypeList[itemIndex].canOrder}}"
- onConfirmClick="{{deliverTypeList[itemIndex].canOrder ? 'gotoCreateOrder' : ''}}"
- />
- <mall-footer-button
- a:else
- selectNum="{{utils.getCheckedNum(deliverTypeList[itemIndex].carts)}}"
- packingFee="{{deliverTypeList[itemIndex].packingFee || 0}}"
- disCountTotalPrice="{{deliverTypeList[itemIndex].disCountTotalPrice || 0}}"
- totalPrice="{{deliverTypeList[itemIndex].totalPrice || 0}}"
- onConfirmClick="gotoCreateOrder"
- showColorCar="{{!!deliverTypeList[itemIndex]}}"
- item="{{deliverTypeList[itemIndex]}}"
- />
- </popup-container>
- <member-car-popup
- a:if="{{memberItem && memberPopUpShow}}"
- memberItem="{{memberItem}}"
- onBtnClick="handleMemberBtnClick"
- memberPopUpShow="{{memberPopUpShow}}"
- onPopClose="onMemberPopClose"
- text={{text}}
- />
- </wrapper>
- <view>
- <slot></slot>
- </view>
|