车辆
Showing
4 changed files
with
199 additions
and
92 deletions
| ... | @@ -237,6 +237,15 @@ export function getBaseInfoByActiveId(id) { | ... | @@ -237,6 +237,15 @@ export function getBaseInfoByActiveId(id) { |
| 237 | }) | 237 | }) |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | export function vehicleConfigList(params) { | ||
| 241 | return request({ | ||
| 242 | url: `/ota/vehicleConfig/list`, | ||
| 243 | method: 'get', | ||
| 244 | params | ||
| 245 | }) | ||
| 246 | } | ||
| 247 | |||
| 248 | |||
| 240 | export function checkRoomPayByUserId(id) { | 249 | export function checkRoomPayByUserId(id) { |
| 241 | return request({ | 250 | return request({ |
| 242 | url: `/ota/norder/checkRoomPayByUserId`, | 251 | url: `/ota/norder/checkRoomPayByUserId`, | ... | ... |
| ... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
| 7 | <div class="box"> | 7 | <div class="box"> |
| 8 | <div class="searchBar"> | 8 | <div class="searchBar"> |
| 9 | <el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" /> | 9 | <el-input v-model="query.name" :placeholder="language==0?'请输入关键字搜索':'Search'" class="no-border" /> |
| 10 | <el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getList"> | 10 | <el-button class="btn-lineG" icon="search" size="large" type="primary" @click="getVehicleByCheckIn"> |
| 11 | {{ language == 0 ? '搜索' : 'Search' }} | 11 | {{ language == 0 ? '搜索' : 'Search' }} |
| 12 | </el-button> | 12 | </el-button> |
| 13 | </div> | 13 | </div> |
| ... | @@ -97,7 +97,7 @@ function getList() { | ... | @@ -97,7 +97,7 @@ function getList() { |
| 97 | async function getVehicleByCheckIn() { | 97 | async function getVehicleByCheckIn() { |
| 98 | loading.value = true | 98 | loading.value = true |
| 99 | const res = await booking.getVehicleByCheckIn(query.value) | 99 | const res = await booking.getVehicleByCheckIn(query.value) |
| 100 | list.value = res.rows | 100 | list.value = res.data || [] |
| 101 | loading.value = false | 101 | loading.value = false |
| 102 | } | 102 | } |
| 103 | 103 | ... | ... |
| ... | @@ -18,38 +18,51 @@ | ... | @@ -18,38 +18,51 @@ |
| 18 | </div> | 18 | </div> |
| 19 | </div> | 19 | </div> |
| 20 | 20 | ||
| 21 | <div class="leftboderTT">{{ language == 0 ? '预约信息' : 'Reservation information' }}</div> | 21 | <div class="leftboderTT"> |
| 22 | {{ language == 0 ? '预约信息' : 'Reservation information' }} | ||
| 23 | </div> | ||
| 22 | <div class="border-rr mt20 pd20"> | 24 | <div class="border-rr mt20 pd20"> |
| 23 | <el-form ref="formRef" :label-width="language == 0 ?'120':'200'" :model="form" :rules="rules"> | 25 | <el-form ref="formRef" :label-width="language == 0 ?'120':'200'" :model="form" :rules="rules"> |
| 24 | <el-form-item :label="language==0?'人数':'Person Count'" required> | 26 | <el-form-item :label="language==0?'人数':'Person Count'" prop="pickUpBo.count"> |
| 25 | <el-input-number v-model="form.pickUpBo.count" type="text" @change="changecarNum" /> | 27 | <el-input-number v-model="form.pickUpBo.count" type="text" @change="changecarNum" /> |
| 26 | </el-form-item> | 28 | </el-form-item> |
| 27 | <el-form-item :label="language==0?'用车日期':'Date'" required> | 29 | <el-form-item :label="language==0?'用车日期':'Date'" prop="date1"> |
| 28 | <el-date-picker | 30 | <el-date-picker |
| 29 | v-model="date1" :disabled-date="disabledDate" | 31 | v-model="form.date1" :disabled-date="disabledDate" |
| 30 | :placeholder="language==0?'选择日期':'Select date'" | 32 | :placeholder="language==0?'选择日期':'Select date'" |
| 31 | format="YYYY-MM-DD" type="date" | 33 | format="YYYY-MM-DD" type="date" |
| 32 | value-format="YYYY-MM-DD" | 34 | value-format="YYYY-MM-DD" |
| 33 | /> | 35 | /> |
| 34 | </el-form-item> | 36 | </el-form-item> |
| 35 | <el-form-item :label="language==0?'用车时间':'Time'" required> | 37 | <el-form-item :label="language==0?'用车时间':'Time'" prop="lvcId"> |
| 36 | <el-time-picker v-model="revTime1" format="HH:mm" value-format="HH:mm" @change="bindTimeChange" /> | 38 | <!-- <el-time-picker v-model="revTime1" format="HH:mm" value-format="HH:mm" @change="bindTimeChange" />--> |
| 39 | |||
| 40 | <el-select v-model="form.lvcId"> | ||
| 41 | <el-option v-for="v in timeList" :key="v.id" :label="`${v.nameStart}~${v.nameEnd}`" :value="v.id" /> | ||
| 42 | </el-select> | ||
| 37 | </el-form-item> | 43 | </el-form-item> |
| 38 | <el-form-item :label="language==0?'联系人':'Contacts'" required> | 44 | <el-form-item |
| 45 | v-for="(v,i) in form.list" :key="i" :label="`${language==0?`乘坐人${i+1}`:`Contacts${i+1}`}`" | ||
| 46 | :prop="`list.${i}.name`" | ||
| 47 | :rules="rules.name" | ||
| 48 | > | ||
| 49 | <el-input v-model="v.name" type="text" /> | ||
| 50 | </el-form-item> | ||
| 51 | <el-form-item :label="language==0?'联系人':'Contacts'" prop="pickUpBo.contacts"> | ||
| 39 | <el-input v-model="form.pickUpBo.contacts" type="text" /> | 52 | <el-input v-model="form.pickUpBo.contacts" type="text" /> |
| 40 | </el-form-item> | 53 | </el-form-item> |
| 41 | <el-form-item :label="language==0?'联系电话':'Phone'" required> | 54 | <el-form-item :label="language==0?'联系电话':'Phone'" prop="pickUpBo.phone"> |
| 42 | <el-input v-model="form.pickUpBo.phone" type="text" /> | 55 | <el-input v-model="form.pickUpBo.phone" type="text" /> |
| 43 | </el-form-item> | 56 | </el-form-item> |
| 44 | <el-form-item :label="language==0?'航班/火车班次:':'Flight/Train No'" required> | 57 | <el-form-item :label="language==0?'航班/火车班次:':'Flight/Train No'" prop="pickUpBo.no"> |
| 45 | <el-input v-model="form.pickUpBo.no" type="text" /> | 58 | <el-input v-model="form.pickUpBo.no" type="text" /> |
| 46 | </el-form-item> | 59 | </el-form-item> |
| 47 | <el-form-item :label="language==0?'接机/接站地点':'Pick up/Drop off Address'" required> | 60 | <!-- <el-form-item :label="language==0?'接机/接站地点':'Pick up/Drop off Address'" required>--> |
| 48 | <el-input v-model="form.pickUpBo.noAddress" type="text" /> | 61 | <!-- <el-input v-model="form.pickUpBo.noAddress" type="text" />--> |
| 49 | </el-form-item> | 62 | <!-- </el-form-item>--> |
| 50 | <el-form-item :label="language==0?'送达地点':'Delivery Address'" required> | 63 | <!-- <el-form-item :label="language==0?'送达地点':'Delivery Address'" required>--> |
| 51 | <el-input v-model="form.pickUpBo.deliveryAddress" type="text" /> | 64 | <!-- <el-input v-model="form.pickUpBo.deliveryAddress" type="text" />--> |
| 52 | </el-form-item> | 65 | <!-- </el-form-item>--> |
| 53 | <el-form-item :label="language==0?'备注':'Remarks'"> | 66 | <el-form-item :label="language==0?'备注':'Remarks'"> |
| 54 | <el-input v-model="form.pickUpBo.remarks" rows="3" type="textarea" /> | 67 | <el-input v-model="form.pickUpBo.remarks" rows="3" type="textarea" /> |
| 55 | </el-form-item> | 68 | </el-form-item> |
| ... | @@ -60,19 +73,22 @@ | ... | @@ -60,19 +73,22 @@ |
| 60 | <div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div> | 73 | <div class="leftboderTT">{{ language == 0 ? '订单明细' : 'Order details' }}</div> |
| 61 | <div class="border-rr mt20 pd20 ccitemBox"> | 74 | <div class="border-rr mt20 pd20 ccitemBox"> |
| 62 | <label> {{ language == 0 ? '单价' : 'Price' }} | 75 | <label> {{ language == 0 ? '单价' : 'Price' }} |
| 63 | <span class="fr">{{ language == 0 ? '¥' : '€' }}{{ | 76 | <span class="fr">{{ language == 0 ? '¥' : '€' }} |
| 64 | language == 0 ? item.upPrice : item.upPriceEn | 77 | {{ language == 0 ? item.upPrice : item.upPriceEn }} |
| 65 | }}</span> | 78 | </span> |
| 66 | </label> | 79 | </label> |
| 67 | <div class="ccitem"> | 80 | <div class="ccitem"> |
| 68 | <span>{{ form.pickUpBo.count }} *{{ | 81 | <span> |
| 69 | language == 0 ? '¥' : '€' | 82 | {{ form.pickUpBo.count }} *{{ language == 0 ? '¥' : '€' }} |
| 70 | }}{{ language == 0 ? item.upPrice : item.upPriceEn }}</span> | 83 | {{ language == 0 ? item.upPrice : item.upPriceEn }} |
| 84 | </span> | ||
| 71 | </div> | 85 | </div> |
| 72 | 86 | ||
| 73 | <label>{{ language == 0 ? '共计' : 'Total' }}<span | 87 | <label>{{ language == 0 ? '共计' : 'Total' }} |
| 74 | class="fr bigMoney" | 88 | <span class="fr bigMoney"> |
| 75 | >{{ language == 0 ? '¥' : '€' }}{{ money }}</span></label> | 89 | {{ language == 0 ? '¥' : '€' }}{{ money }} |
| 90 | </span> | ||
| 91 | </label> | ||
| 76 | 92 | ||
| 77 | </div> | 93 | </div> |
| 78 | </el-col> | 94 | </el-col> |
| ... | @@ -83,9 +99,12 @@ | ... | @@ -83,9 +99,12 @@ |
| 83 | <el-row align="middle" justify="space-between"> | 99 | <el-row align="middle" justify="space-between"> |
| 84 | <el-col :span="12"> | 100 | <el-col :span="12"> |
| 85 | <label>{{ language == 0 ? '共计金额' : 'Total' }}: | 101 | <label>{{ language == 0 ? '共计金额' : 'Total' }}: |
| 86 | <span class=" text-warning"> {{ language == 0 ? '¥' : '€' }}<span class="bigMoney">{{ | 102 | <span class=" text-warning"> |
| 87 | money | 103 | {{ language == 0 ? '¥' : '€' }} |
| 88 | }}</span></span> | 104 | <span class="bigMoney"> |
| 105 | {{ money }} | ||
| 106 | </span> | ||
| 107 | </span> | ||
| 89 | </label> | 108 | </label> |
| 90 | </el-col> | 109 | </el-col> |
| 91 | <el-col :span="12" class="text-right"> | 110 | <el-col :span="12" class="text-right"> |
| ... | @@ -105,13 +124,14 @@ | ... | @@ -105,13 +124,14 @@ |
| 105 | 124 | ||
| 106 | <script setup> | 125 | <script setup> |
| 107 | import { useRouter, useRoute } from 'vue-router' | 126 | import { useRouter, useRoute } from 'vue-router' |
| 108 | import { ref, onMounted, watch } from 'vue' | 127 | import { ref, onMounted, getCurrentInstance } from 'vue' |
| 109 | import { useStorage } from '@vueuse/core/index' | 128 | import { useStorage } from '@vueuse/core/index' |
| 110 | import { getBaseInfoByActiveId, submitOrderCar } from '@/apiPc/booking' | 129 | import { getBaseInfoByActiveId, submitOrderCar, vehicleConfigList } from '@/apiPc/booking' |
| 111 | import dayjs from 'dayjs' | 130 | import dayjs from 'dayjs' |
| 112 | import { ElMessage, ElMessageBox } from 'element-plus' | 131 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 113 | import useUserStore from '@/store/modules/user' | 132 | import useUserStore from '@/store/modules/user' |
| 114 | 133 | ||
| 134 | const { proxy } = getCurrentInstance() | ||
| 115 | const payLoading = ref(false) | 135 | const payLoading = ref(false) |
| 116 | const user = useUserStore().user | 136 | const user = useUserStore().user |
| 117 | const language = useStorage('language', 0) | 137 | const language = useStorage('language', 0) |
| ... | @@ -119,17 +139,58 @@ const router = useRouter() | ... | @@ -119,17 +139,58 @@ const router = useRouter() |
| 119 | const route = useRoute() | 139 | const route = useRoute() |
| 120 | const item = ref({}) | 140 | const item = ref({}) |
| 121 | const revTime1 = ref('') | 141 | const revTime1 = ref('') |
| 122 | const date1 = ref('') | ||
| 123 | const form = ref({ | 142 | const form = ref({ |
| 124 | pickUpBo: { | 143 | pickUpBo: { |
| 125 | count: 1 | 144 | count: 1 |
| 126 | } | 145 | }, |
| 146 | list: [{}] | ||
| 127 | }) | 147 | }) |
| 128 | 148 | ||
| 129 | const money = ref(0) | 149 | const money = ref(0) |
| 130 | const rules = ref({}) | 150 | const rules = ref({ |
| 151 | 'pickUpBo.count': { | ||
| 152 | required: true, | ||
| 153 | message: language.value == 0 ? '请输入人数' : 'Please enter the number of people', | ||
| 154 | trigger: 'blur' | ||
| 155 | }, | ||
| 156 | 'pickUpBo.revTime': { | ||
| 157 | required: true, | ||
| 158 | message: language.value == 0 ? '请选择时间' : 'Please select time', | ||
| 159 | trigger: 'blur' | ||
| 160 | }, | ||
| 161 | 'pickUpBo.contacts': { | ||
| 162 | required: true, | ||
| 163 | message: language.value == 0 ? '请输入联系人' : 'Please enter contacts', | ||
| 164 | trigger: 'blur' | ||
| 165 | }, | ||
| 166 | 'pickUpBo.phone': { | ||
| 167 | required: true, | ||
| 168 | message: language.value == 0 ? '请输入联系电话' : 'Please enter contact number', | ||
| 169 | trigger: 'blur' | ||
| 170 | }, | ||
| 171 | 'pickUpBo.no': { | ||
| 172 | required: true, | ||
| 173 | message: language.value == 0 ? '请输入航班号' : 'Please enter flight number', | ||
| 174 | trigger: 'blur' | ||
| 175 | }, | ||
| 176 | name: { | ||
| 177 | required: true, | ||
| 178 | message: language.value == 0 ? '请输入姓名' : 'Please enter name', | ||
| 179 | trigger: 'blur' | ||
| 180 | }, | ||
| 181 | date1: { | ||
| 182 | required: true, | ||
| 183 | message: language.value == 0 ? '请选择日期' : 'Please select date', | ||
| 184 | trigger: 'blur' | ||
| 185 | }, | ||
| 186 | lvcId: { | ||
| 187 | required: true, | ||
| 188 | message: language.value == 0 ? '请选择时间' : 'Please select time ', | ||
| 189 | trigger: 'blur' | ||
| 190 | } | ||
| 191 | }) | ||
| 131 | const lform = ref({}) | 192 | const lform = ref({}) |
| 132 | 193 | const timeList = ref([]) | |
| 133 | 194 | ||
| 134 | onMounted(() => { | 195 | onMounted(() => { |
| 135 | item.value = JSON.parse(decodeURIComponent(route.query.item)) | 196 | item.value = JSON.parse(decodeURIComponent(route.query.item)) |
| ... | @@ -137,14 +198,22 @@ onMounted(() => { | ... | @@ -137,14 +198,22 @@ onMounted(() => { |
| 137 | money.value = 0 | 198 | money.value = 0 |
| 138 | changecarNum() | 199 | changecarNum() |
| 139 | initDays() | 200 | initDays() |
| 201 | handleVehicleConfigList() | ||
| 140 | }) | 202 | }) |
| 141 | 203 | ||
| 142 | function changecarNum() { | 204 | function changecarNum() { |
| 143 | money.value = (form.value.pickUpBo.count * (language.value == 0 ? item.value.upPrice : item.value.upPriceEn)).toFixed(2) | 205 | const num = form.value.pickUpBo.count |
| 206 | money.value = (num * (language.value == 0 ? item.value.upPrice : item.value.upPriceEn)).toFixed(2) | ||
| 207 | |||
| 208 | if (num) { | ||
| 209 | const arr = [...new Array(num).fill({})] | ||
| 210 | form.value.list = JSON.parse(JSON.stringify(arr)) | ||
| 211 | } | ||
| 144 | } | 212 | } |
| 145 | 213 | ||
| 146 | function bindTimeChange(e) { | 214 | async function handleVehicleConfigList() { |
| 147 | revTime1.value = e | 215 | const res = await vehicleConfigList({ lavId: item.value.id }) |
| 216 | timeList.value = res.rows | ||
| 148 | } | 217 | } |
| 149 | 218 | ||
| 150 | function initDays() { | 219 | function initDays() { |
| ... | @@ -162,33 +231,57 @@ function disabledDate(date) { | ... | @@ -162,33 +231,57 @@ function disabledDate(date) { |
| 162 | return true | 231 | return true |
| 163 | } | 232 | } |
| 164 | 233 | ||
| 165 | function submit() { | 234 | async function submit() { |
| 235 | await proxy.$refs['formRef'].validate() | ||
| 166 | if (!user) { | 236 | if (!user) { |
| 167 | useUserStore().setReLogin() | 237 | useUserStore().setReLogin() |
| 168 | return | 238 | return |
| 169 | } | 239 | } |
| 170 | if (money.value <= 0) { | 240 | if (money.value <= 0) { |
| 171 | ElMessage.error(language.value == 0 ? '请添加人数' : 'Please add the number of people') | 241 | await proxy.$modal.msgError(language.value == 0 ? '请添加人数' : 'Please add the number of people') |
| 172 | return | 242 | return |
| 173 | } | 243 | } |
| 174 | // 提交确认 | 244 | // 提交确认 |
| 175 | ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { | 245 | await proxy.$modal.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?') |
| 176 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 246 | await pushFrom() |
| 177 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | 247 | // await ElMessageBox.confirm(language.value == 0 ? '确认提交订单吗?' : 'Confirm to submit the order?', { |
| 178 | type: 'warning' | 248 | // confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 179 | }).then(() => { | 249 | // cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 180 | pushFrom() | 250 | // type: 'warning' |
| 181 | }) | 251 | // }).then(() => { |
| 252 | // pushFrom() | ||
| 253 | // }) | ||
| 182 | } | 254 | } |
| 183 | 255 | ||
| 184 | function pushFrom() { | 256 | function pushFrom() { |
| 185 | payLoading.value = true | 257 | payLoading.value = true |
| 186 | form.value.pickUpBo.revTime = date1.value + ' ' + revTime1.value | 258 | const checkTime = timeList.value.find(v => v.id == form.value.lvcId) |
| 187 | form.value.activeId = item.value.activityId | 259 | // const name = form.value.list.map(v => v.name)?.toString() |
| 188 | form.value.lavId = item.value.id | 260 | const obj = { |
| 189 | form.value.checkIn = item.value.checkIn | 261 | pickUpBo: { |
| 190 | form.value.checkOut = item.value.checkOut | 262 | revTime: form.value.date1 + ' ' + revTime1.value, |
| 191 | submitOrderCar(form.value).then(res => { | 263 | contacts: form.value.pickUpBo.contacts, |
| 264 | phone: form.value.pickUpBo.phone, | ||
| 265 | count: form.value.pickUpBo.count, | ||
| 266 | no: form.value.pickUpBo.no, | ||
| 267 | remarks: form.value.remarks, | ||
| 268 | lvcId: form.value.lvcId, | ||
| 269 | lvcTimes: checkTime.nameStart + '-' + checkTime.nameEnd, | ||
| 270 | customers: form.value.list | ||
| 271 | }, | ||
| 272 | activeId: item.value.activityId, | ||
| 273 | lavId: item.value.id, | ||
| 274 | checkIn: item.value.checkIn, | ||
| 275 | checkOut: item.value.checkOut | ||
| 276 | |||
| 277 | } | ||
| 278 | // form.value.pickUpBo.revTime = form.value.date1 + ' ' + revTime1.value | ||
| 279 | // form.value.activeId = item.value.activityId | ||
| 280 | // form.value.lavId = item.value.id | ||
| 281 | // form.value.checkIn = item.value.checkIn | ||
| 282 | // form.value.checkOut = item.value.checkOut | ||
| 283 | |||
| 284 | submitOrderCar(obj).then(res => { | ||
| 192 | payLoading.value = false | 285 | payLoading.value = false |
| 193 | if (res.data && res.data.total != -100) { | 286 | if (res.data && res.data.total != -100) { |
| 194 | router.push({ | 287 | router.push({ | ... | ... |
| ... | @@ -125,8 +125,8 @@ | ... | @@ -125,8 +125,8 @@ |
| 125 | <p> | 125 | <p> |
| 126 | {{ form?.extJson?.atName }} | | 126 | {{ form?.extJson?.atName }} | |
| 127 | {{ form?.extJson?.atsName }} | | 127 | {{ form?.extJson?.atsName }} | |
| 128 | <span v-if="form?.extJson?.sessionType == '1000'">{{ language==0?'日间场':'Day' }}</span> | 128 | <span v-if="form?.extJson?.sessionType == '1000'">{{ language == 0 ? '日间场' : 'Day' }}</span> |
| 129 | <span v-else>{{ language==0?'夜间场':'Night' }}</span> | 129 | <span v-else>{{ language == 0 ? '夜间场' : 'Night' }}</span> |
| 130 | {{ form?.extJson?.ticketName }} | | 130 | {{ form?.extJson?.ticketName }} | |
| 131 | {{ form?.num }}{{ language == 0 ? '张' : 'Tickets' }} | 131 | {{ form?.num }}{{ language == 0 ? '张' : 'Tickets' }} |
| 132 | </p> | 132 | </p> |
| ... | @@ -161,12 +161,13 @@ | ... | @@ -161,12 +161,13 @@ |
| 161 | language == 0 ? '联系方式' : 'Contact Information' | 161 | language == 0 ? '联系方式' : 'Contact Information' |
| 162 | }}:{{ form.phone }} | 162 | }}:{{ form.phone }} |
| 163 | </el-col> | 163 | </el-col> |
| 164 | <el-col :lg="8" :md="12" :sm="12" :xs="24"/> | 164 | <el-col :lg="8" :md="12" :sm="12" :xs="24" /> |
| 165 | </el-row> | 165 | </el-row> |
| 166 | <el-row v-if="type == 'car'"> | 166 | <el-row v-if="type == 'car'"> |
| 167 | <el-col :lg="12" :md="12" :sm="12" :xs="24"> | 167 | <el-col :lg="12" :md="12" :sm="12" :xs="24"> |
| 168 | <div class="st-info"> | 168 | <div class="st-info"> |
| 169 | <div>{{ language == 0 ? '用车时间' : 'Delivery Time' }}:{{ form.pickUpBo?.revTime }}</div> | 169 | <div>{{ language == 0 ? '用车日期' : 'Delivery Date' }}:{{ form.pickUpBo?.revTime }}</div> |
| 170 | <div>{{ language == 0 ? '用车时间' : 'Delivery Time' }}:{{ form.pickUpBo?.lvcTimes }}</div> | ||
| 170 | <!-- <div v-for="(car,index) in form.pickUpBo.carsList" :key="index" class="carLine">--> | 171 | <!-- <div v-for="(car,index) in form.pickUpBo.carsList" :key="index" class="carLine">--> |
| 171 | <!-- <div v-if="car.num > 0">--> | 172 | <!-- <div v-if="car.num > 0">--> |
| 172 | <!-- <label>{{ car.name }}</label>--> | 173 | <!-- <label>{{ car.name }}</label>--> |
| ... | @@ -178,15 +179,20 @@ | ... | @@ -178,15 +179,20 @@ |
| 178 | <!-- language == 0 ? '辆' : 'Cars'--> | 179 | <!-- language == 0 ? '辆' : 'Cars'--> |
| 179 | <!-- }} * {{ language == 0 ? '¥' : '€' }}{{ car.price }}</span>--> | 180 | <!-- }} * {{ language == 0 ? '¥' : '€' }}{{ car.price }}</span>--> |
| 180 | <!-- </div>--> | 181 | <!-- </div>--> |
| 181 | 182 | <div>{{ language == 0 ? '乘坐人' : 'Contacts' }}: | |
| 182 | <div>{{ language == 0 ? '人数' : 'People' }}: {{ form.pickUpBo.count }}</div> | 183 | <span v-for="v in form.pickUpBo.customers" :key="v" style="margin-right: 20px">{{ v.name }}</span> |
| 183 | <div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}: {{ form.pickUpBo.no }}</div> | ||
| 184 | <div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }}: | ||
| 185 | {{ form.pickUpBo.noAddress }} | ||
| 186 | </div> | 184 | </div> |
| 187 | <div>{{ language == 0 ? '送达地点' : 'Delivery Place' }}: {{ form.pickUpBo.deliveryAddress }}</div> | 185 | |
| 186 | <div>{{ language == 0 ? '人数' : 'People' }}:{{ form.pickUpBo.count }}</div> | ||
| 187 | |||
| 188 | <!-- <div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }}:--> | ||
| 189 | <!-- {{ form.pickUpBo.noAddress }}--> | ||
| 190 | <!-- </div>--> | ||
| 191 | <!-- <div>{{ language == 0 ? '送达地点' : 'Delivery Place' }}: {{ form.pickUpBo.deliveryAddress }}</div>--> | ||
| 192 | |||
| 188 | <div>{{ language == 0 ? '联系人' : 'Contact Person' }}:{{ form.pickUpBo.contacts }}</div> | 193 | <div>{{ language == 0 ? '联系人' : 'Contact Person' }}:{{ form.pickUpBo.contacts }}</div> |
| 189 | <div>{{ language == 0 ? '联系电话' : 'Contact Phone' }}:{{ form.pickUpBo.phone }}</div> | 194 | <div>{{ language == 0 ? '联系电话' : 'Contact Phone' }}:{{ form.pickUpBo.phone }}</div> |
| 195 | <div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}: {{ form.pickUpBo.no }}</div> | ||
| 190 | <div>{{ language == 0 ? '备注' : 'Remarks' }}:{{ form.pickUpBo.remarks || '-' }}</div> | 196 | <div>{{ language == 0 ? '备注' : 'Remarks' }}:{{ form.pickUpBo.remarks || '-' }}</div> |
| 191 | </div> | 197 | </div> |
| 192 | </el-col> | 198 | </el-col> |
| ... | @@ -266,7 +272,7 @@ | ... | @@ -266,7 +272,7 @@ |
| 266 | </el-row> | 272 | </el-row> |
| 267 | <el-row v-if="type == 'ticket'" style="width: 100%"> | 273 | <el-row v-if="type == 'ticket'" style="width: 100%"> |
| 268 | <el-col :lg="12"> | 274 | <el-col :lg="12"> |
| 269 | {{ language == 0 ? '联系人' : 'Contact' }}:{{form.contacts}} | 275 | {{ language == 0 ? '联系人' : 'Contact' }}:{{ form.contacts }} |
| 270 | </el-col> | 276 | </el-col> |
| 271 | <el-col :lg="12"> | 277 | <el-col :lg="12"> |
| 272 | {{ language == 0 ? '联系方式' : 'Contact' }}:{{ form.phone }} | 278 | {{ language == 0 ? '联系方式' : 'Contact' }}:{{ form.phone }} |
| ... | @@ -278,8 +284,8 @@ | ... | @@ -278,8 +284,8 @@ |
| 278 | <span class="text-gray">{{ v.idCard }}</span> | 284 | <span class="text-gray">{{ v.idCard }}</span> |
| 279 | </el-col> | 285 | </el-col> |
| 280 | <el-col :lg="12" :md="12" :sm="12" :xs="24" class="text-right"> | 286 | <el-col :lg="12" :md="12" :sm="12" :xs="24" class="text-right"> |
| 281 | <span class="text-primary" v-if="language == 0 ">¥ {{ form.price }}</span> | 287 | <span v-if="language == 0 " class="text-primary">¥ {{ form.price }}</span> |
| 282 | <span v-else>€ {{ form.priceEn || 0}}</span> | 288 | <span v-else>€ {{ form.priceEn || 0 }}</span> |
| 283 | </el-col> | 289 | </el-col> |
| 284 | </el-row> | 290 | </el-row> |
| 285 | <el-row style="width: 100%"> | 291 | <el-row style="width: 100%"> |
| ... | @@ -290,8 +296,7 @@ | ... | @@ -290,8 +296,7 @@ |
| 290 | }}{{ language == 0 ? '张' : 'Tickets' }} | 296 | }}{{ language == 0 ? '张' : 'Tickets' }} |
| 291 | </div> | 297 | </div> |
| 292 | </el-col> | 298 | </el-col> |
| 293 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 299 | <el-col :lg="8" :md="12" :sm="12" :xs="24" /> |
| 294 | </el-col> | ||
| 295 | <el-col :lg="8" :md="12" :sm="12" :xs="24" class="text-right text-warning"> | 300 | <el-col :lg="8" :md="12" :sm="12" :xs="24" class="text-right text-warning"> |
| 296 | {{ form.paymentType == '1' ? '共计' : 'total' }}:{{ | 301 | {{ form.paymentType == '1' ? '共计' : 'total' }}:{{ |
| 297 | form.paymentType == '1' ? '¥' : '€' | 302 | form.paymentType == '1' ? '¥' : '€' |
| ... | @@ -363,13 +368,13 @@ | ... | @@ -363,13 +368,13 @@ |
| 363 | </div> | 368 | </div> |
| 364 | </el-col> | 369 | </el-col> |
| 365 | <el-col :lg="24"> | 370 | <el-col :lg="24"> |
| 366 | <div class="text-center"/> | 371 | <div class="text-center" /> |
| 367 | </el-col> | 372 | </el-col> |
| 368 | </el-row> | 373 | </el-row> |
| 369 | </div> | 374 | </div> |
| 370 | </div> | 375 | </div> |
| 371 | <div v-else class="pd20 skeletonBox"> | 376 | <div v-else class="pd20 skeletonBox"> |
| 372 | <el-skeleton :rows="8"/> | 377 | <el-skeleton :rows="8" /> |
| 373 | <el-button | 378 | <el-button |
| 374 | :style="language == 0 ?'width:200px':'width:400px'" class="btn-lineG" round size="large" | 379 | :style="language == 0 ?'width:200px':'width:400px'" class="btn-lineG" round size="large" |
| 375 | type="primary" @click="showLogin" | 380 | type="primary" @click="showLogin" |
| ... | @@ -483,7 +488,7 @@ | ... | @@ -483,7 +488,7 @@ |
| 483 | <div v-if="form.payDate&&form.viewStatus=='1'"> | 488 | <div v-if="form.payDate&&form.viewStatus=='1'"> |
| 484 | <div class="text-center"> | 489 | <div class="text-center"> |
| 485 | <el-icon color="#32B16C" size="80"> | 490 | <el-icon color="#32B16C" size="80"> |
| 486 | <SuccessFilled/> | 491 | <SuccessFilled /> |
| 487 | </el-icon> | 492 | </el-icon> |
| 488 | <p class="text-success">{{ language == 0 ? '支付成功' : 'successful!' }}</p> | 493 | <p class="text-success">{{ language == 0 ? '支付成功' : 'successful!' }}</p> |
| 489 | <h3 class="wePrice">{{ language == 0 ? '¥' : '€' }}{{ totalFee || 0 }}</h3> | 494 | <h3 class="wePrice">{{ language == 0 ? '¥' : '€' }}{{ totalFee || 0 }}</h3> |
| ... | @@ -505,7 +510,7 @@ | ... | @@ -505,7 +510,7 @@ |
| 505 | </template> | 510 | </template> |
| 506 | </el-result> | 511 | </el-result> |
| 507 | </div> | 512 | </div> |
| 508 | <Dialog ref="DialogRef"/> | 513 | <Dialog ref="DialogRef" /> |
| 509 | 514 | ||
| 510 | <el-dialog | 515 | <el-dialog |
| 511 | v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" | 516 | v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" |
| ... | @@ -514,7 +519,7 @@ | ... | @@ -514,7 +519,7 @@ |
| 514 | <div class="flex"> | 519 | <div class="flex"> |
| 515 | <el-form-item :label="language==0?'开票人':'Name'"> | 520 | <el-form-item :label="language==0?'开票人':'Name'"> |
| 516 | <div class="flex"> | 521 | <div class="flex"> |
| 517 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"/> | 522 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'" /> |
| 518 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并下载' : 'Submit' }}</el-button> | 523 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并下载' : 'Submit' }}</el-button> |
| 519 | </div> | 524 | </div> |
| 520 | </el-form-item> | 525 | </el-form-item> |
| ... | @@ -530,22 +535,22 @@ | ... | @@ -530,22 +535,22 @@ |
| 530 | </template> | 535 | </template> |
| 531 | 536 | ||
| 532 | <script setup> | 537 | <script setup> |
| 533 | import {getCurrentInstance, ref} from 'vue' | 538 | import { getCurrentInstance, ref } from 'vue' |
| 534 | import {onMounted} from '@vue/runtime-core' | 539 | import { onMounted } from '@vue/runtime-core' |
| 535 | import {useRoute, useRouter} from 'vue-router' | 540 | import { useRoute, useRouter } from 'vue-router' |
| 536 | import * as booking from '@/apiPc/booking' | 541 | import * as booking from '@/apiPc/booking' |
| 537 | import Dialog from '@/viewsPc/booking/component/dailog.vue' | 542 | import Dialog from '@/viewsPc/booking/component/dailog.vue' |
| 538 | 543 | ||
| 539 | 544 | ||
| 540 | const {proxy} = getCurrentInstance() | 545 | const { proxy } = getCurrentInstance() |
| 541 | const route = useRoute() | 546 | const route = useRoute() |
| 542 | const router = useRouter() | 547 | const router = useRouter() |
| 543 | const payType = ref('2') | 548 | const payType = ref('2') |
| 544 | const orderId = ref(route.query.orderId) | 549 | const orderId = ref(route.query.orderId) |
| 545 | const matchId = ref() | 550 | const matchId = ref() |
| 546 | import useUserStore from '@/store/modules/user' | 551 | import useUserStore from '@/store/modules/user' |
| 547 | import {useStorage} from '@vueuse/core/index' | 552 | import { useStorage } from '@vueuse/core/index' |
| 548 | import {ElMessage, ElMessageBox} from 'element-plus' | 553 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 549 | import { | 554 | import { |
| 550 | cancelOrder, | 555 | cancelOrder, |
| 551 | cancelOrder2, | 556 | cancelOrder2, |
| ... | @@ -618,7 +623,7 @@ function getData() { | ... | @@ -618,7 +623,7 @@ function getData() { |
| 618 | form.value = { | 623 | form.value = { |
| 619 | pickUpBo: {} | 624 | pickUpBo: {} |
| 620 | } | 625 | } |
| 621 | return booking.getCarBilldetailbyId({orderId: orderId.value}).then(res => { | 626 | return booking.getCarBilldetailbyId({ orderId: orderId.value }).then(res => { |
| 622 | form.value = res.data | 627 | form.value = res.data |
| 623 | if (language.value == 0) { | 628 | if (language.value == 0) { |
| 624 | totalFee.value = res.data.total | 629 | totalFee.value = res.data.total |
| ... | @@ -631,7 +636,7 @@ function getData() { | ... | @@ -631,7 +636,7 @@ function getData() { |
| 631 | }) | 636 | }) |
| 632 | } | 637 | } |
| 633 | if (type.value == 'food') { | 638 | if (type.value == 'food') { |
| 634 | return booking.getFoodBilldetailbyId({orderId: orderId.value}).then(res => { | 639 | return booking.getFoodBilldetailbyId({ orderId: orderId.value }).then(res => { |
| 635 | if (language.value == 0) { | 640 | if (language.value == 0) { |
| 636 | totalFee.value = res.data.total | 641 | totalFee.value = res.data.total |
| 637 | } else { | 642 | } else { |
| ... | @@ -644,7 +649,7 @@ function getData() { | ... | @@ -644,7 +649,7 @@ function getData() { |
| 644 | }) | 649 | }) |
| 645 | } | 650 | } |
| 646 | if (type.value == 'hotel') { | 651 | if (type.value == 'hotel') { |
| 647 | return booking.getRoomBilldetailbyId({orderId: orderId.value}).then(res => { | 652 | return booking.getRoomBilldetailbyId({ orderId: orderId.value }).then(res => { |
| 648 | if (language.value == 0) { | 653 | if (language.value == 0) { |
| 649 | totalFee.value = res.data.total | 654 | totalFee.value = res.data.total |
| 650 | } else { | 655 | } else { |
| ... | @@ -677,7 +682,7 @@ function getData() { | ... | @@ -677,7 +682,7 @@ function getData() { |
| 677 | 682 | ||
| 678 | // 旅游订单详情 | 683 | // 旅游订单详情 |
| 679 | const getTravelOrderInfo = () => { | 684 | const getTravelOrderInfo = () => { |
| 680 | return booking.getScenicOrderInfo({orderId: orderId.value}).then(res => { | 685 | return booking.getScenicOrderInfo({ orderId: orderId.value }).then(res => { |
| 681 | form.value = res.data | 686 | form.value = res.data |
| 682 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 687 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 683 | matchId.value = form.value.activeId | 688 | matchId.value = form.value.activeId |
| ... | @@ -692,7 +697,7 @@ const getTravelOrderInfo = () => { | ... | @@ -692,7 +697,7 @@ const getTravelOrderInfo = () => { |
| 692 | 697 | ||
| 693 | // 票务订单详情 | 698 | // 票务订单详情 |
| 694 | async function getTicketOrderInfoFN() { | 699 | async function getTicketOrderInfoFN() { |
| 695 | const res = await getTicketOrderInfo({orderId: orderId.value}) | 700 | const res = await getTicketOrderInfo({ orderId: orderId.value }) |
| 696 | form.value = res.data | 701 | form.value = res.data |
| 697 | form.value.extJson = JSON.parse(form.value.extJson) | 702 | form.value.extJson = JSON.parse(form.value.extJson) |
| 698 | try { | 703 | try { |
| ... | @@ -708,7 +713,7 @@ async function getTicketOrderInfoFN() { | ... | @@ -708,7 +713,7 @@ async function getTicketOrderInfoFN() { |
| 708 | } | 713 | } |
| 709 | 714 | ||
| 710 | async function getDetail(activeId) { | 715 | async function getDetail(activeId) { |
| 711 | const res = await getTicketInfoByActivityId({activityId: activeId}) | 716 | const res = await getTicketInfoByActivityId({ activityId: activeId }) |
| 712 | matchForm.value = res.data | 717 | matchForm.value = res.data |
| 713 | console.log(matchForm.value) | 718 | console.log(matchForm.value) |
| 714 | } | 719 | } |
| ... | @@ -720,14 +725,14 @@ function goHome() { | ... | @@ -720,14 +725,14 @@ function goHome() { |
| 720 | 725 | ||
| 721 | function goPay() { | 726 | function goPay() { |
| 722 | if (payType.value == '2') { | 727 | if (payType.value == '2') { |
| 723 | booking.createWePay({orderId: orderId.value}).then(res => { | 728 | booking.createWePay({ orderId: orderId.value }).then(res => { |
| 724 | wePayCodeUrl.value = res.data | 729 | wePayCodeUrl.value = res.data |
| 725 | hideconfirmbtn.value = true | 730 | hideconfirmbtn.value = true |
| 726 | startforGetData() | 731 | startforGetData() |
| 727 | }) | 732 | }) |
| 728 | } | 733 | } |
| 729 | if (payType.value == '3') { | 734 | if (payType.value == '3') { |
| 730 | booking.createPalPay({orderId: orderId.value}).then(res => { | 735 | booking.createPalPay({ orderId: orderId.value }).then(res => { |
| 731 | if (res.data) { | 736 | if (res.data) { |
| 732 | location.href = res.data | 737 | location.href = res.data |
| 733 | } | 738 | } |
| ... | @@ -804,7 +809,7 @@ function showLogin() { | ... | @@ -804,7 +809,7 @@ function showLogin() { |
| 804 | 809 | ||
| 805 | 810 | ||
| 806 | function MakeUpOrder() { | 811 | function MakeUpOrder() { |
| 807 | return booking.getMealOrderInfo({orderId: orderId.value}).then(res => { | 812 | return booking.getMealOrderInfo({ orderId: orderId.value }).then(res => { |
| 808 | form.value = res.data | 813 | form.value = res.data |
| 809 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 814 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 810 | matchId.value = form.value.activeId | 815 | matchId.value = form.value.activeId |
| ... | @@ -817,7 +822,7 @@ function MakeUpOrder() { | ... | @@ -817,7 +822,7 @@ function MakeUpOrder() { |
| 817 | } | 822 | } |
| 818 | 823 | ||
| 819 | function MakeUpIno() { | 824 | function MakeUpIno() { |
| 820 | booking.getMealOrderInfoByLogex({asmId: form.value.asmId}).then(res => { | 825 | booking.getMealOrderInfoByLogex({ asmId: form.value.asmId }).then(res => { |
| 821 | formInfo.value = res.data | 826 | formInfo.value = res.data |
| 822 | console.log(res) | 827 | console.log(res) |
| 823 | }) | 828 | }) |
| ... | @@ -828,7 +833,7 @@ function MakeUpIno() { | ... | @@ -828,7 +833,7 @@ function MakeUpIno() { |
| 828 | } | 833 | } |
| 829 | 834 | ||
| 830 | function ScenicInfo() { | 835 | function ScenicInfo() { |
| 831 | booking.getLogexScenicVoById({id: form.value.asId}).then(res => { | 836 | booking.getLogexScenicVoById({ id: form.value.asId }).then(res => { |
| 832 | formInfo.value = res.data | 837 | formInfo.value = res.data |
| 833 | console.log(res) | 838 | console.log(res) |
| 834 | }).catch((e) => { | 839 | }).catch((e) => { |
| ... | @@ -839,7 +844,7 @@ function ScenicInfo() { | ... | @@ -839,7 +844,7 @@ function ScenicInfo() { |
| 839 | 844 | ||
| 840 | 845 | ||
| 841 | function photographyOrder() { | 846 | function photographyOrder() { |
| 842 | return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => { | 847 | return booking.getPhotoOrderInfo({ orderId: orderId.value }).then(res => { |
| 843 | form.value = res.data | 848 | form.value = res.data |
| 844 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 849 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 845 | photographyInfo() | 850 | photographyInfo() |
| ... | @@ -850,7 +855,7 @@ function photographyOrder() { | ... | @@ -850,7 +855,7 @@ function photographyOrder() { |
| 850 | } | 855 | } |
| 851 | 856 | ||
| 852 | function photographyInfo() { | 857 | function photographyInfo() { |
| 853 | booking.getPhotoOrderInfoByLogex({aspId: form.value.aspId}).then(res => { | 858 | booking.getPhotoOrderInfoByLogex({ aspId: form.value.aspId }).then(res => { |
| 854 | formInfo.value = res.data | 859 | formInfo.value = res.data |
| 855 | }) | 860 | }) |
| 856 | // .catch((e) => { | 861 | // .catch((e) => { | ... | ... |
-
Please register or sign in to post a comment