Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e0853354
authored
2025-05-26 15:34:11 +0800
by
华明祺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
4d13c8e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
27 deletions
src/apiPc/booking.js
src/utils/request.js
src/viewsPc/booking/ticket/confirmOrder.vue
src/viewsPc/booking/ticket/index.vue
src/apiPc/booking.js
View file @
e085335
...
...
@@ -527,6 +527,14 @@ export function getListByAtstId(params) {
})
}
export
function
getDeskInfo
(
params
)
{
return
request
({
url
:
`/ota/activitySeat/getDeskInfo`
,
method
:
'get'
,
params
})
}
// 根据赛事ID获取票档
export
function
getTicketListApi
(
params
)
{
return
request
({
...
...
@@ -655,4 +663,10 @@ export function getMyFriends() {
})
}
export
function
checkPurchasedCustomers
(
data
)
{
return
request
({
url
:
`/ota/orderCustomer/checkPurchasedCustomers `
,
method
:
'post'
,
data
})
}
...
...
src/utils/request.js
View file @
e085335
...
...
@@ -15,15 +15,15 @@ import useUserStore from '@/store/modules/user'
import
{
sendNotification
}
from
'@/assets/lib/extend'
import
_
from
'lodash'
// const language = cache.local.get('language') || 0
import
{
useStorage
}
from
"@vueuse/core/index"
;
const
language
=
useStorage
(
'language'
,
0
)
import
{
useStorage
}
from
'@vueuse/core/index'
const
language
=
useStorage
(
'language'
,
0
)
let
downloadLoadingInstance
// 是否显示重新登录
export
const
isRelogin
=
{
show
:
false
}
axios
.
defaults
.
headers
[
'Content-Type'
]
=
'application/json;charset=utf-8'
// 对应国际化资源文件后缀
axios
.
defaults
.
headers
[
'Content-Language'
]
=
(
language
.
value
==
0
?
'zh_CN'
:
'en_US'
)
axios
.
defaults
.
headers
[
'Content-Language'
]
=
(
language
.
value
==
0
?
'zh_CN'
:
'en_US'
)
// 创建axios实例
const
service
=
axios
.
create
({
// axios中请求配置有baseURL选项,表示请求URL公共部分
...
...
@@ -34,7 +34,7 @@ const service = axios.create({
const
otherWeb
=
[
'ztx-match/'
,
'ztx-webSite/'
,
'ztx-train/'
]
const
excludeUrl
=
[
'system/remindCount/getCounts'
]
const
noModal
=
[
'person/info/extractInfo'
]
const
noModal
=
[
'person/info/extractInfo'
,
'ota/orderCustomer/checkPurchasedCustomers'
]
// request拦截器
service
.
interceptors
.
request
.
use
(
...
...
@@ -143,7 +143,7 @@ service.interceptors.response.use(
if
(
code
===
401
)
{
if
(
!
isRelogin
.
show
)
{
isRelogin
.
show
=
true
// ElMessage({ message: '登录状态已过期', type: 'error' })
// ElMessage({ message: '登录状态已过期', type: 'error' })
// ElMessageBox.confirm(
// '登录状态已过期,您可以继续留在该页面,或者重新登录',
// '系统提示',
...
...
@@ -167,10 +167,10 @@ service.interceptors.response.use(
}
return
Promise
.
reject
(
'会话已过期,请重新登录。'
)
}
else
if
(
code
===
500
)
{
if
(
msg
)
{
ElMessage
({
message
:
msg
,
type
:
'error'
})
sendNotification
(
'错误提示'
,
{
body
:
msg
})
}
if
(
msg
)
{
ElMessage
({
message
:
msg
,
type
:
'error'
})
sendNotification
(
'错误提示'
,
{
body
:
msg
})
}
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
===
601
)
{
ElMessage
({
message
:
msg
,
type
:
'warning'
})
...
...
src/viewsPc/booking/ticket/confirmOrder.vue
View file @
e085335
...
...
@@ -31,6 +31,21 @@
<div
class=
"form"
>
<el-form
ref=
"formRef"
:model=
"orderForm"
:rules=
"rules"
label-width=
"120px"
>
<div
v-if=
"TickForm2.ticketType == '1'"
>
<el-form-item
:label=
"language == 0 ? '桌号' : 'zuohao'"
>
<el-radio-group
v-model=
"currDesk"
>
<el-radio-button
v-for=
"(it, index) in deskList"
:key=
"index"
:label=
"it.deskNo"
:value=
"it"
:disabled=
"it.status!=0"
/>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"language == 0 ? '座位号' : 'zuoweihao'"
>
<el-checkbox-group
v-model=
"currSeat"
>
<el-checkbox-button
v-for=
"(it, index) in currDesk?.seatList"
:key=
"index"
:label=
"it.seatNo"
:value=
"it"
:disabled=
"it.status!=0"
/>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"已选座位号"
>
<el-tag
v-for=
"s in currSeat"
:key=
"s.id"
>
{{
s
.
deskNo
}}
-
{{
s
.
seatNo
}}
</el-tag>
</el-form-item>
</div>
<el-form-item
:label=
"language == 0 ? '联系人' : 'contact person'"
prop=
"contacts"
>
...
...
@@ -66,6 +81,7 @@
</div>
<el-checkbox
:value=
"it.id"
:disabled=
"!!it.disabled"
/>
</div>
</el-checkbox-group>
...
...
@@ -128,7 +144,6 @@
{{
languageFormat
(
language
,
"立即支付"
,
"Pay Now"
)
}}
</div>
</div>
</div>
</el-card>
...
...
@@ -141,7 +156,9 @@ import {
submitOrderTicket
,
getTicketInfoByActivityId
,
getActivityTypeVoById
,
getListByAtstId
getListByAtstId
,
checkPurchasedCustomers
,
getDeskInfo
}
from
'@/apiPc/booking'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
languageFormat
}
from
'@/viewsPc/seat/utils/language.js'
...
...
@@ -191,6 +208,9 @@ const formRef = ref(null)
const
TickForm
=
ref
({})
const
TickForm2
=
ref
({})
const
TickForm3
=
ref
({})
const
deskList
=
ref
([])
const
currDesk
=
ref
(
null
)
const
currSeat
=
ref
([])
onMounted
(()
=>
{
customerList
()
...
...
@@ -200,27 +220,53 @@ onMounted(() => {
id
:
route
.
params
.
latstId
}).
then
((
res
)
=>
{
TickForm2
.
value
=
res
.
data
})
getListByAtstId
({
atstId
:
route
.
params
.
latstId
}).
then
(
res
=>
{
TickForm3
.
value
=
res
.
data
}).
then
(()
=>
{
// vip
if
(
TickForm2
.
value
.
ticketType
==
'1'
)
{
getDeskInfo
({
atstId
:
route
.
params
.
latstId
}).
then
(
res
=>
{
deskList
.
value
=
res
.
data
currDesk
.
value
=
res
.
data
[
0
]
})
}
// 普通票
else
{
getListByAtstId
({
atstId
:
route
.
params
.
latstId
}).
then
(
res
=>
{
TickForm3
.
value
=
res
.
data
[
0
]
})
}
})
})
function
changeGroup
(
e
)
{
if
(
e
.
length
>
0
)
{
checkPurchasedCustomers
({
atstId
:
route
.
params
.
latstId
,
customers
:
e
}).
then
(
res
=>
{
if
(
res
.
data
.
length
>
0
)
{
const
names
=
_
.
map
(
res
.
data
,
(
d
)
=>
d
.
name
).
join
(
','
)
ElMessage
({
message
:
language
.
value
==
0
?
`
${
names
}
已购买该票`
:
'The user has purchased the ticket'
,
type
:
'error'
})
_
.
each
(
res
.
data
,
(
d
)
=>
{
_
.
remove
(
orderForm
.
value
.
customerIds
,
(
c
)
=>
c
==
d
.
id
)
_
.
find
(
personnelList
.
value
,
(
p
)
=>
p
.
id
==
d
.
id
).
disabled
=
true
})
}
})
}
}
// 获取人员列表
async
function
customerList
()
{
const
res
=
await
customerListApi
({
activeId
:
orderForm
.
value
.
activeId
,
attId
:
orderForm
.
value
.
attId
,
atId
:
orderForm
.
value
.
atId
})
const
res
=
await
customerListApi
()
personnelList
.
value
=
res
.
rows
}
...
...
@@ -231,6 +277,21 @@ async function paymentHandle() {
return
}
if
(
currSeat
.
value
.
length
==
0
)
{
ElMessage
({
message
:
language
.
value
==
0
?
'请选择座位'
:
'Please select the seat'
,
type
:
'error'
})
return
}
if
(
currSeat
.
value
.
length
!=
orderForm
.
value
.
customerIds
.
length
)
{
ElMessage
({
message
:
language
.
value
==
0
?
'座位数与人数不一致'
:
''
,
type
:
'error'
})
return
}
await
formRef
.
value
.
validate
()
await
ElMessageBox
.
confirm
(
language
.
value
==
0
?
'确认提交订单吗?'
:
'Confirm to submit the order?'
,
{
...
...
@@ -240,14 +301,17 @@ async function paymentHandle() {
}).
then
(
async
()
=>
{
try
{
const
orderCustomerList
=
[]
_
.
each
(
orderForm
.
value
.
customerIds
,
(
id
)
=>
{
_
.
each
(
orderForm
.
value
.
customerIds
,
(
id
,
index
)
=>
{
const
person
=
_
.
find
(
personnelList
.
value
,
(
item
)
=>
item
.
id
==
id
)
const
tempSeat
=
currSeat
.
value
[
index
]
||
{}
orderCustomerList
.
push
({
customerId
:
person
.
id
,
name
:
person
.
name
,
idcType
:
person
.
idcType
,
idCard
:
person
.
idCard
,
paymentType
:
language
.
value
==
0
?
'1'
:
'3'
paymentType
:
language
.
value
==
0
?
'1'
:
'3'
,
deskNo
:
tempSeat
.
deskNo
,
seatNo
:
tempSeat
.
seatNo
})
})
...
...
src/viewsPc/booking/ticket/index.vue
View file @
e085335
...
...
@@ -248,7 +248,7 @@ import {
}
from
'@/apiPc/booking'
import
{
dayjs
}
from
'element-plus'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
ElMessageBox
}
from
'element-plus'
import
{
getDayName
}
from
'@/viewsPc/seat/utils/language'
import
{
fillImgUrl
}
from
'/@/utils/ruoyi'
import
useUserStore
from
'/@/store/modules/user'
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment