orderConfirm.wxml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <import src="/components/local/wxParse/wxParse.wxml" />
  2. <wxs module="tool" src="../../app.wxs" />
  3. <wxs src="./../../utils/wxsUtil.wxs" module="wxsUtil" />
  4. <view wx:if="{{detail.id || detail.project_id}}" class="item margin item-radius current{{current}}">
  5. <view class="item-top flex-align-center ">
  6. <text class="flex1 ellipsis">{{detail.name}}</text>
  7. </view>
  8. <view>
  9. <view class="item-content flex">
  10. <image class="img" src="{{detail.banner_urls.length > 0 ? detail.banner_urls[0] : '' || deviceData.cover_url}}"></image>
  11. <view class="content flex-column">
  12. <view class="content-text-box flex1" wx:if="{{source != 'secondaryCard'}}">
  13. <text style="color:#999;">{{source == 'cardgoods' ? '可用店铺:' : '预约店铺:'}}</text>
  14. <text class="flex1 ellipsis">{{deviceData.store_name || detail.store_name}}</text>
  15. </view>
  16. <view class="content-text-box flex1">
  17. <text style="color:#999;">{{source == 'cardgoods' ? '可用时间:' : source == 'secondaryCard' ? '有效期:' : '使用时间:'}}</text>
  18. <text class="flex1 ellipsis" wx:if="{{detail.days}}">{{detail.days}}天</text>
  19. <text class="flex1 ellipsis" wx:if="{{detail.take_out_time_max}}">{{detail.take_out_time_max}}之前</text>
  20. <text class="flex1 ellipsis" wx:else>{{tool.replaceStr(timeData.order_day)}} {{tool.replaceStr(timeData.order_time)}}</text>
  21. </view>
  22. <view class="content-text-box flex1" wx:if="{{deviceData.device_name}}">
  23. <text style="color:#999;">使用设备:</text>
  24. <text class="flex1 ellipsis">{{deviceData.device_name}}</text>
  25. </view>
  26. <view class="content-text-box flex1" wx:else></view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="item-btn flex-align-center">
  31. <text style="font-size: 28rpx;color: #999;">{{source == 'cardgoods' ? '购买费用:' : source == 'secondaryCard' ? '价格:' : '预约费用:'}}</text>
  32. <text style="font-size: 36rpx;font-family: PingFang-SC-Medium, PingFang-SC;font-weight: 500;margin-right:24rpx;" wx:if="{{source == 'secondaryCard'}}">¥{{detail.price}}</text>
  33. <text style="font-size: 36rpx;font-family: PingFang-SC-Medium, PingFang-SC;font-weight: 500;margin-right:24rpx;" wx:else>¥{{moneyData.projectWithGoodsPrice}}</text>
  34. </view>
  35. </view>
  36. <!-- 次卡分配详情 -->
  37. <view class="card-details">
  38. <view class="card-details-title">次卡详情</view>
  39. <!-- 固定次数次卡分配 -->
  40. <block wx:for="{{cardDetail}}" wx:key="id">
  41. <view wx:if="{{cardDetail}}" class="card-details-fixed" wx:if="{{item.time!=0}}">
  42. <text class="card-details-fixed-text">{{item.project_name}}</text>
  43. <text>{{item.time}}次</text>
  44. </view>
  45. </block>
  46. <!-- 用户选择分配次数 -->
  47. <view wx:for="{{Ac_cardDetail}}" class="card-details-Active" wx:key="index">
  48. <view class="card-details-Active-tittle">{{item.group_name}}</view>
  49. <block wx:for="{{item.project_list}}" wx:for-item="detail" wx:key="id">
  50. <view class="card-details-active {{detail.time>0?'activeSelect':''}}">
  51. <text>{{detail.project_name}}</text>
  52. <view class="calculation">
  53. <view class="lation-content" wx:if="{{item.total>item.project_list.length}}">
  54. <view class="reduce" data-id='{{item.Idindex}}' data-index='{{index}}' bindtap="onReduce">-</view>
  55. <view class="lation-num">{{detail.time}}</view>
  56. <view class="lation-add" data-index='{{index}}' data-id='{{item.Idindex}}' bindtap="onLationAdd">+</view>
  57. </view>
  58. <view bindtap="selectCardRadio" data-index='{{index}}' data-id='{{item.Idindex}}' class="radio" wx:else>
  59. <image class="radio-image" src="{{detail.time==0?'../../images/icon_12.png':'../../images/icon_13.png'}}"></image>
  60. </view>
  61. </view>
  62. </view>
  63. </block>
  64. <view class="card-details-surplus">
  65. 剩余分配次数:<text>{{item.total_time}}</text>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 低价换购 -->
  70. <view class="exchange-details" wx:if="{{cardExchangeList.length!=0}}">
  71. <view class="exchange-details-title">低价换购</view>
  72. <view class="exchange-box" wx:for="{{cardExchangeList}}" wx:key="index">
  73. <view class="exchange-box-image">
  74. <image src="{{item.cover_url}}"></image>
  75. </view>
  76. <view class="exchange-info">
  77. <view class="exchange-info-title">
  78. {{item.project_name}}
  79. </view>
  80. <view class="exchange-info-bottom">
  81. <view class="exchange-info-price">
  82. ¥{{item.price}}
  83. </view>
  84. <image style="margin: 0;" class="select-activity" data-index="{{index}}" bindtap="selectExchange" src="{{selectExchange==0?'/images/icon_12.png':'/images/icon_13.png'}}"></image>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 项目耗材下单时,传入的产品信息 -->
  90. <view wx:if="{{productDetail}}" class="item margin item-radius">
  91. <view class="item-top flex-align-center ">
  92. <text class="flex1 ellipsis">{{productDetail.name}}</text>
  93. </view>
  94. <view>
  95. <view class="item-content flex">
  96. <image class="img" src="{{productDetail.banner_urls.length > 0 ? productDetail.banner_urls[0] : ''}}"></image>
  97. <view class="content flex-column">
  98. <view class="content-text-box flex">
  99. <text style="color:#999;">预约店铺:</text>
  100. <text class="flex1 ellipsis">{{productDetail.store_name || deviceData.store_name}}</text>
  101. </view>
  102. <view class="content-text-box flex">
  103. <text style="color:#999;">使用时间:</text>
  104. <text wx:if="{{projectOrderData.order_time}}" class="flex1 ellipsis">{{projectOrderData.order_time}}</text>
  105. <text wx:else class="flex1 ellipsis">{{tool.replaceStr(timeData.order_day)}} {{tool.replaceStr(timeData.order_time)}}</text>
  106. </view>
  107. <view class="content-text-box flex" wx:if="{{detail.name}}">
  108. <text style="color:#999;">使用项目:</text>
  109. <text class="flex1 ellipsis">{{detail.name}}</text>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="item-btn flex-align-center">
  115. <text style="font-size: 28rpx;">预约费用:</text>
  116. <text style="font-size: 36rpx;font-family: PingFang-SC-Medium, PingFang-SC;font-weight: 500;margin-right:24rpx;">¥{{moneyData.productPrice}}</text>
  117. </view>
  118. </view>
  119. <view class="list_Content_show" hidden="{{inFirstIn?false:true}}">
  120. <view class="timeSelect">
  121. <view class="timeShow">未选优惠券</view>
  122. </view>
  123. <image class="list_Content_img" src="/images/white_on.png"></image>
  124. <view class="list_top_contents">
  125. <view class="first_and_title"><text>第二步:</text>选择您的优惠卷/卡</view>
  126. </view>
  127. </view>
  128. <view class="margin order-sum item-radius">
  129. <view class="top">
  130. <view class="text flex" wx:if="{{source != 'secondaryCard'}}">
  131. <text class="flex1">预约费用</text>
  132. <view class="right-500">
  133. <text wx:if="{{source == 'product_with_project_order'}}">¥{{productDetail.price}}</text>
  134. <text wx:else>¥{{wxsUtil.calculateMoney([moneyData.projectWithGoodsPrice, moneyData.productPrice])}}</text>
  135. </view>
  136. </view>
  137. <!-- 折扣 -->
  138. <!-- <view class="text flex" style="margin-bottom: 0;">
  139. <view class="coupon flex flex1 flex-align-center">
  140. <image class="order-coupon-icon" src="/images/display.png" />
  141. <text>折扣优惠</text>
  142. </view>
  143. </view> -->
  144. <!-- <view wx:if="{{level!=0}}" class="coup-box">
  145. <view class="coup-box-title">权益折扣</view>
  146. <view class="spc-in">
  147. </view> -->
  148. <!-- <view class="color-price">-¥{{priceSet}}</view> -->
  149. <!-- <view class="coup-box-title">余额支付享受{{tolevel}}折优惠</view>
  150. </view> -->
  151. <view class="text flex" bindtap="onCouponOpen">
  152. <view class="coupon flex flex1 flex-align-center">
  153. <image class="order-coupon-icon" src="/images/icon_order_coupon.png" />
  154. <text>优惠券</text>
  155. </view>
  156. <view class="flex-align-center right-500">
  157. <text class="coupon-guide-tips" wx:if="{{couponList.length > 0 && currentChangeCoupon == null && memberCardCurrentDiscount != 0}}">未选优惠券</text>
  158. <text style="color: #FF3007;" wx:elif="{{ couponList.length > 0 && currentChangeCoupon != null && memberCardCurrentDiscount != 0}}">-¥{{moneyData.couponMoney}}</text>
  159. <text wx:else style="color: #bbb;">无可用</text>
  160. <image src="/images/my/right.png" style="width: 24rpx;height: 24rpx;"></image>
  161. </view>
  162. </view>
  163. <view class="text flex-center" hidden="{{true}}">
  164. <image class="order-coupon-icon" src="/images/icon_order_vip.png" />
  165. <text class="flex1">会员抵扣</text>
  166. <view class="flex-center right-500">
  167. <text style="color: #bbb;" wx:if="{{memberDiscountStatus < 1 || currentCoupon != -1}}">无可用</text>
  168. <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" wx:else>
  169. <text class="flex-center" style="color: #FF3007;" wx:if="{{memberCardCurrentDiscount == 0}}">{{'-¥'+moneyData.memberDiscountMoney}}</text>
  170. <text class="flex-center" wx:else>{{memberCardCurrentDiscount < 0 ? '去选择' : array[memberCardCurrentDiscount] }}</text>
  171. </picker>
  172. </view>
  173. <image src="/images/my/right.png" style="width: 24rpx;height: 24rpx;"></image>
  174. </view>
  175. </view>
  176. <view class="bottom flex-align-center" wx:if="{{source != 'secondaryCard'}}">
  177. <text style="font-size: 28rpx;color: #999;">合计:</text>
  178. <text class="total-price">¥{{ wxsUtil.calculateMoney([moneyData.projectWithGoodsPrice, moneyData.productPrice, moneyData.couponMoney * -1, moneyData.memberDiscountMoney * -1]) }}</text>
  179. </view>
  180. <view class="bottom flex-align-center" wx:else>
  181. <text style="font-size: 28rpx;color: #999;">合计:</text>
  182. <text class="total-price">¥{{selectExchange==1?exchangePrice:detail.price}}</text>
  183. </view>
  184. </view>
  185. <!-- <view class="item-radius" wx:if="{{recommendMemberCard.id}}"> -->
  186. <view class="item-radius" hidden="{{true}}">
  187. <view class="item-top flex-align-center ">
  188. <text class="ellipsis" style="font-size: 28rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;">开通会员本单立省</text>
  189. <text style="font-size: 36rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500;color: #FF3007;">¥{{moneyData.memberDiscountMoney}}</text>
  190. </view>
  191. <view class="item-vip flex-align-center" bindtap="selectMemberCard" data-id="{{recommendMemberCard.id}}">
  192. <image class="change-img" src="{{selectCardId ? '/images/icon_17.png' : '/images/icon_16.png'}}"></image>
  193. <view class="flex1 flex item-vip-card">
  194. <image class="card-img" src="{{recommendMemberCard.cover_url}}"></image>
  195. <view class="flex1 flex-column flex-justify-space-between" style="padding:20rpx;">
  196. <view class="flex-align-center flex-justify-space-between">
  197. <text>{{recommendMemberCard.card_name}}</text>
  198. <image src="/images/icon_19.png" style="width:56rpx;height:56rpx;" catchtap="onOpenLandscape"></image>
  199. </view>
  200. <text style="font-size: 36rpx;">¥{{recommendMemberCard.price}}</text>
  201. </view>
  202. </view>
  203. </view>
  204. </view>
  205. <view class="item-radius" style="background-color: #fff;" wx:if="{{projectProducts.length > 0}}">
  206. <view class="item-top flex-align-center ">
  207. <text class="flex1 ellipsis">升级产品</text>
  208. </view>
  209. <view class="item-products-content flex">
  210. <view class="item-product flex" wx:for="{{ projectProducts }}" wx:key="index" bindtap="selectProjectProduct" data-id="{{item.id}}" data-index="{{index}}">
  211. <image src="{{item.cover_url}}"></image>
  212. <view class="flex1 flex-column flex-justify-space-between ellipsis" style="padding: 20rpx;">
  213. <text class="ellipsis" style="font-size: 28rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500;">{{item.product_name}}</text>
  214. <view class="flex-justify-space-between">
  215. <text style="font-size: 36rpx;font-family: PingFangSC-Semibold, PingFang SC;font-weight: 600;">¥{{selectCardId || memberStatus == 1 || detail.is_member == 1 ? item.member_price : item.price}}</text>
  216. <image src="{{selectProductIndex == index ? '/images/icon_17.png' : '/images/icon_16.png'}}" style="width:48rpx;height:48rpx;"></image>
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <view style="height:170rpx;"></view>
  223. <view class="buy flex-align-center flex-justify-space-between" style="padding: 0 20rpx;">
  224. <view class="flex-align-center" wx:if="{{source != 'secondaryCard'}}">
  225. <text style="font-size: 28rpx;">合计:</text>
  226. <text class="total-pay-price">¥{{ moneyData.payMoney }}</text>
  227. </view>
  228. <view class="flex-align-center" wx:else>
  229. <text style="font-size: 28rpx;">合计:</text>
  230. <text class="total-pay-price">¥{{ selectExchange==1?exchangePrice:detail.price }}</text>
  231. </view>
  232. <view wx:if="{{source == 'product_with_project_order'}}" class="btn use-btn flex-center" bindtap="onProductPay">
  233. 提交订单
  234. </view>
  235. <view wx:elif="{{source == 'goods'}}" class="btn use-btn flex-center" bindtap="onGoodsPay">
  236. 提交订单
  237. </view>
  238. <view wx:elif="{{source == 'cardgoods'}}" class="btn use-btn flex-center" bindtap="onCardgoodsPay">
  239. 提交订单
  240. </view>
  241. <view wx:elif="{{source == 'secondaryCard'}}" class="btn use-btn flex-center" bindtap="onSecondaryCardPay">
  242. 提交订单
  243. </view>
  244. <view wx:else class="btn use-btn flex-center" bindtap="onPay" id="payProject">提交订单</view>
  245. </view>
  246. <wux-landscape visible="{{ visibleLandscape }}" maskClosable="{{ true }}" closable="{{ false }}" bind:close="onCloseLandscape" class="skin-popup" catchtouchmove="true">
  247. <view class="use-popup flex-column">
  248. <view class="text-cotent">
  249. <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  250. </view>
  251. <image src="/images/icon_20.png" class="close-img" bindtap="onCloseLandscape"></image>
  252. </view>
  253. </wux-landscape>
  254. <wux-popup class="popup-radius" position="bottom" catchtouchmove="true" visible="{{ visible }}" bind:close="onClose">
  255. <view class="coupon-popup">
  256. <view class="top flex-align-center need-show-line">
  257. <text style="text-align: center;">我的优惠券</text>
  258. <image src="/images/icon_20.png" class="close-img" bindtap="onCancelCoupon" />
  259. </view>
  260. <scroll-view scroll-y>
  261. <view class="list">
  262. <coupon-item class="coupon-item" wx:for="{{ couponList }}" item="{{item}}" wx:key="index" data-index="{{index}}" source="checkbox" couponStatus="{{item.status}}" checkStatus="{{currentCoupon == index}}" bind:check="onCouponChange"></coupon-item>
  263. <view class="btm-text">--已经到底了--</view>
  264. </view>
  265. </scroll-view>
  266. <view class="coupon-popup-btm flex-center">
  267. <view class="coupon-popup-btm-btn flex-center" bindtap="onConfirmCoupon">确认</view>
  268. </view>
  269. </view>
  270. </wux-popup>
  271. <wux-popup class="popup-radius" position="bottom" catchtouchmove="true" visible="{{ payNow }}" bind:close="onClosePay">
  272. <view class="coupon-popup payType">
  273. <view class="top flex-align-center">
  274. <text style="text-align: center;"></text>
  275. <image src="/images/icon_20.png" class="close-img" bindtap="onClosePay" />
  276. </view>
  277. <view class="moneyShow" wx:if="{{source != 'secondaryCard'}}"><text>¥</text>{{ moneyData.payMoney }}</view>
  278. <view class="moneyShow" wx:else><text>¥</text>{{selectExchange==1?exchangePrice:detail.price }}</view>
  279. <!-- <view class="moneyShow" wx:else><text>¥</text>{{ level?pay_methon==2?levelPrice:selectExchange==1?exchangePrice:detail.price:selectExchange==1?exchangePrice:detail.price }}</view> -->
  280. <view class="select-pay-methon" catchtap="pay_methonw">
  281. <image class="pay-img" src="/images/wx_pay.png"></image>
  282. <view class="pay-title">微信支付</view>
  283. <image class="select-activity" src="{{pay_methon==1?'/images/icon_13.png':'/images/icon_12.png'}}"></image>
  284. </view>
  285. <view class="select-pay-methon" catchtap="pay_methonc" style="margin-bottom: 15rpx;">
  286. <image class="pay-img" src="/images/joli_pay.png"></image>
  287. <view class="pay-title">储值支付</view>
  288. <view class="pay-money"><text>¥</text>{{inserllAmount}}</view>
  289. <image class="select-activity" src="{{pay_methon==2?'/images/icon_13.png':'/images/icon_12.png'}}"></image>
  290. </view>
  291. <!-- <view wx:if="{{level!=0}}" class="coup-box-title" style="text-align: left; margin-left: 90rpx;">权益优惠减¥{{toLevelPrice}}</view> -->
  292. <view class="coupon-popup-btm flex-center">
  293. <view class="coupon-popup-btm-btn flex-center" bindtap="payNow">支付</view>
  294. </view>
  295. </view>
  296. </wux-popup>
  297. <view class="list_first_to" catchtouchmove="noneEnoughPeople" hidden="{{inFirstIn?false:true}}">
  298. <view wx:if="{{detail.id || detail.project_id}}" class="item itemInNeeds current{{current}}">
  299. <view class="item-top flex-align-center onIndex111 opc">
  300. <text class="flex1 ellipsis"></text>
  301. </view>
  302. <view>
  303. <view class="item-content flex opcBack">
  304. <image class="img" src="{{detail.banner_urls.length > 0 ? detail.banner_urls[0] : '' || deviceData.cover_url}}"></image>
  305. <view class="content flex-column">
  306. <view class="content-text-box flex1">
  307. <text style="color:#999;">{{source == 'cardgoods' ? '可用店铺:' : '预约店铺:'}}</text>
  308. <text class="flex1 ellipsis">{{deviceData.store_name || detail.store_name}}</text>
  309. </view>
  310. <view class="content-text-box flex1">
  311. <text style="color:#999;">{{source == 'cardgoods' ? '可用时间:' : '使用时间:'}}</text>
  312. <text class="flex1 ellipsis" wx:if="{{detail.take_out_time_max}}">{{detail.take_out_time_max}}之前</text>
  313. <text class="flex1 ellipsis" wx:else>{{tool.replaceStr(timeData.order_day)}} {{tool.replaceStr(timeData.order_time)}}</text>
  314. </view>
  315. <view class="content-text-box flex1" wx:if="{{deviceData.device_name}}">
  316. <text style="color:#999;">使用设备:</text>
  317. <text class="flex1 ellipsis">{{deviceData.device_name}}</text>
  318. </view>
  319. <view class="content-text-box flex1" wx:else></view>
  320. </view>
  321. </view>
  322. </view>
  323. <view class="item-btn flex-align-center onIndex111 opc">
  324. <text style="font-size: 28rpx;color: #999;">{{source == 'cardgoods' ? '购买费用:' : '预约费用:'}}</text>
  325. <text style="font-size: 36rpx;font-family: PingFang-SC-Medium, PingFang-SC;font-weight: 500;margin-right:24rpx;">¥{{moneyData.projectWithGoodsPrice}}</text>
  326. </view>
  327. </view>
  328. <view class="list_top_show">
  329. <image class="list_top_img" src="/images/white_on.png"></image>
  330. <view class="list_top_content">
  331. <view class="first_and_title"><text>第一步:</text>核对您预约的项目和店铺</view>
  332. </view>
  333. </view>
  334. <view class="KnowBtn" catchtap="knowSubmit">我知道了</view>
  335. </view>