checkout.wxml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <wxs src="../../utils/formatFuc.wxs" module="formatFuc" />
  2. <view class="container">
  3. <view class="address-box">
  4. <view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
  5. <!-- <view class="l">
  6. <text class="name">{{checkedAddress.name}}</text>
  7. <text class="default" wx:if="{{checkedAddress.isDefault}}">默认</text>
  8. </view> -->
  9. <image class="map-icon" mode="aspectFit" src='/static/images/address/dingwei.png'></image>
  10. <view class="m">
  11. <text class="address">{{checkedAddress.addressDetail}}</text>
  12. <view class="address-bottom">
  13. <text class="user-name">{{checkedAddress.name}}</text>
  14. <text>{{checkedAddress.tel}}</text>
  15. </view>
  16. </view>
  17. <view class="r">
  18. <van-icon name="arrow" />
  19. </view>
  20. </view>
  21. <view class="address-item address-empty" bindtap="selectAddress" wx:else>
  22. <view class="m">
  23. 还没有收货地址,去添加
  24. </view>
  25. <view class="r">
  26. <van-icon name="arrow" />
  27. </view>
  28. </view>
  29. </view>
  30. <view style="text-align: right;height: 48rpx;line-height:48rpx;font-size:22rpx;" class="jz-color">
  31. *请确保服务地址正确,确保服务者顺利上门!</view>
  32. <!-- 商品详情 -->
  33. <view class="goods-items">
  34. <view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
  35. <!-- <view class="name">{{item.goodsName}}</view> -->
  36. <view style="display: flex;">
  37. <view class="img">
  38. <image src="{{item.picUrl}}" mode="aspectFill"></image>
  39. </view>
  40. <view class="info">
  41. <view class="name">{{item.goodsName}}</view>
  42. <view class="m" style="margin-top:10rpx">规格:{{item.specifications[0]}}</view>
  43. <view class="m" wx:if="{{item.goodsType==4}}">服务次数:{{item.product.serviceTimes}}</view>
  44. <view class="m" wx:else="">购买份数:{{item.number}}</view>
  45. <view class="b">单价:¥{{item.price}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 加购 -->
  51. <view class="plus-order" wx:if="{{increaseSumPrice>0}}">
  52. <view class="plus-title">
  53. 加购
  54. </view>
  55. <view class="plus-name">
  56. {{checkedGoodsList[0].product.specifications}}
  57. <text>x</text>
  58. <!-- <text class="plus-num">{{checkedGoodsList[0].unitPrice}}*{{checkedGoodsList[0].unitIncreaseNumber}}</text> -->
  59. <text class="plus-num"> {{checkedGoodsList[0].unitIncreaseNumber}}</text>
  60. </view>
  61. <view class="plus-amount">{{increaseSumPrice}}</view>
  62. </view>
  63. <view class="coupon-box">
  64. <!-- 优惠 -->
  65. <view class="discount-title">
  66. <image mode="aspectFit" src="/static/images/new/icon-minus.png"></image>
  67. <text>优惠</text>
  68. </view>
  69. <view class="coupon-item" bindtap="selectCoupon">
  70. <view class="l" wx:if="{{couponId == 0}}">
  71. <text class="name">没有可用的优惠券</text>
  72. <text class="txt">0张</text>
  73. </view>
  74. <view class="l" wx:elif="{{couponId == -1}}">
  75. <text class="name">优惠券</text>
  76. <text class="txt">{{availableCouponLength}}张</text>
  77. </view>
  78. <view class="l" wx:else>
  79. <text class="name">优惠券</text>
  80. <text class="txt">-¥{{couponPrice}}元</text>
  81. </view>
  82. <view class="r">
  83. <van-icon name="arrow" color="#85868A" />
  84. </view>
  85. </view>
  86. <view class="discount-line">
  87. <view class="l">
  88. <text class="name">已选择</text>
  89. <text class="txt">-¥{{couponPrice}}</text>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 预约时间 -->
  94. <view class="appoint-time-block" wx:if="{{goodsType!=6&&goodsType!=4&&(isNeedAppoint||couponId==24)}}">
  95. <view class="appoint-time-operate">
  96. <view class="operate-left">
  97. 预约上门时段
  98. </view>
  99. <view class="operate-right" bindtap="showAppoint">
  100. <text class="not-select" wx:if="{{!isFinishAppoint}}">请选择</text>
  101. <text wx:if="{{isFinishAppoint}}">更改</text>
  102. <van-icon name="arrow" color="#2a2a2a" />
  103. </view>
  104. </view>
  105. <view class="appoint-time-show" wx:if="{{isFinishAppoint}}">
  106. <!-- 服务时间 -->
  107. <view class="one-time" wx:if="{{isOneAppoint}}">
  108. <text>服务时间</text>
  109. <text>{{oneTimeAppoint}}</text>
  110. </view>
  111. <view class="multi-times" wx:if="{{!isOneAppoint}}">
  112. <view class="multi-times-item">
  113. <text>服务频率</text>
  114. <text>{{activeTab==1?'一周1次':(activeTab==2?'一周2次':'二周1次')}}</text>
  115. </view>
  116. <view class="multi-times-item">
  117. <text>服务时间</text>
  118. <text>{{selectedDateList[0].weekStr+' '+selectedDateList[0].time}}</text>
  119. </view>
  120. <view class="multi-times-item" wx:if="{{activeTab==2}}">
  121. <text></text>
  122. <text>{{selectedDateList[1].weekStr+' '+selectedDateList[1].time}}</text>
  123. </view>
  124. <view class="multi-times-item">
  125. <text>首次服务时间</text>
  126. <text>{{firstAppointList[firstDateIndex].date}}</text>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. <!-- 多次预约结果 -->
  132. <view class="appoint-result" wx:if="{{appointFailTip}}">
  133. 根据您的预约需求,有<text class="orange-font">{{noSerTimes}}</text>个日期暂时无法提供预约服务,为您保留<text
  134. class="orange-font">{{noSerTimes}}</text>个保洁次卡,下单成功后在"<text class="orange-font">我的订单-查看服务</text>"里预约服务
  135. </view>
  136. <!-- <view style="color:red;font-size:24rpx;margin-top:20rpx;">临近春节,服务力紧张,我们会尽量为您安排。如果不能准时服务,支持全额退款</view> -->
  137. <view class="order-box">
  138. <view class="order-item no-border">
  139. <view class="l">
  140. <text class="name">备注</text>
  141. </view>
  142. <view class="r">
  143. <input class="txt" disabled="{{remarkDisable}}" class="message-item" bindinput="bindMessageInput"
  144. placeholder="如需要,请输入备注信息" value="{{message}}" />
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 推荐码 周期卡才展示-->
  149. <view class="order-box code-module" wx:if="{{isRecommend}}">
  150. <view class="order-item no-border">
  151. <view class="l">
  152. <text class="name">推荐码</text>
  153. </view>
  154. <view class="r">
  155. <input class="txt" disabled="{{remarkDisable}}" class="message-item" bindinput="bindCodeInput" type="number" maxlength="9"
  156. placeholder="请输入" value="{{recCode}}" />
  157. </view>
  158. </view>
  159. <view class="codeTips {{isNoMatch?'no-match':''}}" wx:if="{{codeShow}}" disabled="{{remarkDisable}}">
  160. {{recommendTips}}
  161. </view>
  162. </view>
  163. <!-- <view class="order-box">
  164. <view class="order-item">
  165. <view class="l">
  166. <text class="name">商品合计</text>
  167. </view>
  168. <view class="r">
  169. <text class="txt">¥{{goodsTotalPrice}}元</text>
  170. </view>
  171. </view>
  172. <view class="order-item no-border">
  173. <view class="l">
  174. <text class="name">优惠券</text>
  175. </view>
  176. <view class="r">
  177. <text class="txt">-¥{{couponPrice}}元</text>
  178. </view>
  179. </view>
  180. </view> -->
  181. <!-- 分享进来并且是客户的,不展示会员信息
  182. <block hidden="{{shareId!=0&&!userInfo.isDis}}">
  183. //超级鲸会员
  184. <view class="member-benefit" wx:if="{{isMember}}">
  185. <view class="member-tag">
  186. <text>超级鲸会员</text>
  187. </view>
  188. <view class="member-tip">会员专享已省{{memberDiscount}}元</view>
  189. </view>
  190. // 开通会员
  191. <view class="buy-member" wx:else bindtap="goBuyMember">
  192. <view class="member-tag">
  193. <text>超级鲸会员</text>
  194. </view>
  195. <view class="member-tip">开通会员,本单立省{{memberDiscount}}元</view>
  196. <van-icon name="arrow" color="#85868A" />
  197. </view>
  198. </block>-->
  199. <view class="actual-price">
  200. 需支付:<text>¥{{actualPrice}}</text>
  201. </view>
  202. <!-- <view class="order-total">
  203. <view class="l">实付:¥{{actualPrice}}</view>
  204. <view class="r" bindtap="submitOrder">去付款</view>
  205. </view> -->
  206. <view class="go-pay-wrapper">
  207. <van-button type="info" block round bindtap="submitOrder">去付款</van-button>
  208. </view>
  209. <!-- custom-style="height: 80%" -->
  210. <van-popup show="{{ choosePopup }}" round position="bottom" bind:click-overlay="onClose">
  211. <view class="popup-wrapper {{popupType==1?'popup-wrapper-special':''}}">
  212. <!-- 标题 -->
  213. <view class="popup-title {{popupType==1?'popup-title-special':''}} {{popupType==1?'popup-title-new':''}}">
  214. <view> {{popupType==1?"选择服务开始时间":(popupType==2?'选择服务频次':'选择首次上门时段')}}
  215. </view>
  216. <view wx:if="{{selectTimeValue>=17}}" class="fee-tips">您选的时间段可能会加收夜间服务费,具体以与商家的沟通为准</view>
  217. </view>
  218. <block wx:if="{{popupType==1}}">
  219. <view class="popup-content {{popupType==1?'popup-content-special':''}}">
  220. <view class="time-select-left">
  221. <view wx:for="{{dateList}}" wx:key="index" class="time-select-left-item" bindtap="dateCheck"
  222. data-week="{{item.week}}" data-index="{{index}}" data-date="{{item.date}}" data-isbook="{{item.isBook}}">
  223. <view class="date-line-wrapper">
  224. <view class="{{dateIndex==index?'current-date':''}}">{{item.bookdate+' '+item.weekOfDay}}</view>
  225. <view>
  226. <text wx:if="{{index<=1}}" class="date-tag">{{index==0?'今天':'明天'}}</text>
  227. </view>
  228. </view>
  229. <view class="date-msg {{item.dateMsg=='可约'?'avail-date':''}}">{{item.dateMsg}}</view>
  230. </view>
  231. </view>
  232. <view class="time-select-right">
  233. <view class="noon-select" wx:if="{{popupType==1}}">
  234. <view class="noon-item {{noonType=='1'?'active-noon':''}}" data-noon="1" bindtap="noonTab">上午</view>
  235. <view class="noon-item {{noonType=='2'?'active-noon':''}}" data-noon="2" bindtap="noonTab">下午</view>
  236. </view>
  237. <view class="time-item-wrapper">
  238. <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item {{item.timeMsg?'invalid-time':''}}" bindtap="timeCheck"
  239. data-stock="{{item.stock}}"
  240. data-index="{{index}}" data-msg="{{item.timeMsg}}">
  241. <!-- <view class="{{item.stock<=0?'zero-stock':''}}"> -->
  242. <view class="time-line">
  243. <text class="{{timeIndex===index?'current-date':''}} ">{{item.begin}} </text>
  244. <!-- <text class="stock-text">(库存:{{item.stock}})</text> -->
  245. <text wx:if="{{selectTimeValue>=17&&timeIndex==index&&(!item.timeMsg)}}" class="extra-tips">收夜间服务费</text>
  246. <view wx:if="{{item.timeMsg&&item.timeMsg!=null}}" class="time-msg">
  247. {{item.timeMsg}}
  248. </view>
  249. <view wx:if="{{timeIndex===index}}" class="date-tag">已选</view>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. </view>
  255. </block>
  256. <!-- 选择频次 -->
  257. <block wx:if="{{popupType==2}}">
  258. <van-tabs wx:if="{{ choosePopup }}" active="{{ activeTab }}" color="#09afff" bind:change="onTabChange">
  259. <van-tab title="一周1次" name="1"></van-tab>
  260. <van-tab title="一周2次" name="2"></van-tab>
  261. <van-tab title="二周1次" name="3"></van-tab>
  262. </van-tabs>
  263. <view class="popup-content select-week-times">
  264. <view class="time-select-left week-select-left">
  265. <view wx:for="{{weekArrList}}" wx:key="index" class="time-select-left-item " bindtap="weekCheck"
  266. data-index="{{index}}" >
  267. <view class="week-str {{weekIndex==index?'current-date':''}}">{{item.week}}</view>
  268. <view class="select-num-tag" wx:if="{{item.num>0}}">{{item.num}}</view>
  269. </view>
  270. </view>
  271. <view class="time-select-right">
  272. <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item" bindtap="timeSelect"
  273. data-index="{{index}}" data-time="{{item.time}}">
  274. <!-- <view class="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">{{item.time}}</view>
  275. <view wx:if="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}" class="date-tag">已选</view> -->
  276. <view
  277. class="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">
  278. {{item.time}}</view>
  279. <view
  280. wx:if="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}"
  281. class="date-tag">已选</view>
  282. </view>
  283. </view>
  284. </view>
  285. </block>
  286. <!-- 选择首次预约时间 -->
  287. <block wx:if="{{popupType==3}}">
  288. <view class="popup-content">
  289. <view class="first-appoint-date-list">
  290. <view class="first-appoint-date-item" wx:for="{{firstAppointList}}" wx:key="index" bindtap="firstDateCheck"
  291. data-index="{{index}}">
  292. <view class="{{firstDateIndex==index?'current-date':''}}">{{item.date+' '+item.week}}</view>
  293. <view wx:if="{{firstDateIndex==index}}" class="first-time-selected date-tag">已选</view>
  294. </view>
  295. </view>
  296. </view>
  297. </block>
  298. </view>
  299. <!-- 确认按钮 -->
  300. <view class="popup-btn-wrapper {{popupType==1?'popup-btn-special':''}}">
  301. <van-button type="info" block round bindtap="confirmTime">确定</van-button>
  302. </view>
  303. </van-popup>
  304. <!-- 支付失败弹框 -->
  305. <van-overlay show="{{ payFailShow }}">
  306. <view class="overlay-wrapper">
  307. <view class="fail-wrapper">
  308. <view class="fail-top">
  309. <image src="/static/images/new/icon-fail.png"></image>
  310. <view class="fail-text">支付失败</view>
  311. <view class="sub-color">支付遇到问题,请尝试重新支付</view>
  312. </view>
  313. <view class="fail-bottom">
  314. <view class="cancel-btn" bindtap="cancelPay">取消</view>
  315. <view class="btn-devide"></view>
  316. <view class="repay-btn" bindtap="rePay">重新支付</view>
  317. </view>
  318. </view>
  319. </view>
  320. </van-overlay>
  321. </view>