Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
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
dbdcd04a
authored
2025-06-06 16:42:25 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
旅游
1 parent
fdbe1b99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
52 deletions
src/viewsPc/booking/component/choosePerson.vue
src/viewsPc/booking/component/choosePerson.vue
View file @
dbdcd04
<
template
>
<el-dialog
v-model=
"show"
width=
"500"
:title=
"languageFormat(language, '出行人信息', 'Travelers')"
center
append-to-body
>
<el-button
type=
"primary"
plain
@
click=
"addPeopl"
>
{{
languageFormat
(
language
,
"新增"
,
"Add"
)
}}
</el-button>
<el-dialog
v-model=
"show"
:title=
"languageFormat(language, '出行人信息', 'Travelers')"
append-to-body
center
width=
"500"
>
<el-button
plain
type=
"primary"
@
click=
"addPeopl"
>
{{
languageFormat
(
language
,
"新增"
,
"Add"
)
}}
</el-button>
<el-radio-group
v-model=
"personId"
>
<div
v-for=
"(it, index) in personList"
:key=
"index"
class=
"e_item"
>
<el-radio
border
:value=
"it.id"
:disabled=
"hasPersonIds?.indexOf(it.id)!=-1"
>
<el-radio
:disabled=
"hasPersonIds?.indexOf(it.id)!=-1"
:value=
"it.id"
border
>
<div
class=
"name"
>
{{
it
.
name
}}
</div>
<div
class=
"code"
>
<span
v-if=
"it.idcType==0"
>
{{
language
==
0
?
'身份证'
:
'ID number'
}}
</span>
<span
v-if=
"it.idcType==1"
>
{{
language
==
0
?
'护照'
:
'Passport'
}}
</span>
<span
v-if=
"it.idcType==2"
>
{{
language
==
0
?
'其他'
:
'Other'
}}
</span>
{{
it
.
idCard
}}
</div>
</el-radio>
</div>
</el-radio-group>
...
...
@@ -25,28 +27,28 @@
</div>
</
template
>
</el-dialog>
<el-dialog
v-model=
"showAdd"
:title=
"language ==0?'新增出行人':'Add traveler'"
center
append-to-body
>
<el-dialog
v-model=
"showAdd"
:title=
"language ==0?'新增出行人':'Add traveler'"
append-to-body
center
>
<el-form
ref=
"formRef"
:model=
"form"
label-width=
"100px"
size=
"large"
style=
"margin: 80px"
ref=
"formRef"
:model=
"form"
label-width=
"100px"
size=
"large"
style=
"margin: 80px"
>
<el-form-item
:label=
"language==0?'姓名':'name'"
prop=
"name"
required
:show-message=
"false"
>
<el-input
v-model=
"form.name"
:placeholder=
"language==0?'请输入':'Please input'"
/>
<el-form-item
:label=
"language==0?'姓名':'name'"
:show-message=
"false"
prop=
"name"
required
>
<el-input
v-model=
"form.name"
:placeholder=
"language==0?'请输入':'Please input'"
/>
</el-form-item>
<el-form-item
:label=
"language==0?'证件类型':'ID Type'"
prop=
"idcType"
required
:show-message=
"false"
>
<el-form-item
:label=
"language==0?'证件类型':'ID Type'"
:show-message=
"false"
prop=
"idcType"
required
>
<el-select
v-model=
"form.idcType"
:placeholder=
"language==0?'请选择':'Please choose'"
>
<el-option
:label=
"language==0?'身份证':'Identity card'"
value=
"0"
/>
<el-option
:label=
"language==0?'护照':'Passport'"
value=
"1"
/>
<el-option
:label=
"language==0?'其他':'Other'"
value=
"2"
/>
<el-option
:label=
"language==0?'身份证':'Identity card'"
value=
"0"
/>
<el-option
:label=
"language==0?'护照':'Passport'"
value=
"1"
/>
<el-option
:label=
"language==0?'其他':'Other'"
value=
"2"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"language==0?'证件号':'ID number'"
prop=
"idCard"
required
:show-message=
"false"
>
<el-input
v-model=
"form.idCard"
:placeholder=
"language==0?'请输入证件号':'Please enter the ID after ah'"
/>
<el-form-item
:label=
"language==0?'证件号':'ID number'"
:show-message=
"false"
prop=
"idCard"
required
>
<el-input
v-model=
"form.idCard"
:placeholder=
"language==0?'请输入证件号':'Please enter the ID after ah'"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
class=
"can_pay"
@
click=
"showAdd = false"
>
{{
language
==
0
?
'取 消'
:
'cancel'
}}
</el-button>
...
...
@@ -58,15 +60,15 @@
</template>
<
script
setup
>
import
{
aadSceneCustomer
,
checkSceneCustomer
,
getMyFriends
}
from
'/@/apiPc/booking'
import
{
languageFormat
}
from
'/@/viewsPc/seat/utils/language'
import
{
onMounted
,
ref
}
from
'vue'
import
{
useStorage
}
from
'@vueuse/core/index'
import
{
aadSceneCustomer
,
checkSceneCustomer
,
getMyFriends
}
from
'/@/apiPc/booking'
import
{
languageFormat
}
from
'/@/viewsPc/seat/utils/language'
import
{
onMounted
,
ref
}
from
'vue'
import
{
useStorage
}
from
'@vueuse/core/index'
import
_
from
'lodash'
import
{
getCurrentInstance
}
from
'@vue/runtime-core'
import
{
getCurrentInstance
}
from
'@vue/runtime-core'
const
emit
=
defineEmits
([
'addPerson'
])
const
{
proxy
}
=
getCurrentInstance
()
const
{
proxy
}
=
getCurrentInstance
()
const
show
=
ref
(
false
)
const
showAdd
=
ref
(
false
)
...
...
@@ -95,27 +97,34 @@ const addPeopl = () => {
const
addPerson
=
()
=>
{
const
person
=
_
.
find
(
personList
.
value
,
(
it
)
=>
it
.
id
==
personId
.
value
)
checkSceneCustomer
({
show
.
value
=
false
emit
(
'addPerson'
,
Object
.
assign
(
currParams
,
{
customerId
:
person
.
id
,
gateType
:
currParams
.
gateType
}).
then
((
res
)
=>
{
if
(
res
.
data
==
201
)
{
proxy
.
$modal
.
msgError
(
language
.
value
==
0
?
'护照只能购买成人票'
:
'Passport can only buy adult tickets'
)
}
else
if
(
res
.
data
==
202
)
{
proxy
.
$modal
.
msgError
(
language
.
value
==
0
?
'此身份证不能购买老人票'
:
'This ID cannot buy senior tickets'
)
}
else
if
(
res
.
data
==
203
)
{
proxy
.
$modal
.
msgError
(
language
.
value
==
0
?
'此身份证不能购买儿童票'
:
'This ID cannot buy child tickets'
)
}
else
{
show
.
value
=
false
emit
(
'addPerson'
,
Object
.
assign
(
currParams
,
{
customerId
:
person
.
id
,
name
:
person
.
name
,
idcType
:
person
.
idcType
,
idCard
:
person
.
idCard
}))
}
})
name
:
person
.
name
,
idcType
:
person
.
idcType
,
idCard
:
person
.
idCard
}))
// checkSceneCustomer({
// customerId: person.id,
// gateType: currParams.gateType
// }).then((res) => {
// if (res.data == 201) {
// proxy.$modal.msgError(language.value == 0 ? '护照只能购买成人票' : 'Passport can only buy adult tickets')
// } else if (res.data == 202) {
// proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买老人票' : 'This ID cannot buy senior tickets')
// } else if (res.data == 203) {
// proxy.$modal.msgError(language.value == 0 ? '此身份证不能购买儿童票' : 'This ID cannot buy child tickets')
// } else {
// show.value = false
// emit('addPerson', Object.assign(currParams, {
// customerId: person.id,
// name: person.name,
// idcType: person.idcType,
// idCard: person.idCard
// }))
// }
// })
}
const
submit
=
()
=>
{
...
...
@@ -144,14 +153,14 @@ defineExpose({
currParams
=
params
personId
.
value
=
params
.
customerId
hasPersonIds
.
value
=
params
.
hasCustomerIds
show
.
value
=
true
}
})
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
lang=
"scss"
scoped
>
.el-radio-group
{
display
:
block
;
}
...
...
@@ -159,17 +168,17 @@ defineExpose({
.e_item
{
margin
:
20px
0
0
0
;
width
:
100%
;
.el-radio
{
width
:
100%
;
height
:
auto
;
padding
:
10px
;
}
.name
{
font-size
:
16px
;
}
.code
{
font-size
:
14px
;
margin
:
4px
0
0
;
...
...
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