9503459c by zhangmeng

票务

1 parent 0e1113e9
......@@ -8,8 +8,8 @@
<el-row gutter="20">
<el-col :lg="16" class="left">
<div class="info">
<div class="name">{{ order.activityName }}</div>
<div class="address">{{ order.placeName }}</div>
<div class="name">{{ TickForm.name }}</div>
<div class="address">{{ TickForm.address }}</div>
</div>
<div class="ticket_info mb20">
......@@ -135,7 +135,13 @@
<script setup>
import {ref} from 'vue'
import {customerListApi, getTicketTotalApi, submitOrderTicket, listApi} from '@/apiPc/booking'
import {
customerListApi,
getTicketTotalApi,
submitOrderTicket,
listApi,
getTicketListApi, getTicketInfoByActivityId,
} from '@/apiPc/booking'
import {ElMessage} from "element-plus";
import {languageFormat} from "@/viewsPc/seat/utils/language.js";
import useUserStore from "/@/store/modules/user";
......@@ -171,6 +177,7 @@ const price = ref({
total_cn: 0
})
const tickType = ref({})
const matchType = ref({})
const rules = ref({
contacts: [
{
......@@ -195,6 +202,7 @@ const rules = ref({
],
})
const formRef = ref(null)
const TickForm = ref({})
let timer = null;
......@@ -319,19 +327,27 @@ async function getTicketTotal() {
const res = await getTicketTotalApi(orderForm.value)
price.value = res.data
orderForm.value.total = language == 0 ? price.value.total_cn : price.value.total_en
console.log(orderForm.value)
}
// 获取票档信息
async function getTicketListType() {
const res = await listApi({latId: orderForm.value.latId})
tickType.value = res.rows.find(item => item.id == orderForm.value.attId)
orderForm.value.ticketDate = tickType.value.name
orderForm.value.ticketType = tickType.value.ticketType
orderForm.value.ticketDate = JSON.stringify(tickType.value)
}
getTicketListType()
// 票档信息
async function getTicketList() {
const res = await getTicketListApi({activityId: route.params.activeId})
matchType.value = res.rows.find(item => item.id == orderForm.value.atId)
orderForm.value.ticketType = JSON.stringify(matchType.value)
}
getTicketList()
// 提交
async function paymentHandle() {
await formRef.value.validate()
......@@ -341,6 +357,12 @@ async function paymentHandle() {
}
}
async function getDetail() {
const res = await getTicketInfoByActivityId({activityId: orderForm.value.activeId})
TickForm.value = res.data
}
getDetail()
</script>
......
......@@ -19,6 +19,8 @@
<label v-if="b.orderType == 3" class="orangeTag"> {{ language == 0 ? '化妆' : 'MakeUp' }} </label>
<label v-if="b.orderType == 4" class="orangeTag"> {{ language == 0 ? '拍摄' : 'Shooting ' }} </label>
<span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span>
<label v-if="b.orderType == 5" class="orangeTag"> {{ language == 0 ? '票务' : 'TICKETING ' }} </label>
<span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span>
</div>
<div class="status-po">
......@@ -76,6 +78,16 @@
}}
</p>
</div>
<div v-if="b.orderType==5">
<h3 class="name">{{ b.name }}</h3>
<p>
<!-- {{-->
<!-- dayjs(b.deliveryTime).format('YYYY-MM-DD') + ' ' + b.extJsonObj.timePeriod?.split('-')[0] + '-' + dayjs(b.deliveryTime).format('YYYY-MM-DD') + ' ' + b.extJsonObj.timePeriod?.split('-')[1]-->
<!-- }}-->
{{ b.extJsonObj.ticketDate.name }}
</p>
</div>
</el-col>
<el-col :lg="6" :md="12" :sm="12" :xs="24">
<div v-if="b.orderType == 0">
......@@ -89,6 +101,9 @@
<div v-if="b.orderType == 3||b.orderType == 4">
<p>{{ b.extJsonObj.packageName }}</p>
</div>
<div v-if="b.orderType == 5">
<p>{{ b.extJsonObj.packageName }}</p>
</div>
</el-col>
<el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center">
<span class="text-warning"> {{ language == 0 ? '¥' : '€' }}
......@@ -97,9 +112,12 @@
</el-col>
<el-col :lg="6" :md="16" :sm="16" :xs="16">
<div class="text-right mb20 text-danger">
<el-countdown v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')"
:value="b.countdown" format="mm:ss"
value-style="color:#E60012;font-size:16px;" @finish="finish(b)"/>
<el-countdown
v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')"
:value="b.countdown"
format="mm:ss"
value-style="color:#E60012;font-size:16px;"
@finish="finish(b)"/>
</div>
<div class="text-right">
......@@ -160,9 +178,17 @@ function finish(bill) {
function getList() {
newbilllist({createById: user.userId}).then(res => {
list.value = res.rows || []
for (var b of list.value) {
for (let b of list.value) {
b.messageObj = JSON.parse(b.message) || {}
b.extJsonObj = JSON.parse(b.extJson) || {}
if (b.orderType == 5) {
try {
b.extJsonObj.ticketDate = b.extJsonObj.ticketDate ? JSON.parse(b.extJsonObj.ticketDate) : {}
b.extJsonObj.ticketType = b.extJsonObj.ticketType ? JSON.parse(b.extJsonObj.ticketType) : {}
} catch (e) {
console.log(e)
}
}
if (b.surplus && b.status == '0' && (b.surplus != '0,0' && b.surplus != '0')) {
b.countdown = Date.now() + Number((b.surplus.split(',')[0] * 60 + b.surplus.split(',')[1]) * 10)
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!