index.wxml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <wxs module="order" src="./order.wxs" />
  2. <wxs module="handleInvoice" src="./handleInvoice.wxs" />
  3. <wxs module="getNotes" src="./getNotes.wxs" />
  4. <view class="order-sure" wx:if="{{!loading}}">
  5. <address-card addressData="{{userAddress}}" bind:addclick="onGotoAddress" bind:addressclick="onGotoAddress" />
  6. <view
  7. class="order-wrapper"
  8. wx:for="{{settleDetailData.storeGoodsList}}"
  9. wx:for-item="stores"
  10. wx:for-index="storeIndex"
  11. wx:key="storeIndex"
  12. >
  13. <view class="store-wrapper">
  14. <t-icon prefix="wr" size="40rpx" color="#333333" name="store" class="store-logo" />
  15. {{stores.storeName}}
  16. </view>
  17. <view
  18. wx:if="{{orderCardList[storeIndex].goodsList.length > 0}}"
  19. wx:for="{{orderCardList[storeIndex].goodsList}}"
  20. wx:for-item="goods"
  21. wx:for-index="gIndex"
  22. wx:key="id"
  23. class="goods-wrapper"
  24. >
  25. <t-image src="{{goods.thumb}}" t-class="goods-image" mode="aspectFill" />
  26. <view class="goods-content">
  27. <view class="goods-title">{{goods.title}}</view>
  28. <view>{{goods.specs}}</view>
  29. </view>
  30. <view class="goods-right">
  31. <price wr-class="goods-price" price="{{goods.price}}" fill="{{true}}" decimalSmaller />
  32. <view class="goods-num">x{{goods.num}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="pay-detail">
  37. <view class="pay-item">
  38. <text>商品总额</text>
  39. <price
  40. fill
  41. decimalSmaller
  42. wr-class="pay-item__right font-bold"
  43. price="{{settleDetailData.totalSalePrice || '0'}}"
  44. />
  45. </view>
  46. <view class="pay-item">
  47. <text>运费</text>
  48. <view class="pay-item__right font-bold">
  49. <block wx:if="{{settleDetailData.totalDeliveryFee && settleDetailData.totalDeliveryFee != 0}}">
  50. +
  51. <price fill decimalSmaller price="{{settleDetailData.totalDeliveryFee}}" />
  52. </block>
  53. <text wx:else>免运费</text>
  54. </view>
  55. </view>
  56. <view class="pay-item">
  57. <text>活动优惠</text>
  58. <view class="pay-item__right primary font-bold">
  59. -
  60. <price fill price="{{settleDetailData.totalPromotionAmount || 0}}" />
  61. </view>
  62. </view>
  63. <view class="pay-item">
  64. <text>优惠券</text>
  65. <view
  66. class="pay-item__right"
  67. data-storeid="{{settleDetailData.storeGoodsList[0].storeId}}"
  68. catchtap="onOpenCoupons"
  69. >
  70. <block wx:if="{{submitCouponList.length}}">
  71. <block wx:if="{{settleDetailData.totalCouponAmount && settleDetailData.totalCouponAmount !== '0'}}">
  72. -<price fill decimalSmaller price="{{settleDetailData.totalCouponAmount}}" />
  73. </block>
  74. <block wx:else>选择优惠券</block>
  75. </block>
  76. <text wx:else>无可用</text>
  77. <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" />
  78. </view>
  79. </view>
  80. <view class="pay-item" wx:if="{{settleDetailData.invoiceSupport}}">
  81. <text>发票</text>
  82. <view class="pay-item__right" catchtap="onReceipt">
  83. <text>{{handleInvoice(invoiceData)}}</text>
  84. <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" />
  85. </view>
  86. </view>
  87. <view class="pay-item">
  88. <text>订单备注</text>
  89. <view class="pay-item__right" data-storenoteindex="{{0}}" catchtap="onNotes">
  90. <text class="pay-remark"
  91. >{{getNotes(storeInfoList, 0) ? getNotes(storeInfoList, 0) :'选填,建议先和商家沟通确认'}}</text
  92. >
  93. <t-icon name="chevron-right" size="32rpx" color="#BBBBBB" />
  94. </view>
  95. </view>
  96. </view>
  97. <view class="amount-wrapper">
  98. <view class="pay-amount">
  99. <text class="order-num">共{{settleDetailData.totalGoodsCount}}件</text>
  100. <text>小计</text>
  101. <price class="total-price" price="{{settleDetailData.totalPayAmount}}" fill="{{false}}" decimalSmaller />
  102. </view>
  103. </view>
  104. <view class="wx-pay-cover">
  105. <view class="wx-pay">
  106. <price decimalSmaller fill class="price" price="{{settleDetailData.totalPayAmount || '0'}}" />
  107. <view class="submit-btn {{ settleDetailData.settleType === 1 ? '':'btn-gray'}}" bindtap="submitOrder">
  108. 提交订单
  109. </view>
  110. </view>
  111. </view>
  112. <t-dialog
  113. t-class="add-notes"
  114. title="填写备注信息"
  115. visible="{{dialogShow}}"
  116. confirm-btn="确认"
  117. cancel-btn="取消"
  118. t-class-content="add-notes__content"
  119. t-class-confirm="dialog__button-confirm"
  120. t-class-cancel="dialog__button-cancel"
  121. bindconfirm="onNoteConfirm"
  122. bindcancel="onNoteCancel"
  123. >
  124. <t-textarea
  125. slot="content"
  126. focus="{{dialogShow}}"
  127. class="notes"
  128. t-class="add-notes__textarea"
  129. value="{{storeInfoList[storeNoteIndex] && storeInfoList[storeNoteIndex].remark}}"
  130. placeholder="备注信息"
  131. t-class-textarea="add-notes__textarea__font"
  132. bindfocus="onFocus"
  133. bindblur="onBlur"
  134. bindchange="onInput"
  135. maxlength="{{50}}"
  136. />
  137. </t-dialog>
  138. <t-popup visible="{{popupShow}}" placement="bottom" bind:visible-change="onPopupChange">
  139. <no-goods slot="content" bind:change="onSureCommit" settleDetailData="{{settleDetailData}}" />
  140. </t-popup>
  141. <select-coupons
  142. bind:sure="onCoupons"
  143. storeId="{{currentStoreId}}"
  144. orderSureCouponList="{{couponList}}"
  145. promotionGoodsList="{{promotionGoodsList}}"
  146. couponsShow="{{couponsShow}}"
  147. />
  148. </view>
  149. <t-toast id="t-toast" />
  150. <t-dialog id="t-dialog" />