Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panyongping
uni-pdtravel
Commits
259c8674
Commit
259c8674
authored
Apr 17, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外国人身份证bug处理
parent
22be9d25
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
240 deletions
+54
-240
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+9
-8
editContacts-old.vue
pages/scenic/scenicComponents/editContacts-old.vue
+0
-220
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+28
-4
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+17
-8
No files found.
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
259c8674
...
@@ -205,7 +205,8 @@
...
@@ -205,7 +205,8 @@
:key="index2"
:key="index2"
>
>
{{
item2
.
name
}}
{{
item2
.
name
}}
<text
v-if=
"item2.contactVos.length==0"
style=
"font-size: 20rpx;color: #ff0000;"
>
请补充证件
</text>
<!-- contactVos为该联系人满足该产品的证件信息列表 -->
<text
v-if=
"!item2.contactVos||item2.contactVos.length==0"
style=
"font-size: 20rpx;color: #ff0000;"
>
请补充证件
</text>
<view
v-if=
"item2.ifChoose"
class=
"date-icon"
>
<view
v-if=
"item2.ifChoose"
class=
"date-icon"
>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
</view>
</view>
...
@@ -898,7 +899,6 @@ export default {
...
@@ -898,7 +899,6 @@ export default {
}))
}))
//由于数据结构变化,重新组装数据
//由于数据结构变化,重新组装数据
if
(
item2
.
contactVos
.
length
>
0
){
if
(
item2
.
contactVos
.
length
>
0
){
item2
.
id
=
item2
.
contactVos
[
0
].
id
item2
.
credentialNumber
=
item2
.
contactVos
[
0
].
credentialNumber
item2
.
credentialNumber
=
item2
.
contactVos
[
0
].
credentialNumber
item2
.
credentialType
=
item2
.
contactVos
[
0
].
credentialType
item2
.
credentialType
=
item2
.
contactVos
[
0
].
credentialType
}
}
...
@@ -939,13 +939,15 @@ export default {
...
@@ -939,13 +939,15 @@ export default {
})
})
this
.
productList
.
forEach
((
item
)
=>
{
this
.
productList
.
forEach
((
item
)
=>
{
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
item
.
contactTotal
=
JSON
.
parse
(
JSON
.
stringify
(
contactTotal
))
for
(
let
i
=
0
;
i
<
item
.
contactNum
;
i
++
)
{
item
.
chooseContact
=
[]
let
item2
=
item
.
contactTotal
[
i
]
||
null
for
(
let
i
=
0
;
i
<
item
.
contactTotal
.
length
;
i
++
){
if
(
item2
)
{
let
item2
=
item
.
contactTotal
[
i
]
item2
.
ifChoose
=
true
//联系人满足证件要求,并且选中联系人数量小于需要的联系人数量时
if
(
item2
.
contactVos
.
length
>
0
&&
item
.
chooseContact
.
length
<
item
.
contactNum
){
item2
.
ifChoose
=
true
item
.
chooseContact
.
push
(
item2
)
}
}
}
}
item
.
chooseContact
=
item
.
contactTotal
.
slice
(
0
,
item
.
contactNum
)
//用于联系人证件信息对应该产品是否填写判断
//用于联系人证件信息对应该产品是否填写判断
if
(
item
.
credential
){
if
(
item
.
credential
){
//credential对应是该产品联系人可以填写的联系人证件列表
//credential对应是该产品联系人可以填写的联系人证件列表
...
@@ -963,7 +965,6 @@ export default {
...
@@ -963,7 +965,6 @@ export default {
}))
}))
//由于数据结构变化,重新组装数据
//由于数据结构变化,重新组装数据
if
(
item2
.
contactVos
.
length
>
0
){
if
(
item2
.
contactVos
.
length
>
0
){
item2
.
id
=
item2
.
contactVos
[
0
].
id
item2
.
credentialNumber
=
item2
.
contactVos
[
0
].
credentialNumber
item2
.
credentialNumber
=
item2
.
contactVos
[
0
].
credentialNumber
item2
.
credentialType
=
item2
.
contactVos
[
0
].
credentialType
item2
.
credentialType
=
item2
.
contactVos
[
0
].
credentialType
}
}
...
...
pages/scenic/scenicComponents/editContacts-old.vue
deleted
100644 → 0
View file @
22be9d25
<
template
>
<view
class=
"edit-bg"
v-show=
"showPop"
>
<view
class=
"edit-wrap"
>
<view
class=
"return"
@
click=
"showPop = false"
>
<view>
新增/编辑联系人
</view>
<view
class=
"return-icon"
>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
<view
class=
"editTop"
>
</view>
<view
class=
"editBottom"
>
<view
class=
"bottomContent"
>
<view>
<text
class=
"bottom-title"
>
姓名:
</text>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
</view>
<view>
<text
class=
"bottom-title"
>
身份证:
</text>
<input
v-model
.
trim=
"credentialNumber"
maxlength=
"18"
placeholder=
"请输入身份证号码,必填"
/>
</view>
<view>
<text
class=
"bottom-title"
>
联系电话:
</text>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
</view>
<view>
<text
class=
"complete"
@
click=
"keepSave()"
>
完成
</text>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
[
'editContactData'
],
data
()
{
return
{
showPop
:
false
,
//控制组件显示隐藏
name
:
''
,
//姓名
credentialNumber
:
''
,
//身份证号
phone
:
''
,
//手机号码
reviseContactId
:
''
,
//被修改人id
}
},
watch
:
{
editContactData
:
{
handler
(
newValue
,
oldValue
)
{
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
phone
=
newValue
.
phone
||
''
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
//---保存
keepSave
()
{
if
(
!
this
.
name
){
uni
.
showToast
({
title
:
'请输入姓名'
,
icon
:
'none'
})
return
}
if
(
!
this
.
credentialNumber
){
uni
.
showToast
({
title
:
'请输入证件号码'
,
icon
:
'none'
})
return
}
if
(
this
.
phone
&&!
this
.
$commonjs
.
phoneReg
().
test
(
this
.
phone
))
{
uni
.
showToast
({
title
:
'请输入正确电话号码'
,
icon
:
'none'
})
return
}
let
data
=
{
name
:
this
.
name
,
//保存姓名
phone
:
this
.
phone
,
//电话号码
credentialNumber
:
this
.
credentialNumber
,
//身份证号
openid
:
uni
.
getStorageSync
(
'openid'
),
//用户Id
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
id
:
this
.
reviseContactId
,
//被修改人id
category
:
''
,
//成人或者儿童
credentialsType
:
''
,
//证件类型
}
let
queryUrl
=
''
if
(
this
.
reviseContactId
){
queryUrl
=
'wechatUser/contact/updateContact'
}
else
{
queryUrl
=
'wechatUser/contact/saveContact'
}
this
.
$request
(
queryUrl
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
})
if
(
!
this
.
reviseContactId
){
//新增的时候
this
.
$parent
.
addChoose
()
//显示联系人列表弹窗
this
.
$parent
.
$refs
.
contactList
.
showPop
=
true
//成功之后清空数据,防止下次新增的时候出现之前的数据
this
.
name
=
''
this
.
credentialNumber
=
''
this
.
phone
=
''
}
else
{
this
.
$parent
.
getContactList
()
}
//关闭当前弹窗
this
.
showPop
=
false
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
}
}
}
</
script
>
<
style
scoped=
"scoped"
lang=
"scss"
>
.edit-bg
{
background
:rgba
(
0
,
0
,
0
,
0
.4
)
;
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
1000
;
padding-top
:
100rpx
;
}
.edit-wrap
{
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background
:
#ffffff
;
border-radius
:
20rpx
;
}
.return
{
height
:
100rpx
;
display
:
flex
;
align-items
:
center
;
background
:
#FFF1E8
;
color
:
#FC771D
;
justify-content
:
center
;
font-weight
:
bold
;
font-size
:
32rpx
;
position
:
relative
;
border-radius
:
20rpx
20rpx
0
0
;
}
.return-icon
{
position
:
absolute
;
right
:
24rpx
;
}
.editTop
{
height
:
200rpx
;
background
:
linear-gradient
(
to
bottom
,
#2984ef
,
#d8eaf6
);
}
.editBottom
{
position
:
relative
;
top
:
-80rpx
;
padding
:
0
20rpx
;
}
.bottomContent
{
border-radius
:
20rpx
;
background
:
#FFFFFF
;
padding
:
20rpx
20rpx
60rpx
20rpx
;
}
.bottomContent
view
{
height
:
100rpx
;
align-items
:
center
;
display
:
flex
;
border-bottom
:
1px
solid
#f0f0f0
;
}
.bottom-title
{
display
:
inline-block
;
width
:
140rpx
;
text-align-last
:
justify
;
margin-right
:
20rpx
;
}
.bottomContent
view
input
{
flex
:
1
;
}
.bottomContent
view
:last-child
{
margin-top
:
60rpx
;
border
:
none
;
}
.complete
{
width
:
100%
;
height
:
70rpx
;
border-radius
:
16rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
line-height
:
70rpx
;
background
:
$theme
;
display
:
inline-block
;
}
</
style
>
pages/scenic/scenicComponents/editContacts.vue
View file @
259c8674
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
姓名
姓名
</text>
</text>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
placeholder-class=
"placeholderStyle"
/>
</view>
</view>
<view
@
click=
"showIdType=true"
v-if=
"credentialList.length>1"
>
<view
@
click=
"showIdType=true"
v-if=
"credentialList.length>1"
>
...
@@ -43,8 +43,16 @@
...
@@ -43,8 +43,16 @@
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
证件号
证件号
</text>
</text>
<input
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length==1"
:placeholder=
"placeholderText"
/>
<input
<input
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length>1"
placeholder=
"请输入证件号码,必填"
/>
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length==1"
:placeholder=
"placeholderText"
placeholder-class=
"placeholderStyle"
/>
<input
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length>1"
placeholder=
"请输入证件号码,必填"
placeholder-class=
"placeholderStyle"
/>
</view>
</view>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
...
@@ -196,7 +204,6 @@ export default {
...
@@ -196,7 +204,6 @@ export default {
icon
:
'none'
icon
:
'none'
})
})
if
(
!
this
.
reviseContactId
){
if
(
!
this
.
reviseContactId
){
//新增的时候
this
.
$parent
.
addChoose
()
this
.
$parent
.
addChoose
()
//显示联系人列表弹窗
//显示联系人列表弹窗
this
.
$parent
.
$refs
.
contactList
.
showPop
=
true
this
.
$parent
.
$refs
.
contactList
.
showPop
=
true
...
@@ -306,4 +313,21 @@ export default {
...
@@ -306,4 +313,21 @@ export default {
align-items
:
center
;
align-items
:
center
;
border-bottom
:
1px
solid
#f3f3f3
;
border-bottom
:
1px
solid
#f3f3f3
;
}
}
.placeholderStyle
{
color
:
$theme
!
important
;
}
input
:
:-
webkit-input-placeholder
{
color
:
$theme
;
}
input
:
:-
moz-placeholder
{
/* Firefox 18- */
color
:
$theme
;
opacity
:
1
;
/* 修复Firefox的不透明度问题 */
}
input
:
-
moz-placeholder
{
/* Firefox 19+ */
color
:
$theme
;
opacity
:
1
;
/* 修复Firefox的不透明度问题 */
}
input
:
-
ms-input-placeholder
{
color
:
$theme
;
}
</
style
>
</
style
>
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
259c8674
...
@@ -247,7 +247,8 @@
...
@@ -247,7 +247,8 @@
:key="index"
:key="index"
>
>
{{
item
.
name
}}
{{
item
.
name
}}
<text
v-if=
"item.contactVos.length==0"
style=
"font-size: 20rpx;color: #ff0000;"
>
请补充证件
</text>
<!-- contactVos为该联系人满足该产品的证件信息列表 -->
<text
v-if=
"!item.contactVos||item.contactVos.length==0"
style=
"font-size: 20rpx;color: #ff0000;"
>
请补充证件
</text>
<view
v-if=
"item.ifChoose"
class=
"date-icon"
>
<view
v-if=
"item.ifChoose"
class=
"date-icon"
>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
</view>
</view>
...
@@ -972,7 +973,6 @@ export default {
...
@@ -972,7 +973,6 @@ export default {
//由于数据结构变化,重新组装数据
//由于数据结构变化,重新组装数据
this
.
contactTotal
.
forEach
(
item
=>
{
this
.
contactTotal
.
forEach
(
item
=>
{
if
(
item
.
contactVos
.
length
>
0
){
if
(
item
.
contactVos
.
length
>
0
){
item
.
id
=
item
.
contactVos
[
0
].
id
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
}
}
...
@@ -1016,22 +1016,31 @@ export default {
...
@@ -1016,22 +1016,31 @@ export default {
}
}
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
this
.
$request
(
'wechatUser/contact/findContactList'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
contactTotal
=
res
.
data
||
[]
this
.
contactTotal
=
res
.
data
||
[]
//由于数据结构变化,重新组装数据
//由于数据结构变化,重新组装数据
this
.
contactTotal
.
forEach
(
item
=>
{
this
.
contactTotal
.
forEach
(
item
=>
{
if
(
item
.
contactVos
.
length
>
0
){
if
(
item
.
contactVos
.
length
>
0
){
item
.
id
=
item
.
contactVos
[
0
].
id
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
}
}
})
})
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
this
.
chooseContact
=
[]
let
item
=
this
.
contactTotal
[
i
]
||
null
for
(
let
i
=
0
;
i
<
this
.
contactTotal
.
length
;
i
++
){
if
(
item
)
{
let
item
=
this
.
contactTotal
[
i
]
item
.
ifChoose
=
true
//联系人满足证件要求,并且选中联系人数量小于需要的联系人数量时
if
(
item
.
contactVos
.
length
>
0
&&
this
.
chooseContact
.
length
<
this
.
contactNum
){
item
.
ifChoose
=
true
this
.
chooseContact
.
push
(
item
)
}
}
}
}
this
.
chooseContact
=
this
.
contactTotal
.
slice
(
0
,
this
.
contactNum
)
// for (let i = 0; i
<
this
.
contactNum
;
i
++
)
{
// let item = this.contactTotal[i] || null
// if (item) {
// item.ifChoose = true
// }
// }
// this.chooseContact = this.contactTotal.slice(0, this.contactNum)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment