票务
Showing
3 changed files
with
58 additions
and
10 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -8,8 +8,8 @@ | ... | @@ -8,8 +8,8 @@ |
| 8 | <el-row gutter="20"> | 8 | <el-row gutter="20"> |
| 9 | <el-col :lg="16" class="left"> | 9 | <el-col :lg="16" class="left"> |
| 10 | <div class="info"> | 10 | <div class="info"> |
| 11 | <div class="name">{{ order.activityName }}</div> | 11 | <div class="name">{{ TickForm.name }}</div> |
| 12 | <div class="address">{{ order.placeName }}</div> | 12 | <div class="address">{{ TickForm.address }}</div> |
| 13 | </div> | 13 | </div> |
| 14 | 14 | ||
| 15 | <div class="ticket_info mb20"> | 15 | <div class="ticket_info mb20"> |
| ... | @@ -135,7 +135,13 @@ | ... | @@ -135,7 +135,13 @@ |
| 135 | 135 | ||
| 136 | <script setup> | 136 | <script setup> |
| 137 | import {ref} from 'vue' | 137 | import {ref} from 'vue' |
| 138 | import {customerListApi, getTicketTotalApi, submitOrderTicket, listApi} from '@/apiPc/booking' | 138 | import { |
| 139 | customerListApi, | ||
| 140 | getTicketTotalApi, | ||
| 141 | submitOrderTicket, | ||
| 142 | listApi, | ||
| 143 | getTicketListApi, getTicketInfoByActivityId, | ||
| 144 | } from '@/apiPc/booking' | ||
| 139 | import {ElMessage} from "element-plus"; | 145 | import {ElMessage} from "element-plus"; |
| 140 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; | 146 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; |
| 141 | import useUserStore from "/@/store/modules/user"; | 147 | import useUserStore from "/@/store/modules/user"; |
| ... | @@ -171,6 +177,7 @@ const price = ref({ | ... | @@ -171,6 +177,7 @@ const price = ref({ |
| 171 | total_cn: 0 | 177 | total_cn: 0 |
| 172 | }) | 178 | }) |
| 173 | const tickType = ref({}) | 179 | const tickType = ref({}) |
| 180 | const matchType = ref({}) | ||
| 174 | const rules = ref({ | 181 | const rules = ref({ |
| 175 | contacts: [ | 182 | contacts: [ |
| 176 | { | 183 | { |
| ... | @@ -195,6 +202,7 @@ const rules = ref({ | ... | @@ -195,6 +202,7 @@ const rules = ref({ |
| 195 | ], | 202 | ], |
| 196 | }) | 203 | }) |
| 197 | const formRef = ref(null) | 204 | const formRef = ref(null) |
| 205 | const TickForm = ref({}) | ||
| 198 | let timer = null; | 206 | let timer = null; |
| 199 | 207 | ||
| 200 | 208 | ||
| ... | @@ -319,19 +327,27 @@ async function getTicketTotal() { | ... | @@ -319,19 +327,27 @@ async function getTicketTotal() { |
| 319 | const res = await getTicketTotalApi(orderForm.value) | 327 | const res = await getTicketTotalApi(orderForm.value) |
| 320 | price.value = res.data | 328 | price.value = res.data |
| 321 | orderForm.value.total = language == 0 ? price.value.total_cn : price.value.total_en | 329 | orderForm.value.total = language == 0 ? price.value.total_cn : price.value.total_en |
| 322 | console.log(orderForm.value) | ||
| 323 | } | 330 | } |
| 324 | 331 | ||
| 325 | // 获取票档信息 | 332 | // 获取票档信息 |
| 326 | async function getTicketListType() { | 333 | async function getTicketListType() { |
| 327 | const res = await listApi({latId: orderForm.value.latId}) | 334 | const res = await listApi({latId: orderForm.value.latId}) |
| 328 | tickType.value = res.rows.find(item => item.id == orderForm.value.attId) | 335 | tickType.value = res.rows.find(item => item.id == orderForm.value.attId) |
| 329 | orderForm.value.ticketDate = tickType.value.name | 336 | orderForm.value.ticketDate = JSON.stringify(tickType.value) |
| 330 | orderForm.value.ticketType = tickType.value.ticketType | ||
| 331 | } | 337 | } |
| 332 | 338 | ||
| 333 | getTicketListType() | 339 | getTicketListType() |
| 334 | 340 | ||
| 341 | // 票档信息 | ||
| 342 | async function getTicketList() { | ||
| 343 | const res = await getTicketListApi({activityId: route.params.activeId}) | ||
| 344 | matchType.value = res.rows.find(item => item.id == orderForm.value.atId) | ||
| 345 | orderForm.value.ticketType = JSON.stringify(matchType.value) | ||
| 346 | |||
| 347 | } | ||
| 348 | |||
| 349 | getTicketList() | ||
| 350 | |||
| 335 | // 提交 | 351 | // 提交 |
| 336 | async function paymentHandle() { | 352 | async function paymentHandle() { |
| 337 | await formRef.value.validate() | 353 | await formRef.value.validate() |
| ... | @@ -341,6 +357,12 @@ async function paymentHandle() { | ... | @@ -341,6 +357,12 @@ async function paymentHandle() { |
| 341 | } | 357 | } |
| 342 | } | 358 | } |
| 343 | 359 | ||
| 360 | async function getDetail() { | ||
| 361 | const res = await getTicketInfoByActivityId({activityId: orderForm.value.activeId}) | ||
| 362 | TickForm.value = res.data | ||
| 363 | } | ||
| 364 | |||
| 365 | getDetail() | ||
| 344 | </script> | 366 | </script> |
| 345 | 367 | ||
| 346 | 368 | ... | ... |
| ... | @@ -19,6 +19,8 @@ | ... | @@ -19,6 +19,8 @@ |
| 19 | <label v-if="b.orderType == 3" class="orangeTag"> {{ language == 0 ? '化妆' : 'MakeUp' }} </label> | 19 | <label v-if="b.orderType == 3" class="orangeTag"> {{ language == 0 ? '化妆' : 'MakeUp' }} </label> |
| 20 | <label v-if="b.orderType == 4" class="orangeTag"> {{ language == 0 ? '拍摄' : 'Shooting ' }} </label> | 20 | <label v-if="b.orderType == 4" class="orangeTag"> {{ language == 0 ? '拍摄' : 'Shooting ' }} </label> |
| 21 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> | 21 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> |
| 22 | <label v-if="b.orderType == 5" class="orangeTag"> {{ language == 0 ? '票务' : 'TICKETING ' }} </label> | ||
| 23 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> | ||
| 22 | </div> | 24 | </div> |
| 23 | 25 | ||
| 24 | <div class="status-po"> | 26 | <div class="status-po"> |
| ... | @@ -76,6 +78,16 @@ | ... | @@ -76,6 +78,16 @@ |
| 76 | }} | 78 | }} |
| 77 | </p> | 79 | </p> |
| 78 | </div> | 80 | </div> |
| 81 | |||
| 82 | <div v-if="b.orderType==5"> | ||
| 83 | <h3 class="name">{{ b.name }}</h3> | ||
| 84 | <p> | ||
| 85 | <!-- {{--> | ||
| 86 | <!-- dayjs(b.deliveryTime).format('YYYY-MM-DD') + ' ' + b.extJsonObj.timePeriod?.split('-')[0] + '-' + dayjs(b.deliveryTime).format('YYYY-MM-DD') + ' ' + b.extJsonObj.timePeriod?.split('-')[1]--> | ||
| 87 | <!-- }}--> | ||
| 88 | {{ b.extJsonObj.ticketDate.name }} | ||
| 89 | </p> | ||
| 90 | </div> | ||
| 79 | </el-col> | 91 | </el-col> |
| 80 | <el-col :lg="6" :md="12" :sm="12" :xs="24"> | 92 | <el-col :lg="6" :md="12" :sm="12" :xs="24"> |
| 81 | <div v-if="b.orderType == 0"> | 93 | <div v-if="b.orderType == 0"> |
| ... | @@ -89,6 +101,9 @@ | ... | @@ -89,6 +101,9 @@ |
| 89 | <div v-if="b.orderType == 3||b.orderType == 4"> | 101 | <div v-if="b.orderType == 3||b.orderType == 4"> |
| 90 | <p>{{ b.extJsonObj.packageName }}</p> | 102 | <p>{{ b.extJsonObj.packageName }}</p> |
| 91 | </div> | 103 | </div> |
| 104 | <div v-if="b.orderType == 5"> | ||
| 105 | <p>{{ b.extJsonObj.packageName }}</p> | ||
| 106 | </div> | ||
| 92 | </el-col> | 107 | </el-col> |
| 93 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | 108 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> |
| 94 | <span class="text-warning"> {{ language == 0 ? '¥' : '€' }} | 109 | <span class="text-warning"> {{ language == 0 ? '¥' : '€' }} |
| ... | @@ -97,9 +112,12 @@ | ... | @@ -97,9 +112,12 @@ |
| 97 | </el-col> | 112 | </el-col> |
| 98 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | 113 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> |
| 99 | <div class="text-right mb20 text-danger"> | 114 | <div class="text-right mb20 text-danger"> |
| 100 | <el-countdown v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" | 115 | <el-countdown |
| 101 | :value="b.countdown" format="mm:ss" | 116 | v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" |
| 102 | value-style="color:#E60012;font-size:16px;" @finish="finish(b)"/> | 117 | :value="b.countdown" |
| 118 | format="mm:ss" | ||
| 119 | value-style="color:#E60012;font-size:16px;" | ||
| 120 | @finish="finish(b)"/> | ||
| 103 | </div> | 121 | </div> |
| 104 | 122 | ||
| 105 | <div class="text-right"> | 123 | <div class="text-right"> |
| ... | @@ -160,9 +178,17 @@ function finish(bill) { | ... | @@ -160,9 +178,17 @@ function finish(bill) { |
| 160 | function getList() { | 178 | function getList() { |
| 161 | newbilllist({createById: user.userId}).then(res => { | 179 | newbilllist({createById: user.userId}).then(res => { |
| 162 | list.value = res.rows || [] | 180 | list.value = res.rows || [] |
| 163 | for (var b of list.value) { | 181 | for (let b of list.value) { |
| 164 | b.messageObj = JSON.parse(b.message) || {} | 182 | b.messageObj = JSON.parse(b.message) || {} |
| 165 | b.extJsonObj = JSON.parse(b.extJson) || {} | 183 | b.extJsonObj = JSON.parse(b.extJson) || {} |
| 184 | if (b.orderType == 5) { | ||
| 185 | try { | ||
| 186 | b.extJsonObj.ticketDate = b.extJsonObj.ticketDate ? JSON.parse(b.extJsonObj.ticketDate) : {} | ||
| 187 | b.extJsonObj.ticketType = b.extJsonObj.ticketType ? JSON.parse(b.extJsonObj.ticketType) : {} | ||
| 188 | } catch (e) { | ||
| 189 | console.log(e) | ||
| 190 | } | ||
| 191 | } | ||
| 166 | if (b.surplus && b.status == '0' && (b.surplus != '0,0' && b.surplus != '0')) { | 192 | if (b.surplus && b.status == '0' && (b.surplus != '0,0' && b.surplus != '0')) { |
| 167 | b.countdown = Date.now() + Number((b.surplus.split(',')[0] * 60 + b.surplus.split(',')[1]) * 10) | 193 | b.countdown = Date.now() + Number((b.surplus.split(',')[0] * 60 + b.surplus.split(',')[1]) * 10) |
| 168 | } | 194 | } | ... | ... |
-
Please register or sign in to post a comment