confirmYuyue.vue 6.6 KB

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