no message
Showing
31 changed files
with
333 additions
and
146 deletions
public/file/操作指引.zip
0 → 100644
This file is too large to display.
| ... | @@ -171,7 +171,15 @@ export function getBaseInfoByActiveId(id) { | ... | @@ -171,7 +171,15 @@ export function getBaseInfoByActiveId(id) { |
| 171 | method: 'get' | 171 | method: 'get' |
| 172 | }) | 172 | }) |
| 173 | } | 173 | } |
| 174 | 174 | export function checkRoomPayByUserId(id) { | |
| 175 | return request({ | ||
| 176 | url: `/ota/norder/checkRoomPayByUserId`, | ||
| 177 | method: 'get', | ||
| 178 | params: { | ||
| 179 | extId: id | ||
| 180 | } | ||
| 181 | }) | ||
| 182 | } | ||
| 175 | export function submitInvoice(form) { | 183 | export function submitInvoice(form) { |
| 176 | return request({ | 184 | return request({ |
| 177 | url: `/ota/invoice`, | 185 | url: `/ota/invoice`, | ... | ... |
src/assets/booking/cl_text_c.png
0 → 100644
3.32 KB
src/assets/booking/cl_text_e.png
0 → 100644
3.33 KB
src/assets/booking/cy_text_c.png
0 → 100644
3.76 KB
src/assets/booking/cy_text_e.png
0 → 100644
3.43 KB
src/assets/booking/hz_text_c.png
0 → 100644
3.55 KB
src/assets/booking/hz_text_e.png
0 → 100644
3.33 KB
src/assets/booking/jd_text_c.png
0 → 100644
3.16 KB
src/assets/booking/jd_text_e.png
0 → 100644
3.13 KB
| ... | @@ -80,20 +80,22 @@ | ... | @@ -80,20 +80,22 @@ |
| 80 | <img class="kf" src="@/assets/logo/btn01.png"/> | 80 | <img class="kf" src="@/assets/logo/btn01.png"/> |
| 81 | <div class="text-center mt10 gradient-text">在线客服</div> | 81 | <div class="text-center mt10 gradient-text">在线客服</div> |
| 82 | </div> | 82 | </div> |
| 83 | <div @click="goHelp"> | 83 | <div @click="goHelpZH"> |
| 84 | <img class="kf" src="@/assets/logo/btn02.png"/> | 84 | <a target="_blank" href="/file/操作指引.zip"> |
| 85 | <div class="text-center mt10 gradient-text">帮助中心</div> | 85 | <img class="kf" src="@/assets/logo/btn02.png"/> |
| 86 | <div class="text-center mt10 gradient-text">操作指引</div> | ||
| 87 | </a> | ||
| 86 | </div> | 88 | </div> |
| 87 | </div> | 89 | </div> |
| 88 | <div class="mlb" v-else> | 90 | <div class="mlb" v-else> |
| 89 | <div target="_blank" href="#" | 91 | <div target="_blank" href="#" |
| 90 | onclick="javascript:window.open('https://ykf-weixin01.7moor.com/wapchat.html?accessId=707daf80-02c6-11ef-9a4d-85cd5dacc5bf&fromUrl=&urlTitle=&language=EN','_blank','height=700px,width=700px,top=100,left=150,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')" title="Live Chat"> | 92 | onclick="javascript:window.open('https://ykf-weixin01.7moor.com/wapchat.html?accessId=707daf80-02c6-11ef-9a4d-85cd5dacc5bf&fromUrl=&urlTitle=&language=EN','_blank','height=700px,width=700px,top=100,left=150,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')" title="Live Chat"> |
| 91 | <img class="kf" src="@/assets/logo/btn01.png"/> | 93 | <img class="kf" src="@/assets/logo/btn01.png"/> |
| 92 | <div class="text-center gradient-text">Live Chat</div> | 94 | <div class="text-center gradient-text">LIVE CHAT</div> |
| 93 | </div> | 95 | </div> |
| 94 | <div @click="goHelp"> | 96 | <div @click="goHelp"> |
| 95 | <img class="kf" src="@/assets/logo/btn02.png"/> | 97 | <img class="kf" src="@/assets/logo/btn02.png"/> |
| 96 | <div class="text-center gradient-text">Demo Video</div> | 98 | <div class="text-center gradient-text">GUIDELINE</div> |
| 97 | </div> | 99 | </div> |
| 98 | </div> | 100 | </div> |
| 99 | </div> | 101 | </div> |
| ... | @@ -108,10 +110,13 @@ const goHelp = () => { | ... | @@ -108,10 +110,13 @@ const goHelp = () => { |
| 108 | router.push({ | 110 | router.push({ |
| 109 | path: `/news/list/20000100`, | 111 | path: `/news/list/20000100`, |
| 110 | query:{ | 112 | query:{ |
| 111 | kindName: language.value==0?'帮助中心':'Demo Video' | 113 | kindName: language.value==0?'操作指引':'GUIDELINE' |
| 112 | } | 114 | } |
| 113 | }) | 115 | }) |
| 114 | } | 116 | } |
| 117 | const goHelpZH = () => { | ||
| 118 | |||
| 119 | } | ||
| 115 | </script> | 120 | </script> |
| 116 | 121 | ||
| 117 | <style lang="scss" scoped> | 122 | <style lang="scss" scoped> | ... | ... |
| ... | @@ -54,8 +54,8 @@ | ... | @@ -54,8 +54,8 @@ |
| 54 | <span :class="language==1?'active':''" @click="changeLanguage(1)">EN</span> | 54 | <span :class="language==1?'active':''" @click="changeLanguage(1)">EN</span> |
| 55 | </div> | 55 | </div> |
| 56 | <div class="ml20 forPc" > | 56 | <div class="ml20 forPc" > |
| 57 | <el-button v-if="!isLogin" style="border-radius: 20px;" class="loginBtn"> | 57 | <el-button v-if="!isLogin" @click="goLogin" style="border-radius: 20px;" class="loginBtn"> |
| 58 | <span @click="goLogin">{{ language==0?'登录':'LOGIN' }}</span> | 58 | <span>{{ language==0?'登录':'LOGIN' }}</span> |
| 59 | <!-- | <span @click="goRegister">注册</span>--> | 59 | <!-- | <span @click="goRegister">注册</span>--> |
| 60 | </el-button> | 60 | </el-button> |
| 61 | 61 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="banner"> | 3 | <div class="banner"> |
| 4 | <img src="@/assets/booking/cl_text.png"> | 4 | <img v-if="language==0" src="@/assets/booking/cl_text_c.png"> |
| 5 | <img v-else src="@/assets/booking/cl_text_e.png"> | ||
| 5 | </div> | 6 | </div> |
| 6 | <div class="box"> | 7 | <div class="box"> |
| 7 | <div class="searchBar"> | 8 | <div class="searchBar"> |
| ... | @@ -72,7 +73,7 @@ | ... | @@ -72,7 +73,7 @@ |
| 72 | 73 | ||
| 73 | </el-col> | 74 | </el-col> |
| 74 | <el-col :span="3"> | 75 | <el-col :span="3"> |
| 75 | <el-button class="btn-lineG w100" round type="primary" @click="goOrder(h,r)">{{ language==0?'我要预定':'Select' }}</el-button> | 76 | <el-button class="btn-lineG w100" round type="primary" @click="goOrder(h,r)">{{ language==0?'我要预订':'Select' }}</el-button> |
| 76 | </el-col> | 77 | </el-col> |
| 77 | </el-row> | 78 | </el-row> |
| 78 | </div> | 79 | </div> | ... | ... |
| ... | @@ -22,8 +22,8 @@ | ... | @@ -22,8 +22,8 @@ |
| 22 | <div class="roomType">{{ car.carType }}</div> | 22 | <div class="roomType">{{ car.carType }}</div> |
| 23 | <div class="tagbox"> | 23 | <div class="tagbox"> |
| 24 | <span class="tag">{{ car.carColor }}</span> | 24 | <span class="tag">{{ car.carColor }}</span> |
| 25 | <span class="tag" v-show="car.checkOut==1">可送车</span> | 25 | <span class="tag" v-show="car.checkOut==1">{{ language == 0 ?'可送车':'Can send car' }}</span> |
| 26 | <span class="tag" v-show="car.checkIn==1">可接车</span> | 26 | <span class="tag" v-show="car.checkIn==1">{{ language == 0 ?'可接车':'Can pick up' }}</span> |
| 27 | </div> | 27 | </div> |
| 28 | <div class="room"> | 28 | <div class="room"> |
| 29 | <span>{{ language == 0 ? '座位数' : 'Seats' }}: {{ car.carSeat }}</span> | 29 | <span>{{ language == 0 ? '座位数' : 'Seats' }}: {{ car.carSeat }}</span> |
| ... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | ||
| 39 | <div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div> | 39 | <div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div> |
| 40 | <div class="border-rr mt20 pd20"> | 40 | <div class="border-rr mt20 pd20"> |
| 41 | <el-form :model="form" :label-width="language == 0 ?'120':'150'" :rules="rules" ref="formRef"> | 41 | <el-form :model="form" :label-width="language == 0 ?'120':'200'" :rules="rules" ref="formRef"> |
| 42 | <el-form-item :label="language==0?'车辆数量':'cars'" required prop="num"> | 42 | <el-form-item :label="language==0?'车辆数量':'cars'" required prop="num"> |
| 43 | <el-input-number v-model="form.num" :min="1" @change="changecarNum"/> | 43 | <el-input-number v-model="form.num" :min="1" @change="changecarNum"/> |
| 44 | </el-form-item> | 44 | </el-form-item> |
| ... | @@ -53,9 +53,9 @@ | ... | @@ -53,9 +53,9 @@ |
| 53 | </el-form-item> | 53 | </el-form-item> |
| 54 | 54 | ||
| 55 | <div v-show="form.useType?.indexOf('0')> -1"> | 55 | <div v-show="form.useType?.indexOf('0')> -1"> |
| 56 | <h3 class="afterLine">接站信息</h3> | 56 | <h3 class="afterLine">{{ language==0?'接站信息':'Pick up information' }}</h3> |
| 57 | <el-form-item :label="language==0?'用车日期':'Date'" required> | 57 | <el-form-item :label="language==0?'用车日期':'Date'" required> |
| 58 | <el-date-picker v-model="date1" | 58 | <el-date-picker v-model="date1" :disabled-date="disabledDate" |
| 59 | type="date" | 59 | type="date" |
| 60 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" | 60 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" |
| 61 | value-format="YYYY-MM-DD"/> | 61 | value-format="YYYY-MM-DD"/> |
| ... | @@ -73,16 +73,16 @@ | ... | @@ -73,16 +73,16 @@ |
| 73 | <el-form-item :label="language==0?'联系电话':'Phone'" required> | 73 | <el-form-item :label="language==0?'联系电话':'Phone'" required> |
| 74 | <el-input type="text" v-model="form.pickUpBo.phone"/> | 74 | <el-input type="text" v-model="form.pickUpBo.phone"/> |
| 75 | </el-form-item> | 75 | </el-form-item> |
| 76 | <el-form-item label="人数" required> | 76 | <el-form-item :label="language==0?'人数':'Person Count'" required> |
| 77 | <el-input type="text" v-model="form.pickUpBo.count"/> | 77 | <el-input type="text" v-model="form.pickUpBo.count"/> |
| 78 | </el-form-item> | 78 | </el-form-item> |
| 79 | <el-form-item label="航班/火车班次" required> | 79 | <el-form-item :label="language==0?'航班/火车班次:':'Flight/Train No'" required> |
| 80 | <el-input type="text" v-model="form.pickUpBo.no"/> | 80 | <el-input type="text" v-model="form.pickUpBo.no"/> |
| 81 | </el-form-item> | 81 | </el-form-item> |
| 82 | <el-form-item label="接机/接站地点" required> | 82 | <el-form-item :label="language==0?'接机/接站地点':'Pick up/Drop off Address'" required> |
| 83 | <el-input type="text" v-model="form.pickUpBo.noAddress"/> | 83 | <el-input type="text" v-model="form.pickUpBo.noAddress"/> |
| 84 | </el-form-item> | 84 | </el-form-item> |
| 85 | <el-form-item label="送达地点" required> | 85 | <el-form-item :label="language==0?'送达地点':'Delivery Address'" required> |
| 86 | <el-input type="text" v-model="form.pickUpBo.deliveryAddress"/> | 86 | <el-input type="text" v-model="form.pickUpBo.deliveryAddress"/> |
| 87 | </el-form-item> | 87 | </el-form-item> |
| 88 | <el-form-item :label="language==0?'备注':'Remarks'"> | 88 | <el-form-item :label="language==0?'备注':'Remarks'"> |
| ... | @@ -90,9 +90,9 @@ | ... | @@ -90,9 +90,9 @@ |
| 90 | </el-form-item> | 90 | </el-form-item> |
| 91 | </div> | 91 | </div> |
| 92 | <div v-show="form.useType?.indexOf('1')> -1"> | 92 | <div v-show="form.useType?.indexOf('1')> -1"> |
| 93 | <h3 class="afterLine">送站信息</h3> | 93 | <h3 class="afterLine">{{ language==0?'送站信息':'Drop off information' }}</h3> |
| 94 | <el-form-item :label="language==0?'用车日期':'Date'" required> | 94 | <el-form-item :label="language==0?'用车日期':'Date'" required> |
| 95 | <el-date-picker v-model="date2" | 95 | <el-date-picker v-model="date2" :disabled-date="disabledDate" |
| 96 | type="date" | 96 | type="date" |
| 97 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" | 97 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" |
| 98 | value-format="YYYY-MM-DD"/> | 98 | value-format="YYYY-MM-DD"/> |
| ... | @@ -171,7 +171,7 @@ | ... | @@ -171,7 +171,7 @@ |
| 171 | import {useRouter, useRoute} from "vue-router"; | 171 | import {useRouter, useRoute} from "vue-router"; |
| 172 | import {ref, reactive, onMounted} from "vue"; | 172 | import {ref, reactive, onMounted} from "vue"; |
| 173 | import {useStorage} from "@vueuse/core/index"; | 173 | import {useStorage} from "@vueuse/core/index"; |
| 174 | import {checkResidueRoom, newsSubmitOrderHotel, submitOrderCar} from "@/apiPc/booking" | 174 | import {checkResidueRoom, getBaseInfoByActiveId, newsSubmitOrderHotel, submitOrderCar} from "@/apiPc/booking" |
| 175 | import dayjs from 'dayjs' | 175 | import dayjs from 'dayjs' |
| 176 | import {ElMessage, ElMessageBox} from "element-plus"; | 176 | import {ElMessage, ElMessageBox} from "element-plus"; |
| 177 | import useUserStore from "@/store/modules/user"; | 177 | import useUserStore from "@/store/modules/user"; |
| ... | @@ -203,6 +203,7 @@ const rzUserArr = ref([]) | ... | @@ -203,6 +203,7 @@ const rzUserArr = ref([]) |
| 203 | const money = ref(0) | 203 | const money = ref(0) |
| 204 | const choseRooms = ref([]) | 204 | const choseRooms = ref([]) |
| 205 | const rules = ref({}) | 205 | const rules = ref({}) |
| 206 | const lform = ref({}) | ||
| 206 | 207 | ||
| 207 | 208 | ||
| 208 | onMounted(() => { | 209 | onMounted(() => { |
| ... | @@ -210,6 +211,7 @@ onMounted(() => { | ... | @@ -210,6 +211,7 @@ onMounted(() => { |
| 210 | car.value = JSON.parse(decodeURIComponent(route.query.car)) | 211 | car.value = JSON.parse(decodeURIComponent(route.query.car)) |
| 211 | money.value = 0 | 212 | money.value = 0 |
| 212 | console.log(item.value, car.value) | 213 | console.log(item.value, car.value) |
| 214 | initDays() | ||
| 213 | }) | 215 | }) |
| 214 | 216 | ||
| 215 | function changeUseType(e) { | 217 | function changeUseType(e) { |
| ... | @@ -240,6 +242,20 @@ function bindTimeChange(e) { | ... | @@ -240,6 +242,20 @@ function bindTimeChange(e) { |
| 240 | function bindTimeChange2(e) { | 242 | function bindTimeChange2(e) { |
| 241 | revTime2.value = e | 243 | revTime2.value = e |
| 242 | } | 244 | } |
| 245 | function initDays() { | ||
| 246 | getBaseInfoByActiveId(route.params.cptId).then(res=>{ | ||
| 247 | lform.value = res.data | ||
| 248 | }).catch(err=>{ | ||
| 249 | console.log(err) | ||
| 250 | }) | ||
| 251 | } | ||
| 252 | function disabledDate(date) { | ||
| 253 | // const today = dayjs().format('YYYY-MM-DD') | ||
| 254 | if (form.value.carStart) { | ||
| 255 | return date.getTime() > dayjs(form.value.carStart).valueOf() | ||
| 256 | } | ||
| 257 | return true | ||
| 258 | } | ||
| 243 | function submit() { | 259 | function submit() { |
| 244 | if (!user) { | 260 | if (!user) { |
| 245 | useUserStore().setReLogin() | 261 | useUserStore().setReLogin() | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="banner"> | 3 | <div class="banner"> |
| 4 | <img src="@/assets/booking/cy_text.png"> | 4 | <img v-if="language==0" src="@/assets/booking/cy_text_c.png"> |
| 5 | <img v-else src="@/assets/booking/cy_text_e.png"> | ||
| 5 | </div> | 6 | </div> |
| 6 | <div class="box"> | 7 | <div class="box"> |
| 7 | <div class="searchBar"> | 8 | <div class="searchBar"> | ... | ... |
| ... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
| 25 | <el-form-item :label="language==0?'订餐周期':'Check-in date'" required> | 25 | <el-form-item :label="language==0?'订餐周期':'Check-in date'" required> |
| 26 | <el-date-picker @change="getDaysBetween" | 26 | <el-date-picker @change="getDaysBetween" |
| 27 | v-model="rzRange" | 27 | v-model="rzRange" |
| 28 | type="daterange" | 28 | type="daterange" :disabled-date="disabledDate" |
| 29 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" | 29 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" |
| 30 | value-format="YYYY-MM-DD"/> | 30 | value-format="YYYY-MM-DD"/> |
| 31 | <!-- :picker-options="pickerOptions"--> | 31 | <!-- :picker-options="pickerOptions"--> |
| ... | @@ -34,10 +34,10 @@ | ... | @@ -34,10 +34,10 @@ |
| 34 | <el-form-item :label="language==0?'联系人':'Contacts'" required> | 34 | <el-form-item :label="language==0?'联系人':'Contacts'" required> |
| 35 | <el-input v-model="form.contacts"/> | 35 | <el-input v-model="form.contacts"/> |
| 36 | </el-form-item> | 36 | </el-form-item> |
| 37 | <el-form-item :label="language==0?'联系电话':'Contact phone'" required prop="phone"> | 37 | <el-form-item :label="language==0?'联系电话':'Contact phone'" required> |
| 38 | <el-input v-model="form.phone"/> | 38 | <el-input v-model="form.phone"/> |
| 39 | </el-form-item> | 39 | </el-form-item> |
| 40 | <el-form-item :label="language==0?'送餐时间':'Delivery time'" required prop="phone"> | 40 | <el-form-item :label="language==0?'送餐时间':'Delivery time'"> |
| 41 | <div style="line-height: 36px;">{{food.psStart}} - {{food.psEnd}}</div> | 41 | <div style="line-height: 36px;">{{food.psStart}} - {{food.psEnd}}</div> |
| 42 | </el-form-item> | 42 | </el-form-item> |
| 43 | <el-form-item :label="language==0?'配送地址':'Delivery address'"> | 43 | <el-form-item :label="language==0?'配送地址':'Delivery address'"> |
| ... | @@ -45,8 +45,8 @@ | ... | @@ -45,8 +45,8 @@ |
| 45 | </el-form-item> | 45 | </el-form-item> |
| 46 | <el-form-item :label="language==0?'说明':'Instructions'"> | 46 | <el-form-item :label="language==0?'说明':'Instructions'"> |
| 47 | <div class="tip" v-if="language==0"> | 47 | <div class="tip" v-if="language==0"> |
| 48 | *如预定多天的餐饮,将分多天进行配送。<br/> | 48 | *如预订多天的餐饮,将分多天进行配送。<br/> |
| 49 | *每日送餐时间只配送当日预定的餐饮。 | 49 | *每日送餐时间只配送当日预订的餐饮。 |
| 50 | </div> | 50 | </div> |
| 51 | <div class="tip" v-else>1.If you have ordered food for multiple days, it will be delivered in multiple days. | 51 | <div class="tip" v-else>1.If you have ordered food for multiple days, it will be delivered in multiple days. |
| 52 | <br/> | 52 | <br/> |
| ... | @@ -98,7 +98,7 @@ | ... | @@ -98,7 +98,7 @@ |
| 98 | import {useRouter, useRoute} from "vue-router"; | 98 | import {useRouter, useRoute} from "vue-router"; |
| 99 | import {ref, reactive, onMounted} from "vue"; | 99 | import {ref, reactive, onMounted} from "vue"; |
| 100 | import {useStorage} from "@vueuse/core/index"; | 100 | import {useStorage} from "@vueuse/core/index"; |
| 101 | import {checkResidueRoom, newsSubmitOrderHotel, submitOrderFood} from "@/apiPc/booking" | 101 | import {checkResidueRoom, getBaseInfoByActiveId, newsSubmitOrderHotel, submitOrderFood} from "@/apiPc/booking" |
| 102 | import dayjs from 'dayjs' | 102 | import dayjs from 'dayjs' |
| 103 | import {ElMessage,ElMessageBox} from "element-plus"; | 103 | import {ElMessage,ElMessageBox} from "element-plus"; |
| 104 | import useUserStore from "@/store/modules/user"; | 104 | import useUserStore from "@/store/modules/user"; |
| ... | @@ -119,6 +119,7 @@ const rzUserArr = ref([]) | ... | @@ -119,6 +119,7 @@ const rzUserArr = ref([]) |
| 119 | const money = ref(0) | 119 | const money = ref(0) |
| 120 | const choseDays = ref([]) | 120 | const choseDays = ref([]) |
| 121 | const rules = ref({}) | 121 | const rules = ref({}) |
| 122 | const lform = ref({}) | ||
| 122 | 123 | ||
| 123 | let usedays = 0 | 124 | let usedays = 0 |
| 124 | onMounted(() => { | 125 | onMounted(() => { |
| ... | @@ -131,13 +132,29 @@ onMounted(() => { | ... | @@ -131,13 +132,29 @@ onMounted(() => { |
| 131 | form.value.total = food.value.foodPriceEn | 132 | form.value.total = food.value.foodPriceEn |
| 132 | } | 133 | } |
| 133 | console.log(food.value,restaurant.value) | 134 | console.log(food.value,restaurant.value) |
| 135 | initDays() | ||
| 134 | const today = dayjs() | 136 | const today = dayjs() |
| 135 | canOrderStart.value = today | ||
| 136 | if (food.value.hqNewStart < canOrderStart.value) { | ||
| 137 | food.value.hqNewStart = canOrderStart.value | ||
| 138 | } | ||
| 139 | }) | 137 | }) |
| 138 | function initDays() { | ||
| 139 | getBaseInfoByActiveId(route.params.cptId).then(res=>{ | ||
| 140 | lform.value = res.data | ||
| 141 | }).catch(err=>{ | ||
| 142 | console.log(err) | ||
| 143 | }) | ||
| 144 | } | ||
| 140 | 145 | ||
| 146 | function disabledDate(date) { | ||
| 147 | //判读今天大与form.value.hqStart | ||
| 148 | if (lform.value.foodStart) { | ||
| 149 | const today = dayjs().format('YYYY-MM-DD') | ||
| 150 | if (lform.value.foodStart < today) { | ||
| 151 | return !((date.getTime() >= dayjs(today).valueOf())&&(date.getTime() <= dayjs(lform.value.foodEnd).valueOf())) | ||
| 152 | } else { | ||
| 153 | return !((date.getTime() >= dayjs(lform.value.foodStart).valueOf())&&(date.getTime() <= dayjs(lform.value.foodEnd).valueOf())) | ||
| 154 | } | ||
| 155 | } | ||
| 156 | return true | ||
| 157 | } | ||
| 141 | function changeNum() { | 158 | function changeNum() { |
| 142 | let moneyAll = 0 | 159 | let moneyAll = 0 |
| 143 | if(language.value == 0){ | 160 | if(language.value == 0){ |
| ... | @@ -196,6 +213,18 @@ function submit() { | ... | @@ -196,6 +213,18 @@ function submit() { |
| 196 | useUserStore().setReLogin() | 213 | useUserStore().setReLogin() |
| 197 | return | 214 | return |
| 198 | } | 215 | } |
| 216 | if(rzRange.value.length==0){ | ||
| 217 | ElMessage.warning(language.value == 0 ? '请选择订餐时间' : 'Please select the meal time') | ||
| 218 | return | ||
| 219 | } | ||
| 220 | if(!form.value.contacts){ | ||
| 221 | ElMessage.warning(language.value == 0 ? '请输入联系人' : 'Please enter the contact') | ||
| 222 | return | ||
| 223 | } | ||
| 224 | if(!form.value.phone){ | ||
| 225 | ElMessage.warning(language.value == 0 ? '请输入手机号' : 'Please enter the phone number') | ||
| 226 | return | ||
| 227 | } | ||
| 199 | if(rzRange.value.length>0){ | 228 | if(rzRange.value.length>0){ |
| 200 | form.value.dcStart = rzRange.value[0] | 229 | form.value.dcStart = rzRange.value[0] |
| 201 | form.value.dcEnd = rzRange.value[1] | 230 | form.value.dcEnd = rzRange.value[1] | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="banner"> | 3 | <div class="banner"> |
| 4 | <img src="@/assets/booking/jd_text.png"> | 4 | <img v-if="language==0" src="@/assets/booking/jd_text_c.png"> |
| 5 | <img v-else src="@/assets/booking/jd_text_e.png"> | ||
| 5 | </div> | 6 | </div> |
| 6 | <div class="box"> | 7 | <div class="box"> |
| 7 | <div class="searchBar"> | 8 | <div class="searchBar"> |
| ... | @@ -14,29 +15,34 @@ | ... | @@ -14,29 +15,34 @@ |
| 14 | 15 | ||
| 15 | <div class="box" v-loading="loading"> | 16 | <div class="box" v-loading="loading"> |
| 16 | <el-row :gutter="20"> | 17 | <el-row :gutter="20"> |
| 17 | <el-col :lg="12" :md="24" :sm="24" xs="24" :xl="12" v-for="(h,index) in list" class="mb20"> | 18 | <el-col :lg="24" :md="24" :sm="24" :xs="24" :xl="24" v-for="(h,index) in list" class="mb20"> |
| 18 | <el-card @click="goDetail(h)"> | 19 | <el-card @click="goDetail(h)"> |
| 19 | <!-- 酒店列表--> | 20 | <!-- 酒店列表--> |
| 20 | <el-row class="hotel" align="middle" :gutter="20"> | 21 | <el-row class="hotel" align="middle" :gutter="20"> |
| 21 | <el-col :span="12"> | 22 | <el-col :span="6"> |
| 22 | <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/> | 23 | <div class="imgbox"> |
| 24 | <img class="w100" :src="fillImgUrl(h.photos?.split(',')[0])"/> | ||
| 25 | </div> | ||
| 23 | </el-col> | 26 | </el-col> |
| 24 | <el-col :span="12"> | 27 | <el-col :span="12"> |
| 25 | <h3 class="esp flex">{{h.name}} | 28 | <h3 class="esp">{{h.name}}</h3> |
| 26 | <div class="starBox ml10"> | 29 | <div class="starBox"> |
| 27 | <img v-for="i in Number(h.starLevel||0)" src="@/assets/booking/star.png"> | 30 | <img v-for="i in Number(h.starLevel||0)" src="@/assets/booking/star.png"> |
| 28 | </div> | 31 | </div> |
| 29 | </h3> | 32 | <div class="tagbox esp"> |
| 30 | <div class="tagbox"> | 33 | <span v-for="(t,index) in h.label?.split(',')" v-show="index<4">{{t}}</span> |
| 31 | <span v-for="(t,index) in h.label?.split(',')" v-show="index<3">{{t}}</span> | ||
| 32 | <a v-show="h.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a> | 34 | <a v-show="h.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a> |
| 33 | </div> | 35 | </div> |
| 34 | <p class="esp addr"> | 36 | <p class="esp addr mt20"> |
| 35 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon> | 37 | <el-icon size="16" style="position: relative;top: 2px" color="#929AA0"><LocationFilled /></el-icon> |
| 36 | {{h.address}} | 38 | {{h.address}} |
| 37 | </p> | 39 | </p> |
| 38 | <div class="price">¥<span>{{ h.price }}</span><i v-if="language==0">起</i></div> | 40 | </el-col> |
| 39 | <el-button class="btn-lineG w200px" round type="primary" >{{ language==0?'立即预约':'Select' }} ⇀</el-button> | 41 | <el-col :span="4" class="text-right"> |
| 42 | <div class="price">{{ language==0?'¥':'€' }}<span>{{ h.price }}</span> | ||
| 43 | <i v-if="language==0">起</i> | ||
| 44 | </div> | ||
| 45 | <el-button class="btn-lineG w200px" round type="primary" >{{ language==0?'立即预订':'Select' }} ⇀</el-button> | ||
| 40 | </el-col> | 46 | </el-col> |
| 41 | </el-row> | 47 | </el-row> |
| 42 | </el-card> | 48 | </el-card> |
| ... | @@ -54,8 +60,11 @@ | ... | @@ -54,8 +60,11 @@ |
| 54 | import * as booking from "@/apiPc/booking" | 60 | import * as booking from "@/apiPc/booking" |
| 55 | import {useRouter,useRoute} from "vue-router"; | 61 | import {useRouter,useRoute} from "vue-router"; |
| 56 | import {useStorage} from "@vueuse/core/index"; | 62 | import {useStorage} from "@vueuse/core/index"; |
| 63 | import useUserStore from "@/store/modules/user"; | ||
| 57 | const router = useRouter() | 64 | const router = useRouter() |
| 58 | const route = useRoute() | 65 | const route = useRoute() |
| 66 | const user = useUserStore().user | ||
| 67 | const useStore = useUserStore | ||
| 59 | const language= useStorage('language',0) | 68 | const language= useStorage('language',0) |
| 60 | const query = ref({ | 69 | const query = ref({ |
| 61 | name:'' | 70 | name:'' |
| ... | @@ -78,6 +87,10 @@ | ... | @@ -78,6 +87,10 @@ |
| 78 | }) | 87 | }) |
| 79 | } | 88 | } |
| 80 | function goDetail(item) { | 89 | function goDetail(item) { |
| 90 | if(!user){ | ||
| 91 | useStore().setVisitor() | ||
| 92 | return | ||
| 93 | } | ||
| 81 | router.push({ | 94 | router.push({ |
| 82 | name:'hotelDetail', | 95 | name:'hotelDetail', |
| 83 | params:{ | 96 | params:{ |
| ... | @@ -98,7 +111,7 @@ | ... | @@ -98,7 +111,7 @@ |
| 98 | .addr{font-size: 14px;color: #929AA0;font-weight: 400;margin: 0 0 10px;} | 111 | .addr{font-size: 14px;color: #929AA0;font-weight: 400;margin: 0 0 10px;} |
| 99 | .price{margin: 0 0 8px; | 112 | .price{margin: 0 0 8px; |
| 100 | color: #FF8124;font-size: 18px; | 113 | color: #FF8124;font-size: 18px; |
| 101 | span{font-size: 24px;margin: 0 8px;font-family: 'DINAlternate-Bold';font-weight: 600;} | 114 | span{font-size: 36px;margin: 0 8px;font-family: 'DINAlternate-Bold';font-weight: 600;} |
| 102 | i{font-style: normal;color: #929AA0;} | 115 | i{font-style: normal;color: #929AA0;} |
| 103 | } | 116 | } |
| 104 | } | 117 | } |
| ... | @@ -113,8 +126,14 @@ | ... | @@ -113,8 +126,14 @@ |
| 113 | .no-border{border: none;background: #F5F7F9; | 126 | .no-border{border: none;background: #F5F7F9; |
| 114 | :deep(.el-input__wrapper){border: none;box-shadow: none;background: #F5F7F9;} | 127 | :deep(.el-input__wrapper){border: none;box-shadow: none;background: #F5F7F9;} |
| 115 | } | 128 | } |
| 129 | .imgbox {width: 100%;height: 100%;position: relative; | ||
| 130 | img{width: 100%;height: 100%;} | ||
| 131 | .starBox{position: absolute;bottom: 0;right: 0;background: rgba(0,0,0,0.4);padding: 10px 15px 3px;} | ||
| 132 | } | ||
| 133 | .po-r-b{} | ||
| 116 | .starBox{ | 134 | .starBox{ |
| 117 | img{display: inline-block;margin-right: 4px} | 135 | border-radius: 14px 0 0 0; |
| 136 | img{display: inline-block;margin-right: 4px;width: 24px;} | ||
| 118 | } | 137 | } |
| 119 | .tagbox{margin: 10px 0; | 138 | .tagbox{margin: 10px 0; |
| 120 | a{color: #AFB5B9;font-size: 12px;} | 139 | a{color: #AFB5B9;font-size: 12px;} | ... | ... |
| ... | @@ -63,7 +63,7 @@ | ... | @@ -63,7 +63,7 @@ |
| 63 | </ul> | 63 | </ul> |
| 64 | </div> | 64 | </div> |
| 65 | <div> | 65 | <div> |
| 66 | <div v-for="(r,index) in roomList" :key="index" class="room"> | 66 | <div v-for="(r,index) in roomList" :key="index" class="room" v-show="language==0?r.roomPrice>0:r.roomPriceEn>0"> |
| 67 | <el-row :gutter="30" align="middle"> | 67 | <el-row :gutter="30" align="middle"> |
| 68 | <el-col :span="4"> | 68 | <el-col :span="4"> |
| 69 | <div class="roomImg"> | 69 | <div class="roomImg"> |
| ... | @@ -93,7 +93,7 @@ | ... | @@ -93,7 +93,7 @@ |
| 93 | 订 | 93 | 订 |
| 94 | <div>{{ language==0?'在线付':'Online' }}</div> | 94 | <div>{{ language==0?'在线付':'Online' }}</div> |
| 95 | </div> | 95 | </div> |
| 96 | <el-button v-else class="btn-lineG w100" round type="primary" @click="goOrder(r)">Select</el-button> | 96 | <el-button v-else class="btn-lineG w100" round type="primary" @click="goOrder(r)">Select</el-button> |
| 97 | <!-- <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">--> | 97 | <!-- <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0">--> |
| 98 | <!-- 剩余 {{(r.roomCount - (r.useCount||0)).toFixed()}} 间--> | 98 | <!-- 剩余 {{(r.roomCount - (r.useCount||0)).toFixed()}} 间--> |
| 99 | <!-- </div>--> | 99 | <!-- </div>--> |
| ... | @@ -115,11 +115,13 @@ | ... | @@ -115,11 +115,13 @@ |
| 115 | import {useRouter} from "vue-router"; | 115 | import {useRouter} from "vue-router"; |
| 116 | import {ref, reactive, onMounted} from "vue"; | 116 | import {ref, reactive, onMounted} from "vue"; |
| 117 | import {useRoute} from "vue-router"; | 117 | import {useRoute} from "vue-router"; |
| 118 | import {getHotelById, getHotelRooms} from "@/apiPc/booking" | 118 | import {getHotelById, getHotelRooms,checkRoomPayByUserId} from "@/apiPc/booking" |
| 119 | 119 | ||
| 120 | import {useStorage} from "@vueuse/core/index"; | 120 | import {useStorage} from "@vueuse/core/index"; |
| 121 | import useUserStore from "@/store/modules/user"; | 121 | import useUserStore from "@/store/modules/user"; |
| 122 | import {ElMessageBox} from "element-plus"; | ||
| 122 | const user = useUserStore().user | 123 | const user = useUserStore().user |
| 124 | const useStore = useUserStore | ||
| 123 | const language = useStorage('language', 0) | 125 | const language = useStorage('language', 0) |
| 124 | const router = useRouter() | 126 | const router = useRouter() |
| 125 | const route = useRoute() | 127 | const route = useRoute() |
| ... | @@ -193,6 +195,33 @@ function initMap() { | ... | @@ -193,6 +195,33 @@ function initMap() { |
| 193 | } | 195 | } |
| 194 | 196 | ||
| 195 | function goOrder(room) { | 197 | function goOrder(room) { |
| 198 | checkRoomPayByUserId(room.hotelId).then(res=>{ | ||
| 199 | if(res.data == -100){ | ||
| 200 | ElMessageBox.confirm( | ||
| 201 | language.value == 0 ?'你有未支付的酒店订单,是否前往个人中心查看':'You already have an unpaid hotel order, do you want to go to the personal center to check it?', | ||
| 202 | language.value==0?'提示':'Warning', | ||
| 203 | { | ||
| 204 | confirmButtonText: language.value==1?'Go My Reservation ':'前往我的预订', | ||
| 205 | // cancelButtonText: language.value==1?'Continue to book':'继续预订', | ||
| 206 | type: 'warning', | ||
| 207 | } | ||
| 208 | ).then((res) => { | ||
| 209 | console.log(res) | ||
| 210 | router.push({ | ||
| 211 | name:'myReservation' | ||
| 212 | }) | ||
| 213 | }) | ||
| 214 | // .catch((res) => { | ||
| 215 | // console.log(res) | ||
| 216 | // goNext(room) | ||
| 217 | // }) | ||
| 218 | return | ||
| 219 | } | ||
| 220 | goNext(room) | ||
| 221 | }) | ||
| 222 | |||
| 223 | } | ||
| 224 | function goNext(room) { | ||
| 196 | router.push({ | 225 | router.push({ |
| 197 | name:'hotelOrder', | 226 | name:'hotelOrder', |
| 198 | params:{ | 227 | params:{ | ... | ... |
| ... | @@ -27,13 +27,16 @@ | ... | @@ -27,13 +27,16 @@ |
| 27 | 27 | ||
| 28 | <div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div> | 28 | <div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div> |
| 29 | <div class="border-rr mt20 pd20"> | 29 | <div class="border-rr mt20 pd20"> |
| 30 | <el-form :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef"> | 30 | <el-form :model="form" :label-width="language == 0 ?'100':'160'" :rules="rules" ref="formRef"> |
| 31 | <el-form-item :label="language==0?'入住日期':'Check-in date'" required> | 31 | <el-form-item :label="language==0?'入住日期':'Check-in date'" required> |
| 32 | |||
| 32 | <el-date-picker @change="getDaysBetween" | 33 | <el-date-picker @change="getDaysBetween" |
| 33 | v-model="rzRange" | 34 | v-model="rzRange" |
| 34 | type="daterange" :disabled-date="disabledDateRZ" | 35 | type="daterange" :disabled-date="disabledDateRZ" |
| 35 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" | 36 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" |
| 36 | value-format="YYYY-MM-DD"/> | 37 | value-format="YYYY-MM-DD"/> |
| 38 | <div class="tip" v-if="lform.hqStart">{{ language==0?'可订日期':'Available date' }}:{{ lform.hqStart.slice(0, 10) }} ~ {{ lform.hqEnd.slice(0, 10) }}</div> | ||
| 39 | |||
| 37 | <!-- :picker-options="pickerOptions"--> | 40 | <!-- :picker-options="pickerOptions"--> |
| 38 | </el-form-item> | 41 | </el-form-item> |
| 39 | <el-form-item :label="language==0?'房间数':'Rooms'" required prop="roomNum"> | 42 | <el-form-item :label="language==0?'房间数':'Rooms'" required prop="roomNum"> |
| ... | @@ -43,7 +46,7 @@ | ... | @@ -43,7 +46,7 @@ |
| 43 | <span v-else>{{ canOrderNum }} Remaining rooms</span> | 46 | <span v-else>{{ canOrderNum }} Remaining rooms</span> |
| 44 | </div> | 47 | </div> |
| 45 | </el-form-item> | 48 | </el-form-item> |
| 46 | <el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="language==0?'Name':'入住人'`${index+1}`" required> | 49 | <el-form-item v-for="(n,index) in form.roomNum" :key="index" :label="language==1?`Name${index+1}`:`入住人${index+1}`" required> |
| 47 | <el-input v-model="rzUserArr[index]" :placeholder="language==0?'每间填一位住客姓名':'Each room fill in one name of the guest'"/> | 50 | <el-input v-model="rzUserArr[index]" :placeholder="language==0?'每间填一位住客姓名':'Each room fill in one name of the guest'"/> |
| 48 | </el-form-item> | 51 | </el-form-item> |
| 49 | <el-form-item :label="language==0?'预计到店':'Expected check-in'" required> | 52 | <el-form-item :label="language==0?'预计到店':'Expected check-in'" required> |
| ... | @@ -63,13 +66,13 @@ | ... | @@ -63,13 +66,13 @@ |
| 63 | 66 | ||
| 64 | <div v-if="room.addBedFlag=='1'"> | 67 | <div v-if="room.addBedFlag=='1'"> |
| 65 | <el-form-item :label="language==0?'是否加床':'Extra bed'" required> | 68 | <el-form-item :label="language==0?'是否加床':'Extra bed'" required> |
| 66 | <el-radio-group v-model="form.isAddbed"> | 69 | <el-radio-group v-model="form.isAddbed" @change="changeAddBed"> |
| 67 | <el-radio value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio> | 70 | <el-radio value="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio> |
| 68 | <el-radio value="0">{{ language == 0 ? '否' : 'No' }}</el-radio> | 71 | <el-radio value="0">{{ language == 0 ? '否' : 'No' }}</el-radio> |
| 69 | </el-radio-group> | 72 | </el-radio-group> |
| 70 | </el-form-item> | 73 | </el-form-item> |
| 71 | <el-form-item v-if="form.isAddbed=='1'" :label="language==0?'加床张数':'Extra bed num'" required> | 74 | <el-form-item v-if="form.isAddbed=='1'" :label="language==0?'加床张数':'Extra bed num'" required> |
| 72 | <el-input-number v-model="form.addNum" :min="0" :max="1" @change="changeBed"/> | 75 | <el-input-number v-model="form.addNum" :min="0" :max="form.roomNum" @change="changeBed"/> |
| 73 | 76 | ||
| 74 | <div class="tip" v-if="form.isAddbed=='1'">* | 77 | <div class="tip" v-if="form.isAddbed=='1'">* |
| 75 | <span v-if="language == 0">一个房间最多加一张床</span> | 78 | <span v-if="language == 0">一个房间最多加一张床</span> |
| ... | @@ -91,13 +94,13 @@ | ... | @@ -91,13 +94,13 @@ |
| 91 | language == 0 ? '¥' : '€' | 94 | language == 0 ? '¥' : '€' |
| 92 | }}{{ (room.roomPriceEn * form.roomNum * choseRooms.length).toFixed(2) }}</span> | 95 | }}{{ (room.roomPriceEn * form.roomNum * choseRooms.length).toFixed(2) }}</span> |
| 93 | </label> | 96 | </label> |
| 94 | <div class="ccitem" v-for="(c, index) in choseRooms" :key="index"> | 97 | <div class="ccitem" v-for="(c, index) in choseRooms" :key="index" v-show="form.roomNum>0"> |
| 95 | {{ c }} | 98 | {{ c }} |
| 96 | <span v-if="language==0">{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPrice }}</span> | 99 | <span v-if="language==0">{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPrice }}</span> |
| 97 | <span v-else>{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPriceEn }}</span> | 100 | <span v-else>{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPriceEn }}</span> |
| 98 | </div> | 101 | </div> |
| 99 | 102 | ||
| 100 | <label v-if="form.isAddbed=='1'">{{ language == 0 ? '加床费' : 'Extra bed fee' }} | 103 | <label v-if="form.isAddbed=='1'&&form.addNum>0">{{ language == 0 ? '加床费' : 'Extra bed fee' }} |
| 101 | <span class="fr" v-if="language==0">{{ | 104 | <span class="fr" v-if="language==0">{{ |
| 102 | language == 0 ? '¥' : '€' | 105 | language == 0 ? '¥' : '€' |
| 103 | }}{{ (room.bedPrice * form.addNum * choseRooms.length).toFixed(2) }}</span> | 106 | }}{{ (room.bedPrice * form.addNum * choseRooms.length).toFixed(2) }}</span> |
| ... | @@ -106,10 +109,9 @@ | ... | @@ -106,10 +109,9 @@ |
| 106 | }}{{ (room.bedPriceEn * form.addNum * choseRooms.length).toFixed(2) }}</span> | 109 | }}{{ (room.bedPriceEn * form.addNum * choseRooms.length).toFixed(2) }}</span> |
| 107 | </label> | 110 | </label> |
| 108 | 111 | ||
| 109 | <div v-if="form.isAddbed=='1'" class="ccitem" v-for="(c, index) in choseRooms" :key="index"> | 112 | <div v-if="form.isAddbed=='1'&&form.addNum>0" class="ccitem" v-for="(c, index) in choseRooms" :key="index"> |
| 110 | {{ c }} | 113 | {{ c }} |
| 111 | <span v-if="language==0">{{ form.addNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.bedPrice }}</span> | 114 | <span>{{ form.addNum }}*{{ language == 0 ? '¥' : '€' }}{{ language == 0 ?room.bedPrice:room.bedPriceEn}}</span> |
| 112 | <span v-else>{{ form.addNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.bedPriceEn }}</span> | ||
| 113 | </div> | 115 | </div> |
| 114 | 116 | ||
| 115 | <label>{{ language == 0 ? '共计' : 'Total' }}<span | 117 | <label>{{ language == 0 ? '共计' : 'Total' }}<span |
| ... | @@ -128,7 +130,7 @@ | ... | @@ -128,7 +130,7 @@ |
| 128 | </label> | 130 | </label> |
| 129 | </el-col> | 131 | </el-col> |
| 130 | <el-col :span="12" class="text-right"> | 132 | <el-col :span="12" class="text-right"> |
| 131 | <el-button type="primary" class="btn-lineG w200px" size="large" round @click="submit">确认付款</el-button> | 133 | <el-button type="primary" class="btn-lineG w200px" size="large" round @click="submit">{{ language == 0 ?'确认付款':'Book Now' }}</el-button> |
| 132 | </el-col> | 134 | </el-col> |
| 133 | </el-row> | 135 | </el-row> |
| 134 | </el-card> | 136 | </el-card> |
| ... | @@ -157,9 +159,9 @@ const lform = ref({}) | ... | @@ -157,9 +159,9 @@ const lform = ref({}) |
| 157 | const form = ref({ | 159 | const form = ref({ |
| 158 | isAddbed: '0', | 160 | isAddbed: '0', |
| 159 | roomNum: 0, | 161 | roomNum: 0, |
| 160 | addNum: 1, | 162 | addNum: 0, |
| 161 | ddDate:'14:00', | 163 | ddDate:'14:00', |
| 162 | phone: user.phonenumber||'', | 164 | phone: user?.phonenumber||'', |
| 163 | }) | 165 | }) |
| 164 | const rzRange = ref([]) | 166 | const rzRange = ref([]) |
| 165 | const rzUserArr = ref([]) | 167 | const rzUserArr = ref([]) |
| ... | @@ -256,12 +258,20 @@ onMounted(() => { | ... | @@ -256,12 +258,20 @@ onMounted(() => { |
| 256 | console.log(room.value) | 258 | console.log(room.value) |
| 257 | hotelName.value = route.query.hotelName | 259 | hotelName.value = route.query.hotelName |
| 258 | money.value = 0 | 260 | money.value = 0 |
| 259 | const today = dayjs() | ||
| 260 | initDays() | 261 | initDays() |
| 261 | }) | 262 | }) |
| 262 | function initDays() { | 263 | function initDays() { |
| 263 | getBaseInfoByActiveId(route.params.cptId).then(res=>{ | 264 | getBaseInfoByActiveId(route.params.cptId).then(res=>{ |
| 264 | lform.value = res.data | 265 | lform.value = res.data |
| 266 | // if(lform.value.hqStart){ | ||
| 267 | // const today = dayjs() | ||
| 268 | // if(lform.value.hqStart.slice(0,10)<today.format('YYYY-MM-DD')){ | ||
| 269 | // lform.value.hqStart = today.format('YYYY-MM-DD') | ||
| 270 | // } | ||
| 271 | // rzRange.value = [lform.value.hqStart.slice(0,10),lform.value.hqEnd.slice(0,10)] | ||
| 272 | // getDaysBetween(rzRange.value) | ||
| 273 | // } | ||
| 274 | // console.log(rzRange.value,lform.value.hqStart) | ||
| 265 | }).catch(err=>{ | 275 | }).catch(err=>{ |
| 266 | console.log(err) | 276 | console.log(err) |
| 267 | }) | 277 | }) |
| ... | @@ -286,7 +296,12 @@ function changeRoomNum(e) { | ... | @@ -286,7 +296,12 @@ function changeRoomNum(e) { |
| 286 | rzUserArr.value.length = e | 296 | rzUserArr.value.length = e |
| 287 | countMoney() | 297 | countMoney() |
| 288 | } | 298 | } |
| 289 | 299 | function changeAddBed(e) { | |
| 300 | if(e=='0'){ | ||
| 301 | form.value.addNum = 0 | ||
| 302 | } | ||
| 303 | changeBed() | ||
| 304 | } | ||
| 290 | function changeBed() { | 305 | function changeBed() { |
| 291 | countMoney() | 306 | countMoney() |
| 292 | } | 307 | } |
| ... | @@ -308,7 +323,7 @@ function getDaysBetween(e) { | ... | @@ -308,7 +323,7 @@ function getDaysBetween(e) { |
| 308 | var d2 = Date.parse(e[1]) | 323 | var d2 = Date.parse(e[1]) |
| 309 | if (d1 == d2) { | 324 | if (d1 == d2) { |
| 310 | usedays = 0 | 325 | usedays = 0 |
| 311 | ElMessage.error('入住时间跨度需大于一天') | 326 | ElMessage.error(language == 0 ? '入住时间跨度需大于一天' :'The duration of the stay must be more than one day.') |
| 312 | // console.trace() | 327 | // console.trace() |
| 313 | rzRange.value = [] | 328 | rzRange.value = [] |
| 314 | return | 329 | return |
| ... | @@ -364,18 +379,27 @@ function submit() { | ... | @@ -364,18 +379,27 @@ function submit() { |
| 364 | } | 379 | } |
| 365 | 380 | ||
| 366 | if (usedays == 0) { | 381 | if (usedays == 0) { |
| 367 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' : 'Check-in time must be greater than one day') | 382 | ElMessage.warning(language.value == 0 ? '入住时间跨度需大于一天' : 'Check-in time must be greater than one day') |
| 383 | return | ||
| 384 | } | ||
| 385 | if(form.value.roomNum==0){ | ||
| 386 | ElMessage.warning(language.value == 0 ? '请选择房间数量' : 'Please select the number of rooms') | ||
| 387 | return | ||
| 388 | } | ||
| 389 | if(!form.value.phone){ | ||
| 390 | ElMessage.warning(language.value == 0 ? '请填写手机号' : 'Please fill in the phone number') | ||
| 368 | return | 391 | return |
| 369 | } | 392 | } |
| 370 | form.value.rzStart = rzRange.value[0] | 393 | form.value.rzStart = rzRange.value[0] |
| 371 | form.value.rzEnd = rzRange.value[1] | 394 | form.value.rzEnd = rzRange.value[1] |
| 372 | 395 | ||
| 396 | |||
| 373 | let arr = [] | 397 | let arr = [] |
| 374 | for (var n of rzUserArr.value) { | 398 | for (var n of rzUserArr.value) { |
| 375 | if (n == '' || n == undefined) { | 399 | if (n == '' || n == undefined) { |
| 376 | 400 | ||
| 377 | // '请填写入住人信息' | 401 | // '请填写入住人信息' |
| 378 | 402 | ElMessage.warning(language.value == 0 ? '请填写入住人信息' : 'Please fill in the check-in information') | |
| 379 | 403 | ||
| 380 | return | 404 | return |
| 381 | } else { | 405 | } else { |
| ... | @@ -444,8 +468,10 @@ function submit() { | ... | @@ -444,8 +468,10 @@ function submit() { |
| 444 | }) | 468 | }) |
| 445 | } | 469 | } |
| 446 | } else { | 470 | } else { |
| 447 | ElMessage.warning(language.value == 0 ? '无可预定的房间' : 'No rooms available to book') | 471 | ElMessage.warning(language.value == 0 ? '无可预订的房间' : 'No rooms available to book') |
| 448 | } | 472 | } |
| 473 | }).catch(err => { | ||
| 474 | ElMessage.warning(language.value == 0 ? '无可预订的房间' : 'No rooms available to book') | ||
| 449 | }) | 475 | }) |
| 450 | }) | 476 | }) |
| 451 | } | 477 | } | ... | ... |
| ... | @@ -13,13 +13,16 @@ | ... | @@ -13,13 +13,16 @@ |
| 13 | <h3>{{ form.hotelName }}</h3> | 13 | <h3>{{ form.hotelName }}</h3> |
| 14 | <el-row> | 14 | <el-row> |
| 15 | <el-col> | 15 | <el-col> |
| 16 | {{ language == 0 ?'地址':'Address' }}:{{ form.provinceName }} {{ form.cityName }} {{ form.areaName }} {{ form.address }} | 16 | {{ language == 0 ?'地址':'Address' }}: |
| 17 | <span v-if="language == 0">{{ form.provinceName }} {{ form.cityName }} {{ form.areaName }} </span> | ||
| 18 | {{ form.address }} | ||
| 17 | </el-col> | 19 | </el-col> |
| 18 | <el-col> | 20 | <el-col> |
| 19 | {{ language == 0 ?'入住信息':'Check-in Information' }}:{{ form.messageObj?.roomStayDate }} | 21 | {{ language == 0 ?'入住信息':'Check-in Information' }}:{{ form.messageObj?.roomStayDate }} |
| 20 | </el-col> | 22 | </el-col> |
| 21 | <el-col> | 23 | <el-col> |
| 22 | {{ language == 0 ?'房间信息':'Room Information' }}:{{ form.messageObj?.roomName }} | {{ form.roomNum }} 间 | 24 | {{ language == 0 ?'房间信息':'Room Information' }}:{{ form.messageObj?.roomName }} | {{ form.roomNum }} |
| 25 | {{ language == 0 ? '间':'rooms' }} | ||
| 23 | </el-col> | 26 | </el-col> |
| 24 | </el-row> | 27 | </el-row> |
| 25 | </div> | 28 | </div> |
| ... | @@ -128,19 +131,28 @@ | ... | @@ -128,19 +131,28 @@ |
| 128 | 131 | ||
| 129 | <el-row justify="space-between" align="middle"> | 132 | <el-row justify="space-between" align="middle"> |
| 130 | <el-col :lg="12"> | 133 | <el-col :lg="12"> |
| 131 | <span>{{ language == 0 ? '支付时间' : 'Payment Time' }}:{{form.payDate}}</span> | 134 | <div v-if="form.payDate">{{ language == 0 ? '支付时间' : 'Payment Time' }}:{{form.payDate}}</div> |
| 135 | <div class="mt10" v-if="form.payDate">{{ language == 0 ? '支付方式':'Payment Method'}}: | ||
| 136 | <span v-if="form.paymentType=='1'">{{language==0?'微信支付':'WePay'}}</span> | ||
| 137 | <span v-if="form.paymentType=='3'">PayPal</span> | ||
| 138 | </div> | ||
| 132 | </el-col> | 139 | </el-col> |
| 133 | <el-col :lg="12" v-if="Number(totalFee)>0" class="result"> | 140 | <el-col :lg="12" class="result"> |
| 134 | <div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}:<span | 141 | <div class="priceb" v-if="form.viewStatus=='0'">{{ language == 0 ? '待支付金额' : 'Amount Due' }}: |
| 135 | class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> | 142 | <span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span> |
| 136 | <div class="priceb" v-if="form.viewStatus=='1'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}:<span | 143 | </div> |
| 137 | class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> | 144 | <div class="priceb" v-if="form.viewStatus=='1'||form.viewStatus=='5'">{{ language == 0 ? '已支付金额' : 'Amount Due' }}: |
| 138 | <div class="priceb" v-if="form.viewStatus=='4'">{{ language == 0 ? '已退订' : 'Refunded' }}:<span | 145 | <span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span> |
| 139 | class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> | 146 | </div> |
| 140 | <div class="priceb" v-if="form.viewStatus=='2'">{{ language == 0 ? '已取消' : 'Canceled' }}:<span | 147 | <div class="priceb" v-if="form.viewStatus=='4'">{{ language == 0 ? '已退订' : 'Refunded' }}: |
| 141 | class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> | 148 | <span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span> |
| 142 | <div class="priceb" v-if="form.viewStatus=='7'">{{ language == 0 ? '退款审核中' : '退款审核中' }}:<span | 149 | </div> |
| 143 | class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span></div> | 150 | <div class="priceb" v-if="form.viewStatus=='2'">{{ language == 0 ? '已取消' : 'Canceled' }}: |
| 151 | <span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span> | ||
| 152 | </div> | ||
| 153 | <div class="priceb" v-if="form.viewStatus=='7'">{{ language == 0 ? '退款审核中' : 'Refund in review' }}: | ||
| 154 | <span class="price">{{ language == 0 ? '¥' : '€' }}{{ Number(totalFee).toFixed(2) }}</span> | ||
| 155 | </div> | ||
| 144 | </el-col> | 156 | </el-col> |
| 145 | </el-row> | 157 | </el-row> |
| 146 | </div> | 158 | </div> |
| ... | @@ -331,7 +343,7 @@ onMounted(() => { | ... | @@ -331,7 +343,7 @@ onMounted(() => { |
| 331 | 343 | ||
| 332 | function getData() { | 344 | function getData() { |
| 333 | if(type.value=='car') { | 345 | if(type.value=='car') { |
| 334 | booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { | 346 | return booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { |
| 335 | form.value = res.data | 347 | form.value = res.data |
| 336 | if(language.value==0){ | 348 | if(language.value==0){ |
| 337 | totalFee.value = res.data.total | 349 | totalFee.value = res.data.total |
| ... | @@ -344,7 +356,7 @@ function getData() { | ... | @@ -344,7 +356,7 @@ function getData() { |
| 344 | }) | 356 | }) |
| 345 | } | 357 | } |
| 346 | if(type.value=='food') { | 358 | if(type.value=='food') { |
| 347 | booking.getFoodBilldetailbyId({orderId: orderId.value}).then(res => { | 359 | return booking.getFoodBilldetailbyId({orderId: orderId.value}).then(res => { |
| 348 | if(language.value==0){ | 360 | if(language.value==0){ |
| 349 | totalFee.value = res.data.total | 361 | totalFee.value = res.data.total |
| 350 | } else { | 362 | } else { |
| ... | @@ -357,7 +369,7 @@ function getData() { | ... | @@ -357,7 +369,7 @@ function getData() { |
| 357 | }) | 369 | }) |
| 358 | } | 370 | } |
| 359 | if(type.value=='hotel') { | 371 | if(type.value=='hotel') { |
| 360 | booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => { | 372 | return booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => { |
| 361 | if(language.value==0){ | 373 | if(language.value==0){ |
| 362 | totalFee.value = res.data.total | 374 | totalFee.value = res.data.total |
| 363 | } else { | 375 | } else { | ... | ... |
| ... | @@ -28,6 +28,7 @@ const route = useRoute() | ... | @@ -28,6 +28,7 @@ const route = useRoute() |
| 28 | const router = useRouter() | 28 | const router = useRouter() |
| 29 | const language= useStorage('language',0) | 29 | const language= useStorage('language',0) |
| 30 | const orderId = ref(route.query.orderId) | 30 | const orderId = ref(route.query.orderId) |
| 31 | const type = ref('') | ||
| 31 | const loading = ref(false) | 32 | const loading = ref(false) |
| 32 | 33 | ||
| 33 | onMounted(() => { | 34 | onMounted(() => { |
| ... | @@ -36,6 +37,7 @@ onMounted(() => { | ... | @@ -36,6 +37,7 @@ onMounted(() => { |
| 36 | loading.value = true | 37 | loading.value = true |
| 37 | callbackPalPay(code).then(res => { | 38 | callbackPalPay(code).then(res => { |
| 38 | loading.value = false | 39 | loading.value = false |
| 40 | type.value = res.data.orderType | ||
| 39 | }) | 41 | }) |
| 40 | }) | 42 | }) |
| 41 | 43 | ||
| ... | @@ -43,7 +45,8 @@ function goBillDetail() { | ... | @@ -43,7 +45,8 @@ function goBillDetail() { |
| 43 | router.push({ | 45 | router.push({ |
| 44 | name: 'bookingPay', | 46 | name: 'bookingPay', |
| 45 | query: { | 47 | query: { |
| 46 | orderId: route.query.orderId | 48 | orderId: route.query.orderId, |
| 49 | orderType: type.value | ||
| 47 | } | 50 | } |
| 48 | }) | 51 | }) |
| 49 | } | 52 | } | ... | ... |
| ... | @@ -101,7 +101,7 @@ const menus = ref([ | ... | @@ -101,7 +101,7 @@ const menus = ref([ |
| 101 | isActive: false | 101 | isActive: false |
| 102 | }, | 102 | }, |
| 103 | { | 103 | { |
| 104 | name: language.value==0?'我的预定':'My Reservation', | 104 | name: language.value==0?'我的预订':'My Reservation', |
| 105 | routeName: 'myReservation', | 105 | routeName: 'myReservation', |
| 106 | picUrl1: '/img/nav_29.png', | 106 | picUrl1: '/img/nav_29.png', |
| 107 | picUrl2: '/img/nav_29_dwn.png', | 107 | picUrl2: '/img/nav_29_dwn.png', |
| ... | @@ -131,7 +131,7 @@ const menus3 = ref([ | ... | @@ -131,7 +131,7 @@ const menus3 = ref([ |
| 131 | isActive: false | 131 | isActive: false |
| 132 | }, | 132 | }, |
| 133 | { | 133 | { |
| 134 | name: language.value==0?'我的预定':'My Reservation', | 134 | name: language.value==0?'我的预订':'My Reservation', |
| 135 | routeName: 'myReservation', | 135 | routeName: 'myReservation', |
| 136 | picUrl1: '/img/nav_29.png', | 136 | picUrl1: '/img/nav_29.png', |
| 137 | picUrl2: '/img/nav_29_dwn.png', | 137 | picUrl2: '/img/nav_29_dwn.png', |
| ... | @@ -161,7 +161,7 @@ const menusPersonal = ref([ | ... | @@ -161,7 +161,7 @@ const menusPersonal = ref([ |
| 161 | isActive: false | 161 | isActive: false |
| 162 | }, | 162 | }, |
| 163 | { | 163 | { |
| 164 | name: language.value==0?'我的预定':'My Reservation', | 164 | name: language.value==0?'我的预订':'My Reservation', |
| 165 | routeName: 'myReservation', | 165 | routeName: 'myReservation', |
| 166 | picUrl1: '/img/nav_29.png', | 166 | picUrl1: '/img/nav_29.png', |
| 167 | picUrl2: '/img/nav_29_dwn.png', | 167 | picUrl2: '/img/nav_29_dwn.png', | ... | ... |
| ... | @@ -5,9 +5,10 @@ | ... | @@ -5,9 +5,10 @@ |
| 5 | <h3 class="leftboderTT">{{ language==0?'我的预订':'My reservation' }} | 5 | <h3 class="leftboderTT">{{ language==0?'我的预订':'My reservation' }} |
| 6 | </h3> | 6 | </h3> |
| 7 | 7 | ||
| 8 | <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button> | 8 | <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button>--> |
| 9 | </div> | 9 | </div> |
| 10 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | 10 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> |
| 11 | |||
| 11 | <div class="pd20"> | 12 | <div class="pd20"> |
| 12 | <div v-for="b in list" class="item"> | 13 | <div v-for="b in list" class="item"> |
| 13 | <div class="title"> | 14 | <div class="title"> |
| ... | @@ -25,13 +26,15 @@ | ... | @@ -25,13 +26,15 @@ |
| 25 | <span class="bg-blue" v-if="b.status == '1'">{{ language == 0 ?'支付成功':'successful' }}</span> | 26 | <span class="bg-blue" v-if="b.status == '1'">{{ language == 0 ?'支付成功':'successful' }}</span> |
| 26 | <span class="bg-warning" v-if="b.status == '2'">{{ language == 0 ? '已取消' : 'Canceled' }}</span> | 27 | <span class="bg-warning" v-if="b.status == '2'">{{ language == 0 ? '已取消' : 'Canceled' }}</span> |
| 27 | <span class="bg-danger" v-if="b.status == '3'||b.status == '4'">{{ language == 0 ? '已退订' : 'Refunded' }}</span> | 28 | <span class="bg-danger" v-if="b.status == '3'||b.status == '4'">{{ language == 0 ? '已退订' : 'Refunded' }}</span> |
| 29 | <span class="bg-danger" v-if="b.status == '7'">{{ language == 0 ? '退款审核中' : 'Refund in review' }}</span> | ||
| 28 | </div> | 30 | </div> |
| 29 | 31 | ||
| 30 | <el-row class="pd20 mt10" justify="space-between" align="middle"> | 32 | <el-row class="pd20 mt10" justify="space-between" align="middle"> |
| 31 | <el-col :lg="10"> | 33 | <el-col :lg="10"> |
| 32 | <div v-if="b.orderType == 0"> | 34 | <div v-if="b.orderType == 0"> |
| 33 | <h3 class="name">{{b.name}}</h3> | 35 | <h3 class="name">{{b.name}}</h3> |
| 34 | <p>{{b.messageObj?.roomStayDate}}</p> | 36 | <p v-if="language==0">{{b.messageObj?.roomStayDate}}</p> |
| 37 | <p v-else>{{b.messageObj?.roomStayDate.replace('共',' total ').replace('晚',' days')}}</p> | ||
| 35 | 38 | ||
| 36 | <p>{{b.messageObj?.roomInfo}}</p> | 39 | <p>{{b.messageObj?.roomInfo}}</p> |
| 37 | 40 | ||
| ... | @@ -39,9 +42,10 @@ | ... | @@ -39,9 +42,10 @@ |
| 39 | <div v-if="b.orderType == 1"> | 42 | <div v-if="b.orderType == 1"> |
| 40 | <h3 class="name">{{b.name}}</h3> | 43 | <h3 class="name">{{b.name}}</h3> |
| 41 | <div v-for="(car,index) in b.messageObj.carsList" :key="index"> | 44 | <div v-for="(car,index) in b.messageObj.carsList" :key="index"> |
| 42 | <p v-if="car.num>0">{{car.name}}:{{car.num}} 辆</p> | 45 | <p v-if="car.num>0">{{car.typeName}}:{{car.name}}:{{car.num}} {{ language==0?'辆':'Cars' }}</p> |
| 43 | </div> | 46 | </div> |
| 44 | <p>{{b.handleDate}}</p> | 47 | <!-- <p>{{b.messageObj}}</p>--> |
| 48 | <!-- <p>{{b.extJsonObj}}</p>--> | ||
| 45 | </div> | 49 | </div> |
| 46 | <div v-if="b.orderType == 2"> | 50 | <div v-if="b.orderType == 2"> |
| 47 | <h3 class="name">{{b.name}}</h3> | 51 | <h3 class="name">{{b.name}}</h3> |
| ... | @@ -50,6 +54,8 @@ | ... | @@ -50,6 +54,8 @@ |
| 50 | {{n.name}}({{n.categoryName}}) * <span>{{n.num}} {{language==0?'份':'pcs'}}</span> | 54 | {{n.name}}({{n.categoryName}}) * <span>{{n.num}} {{language==0?'份':'pcs'}}</span> |
| 51 | </p> | 55 | </p> |
| 52 | </div> | 56 | </div> |
| 57 | <p>{{language==0?'配送日期':'Delivery Date'}}:{{b.extJsonObj.dcEnd }} ~ {{b.extJsonObj.dcEnd}}</p> | ||
| 58 | |||
| 53 | </div> | 59 | </div> |
| 54 | </el-col> | 60 | </el-col> |
| 55 | <el-col :lg="6"> | 61 | <el-col :lg="6"> |
| ... | @@ -58,23 +64,22 @@ | ... | @@ -58,23 +64,22 @@ |
| 58 | <p>{{b.messageObj?.roomInfo}}</p> | 64 | <p>{{b.messageObj?.roomInfo}}</p> |
| 59 | </div> | 65 | </div> |
| 60 | <div v-if="b.orderType == 1"> | 66 | <div v-if="b.orderType == 1"> |
| 61 | |||
| 62 | </div> | 67 | </div> |
| 63 | <div v-if="b.orderType == 2"> | 68 | <div v-if="b.orderType == 2"> |
| 64 | <div v-for="(n,index) in b.messageObj.foodsList" :key="index"> | ||
| 65 | <p v-if="n.num > 0"> | ||
| 66 | {{n.name}}({{n.categoryName}}) * <span>{{n.num}} {{language==0?'份':'pcs'}}</span> | ||
| 67 | </p> | ||
| 68 | </div> | ||
| 69 | </div> | 69 | </div> |
| 70 | </el-col> | 70 | </el-col> |
| 71 | <el-col :lg="4"> | 71 | <el-col :lg="4" class="text-center"> |
| 72 | <span class="text-warning"> {{ language==0?'¥':'€' }} | 72 | <span class="text-warning"> {{ language==0?'¥':'€' }} |
| 73 | <span class="bigMoney">{{language==0?b.total:b.totalEn}}</span> | 73 | <span class="bigMoney">{{language==0?b.total:b.totalEn}}</span> |
| 74 | </span> | 74 | </span> |
| 75 | </el-col> | 75 | </el-col> |
| 76 | 76 | ||
| 77 | <el-col :lg="4"> | 77 | <el-col :lg="4" > |
| 78 | <div class="text-right mb20 text-danger"> | ||
| 79 | <el-countdown value-style="color:#E60012;font-size:16px;" v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" format="mm:ss" | ||
| 80 | :value="b.countdown" @finish="finish(b)"/> | ||
| 81 | </div> | ||
| 82 | |||
| 78 | <div class="text-right"> | 83 | <div class="text-right"> |
| 79 | <el-button class="mb10" plain round type="primary" @click="goDetail(b)"> | 84 | <el-button class="mb10" plain round type="primary" @click="goDetail(b)"> |
| 80 | {{ language==0?'详情':'Detail' }}</el-button> | 85 | {{ language==0?'详情':'Detail' }}</el-button> |
| ... | @@ -96,20 +101,30 @@ | ... | @@ -96,20 +101,30 @@ |
| 96 | import {onMounted} from "@vue/runtime-core"; | 101 | import {onMounted} from "@vue/runtime-core"; |
| 97 | import {useStorage} from "@vueuse/core/index"; | 102 | import {useStorage} from "@vueuse/core/index"; |
| 98 | import {newbilllist} from "@/apiPc/common"; | 103 | import {newbilllist} from "@/apiPc/common"; |
| 104 | import useUserStore from "@/store/modules/user"; | ||
| 99 | const router = useRouter() | 105 | const router = useRouter() |
| 100 | const language= useStorage('language',0) | 106 | const language= useStorage('language',0) |
| 101 | const list = ref([]) | 107 | const list = ref([]) |
| 108 | const user = useUserStore().user | ||
| 102 | 109 | ||
| 103 | onMounted(()=>{ | 110 | onMounted(()=>{ |
| 104 | getList() | 111 | getList() |
| 105 | }) | 112 | }) |
| 113 | function finish(bill){ | ||
| 114 | bill.status = '2' | ||
| 115 | // getList() | ||
| 116 | } | ||
| 106 | function getList() { | 117 | function getList() { |
| 107 | newbilllist().then(res=>{ | 118 | newbilllist({createById:user.userId}).then(res=>{ |
| 108 | list.value = res.rows | 119 | list.value = res.rows |
| 109 | for (var b of list.value) { | 120 | for (var b of list.value) { |
| 110 | b.messageObj = JSON.parse(b.message) | 121 | b.messageObj = JSON.parse(b.message) |
| 122 | b.extJsonObj = JSON.parse(b.extJson) || {} | ||
| 123 | if(b.surplus&&b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')){ | ||
| 124 | b.countdown = Date.now() + Number((b.surplus.split(',')[0]*60 + b.surplus.split(',')[1])*10) | ||
| 125 | console.log(b.countdown) | ||
| 126 | } | ||
| 111 | } | 127 | } |
| 112 | list.value = [...list.value] | ||
| 113 | }) | 128 | }) |
| 114 | } | 129 | } |
| 115 | function goDetail(b) { | 130 | function goDetail(b) { |
| ... | @@ -126,7 +141,6 @@ function toInvoice(){ | ... | @@ -126,7 +141,6 @@ function toInvoice(){ |
| 126 | name: 'invoice' | 141 | name: 'invoice' |
| 127 | }) | 142 | }) |
| 128 | } | 143 | } |
| 129 | |||
| 130 | </script> | 144 | </script> |
| 131 | 145 | ||
| 132 | <style scoped lang="scss"> | 146 | <style scoped lang="scss"> |
| ... | @@ -152,7 +166,9 @@ function toInvoice(){ | ... | @@ -152,7 +166,9 @@ function toInvoice(){ |
| 152 | } | 166 | } |
| 153 | } | 167 | } |
| 154 | .item{ | 168 | .item{ |
| 155 | p{margin: 10px 0;} | 169 | .name{font-size: 18px; |
| 170 | color: #000000;margin: 0 0 10px;} | ||
| 171 | p{margin: 8px 0 0;color: #707070;font-size: 14px;} | ||
| 156 | 172 | ||
| 157 | margin: 0 0 20px;border: 1px solid #E5E5E5; | 173 | margin: 0 0 20px;border: 1px solid #E5E5E5; |
| 158 | border-radius: 10px; | 174 | border-radius: 10px; | ... | ... |
| ... | @@ -65,7 +65,8 @@ const {proxy} = getCurrentInstance() | ... | @@ -65,7 +65,8 @@ const {proxy} = getCurrentInstance() |
| 65 | import {useStorage} from "@vueuse/core/index"; | 65 | import {useStorage} from "@vueuse/core/index"; |
| 66 | import {ElMessage} from "element-plus"; | 66 | import {ElMessage} from "element-plus"; |
| 67 | import {getCurrentInstance} from "@vue/runtime-core"; | 67 | import {getCurrentInstance} from "@vue/runtime-core"; |
| 68 | import {onMounted} from "vue"; | 68 | import {computed, onMounted, watch} from "vue"; |
| 69 | import {getBaseInfoByActiveId} from "@/apiPc/booking"; | ||
| 69 | const props = defineProps({ | 70 | const props = defineProps({ |
| 70 | matchId: { | 71 | matchId: { |
| 71 | type: String, | 72 | type: String, |
| ... | @@ -74,14 +75,39 @@ const props = defineProps({ | ... | @@ -74,14 +75,39 @@ const props = defineProps({ |
| 74 | } | 75 | } |
| 75 | }) | 76 | }) |
| 76 | const language= useStorage('language',0) | 77 | const language= useStorage('language',0) |
| 78 | const form = ref({}) | ||
| 79 | const matchId = computed(()=>props.matchId); | ||
| 80 | |||
| 81 | watch(matchId,(val)=>{ | ||
| 82 | if(val && val!='0'){ | ||
| 83 | getBaseInfoByActiveId(props.matchId).then(res=>{ | ||
| 84 | form.value = res.data || null | ||
| 85 | }).catch(err=>{ | ||
| 86 | console.log(err) | ||
| 87 | form.value = null | ||
| 88 | }) | ||
| 89 | } | ||
| 90 | }) | ||
| 77 | 91 | ||
| 78 | onMounted(()=>{ | 92 | onMounted(()=>{ |
| 79 | 93 | ||
| 80 | }) | 94 | }) |
| 95 | function building() { | ||
| 96 | ElMessage.warning(language.value==0?'感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。':'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.') | ||
| 97 | return | ||
| 98 | } | ||
| 81 | function popRemark(type){ | 99 | function popRemark(type){ |
| 100 | if(!form.value){ | ||
| 101 | building() | ||
| 102 | return | ||
| 103 | } | ||
| 104 | if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3') || type=='0' || type=='4' || type=='5'){ | ||
| 105 | building() | ||
| 106 | return | ||
| 107 | } | ||
| 82 | const params = { | 108 | const params = { |
| 83 | matchId: props.matchId, | 109 | matchId: props.matchId, |
| 84 | title: language.value == 0 ?'预定说明':'Booking Instructions', | 110 | title: language.value == 0 ?'预订说明':'Booking Instructions', |
| 85 | type: type | 111 | type: type |
| 86 | } | 112 | } |
| 87 | proxy.$refs['orderRemarkRef'].open(params) | 113 | proxy.$refs['orderRemarkRef'].open(params) |
| ... | @@ -90,8 +116,7 @@ function goBooking(n) { | ... | @@ -90,8 +116,7 @@ function goBooking(n) { |
| 90 | switch (n) { | 116 | switch (n) { |
| 91 | case 0: | 117 | case 0: |
| 92 | // 票务 | 118 | // 票务 |
| 93 | ElMessage.warning(language.value==0?'暂无可预订的信息':'There is no information available for booking') | 119 | building() |
| 94 | return | ||
| 95 | router.push({path: `/booking/ticket/${props.matchId}`}) | 120 | router.push({path: `/booking/ticket/${props.matchId}`}) |
| 96 | break; | 121 | break; |
| 97 | case 1: | 122 | case 1: |
| ... | @@ -108,15 +133,13 @@ function goBooking(n) { | ... | @@ -108,15 +133,13 @@ function goBooking(n) { |
| 108 | break; | 133 | break; |
| 109 | case 4: | 134 | case 4: |
| 110 | //化妆 | 135 | //化妆 |
| 111 | ElMessage.warning(language.value==0?'暂无可预订的信息':'Building!') | 136 | building() |
| 112 | return | ||
| 113 | 137 | ||
| 114 | router.push({path: `/booking/makeup/${props.matchId}`}) | 138 | router.push({path: `/booking/makeup/${props.matchId}`}) |
| 115 | break; | 139 | break; |
| 116 | case 5: | 140 | case 5: |
| 117 | //拍照 | 141 | //拍照 |
| 118 | ElMessage.warning(language.value==0?'暂无可预订的信息':'Building!') | 142 | building() |
| 119 | return | ||
| 120 | 143 | ||
| 121 | router.push({path: `/booking/photography/${props.matchId}`}) | 144 | router.push({path: `/booking/photography/${props.matchId}`}) |
| 122 | break; | 145 | break; | ... | ... |
| ... | @@ -51,11 +51,11 @@ function ok() { | ... | @@ -51,11 +51,11 @@ function ok() { |
| 51 | // type | 51 | // type |
| 52 | show.value = false | 52 | show.value = false |
| 53 | 53 | ||
| 54 | if(!user){ | 54 | // if(!user){ |
| 55 | useUserStore().setVisitor() | 55 | // useUserStore().setVisitor() |
| 56 | } else { | 56 | // } else { |
| 57 | emit('submit', type) | 57 | emit('submit', type) |
| 58 | } | 58 | // } |
| 59 | } | 59 | } |
| 60 | </script> | 60 | </script> |
| 61 | 61 | ... | ... |
| ... | @@ -3,13 +3,11 @@ | ... | @@ -3,13 +3,11 @@ |
| 3 | <div class="pd20"> | 3 | <div class="pd20"> |
| 4 | <el-table :data="list" border> | 4 | <el-table :data="list" border> |
| 5 | <el-table-column :label="language==0?'组别编号':'Event Code'" prop="code" align="center"></el-table-column> | 5 | <el-table-column :label="language==0?'组别编号':'Event Code'" prop="code" align="center"></el-table-column> |
| 6 | <el-table-column :label="language==0?'组别名称':'Event'" prop="name" align="center"></el-table-column> | 6 | <el-table-column :label="language==0?'组别名称':'Event'" min-width="150" prop="name" align="center"></el-table-column> |
| 7 | <el-table-column :label="language==0?'舞种':'Dance Type'" align="center"> | 7 | <el-table-column :label="language==0?'舞种':'DISCIPLINE'" width="110" prop="danceType" align="center"> |
| 8 | <template #default="scope"> | ||
| 9 | <span v-if="scope.row.danceTypeDetailStr">{{ scope.row.danceTypeDetailStr }}</span> | ||
| 10 | <span v-else>{{ scope.row.danceType }}</span> | ||
| 11 | </template> | ||
| 12 | </el-table-column> | 8 | </el-table-column> |
| 9 | <el-table-column :label="language==0?'舞种明细':'Dance Detail'" width="120" prop="danceTypeDetailStr" align="center"></el-table-column> | ||
| 10 | |||
| 13 | <el-table-column :label="language==0?'参赛性别':'Sex'" align="center"> | 11 | <el-table-column :label="language==0?'参赛性别':'Sex'" align="center"> |
| 14 | <template #default="scope"> | 12 | <template #default="scope"> |
| 15 | <span v-if="scope.row.playTypeStr">{{ scope.row.playTypeStr }}</span> | 13 | <span v-if="scope.row.playTypeStr">{{ scope.row.playTypeStr }}</span> | ... | ... |
| ... | @@ -103,23 +103,29 @@ const props = defineProps({ | ... | @@ -103,23 +103,29 @@ const props = defineProps({ |
| 103 | const form = ref({}) | 103 | const form = ref({}) |
| 104 | onMounted(()=>{ | 104 | onMounted(()=>{ |
| 105 | getBaseInfoByActiveId(props.matchId).then(res=>{ | 105 | getBaseInfoByActiveId(props.matchId).then(res=>{ |
| 106 | form.value = res.data || {} | 106 | form.value = res.data || null |
| 107 | }).catch(err=>{ | 107 | }).catch(err=>{ |
| 108 | form.value = null | ||
| 108 | console.log(err) | 109 | console.log(err) |
| 109 | }) | 110 | }) |
| 110 | }) | 111 | }) |
| 111 | 112 | ||
| 112 | function building() { | 113 | function building() { |
| 113 | ElMessage.warning(language.value==0?'暂无可预订的信息':'There is no information available for booking') | 114 | ElMessage.warning(language.value==0?'感谢您对本次比赛的关注,该服务暂无可预订信息,敬请期待。':'Thank you for your attention to this competition. The service is currently unavailable for booking. Please stay tuned.') |
| 115 | return | ||
| 114 | } | 116 | } |
| 115 | function popRemark(type){ | 117 | function popRemark(type){ |
| 116 | // if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3') || type=='0' || type=='4' || type=='5'){ | 118 | if(!form.value){ |
| 117 | // building() | 119 | building() |
| 118 | // return | 120 | return |
| 119 | // } | 121 | } |
| 122 | if((form.value.isJdView == 0&&type=='1') || (form.value.isCarView == 0&&type=='2') || (form.value.isFoodView == 0&&type=='3') || type=='0' || type=='4' || type=='5'){ | ||
| 123 | building() | ||
| 124 | return | ||
| 125 | } | ||
| 120 | const params = { | 126 | const params = { |
| 121 | matchId: props.matchId, | 127 | matchId: props.matchId, |
| 122 | title: language.value == 0 ?'预定说明':'Booking Instructions', | 128 | title: language.value == 0 ?'预订说明':'Booking Instructions', |
| 123 | type: type | 129 | type: type |
| 124 | } | 130 | } |
| 125 | proxy.$refs['orderRemarkRef'].open(params) | 131 | proxy.$refs['orderRemarkRef'].open(params) |
| ... | @@ -128,8 +134,7 @@ function goBooking(n) { | ... | @@ -128,8 +134,7 @@ function goBooking(n) { |
| 128 | switch (n) { | 134 | switch (n) { |
| 129 | case 0: | 135 | case 0: |
| 130 | // 票务 | 136 | // 票务 |
| 131 | ElMessage.warning(language.value==0?'暂无可预订的信息':'There is no information available for booking') | 137 | building() |
| 132 | return | ||
| 133 | router.push({path: `/booking/ticket/${props.matchId}`}) | 138 | router.push({path: `/booking/ticket/${props.matchId}`}) |
| 134 | break; | 139 | break; |
| 135 | case 1: | 140 | case 1: |
| ... | @@ -146,16 +151,12 @@ function goBooking(n) { | ... | @@ -146,16 +151,12 @@ function goBooking(n) { |
| 146 | break; | 151 | break; |
| 147 | case 4: | 152 | case 4: |
| 148 | //化妆 | 153 | //化妆 |
| 149 | ElMessage.warning(language.value==0?'暂无可预订的信息':'There is no information available for booking') | 154 | building() |
| 150 | return | ||
| 151 | |||
| 152 | router.push({path: `/booking/makeup/${props.matchId}`}) | 155 | router.push({path: `/booking/makeup/${props.matchId}`}) |
| 153 | break; | 156 | break; |
| 154 | case 5: | 157 | case 5: |
| 155 | //拍照 | 158 | //拍照 |
| 156 | ElMessage.warning(language.value==0?'暂无可预订的信息':'There is no information available for booking') | 159 | building() |
| 157 | return | ||
| 158 | |||
| 159 | router.push({path: `/booking/photography/${props.matchId}`}) | 160 | router.push({path: `/booking/photography/${props.matchId}`}) |
| 160 | break; | 161 | break; |
| 161 | } | 162 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog v-model="show" :title="language==0?'游客登录':'Visitor Login'" close-icon="CircleClose" | 2 | <el-dialog v-model="show" :title="language==0?'快捷注册':'Quick Login'" close-icon="CircleClose" |
| 3 | width="600" :append-to-body="true" destroy-on-close @close="close"> | 3 | width="600" :append-to-body="true" destroy-on-close @close="close"> |
| 4 | <div class="pt30"> | 4 | <div class="pt30"> |
| 5 | <el-form class="d-form" size="large" :label-width="language==0?120:150" style="max-width: 500px;margin: auto"> | 5 | <el-form class="d-form" size="large" :label-width="language==0?120:150" style="max-width: 500px;margin: auto"> | ... | ... |
| ... | @@ -109,7 +109,7 @@ | ... | @@ -109,7 +109,7 @@ |
| 109 | 109 | ||
| 110 | <div class="text-center"> | 110 | <div class="text-center"> |
| 111 | <!-- <el-button class="primary-kx" @click="goStep1">上一步</el-button>--> | 111 | <!-- <el-button class="primary-kx" @click="goStep1">上一步</el-button>--> |
| 112 | <el-button v-if="user.utype=='3'" type="primary" round class="btn-lineG w200px" @click.prevent="upgrade" :loading="loading"> | 112 | <el-button v-if="user&&user.utype=='3'" type="primary" round class="btn-lineG w200px" @click.prevent="upgrade" :loading="loading"> |
| 113 | {{ language == 0 ? '升级账号' : 'Submit' }} | 113 | {{ language == 0 ? '升级账号' : 'Submit' }} |
| 114 | </el-button> | 114 | </el-button> |
| 115 | <el-button v-else type="primary" round class="btn-lineG w200px" @click.prevent="goStep3" :loading="loading"> | 115 | <el-button v-else type="primary" round class="btn-lineG w200px" @click.prevent="goStep3" :loading="loading"> | ... | ... |
| ... | @@ -82,9 +82,9 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -82,9 +82,9 @@ export default defineConfig(({ mode, command }) => { |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | target: 'http://192.168.1.118:8081/', | 85 | // target: 'http://192.168.1.118:8081/', |
| 86 | // target: 'https://dance.itechtop.cn/stage-api', | 86 | // target: 'https://dance.itechtop.cn/stage-api', |
| 87 | // target: 'https://wdsfwuxicenter.com/stage-api', | 87 | target: 'https://wdsfwuxicenter.com/stage-api', |
| 88 | changeOrigin: true, | 88 | changeOrigin: true, |
| 89 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 89 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 90 | } | 90 | } | ... | ... |
-
Please register or sign in to post a comment