checkout.wxml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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">*请确保服务地址正确,确保服务者顺利上门!</view>
  31. <view class="coupon-box">
  32. <!-- 优惠 -->
  33. <view class="discount-title">
  34. <image mode="aspectFit" src="/static/images/new/icon-minus.png"></image>
  35. <text>优惠</text>
  36. </view>
  37. <view class="coupon-item" bindtap="selectCoupon">
  38. <view class="l" wx:if="{{couponId == 0}}">
  39. <text class="name">没有可用的优惠券</text>
  40. <text class="txt">0张</text>
  41. </view>
  42. <view class="l" wx:elif="{{couponId == -1}}">
  43. <text class="name">优惠券</text>
  44. <text class="txt">{{availableCouponLength}}张</text>
  45. </view>
  46. <view class="l" wx:else>
  47. <text class="name">优惠券</text>
  48. <text class="txt">-¥{{couponPrice}}元</text>
  49. </view>
  50. <view class="r">
  51. <van-icon name="arrow" color="#85868A" />
  52. </view>
  53. </view>
  54. <view class="discount-line">
  55. <view class="l">
  56. <text class="name">已选择</text>
  57. <text class="txt">-¥{{couponPrice}}</text>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="order-box" wx:if="{{couponId==24}}">
  62. <view class="order-item no-border">
  63. <view class="l">
  64. <text class="name">预约时间</text>
  65. </view>
  66. <view class="r">
  67. <picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange"
  68. value="{{multiIndex}}" range="{{multiArray}}">
  69. <text class="message-app txt">{{orderData}}</text>
  70. </picker>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 预约时间 -->
  75. <view class="appoint-time-block" wx:if="{{isNeedAppoint||couponId==24}}">
  76. <view class="appoint-time-operate">
  77. <view class="operate-left">
  78. 预约时间
  79. </view>
  80. <view class="operate-right" bindtap="showAppoint">
  81. <text class="not-select" wx:if="{{!isFinishAppoint}}">请选择</text>
  82. <text wx:if="{{isFinishAppoint}}">更改</text>
  83. <van-icon name="arrow" color="#2a2a2a" />
  84. </view>
  85. </view>
  86. <view class="appoint-time-show" wx:if="{{isFinishAppoint}}">
  87. <!-- 服务时间 -->
  88. <view class="one-time" wx:if="{{isOneAppoint}}">
  89. <text>服务时间</text>
  90. <text>{{oneTimeAppoint}}</text>
  91. </view>
  92. <view class="multi-times" wx:if="{{!isOneAppoint}}">
  93. <view class="multi-times-item">
  94. <text>服务频率</text>
  95. <text>{{activeTab==1?'一周1次':(activeTab==2?'一周2次':'二周1次')}}</text>
  96. </view>
  97. <view class="multi-times-item">
  98. <text>服务时间</text>
  99. <text>{{selectedDateList[0].weekStr+' '+selectedDateList[0].time}}</text>
  100. </view>
  101. <view class="multi-times-item" wx:if="{{activeTab==2}}">
  102. <text></text>
  103. <text>{{selectedDateList[1].weekStr+' '+selectedDateList[1].time}}</text>
  104. </view>
  105. <view class="multi-times-item">
  106. <text>首次服务时间</text>
  107. <text>{{firstAppointList[firstDateIndex].date}}</text>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 多次预约结果 -->
  113. <view class="appoint-result" wx:if="{{appointFailTip}}">
  114. 根据您的预约需求,有<text class="orange-font">{{noSerTimes}}</text>个日期暂时无法提供预约服务,为您保留<text class="orange-font">{{noSerTimes}}</text>个保洁次卡,下单成功后在"<text class="orange-font">我的订单-查看服务</text>"里预约服务
  115. </view>
  116. <view class="order-box">
  117. <view class="order-item no-border">
  118. <view class="l">
  119. <text class="name">备注</text>
  120. </view>
  121. <view class="r">
  122. <input class="txt"
  123. disabled="{{remarkDisable}}"
  124. class="message-item" bindinput="bindMessageInput" placeholder="如需要,请输入备注信息" value="{{message}}" />
  125. </view>
  126. </view>
  127. </view>
  128. <!-- <view class="order-box">
  129. <view class="order-item">
  130. <view class="l">
  131. <text class="name">商品合计</text>
  132. </view>
  133. <view class="r">
  134. <text class="txt">¥{{goodsTotalPrice}}元</text>
  135. </view>
  136. </view>
  137. <view class="order-item no-border">
  138. <view class="l">
  139. <text class="name">优惠券</text>
  140. </view>
  141. <view class="r">
  142. <text class="txt">-¥{{couponPrice}}元</text>
  143. </view>
  144. </view>
  145. </view> -->
  146. <!-- 商品详情 -->
  147. <view class="goods-items">
  148. <view class="item" wx:for="{{checkedGoodsList}}" wx:key="id">
  149. <!-- <view class="name">{{item.goodsName}}</view> -->
  150. <view style="display: flex;">
  151. <view class="img">
  152. <image src="{{item.picUrl}}" mode="aspectFill"></image>
  153. </view>
  154. <view class="info">
  155. <view class="name">{{item.goodsName}}</view>
  156. <view class="m" style="margin-top:20rpx">规格:{{item.specifications}}</view>
  157. <view class="m">服务次数:{{item.goods.serviceTimes}}</view>
  158. <view class="b">单价:¥{{item.price}}</view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 分享进来并且是客户的,不展示会员信息 -->
  164. <block hidden="{{shareId!=0&&!userInfo.isDis}}">
  165. <!-- 超级鲸会员 -->
  166. <view class="member-benefit" wx:if="{{isMember}}">
  167. <view class="member-tag">
  168. <text>超级鲸会员</text>
  169. </view>
  170. <view class="member-tip">会员专享已省{{memberDiscount}}元</view>
  171. </view>
  172. <!-- 开通会员 -->
  173. <view class="buy-member" wx:else bindtap="goBuyMember">
  174. <view class="member-tag">
  175. <text>超级鲸会员</text>
  176. </view>
  177. <view class="member-tip">开通会员,本单立省{{memberDiscount}}元</view>
  178. <van-icon name="arrow" color="#85868A"/>
  179. </view>
  180. </block>
  181. <view class="actual-price">
  182. 需支付:<text>¥{{actualPrice}}</text>
  183. </view>
  184. <!-- <view class="order-total">
  185. <view class="l">实付:¥{{actualPrice}}</view>
  186. <view class="r" bindtap="submitOrder">去付款</view>
  187. </view> -->
  188. <view class="go-pay-wrapper">
  189. <van-button type="info" block round bindtap="submitOrder">去付款</van-button>
  190. </view>
  191. <!-- custom-style="height: 80%" -->
  192. <van-popup
  193. show="{{ choosePopup }}"
  194. round
  195. position="bottom"
  196. bind:click-overlay="onClose"
  197. >
  198. <view class="popup-wrapper {{popupType==1?'popup-wrapper-special':''}}">
  199. <!-- 标题 -->
  200. <view class="popup-title {{popupType==1?'popup-title-special':''}}">
  201. {{popupType==1?'选择预约时间':(popupType==2?'选择服务频次':'选择首次预约时间')}}
  202. </view>
  203. <block wx:if="{{popupType==1}}">
  204. <view class="popup-content {{popupType==1?'popup-content-special':''}}">
  205. <view class="time-select-left">
  206. <view wx:for="{{dateList}}" wx:key="index" class="time-select-left-item" bindtap="dateCheck" data-index="{{index}}" data-date="{{item.date}}">
  207. <!-- <view hidden="{{index>1}}" class="date-tag">{{index==0?'明天':'后天'}}</view> -->
  208. <view>
  209. <text wx:if="{{index<=1}}" class="date-tag">{{index==0?'明天':'后天'}}</text>
  210. <!-- <text hidden="{{index>=2}}" class="full-time">约满</text> -->
  211. <text wx:if="{{index<=1||item.date=='2021-08-21'||item.date=='2021-08-22'||item.date=='2021-08-28'||item.date=='2021-08-29'}}" class="full-time">约满</text>
  212. </view>
  213. <view class="{{dateIndex==index?'current-date':''}}">{{item.date+' '+item.week}}</view>
  214. </view>
  215. </view>
  216. <view class="time-select-right">
  217. <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item" bindtap="timeCheck" data-index="{{index}}">
  218. <view class="{{timeIndex==index?'current-date':''}}">{{item.time}}</view>
  219. <view wx:if="{{timeIndex==index}}" class="date-tag">已选</view>
  220. </view>
  221. </view>
  222. </view>
  223. </block>
  224. <!-- 选择频次 -->
  225. <block wx:if="{{popupType==2}}">
  226. <van-tabs wx:if="{{ choosePopup }}" active="{{ activeTab }}" color="#09afff" bind:change="onTabChange">
  227. <van-tab title="一周1次" name="1"></van-tab>
  228. <van-tab title="一周2次" name="2"></van-tab>
  229. <van-tab title="二周1次" name="3"></van-tab>
  230. </van-tabs>
  231. <view class="popup-content select-week-times">
  232. <view class="time-select-left week-select-left">
  233. <view wx:for="{{weekArrList}}" wx:key="index" class="time-select-left-item " bindtap="weekCheck" data-index="{{index}}">
  234. <view class="week-str {{weekIndex==index?'current-date':''}}">{{item.week}}</view>
  235. <view class="select-num-tag" wx:if="{{item.num>0}}">{{item.num}}</view>
  236. </view>
  237. </view>
  238. <view class="time-select-right">
  239. <view wx:for="{{timeList}}" wx:key="id" class="time-select-right-item" bindtap="timeSelect" data-index="{{index}}" data-time="{{item.time}}">
  240. <!-- <view class="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">{{item.time}}</view>
  241. <view wx:if="{{formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}" class="date-tag">已选</view> -->
  242. <view class="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1?'current-date':''}}">{{item.time}}</view>
  243. <view wx:if="{{formatFuc.includeItem(selectedDateList,weekIndex,item.time)&&formatFuc.defineIndexOf(selectedWeekList,weekIndex)>-1}}" class="date-tag">已选</view>
  244. </view>
  245. </view>
  246. </view>
  247. </block>
  248. <!-- 选择首次预约时间 -->
  249. <block wx:if="{{popupType==3}}">
  250. <view class="popup-content">
  251. <view class="first-appoint-date-list">
  252. <view class="first-appoint-date-item" wx:for="{{firstAppointList}}" wx:key="index" bindtap="firstDateCheck" data-index="{{index}}">
  253. <view class="{{firstDateIndex==index?'current-date':''}}">{{item.date+' '+item.week}}</view>
  254. <view wx:if="{{firstDateIndex==index}}" class="first-time-selected date-tag">已选</view>
  255. </view>
  256. </view>
  257. </view>
  258. </block>
  259. </view>
  260. <!-- 确认按钮 -->
  261. <view class="popup-btn-wrapper {{popupType==1?'popup-btn-special':''}}">
  262. <van-button type="info" block round bindtap="confirmTime">确定</van-button>
  263. </view>
  264. </van-popup>
  265. <!-- 支付失败弹框 -->
  266. <van-overlay show="{{ payFailShow }}" >
  267. <view class="overlay-wrapper">
  268. <view class="fail-wrapper">
  269. <view class="fail-top">
  270. <image src="/static/images/new/icon-fail.png"></image>
  271. <view class="fail-text">支付失败</view>
  272. <view class="sub-color">支付遇到问题,请尝试重新支付</view>
  273. </view>
  274. <view class="fail-bottom">
  275. <view class="cancel-btn" bindtap="cancelPay">取消</view>
  276. <view class="btn-devide"></view>
  277. <view class="repay-btn" bindtap="rePay">重新支付</view>
  278. </view>
  279. </view>
  280. </view>
  281. </van-overlay>
  282. </view>