confirmYuyue.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="box">
  3. <view class="yuyuCheckTis">
  4. 温馨提示:该报价仅为参考价格,实际以门店为准(不同品牌和车型费用不同)
  5. </view>
  6. <view class="cont">
  7. <view class="contkk">
  8. <view class="kkline">
  9. <view class="kklineLeft">
  10. <span class="stars">*</span> <span>预约门店</span>
  11. </view>
  12. <view class="kklineRight">{{yyshopInfo.shopName}}</view>
  13. </view>
  14. <view class="kkline">
  15. <view class="kklineLeft">
  16. <span class="stars">*</span> <span>预约车辆</span>
  17. </view>
  18. <view class="kklineRight">
  19. <span>{{carInfo.plateNumber?carInfo.plateNumber:'请选择'}}</span>
  20. <img src="../../static/img/big_rightArrow.png" alt="" class="rightJt">
  21. </view>
  22. </view>
  23. <view class="kkline lineborderNo">
  24. <view class="kklineLeft">
  25. <span class="stars">*</span> <span>预约时间</span>
  26. </view>
  27. <view class="kklineRight" @click="cktime">
  28. <span>{{billDate?billDate:'请选择'}}</span>
  29. <img src="../../static/img/big_rightArrow.png" alt="" class="rightJt">
  30. </view>
  31. </view>
  32. </view>
  33. <view class="contkk" style="margin-top: 20rpx;">
  34. <view class="kkline2">
  35. <view class="kklineLeft1">预约项目</view>
  36. <view class="kklineRight1">(以实际门店价格为准)</view>
  37. </view>
  38. <view class="kkline2" v-for="(item,index) in yuyueData">
  39. <view class="kklineLeft3">{{item.ItemName}}</view>
  40. <view class="kklineRight3">¥{{item.Price}}</view>
  41. </view>
  42. </view>
  43. <view class="contkk" style="margin-top: 20rpx;">
  44. <view class="bzline">
  45. <view class="beiz">备注</view>
  46. <input type="text" v-model="comment" placeholder="请输入备注(选填)" class="beizInput" placeholder-style="color:#cccccc;">
  47. </view>
  48. </view>
  49. </view>
  50. <view style="height: 120rpx;"></view>
  51. <view class="bottom-container">
  52. <view>
  53. <view class="bottom-container-price"><span class="qianhaospan" >¥</span> {{totalPrice}} <span></span></view>
  54. <view class="ckj">参考价格(到店支付)</view>
  55. </view>
  56. <view class="newyyBotbutton" @click="yuyue">立即预约</view>
  57. </view>
  58. <timeSelect ref="timeSelect" :timedata="timedata" @changeTime="changeTime"></timeSelect>
  59. </view>
  60. </template>
  61. <script>
  62. import timeSelect from '@/components/timeSelect/timeSelect.vue'
  63. export default {
  64. components: {
  65. timeSelect
  66. },
  67. data() {
  68. return {
  69. comment:'',
  70. totalPrice:99,
  71. userInfo:'',
  72. timedata:'',
  73. billDate:'',
  74. yuyueData:'',
  75. carInfo:'',
  76. yyshopInfo:'',
  77. }
  78. },
  79. onLoad() {
  80. console.log(this.$store.state.yuyueData)
  81. this.yuyueData=this.$store.state.yuyueData;
  82. this.carInfo=this.$store.state.carInfo
  83. this.userInfo = uni.getStorageSync("userInfo");
  84. this.yyshopInfo=uni.getStorageSync("yyshopInfo")
  85. //this.getOrderTimes()
  86. },
  87. methods: {
  88. yuyue(){
  89. if(!this.billDate){
  90. uni.showToast({
  91. title: '请选择预约时间',
  92. icon: 'none',
  93. duration: 3000
  94. });
  95. return false;
  96. }
  97. this.$http('openreservation/saveOrderSheet', {
  98. billDate: this.billDate,
  99. comment: this.comment,
  100. carID: this.carInfo.id,
  101. orderItem: this.yuyueData.map(item => item.ID).join(),
  102. shopId: this.yyshopInfo.id,
  103. unionId: this.userInfo.unionId
  104. },'POST').then(res => {
  105. var id=res.data
  106. if(res.code==0){
  107. uni.showModal({
  108. title: '提示',
  109. content: '预约成功',
  110. confirmText:'返回首页',
  111. cancelText:'查看订单',
  112. success: function (res) {
  113. if (res.confirm) {
  114. // console.log('用户点击确定');
  115. uni.switchTab({
  116. url:'index'
  117. })
  118. } else if (res.cancel) {
  119. // console.log('用户点击取消');
  120. // uni.reLaunch({
  121. // url:'../user/bespeakDetail?id='+id
  122. // })
  123. uni.redirectTo({
  124. url:'../user/bespeakDetail?id='+id
  125. })
  126. }
  127. }
  128. });
  129. }else{
  130. uni.showToast({
  131. title: res.msg,
  132. icon: 'none',
  133. duration: 3000
  134. });
  135. }
  136. })
  137. },
  138. changeTime(data){
  139. console.log(data)
  140. this.billDate=data
  141. },
  142. cktime(){
  143. this.$refs.timeSelect.open();
  144. },
  145. }
  146. }
  147. </script>
  148. <style scoped lang="less">
  149. .box{
  150. background: #F4F5F7;
  151. min-height: 100vh;
  152. }
  153. .yuyuCheckTis{
  154. color: #C8841C;
  155. line-height: 37rpx;
  156. font-size: 28rpx;
  157. background: #FFF7EB;
  158. padding: 18rpx 24rpx;
  159. font-weight: 400;
  160. }
  161. .cont{
  162. padding: 24rpx;
  163. }
  164. .contkk{
  165. background: #ffffff;
  166. border-radius: 10rpx;
  167. padding: 0 20rpx;
  168. }
  169. .kkline{
  170. display: flex;
  171. padding: 30rpx 0;
  172. border-bottom: 1px solid #EEEEEE;
  173. color: #666666;
  174. font-size: 28rpx;
  175. }
  176. .kkline2{
  177. display: flex;
  178. justify-content: space-between;
  179. padding: 30rpx 0;
  180. border-bottom: 1px solid #EEEEEE;
  181. color: #666666;
  182. font-size: 28rpx;
  183. }
  184. .stars{
  185. color: #FF2400;
  186. }
  187. .kklineRight{
  188. color: #3c3c3c;
  189. font-size: 28rpx;
  190. display: flex;
  191. justify-content: space-between;
  192. width: 450rpx;
  193. }
  194. .kklineLeft {
  195. width: 200rpx;
  196. }
  197. .rightJt{
  198. width: 30rpx;
  199. height: 30rpx;
  200. margin-top: 4rpx;
  201. }
  202. .lineborderNo{
  203. border-bottom: none;
  204. }
  205. .kklineLeft1{
  206. font-weight: 500;
  207. color: #3C3C3C;
  208. font-size: 28rpx;
  209. }
  210. .kklineRight1{
  211. font-weight: 400;
  212. color: #999999;
  213. font-size: 26rpx;
  214. }
  215. .kklineLeft3{
  216. font-weight: 400;
  217. color: #666666;
  218. font-size: 28rpx;
  219. width: 480rpx;
  220. overflow: hidden;
  221. white-space: nowrap;
  222. text-overflow: ellipsis;
  223. }
  224. .kklineRight3{
  225. font-weight: 400;
  226. color: #3C3C3C;
  227. font-size: 28rpx;
  228. }
  229. .bzline{
  230. display: flex;padding: 30rpx 0;
  231. }
  232. .beizInput{
  233. width: 450rpx;font-size: 28rpx;
  234. }
  235. .beiz{
  236. color: #666666;font-size: 28rpx;
  237. width: 200rpx;
  238. }
  239. .bottom-container{
  240. width: 750rpx;
  241. height: 120rpx;
  242. background: #FFFFFF;
  243. box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.1000);
  244. position: fixed;
  245. left: 0;
  246. bottom: 0;
  247. display: flex;
  248. justify-content: space-between;
  249. }
  250. .newyyBotbutton{
  251. width: 204rpx;
  252. height: 74rpx;
  253. background: #D53533;
  254. border-radius: 37rpx;
  255. font-weight: 500;
  256. color: #FFFFFF;
  257. line-height: 74rpx;
  258. text-align: center;
  259. margin-right: 30rpx;
  260. margin-top: 23rpx;
  261. }
  262. .bottom-container-price{
  263. color: #FF0000;
  264. padding-top: 30rpx;
  265. padding-left: 30rpx;
  266. font-size: 32rpx;
  267. }
  268. .qianhaospan{
  269. font-size: 22rpx;
  270. }
  271. .ckj{
  272. color: #999999;font-size: 24rpx;
  273. padding-left: 30rpx;
  274. }
  275. </style>