submit-order.wxml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <!--pages/submit-order/submit-order.wxml-->
  2. <view class="container">
  3. <view class='submit-order'>
  4. <!-- 收货地址 -->
  5. <view class='delivery-addr ' bindtap='toAddrListPage'>
  6. <view class='addr-bg ' wx:if="{{!userAddr}}">
  7. <view class='add-addr'>
  8. <view class='plus-sign-img'>
  9. <image src='../../images/icon/plus-sign.png'></image>
  10. </view>
  11. <text>新增收货地址</text>
  12. </view>
  13. <view class='arrow empty'></view>
  14. </view>
  15. <view class='addr-bg whole' wx:if="{{userAddr}}">
  16. <view class='addr-icon'>
  17. <image src='../../images/icon/addr.png'></image>
  18. </view>
  19. <view class='user-info'>
  20. <text class='item'>{{userAddr.receiver}}</text>
  21. <text class='item'>{{userAddr.mobile}}</text>
  22. </view>
  23. <view class='addr'>{{userAddr.address}}{{userAddr.addressName}}{{userAddr.addrDetail}}</view>
  24. <view class='arrow'></view>
  25. </view>
  26. </view>
  27. <view class="shop-item" wx:for="{{shopCartOrders}}" wx:key="shopId" wx:for-item="shopCart">
  28. <!-- 店铺信息 -->
  29. <view class="shop-box">
  30. <view class="shop-icon">
  31. <image src="../../images/icon/shop.png"></image>
  32. </view>
  33. <view class="shop-name">{{shopCart.shopName}}</view>
  34. </view>
  35. <!-- /店铺信息 -->
  36. <!-- 店铺商品明细 -->
  37. <view class='prod-item'>
  38. <block wx:for="{{shopCart.shopCartItemDiscounts}}" wx:key='index' wx:for-item="shopCartItem">
  39. <view class="prod-block {{shopCartItem.chooseDiscountItemDto?'discount':''}}">
  40. <!-- 满减提示 -->
  41. <view class='discount-tips' hidden='{{!shopCartItem.chooseDiscountItemDto}}'>
  42. <text class='text-block'>{{wxs.parseDiscount(shopCartItem.chooseDiscountItemDto.discountRule)}}</text>
  43. <text class='text-list'>{{wxs.parseDiscountMsg(shopCartItem.chooseDiscountItemDto.discountRule,shopCartItem.chooseDiscountItemDto.needAmount,shopCartItem.chooseDiscountItemDto.discount)}}</text>
  44. <text class='text-list reduce-amount' wx:if="{{shopCartItem.chooseDiscountItemDto.reduceAmount > 0}}">已优惠 ¥{{wxs.parsePrice(shopCartItem.chooseDiscountItemDto.reduceAmount)[0]}}.{{wxs.parsePrice(shopCartItem.chooseDiscountItemDto.reduceAmount)[1]}}</text>
  45. </view>
  46. <block wx:for="{{shopCartItem.shopCartItems}}" wx:key='prodId'>
  47. <view class="item-box">
  48. <!-- 商品信息 -->
  49. <view class='item-cont'>
  50. <view class='prod-pic'>
  51. <image src='{{item.pic}}'></image>
  52. </view>
  53. <view class='prod-info'>
  54. <view class='prodname'>
  55. {{item.prodName}}
  56. </view>
  57. <view class='prod-info-cont'>{{item.skuName||''}}</view>
  58. <view class='price-nums'>
  59. <text class='prodprice'><text class='symbol'>¥</text>
  60. <text class='big-num'>{{wxs.parsePrice(item.price)[0]}}</text>
  61. <text class='small-num'>.{{wxs.parsePrice(item.price)[1]}}</text></text>
  62. <text class="prodcount">×{{item.prodCount}}</text>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </block>
  68. </view>
  69. </block>
  70. <!-- <view class='total-num'>
  71. <text class="prodcount">共{{totalCount}}件商品</text>
  72. <view class='prodprice'>合计:
  73. <text class='symbol'>¥</text>
  74. <text class='big-num'>{{wxs.parsePrice(total)[0]}}</text>
  75. <text class='small-num'>.{{wxs.parsePrice(total)[1]}}</text>
  76. </view>
  77. </view> -->
  78. </view>
  79. <!-- /店铺商品明细 -->
  80. <!-- 店铺优惠券和买家留言 -->
  81. <!-- <view class='order-msg'>
  82. <view class='msg-item'>
  83. <view class='item coupon' bindtap='showCouponPopup' data-index="{{index}}">
  84. <text class='item-tit'>优惠券:</text>
  85. <text class='coupon-btn' wx:if="{{!shopCart.shopCoupons.canUseLength}}">暂无可用</text>
  86. <text class='coupon-btn' wx:else>{{shopCart.shopCoupons.canUseLength}}张可用</text>
  87. <text class="coupon-amount" wx:if="{{shopCart.shopCoupons.couponAmount>0}}"><text class='symbol'>-¥</text>{{wxs.toPrice(shopCart.shopCoupons.couponAmount)}}</text>
  88. <text class='arrow'></text>
  89. </view>
  90. <view class='item'>
  91. <text>订单备注:</text>
  92. <input placeholder='选填,给商家留言' value="{{remarks}}" data-index="{{index}}" bindinput="onRemarkIpt"></input>
  93. </view>
  94. </view>
  95. </view> -->
  96. <!-- /店铺优惠券和买家留言 -->
  97. </view>
  98. <!-- 总金额计算 -->
  99. <view class='order-msg'>
  100. <view class='msg-item'>
  101. <!-- 平台优惠券 -->
  102. <!-- <view class='item coupon' bindtap='showCouponPopup' data-index="-1">
  103. <text class='item-tit'>平台优惠券:</text>
  104. <text class='coupon-btn' wx:if="{{!platformCoupons.canUseLength}}">暂无可用</text>
  105. <text class='coupon-btn' wx:else>{{platformCoupons.canUseLength}}张可用</text>
  106. <text class="coupon-amount" wx:if="{{platformCoupons.couponAmount > 0}}"><text class='symbol'>-¥</text>{{wxs.toPrice(platformCoupons.couponAmount)}}</text>
  107. <text class='arrow'></text>
  108. </view> -->
  109. <!-- 会员积分 -->
  110. <view class='item coupon' wx:if="{{maxUsableScore > 0}}">
  111. <view class="member-points">
  112. <view class="integral-wrap">
  113. <view class="integral-deduction">
  114. <text class="tit">积分抵扣: </text>
  115. <view class="integral-tips" wx:if="{{isScorePay==1}}" catchtap="handleScorePop">
  116. <text wx:if="{{totalScoreAmount>0}}">{{scorePlaceholder}}</text>
  117. <text wx:else> 请输入积分数量 <text wx:if="{{shopUseScore>100}}">(10的倍数)</text></text>
  118. <image src='../../images/icon/revise.png' ></image>
  119. </view>
  120. <view class="integral-tips" wx:if="{{isScorePay==0}}"> 不使用积分抵扣</view>
  121. </view>
  122. </view>
  123. <view class="integral-right-select">
  124. <checkbox color="#fbad4d" value="isScorePay" bindtap='useMemberPoints' class="item-group" checked="{{isChecked}}"></checkbox>
  125. </view>
  126. </view>
  127. </view>
  128. <!-- 起送价 -->
  129. <!-- <view class='item'>
  130. <view class='item-tit'>起送价:</view>
  131. <view class='item-txt price'>
  132. <text class='symbol'>¥</text>
  133. <text class='big-num'>{{wxs.parsePrice(deliveryAmount_num)[0]}}</text>
  134. <text class='small-num'>.{{wxs.parsePrice(deliveryAmount_num)[1]}}</text>
  135. </view>
  136. </view> -->
  137. <!-- 商品总额 -->
  138. <view class='item'>
  139. <view class='item-tit'>商品总额:</view>
  140. <view class='item-txt price'>
  141. <text class='symbol'>¥</text>
  142. <text class='big-num'>{{wxs.parsePrice(total)[0]}}</text>
  143. <text class='small-num'>.{{wxs.parsePrice(total)[1]}}</text>
  144. </view>
  145. </view>
  146. <!-- 运费 -->
  147. <view class='item'>
  148. <view class='item-tit'>{{dvyType}}</view>
  149. <view class='item-txt price'>
  150. <text class='symbol'>¥</text>
  151. <text class='big-num'>{{wxs.parsePrice(transfee)[0]}}</text>
  152. <text class='small-num'>.{{wxs.parsePrice(transfee)[1]}}</text>
  153. </view>
  154. </view>
  155. <!-- 运费 -->
  156. <view class='item' wx:if="{{freeTransfee}}">
  157. <view class='item-tit'>会员运费减免:</view>
  158. <view class='item-txt price'>
  159. <text class='symbol'>-¥</text>
  160. <text class='big-num'>{{wxs.parsePrice(freeTransfee)[0]}}</text>
  161. <text class='small-num'>.{{wxs.parsePrice(freeTransfee)[1]}}</text>
  162. </view>
  163. </view>
  164. <!-- 等级折扣金额 -->
  165. <view class='item' wx:if="{{totalLevelAmount}}">
  166. <view class='item-tit'>会员折扣金额:</view>
  167. <view class='item-txt price'>
  168. <text class='symbol'>-¥</text>
  169. <text class='big-num'>{{wxs.parsePrice(totalLevelAmount)[0]}}</text>
  170. <text class='small-num'>.{{wxs.parsePrice(totalLevelAmount)[1]}}</text>
  171. </view>
  172. </view>
  173. <!-- 积分 -->
  174. <view class='item'>
  175. <view class='item-tit'>积分({{totalAvailableScore||0}}):</view>
  176. <view class='item-txt price'>
  177. <text class='symbol'>-¥</text>
  178. <text class='big-num'>{{wxs.parsePrice(totalUsableScore)[0]}}</text>
  179. <text class='small-num'>.{{wxs.parsePrice(totalUsableScore)[1]}}</text>
  180. </view>
  181. </view>
  182. <!-- <view class='item'>
  183. <view class='item-tit'>积分:</view>
  184. <view class='item-txt price'>
  185. <text class='symbol'>-¥</text>
  186. <text class='big-num'>{{wxs.parsePrice(orderReduce)[0]}}</text>
  187. <text class='small-num'>.{{wxs.parsePrice(orderReduce)[1]}}</text>
  188. </view>
  189. </view> -->
  190. <!-- 优惠金额 -->
  191. <!-- <view class='item'>
  192. <view class='item-tit'>总优惠金额:</view>
  193. <view class='item-txt price'>
  194. <text class='symbol'>-¥</text>
  195. <text class='big-num'>{{wxs.parsePrice(orderReduce)[0]}}</text>
  196. <text class='small-num'>.{{wxs.parsePrice(orderReduce)[1]}}</text>
  197. </view>
  198. </view> -->
  199. <!-- <view class='item payment'>
  200. <view class='item-txt price'>
  201. 小计:
  202. <text class='symbol'>¥</text>
  203. <text class='big-num'>{{wxs.parsePrice(actualTotal)[0]}}</text>
  204. <text class='small-num'>.{{wxs.parsePrice(actualTotal)[1]}}</text>
  205. </view>
  206. </view> -->
  207. </view>
  208. </view>
  209. <!-- /总金额计算 -->
  210. <view class='order-msg' style="margin-top: 20rpx;">
  211. <view class="msg-item">
  212. <view class='item'>
  213. <text>备注:</text>
  214. <input placeholder='选填,请先和商家协商一致,付款后商家可见' placeholder-style="font-size: 24rpx;color: #AAAAAA;" value="{{remarks}}" data-index="{{index}}" bindinput="onRemarkIpt"></input>
  215. </view>
  216. </view>
  217. </view>
  218. </view>
  219. <!-- 底部栏 -->
  220. <view class='submit-order-footer'>
  221. <view class='sub-order'>
  222. <view class='item-txt'>
  223. 合计:
  224. <view class='price'>
  225. <text class='symbol'>¥</text>
  226. <text class='big-num'>{{wxs.parsePrice(actualTotal)[0]}}</text>
  227. <text class='small-num'>.{{wxs.parsePrice(actualTotal)[1]}}</text>
  228. </view>
  229. </view>
  230. </view>
  231. <view class='footer-box' bindtap='toPay'>
  232. 提交订单
  233. </view>
  234. </view>
  235. </view>
  236. <!-- 选择优惠券弹窗 -->
  237. <view class="popup-hide" hidden="{{!popupShow}}">
  238. <view class="popup-box">
  239. <view class="popup-tit">
  240. <text>优惠券</text>
  241. <text class="close" bindtap='closePopup'></text>
  242. </view>
  243. <view class="coupon-tabs">
  244. <view class="coupon-tab {{couponSts==1?'on':''}}" bindtap='changeCouponSts' data-sts='1'>可用优惠券({{showCoupons.canUseCoupons.length}})</view>
  245. <view class="coupon-tab {{couponSts==2?'on':''}}" bindtap='changeCouponSts' data-sts='2'>不可用优惠券({{showCoupons.unCanUseCoupons.length}})</view>
  246. </view>
  247. <view class='popup-cnt'>
  248. <view class="{{couponSts==1?'coupon-con':''}}">
  249. <block wx:for="{{showCoupons.canUseCoupons}}" wx:if="{{couponSts == 1}}" wx:key="index">
  250. <coupon item="{{item}}" index="{{index}}" order="{{true}}" bind:checkCoupon="checkCoupon" canUse="{{true}}"></coupon>
  251. </block>
  252. <block wx:for="{{showCoupons.unCanUseCoupons}}" wx:if="{{couponSts == 2}}" wx:key="index">
  253. <coupon item="{{item}}" order="{{true}}" canUse="{{false}}"></coupon>
  254. </block>
  255. </view>
  256. <view class="botm-empty" wx:if="{{couponSts==1 && !showCoupons.canUseCoupons.length}}">这里还没有优惠券,快去领券吧~</view>
  257. <view class="botm-empty" wx:if="{{couponSts==2 && !showCoupons.unCanUseCoupons.length}}">暂无相关优惠券</view>
  258. </view>
  259. <view class="coupon-ok" wx:if="{{couponSts==1}}">
  260. <text bindtap='choosedCoupon'>确定</text>
  261. </view>
  262. </view>
  263. </view>
  264. <!-- 积分输入框弹窗 -->
  265. <view class="popup-hide" hidden="{{!showScorePop}}">
  266. <view class="popup-box score-pop">
  267. <view class='score-pop-con'>
  268. <view class="score-pop-tit">
  269. <text>修改抵扣积分</text>
  270. <text class="close" bindtap='closePopup'></text>
  271. </view>
  272. <view class="score-pop-item">
  273. <input class="score-int" type="number" placeholder-class="score-placeholder" value="{{userUseScore}}" placeholder="{{scorePopPlaceholder}}" bindinput="handleScoreInput"></input>
  274. </view>
  275. <view class="score-pop-item">
  276. <text class="confirm-btn" bindtap="confirmScore">确定</text>
  277. </view>
  278. </view>
  279. </view>
  280. </view>
  281. <wxs module="wxs" src="../../wxs/number.wxs" />