checkout.wxml 14 KB

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