no message
Showing
6 changed files
with
292 additions
and
4 deletions
| ... | @@ -72,6 +72,14 @@ export function newsSubmitOrderHotel(data) { | ... | @@ -72,6 +72,14 @@ export function newsSubmitOrderHotel(data) { |
| 72 | }) | 72 | }) |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | export function submitOrderScenic(data) { | ||
| 76 | return request({ | ||
| 77 | url: `/ota/norder/submitOrderScenic`, | ||
| 78 | method: 'post', | ||
| 79 | data: data | ||
| 80 | }) | ||
| 81 | } | ||
| 82 | |||
| 75 | export function getRoomBilldetailbyId(params) { | 83 | export function getRoomBilldetailbyId(params) { |
| 76 | return request({ | 84 | return request({ |
| 77 | url: `/ota/orderRoom/getRoomOrderInfoByOrderId`, | 85 | url: `/ota/orderRoom/getRoomOrderInfoByOrderId`, |
| ... | @@ -533,6 +541,22 @@ export function aadCustomer(data) { | ... | @@ -533,6 +541,22 @@ export function aadCustomer(data) { |
| 533 | }) | 541 | }) |
| 534 | } | 542 | } |
| 535 | 543 | ||
| 544 | export function aadSceneCustomer(data) { | ||
| 545 | return request({ | ||
| 546 | url: `/ota/customer/insertSceneCustomer`, | ||
| 547 | method: 'post', | ||
| 548 | data | ||
| 549 | }) | ||
| 550 | } | ||
| 551 | |||
| 552 | export function checkSceneCustomer(data) { | ||
| 553 | return request({ | ||
| 554 | url: `/ota/orderTourist/checkDiscounts`, | ||
| 555 | method: 'post', | ||
| 556 | data | ||
| 557 | }) | ||
| 558 | } | ||
| 559 | |||
| 536 | // 删除观影人 | 560 | // 删除观影人 |
| 537 | export function delCustomer(id) { | 561 | export function delCustomer(id) { |
| 538 | return request({ | 562 | return request({ |
| ... | @@ -575,3 +599,12 @@ export function getGateListByLasId(params) { | ... | @@ -575,3 +599,12 @@ export function getGateListByLasId(params) { |
| 575 | params | 599 | params |
| 576 | }) | 600 | }) |
| 577 | } | 601 | } |
| 602 | |||
| 603 | export function getMyFriends() { | ||
| 604 | return request({ | ||
| 605 | url: `/ota/orderTourist/getMyFriends`, | ||
| 606 | method: 'get' | ||
| 607 | }) | ||
| 608 | } | ||
| 609 | |||
| 610 | ... | ... |
| 1 | <template> | ||
| 2 | <el-dialog v-model="show" title="出行人信息" center append-to-body> | ||
| 3 | <el-form> | ||
| 4 | <el-form-item prop="message"> | ||
| 5 | <div class="p_box"> | ||
| 6 | <div class="people"> | ||
| 7 | <el-radio-group v-model="personId"> | ||
| 8 | <div | ||
| 9 | v-for="(it, index) in personList" :key="index" class="prople_item" | ||
| 10 | > | ||
| 11 | <el-radio :value="it.id" :disabled="hasPersonIds?.indexOf(it.id)!=-1"> | ||
| 12 | <div> | ||
| 13 | {{ it.name }} {{ it.idCard }} | ||
| 14 | </div> | ||
| 15 | </el-radio> | ||
| 16 | </div> | ||
| 17 | </el-radio-group> | ||
| 18 | </div> | ||
| 19 | <el-button @click="addPeopl">{{ languageFormat(language, "新增", "Add") }}</el-button> | ||
| 20 | </div> | ||
| 21 | </el-form-item> | ||
| 22 | </el-form> | ||
| 23 | <template #footer> | ||
| 24 | <div class="dialog-footer"> | ||
| 25 | <el-button @click="show = false">取 消</el-button> | ||
| 26 | <el-button type="primary" @click="addPerson">完成</el-button> | ||
| 27 | </div> | ||
| 28 | </template> | ||
| 29 | </el-dialog> | ||
| 30 | |||
| 31 | |||
| 32 | <el-dialog v-model="showAdd" title="新增出现人" center append-to-body> | ||
| 33 | <el-form | ||
| 34 | ref="formRef" :model="form" label-width="100px" size="large" | ||
| 35 | style="margin: 80px" | ||
| 36 | > | ||
| 37 | <el-form-item :label="language==0?'姓名':'name'" prop="name" required :show-message="false"> | ||
| 38 | <el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'" /> | ||
| 39 | </el-form-item> | ||
| 40 | <el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required :show-message="false"> | ||
| 41 | <el-select v-model="form.idcType" :placeholder="language==0?'请选择':'Please choose'"> | ||
| 42 | <el-option :label="language==0?'身份证':'Identity card'" value="0" /> | ||
| 43 | <el-option :label="language==0?'护照':'Passport'" value="1" /> | ||
| 44 | <el-option :label="language==0?'其他':'Other'" value="2" /> | ||
| 45 | </el-select> | ||
| 46 | </el-form-item> | ||
| 47 | <el-form-item :label="language==0?'证件号':'ID number'" prop="idCard" required :show-message="false"> | ||
| 48 | <el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'" /> | ||
| 49 | </el-form-item> | ||
| 50 | </el-form> | ||
| 51 | |||
| 52 | <template #footer> | ||
| 53 | <div class="dialog-footer"> | ||
| 54 | <el-button class="can_pay" @click="showAdd = false">{{ language == 0 ? '取 消' : 'cancel' }}</el-button> | ||
| 55 | <el-button class="pay" type="primary" @click="submit">{{ language == 0 ? '确 定' : 'confirm' }}</el-button> | ||
| 56 | </div> | ||
| 57 | </template> | ||
| 58 | </el-dialog> | ||
| 59 | |||
| 60 | </template> | ||
| 61 | |||
| 62 | <script setup> | ||
| 63 | import { aadSceneCustomer, checkSceneCustomer, getMyFriends } from '/@/apiPc/booking' | ||
| 64 | import { languageFormat } from '/@/viewsPc/seat/utils/language' | ||
| 65 | import { onMounted, ref } from 'vue' | ||
| 66 | import { useStorage } from '@vueuse/core/index' | ||
| 67 | import _ from 'lodash' | ||
| 68 | import { getCurrentInstance } from '@vue/runtime-core' | ||
| 69 | |||
| 70 | const emit = defineEmits(['addPerson']) | ||
| 71 | const { proxy } = getCurrentInstance() | ||
| 72 | |||
| 73 | const show = ref(false) | ||
| 74 | const showAdd = ref(false) | ||
| 75 | const personList = ref([]) | ||
| 76 | const personId = ref(null) | ||
| 77 | const hasPersonIds = ref(null) | ||
| 78 | const language = useStorage('language', 0) | ||
| 79 | const form = ref({}) | ||
| 80 | const formRef = ref(null) | ||
| 81 | |||
| 82 | |||
| 83 | onMounted(() => { | ||
| 84 | getData() | ||
| 85 | }) | ||
| 86 | |||
| 87 | const getData = () => { | ||
| 88 | getMyFriends().then((res) => { | ||
| 89 | personList.value = res.data | ||
| 90 | }) | ||
| 91 | } | ||
| 92 | |||
| 93 | const addPeopl = () => { | ||
| 94 | formRef.value?.resetFields() | ||
| 95 | showAdd.value = true | ||
| 96 | } | ||
| 97 | |||
| 98 | const addPerson = () => { | ||
| 99 | const person = _.find(personList.value, (it) => it.id == personId.value) | ||
| 100 | |||
| 101 | checkSceneCustomer({ | ||
| 102 | customerId: person.id, | ||
| 103 | gateType: currParams.gateType | ||
| 104 | }).then((res) => { | ||
| 105 | if (res.data == 201) { | ||
| 106 | proxy.$modal.msgError('护照只能购买成人票') | ||
| 107 | } else if (res.data == 202) { | ||
| 108 | proxy.$modal.msgError('此身份证不能购买老人票') | ||
| 109 | } else if (res.data == 203) { | ||
| 110 | proxy.$modal.msgError('此身份证不能购买儿童票') | ||
| 111 | } else { | ||
| 112 | show.value = false | ||
| 113 | emit('addPerson', Object.assign(currParams, { | ||
| 114 | customerId: person.id, | ||
| 115 | name: person.name, | ||
| 116 | idcType: person.idcType, | ||
| 117 | idCard: person.idCard | ||
| 118 | })) | ||
| 119 | } | ||
| 120 | }) | ||
| 121 | } | ||
| 122 | |||
| 123 | const submit = () => { | ||
| 124 | formRef.value.validate((valid) => { | ||
| 125 | if (valid) { | ||
| 126 | aadSceneCustomer(form.value).then(res => { | ||
| 127 | if (res.data == -100) { | ||
| 128 | proxy.$modal.msgError('人员信息已存在') | ||
| 129 | } else if (res.data == -101) { | ||
| 130 | proxy.$modal.msgError('实名认证未通过') | ||
| 131 | } else { | ||
| 132 | proxy.$modal.msgSuccess(language.value == 0 ? '添加成功' : 'successfully added') | ||
| 133 | showAdd.value = false | ||
| 134 | getData() | ||
| 135 | } | ||
| 136 | }) | ||
| 137 | } else { | ||
| 138 | proxy.$modal.msgWarning(language.value == 0 ? '请完善信息' : 'Please complete the information') | ||
| 139 | } | ||
| 140 | }) | ||
| 141 | } | ||
| 142 | |||
| 143 | let currParams | ||
| 144 | defineExpose({ | ||
| 145 | open: (params) => { | ||
| 146 | currParams = params | ||
| 147 | personId.value = params.customerId | ||
| 148 | hasPersonIds.value = params.hasCustomerIds | ||
| 149 | |||
| 150 | show.value = true | ||
| 151 | } | ||
| 152 | }) | ||
| 153 | |||
| 154 | </script> | ||
| 155 | |||
| 156 | <style scoped lang="scss"> | ||
| 157 | |||
| 158 | </style> |
| ... | @@ -163,6 +163,55 @@ | ... | @@ -163,6 +163,55 @@ |
| 163 | </el-row> | 163 | </el-row> |
| 164 | </div> | 164 | </div> |
| 165 | </div> | 165 | </div> |
| 166 | <div v-if="type == 'travel'"> | ||
| 167 | <div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div> | ||
| 168 | <div class="border-info mt20"> | ||
| 169 | <h3>{{ matchForm.name }}</h3> | ||
| 170 | <el-row> | ||
| 171 | <el-col> | ||
| 172 | {{ language == 0 ? '地址' : 'Address' }}: | ||
| 173 | {{ matchForm.address }} | ||
| 174 | </el-col> | ||
| 175 | <el-col> | ||
| 176 | {{ | ||
| 177 | form?.extJson?.ticketType?.name | ||
| 178 | }}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 179 | </el-col> | ||
| 180 | <el-col> | ||
| 181 | {{ | ||
| 182 | language == 0 ? '时间' : 'Time' | ||
| 183 | }}:{{ | ||
| 184 | dayjs(form?.extJson?.ticketDate?.ticketStart).format('YYYY-MM-DD') | ||
| 185 | }}{{ | ||
| 186 | form.extJson?.ticketDate?.ticketType == 1 ? '~' + dayjs(form?.extJson?.ticketDate?.ticketEnd).format('YYYY-MM-DD') : '' | ||
| 187 | }} | ||
| 188 | </el-col> | ||
| 189 | <el-col v-if="form?.extJson?.ticketDate?.isCountSale==1"> | ||
| 190 | {{ | ||
| 191 | language == 0 ? `满${form?.extJson?.ticketDate.counts}人优惠` : `Discount for up to ${form?.extJson?.ticketDate.counts} people` | ||
| 192 | }}<span v-if="language == 0">{{ form?.extJson?.ticketDate.discount }}折</span> | ||
| 193 | <span v-else>{{ (10 - form?.extJson?.ticketDate.discount) * 10 + '%' }}off</span> | ||
| 194 | </el-col> | ||
| 195 | <!-- <el-col>--> | ||
| 196 | <!-- {{--> | ||
| 197 | <!-- language == 0 ? '原价票' : 'Cost Ticket'--> | ||
| 198 | <!-- }}:{{--> | ||
| 199 | <!-- language == 0 ? form?.extJson?.ticketDate?.price : form?.extJson?.ticketDate?.priceEn--> | ||
| 200 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 201 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 202 | <!-- </el-col>--> | ||
| 203 | <!-- <el-col>--> | ||
| 204 | <!-- {{--> | ||
| 205 | <!-- language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 206 | <!-- }}:{{--> | ||
| 207 | <!-- language == 0 ? form?.extJson?.ticketDate?.rebatePrice : form?.extJson?.ticketDate?.rebatePriceEn--> | ||
| 208 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 209 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 210 | <!-- </el-col>--> | ||
| 211 | |||
| 212 | </el-row> | ||
| 213 | </div> | ||
| 214 | </div> | ||
| 166 | 215 | ||
| 167 | <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> | 216 | <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> |
| 168 | 217 | ||
| ... | @@ -328,7 +377,56 @@ | ... | @@ -328,7 +377,56 @@ |
| 328 | </el-row> | 377 | </el-row> |
| 329 | 378 | ||
| 330 | </el-row> | 379 | </el-row> |
| 380 | <el-row v-if="type == 'travel'" style="width: 100%"> | ||
| 381 | <el-row v-for="v in form.extJson?.message" style="width: 100%"> | ||
| 382 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 383 | <div>{{ v.name }} | ||
| 384 | </div> | ||
| 385 | </el-col> | ||
| 386 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 387 | <!-- <div>{{--> | ||
| 388 | <!-- !v.discount ? language == 0 ? '原价票' : 'Cost Ticket' : language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 389 | <!-- }}--> | ||
| 390 | <!-- </div>--> | ||
| 391 | <div>{{ v.idCard }} | ||
| 392 | </div> | ||
| 393 | </el-col> | ||
| 394 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 395 | <div v-if="language == 0 "> | ||
| 396 | {{ language == 0 ? '¥' : '€' }} | ||
| 397 | {{ | ||
| 398 | !v.discount ? form.extJson?.ticketDate?.price : form.extJson?.ticketDate?.rebatePrice | ||
| 399 | }} | ||
| 400 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 401 | </div> | ||
| 402 | <div v-else> | ||
| 403 | {{ language == 0 ? '¥' : '€' }} | ||
| 404 | {{ | ||
| 405 | !v.discount ? form.extJson?.ticketDate?.priceEn : form.extJson?.ticketDate?.rebatePriceEn | ||
| 406 | }} | ||
| 407 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 408 | </div> | ||
| 409 | </el-col> | ||
| 410 | </el-row> | ||
| 411 | <el-row style="width: 100%"> | ||
| 412 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 413 | <div>{{ | ||
| 414 | language == 0 ? '购票数量' : 'Number of tickets purchased' | ||
| 415 | }}:{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 416 | </div> | ||
| 417 | </el-col> | ||
| 418 | <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ | ||
| 419 | language == 0 ? '联系方式' : 'Contact Information' | ||
| 420 | }}:{{ form.phone }} | ||
| 421 | </el-col> | ||
| 422 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | ||
| 423 | {{ language == 0 ? '共计' : 'total' }}:{{ | ||
| 424 | language == 0 ? '¥' : '€' | ||
| 425 | }}{{ Number(totalFee).toFixed(2) }} | ||
| 426 | </el-col> | ||
| 427 | </el-row> | ||
| 331 | 428 | ||
| 429 | </el-row> | ||
| 332 | </div> | 430 | </div> |
| 333 | 431 | ||
| 334 | <el-row align="middle" justify="space-between"> | 432 | <el-row align="middle" justify="space-between"> | ... | ... |
| ... | @@ -173,7 +173,6 @@ const formTime = ref({}) | ... | @@ -173,7 +173,6 @@ const formTime = ref({}) |
| 173 | let baseHotTime | 173 | let baseHotTime |
| 174 | 174 | ||
| 175 | onMounted(() => { | 175 | onMounted(() => { |
| 176 | console.log(route.params) | ||
| 177 | getBaseInfoByActiveId(route.params.cptId).then(res => { | 176 | getBaseInfoByActiveId(route.params.cptId).then(res => { |
| 178 | formTime.value = res.data || null | 177 | formTime.value = res.data || null |
| 179 | }).catch(err => { | 178 | }).catch(err => { |
| ... | @@ -323,7 +322,7 @@ function goNext() { | ... | @@ -323,7 +322,7 @@ function goNext() { |
| 323 | start: dayjs(currentDate.value).format('YYYY-MM-DD') | 322 | start: dayjs(currentDate.value).format('YYYY-MM-DD') |
| 324 | }, | 323 | }, |
| 325 | query: { | 324 | query: { |
| 326 | lasId: query.value.id | 325 | lasId: query.value.lasId |
| 327 | } | 326 | } |
| 328 | }) | 327 | }) |
| 329 | } | 328 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -81,8 +81,8 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -81,8 +81,8 @@ export default defineConfig(({ mode, command }) => { |
| 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 81 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 82 | }, | 82 | }, |
| 83 | '/dev-api': { | 83 | '/dev-api': { |
| 84 | // target: 'http://192.168.1.118:8081/', | 84 | target: 'http://192.168.1.118:8081/', |
| 85 | target: 'http://192.168.1.253:8081', | 85 | // target: 'http://192.168.1.253:8081', |
| 86 | // target: 'https://jijin.wtwuxicenter.com/stage-api', | 86 | // target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 87 | // target: 'https://wdsfwuxicenter.com/stage-api/', | 87 | // target: 'https://wdsfwuxicenter.com/stage-api/', |
| 88 | changeOrigin: true, | 88 | changeOrigin: true, | ... | ... |
-
Please register or sign in to post a comment