no message
Showing
6 changed files
with
62 additions
and
21 deletions
| ... | @@ -40,3 +40,10 @@ export function getIndexScheduleList(params) { | ... | @@ -40,3 +40,10 @@ export function getIndexScheduleList(params) { |
| 40 | params: params | 40 | params: params |
| 41 | }) | 41 | }) |
| 42 | } | 42 | } |
| 43 | export function newbilllist(query) { | ||
| 44 | return request({ | ||
| 45 | url: `/ota/norder/list`, | ||
| 46 | method: 'get', | ||
| 47 | params: query | ||
| 48 | }) | ||
| 49 | } | ... | ... |
| ... | @@ -391,6 +391,12 @@ export const constantRoutes = [ | ... | @@ -391,6 +391,12 @@ export const constantRoutes = [ |
| 391 | name: 'photography', | 391 | name: 'photography', |
| 392 | meta: { title: 'Photography Appointment' } | 392 | meta: { title: 'Photography Appointment' } |
| 393 | }, | 393 | }, |
| 394 | { | ||
| 395 | path: 'pay', | ||
| 396 | component: () => import('@/viewsPc/booking/pay'), | ||
| 397 | name: 'bookingPay', | ||
| 398 | meta: { title: 'pay' } | ||
| 399 | } | ||
| 394 | ] | 400 | ] |
| 395 | }, | 401 | }, |
| 396 | { | 402 | { | ... | ... |
| ... | @@ -44,7 +44,7 @@ | ... | @@ -44,7 +44,7 @@ |
| 44 | </div> | 44 | </div> |
| 45 | </el-form-item> | 45 | </el-form-item> |
| 46 | <el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="`入住人${index+1}`"> | 46 | <el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="`入住人${index+1}`"> |
| 47 | <el-input v-model="rzUserArr[index]" placeholder="每间填一位住客姓名"/> | 47 | <el-input v-model="rzUserArr[index]" :placeholder="language==0?'每间填一位住客姓名':'Each room fill in one name of the guest'"/> |
| 48 | </el-form-item> | 48 | </el-form-item> |
| 49 | <el-form-item :label="language==0?'预计到店':'Expected check-in'"> | 49 | <el-form-item :label="language==0?'预计到店':'Expected check-in'"> |
| 50 | <el-select v-model="form.ddDate" | 50 | <el-select v-model="form.ddDate" |
| ... | @@ -143,8 +143,9 @@ import {ref, reactive, onMounted} from "vue"; | ... | @@ -143,8 +143,9 @@ import {ref, reactive, onMounted} from "vue"; |
| 143 | import {useStorage} from "@vueuse/core/index"; | 143 | import {useStorage} from "@vueuse/core/index"; |
| 144 | import {checkResidueRoom, newsSubmitOrderHotel} from "@/apiPc/booking" | 144 | import {checkResidueRoom, newsSubmitOrderHotel} from "@/apiPc/booking" |
| 145 | import dayjs from 'dayjs' | 145 | import dayjs from 'dayjs' |
| 146 | import {ElMessage} from "element-plus"; | 146 | import {ElMessage,ElMessageBox} from "element-plus"; |
| 147 | 147 | import useUserStore from "@/store/modules/user"; | |
| 148 | const user = useUserStore().user | ||
| 148 | const language = useStorage('language', 0) | 149 | const language = useStorage('language', 0) |
| 149 | const router = useRouter() | 150 | const router = useRouter() |
| 150 | const route = useRoute() | 151 | const route = useRoute() |
| ... | @@ -324,6 +325,10 @@ function countMoney() { | ... | @@ -324,6 +325,10 @@ function countMoney() { |
| 324 | } | 325 | } |
| 325 | 326 | ||
| 326 | function submit() { | 327 | function submit() { |
| 328 | if(!user){ | ||
| 329 | useUserStore().setReLogin() | ||
| 330 | } | ||
| 331 | |||
| 327 | if (usedays == 0) { | 332 | if (usedays == 0) { |
| 328 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' : 'Check-in time must be greater than one day') | 333 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' : 'Check-in time must be greater than one day') |
| 329 | return | 334 | return |
| ... | @@ -365,7 +370,7 @@ function submit() { | ... | @@ -365,7 +370,7 @@ function submit() { |
| 365 | console.log(form.value.room) | 370 | console.log(form.value.room) |
| 366 | 371 | ||
| 367 | // 提交确认 | 372 | // 提交确认 |
| 368 | ElMessage.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { | 373 | ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { |
| 369 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 374 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 370 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | 375 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 371 | type: 'warning' | 376 | type: 'warning' |
| ... | @@ -377,6 +382,13 @@ function submit() { | ... | @@ -377,6 +382,13 @@ function submit() { |
| 377 | checkreRooms() | 382 | checkreRooms() |
| 378 | } else { | 383 | } else { |
| 379 | //去付钱 | 384 | //去付钱 |
| 385 | router.push({ | ||
| 386 | name: 'bookingPay', | ||
| 387 | query: { | ||
| 388 | orderId:res.data.orderId, | ||
| 389 | money:res.data.total | ||
| 390 | } | ||
| 391 | }) | ||
| 380 | } | 392 | } |
| 381 | } else { | 393 | } else { |
| 382 | ElMessage.warning(language.value == 0 ? '无可预定的房间' : 'No rooms available to book') | 394 | ElMessage.warning(language.value == 0 ? '无可预定的房间' : 'No rooms available to book') |
| ... | @@ -385,21 +397,6 @@ function submit() { | ... | @@ -385,21 +397,6 @@ function submit() { |
| 385 | }) | 397 | }) |
| 386 | } | 398 | } |
| 387 | 399 | ||
| 388 | function pay() { | ||
| 389 | //确认付款 | ||
| 390 | ElMessage.confirm(language.value == 0 ? '确认付款吗?' : 'Confirm payment?', { | ||
| 391 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 392 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 393 | type: 'warning' | ||
| 394 | }).then(() => { | ||
| 395 | newsSubmitOrderHotel(form.value).then(res => { | ||
| 396 | if (res.data) { | ||
| 397 | if (res.data.roomNum == -100) { | ||
| 398 | } | ||
| 399 | } | ||
| 400 | }) | ||
| 401 | }) | ||
| 402 | } | ||
| 403 | </script> | 400 | </script> |
| 404 | 401 | ||
| 405 | <style scoped lang="scss"> | 402 | <style scoped lang="scss"> | ... | ... |
src/viewsPc/booking/pay.vue
0 → 100644
This diff is collapsed.
Click to expand it.
| ... | @@ -3,7 +3,25 @@ | ... | @@ -3,7 +3,25 @@ |
| 3 | <el-card :body-style="{'padding':'0'}"> | 3 | <el-card :body-style="{'padding':'0'}"> |
| 4 | <div class="indexTitle"><h3 class="leftboderTT">{{ language==0?'我的预订':'My reservation' }}</h3></div> | 4 | <div class="indexTitle"><h3 class="leftboderTT">{{ language==0?'我的预订':'My reservation' }}</h3></div> |
| 5 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | 5 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> |
| 6 | <div v-for="b in list"> | ||
| 7 | <h3>{{b.name}}</h3> | ||
| 6 | 8 | ||
| 9 | <div v-if="b.orderType == 0"> | ||
| 10 | <div><label class="blueTag"> 酒店订单</label> | ||
| 11 | 订单编号: | ||
| 12 | {{ b.id }}</div> | ||
| 13 | <div> | ||
| 14 | {{b.messageObj?.roomStayDate}} | ||
| 15 | </div> | ||
| 16 | <div> | ||
| 17 | {{b.messageObj?.roomName}} | ||
| 18 | </div> | ||
| 19 | <div> | ||
| 20 | {{b.messageObj?.roomInfo}} | ||
| 21 | </div> | ||
| 22 | </div> | ||
| 23 | {{b}} | ||
| 24 | </div> | ||
| 7 | <div class="pd20"></div> | 25 | <div class="pd20"></div> |
| 8 | </el-card> | 26 | </el-card> |
| 9 | </div> | 27 | </div> |
| ... | @@ -12,8 +30,21 @@ | ... | @@ -12,8 +30,21 @@ |
| 12 | <script setup> | 30 | <script setup> |
| 13 | import {onMounted} from "@vue/runtime-core"; | 31 | import {onMounted} from "@vue/runtime-core"; |
| 14 | import {useStorage} from "@vueuse/core/index"; | 32 | import {useStorage} from "@vueuse/core/index"; |
| 33 | import {newbilllist} from "@/apiPc/common"; | ||
| 15 | const language= useStorage('language',0) | 34 | const language= useStorage('language',0) |
| 16 | const list = ref([]) | 35 | const list = ref([]) |
| 36 | |||
| 37 | onMounted(()=>{ | ||
| 38 | getList() | ||
| 39 | }) | ||
| 40 | function getList() { | ||
| 41 | newbilllist().then(res=>{ | ||
| 42 | list.value = res.rows | ||
| 43 | for (var b of list.value) { | ||
| 44 | b.messageObj = JSON.parse(b.message) | ||
| 45 | } | ||
| 46 | }) | ||
| 47 | } | ||
| 17 | </script> | 48 | </script> |
| 18 | 49 | ||
| 19 | <style scoped lang="scss"> | 50 | <style scoped lang="scss"> | ... | ... |
| ... | @@ -68,8 +68,8 @@ const props = defineProps({ | ... | @@ -68,8 +68,8 @@ const props = defineProps({ |
| 68 | }) | 68 | }) |
| 69 | const language= useStorage('language',0) | 69 | const language= useStorage('language',0) |
| 70 | function goBooking(n) { | 70 | function goBooking(n) { |
| 71 | ElMessage.warning(language.value==0?'建设中,敬请期待':'Building!') | 71 | // ElMessage.warning(language.value==0?'建设中,敬请期待':'Building!') |
| 72 | return | 72 | // return |
| 73 | switch (n) { | 73 | switch (n) { |
| 74 | case 0: | 74 | case 0: |
| 75 | // 票务 | 75 | // 票务 | ... | ... |
-
Please register or sign in to post a comment