confirmYuyue.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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" @click="goCarlist">
  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. onShow() {
  88. this.carInfo=this.$store.state.carInfo;
  89. },
  90. methods: {
  91. goCarlist(){
  92. uni.navigateTo({
  93. url:'../user/addCar/cailist'
  94. })
  95. },
  96. yuyue(){
  97. if(!this.billDate){
  98. uni.showToast({
  99. title: '请选择预约时间',
  100. icon: 'none',
  101. duration: 3000
  102. });
  103. return false;
  104. }
  105. this.$http('openreservation/saveOrderSheet', {
  106. billDate: this.billDate,
  107. comment: this.comment,
  108. carID: this.carInfo.id,
  109. orderItem: this.yuyueData.map(item => item.ID).join(),
  110. shopId: this.yyshopInfo.id,
  111. unionId: this.userInfo.unionId
  112. },'POST').then(res => {
  113. var id=res.data
  114. if(res.code==0){
  115. uni.showModal({
  116. title: '提示',
  117. content: '预约成功',
  118. confirmText:'返回首页',
  119. cancelText:'查看订单',
  120. success: function (res) {
  121. if (res.confirm) {
  122. // console.log('用户点击确定');
  123. uni.switchTab({
  124. url:'index'
  125. })
  126. } else if (res.cancel) {
  127. // console.log('用户点击取消');
  128. // uni.reLaunch({
  129. // url:'../user/bespeakDetail?id='+id
  130. // })
  131. uni.redirectTo({
  132. url:'../user/bespeakDetail?id='+id
  133. })
  134. }
  135. }
  136. });
  137. }else{
  138. uni.showToast({
  139. title: res.msg,
  140. icon: 'none',
  141. duration: 3000
  142. });
  143. }
  144. })
  145. },
  146. changeTime(data){
  147. console.log(data)
  148. this.billDate=data
  149. },
  150. cktime(){
  151. this.$refs.timeSelect.open();
  152. },
  153. }
  154. }
  155. </script>
  156. <style scoped lang="less">
  157. .box{
  158. background: #F4F5F7;
  159. min-height: 100vh;
  160. }
  161. .yuyuCheckTis{
  162. color: #C8841C;
  163. line-height: 37rpx;
  164. font-size: 28rpx;
  165. background: #FFF7EB;
  166. padding: 18rpx 24rpx;
  167. font-weight: 400;
  168. }
  169. .cont{
  170. padding: 24rpx;
  171. }
  172. .contkk{
  173. background: #ffffff;
  174. border-radius: 10rpx;
  175. padding: 0 20rpx;
  176. }
  177. .kkline{
  178. display: flex;
  179. padding: 30rpx 0;
  180. border-bottom: 1px solid #EEEEEE;
  181. color: #666666;
  182. font-size: 28rpx;
  183. }
  184. .kkline2{
  185. display: flex;
  186. justify-content: space-between;
  187. padding: 30rpx 0;
  188. border-bottom: 1px solid #EEEEEE;
  189. color: #666666;
  190. font-size: 28rpx;
  191. }
  192. .stars{
  193. color: #FF2400;
  194. }
  195. .kklineRight{
  196. color: #3c3c3c;
  197. font-size: 28rpx;
  198. display: flex;
  199. justify-content: space-between;
  200. width: 450rpx;
  201. }
  202. .kklineLeft {
  203. width: 200rpx;
  204. }
  205. .rightJt{
  206. width: 30rpx;
  207. height: 30rpx;
  208. margin-top: 4rpx;
  209. }
  210. .lineborderNo{
  211. border-bottom: none;
  212. }
  213. .kklineLeft1{
  214. font-weight: 500;
  215. color: #3C3C3C;
  216. font-size: 28rpx;
  217. }
  218. .kklineRight1{
  219. font-weight: 400;
  220. color: #999999;
  221. font-size: 26rpx;
  222. }
  223. .kklineLeft3{
  224. font-weight: 400;
  225. color: #666666;
  226. font-size: 28rpx;
  227. width: 480rpx;
  228. overflow: hidden;
  229. white-space: nowrap;
  230. text-overflow: ellipsis;
  231. }
  232. .kklineRight3{
  233. font-weight: 400;
  234. color: #3C3C3C;
  235. font-size: 28rpx;
  236. }
  237. .bzline{
  238. display: flex;padding: 30rpx 0;
  239. }
  240. .beizInput{
  241. width: 450rpx;font-size: 28rpx;
  242. }
  243. .beiz{
  244. color: #666666;font-size: 28rpx;
  245. width: 200rpx;
  246. }
  247. .bottom-container{
  248. width: 750rpx;
  249. height: 120rpx;
  250. background: #FFFFFF;
  251. box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.1000);
  252. position: fixed;
  253. left: 0;
  254. bottom: 0;
  255. display: flex;
  256. justify-content: space-between;
  257. }
  258. .newyyBotbutton{
  259. width: 204rpx;
  260. height: 74rpx;
  261. background: #D53533;
  262. border-radius: 37rpx;
  263. font-weight: 500;
  264. color: #FFFFFF;
  265. line-height: 74rpx;
  266. text-align: center;
  267. margin-right: 30rpx;
  268. margin-top: 23rpx;
  269. }
  270. .bottom-container-price{
  271. color: #FF0000;
  272. padding-top: 30rpx;
  273. padding-left: 30rpx;
  274. font-size: 32rpx;
  275. }
  276. .qianhaospan{
  277. font-size: 22rpx;
  278. }
  279. .ckj{
  280. color: #999999;font-size: 24rpx;
  281. padding-left: 30rpx;
  282. }
  283. </style>