no message
Showing
3 changed files
with
211 additions
and
134 deletions
| ... | @@ -110,6 +110,7 @@ import {useRouter} from "vue-router"; | ... | @@ -110,6 +110,7 @@ import {useRouter} from "vue-router"; |
| 110 | import {ref, reactive, onMounted} from "vue"; | 110 | import {ref, reactive, onMounted} from "vue"; |
| 111 | import {useRoute} from "vue-router"; | 111 | import {useRoute} from "vue-router"; |
| 112 | import {getHotelById, getHotelRooms} from "@/apiPc/booking" | 112 | import {getHotelById, getHotelRooms} from "@/apiPc/booking" |
| 113 | |||
| 113 | import {useStorage} from "@vueuse/core/index"; | 114 | import {useStorage} from "@vueuse/core/index"; |
| 114 | 115 | ||
| 115 | const language = useStorage('language', 0) | 116 | const language = useStorage('language', 0) | ... | ... |
| ... | @@ -5,21 +5,23 @@ | ... | @@ -5,21 +5,23 @@ |
| 5 | <div slot="header"> | 5 | <div slot="header"> |
| 6 | <div class="bg-lineg">{{ language == 0 ? '酒店预约下单' : 'Hotel booking order' }}</div> | 6 | <div class="bg-lineg">{{ language == 0 ? '酒店预约下单' : 'Hotel booking order' }}</div> |
| 7 | </div> | 7 | </div> |
| 8 | {{room}} | 8 | <!-- {{room}}--> |
| 9 | <el-row class="pd20" :gutter="20"> | 9 | <el-row class="pd20" :gutter="20"> |
| 10 | <el-col :span="14" > | 10 | <el-col :span="14"> |
| 11 | <div class="border-info"> | 11 | <div class="border-info"> |
| 12 | <h3>{{hotelName}}</h3> | 12 | <h3>{{ hotelName }}</h3> |
| 13 | <div class="roomType">{{room.roomType}}</div> | 13 | <div class="roomType">{{ room.roomType }}</div> |
| 14 | <div class="room"> | 14 | <div class="room"> |
| 15 | <span>{{room.bedType}}</span> | 15 | <span>{{ room.bedType }}</span> |
| 16 | <span>{{ ' | ' + room.area}}m²</span> | 16 | <span>{{ ' | ' + room.area }}m²</span> |
| 17 | <span>{{ ' | ' + room.occupantsNum}}{{ language==0?'人入住':' people' }}</span> | 17 | <span>{{ ' | ' + room.occupantsNum }}{{ language == 0 ? '人入住' : ' people' }}</span> |
| 18 | <span v-show="room.breakfastFlag=='1'">{{ ' | ' + room.breakfastNum}} {{ language==0?'份早餐':'breakfasts' }}</span> | 18 | <span v-show="room.breakfastFlag=='1'">{{ ' | ' + room.breakfastNum }} {{ |
| 19 | <span v-show="room.breakfastFlag=='0'"> | {{ language==0?'无早餐':'No breakfast' }}</span> | 19 | language == 0 ? '份早餐' : 'breakfasts' |
| 20 | <span v-show="room.bathroomFlag=='1'"> | {{ language==0?'热水洗浴':'Shower' }}</span> | 20 | }}</span> |
| 21 | <span v-show="room.windowFlag=='1'"> | {{ language==0?'有窗':'With windows' }}</span> | 21 | <span v-show="room.breakfastFlag=='0'"> | {{ language == 0 ? '无早餐' : 'No breakfast' }}</span> |
| 22 | <span v-show="room.addBedFlag=='1'"> | {{ language==0?'允许加床':'Extra bed' }}</span> | 22 | <span v-show="room.bathroomFlag=='1'"> | {{ language == 0 ? '热水洗浴' : 'Shower' }}</span> |
| 23 | <span v-show="room.windowFlag=='1'"> | {{ language == 0 ? '有窗' : 'With windows' }}</span> | ||
| 24 | <span v-show="room.addBedFlag=='1'"> | {{ language == 0 ? '允许加床' : 'Extra bed' }}</span> | ||
| 23 | </div> | 25 | </div> |
| 24 | </div> | 26 | </div> |
| 25 | 27 | ||
| ... | @@ -28,28 +30,30 @@ | ... | @@ -28,28 +30,30 @@ |
| 28 | <el-form :model="form" :label-width="language == 0 ?'100':'150'"> | 30 | <el-form :model="form" :label-width="language == 0 ?'100':'150'"> |
| 29 | <el-form-item :label="language==0?'入住日期':'Check-in date'"> | 31 | <el-form-item :label="language==0?'入住日期':'Check-in date'"> |
| 30 | <el-date-picker @change="getDaysBetween" | 32 | <el-date-picker @change="getDaysBetween" |
| 31 | v-model="rzRange" | 33 | v-model="rzRange" |
| 32 | type="daterange" | 34 | type="daterange" |
| 33 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/> | 35 | :placeholder="language==0?'选择日期':'Select date'" format="YYYY-MM-DD" |
| 34 | <!-- :picker-options="pickerOptions"--> | 36 | value-format="YYYY-MM-DD"/> |
| 37 | <!-- :picker-options="pickerOptions"--> | ||
| 35 | </el-form-item> | 38 | </el-form-item> |
| 36 | <el-form-item :label="language==0?'房间数':'Rooms'"> | 39 | <el-form-item :label="language==0?'房间数':'Rooms'"> |
| 37 | <el-input-number v-model="form.roomNum" :min="0" :max="canOrderNum" @change="changeRoomNum" /> | 40 | <el-input-number v-model="form.roomNum" :min="0" :max="canOrderNum" @change="changeRoomNum"/> |
| 38 | <div class="red" v-if="rzRange[1]" style="margin:0 8px;display: block;width: 8em;"> | 41 | <div class="red ml20" v-if="rzRange[1]"> |
| 39 | <span v-if="language == 0">剩余房间数:{{canOrderNum}}</span> | 42 | <span v-if="language == 0">剩余房间数:{{ canOrderNum }}</span> |
| 40 | <span v-else>{{canOrderNum}} Remaining rooms</span> | 43 | <span v-else>{{ canOrderNum }} Remaining rooms</span> |
| 41 | </div> | 44 | </div> |
| 42 | </el-form-item> | 45 | </el-form-item> |
| 43 | <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}`"> |
| 44 | <el-input v-model="rzUserArr[index]" placeholder="每间填一位住客姓名"/> | 47 | <el-input v-model="rzUserArr[index]" placeholder="每间填一位住客姓名"/> |
| 45 | </el-form-item> | 48 | </el-form-item> |
| 46 | <el-form-item :label="language==0?'预计到店':'Expected check-in'"> | 49 | <el-form-item :label="language==0?'预计到店':'Expected check-in'"> |
| 47 | <el-select v-model="form.ddDate" :placeholder="language==0?'请选择预计到店时间':'Please select the expected check-in time'"> | 50 | <el-select v-model="form.ddDate" |
| 51 | :placeholder="language==0?'请选择预计到店时间':'Please select the expected check-in time'"> | ||
| 48 | <el-option | 52 | <el-option |
| 49 | v-for="item in ddDateArr" | 53 | v-for="item in ddDateArr" |
| 50 | :key="item.value" | 54 | :key="item.value" |
| 51 | :label="item.label" | 55 | :label="item.label" |
| 52 | :value="item.value" | 56 | :value="item.value" |
| 53 | /> | 57 | /> |
| 54 | </el-select> | 58 | </el-select> |
| 55 | </el-form-item> | 59 | </el-form-item> |
| ... | @@ -59,13 +63,13 @@ | ... | @@ -59,13 +63,13 @@ |
| 59 | 63 | ||
| 60 | <div v-if="room.addBedFlag=='1'"> | 64 | <div v-if="room.addBedFlag=='1'"> |
| 61 | <el-form-item :label="language==0?'是否加床':'Extra bed'"> | 65 | <el-form-item :label="language==0?'是否加床':'Extra bed'"> |
| 62 | <el-radio-group v-model="form.isAddbed"> | 66 | <el-radio-group v-model="form.isAddbed"> |
| 63 | <el-radio label="1">{{ language==0?'是':'Yes' }}</el-radio> | 67 | <el-radio label="1">{{ language == 0 ? '是' : 'Yes' }}</el-radio> |
| 64 | <el-radio label="0">{{ language==0?'否':'No' }}</el-radio> | 68 | <el-radio label="0">{{ language == 0 ? '否' : 'No' }}</el-radio> |
| 65 | </el-radio-group> | 69 | </el-radio-group> |
| 66 | </el-form-item> | 70 | </el-form-item> |
| 67 | <el-form-item :label="language==0?'加床张数':'Extra bed num'"> | 71 | <el-form-item :label="language==0?'加床张数':'Extra bed num'"> |
| 68 | <el-input-number v-model="form.addNum" :min="0" :max="1" @change="changeBed" /> | 72 | <el-input-number v-model="form.addNum" :min="0" :max="1" @change="changeBed"/> |
| 69 | </el-form-item> | 73 | </el-form-item> |
| 70 | <div class="tip" v-if="form.isAddbed=='1'">* | 74 | <div class="tip" v-if="form.isAddbed=='1'">* |
| 71 | <span v-if="language == 0">一个房间最多加一张床</span> | 75 | <span v-if="language == 0">一个房间最多加一张床</span> |
| ... | @@ -78,33 +82,55 @@ | ... | @@ -78,33 +82,55 @@ |
| 78 | <el-col :span="10"> | 82 | <el-col :span="10"> |
| 79 | <div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div> | 83 | <div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div> |
| 80 | <div class="border-rr mt20 pd20 ccitemBox"> | 84 | <div class="border-rr mt20 pd20 ccitemBox"> |
| 81 | <label> {{ language==0?'房费':'Room fee' }} | 85 | <label> {{ language == 0 ? '房费' : 'Room fee' }} |
| 82 | <span class="fr" v-if="language==0">{{ language==0?'¥':'€' }}{{(room.roomPrice*form.roomNum*choseRooms.length).toFixed(2)}}</span> | 86 | <span class="fr" v-if="language==0">{{ |
| 83 | <span class="fr" v-else>{{ language==0?'¥':'€' }}{{(room.roomPriceEn*form.roomNum*choseRooms.length).toFixed(2)}}</span> | 87 | language == 0 ? '¥' : '€' |
| 88 | }}{{ (room.roomPrice * form.roomNum * choseRooms.length).toFixed(2) }}</span> | ||
| 89 | <span class="fr" v-else>{{ | ||
| 90 | language == 0 ? '¥' : '€' | ||
| 91 | }}{{ (room.roomPriceEn * form.roomNum * choseRooms.length).toFixed(2) }}</span> | ||
| 84 | </label> | 92 | </label> |
| 85 | <div class="ccitem" v-for="(c, index) in choseRooms" :key="index"> | 93 | <div class="ccitem" v-for="(c, index) in choseRooms" :key="index"> |
| 86 | {{ c }} | 94 | {{ c }} |
| 87 | <text v-if="language==0">{{form.roomNum}}*{{ language==0?'¥':'€' }}{{room.roomPrice}}</text> | 95 | <text v-if="language==0">{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPrice }}</text> |
| 88 | <text v-else>{{form.roomNum}}*{{ language==0?'¥':'€' }}{{room.roomPriceEn}}</text> | 96 | <text v-else>{{ form.roomNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.roomPriceEn }}</text> |
| 89 | </div> | 97 | </div> |
| 90 | 98 | ||
| 91 | <label v-if="form.isAddbed=='1'">{{ language==0?'加床费':'Extra bed fee' }} | 99 | <label v-if="form.isAddbed=='1'">{{ language == 0 ? '加床费' : 'Extra bed fee' }} |
| 92 | <span class="fr" v-if="language==0">{{ language==0?'¥':'€' }}{{(room.bedPrice*form.addNum*choseRooms.length).toFixed(2)}}</span> | 100 | <span class="fr" v-if="language==0">{{ |
| 93 | <span class="fr" v-else>{{ language==0?'¥':'€' }}{{(room.bedPriceEn*form.addNum*choseRooms.length).toFixed(2)}}</span> | 101 | language == 0 ? '¥' : '€' |
| 102 | }}{{ (room.bedPrice * form.addNum * choseRooms.length).toFixed(2) }}</span> | ||
| 103 | <span class="fr" v-else>{{ | ||
| 104 | language == 0 ? '¥' : '€' | ||
| 105 | }}{{ (room.bedPriceEn * form.addNum * choseRooms.length).toFixed(2) }}</span> | ||
| 94 | </label> | 106 | </label> |
| 95 | 107 | ||
| 96 | <div v-if="form.isAddbed=='1'" class="ccitem" v-for="(c, index) in choseRooms" :key="index"> | 108 | <div v-if="form.isAddbed=='1'" class="ccitem" v-for="(c, index) in choseRooms" :key="index"> |
| 97 | {{ c }} | 109 | {{ c }} |
| 98 | <text v-if="language==0">{{form.addNum}}*{{ language==0?'¥':'€' }}{{room.bedPrice}}</text> | 110 | <text v-if="language==0">{{ form.addNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.bedPrice }}</text> |
| 99 | <text v-else>{{form.addNum}}*{{ language==0?'¥':'€' }}{{room.bedPriceEn}}</text> | 111 | <text v-else>{{ form.addNum }}*{{ language == 0 ? '¥' : '€' }}{{ room.bedPriceEn }}</text> |
| 100 | </div> | 112 | </div> |
| 101 | 113 | ||
| 102 | <label class="bigMoney">{{ language==0?'共计':'Total' }}<span class="fr bigMoney">{{ language==0?'¥':'€' }}{{money}}</span></label> | 114 | <label class="bigMoney">{{ language == 0 ? '共计' : 'Total' }}<span |
| 115 | class="fr bigMoney">{{ language == 0 ? '¥' : '€' }}{{ money }}</span></label> | ||
| 103 | 116 | ||
| 104 | </div> | 117 | </div> |
| 105 | </el-col> | 118 | </el-col> |
| 106 | </el-row> | 119 | </el-row> |
| 107 | </el-card> | 120 | </el-card> |
| 121 | |||
| 122 | <el-card class="mt30"> | ||
| 123 | <el-row justify="space-between" align="middle"> | ||
| 124 | <el-col :span="12"> | ||
| 125 | <label>{{ language == 0 ? '共计金额' : 'Total' }}: | ||
| 126 | {{ language == 0 ? '¥' : '€' }}<span class="bigMoney">{{ money }}</span> | ||
| 127 | </label> | ||
| 128 | </el-col> | ||
| 129 | <el-col :span="12" class="text-right"> | ||
| 130 | <el-button type="primary" class="btn-lineG" @click="submit">确认付款</el-button> | ||
| 131 | </el-col> | ||
| 132 | </el-row> | ||
| 133 | </el-card> | ||
| 108 | <div style="height: 60px;"></div> | 134 | <div style="height: 60px;"></div> |
| 109 | 135 | ||
| 110 | </div> | 136 | </div> |
| ... | @@ -112,12 +138,13 @@ | ... | @@ -112,12 +138,13 @@ |
| 112 | </template> | 138 | </template> |
| 113 | 139 | ||
| 114 | <script setup> | 140 | <script setup> |
| 115 | import {useRouter,useRoute} from "vue-router"; | 141 | import {useRouter, useRoute} from "vue-router"; |
| 116 | import {ref, reactive, onMounted} from "vue"; | 142 | import {ref, reactive, onMounted} from "vue"; |
| 117 | import {useStorage} from "@vueuse/core/index"; | 143 | import {useStorage} from "@vueuse/core/index"; |
| 118 | import { checkResidueRoom,newsSubmitOrderHotel } from "@/apiPc/booking" | 144 | import {checkResidueRoom, newsSubmitOrderHotel} from "@/apiPc/booking" |
| 119 | import dayjs from 'dayjs' | 145 | import dayjs from 'dayjs' |
| 120 | import {ElMessage} from "element-plus"; | 146 | import {ElMessage} from "element-plus"; |
| 147 | |||
| 121 | const language = useStorage('language', 0) | 148 | const language = useStorage('language', 0) |
| 122 | const router = useRouter() | 149 | const router = useRouter() |
| 123 | const route = useRoute() | 150 | const route = useRoute() |
| ... | @@ -135,77 +162,77 @@ const rzUserArr = ref([]) | ... | @@ -135,77 +162,77 @@ const rzUserArr = ref([]) |
| 135 | const money = ref(0) | 162 | const money = ref(0) |
| 136 | const choseRooms = ref([]) | 163 | const choseRooms = ref([]) |
| 137 | const ddDateArr = ref([ | 164 | const ddDateArr = ref([ |
| 138 | { | 165 | { |
| 139 | value: '08:00', | 166 | value: '08:00', |
| 140 | label: '08:00' | 167 | label: '08:00' |
| 141 | }, | 168 | }, |
| 142 | { | 169 | { |
| 143 | value: '09:00', | 170 | value: '09:00', |
| 144 | label: '09:00' | 171 | label: '09:00' |
| 145 | }, | 172 | }, |
| 146 | { | 173 | { |
| 147 | value: '10:00', | 174 | value: '10:00', |
| 148 | label: '10:00' | 175 | label: '10:00' |
| 149 | }, | 176 | }, |
| 150 | { | 177 | { |
| 151 | value: '11:00', | 178 | value: '11:00', |
| 152 | label: '11:00' | 179 | label: '11:00' |
| 153 | }, | 180 | }, |
| 154 | { | 181 | { |
| 155 | value: '12:00', | 182 | value: '12:00', |
| 156 | label: '12:00' | 183 | label: '12:00' |
| 157 | }, | 184 | }, |
| 158 | { | 185 | { |
| 159 | value: '13:00', | 186 | value: '13:00', |
| 160 | label: '13:00' | 187 | label: '13:00' |
| 161 | }, | 188 | }, |
| 162 | { | 189 | { |
| 163 | value: '14:00', | 190 | value: '14:00', |
| 164 | label: '14:00' | 191 | label: '14:00' |
| 165 | }, | 192 | }, |
| 166 | { | 193 | { |
| 167 | value: '15:00', | 194 | value: '15:00', |
| 168 | label: '15:00' | 195 | label: '15:00' |
| 169 | }, | 196 | }, |
| 170 | { | 197 | { |
| 171 | value: '16:00', | 198 | value: '16:00', |
| 172 | label: '16:00' | 199 | label: '16:00' |
| 173 | }, | 200 | }, |
| 174 | { | 201 | { |
| 175 | value: '17:00', | 202 | value: '17:00', |
| 176 | label: '17:00' | 203 | label: '17:00' |
| 177 | }, | 204 | }, |
| 178 | { | 205 | { |
| 179 | value: '18:00', | 206 | value: '18:00', |
| 180 | label: '18:00' | 207 | label: '18:00' |
| 181 | }, | 208 | }, |
| 182 | { | 209 | { |
| 183 | value: '19:00', | 210 | value: '19:00', |
| 184 | label: '19:00' | 211 | label: '19:00' |
| 185 | }, | 212 | }, |
| 186 | { | 213 | { |
| 187 | value: '20:00', | 214 | value: '20:00', |
| 188 | label: '20:00' | 215 | label: '20:00' |
| 189 | }, | 216 | }, |
| 190 | { | 217 | { |
| 191 | value: '21:00', | 218 | value: '21:00', |
| 192 | label: '21:00' | 219 | label: '21:00' |
| 193 | }, | 220 | }, |
| 194 | { | 221 | { |
| 195 | value: '22:00', | 222 | value: '22:00', |
| 196 | label: '22:00' | 223 | label: '22:00' |
| 197 | }, | 224 | }, |
| 198 | { | 225 | { |
| 199 | value: '23:00', | 226 | value: '23:00', |
| 200 | label: '23:00' | 227 | label: '23:00' |
| 201 | }, | 228 | }, |
| 202 | { | 229 | { |
| 203 | value: '00:00', | 230 | value: '00:00', |
| 204 | label: '00:00' | 231 | label: '00:00' |
| 205 | } | 232 | } |
| 206 | ]) | 233 | ]) |
| 207 | let usedays = 0 | 234 | let usedays = 0 |
| 208 | onMounted(()=>{ | 235 | onMounted(() => { |
| 209 | console.log(route.query) | 236 | console.log(route.query) |
| 210 | room.value = JSON.parse(decodeURIComponent(route.query.room)) | 237 | room.value = JSON.parse(decodeURIComponent(route.query.room)) |
| 211 | hotelName.value = route.query.hotelName | 238 | hotelName.value = route.query.hotelName |
| ... | @@ -216,6 +243,7 @@ onMounted(()=>{ | ... | @@ -216,6 +243,7 @@ onMounted(()=>{ |
| 216 | room.value.hqNewStart = canOrderStart.value | 243 | room.value.hqNewStart = canOrderStart.value |
| 217 | } | 244 | } |
| 218 | }) | 245 | }) |
| 246 | |||
| 219 | function changeRoomNum(e) { | 247 | function changeRoomNum(e) { |
| 220 | if (form.value.addNum > e) { | 248 | if (form.value.addNum > e) { |
| 221 | form.value.addNum = e | 249 | form.value.addNum = e |
| ... | @@ -224,9 +252,11 @@ function changeRoomNum(e) { | ... | @@ -224,9 +252,11 @@ function changeRoomNum(e) { |
| 224 | rzUserArr.value.length = e | 252 | rzUserArr.value.length = e |
| 225 | countMoney() | 253 | countMoney() |
| 226 | } | 254 | } |
| 255 | |||
| 227 | function changeBed() { | 256 | function changeBed() { |
| 228 | countMoney() | 257 | countMoney() |
| 229 | } | 258 | } |
| 259 | |||
| 230 | function checkreRooms() { | 260 | function checkreRooms() { |
| 231 | var obj = { | 261 | var obj = { |
| 232 | ahrId: room.value.id, | 262 | ahrId: room.value.id, |
| ... | @@ -237,8 +267,9 @@ function checkreRooms() { | ... | @@ -237,8 +267,9 @@ function checkreRooms() { |
| 237 | canOrderNum.value = res.data.useCount | 267 | canOrderNum.value = res.data.useCount |
| 238 | }) | 268 | }) |
| 239 | } | 269 | } |
| 270 | |||
| 240 | function getDaysBetween(e) { | 271 | function getDaysBetween(e) { |
| 241 | console.log('入住时间arr',e,rzRange.value) | 272 | console.log('入住时间arr', e, rzRange.value) |
| 242 | var d1 = Date.parse(e[0]) | 273 | var d1 = Date.parse(e[0]) |
| 243 | var d2 = Date.parse(e[1]) | 274 | var d2 = Date.parse(e[1]) |
| 244 | if (d1 == d2) { | 275 | if (d1 == d2) { |
| ... | @@ -266,6 +297,7 @@ function getDaysBetween(e) { | ... | @@ -266,6 +297,7 @@ function getDaysBetween(e) { |
| 266 | choseRooms.value = dateArr; | 297 | choseRooms.value = dateArr; |
| 267 | checkreRooms() | 298 | checkreRooms() |
| 268 | } | 299 | } |
| 300 | |||
| 269 | function getDate(datestr) { | 301 | function getDate(datestr) { |
| 270 | var temp = datestr.split("-"); | 302 | var temp = datestr.split("-"); |
| 271 | if (temp[1] === '01') { | 303 | if (temp[1] === '01') { |
| ... | @@ -278,8 +310,9 @@ function getDate(datestr) { | ... | @@ -278,8 +310,9 @@ function getDate(datestr) { |
| 278 | var date = new Date(temp[0], temp[1], temp[2]); | 310 | var date = new Date(temp[0], temp[1], temp[2]); |
| 279 | return date | 311 | return date |
| 280 | } | 312 | } |
| 313 | |||
| 281 | function countMoney() { | 314 | function countMoney() { |
| 282 | if(language.value == 0){ | 315 | if (language.value == 0) { |
| 283 | money.value = ((room.value.roomPrice * form.value.roomNum * usedays) + (room.value.bedPrice * form.value | 316 | money.value = ((room.value.roomPrice * form.value.roomNum * usedays) + (room.value.bedPrice * form.value |
| 284 | .addNum * usedays)).toFixed(2) | 317 | .addNum * usedays)).toFixed(2) |
| 285 | 318 | ||
| ... | @@ -289,20 +322,33 @@ function countMoney() { | ... | @@ -289,20 +322,33 @@ function countMoney() { |
| 289 | } | 322 | } |
| 290 | // console.log(usedays,money.value) | 323 | // console.log(usedays,money.value) |
| 291 | } | 324 | } |
| 325 | |||
| 292 | function submit() { | 326 | function submit() { |
| 293 | if (usedays == 0) { | 327 | if (usedays == 0) { |
| 294 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' :'Check-in time must be greater than one day') | 328 | ElMessage.error(language.value == 0 ? '入住时间跨度需大于一天' : 'Check-in time must be greater than one day') |
| 295 | return | 329 | return |
| 296 | } | 330 | } |
| 297 | form.value.rzStart = rzRange.value[0] | 331 | form.value.rzStart = rzRange.value[0] |
| 298 | form.value.rzEnd = rzRange.value[1] | 332 | form.value.rzEnd = rzRange.value[1] |
| 299 | 333 | ||
| 334 | let arr = [] | ||
| 335 | for (var n of rzUserArr.value) { | ||
| 336 | if (n == '' || n == undefined) { | ||
| 337 | |||
| 338 | // '请填写入住人信息' | ||
| 339 | |||
| 340 | |||
| 341 | return | ||
| 342 | } else { | ||
| 343 | arr.push(n) | ||
| 344 | } | ||
| 345 | } | ||
| 300 | form.value.rzUsers = arr.toString() | 346 | form.value.rzUsers = arr.toString() |
| 301 | form.value.activeId = room.value.activityId | 347 | form.value.activeId = room.value.activityId |
| 302 | form.value.ahId = room.value.hotelId | 348 | form.value.ahId = room.value.hotelId |
| 303 | form.value.ahrId = room.value.id | 349 | form.value.ahrId = room.value.id |
| 304 | form.value.orderName = hotelName.value | 350 | form.value.orderName = hotelName.value |
| 305 | form.value.roomName =room.value.roomType | 351 | form.value.roomName = room.value.roomType |
| 306 | var str = '' | 352 | var str = '' |
| 307 | var str2 = '' | 353 | var str2 = '' |
| 308 | if (form.value.addNum && form.value.addNum > 0) { | 354 | if (form.value.addNum && form.value.addNum > 0) { |
| ... | @@ -319,21 +365,37 @@ function submit() { | ... | @@ -319,21 +365,37 @@ function submit() { |
| 319 | console.log(form.value.room) | 365 | console.log(form.value.room) |
| 320 | 366 | ||
| 321 | // 提交确认 | 367 | // 提交确认 |
| 322 | ElMessage.confirm(language.value == 0 ? '确认提交订单吗?' :'Confirm to submit the order?', { | 368 | ElMessage.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { |
| 323 | confirmButtonText: language.value == 0 ? '确定' :'Confirm', | 369 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 324 | cancelButtonText: language.value == 0 ? '取消' :'Cancel', | 370 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 325 | type: 'warning' | 371 | type: 'warning' |
| 326 | }).then(() => { | 372 | }).then(() => { |
| 327 | newsSubmitOrderHotel(form.value).then(res=>{ | 373 | newsSubmitOrderHotel(form.value).then(res => { |
| 328 | if (res.data) { | 374 | if (res.data) { |
| 329 | if (res.data.roomNum == -100) { | 375 | if (res.data.roomNum == -100) { |
| 330 | ElMessage.warning(language.value == 0 ? '剩余房间数不足' :'The remaining number of rooms is insufficient') | 376 | ElMessage.warning(language.value == 0 ? '剩余房间数不足' : 'The remaining number of rooms is insufficient') |
| 331 | checkreRooms() | 377 | checkreRooms() |
| 332 | } else { | 378 | } else { |
| 333 | //去付钱 | 379 | //去付钱 |
| 334 | } | 380 | } |
| 335 | } else { | 381 | } else { |
| 336 | ElMessage.warning(language.value == 0 ? '无可预定的房间' :'No rooms available to book') | 382 | ElMessage.warning(language.value == 0 ? '无可预定的房间' : 'No rooms available to book') |
| 383 | } | ||
| 384 | }) | ||
| 385 | }) | ||
| 386 | } | ||
| 387 | |||
| 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 | } | ||
| 337 | } | 399 | } |
| 338 | }) | 400 | }) |
| 339 | }) | 401 | }) |
| ... | @@ -341,25 +403,36 @@ function submit() { | ... | @@ -341,25 +403,36 @@ function submit() { |
| 341 | </script> | 403 | </script> |
| 342 | 404 | ||
| 343 | <style scoped lang="scss"> | 405 | <style scoped lang="scss"> |
| 344 | .bigMoney{font-size: 36px!important; | 406 | .bigMoney { |
| 345 | font-family: DIN Alternate; | 407 | font-size: 36px !important; |
| 346 | font-weight: bold;} | 408 | font-family: 'DIN Alternate'; |
| 409 | font-weight: bold; | ||
| 410 | } | ||
| 411 | |||
| 347 | .bg-lineg { | 412 | .bg-lineg { |
| 348 | height: 40px; | 413 | height: 40px; |
| 349 | line-height: 40px; | 414 | line-height: 40px; |
| 350 | font-size: 18px; | 415 | font-size: 18px; |
| 351 | text-align: center; | 416 | text-align: center; |
| 352 | } | 417 | } |
| 418 | |||
| 353 | .leftboderTT { | 419 | .leftboderTT { |
| 354 | font-weight: 600; | 420 | font-weight: 600; |
| 355 | font-size: 16px; | 421 | font-size: 16px; |
| 356 | color: #453DEA; | 422 | color: #453DEA; |
| 357 | } | 423 | } |
| 358 | .border-rr{border-radius: 5px; | 424 | |
| 359 | border: 1px solid #DCDFE6;} | 425 | .border-rr { |
| 360 | .room{font-weight: 400; | 426 | border-radius: 5px; |
| 427 | border: 1px solid #DCDFE6; | ||
| 428 | } | ||
| 429 | |||
| 430 | .room { | ||
| 431 | font-weight: 400; | ||
| 361 | font-size: 14px; | 432 | font-size: 14px; |
| 362 | color: #929AA0;} | 433 | color: #929AA0; |
| 434 | } | ||
| 435 | |||
| 363 | .ccitemBox { | 436 | .ccitemBox { |
| 364 | overflow: auto; | 437 | overflow: auto; |
| 365 | 438 | ||
| ... | @@ -367,8 +440,10 @@ function submit() { | ... | @@ -367,8 +440,10 @@ function submit() { |
| 367 | margin: 10px 0; | 440 | margin: 10px 0; |
| 368 | display: block; | 441 | display: block; |
| 369 | min-height: 30px; | 442 | min-height: 30px; |
| 443 | |||
| 370 | span { | 444 | span { |
| 371 | color: #FF8124;font-family: DIN Alternate; | 445 | color: #FF8124; |
| 446 | font-family: DIN Alternate; | ||
| 372 | font-size: 24px; | 447 | font-size: 24px; |
| 373 | } | 448 | } |
| 374 | } | 449 | } |
| ... | @@ -390,4 +465,8 @@ function submit() { | ... | @@ -390,4 +465,8 @@ function submit() { |
| 390 | font-size: 13px; | 465 | font-size: 13px; |
| 391 | } | 466 | } |
| 392 | } | 467 | } |
| 468 | |||
| 469 | .red { | ||
| 470 | color: #FF8124; | ||
| 471 | } | ||
| 393 | </style> | 472 | </style> | ... | ... |
| ... | @@ -87,8 +87,6 @@ | ... | @@ -87,8 +87,6 @@ |
| 87 | {{ language == 0 ?'登录后查看详细报项信息':'View detailed report information after logging in' }} | 87 | {{ language == 0 ?'登录后查看详细报项信息':'View detailed report information after logging in' }} |
| 88 | </el-button> | 88 | </el-button> |
| 89 | </div> | 89 | </div> |
| 90 | |||
| 91 | |||
| 92 | </el-card> | 90 | </el-card> |
| 93 | 91 | ||
| 94 | <el-card class="mt20 mb20"> | 92 | <el-card class="mt20 mb20"> |
| ... | @@ -308,7 +306,6 @@ | ... | @@ -308,7 +306,6 @@ |
| 308 | <h3 class="wePrice">{{ language==0?'¥':'€' }}{{form.totalFee}}</h3> | 306 | <h3 class="wePrice">{{ language==0?'¥':'€' }}{{form.totalFee}}</h3> |
| 309 | <span v-if="language==0" class="text-danger size12">*您可以在上传汇款单完成后,与联系人进行电话确认。具体缴费结果,可以在个人中心-我的报名中查看进度</span> | 307 | <span v-if="language==0" class="text-danger size12">*您可以在上传汇款单完成后,与联系人进行电话确认。具体缴费结果,可以在个人中心-我的报名中查看进度</span> |
| 310 | <span v-else class="text-danger size12">*You can confirm with the contact person by phone after uploading the remittance form. The specific payment results can be viewed in the My Registration section of the personal center to check the progress</span> | 308 | <span v-else class="text-danger size12">*You can confirm with the contact person by phone after uploading the remittance form. The specific payment results can be viewed in the My Registration section of the personal center to check the progress</span> |
| 311 | |||
| 312 | </div> | 309 | </div> |
| 313 | </el-card> | 310 | </el-card> |
| 314 | </div> | 311 | </div> | ... | ... |
-
Please register or sign in to post a comment