f638433a by 华明祺

no message

1 parent 9f337e69
......@@ -362,6 +362,14 @@ export function getMealOrderInfo(data) {
})
}
export function getScenicOrderInfo(data) {
return request({
url: `/ota/orderScenic/getScenicOrderInfo`,
method: 'get',
params: data
})
}
export function getMealOrderInfoByLogex(data) {
return request({
......@@ -371,6 +379,14 @@ export function getMealOrderInfoByLogex(data) {
})
}
export function getLogexScenicVoById(data) {
return request({
url: `/ota/activityScenic/getLogexScenicVoById`,
method: 'get',
params: data
})
}
export function getShootList(data) {
return request({
url: `/ota/activityShoot/getShootList`,
......
......@@ -166,49 +166,16 @@
<div v-if="type == 'travel'">
<div class="leftboderTT">{{ language == 0 ? '购票信息' : 'Ticket Information' }}</div>
<div class="border-info mt20">
<h3>{{ matchForm.name }}</h3>
<h3>{{ formInfo.name }}</h3>
<el-row>
<el-col>
{{ language == 0 ? '地址' : 'Address' }}
{{ matchForm.address }}
{{ formInfo.address }}
</el-col>
<el-col>
{{
form?.extJson?.ticketType?.name
}}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }}
{{ language == 0 ? '开园时间' : 'Address' }}
{{ formInfo. startTime }} ~ {{ formInfo.workTime }}
</el-col>
<el-col>
{{
language == 0 ? '时间' : 'Time'
}}{{
dayjs(form?.extJson?.ticketDate?.ticketStart).format('YYYY-MM-DD')
}}{{
form.extJson?.ticketDate?.ticketType == 1 ? '~' + dayjs(form?.extJson?.ticketDate?.ticketEnd).format('YYYY-MM-DD') : ''
}}
</el-col>
<el-col v-if="form?.extJson?.ticketDate?.isCountSale==1">
{{
language == 0 ? `满${form?.extJson?.ticketDate.counts}人优惠` : `Discount for up to ${form?.extJson?.ticketDate.counts} people`
}}<span v-if="language == 0">{{ form?.extJson?.ticketDate.discount }}</span>
<span v-else>{{ (10 - form?.extJson?.ticketDate.discount) * 10 + '%' }}off</span>
</el-col>
<!-- <el-col>-->
<!-- {{-->
<!-- language == 0 ? '原价票' : 'Cost Ticket'-->
<!-- }}{{-->
<!-- language == 0 ? form?.extJson?.ticketDate?.price : form?.extJson?.ticketDate?.priceEn-->
<!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1-->
<!-- {{ language == 0 ? '张' : 'Tickets' }}-->
<!-- </el-col>-->
<!-- <el-col>-->
<!-- {{-->
<!-- language == 0 ? '优惠票' : 'Concession Ticket'-->
<!-- }}{{-->
<!-- language == 0 ? form?.extJson?.ticketDate?.rebatePrice : form?.extJson?.ticketDate?.rebatePriceEn-->
<!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1-->
<!-- {{ language == 0 ? '张' : 'Tickets' }}-->
<!-- </el-col>-->
</el-row>
</div>
</div>
......@@ -378,33 +345,17 @@
</el-row>
<el-row v-if="type == 'travel'" style="width: 100%">
<el-row v-for="v in form.extJson?.message" style="width: 100%">
<el-row v-for="(v,i) in form.personArr" :key="i" style="width: 100%">
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div>{{ v.name }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<!-- <div>{{-->
<!-- !v.discount ? language == 0 ? '原价票' : 'Cost Ticket' : language == 0 ? '优惠票' : 'Concession Ticket'-->
<!-- }}-->
<!-- </div>-->
<div>{{ v.idCard }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div v-if="language == 0 ">
{{ language == 0 ? '¥' : '€' }}
{{
!v.discount ? form.extJson?.ticketDate?.price : form.extJson?.ticketDate?.rebatePrice
}}
/{{ language == 0 ? '张' : 'Tickets' }}
</div>
<div v-else>
{{ language == 0 ? '¥' : '€' }}
{{
!v.discount ? form.extJson?.ticketDate?.priceEn : form.extJson?.ticketDate?.rebatePriceEn
}}
/{{ language == 0 ? '张' : 'Tickets' }}
<div>{{ v.gateName }}
</div>
</el-col>
</el-row>
......@@ -412,7 +363,7 @@
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div>{{
language == 0 ? '购票数量' : 'Number of tickets purchased'
}}{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }}
}}{{ form.personArr?.length }}{{ language == 0 ? '张' : 'Tickets' }}
</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">{{
......@@ -647,38 +598,30 @@
</template>
<script setup>
import { Search } from '@element-plus/icons-vue'
import { getCurrentInstance, ref } from 'vue'
import { onMounted } from '@vue/runtime-core'
import { useRoute, useRouter } from 'vue-router'
import * as booking from '@/apiPc/booking'
import Dialog from '@/viewsPc/booking/component/dailog.vue'
import MatchInfoRow from '@/viewsPc/match/components/matchInfo-row'
const { proxy } = getCurrentInstance()
const route = useRoute()
const router = useRouter()
const matchInfo = ref({})
const approved = ref(true)
const tableData = ref([])
const payType = ref('2')
const orderId = ref(route.query.orderId)
const matchId = ref()
const groupId = ref()
import useUserStore from '@/store/modules/user'
import FileUpload from '@/components/FileUpload'
import { useStorage } from '@vueuse/core/index'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
cancelOrder,
cancelOrder2, getBaseInfoByActiveId,
getCarBilldetailbyId,
getFoodBilldetailbyId,
getMealOrderInfoByLogex, getPhotoOrderInfo, getPhotoOrderInfoByLogex, getTicketInfoByActivityId, getTicketOrderInfo
cancelOrder2,
getBaseInfoByActiveId,
getTicketInfoByActivityId,
getTicketOrderInfo
} from '@/apiPc/booking'
import dayjs from 'dayjs'
import { delPerson } from '@/api/exam/person'
const isLogin = ref(false)
const language = useStorage('language', 0)
......@@ -695,7 +638,6 @@ const loading = ref(false)
const lpName = ref('')
const matchForm = ref({})
const user = useUserStore().user
if (useUserStore().user) {
isLogin.value = true
}
......@@ -728,6 +670,9 @@ onMounted(() => {
case '5':
type.value = 'ticket'
break
case '6':
type.value = 'travel'
break
}
}
if (route.query.matchId) {
......@@ -796,11 +741,20 @@ function getData() {
if (type.value == 'travel') {
getTravelOrderInfo()
}
console.log(payType.value)
}
//旅游订单详情
// 旅游订单详情
const getTravelOrderInfo = () => {
return booking.getScenicOrderInfo({ orderId: orderId.value }).then(res => {
form.value = res.data
totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn
matchId.value = form.value.activeId
form.value.personArr = JSON.parse(form.value.message)
ScenicInfo()
console.log(res)
}).catch(err => {
console.log(err)
errorBox.value = true
})
}
// 票务订单详情
async function getTicketOrderInfoFN() {
......@@ -932,6 +886,16 @@ function MakeUpIno() {
})
}
function ScenicInfo() {
booking.getLogexScenicVoById({ id: form.value.asId }).then(res => {
formInfo.value = res.data
console.log(res)
}).catch((e) => {
console.log(e)
errorBox.value = true
})
}
function photographyOrder() {
return booking.getPhotoOrderInfo({ orderId: orderId.value }).then(res => {
......
......@@ -59,11 +59,11 @@
</template>
<script setup>
import { onMounted } from '@vue/runtime-core'
import * as booking from '@/apiPc/booking'
import { useRouter, useRoute } from 'vue-router'
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import { ref, onMounted } from 'vue'
const router = useRouter()
const route = useRoute()
......@@ -73,7 +73,6 @@ const language = useStorage('language', 0)
const query = ref({
name: ''
})
const cptId = ref('')
const list = ref([])
const loading = ref(false)
onMounted(() => {
......
......@@ -139,23 +139,18 @@
<script setup>
import { useRouter } from 'vue-router'
import { ref, reactive, onMounted, getCurrentInstance, computed } from 'vue'
import { ref, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { dayjs } from 'element-plus'
import { getHotelById, getHotelRooms, checkRoomPayByUserId, getScenicById, checkOrderPay } from '@/apiPc/booking'
import { getScenicById, checkOrderPay } from '@/apiPc/booking'
import { getBaseInfoByActiveId } from '@/apiPc/booking'
const { proxy } = getCurrentInstance()
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import { ElMessageBox } from 'element-plus'
const currentDate = ref(new Date())
const currentDate1 = ref(new Date())
const calendarRange = ref([dayjs(currentDate.value).toDate(), (dayjs(currentDate.value).toDate())])
const user = useUserStore().user
const useStore = useUserStore
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
......@@ -166,12 +161,8 @@ const query = ref({
const hotTime = ref([])
const showAll = ref(false)
const loading = ref(false)
const roomList = ref([])
const map = ref(null)
const formTime = ref({})
let baseHotTime
onMounted(() => {
getBaseInfoByActiveId(route.params.cptId).then(res => {
formTime.value = res.data || null
......@@ -180,29 +171,10 @@ onMounted(() => {
formTime.value = null
}).finally(() => {
console.log(formTime.value)
getDateTime()
getData()
})
})
function initTime() {
if (!hotTime.value[0]) {
hotTime.value = baseHotTime
getRoomList()
}
}
function getDateTime() {
if (formTime.value) {
if (dayjs().isBefore(dayjs(formTime.value.scenicStart))) {
baseHotTime = [dayjs(formTime.value.scenicStart).format('YYYY-MM-DD'), dayjs(formTime.value.scenicStart).add(1, 'day').format('YYYY-MM-DD')]
} else {
baseHotTime = [dayjs().format('YYYY-MM-DD'), dayjs().add(1, 'day').format('YYYY-MM-DD')]
}
}
}
function getData() {
loading.value = true
getScenicById(route.params.scenicId).then(res => {
......@@ -237,60 +209,7 @@ const btnDisable = computed(() => {
})
function initMap() {
// const TMap = (window as any).TMap
var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标'
var map = new TMap.Map('map', {
center: center, // 设置地图中心点坐标
zoom: 17 // 设置地图缩放级别
})
var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude)// 创建一个坐标
// 创建InfoWindow实例,并进行初始化
var infowindow = new TMap.InfoWindow({
content: form.value.address, // 信息窗口内容
position: infoWindowLocation, // 显示信息窗口的坐标
map: map,
offset: { x: 0, y: -32 }
})
infowindow.close()
var marker = new TMap.MultiMarker({
map: map,
// 样式定义
styles: {
'myStyle': new TMap.MarkerStyle({
'anchor': { x: 16, y: 32 }
})
},
// 点标记数据数组
geometries: [{
'id': '1', // 点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
// "styleId": 'myStyle', //指定样式id
'position': new TMap.LatLng(form.value.latitude, form.value.longitude), // 点标记坐标位置
'properties': { // 自定义属性
'title': form.value.name
}
}
]
})
marker.on('click', function(evt) {
// 设置infoWindow
infowindow.open() // 打开信息窗
infowindow.setPosition(evt.geometry.position)// 设置信息窗位置
})
}
function goOrder(room) {
// if (!hotTime.value) {
// proxy.$modal.msgError(language.value == 0 ? '请先选择出发日期' : 'Please choose the date of check-in first')
// return
// }
// if (room.useCount <= 0) {
// ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}至 ${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期`
// : `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({
//
// })
// return
// }
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(() => {
checkOrderPay(6).then(res => {
if (res.data == -100) {
......@@ -327,19 +246,6 @@ function goNext() {
})
}
function getDaysBetween() {
if (hotTime.value && hotTime.value.length == 2) {
const d1 = dayjs(hotTime.value[0]).format('YYYY-MM-DD')
const d2 = dayjs(hotTime.value[1]).format('YYYY-MM-DD')
if (d1 == d2) {
getDateTime()
return proxy.$modal.msgError(language.value == 0 ? '入住时间跨度需要大于一天' : 'The duration of the stay must be more than one day.')
} else {
getRoomList()
}
}
}
function disabledDateRZ(date) {
// 判读今天大与form.value.hqStart
if (formTime.value.scenicStart) {
......@@ -350,16 +256,6 @@ function disabledDateRZ(date) {
return !((date.getTime() >= dayjs(formTime.value.scenicStart).valueOf()) && (date.getTime() <= dayjs(formTime.value.scenicEnd).valueOf()))
}
}
// return true
}
function goMap() {
return
// var tencentMapUrl = "https://map.qq.com/";
// window.location.href = tencentMapUrl;
var url = `https://map.qq.com/?type=gcj02&lat=${form.value.latitude}&lng=${form.value.longitude}`
var mapUrl_tx = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:' + form.value.latitude + ',' + form.value.longitude + '&referer=yellowpage'
window.open(url, '_blank')
}
</script>
......
......@@ -16,7 +16,7 @@
<el-col :span="language == 0?16:24">
<h3 class="esp flex">{{ scenicItem?.name }}
<el-tag effect="dark" class="ml20">{{scenicItem?.rank||0}}A</el-tag>
<el-tag effect="dark" class="ml20">{{ scenicItem?.rank||0 }}A</el-tag>
</h3>
<div class="info">
<el-icon>
......@@ -82,7 +82,7 @@
<el-icon @click="delPerson(n,j)"><Remove /></el-icon>
{{ n.name }}{{ j+1 }}
</label>
<div class="mation" v-if="p.name">
<div v-if="p.name" class="mation">
<div>{{ p.name }}</div>
身份证:{{ p.idCard }}
</div>
......@@ -106,7 +106,7 @@
<div v-for="(c, index) in gateList" v-show="c.count>0" :key="index" class="ccitem">
{{c.name}}
{{ c.name }}
<span v-if="language==0">{{ c.count }}*{{ '¥' }}{{ c.price }}</span>
<span v-else>{{ c.count }}*{{ '€' }}{{ c.priceEn }}</span>
</div>
......@@ -159,16 +159,9 @@ const user = useUserStore().user
const language = useStorage('language', 0)
const router = useRouter()
const route = useRoute()
const room = ref({})
const loading = ref(false)
const canOrderNum = ref(0)
const needPersonNum = ref(0)
const hasPersonNum = ref(0)
const person = ref({
name: '',
idcCode: ''
})
const show = ref(false)
const lform = ref({})
const scenicItem = ref({})
const form = ref({
......@@ -179,13 +172,11 @@ const form = ref({
const rzRange = ref('')
const gateList = ref([])
const money = ref(0)
const choseRooms = ref([])
const choosePersonRef = ref([])
const rules = ref({
phone: { required: true, message: language.value == 0 ? '请输入联系电话' : 'Please enter a contact number', trigger: 'blur' }
})
const usedays = 0
onMounted(() => {
money.value = 0
rzRange.value = route.params.start
......
......@@ -2,13 +2,14 @@
<div>
<el-card :body-style="{'padding':'10px 0 0'}" class="mb60">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5"></el-tab-pane>
<el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0"></el-tab-pane>
<el-tab-pane :label="language==0?'票务订单':'Ticket'" name="6"></el-tab-pane>
<el-tab-pane :label="language==0?'化妆订单':'MakeUp'" name="3"></el-tab-pane>
<el-tab-pane :label="language==0?'车辆订单':'TRANSPORTATION'" name="1"></el-tab-pane>
<el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2"></el-tab-pane>
<el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4"></el-tab-pane>
<el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5" />
<el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0" />
<el-tab-pane :label="language==0?'票务订单':'Ticket'" name="6" />
<el-tab-pane :label="language==0?'化妆订单':'MakeUp'" name="3" />
<el-tab-pane :label="language==0?'车辆订单':'TRANSPORTATION'" name="1" />
<el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2" />
<el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4" />
<el-tab-pane :label="language==0?'旅游订单':'Shooting'" name="7" />
</el-tabs>
<div>
<el-form label-width="90" size="small">
......@@ -20,10 +21,10 @@
style="width: 200px"
@change="getList"
>
<el-option label="全部" value="0"/>
<el-option label="未申请" value="1"/>
<el-option label="申请中" value="2"/>
<el-option label="已开票" value="3"/>
<el-option label="全部" value="0" />
<el-option label="未申请" value="1" />
<el-option label="申请中" value="2" />
<el-option label="已开票" value="3" />
</el-select>
</el-form-item>
</el-form>
......@@ -31,8 +32,49 @@
温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收!
</div>
</div>
<el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/>
<div v-if="activeName=='6'" class="pd20">
<el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228" />
<div v-if="activeName=='7'" class="pd20">
<div v-for="b in list" v-loading="loading" class="item">
<div class="title">
<label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label>
<span>{{ b.id }}</span>
<span class="fr text-warning status">{{ b.invoiceStr }}</span>
</div>
<el-row align="middle" class="pd20 mt10" justify="space-between">
<el-col :lg="9" :md="12" :sm="12" :xs="24">
<h3 class="m0">{{ b.name }}</h3>
<!-- <p> {{ language == 0 ? "时间" : "Event Date & Time" }}{{-->
<!-- b.messageObj.ticketDate.name-->
<!-- }}</p>-->
<p class="common">
{{ language == 0 ? "张数" : "Location" }}{{ b.messageObj.touristList.length }}{{ language == 0 ? "张" : "tickets" }}
</p>
</el-col>
<el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center">
<span class="text-warning"> {{ b.paymentType == '3' ? '€' : '¥' }}
<span class="bigMoney">{{ b.totalStr }}</span>
</span>
</el-col>
<el-col :lg="6" :md="16" :sm="16" :xs="16">
<div class="text-right">
<el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)">
{{ language == 0 ? '申请开票' : 'Invoice' }}
</el-button>
<el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)">
{{ language == 0 ? '重新申请' : 'Rebilling' }}
</el-button>
<el-button
v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)"
>{{ language == 0 ? '发票信息' : 'Detail' }}
</el-button>
</div>
</el-col>
</el-row>
</div>
</div>
<div v-else-if="activeName=='6'" class="pd20">
<div v-for="b in list" v-loading="loading" class="item">
<div class="title">
<label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label>
......@@ -63,8 +105,10 @@
<el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)">
{{ language == 0 ? '重新申请' : 'Rebilling' }}
</el-button>
<el-button v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }}
<el-button
v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)"
>{{ language == 0 ? '发票信息' : 'Detail' }}
</el-button>
</div>
</el-col>
......@@ -93,16 +137,20 @@
</el-col>
<el-col :lg="6" :md="16" :sm="16" :xs="16">
<div class="text-right">
<el-button v-if="b.isInvoice == '0'&&!b.invoiceId" :disabled="!b.totalPayAmount||b.totalAmount==0" plain
<el-button
v-if="b.isInvoice == '0'&&!b.invoiceId" :disabled="!b.totalPayAmount||b.totalAmount==0" plain
round type="primary"
@click.stop="gokp(b)">
@click.stop="gokp(b)"
>
{{ language == 0 ? '申请开票' : 'Invoice' }}
</el-button>
<el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)">
{{ language == 0 ? '重新申请' : 'Rebilling' }}
</el-button>
<el-button v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }}
<el-button
v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)"
>{{ language == 0 ? '发票信息' : 'Detail' }}
</el-button>
<!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">-->
<!-- {{ language == 0 ? '开收据' : 'Receipt' }}-->
......@@ -174,8 +222,10 @@
<el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)">
{{ language == 0 ? '重新申请' : 'Rebilling' }}
</el-button>
<el-button v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }}
<el-button
v-if="b.invoiceId" plain round type="primary"
@click.stop="showDetail(b)"
>{{ language == 0 ? '发票信息' : 'Detail' }}
</el-button>
<!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">-->
<!-- {{ language == 0 ? '开收据' : 'Receipt' }}-->
......@@ -190,12 +240,14 @@
</div>
</el-card>
<el-dialog v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false"
:title="language==0?'开收据':'Issue a receipt'" width="460px">
<el-dialog
v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false"
:title="language==0?'开收据':'Issue a receipt'" width="460px"
>
<div class="flex">
<el-form-item :label="language==0?'开票人':'Name'">
<div class="flex">
<el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"></el-input>
<el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'" />
<el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并预览' : 'Submit' }}</el-button>
</div>
</el-form-item>
......@@ -212,21 +264,21 @@
</template>
<script setup>
import {useStorage} from "@vueuse/core/index";
import useUserStore from "@/store/modules/user";
import { useStorage } from '@vueuse/core/index'
import useUserStore from '@/store/modules/user'
import {
getCanInvoiceBills,
getCanInvoiceBm,
getInvoiceByActiveId,
ppOtaReceipt,
getReceipt,
getBaseInfoByActiveId
} from "@/apiPc/booking";
import {getCurrentInstance, onMounted, ref} from "vue";
import {ElMessage, ElMessageBox} from "element-plus";
import {md5} from "md5js";
import {loginFree, getCanInvoiceTicket} from "@/viewsPc/seat/api";
import {setToken} from "@/viewsPc/seat/utils/local-store";
} from '@/apiPc/booking'
import { getCurrentInstance, onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { md5 } from 'md5js'
import { loginFree, getCanInvoiceTicket, getOrderDetail } from '@/viewsPc/seat/api'
import { setToken } from '@/viewsPc/seat/utils/local-store'
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
......@@ -234,7 +286,7 @@ const language = useStorage('language', 0)
const lpName = ref('')
const remark = ref('')
const showSJDialog = ref(false)
const userStore = useUserStore();
const userStore = useUserStore()
const user = useUserStore().user || {}
const activeName = ref(userStore.activeName || '5')
......@@ -245,22 +297,26 @@ const query = ref({
pageNo: 1,
pageSize: 999
})
const {proxy} = getCurrentInstance()
const { proxy } = getCurrentInstance()
const list = ref([])
const loading = ref(false)
onMounted(() => {
if (!user.utype) {
router.push({name: 'home'})
router.push({ name: 'home' })
return
}
if (language.value == 1) {
router.push({name: 'myInfo'})
router.push({ name: 'myInfo' })
return
}
query.value.orderType = activeName.value = userStore.activeName || '5'
getList()
route.query.orderSn && getDataInfo()
})
async function getDataInfo() {
const res = await getOrderDetail({ orderSn: route.query.orderSn })
formDate.value = res.data
}
const getList = () => {
loading.value = true
if (query.value.orderType == '5') {
......@@ -278,35 +334,49 @@ const getList = () => {
pageSize: 999
}).then(res => {
list.value = res.rows
for (let b of list.value) {
for (const b of list.value) {
b.messageObj = JSON.parse(b.extJson)
b.messageObj.ticketDate = JSON.parse(b.messageObj.ticketDate)
b.messageObj.ticketType = JSON.parse(b.messageObj.ticketType)
}
loading.value = false
console.log(list.value)
})
} else if (query.value.orderType == '7') {
// login()
getCanInvoiceBills({
createById: user.userId,
orderType: '6',
invoiced: '0',
pageNo: 1,
pageSize: 999
}).then(res => {
list.value = res.rows
for (const b of list.value) {
b.messageObj = JSON.parse(b.extJson)
}
loading.value = false
console.log(list.value)
})
} else {
getCanInvoiceBills(query.value).then(res => {
list.value = res.rows
for (let b of list.value) {
for (const b of list.value) {
b.messageObj = JSON.parse(b.message)
}
loading.value = false
})
}
}
const login = async () => {
const login = async() => {
// 票务
const userId = userStore.user?.userId;
const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32);
const userId = userStore.user?.userId
const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32)
return loginFree({
userId: userId,
sign,
sign
}).then((res) => {
setToken(res.data.token);
setToken(res.data.token)
getCanInvoiceTicket(query.value).then(res => {
loading.value = false
list.value = res.data.lists
......@@ -321,7 +391,6 @@ const handleClick = (e) => {
query.value.invoiced = '0'
userStore.updataActiveName(e.paneName)
getList()
}
const gokp = (item) => {
if (query.value.orderType == 6) {
......@@ -332,7 +401,7 @@ const gokp = (item) => {
totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount,
orderId: item.id,
paymentType: item.paymentType,
orderType: query.value.orderType,
orderType: query.value.orderType
}
})
} else {
......@@ -348,7 +417,6 @@ const gokp = (item) => {
}
})
}
}
const editkp = (item) => {
if (query.value.orderType == 6) {
......@@ -357,7 +425,7 @@ const editkp = (item) => {
query: {
invoiceId: item.invoiceId,
orderId: item.id,
isEdit: true,
isEdit: true
}
})
} else {
......@@ -369,12 +437,11 @@ const editkp = (item) => {
type: activeName.value,
isEdit: true,
orderType: query.value.orderType,
paymentType: query.value.orderType == 5 ? item.payType : item.paymentType,
paymentType: query.value.orderType == 5 ? item.payType : item.paymentType
// orderSn: query.value.orderType == 6 ? item.orderSn : null
}
})
}
}
const showDetail = (item) => {
if (query.value.orderType == 6) {
......@@ -382,10 +449,9 @@ const showDetail = (item) => {
name: 'ticketInvoiceDetail',
query: {
invoiceId: item.invoiceId,
orderId: item.id,
orderId: item.id
}
})
} else {
router.push({
name: 'invoiceDetail',
......@@ -393,11 +459,10 @@ const showDetail = (item) => {
invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId,
type: activeName.value,
orderType: query.value.orderType,
paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType,
paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType
// orderSn: query.value.orderType == 6 ? item.orderSn : null
}
})
}
}
let nowSj = {}
......@@ -423,7 +488,7 @@ const showSJ = (item) => {
type: 1
}
if (nowSj.orderType) {
//预约
// 预约
proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, {
...obj
}, `Receipt_${new Date().getTime()}.pdf`)
......@@ -433,7 +498,6 @@ const showSJ = (item) => {
...obj
}, `Receipt_${new Date().getTime()}.pdf`)
}
}
const submitSJ = () => {
loading.value = true
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!