Merge remote-tracking branch 'origin/dev' into dev
Showing
7 changed files
with
343 additions
and
372 deletions
| ... | @@ -511,6 +511,22 @@ export function getTicketInfoByActivityId(params) { | ... | @@ -511,6 +511,22 @@ export function getTicketInfoByActivityId(params) { |
| 511 | }) | 511 | }) |
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | export function getActivityTypeVoById(params) { | ||
| 515 | return request({ | ||
| 516 | url: `/ota/activityType/getActivityTypeVoById`, | ||
| 517 | method: 'get', | ||
| 518 | params | ||
| 519 | }) | ||
| 520 | } | ||
| 521 | |||
| 522 | export function getListByAtstId(params) { | ||
| 523 | return request({ | ||
| 524 | url: `/ota/activitySeat/getListByAtstId`, | ||
| 525 | method: 'get', | ||
| 526 | params | ||
| 527 | }) | ||
| 528 | } | ||
| 529 | |||
| 514 | // 根据赛事ID获取票档 | 530 | // 根据赛事ID获取票档 |
| 515 | export function getTicketListApi(params) { | 531 | export function getTicketListApi(params) { |
| 516 | return request({ | 532 | return request({ |
| ... | @@ -538,6 +554,22 @@ export function listApi(params) { | ... | @@ -538,6 +554,22 @@ export function listApi(params) { |
| 538 | }) | 554 | }) |
| 539 | } | 555 | } |
| 540 | 556 | ||
| 557 | export function getStadiumList(params) { | ||
| 558 | return request({ | ||
| 559 | url: `/ota/activityStadium/getStadiumList`, | ||
| 560 | method: 'get', | ||
| 561 | params | ||
| 562 | }) | ||
| 563 | } | ||
| 564 | |||
| 565 | export function getActivityTypeVoListByLatsId(params) { | ||
| 566 | return request({ | ||
| 567 | url: `/ota/activityType/getActivityTypeVoListByLatsId`, | ||
| 568 | method: 'get', | ||
| 569 | params | ||
| 570 | }) | ||
| 571 | } | ||
| 572 | |||
| 541 | // 获取当前用户的观影人列表 | 573 | // 获取当前用户的观影人列表 |
| 542 | export function customerListApi(params) { | 574 | export function customerListApi(params) { |
| 543 | return request({ | 575 | return request({ | ... | ... |
| ... | @@ -362,7 +362,7 @@ export const constantRoutes = [ | ... | @@ -362,7 +362,7 @@ export const constantRoutes = [ |
| 362 | meta: { title: 'Ticket Booking' } | 362 | meta: { title: 'Ticket Booking' } |
| 363 | }, | 363 | }, |
| 364 | { | 364 | { |
| 365 | path: 'ticket/:activeId/:latId/:attId', | 365 | path: 'ticket/:activeId/:latstId', |
| 366 | component: () => import('@/viewsPc/booking/ticket/confirmOrder.vue'), | 366 | component: () => import('@/viewsPc/booking/ticket/confirmOrder.vue'), |
| 367 | name: 'confirmOrder', | 367 | name: 'confirmOrder', |
| 368 | meta: { title: 'confirmOrder' } | 368 | meta: { title: 'confirmOrder' } | ... | ... |
| ... | @@ -124,42 +124,12 @@ | ... | @@ -124,42 +124,12 @@ |
| 124 | {{ matchForm.address }} | 124 | {{ matchForm.address }} |
| 125 | </el-col> | 125 | </el-col> |
| 126 | <el-col> | 126 | <el-col> |
| 127 | {{ | 127 | {{ form?.extJson?.atName }} |
| 128 | form?.extJson?.ticketType?.name | 128 | {{ form?.extJson?.atsName }} |
| 129 | }}:{{ form?.extJson?.num }}{{ language == 0 ? '张' : 'Tickets' }} | 129 | {{ form?.extJson?.sessionType=='1000'?'日间场':'夜间场' }} |
| 130 | {{ form?.extJson?.ticketName }} | ||
| 131 | {{ form?.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 130 | </el-col> | 132 | </el-col> |
| 131 | <el-col> | ||
| 132 | {{ | ||
| 133 | language == 0 ? '时间' : 'Time' | ||
| 134 | }}:{{ | ||
| 135 | dayjs(form?.extJson?.ticketDate?.ticketStart).format('YYYY-MM-DD') | ||
| 136 | }}{{ | ||
| 137 | form.extJson?.ticketDate?.ticketType == 1 ? '~' + dayjs(form?.extJson?.ticketDate?.ticketEnd).format('YYYY-MM-DD') : '' | ||
| 138 | }} | ||
| 139 | </el-col> | ||
| 140 | <el-col v-if="form?.extJson?.ticketDate?.isCountSale==1"> | ||
| 141 | {{ | ||
| 142 | language == 0 ? `满${form?.extJson?.ticketDate.counts}人优惠` : `Discount for up to ${form?.extJson?.ticketDate.counts} people` | ||
| 143 | }}<span v-if="language == 0">{{ form?.extJson?.ticketDate.discount }}折</span> | ||
| 144 | <span v-else>{{ (10 - form?.extJson?.ticketDate.discount) * 10 + '%' }}off</span> | ||
| 145 | </el-col> | ||
| 146 | <!-- <el-col>--> | ||
| 147 | <!-- {{--> | ||
| 148 | <!-- language == 0 ? '原价票' : 'Cost Ticket'--> | ||
| 149 | <!-- }}:{{--> | ||
| 150 | <!-- language == 0 ? form?.extJson?.ticketDate?.price : form?.extJson?.ticketDate?.priceEn--> | ||
| 151 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 152 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 153 | <!-- </el-col>--> | ||
| 154 | <!-- <el-col>--> | ||
| 155 | <!-- {{--> | ||
| 156 | <!-- language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 157 | <!-- }}:{{--> | ||
| 158 | <!-- language == 0 ? form?.extJson?.ticketDate?.rebatePrice : form?.extJson?.ticketDate?.rebatePriceEn--> | ||
| 159 | <!-- }}{{ language == 0 ? '元' : 'Euro' }} x 1--> | ||
| 160 | <!-- {{ language == 0 ? '张' : 'Tickets' }}--> | ||
| 161 | <!-- </el-col>--> | ||
| 162 | |||
| 163 | </el-row> | 133 | </el-row> |
| 164 | </div> | 134 | </div> |
| 165 | </div> | 135 | </div> |
| ... | @@ -295,50 +265,36 @@ | ... | @@ -295,50 +265,36 @@ |
| 295 | <el-col :span="24">{{ language == 0 ? '备注' : 'Remarks' }}:{{ form.remarks }}</el-col> | 265 | <el-col :span="24">{{ language == 0 ? '备注' : 'Remarks' }}:{{ form.remarks }}</el-col> |
| 296 | </el-row> | 266 | </el-row> |
| 297 | <el-row v-if="type == 'ticket'" style="width: 100%"> | 267 | <el-row v-if="type == 'ticket'" style="width: 100%"> |
| 298 | <el-row v-for="v in form.extJson?.message" style="width: 100%"> | 268 | <el-row v-for="(v,i) in form.extJson?.orderCustomerList" :key="i" style="width: 100%"> |
| 299 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 269 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 300 | <div>{{ v.name }} | 270 | <div>{{ v.name }} |
| 301 | </div> | 271 | </div> |
| 302 | </el-col> | 272 | </el-col> |
| 303 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 273 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 304 | <!-- <div>{{--> | ||
| 305 | <!-- !v.discount ? language == 0 ? '原价票' : 'Cost Ticket' : language == 0 ? '优惠票' : 'Concession Ticket'--> | ||
| 306 | <!-- }}--> | ||
| 307 | <!-- </div>--> | ||
| 308 | <div>{{ v.idCard }} | 274 | <div>{{ v.idCard }} |
| 309 | </div> | 275 | </div> |
| 310 | </el-col> | 276 | </el-col> |
| 311 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 277 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 312 | <div v-if="language == 0 "> | 278 | <div v-if="language == 0 "> |
| 313 | {{ language == 0 ? '¥' : '€' }} | 279 | ¥ {{ form.price }} /张 |
| 314 | {{ | ||
| 315 | !v.discount ? form.extJson?.ticketDate?.price : form.extJson?.ticketDate?.rebatePrice | ||
| 316 | }} | ||
| 317 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 318 | </div> | 280 | </div> |
| 319 | <div v-else> | 281 | <div v-else> |
| 320 | {{ language == 0 ? '¥' : '€' }} | 282 | € {{ form.priceEn }} /Tickets |
| 321 | {{ | ||
| 322 | !v.discount ? form.extJson?.ticketDate?.priceEn : form.extJson?.ticketDate?.rebatePriceEn | ||
| 323 | }} | ||
| 324 | /{{ language == 0 ? '张' : 'Tickets' }} | ||
| 325 | </div> | 283 | </div> |
| 326 | </el-col> | 284 | </el-col> |
| 327 | </el-row> | 285 | </el-row> |
| 328 | <el-row style="width: 100%"> | 286 | <el-row style="width: 100%"> |
| 329 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 287 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 330 | <div>{{ | 288 | <div> |
| 331 | language == 0 ? '购票数量' : 'Number of tickets purchased' | 289 | {{ language == 0 ? '购票数量' : 'Number of tickets purchased' }}:{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }} |
| 332 | }}:{{ form.num }}{{ language == 0 ? '张' : 'Tickets' }} | ||
| 333 | </div> | 290 | </div> |
| 334 | </el-col> | 291 | </el-col> |
| 335 | <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ | 292 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 336 | language == 0 ? '联系方式' : 'Contact Information' | 293 | {{ language == 0 ? '联系方式' : 'Contact Information' }}:{{ form.phone }} |
| 337 | }}:{{ form.phone }} | ||
| 338 | </el-col> | 294 | </el-col> |
| 339 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> | 295 | <el-col :lg="8" :md="12" :sm="12" :xs="24"> |
| 340 | {{ language == 0 ? '共计' : 'total' }}:{{ | 296 | {{ form.paymentType == '1' ? '共计' : 'total' }}:{{ |
| 341 | language == 0 ? '¥' : '€' | 297 | form.paymentType == '1' ? '¥' : '€' |
| 342 | }}{{ Number(totalFee).toFixed(2) }} | 298 | }}{{ Number(totalFee).toFixed(2) }} |
| 343 | </el-col> | 299 | </el-col> |
| 344 | </el-row> | 300 | </el-row> |
| ... | @@ -407,31 +363,7 @@ | ... | @@ -407,31 +363,7 @@ |
| 407 | </div> | 363 | </div> |
| 408 | </el-col> | 364 | </el-col> |
| 409 | <el-col :lg="24"> | 365 | <el-col :lg="24"> |
| 410 | <div class="text-center"> | 366 | <div class="text-center" /> |
| 411 | <!-- <el-button--> | ||
| 412 | <!-- v-if="(form.viewStatus=='1'||form.viewStatus=='5')&&type == 'hotel'" class="mt20 btn-lineG"--> | ||
| 413 | <!-- round--> | ||
| 414 | <!-- size="large" type="primary"--> | ||
| 415 | <!-- @click="exportPdf"--> | ||
| 416 | <!-- >--> | ||
| 417 | <!-- <el-icon>--> | ||
| 418 | <!-- <Upload />--> | ||
| 419 | <!-- </el-icon>--> | ||
| 420 | <!-- {{ language == 0 ? '导出酒店预订单' : 'Export PDF' }}--> | ||
| 421 | <!-- </el-button>--> | ||
| 422 | <!-- <el-button--> | ||
| 423 | <!-- v-if="(form.viewStatus=='1'||form.viewStatus=='5')&&(type=='makeUp'||type=='hotel'||type=='ticket')"--> | ||
| 424 | <!-- class="mt20 btn-lineG" round--> | ||
| 425 | <!-- size="large"--> | ||
| 426 | <!-- type="primary"--> | ||
| 427 | <!-- @click="downInvoice"--> | ||
| 428 | <!-- >--> | ||
| 429 | <!-- <el-icon>--> | ||
| 430 | <!-- <Download />--> | ||
| 431 | <!-- </el-icon>--> | ||
| 432 | <!-- {{ language == 0 ? '下载收据' : 'DownLoad Invoice' }}--> | ||
| 433 | <!-- </el-button>--> | ||
| 434 | </div> | ||
| 435 | </el-col> | 367 | </el-col> |
| 436 | </el-row> | 368 | </el-row> |
| 437 | </div> | 369 | </div> |
| ... | @@ -764,11 +696,8 @@ async function getTicketOrderInfoFN() { | ... | @@ -764,11 +696,8 @@ async function getTicketOrderInfoFN() { |
| 764 | form.value = res.data | 696 | form.value = res.data |
| 765 | form.value.extJson = JSON.parse(form.value.extJson) | 697 | form.value.extJson = JSON.parse(form.value.extJson) |
| 766 | try { | 698 | try { |
| 767 | form.value.extJson.ticketDate = JSON.parse(form.value.extJson.ticketDate) | 699 | await getDetail(form.value.activeId) |
| 768 | form.value.extJson.ticketType = JSON.parse(form.value.extJson.ticketType) | 700 | matchId.value = form.value.activeId |
| 769 | form.value.extJson.message = JSON.parse(form.value.extJson.message) | ||
| 770 | await getDetail(form.value.extJson.ticketDate.activityId) | ||
| 771 | matchId.value = form.value.extJson.ticketDate.activityId | ||
| 772 | 701 | ||
| 773 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn | 702 | totalFee.value = language.value == 0 ? form.value.total : form.value.totalEn |
| 774 | } catch (e) { | 703 | } catch (e) { |
| ... | @@ -776,7 +705,6 @@ async function getTicketOrderInfoFN() { | ... | @@ -776,7 +705,6 @@ async function getTicketOrderInfoFN() { |
| 776 | } finally { | 705 | } finally { |
| 777 | 706 | ||
| 778 | } | 707 | } |
| 779 | console.log(form.value) | ||
| 780 | } | 708 | } |
| 781 | 709 | ||
| 782 | async function getDetail(activeId) { | 710 | async function getDetail(activeId) { | ... | ... |
| ... | @@ -12,9 +12,18 @@ | ... | @@ -12,9 +12,18 @@ |
| 12 | <div class="address">{{ TickForm.address }}</div> | 12 | <div class="address">{{ TickForm.address }}</div> |
| 13 | </div> | 13 | </div> |
| 14 | 14 | ||
| 15 | <div class="info"> | ||
| 16 | <div class="name">{{ TickForm2.ticketTypeName }}</div> | ||
| 17 | <div class="address">{{ TickForm2.stadiumName }}</div> | ||
| 18 | <div class="address">{{ TickForm2.sessionType=='1000'?'日间场':'夜间场' }}</div> | ||
| 19 | <div class="address">{{ TickForm2.ticketName }}</div> | ||
| 20 | |||
| 21 | <div class="address">剩余数量: {{ (TickForm2.limitCount||0)-(TickForm3.counts||0) }}</div> | ||
| 22 | </div> | ||
| 23 | |||
| 15 | <div class="ticket_info mb20"> | 24 | <div class="ticket_info mb20"> |
| 16 | <div class="tit_box"> | 25 | <div class="tit_box"> |
| 17 | <div class="line"></div> | 26 | <div class="line" /> |
| 18 | <div class="txt"> | 27 | <div class="txt"> |
| 19 | {{ languageFormat(language, "订票信息", "Ticket Info") }} | 28 | {{ languageFormat(language, "订票信息", "Ticket Info") }} |
| 20 | </div> | 29 | </div> |
| ... | @@ -22,17 +31,17 @@ | ... | @@ -22,17 +31,17 @@ |
| 22 | 31 | ||
| 23 | <div class="form"> | 32 | <div class="form"> |
| 24 | <el-form ref="formRef" :model="orderForm" :rules="rules" label-width="120px"> | 33 | <el-form ref="formRef" :model="orderForm" :rules="rules" label-width="120px"> |
| 25 | <!-- <el-form-item--> | ||
| 26 | <!-- :label="language == 0 ? '联系人' : 'contact'" prop="contacts"--> | ||
| 27 | <!-- >--> | ||
| 28 | <!-- <el-input--> | ||
| 29 | <!-- v-model="orderForm.contacts"--> | ||
| 30 | <!-- :placeholder=" language == 0 ? '请输入联系人' : 'Please enter the contact'"--> | ||
| 31 | <!-- style="width: 320px"--> | ||
| 32 | <!-- />--> | ||
| 33 | <!-- </el-form-item>--> | ||
| 34 | <el-form-item | 34 | <el-form-item |
| 35 | :label="language == 0 ? '联系人电话' : 'contact phone'" prop="phone" | 35 | :label="language == 0 ? '联系人' : 'contact person'" prop="contacts" |
| 36 | > | ||
| 37 | <el-input | ||
| 38 | v-model="orderForm.contacts" | ||
| 39 | :placeholder=" language == 0 ? '请输入联系人' : 'Please enter the contact person'" | ||
| 40 | style="width: 320px" | ||
| 41 | /> | ||
| 42 | </el-form-item> | ||
| 43 | <el-form-item | ||
| 44 | :label="language == 0 ? '联系电话' : 'contact phone'" prop="phone" | ||
| 36 | > | 45 | > |
| 37 | <el-input | 46 | <el-input |
| 38 | v-model="orderForm.phone" | 47 | v-model="orderForm.phone" |
| ... | @@ -40,23 +49,24 @@ | ... | @@ -40,23 +49,24 @@ |
| 40 | style="width: 320px" | 49 | style="width: 320px" |
| 41 | /> | 50 | /> |
| 42 | </el-form-item> | 51 | </el-form-item> |
| 43 | <el-form-item :label="language == 0 ? '观看人' : 'Viewer'" prop="message"> | 52 | <el-form-item :label="language == 0 ? '观看人' : 'Viewer'" prop="customerIds"> |
| 44 | <div class="p_box"> | 53 | <div class="p_box"> |
| 45 | <div class="people"> | 54 | <div class="people"> |
| 46 | <el-checkbox-group v-model="orderForm.message" @change="changeGroup"> | 55 | <el-checkbox-group v-model="orderForm.customerIds" @change="changeGroup"> |
| 47 | <div | 56 | <div |
| 48 | v-for="(it, index) in personnelList" :key="index" class="prople_item"> | 57 | v-for="(it, index) in personnelList" :key="index" class="prople_item" |
| 58 | > | ||
| 49 | <div> | 59 | <div> |
| 50 | <div class="name">{{ it.name }} | 60 | <div class="name">{{ it.name }} |
| 51 | <span v-if="it.discount" class="tag_t p-right">{{ | 61 | <!-- <span v-if="it.discount" class="tag_t p-right">{{--> |
| 52 | language == 0 ? '优惠' : 'Discounts' | 62 | <!-- language == 0 ? '优惠' : 'Discounts'--> |
| 53 | }}</span> | 63 | <!-- }}</span>--> |
| 54 | </div> | 64 | </div> |
| 55 | <div class="idcard">{{ it.idCard }}</div> | 65 | <div class="idcard">{{ it.idCard }}</div> |
| 56 | </div> | 66 | </div> |
| 57 | <el-checkbox | 67 | <el-checkbox |
| 58 | :disabled="!it.pay ||(orderForm.message.length==5&&!orderForm.message.some(v=>v.id==it.id))" | 68 | :value="it.id" |
| 59 | :value="it"/> | 69 | /> |
| 60 | </div> | 70 | </div> |
| 61 | </el-checkbox-group> | 71 | </el-checkbox-group> |
| 62 | </div> | 72 | </div> |
| ... | @@ -72,7 +82,7 @@ | ... | @@ -72,7 +82,7 @@ |
| 72 | 82 | ||
| 73 | <el-col :lg="8" class="right"> | 83 | <el-col :lg="8" class="right"> |
| 74 | <div class="tit_box"> | 84 | <div class="tit_box"> |
| 75 | <div class="line"></div> | 85 | <div class="line" /> |
| 76 | <div class="txt"> | 86 | <div class="txt"> |
| 77 | {{ languageFormat(language, "订单明细", "Order summary") }} | 87 | {{ languageFormat(language, "订单明细", "Order summary") }} |
| 78 | </div> | 88 | </div> |
| ... | @@ -81,44 +91,15 @@ | ... | @@ -81,44 +91,15 @@ |
| 81 | <div class="detail"> | 91 | <div class="detail"> |
| 82 | <div class="detail_top"> | 92 | <div class="detail_top"> |
| 83 | <div class="time"> | 93 | <div class="time"> |
| 84 | {{ tickType.name }} | 94 | {{ language == 0 ? '票价' : 'Cost Ticket' }} |
| 85 | <span v-if="tickType.ticketType == 1" class="tag_t"> | ||
| 86 | {{ languageFormat(language, "套票", "Package ticket") }} | ||
| 87 | </span> | ||
| 88 | </div> | ||
| 89 | <p>{{ | ||
| 90 | language == 0 ? '原价票' : 'Cost Ticket' | ||
| 91 | }}</p> | ||
| 92 | <div class="ticket detail_top"> | ||
| 93 | {{ language == 0 ? tickType.price : tickType.priceEn }} | ||
| 94 | <span> {{ language == 0 ? '元' : 'Euro' }}</span> | ||
| 95 | {{ languageFormat(language, "票档", "Ticket file") }} | ||
| 96 | x {{ customerArr_q.length }} | ||
| 97 | {{ languageFormat(language, "张", "tickets") }} | ||
| 98 | </div> | 95 | </div> |
| 99 | <p>{{ language == 0 ? '优惠票' : 'Concession Ticket' }}</p> | 96 | <p /> |
| 100 | <div class="ticket"> | 97 | <div class="ticket"> |
| 101 | {{ language == 0 ? tickType.rebatePrice : tickType.rebatePriceEn }} | 98 | {{ language == 0 ? TickForm2.price : TickForm2.priceEn }} |
| 102 | <span> {{ language == 0 ? '元' : 'Euro' }}</span> | 99 | <span> {{ language == 0 ? '元' : 'Euro' }}</span> |
| 103 | {{ languageFormat(language, "票档", "Ticket file") }} | 100 | x {{ orderForm.customerIds.length }} |
| 104 | x {{ customerArr_b.length }} | ||
| 105 | {{ languageFormat(language, "张", "tickets") }} | 101 | {{ languageFormat(language, "张", "tickets") }} |
| 106 | </div> | 102 | </div> |
| 107 | <div v-if="tickType.isCountSale == 1" style="border-top: 1px solid #dcdfe6;margin-top: 20px"> | ||
| 108 | <p>{{ | ||
| 109 | language == 0 ? `满${tickType.counts}人优惠` : `Discount for up to ${tickType.counts} people` | ||
| 110 | }}</p> | ||
| 111 | <div class="ticket"> | ||
| 112 | <div v-if="language==0" style="color: orange;font-weight: 600"> | ||
| 113 | {{ tickType.discount }}折 | ||
| 114 | </div> | ||
| 115 | <div v-else style="color: orange;font-weight: 600"> | ||
| 116 | {{ (10 - tickType.discount) * 10 + '%' }}off | ||
| 117 | </div> | ||
| 118 | </div> | ||
| 119 | </div> | ||
| 120 | |||
| 121 | |||
| 122 | </div> | 103 | </div> |
| 123 | <div class="detail_b"> | 104 | <div class="detail_b"> |
| 124 | <div class="sum_txt"> | 105 | <div class="sum_txt"> |
| ... | @@ -126,16 +107,7 @@ | ... | @@ -126,16 +107,7 @@ |
| 126 | </div> | 107 | </div> |
| 127 | <div class="price_num"> | 108 | <div class="price_num"> |
| 128 | <span>{{ language == 0 ? "¥" : "€" }}</span> | 109 | <span>{{ language == 0 ? "¥" : "€" }}</span> |
| 129 | {{ | 110 | {{ ((language == 0 ?TickForm2.price:TickForm2.priceEn) * orderForm.customerIds.length).toFixed(2) }} |
| 130 | language == 0 ? (price.total_cn * 1).toFixed(2) : (price.total_en * 1).toFixed(2) | ||
| 131 | }} | ||
| 132 | |||
| 133 | <span v-if="tickType.isCountSale==1&&orderForm.message.length>=tickType.counts" class="total"> | ||
| 134 | {{ language == 0 ? "¥" : "€" }} | ||
| 135 | {{ | ||
| 136 | language == 0 ? (price.total_cnY * 1).toFixed(2) : (price.total_enY * 1).toFixed(2) | ||
| 137 | }} | ||
| 138 | </span> | ||
| 139 | </div> | 111 | </div> |
| 140 | </div> | 112 | </div> |
| 141 | </div> | 113 | </div> |
| ... | @@ -149,7 +121,7 @@ | ... | @@ -149,7 +121,7 @@ |
| 149 | </span> | 121 | </span> |
| 150 | <span class="value"> | 122 | <span class="value"> |
| 151 | <span>{{ language == 0 ? "¥" : "€" }}</span> | 123 | <span>{{ language == 0 ? "¥" : "€" }}</span> |
| 152 | {{ language == 0 ? (price.total_cn * 1).toFixed(2) : (price.total_en * 1).toFixed(2) }} | 124 | {{ ((language == 0 ?TickForm2.price:TickForm2.priceEn) * orderForm.customerIds.length).toFixed(2) }} |
| 153 | </span> | 125 | </span> |
| 154 | </div> | 126 | </div> |
| 155 | <div class="pay" @click="paymentHandle"> | 127 | <div class="pay" @click="paymentHandle"> |
| ... | @@ -163,124 +135,82 @@ | ... | @@ -163,124 +135,82 @@ |
| 163 | </template> | 135 | </template> |
| 164 | 136 | ||
| 165 | <script setup> | 137 | <script setup> |
| 166 | import {ref, computed} from 'vue' | 138 | import { ref, computed, onMounted } from 'vue' |
| 167 | import { | 139 | import { |
| 168 | customerListApi, | 140 | customerListApi, |
| 169 | getTicketTotalApi, | ||
| 170 | submitOrderTicket, | 141 | submitOrderTicket, |
| 171 | listApi, | 142 | getTicketInfoByActivityId, |
| 172 | getTicketListApi, getTicketInfoByActivityId, | 143 | getActivityTypeVoById, |
| 144 | getListByAtstId | ||
| 173 | } from '@/apiPc/booking' | 145 | } from '@/apiPc/booking' |
| 174 | import {ElMessage, ElMessageBox} from "element-plus"; | 146 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 175 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; | 147 | import { languageFormat } from '@/viewsPc/seat/utils/language.js' |
| 176 | import useUserStore from "/@/store/modules/user"; | 148 | import useUserStore from '/@/store/modules/user' |
| 177 | import {useStorage} from "@vueuse/core/index"; | 149 | import { useStorage } from '@vueuse/core/index' |
| 150 | import _ from 'lodash' | ||
| 151 | import { useRoute, useRouter } from 'vue-router' | ||
| 178 | 152 | ||
| 179 | const useStore = useUserStore() | 153 | const useStore = useUserStore() |
| 180 | 154 | ||
| 181 | const user = computed(() => useUserStore().user) | 155 | const user = computed(() => useUserStore().user) |
| 182 | const language = useStorage('language', 0) | 156 | const language = useStorage('language', 0) |
| 183 | console.log(language) | 157 | |
| 184 | const loading = ref(false); | 158 | const loading = ref(false) |
| 185 | const route = useRoute(); | 159 | const route = useRoute() |
| 186 | const router = useRouter(); | 160 | const router = useRouter() |
| 187 | const order = ref({ | ||
| 188 | data: {} | ||
| 189 | }) | ||
| 190 | const payment = ref({}) | ||
| 191 | const props = defineProps({ | ||
| 192 | activityId: [String, Number], | ||
| 193 | }); | ||
| 194 | const form = ref({}) | ||
| 195 | const personnelList = ref([]) | 161 | const personnelList = ref([]) |
| 196 | const customerArr_q = ref([])//全票人 | ||
| 197 | const customerArr_b = ref([])//优惠票人 | ||
| 198 | const orderForm = ref({ | 162 | const orderForm = ref({ |
| 199 | activeId: route.params.activeId, | 163 | activeId: route.params.activeId, |
| 200 | atId: route.params.latId, | 164 | customerIds: [] |
| 201 | attId: route.params.attId, | ||
| 202 | ticketDate: null, | ||
| 203 | ticketType: null, | ||
| 204 | phone: null, | ||
| 205 | customerList: [],//人员ids列表 | ||
| 206 | message: [],//完整的人员列表 | ||
| 207 | num: 0, | ||
| 208 | total: null | ||
| 209 | }) | 165 | }) |
| 210 | const price = ref({ | 166 | |
| 211 | total_en: 0, | ||
| 212 | total_cn: 0, | ||
| 213 | total_enY: 0, | ||
| 214 | total_cnY: 0, | ||
| 215 | }) | ||
| 216 | const tickType = ref({}) | ||
| 217 | const matchType = ref({}) | ||
| 218 | const rules = ref({ | 167 | const rules = ref({ |
| 219 | contacts: [ | 168 | contacts: [ |
| 220 | { | 169 | { |
| 221 | required: true, | 170 | required: true, |
| 222 | message: languageFormat(language.value, "请输入联系人", "Please enter the contact person"), | 171 | message: languageFormat(language.value, '请输入联系人', 'Please enter the contact person'), |
| 223 | trigger: "blur" | 172 | trigger: 'blur' |
| 224 | }, | 173 | } |
| 225 | ], | 174 | ], |
| 226 | phone: [ | 175 | phone: [ |
| 227 | { | 176 | { |
| 228 | required: true, | 177 | required: true, |
| 229 | message: languageFormat(language.value, "请输入联系电话", "Please enter the contact phone number"), | 178 | message: languageFormat(language.value, '请输入联系电话', 'Please enter the contact phone number'), |
| 230 | trigger: "blur" | 179 | trigger: 'blur' |
| 231 | }, | 180 | } |
| 232 | ], | 181 | ], |
| 233 | message: [ | 182 | customerIds: [ |
| 234 | { | 183 | { |
| 235 | required: true, | 184 | required: true, |
| 236 | message: languageFormat(language.value, "请选择观众", "Please select the audience"), | 185 | message: languageFormat(language.value, '请选择观看人', 'Please select the audience'), |
| 237 | trigger: "blur" | 186 | trigger: 'change' |
| 238 | }, | 187 | } |
| 239 | ], | 188 | ] |
| 240 | }) | 189 | }) |
| 241 | const formRef = ref(null) | 190 | const formRef = ref(null) |
| 242 | const TickForm = ref({}) | 191 | const TickForm = ref({}) |
| 243 | let timer = null; | 192 | const TickForm2 = ref({}) |
| 193 | const TickForm3 = ref({}) | ||
| 244 | 194 | ||
| 245 | customerList() | 195 | onMounted(() => { |
| 196 | customerList() | ||
| 197 | getDetail() | ||
| 246 | 198 | ||
| 247 | function changeGroup(e) { | 199 | getActivityTypeVoById({ |
| 248 | if (orderForm.value.message.length == 6) { | 200 | id: route.params.latstId |
| 249 | ElMessageBox.confirm(language.value == 0 ? '最多只能选择5个观众' : 'You can only select up to 5 audience members', { | 201 | }).then((res) => { |
| 250 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 202 | TickForm2.value = res.data |
| 251 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 252 | type: 'warning' | ||
| 253 | }) | 203 | }) |
| 254 | } else { | ||
| 255 | orderForm.value.num = orderForm.value.message.length | ||
| 256 | orderForm.value.customerList = orderForm.value.message.map(v => v.id) | ||
| 257 | customerArr_q.value = orderForm.value.message.filter(v => !v.discount) | ||
| 258 | customerArr_b.value = orderForm.value.message.filter(v => v.discount) | ||
| 259 | // 计算价格 | ||
| 260 | price.value = { | ||
| 261 | total_en: 0, | ||
| 262 | total_cn: 0, | ||
| 263 | total_enY: 0, | ||
| 264 | total_cnY: 0, | ||
| 265 | } | ||
| 266 | orderForm.value.message.forEach(v => { | ||
| 267 | if (v.discount) { | ||
| 268 | price.value.total_cnY = price.value.total_cn += (tickType.value.rebatePrice * 1) | ||
| 269 | price.value.total_enY = price.value.total_en += (tickType.value.rebatePriceEn * 1) | ||
| 270 | 204 | ||
| 271 | } else { | 205 | getListByAtstId({ |
| 272 | price.value.total_cnY = price.value.total_cn += (tickType.value.price * 1) | 206 | atstId: route.params.latstId |
| 273 | price.value.total_enY = price.value.total_en += (tickType.value.priceEn * 1) | 207 | }).then(res => { |
| 274 | } | 208 | TickForm3.value = res.data |
| 275 | }) | 209 | }) |
| 210 | }) | ||
| 276 | 211 | ||
| 277 | // 计算购票优惠 | 212 | |
| 278 | if (tickType.value.isCountSale == 1 && orderForm.value.message.length >= tickType.value.counts) { | 213 | function changeGroup(e) { |
| 279 | price.value.total_cn = ((price.value.total_cn * (tickType.value.discount * 10)) / 100).toFixed(2) | ||
| 280 | price.value.total_en = ((price.value.total_en * (tickType.value.discount * 10)) / 100).toFixed(2) | ||
| 281 | } | ||
| 282 | } | ||
| 283 | console.log(orderForm.value.message) | ||
| 284 | 214 | ||
| 285 | } | 215 | } |
| 286 | 216 | ||
| ... | @@ -294,26 +224,6 @@ async function customerList() { | ... | @@ -294,26 +224,6 @@ async function customerList() { |
| 294 | personnelList.value = res.rows | 224 | personnelList.value = res.rows |
| 295 | } | 225 | } |
| 296 | 226 | ||
| 297 | // 获取票档信息 | ||
| 298 | async function getTicketListType() { | ||
| 299 | const res = await listApi({latId: orderForm.value.latId}) | ||
| 300 | tickType.value = res.rows.find(item => item.id == orderForm.value.attId) | ||
| 301 | orderForm.value.ticketDate = JSON.stringify(tickType.value) | ||
| 302 | console.log(tickType.value) | ||
| 303 | |||
| 304 | } | ||
| 305 | |||
| 306 | getTicketListType() | ||
| 307 | |||
| 308 | // 票档信息 | ||
| 309 | async function getTicketList() { | ||
| 310 | const res = await getTicketListApi({activityId: route.params.activeId}) | ||
| 311 | matchType.value = res.rows.find(item => item.id == orderForm.value.atId) | ||
| 312 | orderForm.value.ticketType = JSON.stringify(matchType.value) | ||
| 313 | } | ||
| 314 | |||
| 315 | getTicketList() | ||
| 316 | |||
| 317 | // 提交 | 227 | // 提交 |
| 318 | async function paymentHandle() { | 228 | async function paymentHandle() { |
| 319 | if (!user.value) { | 229 | if (!user.value) { |
| ... | @@ -327,19 +237,37 @@ async function paymentHandle() { | ... | @@ -327,19 +237,37 @@ async function paymentHandle() { |
| 327 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | 237 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', |
| 328 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | 238 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', |
| 329 | type: 'warning' | 239 | type: 'warning' |
| 330 | }).then(async () => { | 240 | }).then(async() => { |
| 331 | try { | 241 | try { |
| 242 | const orderCustomerList = [] | ||
| 243 | _.each(orderForm.value.customerIds, (id) => { | ||
| 244 | const person = _.find(personnelList.value, (item) => item.id == id) | ||
| 245 | orderCustomerList.push({ | ||
| 246 | customerId: person.id, | ||
| 247 | name: person.name, | ||
| 248 | idcType: person.idcType, | ||
| 249 | idCard: person.idCard, | ||
| 250 | paymentType: language.value == 0 ? '1' : '3' | ||
| 251 | }) | ||
| 252 | }) | ||
| 253 | |||
| 332 | const res = await submitOrderTicket({ | 254 | const res = await submitOrderTicket({ |
| 333 | activeId: orderForm.value.activeId, | 255 | activeId: orderForm.value.activeId, |
| 334 | atId: orderForm.value.atId, | 256 | orderName: TickForm2.value.ticketTypeName, |
| 335 | attId: orderForm.value.attId, | 257 | atId: TickForm2.value.latId, |
| 336 | ticketType: orderForm.value.ticketType, | 258 | atType: TickForm2.value.ticketPackage, |
| 337 | ticketDate: orderForm.value.ticketDate, | 259 | atName: TickForm2.value.ticketTypeName, |
| 260 | atsId: TickForm2.value.latsId, | ||
| 261 | atsName: TickForm2.value.stadiumName, | ||
| 262 | sessionType: TickForm2.value.sessionType, | ||
| 263 | atstId: TickForm2.value.id, | ||
| 264 | atstName: TickForm2.value.ticketName, | ||
| 265 | ticketName: TickForm2.value.ticketName, | ||
| 266 | ticketType: TickForm2.value.ticketType, | ||
| 267 | contacts: orderForm.value.contacts, | ||
| 338 | phone: orderForm.value.phone, | 268 | phone: orderForm.value.phone, |
| 339 | customerList: orderForm.value.customerList, | 269 | price: language.value == '0' ? TickForm2.value.price : TickForm2.value.priceEn, |
| 340 | num: orderForm.value.num, | 270 | orderCustomerList: orderCustomerList |
| 341 | message: JSON.stringify(orderForm.value.message), | ||
| 342 | total: language.value == 0 ? price.value.total_cn : price.value.total_en | ||
| 343 | }) | 271 | }) |
| 344 | if (res.code == 200 && res.data.orderId > 0) { | 272 | if (res.code == 200 && res.data.orderId > 0) { |
| 345 | // 去付钱 | 273 | // 去付钱 |
| ... | @@ -371,26 +299,18 @@ async function paymentHandle() { | ... | @@ -371,26 +299,18 @@ async function paymentHandle() { |
| 371 | } finally { | 299 | } finally { |
| 372 | 300 | ||
| 373 | } | 301 | } |
| 374 | |||
| 375 | }) | 302 | }) |
| 376 | } | 303 | } |
| 377 | 304 | ||
| 378 | async function getDetail() { | 305 | async function getDetail() { |
| 379 | const res = await getTicketInfoByActivityId({activityId: orderForm.value.activeId}) | 306 | const res = await getTicketInfoByActivityId({ activityId: orderForm.value.activeId }) |
| 380 | TickForm.value = res.data | 307 | TickForm.value = res.data |
| 381 | } | 308 | } |
| 382 | 309 | ||
| 383 | getDetail() | ||
| 384 | |||
| 385 | 310 | ||
| 386 | function addPeopl() { | 311 | function addPeopl() { |
| 387 | router.push({ | 312 | router.push({ |
| 388 | path: '/booking/ticket/peopleManage', | 313 | path: '/booking/ticket/peopleManage' |
| 389 | query: { | ||
| 390 | activeId: orderForm.value.activeId, | ||
| 391 | attId: orderForm.value.attId, | ||
| 392 | atId: orderForm.value.atId | ||
| 393 | } | ||
| 394 | }) | 314 | }) |
| 395 | } | 315 | } |
| 396 | </script> | 316 | </script> | ... | ... |
| ... | @@ -66,10 +66,34 @@ | ... | @@ -66,10 +66,34 @@ |
| 66 | <div class="label"> | 66 | <div class="label"> |
| 67 | {{ triggerLanguage(language, "票档", "Tickets") }} : | 67 | {{ triggerLanguage(language, "票档", "Tickets") }} : |
| 68 | </div> | 68 | </div> |
| 69 | <div v-if="matchForm.ticketLayout"> | 69 | </div> |
| 70 | <div class="select_item_box"> | ||
| 71 | <div class="select_item"> | ||
| 72 | <div | ||
| 73 | v-for="(it, index) in tickClass" | ||
| 74 | :key="index" | ||
| 75 | :class="[ | ||
| 76 | it.id == selectForm.latId ? 'tagActive' : 'tag', | ||
| 77 | ]" | ||
| 78 | @click="select(it)" | ||
| 79 | > | ||
| 80 | {{ it.ticketTypeName }}<span v-if="it.ticketPackage==1" class="tao">{{ | ||
| 81 | language == 0 ? '套票' : 'Package ticket' | ||
| 82 | }}</span> | ||
| 83 | </div> | ||
| 84 | </div> | ||
| 85 | </div> | ||
| 86 | |||
| 87 | <!-- 场馆 --> | ||
| 88 | <div class="select_item_box"> | ||
| 89 | <div class="label"> | ||
| 90 | {{ triggerLanguage(language, "场馆", "Venues") }} : | ||
| 91 | </div> | ||
| 92 | <div> | ||
| 70 | <span | 93 | <span |
| 94 | v-if="currVenue?.images" | ||
| 71 | style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px" | 95 | style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px" |
| 72 | @click="show=true" | 96 | @click="showUrl=currVenue.images; show=true" |
| 73 | > <span style="color: red;font-size: 18px">*</span> | 97 | > <span style="color: red;font-size: 18px">*</span> |
| 74 | {{ | 98 | {{ |
| 75 | language == 0 ? '点击查看场馆布局' : 'View Venue Layout' | 99 | language == 0 ? '点击查看场馆布局' : 'View Venue Layout' |
| ... | @@ -80,19 +104,20 @@ | ... | @@ -80,19 +104,20 @@ |
| 80 | <div class="select_item_box"> | 104 | <div class="select_item_box"> |
| 81 | <div class="select_item"> | 105 | <div class="select_item"> |
| 82 | <div | 106 | <div |
| 83 | v-for="(it, index) in tickClass" | 107 | v-for="(it, index) in venueList" |
| 84 | :key="index" | 108 | :key="index" |
| 85 | :class="[ | 109 | :class="[ |
| 86 | it.id == selectForm.latId ? 'tagActive' : 'tag', | 110 | it.id == selectForm.latsId ? 'tagActive' : 'tag', |
| 111 | it.isView==0?'forbid':'' | ||
| 87 | ]" | 112 | ]" |
| 88 | @click="select(it)" | 113 | @click="selectVenue(it)" |
| 89 | > | 114 | > |
| 90 | {{ it.name }} | 115 | {{ it.name }} |
| 91 | </div> | 116 | </div> |
| 92 | </div> | 117 | </div> |
| 93 | </div> | 118 | </div> |
| 94 | 119 | ||
| 95 | <!-- 时间 --> | 120 | <!-- 场次 --> |
| 96 | <div class="select_item_box"> | 121 | <div class="select_item_box"> |
| 97 | <div class="label"> | 122 | <div class="label"> |
| 98 | {{ triggerLanguage(language, "场次", "Session") }} : | 123 | {{ triggerLanguage(language, "场次", "Session") }} : |
| ... | @@ -101,21 +126,53 @@ | ... | @@ -101,21 +126,53 @@ |
| 101 | <div class="select_item_box"> | 126 | <div class="select_item_box"> |
| 102 | <div class="select_item"> | 127 | <div class="select_item"> |
| 103 | <div | 128 | <div |
| 104 | v-for="(it, index) in tickList" | 129 | v-for="(it, key) in tickList" |
| 105 | :key="index" | 130 | :key="key" |
| 106 | :class="[ | 131 | :class="[ |
| 107 | it.id == selectForm.id ? 'tagActive' : 'tag', | 132 | key == selectForm.sessionType ? 'tagActive' : 'tag', |
| 133 | it.isView==0?'forbid':'' | ||
| 134 | ]" | ||
| 135 | @click="selectSessionType(key)" | ||
| 136 | > | ||
| 137 | {{ key=='1000'?'日间场':'夜间场' }} | ||
| 138 | </div> | ||
| 139 | </div> | ||
| 140 | </div> | ||
| 141 | |||
| 142 | <!-- 票型 --> | ||
| 143 | <div class="select_item_box"> | ||
| 144 | <div class="label"> | ||
| 145 | {{ triggerLanguage(language, "票型", "Ticket Type") }} : | ||
| 146 | </div> | ||
| 147 | <div> | ||
| 148 | <span | ||
| 149 | v-if="currTick?.images" | ||
| 150 | style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px" | ||
| 151 | @click="showUrl=currTick.images;show=true" | ||
| 152 | > <span style="color: red;font-size: 18px">*</span> | ||
| 153 | {{ | ||
| 154 | language == 0 ? '点击查看区域布局' : 'View Area Layout' | ||
| 155 | }} | ||
| 156 | </span> | ||
| 157 | </div> | ||
| 158 | </div> | ||
| 159 | <div class="select_item_box"> | ||
| 160 | <div class="select_item"> | ||
| 161 | <div | ||
| 162 | v-for="it in tickList[selectForm.sessionType]" | ||
| 163 | :key="it.id" | ||
| 164 | :class="[ | ||
| 165 | it.id == selectForm.latstId ? 'tagActive' : 'tag', | ||
| 108 | it.isView==0?'forbid':'' | 166 | it.isView==0?'forbid':'' |
| 109 | ]" | 167 | ]" |
| 110 | @click="selectTick(it)" | 168 | @click="selectTick(it)" |
| 111 | > | 169 | > |
| 112 | {{ it.name }} <span v-if="it.ticketType==1" class="tao">{{ | 170 | {{ it.name }} |
| 113 | language == 0 ? '套票' : 'Package ticket' | ||
| 114 | }}</span> | ||
| 115 | </div> | 171 | </div> |
| 116 | </div> | 172 | </div> |
| 117 | </div> | 173 | </div> |
| 118 | 174 | ||
| 175 | |||
| 119 | <!-- 价格 --> | 176 | <!-- 价格 --> |
| 120 | <div class="select_item_box"> | 177 | <div class="select_item_box"> |
| 121 | <div class="label"> | 178 | <div class="label"> |
| ... | @@ -172,7 +229,7 @@ | ... | @@ -172,7 +229,7 @@ |
| 172 | 229 | ||
| 173 | <el-dialog v-model="show" title="" width="1000px"> | 230 | <el-dialog v-model="show" title="" width="1000px"> |
| 174 | <div> | 231 | <div> |
| 175 | <img :src="fillImgUrl(matchForm.ticketLayout)" alt="" style="width: 100%"> | 232 | <img :src="fillImgUrl(showUrl)" alt="" style="width: 100%"> |
| 176 | </div> | 233 | </div> |
| 177 | </el-dialog> | 234 | </el-dialog> |
| 178 | </div> | 235 | </div> |
| ... | @@ -181,16 +238,23 @@ | ... | @@ -181,16 +238,23 @@ |
| 181 | 238 | ||
| 182 | 239 | ||
| 183 | <script setup> | 240 | <script setup> |
| 184 | import { ref, computed } from 'vue' | 241 | import { ref, computed, watch } from 'vue' |
| 185 | import { listApi, getTicketInfoByActivityId, getTicketListApi, checkNonPayment } from '@/apiPc/booking' | 242 | import { |
| 243 | getTicketInfoByActivityId, | ||
| 244 | getTicketListApi, | ||
| 245 | checkNonPayment, | ||
| 246 | getStadiumList, | ||
| 247 | getActivityTypeVoListByLatsId | ||
| 248 | } from '@/apiPc/booking' | ||
| 186 | 249 | ||
| 187 | import { dayjs } from 'element-plus' | 250 | import { dayjs } from 'element-plus' |
| 188 | import { ElMessageBox, ElMessage } from 'element-plus' | 251 | import { ElMessageBox, ElMessage } from 'element-plus' |
| 189 | import { languageFormat, getDayName } from '@/viewsPc/seat/utils/language' | 252 | import { getDayName } from '@/viewsPc/seat/utils/language' |
| 190 | import { fillImgUrl } from '/@/utils/ruoyi' | 253 | import { fillImgUrl } from '/@/utils/ruoyi' |
| 191 | import useUserStore from '/@/store/modules/user' | 254 | import useUserStore from '/@/store/modules/user' |
| 192 | import { triggerLanguage } from '@/utils/ruoyi' | 255 | import { triggerLanguage } from '@/utils/ruoyi' |
| 193 | import { useStorage } from '@vueuse/core/index' | 256 | import { useStorage } from '@vueuse/core/index' |
| 257 | import { useRoute, useRouter } from 'vue-router' | ||
| 194 | 258 | ||
| 195 | const language = useStorage('language', 0) | 259 | const language = useStorage('language', 0) |
| 196 | const useStore = useUserStore() | 260 | const useStore = useUserStore() |
| ... | @@ -198,10 +262,9 @@ const user = computed(() => useUserStore().user) | ... | @@ -198,10 +262,9 @@ const user = computed(() => useUserStore().user) |
| 198 | const route = useRoute() | 262 | const route = useRoute() |
| 199 | const router = useRouter() | 263 | const router = useRouter() |
| 200 | const show = ref(false) | 264 | const show = ref(false) |
| 265 | const showUrl = ref('') | ||
| 201 | const activeId = ref(route.params.activeId) | 266 | const activeId = ref(route.params.activeId) |
| 202 | const flag = ref(false) | ||
| 203 | const active = ref(1) | 267 | const active = ref(1) |
| 204 | const countDown = ref(false) | ||
| 205 | const props = defineProps({ | 268 | const props = defineProps({ |
| 206 | activityId: [String, Number] | 269 | activityId: [String, Number] |
| 207 | }) | 270 | }) |
| ... | @@ -211,11 +274,22 @@ const matchForm = ref({}) | ... | @@ -211,11 +274,22 @@ const matchForm = ref({}) |
| 211 | const tickClass = ref([]) | 274 | const tickClass = ref([]) |
| 212 | const selectForm = ref({ | 275 | const selectForm = ref({ |
| 213 | latId: null, | 276 | latId: null, |
| 214 | id: null, | 277 | latsId: null, |
| 278 | sessionType: null, | ||
| 279 | latstId: null, | ||
| 215 | price: '--', | 280 | price: '--', |
| 216 | priceEn: '--' | 281 | priceEn: '--' |
| 217 | }) | 282 | }) |
| 283 | const venueList = ref([]) | ||
| 218 | const tickList = ref([]) | 284 | const tickList = ref([]) |
| 285 | const currVenue = ref(null) | ||
| 286 | const currTick = ref(null) | ||
| 287 | |||
| 288 | watch(show, (val) => { | ||
| 289 | if (!val) { | ||
| 290 | showUrl.value = '' | ||
| 291 | } | ||
| 292 | }) | ||
| 219 | 293 | ||
| 220 | // 获取票务信息 | 294 | // 获取票务信息 |
| 221 | getDetail() | 295 | getDetail() |
| ... | @@ -241,48 +315,74 @@ async function getTicketList() { | ... | @@ -241,48 +315,74 @@ async function getTicketList() { |
| 241 | tickClass.value = res.rows | 315 | tickClass.value = res.rows |
| 242 | if (tickClass.value.length > 0) { | 316 | if (tickClass.value.length > 0) { |
| 243 | selectForm.value.latId = tickClass.value?.[0]?.id | 317 | selectForm.value.latId = tickClass.value?.[0]?.id |
| 244 | await getTicketListType() | 318 | await getVenueList() |
| 245 | } | 319 | } |
| 246 | } | 320 | } |
| 247 | 321 | ||
| 248 | // 根据票档获取场次 | 322 | // 根据票档获取场次 |
| 323 | async function getVenueList() { | ||
| 324 | const res = await getStadiumList({ latId: selectForm.value.latId }) | ||
| 325 | venueList.value = res.rows | ||
| 326 | currVenue.value = res.rows[0] | ||
| 327 | selectForm.value.latsId = res.rows[0]?.id | ||
| 328 | await getTicketListType() | ||
| 329 | } | ||
| 330 | |||
| 331 | // 根据票档获取场次 | ||
| 249 | async function getTicketListType() { | 332 | async function getTicketListType() { |
| 250 | const arr = [] | 333 | const res = await getActivityTypeVoListByLatsId({ latsId: selectForm.value.latsId }) |
| 251 | const res = await listApi({ latId: selectForm.value.latId }) | 334 | tickList.value = res.data |
| 252 | tickList.value = res.rows | 335 | selectForm.value.sessionType = Object.keys(res.data)[0] |
| 253 | for (const v of res.rows) { | 336 | |
| 254 | if (v.isView == 0) arr.push(v) | 337 | currTick.value = tickList.value[selectForm.value.sessionType][0] |
| 255 | } | 338 | selectForm.value.latstId = currTick.value?.id |
| 256 | for (const v of res.rows) { | 339 | selectForm.value.price = currTick.value?.price |
| 257 | if (arr.length > 0 && v.ticketType == 1) { | 340 | selectForm.value.priceEn = currTick.value?.priceEn |
| 258 | for (const c of arr) { | ||
| 259 | if ((c.ticketStart >= v.ticketStart) && (c.ticketStart <= v.ticketEnd)) { | ||
| 260 | v.isView = 0 | ||
| 261 | } | ||
| 262 | } | ||
| 263 | } | ||
| 264 | } | ||
| 265 | } | 341 | } |
| 266 | 342 | ||
| 267 | function select(v) { | 343 | function select(v) { |
| 268 | selectForm.value.latId = v.id | 344 | selectForm.value.latId = v.id |
| 345 | selectForm.value.latsId = null | ||
| 346 | selectForm.value.sessionType = null | ||
| 347 | selectForm.value.latstId = null | ||
| 269 | selectForm.value.id = null | 348 | selectForm.value.id = null |
| 270 | selectForm.value.price = '--' | 349 | selectForm.value.price = '--' |
| 271 | selectForm.value.priceEn = '--' | 350 | selectForm.value.priceEn = '--' |
| 351 | |||
| 352 | getVenueList() | ||
| 353 | } | ||
| 354 | |||
| 355 | function selectVenue(v) { | ||
| 356 | currVenue.value = v | ||
| 357 | selectForm.value.latsId = v.id | ||
| 358 | selectForm.value.sessionType = null | ||
| 359 | selectForm.value.latstId = null | ||
| 360 | selectForm.value.id = null | ||
| 361 | selectForm.value.price = '--' | ||
| 362 | selectForm.value.priceEn = '--' | ||
| 363 | |||
| 272 | getTicketListType() | 364 | getTicketListType() |
| 273 | } | 365 | } |
| 274 | 366 | ||
| 367 | function selectSessionType(key) { | ||
| 368 | selectForm.value.sessionType = key | ||
| 369 | |||
| 370 | currTick.value = tickList.value[selectForm.value.sessionType][0] | ||
| 371 | selectForm.value.latstId = currTick.value?.id | ||
| 372 | selectForm.value.price = currTick.value?.price | ||
| 373 | selectForm.value.priceEn = currTick.value?.priceEn | ||
| 374 | } | ||
| 375 | |||
| 275 | function selectTick(v) { | 376 | function selectTick(v) { |
| 276 | if (v.isView != 0) { | 377 | currTick.value = v |
| 277 | selectForm.value.id = v.id | 378 | selectForm.value.latstId = v.id |
| 278 | selectForm.value.price = v.price | 379 | selectForm.value.price = v.price |
| 279 | selectForm.value.priceEn = v.priceEn | 380 | selectForm.value.priceEn = v.priceEn |
| 280 | } | ||
| 281 | } | 381 | } |
| 282 | 382 | ||
| 283 | function toSelectSeat() { | 383 | function toSelectSeat() { |
| 284 | if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file') | 384 | // if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file') |
| 285 | if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time') | 385 | // if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time') |
| 286 | if (!user.value) { | 386 | if (!user.value) { |
| 287 | useStore.setVisitor() | 387 | useStore.setVisitor() |
| 288 | return | 388 | return |
| ... | @@ -293,8 +393,7 @@ function toSelectSeat() { | ... | @@ -293,8 +393,7 @@ function toSelectSeat() { |
| 293 | name: 'confirmOrder', | 393 | name: 'confirmOrder', |
| 294 | params: { | 394 | params: { |
| 295 | activeId: activeId.value, | 395 | activeId: activeId.value, |
| 296 | latId: selectForm.value.latId, | 396 | latstId: selectForm.value.latstId |
| 297 | attId: selectForm.value.id | ||
| 298 | } | 397 | } |
| 299 | }) | 398 | }) |
| 300 | } else { | 399 | } else { | ... | ... |
| ... | @@ -8,14 +8,13 @@ | ... | @@ -8,14 +8,13 @@ |
| 8 | {{ languageFormat(language, "观影人管理", "Viewers") }} | 8 | {{ languageFormat(language, "观影人管理", "Viewers") }} |
| 9 | </span> | 9 | </span> |
| 10 | 10 | ||
| 11 | <span class="fr" style="cursor: pointer" @click="$router.go(-1)">{{ | 11 | <span class="fr" style="cursor: pointer" @click="$router.go(-1)"> |
| 12 | language == 0 ? '返回' : 'Back' | 12 | {{ language == 0 ? '返回' : 'Back' }} |
| 13 | }}</span> | 13 | </span> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="content"> | 15 | <div class="content"> |
| 16 | <div class="people_box"> | 16 | <div class="people_box"> |
| 17 | <div v-for="(it, index) in personnelList" :key="index" class="people_item" | 17 | <div v-for="(it, index) in personnelList" :key="index" class="people_item"> |
| 18 | > | ||
| 19 | <div class="name">{{ it.name }}</div> | 18 | <div class="name">{{ it.name }}</div> |
| 20 | <div class="idcard"> | 19 | <div class="idcard"> |
| 21 | {{ languageFormat(language, "证件号", "ID number") }}:{{ it.idCard }} | 20 | {{ languageFormat(language, "证件号", "ID number") }}:{{ it.idCard }} |
| ... | @@ -33,33 +32,31 @@ | ... | @@ -33,33 +32,31 @@ |
| 33 | center | 32 | center |
| 34 | width="700" | 33 | width="700" |
| 35 | > | 34 | > |
| 36 | <el-form ref="formRef" :model="form" :rules="rules" label-width="100px" size="large" style="margin: 80px"> | 35 | <el-form |
| 36 | ref="formRef" :model="form" :rules="rules" label-width="100px" size="large" | ||
| 37 | style="margin: 80px" | ||
| 38 | > | ||
| 37 | <el-form-item :label="language==0?'姓名':'name'" prop="name" required> | 39 | <el-form-item :label="language==0?'姓名':'name'" prop="name" required> |
| 38 | <el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'"/> | 40 | <el-input v-model="form.name" :placeholder="language==0?'请输入':'Please input'" /> |
| 39 | </el-form-item> | 41 | </el-form-item> |
| 40 | <el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required> | 42 | <el-form-item :label="language==0?'证件类型':'ID Type'" prop="idcType" required> |
| 41 | <el-select v-model="form.idcType" :placeholder="language==0?'请选择':'Please choose'"> | 43 | <el-select v-model="form.idcType" :placeholder="language==0?'请选择':'Please choose'"> |
| 42 | <el-option :label="language==0?'身份证':'Identity card'" value="0"/> | 44 | <el-option :label="language==0?'身份证':'Identity card'" value="0" /> |
| 43 | <el-option :label="language==0?'护照':'Passport'" value="1"/> | 45 | <el-option :label="language==0?'护照':'Passport'" value="1" /> |
| 44 | <el-option :label="language==0?'其他':'Other'" value="2"/> | 46 | <el-option :label="language==0?'其他':'Other'" value="2" /> |
| 45 | </el-select> | 47 | </el-select> |
| 46 | </el-form-item> | 48 | </el-form-item> |
| 47 | <el-form-item :label="language==0?'证件号':'ID number'" prop="idCard" required> | 49 | <el-form-item :label="language==0?'证件号':'ID number'" prop="idCard" required> |
| 48 | <el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'"/> | 50 | <el-input v-model="form.idCard" :placeholder="language==0?'请输入证件号':'Please enter the ID after ah'" /> |
| 49 | </el-form-item> | 51 | </el-form-item> |
| 50 | </el-form> | 52 | </el-form> |
| 51 | 53 | ||
| 52 | <br> | 54 | <span class="dialog-footer"> |
| 53 | <br> | ||
| 54 | <span slot="footer" class="dialog-footer"> | ||
| 55 | <div style="text-align: center"> | 55 | <div style="text-align: center"> |
| 56 | <el-button class="can_pay" @click="show = false">{{ language == 0 ? '取 消' : 'cancel' }}</el-button> | 56 | <el-button class="can_pay" @click="show = false">{{ language == 0 ? '取 消' : 'cancel' }}</el-button> |
| 57 | <el-button class="pay" type="primary" @click="submit">{{ language == 0 ? '确 定' : 'confirm' }}</el-button> | 57 | <el-button class="pay" type="primary" @click="submit">{{ language == 0 ? '确 定' : 'confirm' }}</el-button> |
| 58 | </div> | 58 | </div> |
| 59 | </span> | 59 | </span> |
| 60 | <br> | ||
| 61 | <br> | ||
| 62 | <br> | ||
| 63 | </el-dialog> | 60 | </el-dialog> |
| 64 | </el-card> | 61 | </el-card> |
| 65 | 62 | ||
| ... | @@ -67,13 +64,14 @@ | ... | @@ -67,13 +64,14 @@ |
| 67 | 64 | ||
| 68 | 65 | ||
| 69 | <script setup> | 66 | <script setup> |
| 70 | import {ref, computed} from "vue"; | 67 | import { ref, computed } from 'vue' |
| 71 | import {aadCustomer, customerListApi, delCustomer} from '@/apiPc/booking' | 68 | import { aadCustomer, delCustomer, getMyFriends } from '@/apiPc/booking' |
| 72 | import {ElMessage, ElMessageBox} from "element-plus"; | 69 | import { ElMessage, ElMessageBox } from 'element-plus' |
| 73 | import {languageFormat} from "@/viewsPc/seat/utils/language.js"; | 70 | import { languageFormat } from '@/viewsPc/seat/utils/language.js' |
| 74 | import useUserStore from "/@/store/modules/user"; | 71 | import useUserStore from '/@/store/modules/user' |
| 75 | import {useStorage} from "@vueuse/core/index"; | 72 | import { useStorage } from '@vueuse/core/index' |
| 76 | import {triggerLanguage} from '@/utils/ruoyi' | 73 | import { triggerLanguage } from '@/utils/ruoyi' |
| 74 | import { useRoute } from 'vue-router' | ||
| 77 | 75 | ||
| 78 | const user = computed(() => useUserStore().user) | 76 | const user = computed(() => useUserStore().user) |
| 79 | const useStore = useUserStore() | 77 | const useStore = useUserStore() |
| ... | @@ -85,29 +83,25 @@ const form = ref({}) | ... | @@ -85,29 +83,25 @@ const form = ref({}) |
| 85 | const formRef = ref(null) | 83 | const formRef = ref(null) |
| 86 | const rules = ref({ | 84 | const rules = ref({ |
| 87 | name: [ | 85 | name: [ |
| 88 | {required: true, message: triggerLanguage(language.value, '请输入姓名', 'Please input'), trigger: "blur"}, | 86 | { required: true, message: triggerLanguage(language.value, '请输入姓名', 'Please input'), trigger: 'blur' } |
| 89 | ], | 87 | ], |
| 90 | idCard: [ | 88 | idCard: [ |
| 91 | { | 89 | { |
| 92 | required: true, | 90 | required: true, |
| 93 | message: triggerLanguage(language.value, '请输入证件号', 'Please enter the ID after ah'), | 91 | message: triggerLanguage(language.value, '请输入证件号', 'Please enter the ID after ah'), |
| 94 | trigger: "blur" | 92 | trigger: 'blur' |
| 95 | }, | 93 | } |
| 96 | ], | 94 | ], |
| 97 | idcType: [ | 95 | idcType: [ |
| 98 | {required: true, message: triggerLanguage(language.value, '请选择证件类型', 'Please choose'), trigger: "blur"}, | 96 | { required: true, message: triggerLanguage(language.value, '请选择证件类型', 'Please choose'), trigger: 'blur' } |
| 99 | ], | 97 | ] |
| 100 | }) | 98 | }) |
| 101 | 99 | ||
| 102 | customerList() | 100 | customerList() |
| 103 | 101 | ||
| 104 | async function customerList() { | 102 | async function customerList() { |
| 105 | const res = await customerListApi({ | 103 | const res = await getMyFriends() |
| 106 | activeId: route.query.activeId, | 104 | personnelList.value = res.data |
| 107 | attId: route.query.attId, | ||
| 108 | atId: route.query.atId | ||
| 109 | }) | ||
| 110 | personnelList.value = res.rows | ||
| 111 | } | 105 | } |
| 112 | 106 | ||
| 113 | function addPeople() { | 107 | function addPeople() { |
| ... | @@ -125,19 +119,18 @@ function submit() { | ... | @@ -125,19 +119,18 @@ function submit() { |
| 125 | if (valid) { | 119 | if (valid) { |
| 126 | aadCustomer(form.value).then(res => { | 120 | aadCustomer(form.value).then(res => { |
| 127 | if (res.data == -100) { | 121 | if (res.data == -100) { |
| 128 | ElMessageBox.confirm(language.value == 0 ? '该观影人已存在' : "The viewer already exists", language.value == 0 ? '提示' : 'Reminder', { | 122 | ElMessageBox.confirm(language.value == 0 ? '该观影人已存在' : 'The viewer already exists', language.value == 0 ? '提示' : 'Reminder', { |
| 129 | confirmButtonText: language.value == 0 ? '确认' : 'confirm', | 123 | confirmButtonText: language.value == 0 ? '确认' : 'confirm', |
| 130 | cancelButtonText: language.value == 0 ? '取消' : 'cancel', | 124 | cancelButtonText: language.value == 0 ? '取消' : 'cancel', |
| 131 | type: "warning", | 125 | type: 'warning', |
| 132 | draggable: true, | 126 | draggable: true |
| 133 | }) | 127 | }) |
| 134 | |||
| 135 | } else if (res.data == -101) { | 128 | } else if (res.data == -101) { |
| 136 | return ElMessageBox.confirm(language.value == 0 ? '该观影人实名认证未通过' : 'The real name authentication of the moviegoer failed', language.value == 0 ? '提示' : 'Reminder', { | 129 | return ElMessageBox.confirm(language.value == 0 ? '该观影人实名认证未通过' : 'The real name authentication of the moviegoer failed', language.value == 0 ? '提示' : 'Reminder', { |
| 137 | confirmButtonText: language.value == 0 ? '确认' : "confirm", | 130 | confirmButtonText: language.value == 0 ? '确认' : 'confirm', |
| 138 | cancelButtonText: language.value == 0 ? '取消' : 'cancel', | 131 | cancelButtonText: language.value == 0 ? '取消' : 'cancel', |
| 139 | type: "warning", | 132 | type: 'warning', |
| 140 | draggable: true, | 133 | draggable: true |
| 141 | }) | 134 | }) |
| 142 | } else { | 135 | } else { |
| 143 | show.value = false | 136 | show.value = false |
| ... | @@ -153,23 +146,22 @@ function submit() { | ... | @@ -153,23 +146,22 @@ function submit() { |
| 153 | 146 | ||
| 154 | async function deletePeople(v) { | 147 | async function deletePeople(v) { |
| 155 | await ElMessageBox.confirm( | 148 | await ElMessageBox.confirm( |
| 156 | languageFormat(language.value, "确认删除该观影人吗?", "Are you sure to delete this viewer?"), | 149 | languageFormat(language.value, '确认删除该观影人吗?', 'Are you sure to delete this viewer?'), |
| 157 | languageFormat(language.value, "提示", "Reminder"), | 150 | languageFormat(language.value, '提示', 'Reminder'), |
| 158 | { | 151 | { |
| 159 | confirmButtonText: languageFormat(language.value, "确认", "confirm"), | 152 | confirmButtonText: languageFormat(language.value, '确认', 'confirm'), |
| 160 | cancelButtonText: languageFormat(language.value, "取消", "cancel"), | 153 | cancelButtonText: languageFormat(language.value, '取消', 'cancel'), |
| 161 | type: "warning", | 154 | type: 'warning', |
| 162 | draggable: true, | 155 | draggable: true |
| 163 | } | 156 | } |
| 164 | ) | 157 | ) |
| 165 | .then(async () => { | 158 | .then(async() => { |
| 166 | const res = await delCustomer(v) | 159 | const res = await delCustomer(v) |
| 167 | if (res.code === 200) { | 160 | if (res.code === 200) { |
| 168 | ElMessage.success('删除成功') | 161 | ElMessage.success('删除成功') |
| 169 | await customerList() | 162 | await customerList() |
| 170 | } | 163 | } |
| 171 | }) | 164 | }) |
| 172 | |||
| 173 | } | 165 | } |
| 174 | </script> | 166 | </script> |
| 175 | 167 | ... | ... |
| ... | @@ -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.243:8081', | 85 | // target: 'http://192.168.1.243: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