1dafe2e5 by zhangmeng

Merge remote-tracking branch 'origin/dev' into dev

2 parents 07827fbc 4d13c8e8
...@@ -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>
...@@ -179,9 +149,9 @@ ...@@ -179,9 +149,9 @@
179 </el-row> 149 </el-row>
180 </div> 150 </div>
181 </div> 151 </div>
182 152
183 <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> 153 <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div>
184 154
185 <div class="border-info mt20"> 155 <div class="border-info mt20">
186 <el-row v-if="type == 'hotel'"> 156 <el-row v-if="type == 'hotel'">
187 <el-col :lg="8" :md="12" :sm="12" :xs="24"> 157 <el-col :lg="8" :md="12" :sm="12" :xs="24">
...@@ -203,12 +173,12 @@ ...@@ -203,12 +173,12 @@
203 <!-- <el-tag class="mr10">{{ car.carSeat }} {{ language == 0 ? '座 ' : 'Sets' }}</el-tag>--> 173 <!-- <el-tag class="mr10">{{ car.carSeat }} {{ language == 0 ? '座 ' : 'Sets' }}</el-tag>-->
204 <!-- <el-tag>{{ car.carColor }}</el-tag>--> 174 <!-- <el-tag>{{ car.carColor }}</el-tag>-->
205 <!-- </div>--> 175 <!-- </div>-->
206 176
207 <!-- <span v-if="car.num > 0"> {{ car.num }}{{--> 177 <!-- <span v-if="car.num > 0"> {{ car.num }}{{-->
208 <!-- language == 0 ? '辆' : 'Cars'--> 178 <!-- language == 0 ? '辆' : 'Cars'-->
209 <!-- }} * {{ language == 0 ? '¥' : '€' }}{{ car.price }}</span>--> 179 <!-- }} * {{ language == 0 ? '¥' : '€' }}{{ car.price }}</span>-->
210 <!-- </div>--> 180 <!-- </div>-->
211 181
212 <div>{{ language == 0 ? '人数' : 'People' }}{{ form.pickUpBo.count }}</div> 182 <div>{{ language == 0 ? '人数' : 'People' }}{{ form.pickUpBo.count }}</div>
213 <div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}{{ form.pickUpBo.no }}</div> 183 <div>{{ language == 0 ? '航班/火车班次' : 'Flight/Train' }}{{ form.pickUpBo.no }}</div>
214 <div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }} 184 <div>{{ language == 0 ? '接机/接站地点' : 'Pick-up/Drop-off Place' }}
...@@ -295,54 +265,40 @@ ...@@ -295,54 +265,40 @@
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>
345 301
346 </el-row> 302 </el-row>
347 <el-row v-if="type == 'travel'" style="width: 100%"> 303 <el-row v-if="type == 'travel'" style="width: 100%">
348 <el-row v-for="(v,i) in form.personArr" :key="i" style="width: 100%"> 304 <el-row v-for="(v,i) in form.personArr" :key="i" style="width: 100%">
...@@ -376,10 +332,10 @@ ...@@ -376,10 +332,10 @@
376 }}{{ Number(totalFee).toFixed(2) }} 332 }}{{ Number(totalFee).toFixed(2) }}
377 </el-col> 333 </el-col>
378 </el-row> 334 </el-row>
379 335
380 </el-row> 336 </el-row>
381 </div> 337 </div>
382 338
383 <el-row align="middle" justify="space-between"> 339 <el-row align="middle" justify="space-between">
384 <el-col :lg="12"> 340 <el-col :lg="12">
385 <div v-if="form.payDate">{{ language == 0 ? '支付时间' : 'Payment Time' }}{{ form.payDate }}</div> 341 <div v-if="form.payDate">{{ language == 0 ? '支付时间' : 'Payment Time' }}{{ form.payDate }}</div>
...@@ -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>
...@@ -445,9 +377,9 @@ ...@@ -445,9 +377,9 @@
445 {{ language == 0 ? '登录后查看明细' : 'View detailed information after logging in' }} 377 {{ language == 0 ? '登录后查看明细' : 'View detailed information after logging in' }}
446 </el-button> 378 </el-button>
447 </div> 379 </div>
448 380
449 <div v-if="form.viewStatus == '0'&&(form.surplus!='0,0'&&form.surplus!='0')" class="pd20"> 381 <div v-if="form.viewStatus == '0'&&(form.surplus!='0,0'&&form.surplus!='0')" class="pd20">
450 382
451 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div> 383 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div>
452 <div class="mt20"> 384 <div class="mt20">
453 <el-radio-group v-model="payType"> 385 <el-radio-group v-model="payType">
...@@ -547,7 +479,7 @@ ...@@ -547,7 +479,7 @@
547 </el-button> 479 </el-button>
548 </el-col> 480 </el-col>
549 </el-row> 481 </el-row>
550 482
551 <div v-if="form.payDate&&form.viewStatus=='1'"> 483 <div v-if="form.payDate&&form.viewStatus=='1'">
552 <div class="text-center"> 484 <div class="text-center">
553 <el-icon color="#32B16C" size="80"> 485 <el-icon color="#32B16C" size="80">
...@@ -559,7 +491,7 @@ ...@@ -559,7 +491,7 @@
559 </div> 491 </div>
560 </el-card> 492 </el-card>
561 </div> 493 </div>
562 494
563 <div v-if="errorBox" class="box"> 495 <div v-if="errorBox" class="box">
564 <el-result 496 <el-result
565 :sub-title="language==0?'请确认订单号是否正确':'Please confirm if the order number is correct'" 497 :sub-title="language==0?'请确认订单号是否正确':'Please confirm if the order number is correct'"
...@@ -574,7 +506,7 @@ ...@@ -574,7 +506,7 @@
574 </el-result> 506 </el-result>
575 </div> 507 </div>
576 <Dialog ref="DialogRef" /> 508 <Dialog ref="DialogRef" />
577 509
578 <el-dialog 510 <el-dialog
579 v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" 511 v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false"
580 :title="language==0?'开收据':'Issue a receipt'" width="460px" 512 :title="language==0?'开收据':'Issue a receipt'" width="460px"
...@@ -764,19 +696,15 @@ async function getTicketOrderInfoFN() { ...@@ -764,19 +696,15 @@ 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) 701
770 await getDetail(form.value.extJson.ticketDate.activityId)
771 matchId.value = form.value.extJson.ticketDate.activityId
772
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) {
775 console.log(e) 704 console.log(e)
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) {
...@@ -1010,7 +938,7 @@ const showSJ = () => { ...@@ -1010,7 +938,7 @@ const showSJ = () => {
1010 // proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { 938 // proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, {
1011 // ...obj 939 // ...obj
1012 // }, `Receipt_${new Date().getTime()}.pdf`) 940 // }, `Receipt_${new Date().getTime()}.pdf`)
1013 941
1014 // 报名 942 // 报名
1015 proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { 943 proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, {
1016 ...obj 944 ...obj
...@@ -1061,27 +989,27 @@ const showSJ = () => { ...@@ -1061,27 +989,27 @@ const showSJ = () => {
1061 width: 100%; 989 width: 100%;
1062 max-width: 1000px; 990 max-width: 1000px;
1063 margin: 20px auto; 991 margin: 20px auto;
1064 992
1065 .head { 993 .head {
1066 background: #EFF2F7; 994 background: #EFF2F7;
1067 height: 50px; 995 height: 50px;
1068 font-size: 16px; 996 font-size: 16px;
1069 font-weight: 400; 997 font-weight: 400;
1070 } 998 }
1071 999
1072 th { 1000 th {
1073 background: #FAFBFD; 1001 background: #FAFBFD;
1074 font-size: 14px; 1002 font-size: 14px;
1075 border-bottom: 1px solid #E5E5E5; 1003 border-bottom: 1px solid #E5E5E5;
1076 border-right: 1px solid #E5E5E5; 1004 border-right: 1px solid #E5E5E5;
1077 } 1005 }
1078 1006
1079 td { 1007 td {
1080 border-bottom: 1px solid #E5E5E5; 1008 border-bottom: 1px solid #E5E5E5;
1081 border-right: 1px solid #E5E5E5; 1009 border-right: 1px solid #E5E5E5;
1082 padding: 10px; 1010 padding: 10px;
1083 } 1011 }
1084 1012
1085 &.table-border { 1013 &.table-border {
1086 border-top: 1px solid #E5E5E5; 1014 border-top: 1px solid #E5E5E5;
1087 border-left: 1px solid #E5E5E5; 1015 border-left: 1px solid #E5E5E5;
...@@ -1100,23 +1028,23 @@ const showSJ = () => { ...@@ -1100,23 +1028,23 @@ const showSJ = () => {
1100 1028
1101 .result { 1029 .result {
1102 font-size: 22px; 1030 font-size: 22px;
1103 1031
1104 .flex { 1032 .flex {
1105 display: flex; 1033 display: flex;
1106 align-items: center; 1034 align-items: center;
1107 font-weight: 500; 1035 font-weight: 500;
1108 1036
1109 img { 1037 img {
1110 margin-right: 10px 1038 margin-right: 10px
1111 } 1039 }
1112 } 1040 }
1113 1041
1114 .priceb { 1042 .priceb {
1115 color: #7B7F83; 1043 color: #7B7F83;
1116 font-size: 16px; 1044 font-size: 16px;
1117 text-align: right; 1045 text-align: right;
1118 line-height: 50px; 1046 line-height: 50px;
1119 1047
1120 span { 1048 span {
1121 font-weight: bold; 1049 font-weight: bold;
1122 font-size: 22px; 1050 font-size: 22px;
...@@ -1129,7 +1057,7 @@ const showSJ = () => { ...@@ -1129,7 +1057,7 @@ const showSJ = () => {
1129 .skeletonBox { 1057 .skeletonBox {
1130 position: relative; 1058 position: relative;
1131 overflow: hidden; 1059 overflow: hidden;
1132 1060
1133 .btn-lineG { 1061 .btn-lineG {
1134 position: absolute; 1062 position: absolute;
1135 left: 0; 1063 left: 0;
...@@ -1139,7 +1067,7 @@ const showSJ = () => { ...@@ -1139,7 +1067,7 @@ const showSJ = () => {
1139 bottom: 0; 1067 bottom: 0;
1140 width: 200px; 1068 width: 200px;
1141 box-shadow: 0 0 1000px 500px rgba(255, 255, 255, 0.5); 1069 box-shadow: 0 0 1000px 500px rgba(255, 255, 255, 0.5);
1142 1070
1143 } 1071 }
1144 } 1072 }
1145 1073
...@@ -1151,26 +1079,26 @@ const showSJ = () => { ...@@ -1151,26 +1079,26 @@ const showSJ = () => {
1151 1079
1152 .priceBar { 1080 .priceBar {
1153 padding: 0 0 20px; 1081 padding: 0 0 20px;
1154 1082
1155 .flex { 1083 .flex {
1156 display: flex; 1084 display: flex;
1157 justify-content: right; 1085 justify-content: right;
1158 align-items: baseline; 1086 align-items: baseline;
1159 1087
1160 .item { 1088 .item {
1161 font-size: 16px; 1089 font-size: 16px;
1162 margin-right: 15px; 1090 margin-right: 15px;
1163 1091
1164 label { 1092 label {
1165 color: #95A1A6; 1093 color: #95A1A6;
1166 } 1094 }
1167 1095
1168 span { 1096 span {
1169 font-family: DIN Alternate; 1097 font-family: DIN Alternate;
1170 } 1098 }
1171 } 1099 }
1172 } 1100 }
1173 1101
1174 .size26 { 1102 .size26 {
1175 font-size: 26px; 1103 font-size: 26px;
1176 } 1104 }
......
...@@ -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>
...@@ -144,13 +116,13 @@ ...@@ -144,13 +116,13 @@
144 </div> 116 </div>
145 <div class="footer"> 117 <div class="footer">
146 <div> 118 <div>
147 <span class="label"> 119 <span class="label">
148 {{ languageFormat(language, "共计金额", "Subtotal") }} 120 {{ languageFormat(language, "共计金额", "Subtotal") }}
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">
156 {{ languageFormat(language, "立即支付", "Pay Now") }} 128 {{ languageFormat(language, "立即支付", "Pay Now") }}
...@@ -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 })
210 const price = ref({
211 total_en: 0,
212 total_cn: 0,
213 total_enY: 0,
214 total_cnY: 0,
215 }) 165 })
216 const tickType = ref({}) 166
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', 203 })
252 type: 'warning'
253 })
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>
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
37 <div class="address"> 37 <div class="address">
38 {{ triggerLanguage(language, "地址", "Location") }}{{ matchForm.address }} 38 {{ triggerLanguage(language, "地址", "Location") }}{{ matchForm.address }}
39 </div> 39 </div>
40 40
41 41
42 <div v-if="timeData>0"> 42 <div v-if="timeData>0">
43 <!-- 倒计时--> 43 <!-- 倒计时-->
44 44
45 <p class="countDownTitle"> 45 <p class="countDownTitle">
46 <span v-if="language==0">售票倒计时</span> 46 <span v-if="language==0">售票倒计时</span>
47 <span v-else>TICKET COUNTDOWN</span> 47 <span v-else>TICKET COUNTDOWN</span>
...@@ -60,16 +60,40 @@ ...@@ -60,16 +60,40 @@
60 </van-count-down> 60 </van-count-down>
61 </div> 61 </div>
62 <div v-else> 62 <div v-else>
63 63
64 <!-- 票档 --> 64 <!-- 票档 -->
65 <div class="select_item_box"> 65 <div class="select_item_box">
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">
...@@ -142,7 +199,7 @@ ...@@ -142,7 +199,7 @@
142 {{ matchForm.ticketRemark }} 199 {{ matchForm.ticketRemark }}
143 </div> 200 </div>
144 </div> 201 </div>
145 202
146 <div 203 <div
147 v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px" 204 v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
148 @click="toSelectClosed" 205 @click="toSelectClosed"
...@@ -156,12 +213,12 @@ ...@@ -156,12 +213,12 @@
156 triggerLanguage(language, "立即购票", "Buy tickets now") 213 triggerLanguage(language, "立即购票", "Buy tickets now")
157 }} 214 }}
158 </div> 215 </div>
159 216
160 </div> 217 </div>
161 218
162 </div> 219 </div>
163 </div> 220 </div>
164 221
165 <div class="container bottom"> 222 <div class="container bottom">
166 <div style="display: flex"> 223 <div style="display: flex">
167 <div :class="{'bg':active==1}" class="buBg" @click="active=1">购票说明</div> 224 <div :class="{'bg':active==1}" class="buBg" @click="active=1">购票说明</div>
...@@ -169,10 +226,10 @@ ...@@ -169,10 +226,10 @@
169 </div> 226 </div>
170 <div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" /> 227 <div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" />
171 <div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" /> 228 <div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" />
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
348 selectForm.value.id = null
349 selectForm.value.price = '--'
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
269 selectForm.value.id = null 360 selectForm.value.id = null
270 selectForm.value.price = '--' 361 selectForm.value.price = '--'
271 selectForm.value.priceEn = '--' 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 {
...@@ -345,18 +444,18 @@ function toSelectClosed() { ...@@ -345,18 +444,18 @@ function toSelectClosed() {
345 display: flex; 444 display: flex;
346 padding: 19px; 445 padding: 19px;
347 margin-top: 26px; 446 margin-top: 26px;
348 447
349 .cover_img { 448 .cover_img {
350 width: 390px; 449 width: 390px;
351 height: 517px; 450 height: 517px;
352 object-fit: fill; 451 object-fit: fill;
353 margin-right: 36px; 452 margin-right: 36px;
354 } 453 }
355 454
356 .info { 455 .info {
357 padding-top: 12px; 456 padding-top: 12px;
358 width: 100%; 457 width: 100%;
359 458
360 .title { 459 .title {
361 font-weight: bold; 460 font-weight: bold;
362 font-size: 28px; 461 font-size: 28px;
...@@ -364,7 +463,7 @@ function toSelectClosed() { ...@@ -364,7 +463,7 @@ function toSelectClosed() {
364 line-height: 1.6; 463 line-height: 1.6;
365 margin-bottom: 15px; 464 margin-bottom: 15px;
366 } 465 }
367 466
368 .time { 467 .time {
369 font-weight: 600; 468 font-weight: 600;
370 font-size: 16px; 469 font-size: 16px;
...@@ -372,7 +471,7 @@ function toSelectClosed() { ...@@ -372,7 +471,7 @@ function toSelectClosed() {
372 line-height: 24px; 471 line-height: 24px;
373 margin-bottom: 16px; 472 margin-bottom: 16px;
374 } 473 }
375 474
376 .address { 475 .address {
377 font-weight: 600; 476 font-weight: 600;
378 font-size: 16px; 477 font-size: 16px;
...@@ -380,15 +479,15 @@ function toSelectClosed() { ...@@ -380,15 +479,15 @@ function toSelectClosed() {
380 line-height: 24px; 479 line-height: 24px;
381 margin-bottom: 15px; 480 margin-bottom: 15px;
382 } 481 }
383 482
384 .select_item_box { 483 .select_item_box {
385 display: flex; 484 display: flex;
386 margin-bottom: 10px; 485 margin-bottom: 10px;
387 486
388 &:last-child { 487 &:last-child {
389 margin-bottom: 0; 488 margin-bottom: 0;
390 } 489 }
391 490
392 .label { 491 .label {
393 font-weight: 600; 492 font-weight: 600;
394 font-size: 16px; 493 font-size: 16px;
...@@ -397,18 +496,18 @@ function toSelectClosed() { ...@@ -397,18 +496,18 @@ function toSelectClosed() {
397 margin-right: 12px; 496 margin-right: 12px;
398 flex-shrink: 0; 497 flex-shrink: 0;
399 } 498 }
400 499
401 .forbid { 500 .forbid {
402 opacity: 0.5 !important; 501 opacity: 0.5 !important;
403 cursor: not-allowed !important; 502 cursor: not-allowed !important;
404 } 503 }
405 504
406 .select_item { 505 .select_item {
407 display: flex; 506 display: flex;
408 flex-wrap: wrap; 507 flex-wrap: wrap;
409 gap: 10px; 508 gap: 10px;
410 user-select: none; 509 user-select: none;
411 510
412 .tag_t { 511 .tag_t {
413 padding: 1px 15px; 512 padding: 1px 15px;
414 font-weight: 400; 513 font-weight: 400;
...@@ -418,7 +517,7 @@ function toSelectClosed() { ...@@ -418,7 +517,7 @@ function toSelectClosed() {
418 border: 1px solid #453dea; 517 border: 1px solid #453dea;
419 margin-left: 5px; 518 margin-left: 5px;
420 } 519 }
421 520
422 .tag { 521 .tag {
423 display: flex; 522 display: flex;
424 padding: 12px 18px; 523 padding: 12px 18px;
...@@ -429,7 +528,7 @@ function toSelectClosed() { ...@@ -429,7 +528,7 @@ function toSelectClosed() {
429 color: #4a4a4a; 528 color: #4a4a4a;
430 cursor: pointer; 529 cursor: pointer;
431 } 530 }
432 531
433 .tagActive { 532 .tagActive {
434 display: flex; 533 display: flex;
435 padding: 12px 18px; 534 padding: 12px 18px;
...@@ -440,14 +539,14 @@ function toSelectClosed() { ...@@ -440,14 +539,14 @@ function toSelectClosed() {
440 color: #493ceb; 539 color: #493ceb;
441 cursor: pointer; 540 cursor: pointer;
442 } 541 }
443 542
444 .tao { 543 .tao {
445 border: 1px solid #493ceb; 544 border: 1px solid #493ceb;
446 font-size: 14px; 545 font-size: 14px;
447 color: #493ceb; 546 color: #493ceb;
448 margin-left: 10px; 547 margin-left: 10px;
449 } 548 }
450 549
451 .tagDisabled { 550 .tagDisabled {
452 padding: 12px 18px; 551 padding: 12px 18px;
453 background: #878787; 552 background: #878787;
...@@ -459,7 +558,7 @@ function toSelectClosed() { ...@@ -459,7 +558,7 @@ function toSelectClosed() {
459 } 558 }
460 } 559 }
461 } 560 }
462 561
463 .btn { 562 .btn {
464 width: 175px; 563 width: 175px;
465 height: 40px; 564 height: 40px;
...@@ -479,7 +578,7 @@ function toSelectClosed() { ...@@ -479,7 +578,7 @@ function toSelectClosed() {
479 padding: 50px; 578 padding: 50px;
480 margin-top: 30px; 579 margin-top: 30px;
481 margin-bottom: 30px; 580 margin-bottom: 30px;
482 581
483 .title { 582 .title {
484 padding: 20px 30px; 583 padding: 20px 30px;
485 background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%); 584 background: linear-gradient(270deg, #493ceb 0%, #8623fc 100%);
...@@ -489,15 +588,15 @@ function toSelectClosed() { ...@@ -489,15 +588,15 @@ function toSelectClosed() {
489 line-height: 30px; 588 line-height: 30px;
490 margin-bottom: 30px; 589 margin-bottom: 30px;
491 } 590 }
492 591
493 .rich_content { 592 .rich_content {
494 margin-top: 30px; 593 margin-top: 30px;
495 594
496 :deep(img) { 595 :deep(img) {
497 width: 100% !important; 596 width: 100% !important;
498 height: auto !important; 597 height: auto !important;
499 } 598 }
500 599
501 } 600 }
502 } 601 }
503 602
...@@ -515,44 +614,44 @@ function toSelectClosed() { ...@@ -515,44 +614,44 @@ function toSelectClosed() {
515 height: 160px; 614 height: 160px;
516 margin-right: 15px; 615 margin-right: 15px;
517 } 616 }
518 617
519 .info { 618 .info {
520 padding: 0; 619 padding: 0;
521 620
522 .title { 621 .title {
523 font-size: 14px; 622 font-size: 14px;
524 margin: 0; 623 margin: 0;
525 } 624 }
526 625
527 .time, .address, .label, .tip { 626 .time, .address, .label, .tip {
528 font-size: 12px; 627 font-size: 12px;
529 } 628 }
530 629
531 .title, .time, .address, .tip, .select_item_box { 630 .title, .time, .address, .tip, .select_item_box {
532 margin-bottom: 3px; 631 margin-bottom: 3px;
533 } 632 }
534 633
535 .select_item_box { 634 .select_item_box {
536 .label { 635 .label {
537 font-size: 12px; 636 font-size: 12px;
538 } 637 }
539 638
540 .select_item .tag { 639 .select_item .tag {
541 padding: 2px 10px; 640 padding: 2px 10px;
542 font-size: 12px; 641 font-size: 12px;
543 } 642 }
544 643
545 .select_item .tagActive { 644 .select_item .tagActive {
546 padding: 2px 10px; 645 padding: 2px 10px;
547 font-size: 12px; 646 font-size: 12px;
548 } 647 }
549 648
550 .select_item .tagDisabled { 649 .select_item .tagDisabled {
551 padding: 2px 10px; 650 padding: 2px 10px;
552 font-size: 12px; 651 font-size: 12px;
553 } 652 }
554 } 653 }
555 654
556 .btn { 655 .btn {
557 display: inline-block; 656 display: inline-block;
558 margin: 10px 0 0; 657 margin: 10px 0 0;
...@@ -570,8 +669,8 @@ function toSelectClosed() { ...@@ -570,8 +669,8 @@ function toSelectClosed() {
570 .bottom { 669 .bottom {
571 padding: 0 670 padding: 0
572 } 671 }
573 672
574 673
575 } 674 }
576 675
577 .countDownTitle { 676 .countDownTitle {
......
...@@ -5,17 +5,16 @@ ...@@ -5,17 +5,16 @@
5 {{ languageFormat(language, "新增", "Add") }} 5 {{ languageFormat(language, "新增", "Add") }}
6 </div> 6 </div>
7 <span> 7 <span>
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,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!