no message
Showing
6 changed files
with
183 additions
and
253 deletions
| ... | @@ -362,6 +362,14 @@ export function getMealOrderInfo(data) { | ... | @@ -362,6 +362,14 @@ export function getMealOrderInfo(data) { |
| 362 | }) | 362 | }) |
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | export function getScenicOrderInfo(data) { | ||
| 366 | return request({ | ||
| 367 | url: `/ota/orderScenic/getScenicOrderInfo`, | ||
| 368 | method: 'get', | ||
| 369 | params: data | ||
| 370 | }) | ||
| 371 | } | ||
| 372 | |||
| 365 | 373 | ||
| 366 | export function getMealOrderInfoByLogex(data) { | 374 | export function getMealOrderInfoByLogex(data) { |
| 367 | return request({ | 375 | return request({ |
| ... | @@ -371,6 +379,14 @@ export function getMealOrderInfoByLogex(data) { | ... | @@ -371,6 +379,14 @@ export function getMealOrderInfoByLogex(data) { |
| 371 | }) | 379 | }) |
| 372 | } | 380 | } |
| 373 | 381 | ||
| 382 | export function getLogexScenicVoById(data) { | ||
| 383 | return request({ | ||
| 384 | url: `/ota/activityScenic/getLogexScenicVoById`, | ||
| 385 | method: 'get', | ||
| 386 | params: data | ||
| 387 | }) | ||
| 388 | } | ||
| 389 | |||
| 374 | export function getShootList(data) { | 390 | export function getShootList(data) { |
| 375 | return request({ | 391 | return request({ |
| 376 | url: `/ota/activityShoot/getShootList`, | 392 | url: `/ota/activityShoot/getShootList`, | ... | ... |
| ... | @@ -166,49 +166,16 @@ | ... | @@ -166,49 +166,16 @@ |
| 166 | <div v-if="type == 'travel'"> | 166 | <div v-if="type == 'travel'"> |
| 167 | <div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div> | 167 | <div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div> |
| 168 | <div class="border-info mt20"> | 168 | <div class="border-info mt20"> |
| 169 | <h3>{{ matchForm.name }}</h3> | 169 | <h3>{{ formInfo.name }}</h3> |
| 170 | <el-row> | 170 | <el-row> |
| 171 | <el-col> | 171 | <el-col> |
| 172 | {{ language == 0 ? '地址' : 'Address' }}: | 172 | {{ language == 0 ? '地址' : 'Address' }}: |
| 173 | {{ matchForm.address }} | 173 | {{ formInfo.address }} |
| 174 | </el-col> | 174 | </el-col> |
| 175 | <el-col> | 175 | <el-col> |
| 176 | {{ | 176 | {{ language == 0 ? '开园时间' : 'Address' }}: |
| 177 | form?.extJson?.ticketType?.name | 177 | {{ formInfo. startTime }} ~ {{ formInfo.workTime }} |
| 178 | }}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 179 | </el-col> | 178 | </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> | 179 | </el-row> |
| 213 | </div> | 180 | </div> |
| 214 | </div> | 181 | </div> |
| ... | @@ -378,33 +345,17 @@ | ... | @@ -378,33 +345,17 @@ |
| 378 | 345 | ||
| 379 | </el-row> | 346 | </el-row> |
| 380 | <el-row v-if="type == 'travel'" style="width: 100%"> | 347 | <el-row v-if="type == 'travel'" style="width: 100%"> |
| 381 | <el-row v-for="v in form.extJson?.message" style="width: 100%"> | 348 | <el-row v-for="(v,i) in form.personArr" :key="i" style="width: 100%"> |
| 382 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 349 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 383 | <div>{{ v.name }} | 350 | <div>{{ v.name }} |
| 384 | </div> | 351 | </div> |
| 385 | </el-col> | 352 | </el-col> |
| 386 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 353 | <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 }} | 354 | <div>{{ v.idCard }} |
| 392 | </div> | 355 | </div> |
| 393 | </el-col> | 356 | </el-col> |
| 394 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 357 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 395 | <div v-if="language == 0 "> | 358 | <div>{{ v.gateName }} |
| 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> | 359 | </div> |
| 409 | </el-col> | 360 | </el-col> |
| 410 | </el-row> | 361 | </el-row> |
| ... | @@ -412,7 +363,7 @@ | ... | @@ -412,7 +363,7 @@ |
| 412 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 363 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 413 | <div>{{ | 364 | <div>{{ |
| 414 | language == 0 ? '购票数量' : 'Number of tickets purchased' | 365 | language == 0 ? '购票数量' : 'Number of tickets purchased' |
| 415 | }}:{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }} | 366 | }}:{{ form.personArr?.length }}{{ language == 0 ? '张' : 'Tickets' }} |
| 416 | </div> | 367 | </div> |
| 417 | </el-col> | 368 | </el-col> |
| 418 | <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ | 369 | <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ |
| ... | @@ -647,38 +598,30 @@ | ... | @@ -647,38 +598,30 @@ |
| 647 | </template> | 598 | </template> |
| 648 | 599 | ||
| 649 | <script setup> | 600 | <script setup> |
| 650 | import { Search } from '@element-plus/icons-vue' | ||
| 651 | import { getCurrentInstance, ref } from 'vue' | 601 | import { getCurrentInstance, ref } from 'vue' |
| 652 | import { onMounted } from '@vue/runtime-core' | 602 | import { onMounted } from '@vue/runtime-core' |
| 653 | import { useRoute, useRouter } from 'vue-router' | 603 | import { useRoute, useRouter } from 'vue-router' |
| 654 | import * as booking from '@/apiPc/booking' | 604 | import * as booking from '@/apiPc/booking' |
| 655 | import Dialog from '@/viewsPc/booking/component/dailog.vue' | 605 | import Dialog from '@/viewsPc/booking/component/dailog.vue' |
| 656 | import MatchInfoRow from '@/viewsPc/match/components/matchInfo-row' | ||
| 657 | 606 | ||
| 658 | 607 | ||
| 659 | const { proxy } = getCurrentInstance() | 608 | const { proxy } = getCurrentInstance() |
| 660 | const route = useRoute() | 609 | const route = useRoute() |
| 661 | const router = useRouter() | 610 | const router = useRouter() |
| 662 | const matchInfo = ref({}) | ||
| 663 | const approved = ref(true) | ||
| 664 | const tableData = ref([]) | ||
| 665 | const payType = ref('2') | 611 | const payType = ref('2') |
| 666 | const orderId = ref(route.query.orderId) | 612 | const orderId = ref(route.query.orderId) |
| 667 | const matchId = ref() | 613 | const matchId = ref() |
| 668 | const groupId = ref() | ||
| 669 | import useUserStore from '@/store/modules/user' | 614 | import useUserStore from '@/store/modules/user' |
| 670 | import FileUpload from '@/components/FileUpload' | ||
| 671 | import { useStorage } from '@vueuse/core/index' | 615 | import { useStorage } from '@vueuse/core/index' |
| 672 | import { ElMessage, ElMessageBox } from 'element-plus' | 616 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 673 | import { | 617 | import { |
| 674 | cancelOrder, | 618 | cancelOrder, |
| 675 | cancelOrder2, getBaseInfoByActiveId, | 619 | cancelOrder2, |
| 676 | getCarBilldetailbyId, | 620 | getBaseInfoByActiveId, |
| 677 | getFoodBilldetailbyId, | 621 | getTicketInfoByActivityId, |
| 678 | getMealOrderInfoByLogex, getPhotoOrderInfo, getPhotoOrderInfoByLogex, getTicketInfoByActivityId, getTicketOrderInfo | 622 | getTicketOrderInfo |
| 679 | } from '@/apiPc/booking' | 623 | } from '@/apiPc/booking' |
| 680 | import dayjs from 'dayjs' | 624 | import dayjs from 'dayjs' |
| 681 | import { delPerson } from '@/api/exam/person' | ||
| 682 | 625 | ||
| 683 | const isLogin = ref(false) | 626 | const isLogin = ref(false) |
| 684 | const language = useStorage('language', 0) | 627 | const language = useStorage('language', 0) |
| ... | @@ -695,7 +638,6 @@ const loading = ref(false) | ... | @@ -695,7 +638,6 @@ const loading = ref(false) |
| 695 | const lpName = ref('') | 638 | const lpName = ref('') |
| 696 | const matchForm = ref({}) | 639 | const matchForm = ref({}) |
| 697 | 640 | ||
| 698 | const user = useUserStore().user | ||
| 699 | if (useUserStore().user) { | 641 | if (useUserStore().user) { |
| 700 | isLogin.value = true | 642 | isLogin.value = true |
| 701 | } | 643 | } |
| ... | @@ -728,6 +670,9 @@ onMounted(() => { | ... | @@ -728,6 +670,9 @@ onMounted(() => { |
| 728 | case '5': | 670 | case '5': |
| 729 | type.value = 'ticket' | 671 | type.value = 'ticket' |
| 730 | break | 672 | break |
| 673 | case '6': | ||
| 674 | type.value = 'travel' | ||
| 675 | break | ||
| 731 | } | 676 | } |
| 732 | } | 677 | } |
| 733 | if (route.query.matchId) { | 678 | if (route.query.matchId) { |
| ... | @@ -796,11 +741,20 @@ function getData() { | ... | @@ -796,11 +741,20 @@ function getData() { |
| 796 | if (type.value == 'travel') { | 741 | if (type.value == 'travel') { |
| 797 | getTravelOrderInfo() | 742 | getTravelOrderInfo() |
| 798 | } | 743 | } |
| 799 | console.log(payType.value) | ||
| 800 | } | 744 | } |
| 801 | //旅游订单详情 | 745 | // 旅游订单详情 |
| 802 | const getTravelOrderInfo = () => { | 746 | const getTravelOrderInfo = () => { |
| 803 | 747 | return booking.getScenicOrderInfo({ orderId: orderId.value }).then(res => { | |
| 748 | form.value = res.data | ||
| 749 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | ||
| 750 | matchId.value = form.value.activeId | ||
| 751 | form.value.personArr = JSON.parse(form.value.message) | ||
| 752 | ScenicInfo() | ||
| 753 | console.log(res) | ||
| 754 | }).catch(err => { | ||
| 755 | console.log(err) | ||
| 756 | errorBox.value = true | ||
| 757 | }) | ||
| 804 | } | 758 | } |
| 805 | // 票务订单详情 | 759 | // 票务订单详情 |
| 806 | async function getTicketOrderInfoFN() { | 760 | async function getTicketOrderInfoFN() { |
| ... | @@ -932,6 +886,16 @@ function MakeUpIno() { | ... | @@ -932,6 +886,16 @@ function MakeUpIno() { |
| 932 | }) | 886 | }) |
| 933 | } | 887 | } |
| 934 | 888 | ||
| 889 | function ScenicInfo() { | ||
| 890 | booking.getLogexScenicVoById({ id: form.value.asId }).then(res => { | ||
| 891 | formInfo.value = res.data | ||
| 892 | console.log(res) | ||
| 893 | }).catch((e) => { | ||
| 894 | console.log(e) | ||
| 895 | errorBox.value = true | ||
| 896 | }) | ||
| 897 | } | ||
| 898 | |||
| 935 | 899 | ||
| 936 | function photographyOrder() { | 900 | function photographyOrder() { |
| 937 | return booking.getPhotoOrderInfo({ orderId: orderId.value }).then(res => { | 901 | return booking.getPhotoOrderInfo({ orderId: orderId.value }).then(res => { | ... | ... |
| ... | @@ -59,11 +59,11 @@ | ... | @@ -59,11 +59,11 @@ |
| 59 | </template> | 59 | </template> |
| 60 | 60 | ||
| 61 | <script setup> | 61 | <script setup> |
| 62 | import { onMounted } from '@vue/runtime-core' | ||
| 63 | import * as booking from '@/apiPc/booking' | 62 | import * as booking from '@/apiPc/booking' |
| 64 | import { useRouter, useRoute } from 'vue-router' | 63 | import { useRouter, useRoute } from 'vue-router' |
| 65 | import { useStorage } from '@vueuse/core/index' | 64 | import { useStorage } from '@vueuse/core/index' |
| 66 | import useUserStore from '@/store/modules/user' | 65 | import useUserStore from '@/store/modules/user' |
| 66 | import { ref, onMounted } from 'vue' | ||
| 67 | 67 | ||
| 68 | const router = useRouter() | 68 | const router = useRouter() |
| 69 | const route = useRoute() | 69 | const route = useRoute() |
| ... | @@ -73,7 +73,6 @@ const language = useStorage('language', 0) | ... | @@ -73,7 +73,6 @@ const language = useStorage('language', 0) |
| 73 | const query = ref({ | 73 | const query = ref({ |
| 74 | name: '' | 74 | name: '' |
| 75 | }) | 75 | }) |
| 76 | const cptId = ref('') | ||
| 77 | const list = ref([]) | 76 | const list = ref([]) |
| 78 | const loading = ref(false) | 77 | const loading = ref(false) |
| 79 | onMounted(() => { | 78 | onMounted(() => { | ... | ... |
| ... | @@ -139,23 +139,18 @@ | ... | @@ -139,23 +139,18 @@ |
| 139 | 139 | ||
| 140 | <script setup> | 140 | <script setup> |
| 141 | import { useRouter } from 'vue-router' | 141 | import { useRouter } from 'vue-router' |
| 142 | import { ref, reactive, onMounted, getCurrentInstance, computed } from 'vue' | 142 | import { ref, onMounted, computed } from 'vue' |
| 143 | import { useRoute } from 'vue-router' | 143 | import { useRoute } from 'vue-router' |
| 144 | import { dayjs } from 'element-plus' | 144 | import { dayjs } from 'element-plus' |
| 145 | import { getHotelById, getHotelRooms, checkRoomPayByUserId, getScenicById, checkOrderPay } from '@/apiPc/booking' | 145 | import { getScenicById, checkOrderPay } from '@/apiPc/booking' |
| 146 | import { getBaseInfoByActiveId } from '@/apiPc/booking' | 146 | import { getBaseInfoByActiveId } from '@/apiPc/booking' |
| 147 | 147 | ||
| 148 | const { proxy } = getCurrentInstance() | ||
| 149 | |||
| 150 | import { useStorage } from '@vueuse/core/index' | 148 | import { useStorage } from '@vueuse/core/index' |
| 151 | import useUserStore from '@/store/modules/user' | ||
| 152 | import { ElMessageBox } from 'element-plus' | 149 | import { ElMessageBox } from 'element-plus' |
| 153 | const currentDate = ref(new Date()) | 150 | const currentDate = ref(new Date()) |
| 154 | const currentDate1 = ref(new Date()) | 151 | const currentDate1 = ref(new Date()) |
| 155 | const calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())]) | 152 | const calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())]) |
| 156 | 153 | ||
| 157 | const user = useUserStore().user | ||
| 158 | const useStore = useUserStore | ||
| 159 | const language = useStorage('language', 0) | 154 | const language = useStorage('language', 0) |
| 160 | const router = useRouter() | 155 | const router = useRouter() |
| 161 | const route = useRoute() | 156 | const route = useRoute() |
| ... | @@ -166,12 +161,8 @@ const query = ref({ | ... | @@ -166,12 +161,8 @@ const query = ref({ |
| 166 | const hotTime = ref([]) | 161 | const hotTime = ref([]) |
| 167 | const showAll = ref(false) | 162 | const showAll = ref(false) |
| 168 | const loading = ref(false) | 163 | const loading = ref(false) |
| 169 | const roomList = ref([]) | ||
| 170 | const map = ref(null) | ||
| 171 | const formTime = ref({}) | 164 | const formTime = ref({}) |
| 172 | 165 | ||
| 173 | let baseHotTime | ||
| 174 | |||
| 175 | onMounted(() => { | 166 | onMounted(() => { |
| 176 | getBaseInfoByActiveId(route.params.cptId).then(res => { | 167 | getBaseInfoByActiveId(route.params.cptId).then(res => { |
| 177 | formTime.value = res.data || null | 168 | formTime.value = res.data || null |
| ... | @@ -180,29 +171,10 @@ onMounted(() => { | ... | @@ -180,29 +171,10 @@ onMounted(() => { |
| 180 | formTime.value = null | 171 | formTime.value = null |
| 181 | }).finally(() => { | 172 | }).finally(() => { |
| 182 | console.log(formTime.value) | 173 | console.log(formTime.value) |
| 183 | getDateTime() | ||
| 184 | |||
| 185 | getData() | 174 | getData() |
| 186 | }) | 175 | }) |
| 187 | }) | 176 | }) |
| 188 | 177 | ||
| 189 | function initTime() { | ||
| 190 | if (!hotTime.value[0]) { | ||
| 191 | hotTime.value = baseHotTime | ||
| 192 | getRoomList() | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | function getDateTime() { | ||
| 197 | if (formTime.value) { | ||
| 198 | if (dayjs().isBefore(dayjs(formTime.value.scenicStart))) { | ||
| 199 | baseHotTime = [dayjs(formTime.value.scenicStart).format('YYYY-MM-DD'), dayjs(formTime.value.scenicStart).add(1, 'day').format('YYYY-MM-DD')] | ||
| 200 | } else { | ||
| 201 | baseHotTime = [dayjs().format('YYYY-MM-DD'), dayjs().add(1, 'day').format('YYYY-MM-DD')] | ||
| 202 | } | ||
| 203 | } | ||
| 204 | } | ||
| 205 | |||
| 206 | function getData() { | 178 | function getData() { |
| 207 | loading.value = true | 179 | loading.value = true |
| 208 | getScenicById(route.params.scenicId).then(res => { | 180 | getScenicById(route.params.scenicId).then(res => { |
| ... | @@ -237,60 +209,7 @@ const btnDisable = computed(() => { | ... | @@ -237,60 +209,7 @@ const btnDisable = computed(() => { |
| 237 | }) | 209 | }) |
| 238 | 210 | ||
| 239 | 211 | ||
| 240 | function initMap() { | ||
| 241 | // const TMap = (window as any).TMap | ||
| 242 | var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标' | ||
| 243 | var map = new TMap.Map('map', { | ||
| 244 | center: center, // 设置地图中心点坐标 | ||
| 245 | zoom: 17 // 设置地图缩放级别 | ||
| 246 | }) | ||
| 247 | var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude)// 创建一个坐标 | ||
| 248 | // 创建InfoWindow实例,并进行初始化 | ||
| 249 | var infowindow = new TMap.InfoWindow({ | ||
| 250 | content: form.value.address, // 信息窗口内容 | ||
| 251 | position: infoWindowLocation, // 显示信息窗口的坐标 | ||
| 252 | map: map, | ||
| 253 | offset: { x: 0, y: -32 } | ||
| 254 | }) | ||
| 255 | infowindow.close() | ||
| 256 | var marker = new TMap.MultiMarker({ | ||
| 257 | map: map, | ||
| 258 | // 样式定义 | ||
| 259 | styles: { | ||
| 260 | 'myStyle': new TMap.MarkerStyle({ | ||
| 261 | 'anchor': { x: 16, y: 32 } | ||
| 262 | }) | ||
| 263 | }, | ||
| 264 | // 点标记数据数组 | ||
| 265 | geometries: [{ | ||
| 266 | 'id': '1', // 点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id | ||
| 267 | // "styleId": 'myStyle', //指定样式id | ||
| 268 | 'position': new TMap.LatLng(form.value.latitude, form.value.longitude), // 点标记坐标位置 | ||
| 269 | 'properties': { // 自定义属性 | ||
| 270 | 'title': form.value.name | ||
| 271 | } | ||
| 272 | } | ||
| 273 | ] | ||
| 274 | }) | ||
| 275 | marker.on('click', function(evt) { | ||
| 276 | // 设置infoWindow | ||
| 277 | infowindow.open() // 打开信息窗 | ||
| 278 | infowindow.setPosition(evt.geometry.position)// 设置信息窗位置 | ||
| 279 | }) | ||
| 280 | } | ||
| 281 | |||
| 282 | function goOrder(room) { | 212 | function goOrder(room) { |
| 283 | // if (!hotTime.value) { | ||
| 284 | // proxy.$modal.msgError(language.value == 0 ? '请先选择出发日期' : 'Please choose the date of check-in first') | ||
| 285 | // return | ||
| 286 | // } | ||
| 287 | // if (room.useCount <= 0) { | ||
| 288 | // ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}至 ${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` | ||
| 289 | // : `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, { type: 'warning' }).then({ | ||
| 290 | // | ||
| 291 | // }) | ||
| 292 | // return | ||
| 293 | // } | ||
| 294 | ElMessageBox.confirm(language.value == 0 ? `你当前选择的出行日期为${dayjs(currentDate.value).format('YYYY-MM-DD')}是否确定?` : `Your current check-in time is ${dayjs(currentDate.value).format('YYYY-MM-DD')} Are you sure?`, { type: 'warning' }).then({}).then(() => { | 213 | ElMessageBox.confirm(language.value == 0 ? `你当前选择的出行日期为${dayjs(currentDate.value).format('YYYY-MM-DD')}是否确定?` : `Your current check-in time is ${dayjs(currentDate.value).format('YYYY-MM-DD')} Are you sure?`, { type: 'warning' }).then({}).then(() => { |
| 295 | checkOrderPay(6).then(res => { | 214 | checkOrderPay(6).then(res => { |
| 296 | if (res.data == -100) { | 215 | if (res.data == -100) { |
| ... | @@ -327,19 +246,6 @@ function goNext() { | ... | @@ -327,19 +246,6 @@ function goNext() { |
| 327 | }) | 246 | }) |
| 328 | } | 247 | } |
| 329 | 248 | ||
| 330 | function getDaysBetween() { | ||
| 331 | if (hotTime.value && hotTime.value.length == 2) { | ||
| 332 | const d1 = dayjs(hotTime.value[0]).format('YYYY-MM-DD') | ||
| 333 | const d2 = dayjs(hotTime.value[1]).format('YYYY-MM-DD') | ||
| 334 | if (d1 == d2) { | ||
| 335 | getDateTime() | ||
| 336 | return proxy.$modal.msgError(language.value == 0 ? '入住时间跨度需要大于一天' : 'The duration of the stay must be more than one day.') | ||
| 337 | } else { | ||
| 338 | getRoomList() | ||
| 339 | } | ||
| 340 | } | ||
| 341 | } | ||
| 342 | |||
| 343 | function disabledDateRZ(date) { | 249 | function disabledDateRZ(date) { |
| 344 | // 判读今天大与form.value.hqStart | 250 | // 判读今天大与form.value.hqStart |
| 345 | if (formTime.value.scenicStart) { | 251 | if (formTime.value.scenicStart) { |
| ... | @@ -350,16 +256,6 @@ function disabledDateRZ(date) { | ... | @@ -350,16 +256,6 @@ function disabledDateRZ(date) { |
| 350 | return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf())) | 256 | return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf())) |
| 351 | } | 257 | } |
| 352 | } | 258 | } |
| 353 | // return true | ||
| 354 | } | ||
| 355 | |||
| 356 | function goMap() { | ||
| 357 | return | ||
| 358 | // var tencentMapUrl = "https://map.qq.com/"; | ||
| 359 | // window.location.href = tencentMapUrl; | ||
| 360 | var url = `https://map.qq.com/?type=gcj02&lat=${form.value.latitude}&lng=${form.value.longitude}` | ||
| 361 | var mapUrl_tx = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:' + form.value.latitude + ',' + form.value.longitude + '&referer=yellowpage' | ||
| 362 | window.open(url, '_blank') | ||
| 363 | } | 259 | } |
| 364 | 260 | ||
| 365 | </script> | 261 | </script> | ... | ... |
| ... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
| 16 | <el-col :span="language == 0?16:24"> | 16 | <el-col :span="language == 0?16:24"> |
| 17 | <h3 class="esp flex">{{ scenicItem?.name }} | 17 | <h3 class="esp flex">{{ scenicItem?.name }} |
| 18 | 18 | ||
| 19 | <el-tag effect="dark" class="ml20">{{scenicItem?.rank||0}}A</el-tag> | 19 | <el-tag effect="dark" class="ml20">{{ scenicItem?.rank||0 }}A</el-tag> |
| 20 | </h3> | 20 | </h3> |
| 21 | <div class="info"> | 21 | <div class="info"> |
| 22 | <el-icon> | 22 | <el-icon> |
| ... | @@ -82,7 +82,7 @@ | ... | @@ -82,7 +82,7 @@ |
| 82 | <el-icon @click="delPerson(n,j)"><Remove /></el-icon> | 82 | <el-icon @click="delPerson(n,j)"><Remove /></el-icon> |
| 83 | {{ n.name }}{{ j+1 }} | 83 | {{ n.name }}{{ j+1 }} |
| 84 | </label> | 84 | </label> |
| 85 | <div class="mation" v-if="p.name"> | 85 | <div v-if="p.name" class="mation"> |
| 86 | <div>{{ p.name }}</div> | 86 | <div>{{ p.name }}</div> |
| 87 | 身份证:{{ p.idCard }} | 87 | 身份证:{{ p.idCard }} |
| 88 | </div> | 88 | </div> |
| ... | @@ -106,7 +106,7 @@ | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | ||
| 107 | <div v-for="(c, index) in gateList" v-show="c.count>0" :key="index" class="ccitem"> | 107 | <div v-for="(c, index) in gateList" v-show="c.count>0" :key="index" class="ccitem"> |
| 108 | 108 | ||
| 109 | {{c.name}} | 109 | {{ c.name }} |
| 110 | <span v-if="language==0">{{ c.count }}*{{ '¥' }}{{ c.price }}</span> | 110 | <span v-if="language==0">{{ c.count }}*{{ '¥' }}{{ c.price }}</span> |
| 111 | <span v-else>{{ c.count }}*{{ '€' }}{{ c.priceEn }}</span> | 111 | <span v-else>{{ c.count }}*{{ '€' }}{{ c.priceEn }}</span> |
| 112 | </div> | 112 | </div> |
| ... | @@ -159,16 +159,9 @@ const user = useUserStore().user | ... | @@ -159,16 +159,9 @@ const user = useUserStore().user |
| 159 | const language = useStorage('language', 0) | 159 | const language = useStorage('language', 0) |
| 160 | const router = useRouter() | 160 | const router = useRouter() |
| 161 | const route = useRoute() | 161 | const route = useRoute() |
| 162 | const room = ref({}) | ||
| 163 | const loading = ref(false) | 162 | const loading = ref(false) |
| 164 | const canOrderNum = ref(0) | ||
| 165 | const needPersonNum = ref(0) | 163 | const needPersonNum = ref(0) |
| 166 | const hasPersonNum = ref(0) | 164 | const hasPersonNum = ref(0) |
| 167 | const person = ref({ | ||
| 168 | name: '', | ||
| 169 | idcCode: '' | ||
| 170 | }) | ||
| 171 | const show = ref(false) | ||
| 172 | const lform = ref({}) | 165 | const lform = ref({}) |
| 173 | const scenicItem = ref({}) | 166 | const scenicItem = ref({}) |
| 174 | const form = ref({ | 167 | const form = ref({ |
| ... | @@ -179,13 +172,11 @@ const form = ref({ | ... | @@ -179,13 +172,11 @@ const form = ref({ |
| 179 | const rzRange = ref('') | 172 | const rzRange = ref('') |
| 180 | const gateList = ref([]) | 173 | const gateList = ref([]) |
| 181 | const money = ref(0) | 174 | const money = ref(0) |
| 182 | const choseRooms = ref([]) | ||
| 183 | const choosePersonRef = ref([]) | 175 | const choosePersonRef = ref([]) |
| 184 | const rules = ref({ | 176 | const rules = ref({ |
| 185 | phone: { required: true, message: language.value == 0 ? '请输入联系电话' : 'Please enter a contact number', trigger: 'blur' } | 177 | phone: { required: true, message: language.value == 0 ? '请输入联系电话' : 'Please enter a contact number', trigger: 'blur' } |
| 186 | }) | 178 | }) |
| 187 | 179 | ||
| 188 | const usedays = 0 | ||
| 189 | onMounted(() => { | 180 | onMounted(() => { |
| 190 | money.value = 0 | 181 | money.value = 0 |
| 191 | rzRange.value = route.params.start | 182 | rzRange.value = route.params.start | ... | ... |
| ... | @@ -2,13 +2,14 @@ | ... | @@ -2,13 +2,14 @@ |
| 2 | <div> | 2 | <div> |
| 3 | <el-card :body-style="{'padding':'10px 0 0'}" class="mb60"> | 3 | <el-card :body-style="{'padding':'10px 0 0'}" class="mb60"> |
| 4 | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> | 4 | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| 5 | <el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5"></el-tab-pane> | 5 | <el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5" /> |
| 6 | <el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0"></el-tab-pane> | 6 | <el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0" /> |
| 7 | <el-tab-pane :label="language==0?'票务订单':'Ticket'" name="6"></el-tab-pane> | 7 | <el-tab-pane :label="language==0?'票务订单':'Ticket'" name="6" /> |
| 8 | <el-tab-pane :label="language==0?'化妆订单':'MakeUp'" name="3"></el-tab-pane> | 8 | <el-tab-pane :label="language==0?'化妆订单':'MakeUp'" name="3" /> |
| 9 | <el-tab-pane :label="language==0?'车辆订单':'TRANSPORTATION'" name="1"></el-tab-pane> | 9 | <el-tab-pane :label="language==0?'车辆订单':'TRANSPORTATION'" name="1" /> |
| 10 | <el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2"></el-tab-pane> | 10 | <el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2" /> |
| 11 | <el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4"></el-tab-pane> | 11 | <el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4" /> |
| 12 | <el-tab-pane :label="language==0?'旅游订单':'Shooting'" name="7" /> | ||
| 12 | </el-tabs> | 13 | </el-tabs> |
| 13 | <div> | 14 | <div> |
| 14 | <el-form label-width="90" size="small"> | 15 | <el-form label-width="90" size="small"> |
| ... | @@ -20,10 +21,10 @@ | ... | @@ -20,10 +21,10 @@ |
| 20 | style="width: 200px" | 21 | style="width: 200px" |
| 21 | @change="getList" | 22 | @change="getList" |
| 22 | > | 23 | > |
| 23 | <el-option label="全部" value="0"/> | 24 | <el-option label="全部" value="0" /> |
| 24 | <el-option label="未申请" value="1"/> | 25 | <el-option label="未申请" value="1" /> |
| 25 | <el-option label="申请中" value="2"/> | 26 | <el-option label="申请中" value="2" /> |
| 26 | <el-option label="已开票" value="3"/> | 27 | <el-option label="已开票" value="3" /> |
| 27 | </el-select> | 28 | </el-select> |
| 28 | </el-form-item> | 29 | </el-form-item> |
| 29 | </el-form> | 30 | </el-form> |
| ... | @@ -31,8 +32,49 @@ | ... | @@ -31,8 +32,49 @@ |
| 31 | 温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收! | 32 | 温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收! |
| 32 | </div> | 33 | </div> |
| 33 | </div> | 34 | </div> |
| 34 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> | 35 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228" /> |
| 35 | <div v-if="activeName=='6'" class="pd20"> | 36 | <div v-if="activeName=='7'" class="pd20"> |
| 37 | <div v-for="b in list" v-loading="loading" class="item"> | ||
| 38 | <div class="title"> | ||
| 39 | <label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label> | ||
| 40 | <span>{{ b.id }}</span> | ||
| 41 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> | ||
| 42 | </div> | ||
| 43 | |||
| 44 | <el-row align="middle" class="pd20 mt10" justify="space-between"> | ||
| 45 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | ||
| 46 | <h3 class="m0">{{ b.name }}</h3> | ||
| 47 | <!-- <p> {{ language == 0 ? "时间" : "Event Date & Time" }}:{{--> | ||
| 48 | <!-- b.messageObj.ticketDate.name--> | ||
| 49 | <!-- }}</p>--> | ||
| 50 | <p class="common"> | ||
| 51 | {{ language == 0 ? "张数" : "Location" }}:{{ b.messageObj.touristList.length }}{{ language == 0 ? "张" : "tickets" }} | ||
| 52 | </p> | ||
| 53 | </el-col> | ||
| 54 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | ||
| 55 | <span class="text-warning"> {{ b.paymentType == '3' ? '€' : '¥' }} | ||
| 56 | <span class="bigMoney">{{ b.totalStr }}</span> | ||
| 57 | </span> | ||
| 58 | </el-col> | ||
| 59 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | ||
| 60 | <div class="text-right"> | ||
| 61 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> | ||
| 62 | {{ language == 0 ? '申请开票' : 'Invoice' }} | ||
| 63 | </el-button> | ||
| 64 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | ||
| 65 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | ||
| 66 | </el-button> | ||
| 67 | <el-button | ||
| 68 | v-if="b.invoiceId" plain round type="primary" | ||
| 69 | @click.stop="showDetail(b)" | ||
| 70 | >{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 71 | </el-button> | ||
| 72 | </div> | ||
| 73 | </el-col> | ||
| 74 | </el-row> | ||
| 75 | </div> | ||
| 76 | </div> | ||
| 77 | <div v-else-if="activeName=='6'" class="pd20"> | ||
| 36 | <div v-for="b in list" v-loading="loading" class="item"> | 78 | <div v-for="b in list" v-loading="loading" class="item"> |
| 37 | <div class="title"> | 79 | <div class="title"> |
| 38 | <label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label> | 80 | <label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label> |
| ... | @@ -44,8 +86,8 @@ | ... | @@ -44,8 +86,8 @@ |
| 44 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | 86 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> |
| 45 | <h3 class="m0">{{ b.name }}</h3> | 87 | <h3 class="m0">{{ b.name }}</h3> |
| 46 | <p> {{ language == 0 ? "时间" : "Event Date & Time" }}:{{ | 88 | <p> {{ language == 0 ? "时间" : "Event Date & Time" }}:{{ |
| 47 | b.messageObj.ticketDate.name | 89 | b.messageObj.ticketDate.name |
| 48 | }}</p> | 90 | }}</p> |
| 49 | <p class="common"> | 91 | <p class="common"> |
| 50 | {{ language == 0 ? "张数" : "Location" }}:{{ b.messageObj.num }}{{ language == 0 ? "张" : "tickets" }} | 92 | {{ language == 0 ? "张数" : "Location" }}:{{ b.messageObj.num }}{{ language == 0 ? "张" : "tickets" }} |
| 51 | </p> | 93 | </p> |
| ... | @@ -63,8 +105,10 @@ | ... | @@ -63,8 +105,10 @@ |
| 63 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | 105 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 64 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 106 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 65 | </el-button> | 107 | </el-button> |
| 66 | <el-button v-if="b.invoiceId" plain round type="primary" | 108 | <el-button |
| 67 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 109 | v-if="b.invoiceId" plain round type="primary" |
| 110 | @click.stop="showDetail(b)" | ||
| 111 | >{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 68 | </el-button> | 112 | </el-button> |
| 69 | </div> | 113 | </div> |
| 70 | </el-col> | 114 | </el-col> |
| ... | @@ -93,16 +137,20 @@ | ... | @@ -93,16 +137,20 @@ |
| 93 | </el-col> | 137 | </el-col> |
| 94 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 138 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> |
| 95 | <div class="text-right"> | 139 | <div class="text-right"> |
| 96 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" :disabled="!b.totalPayAmount||b.totalAmount==0" plain | 140 | <el-button |
| 97 | round type="primary" | 141 | v-if="b.isInvoice == '0'&&!b.invoiceId" :disabled="!b.totalPayAmount||b.totalAmount==0" plain |
| 98 | @click.stop="gokp(b)"> | 142 | round type="primary" |
| 143 | @click.stop="gokp(b)" | ||
| 144 | > | ||
| 99 | {{ language == 0 ? '申请开票' : 'Invoice' }} | 145 | {{ language == 0 ? '申请开票' : 'Invoice' }} |
| 100 | </el-button> | 146 | </el-button> |
| 101 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | 147 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 102 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 148 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 103 | </el-button> | 149 | </el-button> |
| 104 | <el-button v-if="b.invoiceId" plain round type="primary" | 150 | <el-button |
| 105 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 151 | v-if="b.invoiceId" plain round type="primary" |
| 152 | @click.stop="showDetail(b)" | ||
| 153 | >{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 106 | </el-button> | 154 | </el-button> |
| 107 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">--> | 155 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">--> |
| 108 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | 156 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> |
| ... | @@ -174,8 +222,10 @@ | ... | @@ -174,8 +222,10 @@ |
| 174 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | 222 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> |
| 175 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | 223 | {{ language == 0 ? '重新申请' : 'Rebilling' }} |
| 176 | </el-button> | 224 | </el-button> |
| 177 | <el-button v-if="b.invoiceId" plain round type="primary" | 225 | <el-button |
| 178 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | 226 | v-if="b.invoiceId" plain round type="primary" |
| 227 | @click.stop="showDetail(b)" | ||
| 228 | >{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 179 | </el-button> | 229 | </el-button> |
| 180 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">--> | 230 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">--> |
| 181 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | 231 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> |
| ... | @@ -190,12 +240,14 @@ | ... | @@ -190,12 +240,14 @@ |
| 190 | </div> | 240 | </div> |
| 191 | </el-card> | 241 | </el-card> |
| 192 | 242 | ||
| 193 | <el-dialog v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" | 243 | <el-dialog |
| 194 | :title="language==0?'开收据':'Issue a receipt'" width="460px"> | 244 | v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" |
| 245 | :title="language==0?'开收据':'Issue a receipt'" width="460px" | ||
| 246 | > | ||
| 195 | <div class="flex"> | 247 | <div class="flex"> |
| 196 | <el-form-item :label="language==0?'开票人':'Name'"> | 248 | <el-form-item :label="language==0?'开票人':'Name'"> |
| 197 | <div class="flex"> | 249 | <div class="flex"> |
| 198 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"></el-input> | 250 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'" /> |
| 199 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并预览' : 'Submit' }}</el-button> | 251 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并预览' : 'Submit' }}</el-button> |
| 200 | </div> | 252 | </div> |
| 201 | </el-form-item> | 253 | </el-form-item> |
| ... | @@ -212,21 +264,21 @@ | ... | @@ -212,21 +264,21 @@ |
| 212 | </template> | 264 | </template> |
| 213 | 265 | ||
| 214 | <script setup> | 266 | <script setup> |
| 215 | import {useStorage} from "@vueuse/core/index"; | 267 | import { useStorage } from '@vueuse/core/index' |
| 216 | import useUserStore from "@/store/modules/user"; | 268 | import useUserStore from '@/store/modules/user' |
| 217 | import { | 269 | import { |
| 218 | getCanInvoiceBills, | 270 | getCanInvoiceBills, |
| 219 | getCanInvoiceBm, | 271 | getCanInvoiceBm, |
| 220 | getInvoiceByActiveId, | ||
| 221 | ppOtaReceipt, | 272 | ppOtaReceipt, |
| 222 | getReceipt, | 273 | getReceipt, |
| 223 | getBaseInfoByActiveId | 274 | getBaseInfoByActiveId |
| 224 | } from "@/apiPc/booking"; | 275 | } from '@/apiPc/booking' |
| 225 | import {getCurrentInstance, onMounted, ref} from "vue"; | 276 | import { getCurrentInstance, onMounted, ref } from 'vue' |
| 226 | import {ElMessage, ElMessageBox} from "element-plus"; | 277 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 227 | import {md5} from "md5js"; | 278 | import { md5 } from 'md5js' |
| 228 | import {loginFree, getCanInvoiceTicket} from "@/viewsPc/seat/api"; | 279 | import { loginFree, getCanInvoiceTicket, getOrderDetail } from '@/viewsPc/seat/api' |
| 229 | import {setToken} from "@/viewsPc/seat/utils/local-store"; | 280 | import { setToken } from '@/viewsPc/seat/utils/local-store' |
| 281 | import { useRoute, useRouter } from 'vue-router' | ||
| 230 | 282 | ||
| 231 | const router = useRouter() | 283 | const router = useRouter() |
| 232 | const route = useRoute() | 284 | const route = useRoute() |
| ... | @@ -234,7 +286,7 @@ const language = useStorage('language', 0) | ... | @@ -234,7 +286,7 @@ const language = useStorage('language', 0) |
| 234 | const lpName = ref('') | 286 | const lpName = ref('') |
| 235 | const remark = ref('') | 287 | const remark = ref('') |
| 236 | const showSJDialog = ref(false) | 288 | const showSJDialog = ref(false) |
| 237 | const userStore = useUserStore(); | 289 | const userStore = useUserStore() |
| 238 | const user = useUserStore().user || {} | 290 | const user = useUserStore().user || {} |
| 239 | const activeName = ref(userStore.activeName || '5') | 291 | const activeName = ref(userStore.activeName || '5') |
| 240 | 292 | ||
| ... | @@ -245,22 +297,26 @@ const query = ref({ | ... | @@ -245,22 +297,26 @@ const query = ref({ |
| 245 | pageNo: 1, | 297 | pageNo: 1, |
| 246 | pageSize: 999 | 298 | pageSize: 999 |
| 247 | }) | 299 | }) |
| 248 | const {proxy} = getCurrentInstance() | 300 | const { proxy } = getCurrentInstance() |
| 249 | const list = ref([]) | 301 | const list = ref([]) |
| 250 | const loading = ref(false) | 302 | const loading = ref(false) |
| 251 | onMounted(() => { | 303 | onMounted(() => { |
| 252 | if (!user.utype) { | 304 | if (!user.utype) { |
| 253 | router.push({name: 'home'}) | 305 | router.push({ name: 'home' }) |
| 254 | return | 306 | return |
| 255 | } | 307 | } |
| 256 | if (language.value == 1) { | 308 | if (language.value == 1) { |
| 257 | router.push({name: 'myInfo'}) | 309 | router.push({ name: 'myInfo' }) |
| 258 | return | 310 | return |
| 259 | } | 311 | } |
| 260 | query.value.orderType = activeName.value = userStore.activeName || '5' | 312 | query.value.orderType = activeName.value = userStore.activeName || '5' |
| 261 | getList() | 313 | getList() |
| 262 | route.query.orderSn && getDataInfo() | 314 | route.query.orderSn && getDataInfo() |
| 263 | }) | 315 | }) |
| 316 | async function getDataInfo() { | ||
| 317 | const res = await getOrderDetail({ orderSn: route.query.orderSn }) | ||
| 318 | formDate.value = res.data | ||
| 319 | } | ||
| 264 | const getList = () => { | 320 | const getList = () => { |
| 265 | loading.value = true | 321 | loading.value = true |
| 266 | if (query.value.orderType == '5') { | 322 | if (query.value.orderType == '5') { |
| ... | @@ -278,35 +334,49 @@ const getList = () => { | ... | @@ -278,35 +334,49 @@ const getList = () => { |
| 278 | pageSize: 999 | 334 | pageSize: 999 |
| 279 | }).then(res => { | 335 | }).then(res => { |
| 280 | list.value = res.rows | 336 | list.value = res.rows |
| 281 | for (let b of list.value) { | 337 | for (const b of list.value) { |
| 282 | b.messageObj = JSON.parse(b.extJson) | 338 | b.messageObj = JSON.parse(b.extJson) |
| 283 | b.messageObj.ticketDate = JSON.parse(b.messageObj.ticketDate) | 339 | b.messageObj.ticketDate = JSON.parse(b.messageObj.ticketDate) |
| 284 | b.messageObj.ticketType = JSON.parse(b.messageObj.ticketType) | 340 | b.messageObj.ticketType = JSON.parse(b.messageObj.ticketType) |
| 285 | } | 341 | } |
| 286 | loading.value = false | 342 | loading.value = false |
| 287 | console.log(list.value) | 343 | console.log(list.value) |
| 288 | 344 | }) | |
| 345 | } else if (query.value.orderType == '7') { | ||
| 346 | // login() | ||
| 347 | getCanInvoiceBills({ | ||
| 348 | createById: user.userId, | ||
| 349 | orderType: '6', | ||
| 350 | invoiced: '0', | ||
| 351 | pageNo: 1, | ||
| 352 | pageSize: 999 | ||
| 353 | }).then(res => { | ||
| 354 | list.value = res.rows | ||
| 355 | for (const b of list.value) { | ||
| 356 | b.messageObj = JSON.parse(b.extJson) | ||
| 357 | } | ||
| 358 | loading.value = false | ||
| 359 | console.log(list.value) | ||
| 289 | }) | 360 | }) |
| 290 | } else { | 361 | } else { |
| 291 | getCanInvoiceBills(query.value).then(res => { | 362 | getCanInvoiceBills(query.value).then(res => { |
| 292 | list.value = res.rows | 363 | list.value = res.rows |
| 293 | for (let b of list.value) { | 364 | for (const b of list.value) { |
| 294 | b.messageObj = JSON.parse(b.message) | 365 | b.messageObj = JSON.parse(b.message) |
| 295 | } | 366 | } |
| 296 | loading.value = false | 367 | loading.value = false |
| 297 | }) | 368 | }) |
| 298 | } | 369 | } |
| 299 | |||
| 300 | } | 370 | } |
| 301 | const login = async () => { | 371 | const login = async() => { |
| 302 | // 票务 | 372 | // 票务 |
| 303 | const userId = userStore.user?.userId; | 373 | const userId = userStore.user?.userId |
| 304 | const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32); | 374 | const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32) |
| 305 | return loginFree({ | 375 | return loginFree({ |
| 306 | userId: userId, | 376 | userId: userId, |
| 307 | sign, | 377 | sign |
| 308 | }).then((res) => { | 378 | }).then((res) => { |
| 309 | setToken(res.data.token); | 379 | setToken(res.data.token) |
| 310 | getCanInvoiceTicket(query.value).then(res => { | 380 | getCanInvoiceTicket(query.value).then(res => { |
| 311 | loading.value = false | 381 | loading.value = false |
| 312 | list.value = res.data.lists | 382 | list.value = res.data.lists |
| ... | @@ -321,7 +391,6 @@ const handleClick = (e) => { | ... | @@ -321,7 +391,6 @@ const handleClick = (e) => { |
| 321 | query.value.invoiced = '0' | 391 | query.value.invoiced = '0' |
| 322 | userStore.updataActiveName(e.paneName) | 392 | userStore.updataActiveName(e.paneName) |
| 323 | getList() | 393 | getList() |
| 324 | |||
| 325 | } | 394 | } |
| 326 | const gokp = (item) => { | 395 | const gokp = (item) => { |
| 327 | if (query.value.orderType == 6) { | 396 | if (query.value.orderType == 6) { |
| ... | @@ -332,7 +401,7 @@ const gokp = (item) => { | ... | @@ -332,7 +401,7 @@ const gokp = (item) => { |
| 332 | totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount, | 401 | totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount, |
| 333 | orderId: item.id, | 402 | orderId: item.id, |
| 334 | paymentType: item.paymentType, | 403 | paymentType: item.paymentType, |
| 335 | orderType: query.value.orderType, | 404 | orderType: query.value.orderType |
| 336 | } | 405 | } |
| 337 | }) | 406 | }) |
| 338 | } else { | 407 | } else { |
| ... | @@ -348,7 +417,6 @@ const gokp = (item) => { | ... | @@ -348,7 +417,6 @@ const gokp = (item) => { |
| 348 | } | 417 | } |
| 349 | }) | 418 | }) |
| 350 | } | 419 | } |
| 351 | |||
| 352 | } | 420 | } |
| 353 | const editkp = (item) => { | 421 | const editkp = (item) => { |
| 354 | if (query.value.orderType == 6) { | 422 | if (query.value.orderType == 6) { |
| ... | @@ -357,7 +425,7 @@ const editkp = (item) => { | ... | @@ -357,7 +425,7 @@ const editkp = (item) => { |
| 357 | query: { | 425 | query: { |
| 358 | invoiceId: item.invoiceId, | 426 | invoiceId: item.invoiceId, |
| 359 | orderId: item.id, | 427 | orderId: item.id, |
| 360 | isEdit: true, | 428 | isEdit: true |
| 361 | } | 429 | } |
| 362 | }) | 430 | }) |
| 363 | } else { | 431 | } else { |
| ... | @@ -369,12 +437,11 @@ const editkp = (item) => { | ... | @@ -369,12 +437,11 @@ const editkp = (item) => { |
| 369 | type: activeName.value, | 437 | type: activeName.value, |
| 370 | isEdit: true, | 438 | isEdit: true, |
| 371 | orderType: query.value.orderType, | 439 | orderType: query.value.orderType, |
| 372 | paymentType: query.value.orderType == 5 ? item.payType : item.paymentType, | 440 | paymentType: query.value.orderType == 5 ? item.payType : item.paymentType |
| 373 | // orderSn: query.value.orderType == 6 ? item.orderSn : null | 441 | // orderSn: query.value.orderType == 6 ? item.orderSn : null |
| 374 | } | 442 | } |
| 375 | }) | 443 | }) |
| 376 | } | 444 | } |
| 377 | |||
| 378 | } | 445 | } |
| 379 | const showDetail = (item) => { | 446 | const showDetail = (item) => { |
| 380 | if (query.value.orderType == 6) { | 447 | if (query.value.orderType == 6) { |
| ... | @@ -382,10 +449,9 @@ const showDetail = (item) => { | ... | @@ -382,10 +449,9 @@ const showDetail = (item) => { |
| 382 | name: 'ticketInvoiceDetail', | 449 | name: 'ticketInvoiceDetail', |
| 383 | query: { | 450 | query: { |
| 384 | invoiceId: item.invoiceId, | 451 | invoiceId: item.invoiceId, |
| 385 | orderId: item.id, | 452 | orderId: item.id |
| 386 | } | 453 | } |
| 387 | }) | 454 | }) |
| 388 | |||
| 389 | } else { | 455 | } else { |
| 390 | router.push({ | 456 | router.push({ |
| 391 | name: 'invoiceDetail', | 457 | name: 'invoiceDetail', |
| ... | @@ -393,11 +459,10 @@ const showDetail = (item) => { | ... | @@ -393,11 +459,10 @@ const showDetail = (item) => { |
| 393 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, | 459 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, |
| 394 | type: activeName.value, | 460 | type: activeName.value, |
| 395 | orderType: query.value.orderType, | 461 | orderType: query.value.orderType, |
| 396 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType, | 462 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType |
| 397 | // orderSn: query.value.orderType == 6 ? item.orderSn : null | 463 | // orderSn: query.value.orderType == 6 ? item.orderSn : null |
| 398 | } | 464 | } |
| 399 | }) | 465 | }) |
| 400 | |||
| 401 | } | 466 | } |
| 402 | } | 467 | } |
| 403 | let nowSj = {} | 468 | let nowSj = {} |
| ... | @@ -423,7 +488,7 @@ const showSJ = (item) => { | ... | @@ -423,7 +488,7 @@ const showSJ = (item) => { |
| 423 | type: 1 | 488 | type: 1 |
| 424 | } | 489 | } |
| 425 | if (nowSj.orderType) { | 490 | if (nowSj.orderType) { |
| 426 | //预约 | 491 | // 预约 |
| 427 | proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { | 492 | proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { |
| 428 | ...obj | 493 | ...obj |
| 429 | }, `Receipt_${new Date().getTime()}.pdf`) | 494 | }, `Receipt_${new Date().getTime()}.pdf`) |
| ... | @@ -433,7 +498,6 @@ const showSJ = (item) => { | ... | @@ -433,7 +498,6 @@ const showSJ = (item) => { |
| 433 | ...obj | 498 | ...obj |
| 434 | }, `Receipt_${new Date().getTime()}.pdf`) | 499 | }, `Receipt_${new Date().getTime()}.pdf`) |
| 435 | } | 500 | } |
| 436 | |||
| 437 | } | 501 | } |
| 438 | const submitSJ = () => { | 502 | const submitSJ = () => { |
| 439 | loading.value = true | 503 | loading.value = true | ... | ... |
-
Please register or sign in to post a comment