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
a55fb317
Commit
a55fb317
authored
Apr 11, 2024
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
外国人身份证开发
parent
b7b3bbfc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
91 deletions
+141
-91
contactList.vue
pages/scenic/scenicComponents/contactList.vue
+9
-7
editContacts-old.vue
pages/scenic/scenicComponents/editContacts-old.vue
+7
-73
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+97
-8
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+28
-3
No files found.
pages/scenic/scenicComponents/contactList.vue
View file @
a55fb317
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<checkbox-group
@
change=
"chooseContactChange"
>
<checkbox-group
@
change=
"chooseContactChange"
>
<view
class=
"bottom-list"
v-for=
"(item,index) of listTotal"
:key=
"item.id"
>
<view
class=
"bottom-list"
v-for=
"(item,index) of listTotal"
:key=
"item.id"
>
<label>
<label>
<checkbox
class=
"blue"
:value=
"JSON.stringify(item)"
:checked=
"item.ifChoose"
color=
"#3688ff"
/>
<checkbox
class=
"blue"
:value=
"JSON.stringify(item)"
:checked=
"item.ifChoose"
color=
"#3688ff"
:disabled=
"item.contactVos.length==0"
/>
<view
class=
"bottom-content"
>
<view
class=
"bottom-content"
>
<view>
<view>
{{
item
.
name
}}
{{
item
.
name
}}
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<view
@
click=
"goEdit(item)"
style=
"margin-right:30rpx;"
>
<view
@
click=
"goEdit(item)"
style=
"margin-right:30rpx;"
>
<u-icon
name=
"edit-pen"
color=
"#3688ff"
size=
"56"
></u-icon>
<u-icon
name=
"edit-pen"
color=
"#3688ff"
size=
"56"
></u-icon>
</view>
</view>
<view
@
click=
"clickDele(item
.id
)"
>
<view
@
click=
"clickDele(item)"
>
<u-icon
name=
"trash-fill"
color=
"#3688ff"
size=
"56"
></u-icon>
<u-icon
name=
"trash-fill"
color=
"#3688ff"
size=
"56"
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -81,8 +81,8 @@ export default {
...
@@ -81,8 +81,8 @@ export default {
showPop
:
false
,
//控制联系人弹窗显示隐藏
showPop
:
false
,
//控制联系人弹窗显示隐藏
listTotal
:[],
//所有联系人
listTotal
:[],
//所有联系人
showModal
:
false
,
//确认弹窗显示隐藏
showModal
:
false
,
//确认弹窗显示隐藏
contact
Id
:
''
,
//删除联系人的Id
contact
Name
:
''
,
//删除联系人的Id
contactopenid
:
''
,
//删除联系人的openid
}
}
},
},
methods
:
{
methods
:
{
...
@@ -126,14 +126,16 @@ export default {
...
@@ -126,14 +126,16 @@ export default {
})
})
},
},
//---点击删除
//---点击删除
clickDele
(
i
d
)
{
clickDele
(
i
tem
)
{
this
.
showModal
=
true
this
.
showModal
=
true
this
.
contactId
=
id
this
.
contactName
=
item
.
name
this
.
contactopenid
=
item
.
openid
},
},
//---确认删除
//---确认删除
confirmDele
(){
confirmDele
(){
let
data
=
{
let
data
=
{
id
:
this
.
contactId
name
:
this
.
contactName
,
//联系人姓名
openid
:
this
.
contactopenid
//联系人openid
}
}
this
.
$request
(
'wechatUser/contact/deleteContact'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'wechatUser/contact/deleteContact'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
...
...
pages/scenic/scenicComponents/editContacts
-new
.vue
→
pages/scenic/scenicComponents/editContacts
-old
.vue
View file @
a55fb317
...
@@ -17,37 +17,20 @@
...
@@ -17,37 +17,20 @@
<view
class=
"bottomContent"
>
<view
class=
"bottomContent"
>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
姓名
姓名
:
</text>
</text>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
</view>
</view>
<view
@
click=
"showIdType=true"
v-if=
"credentialList.length>1"
>
<text
class=
"bottom-title"
>
证件类型
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==0"
>
身份证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==1"
>
护照
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==2"
>
港澳通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==3"
>
台胞通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==4"
>
台胞证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==5"
>
回乡证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==6"
>
外国人永久居留证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==7"
>
学生证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==8"
>
军官证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==9"
>
残疾军人证
</text>
<u-icon
name=
"arrow-right"
size=
'26'
color=
'#B4B4B4'
></u-icon>
</view>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
证件号
身份证:
</text>
</text>
<input
v-model
.
trim=
"credentialNumber"
placeholder=
"请输入证件
号码,必填"
/>
<input
v-model
.
trim=
"credentialNumber"
maxlength=
"18"
placeholder=
"请输入身份证
号码,必填"
/>
</view>
</view>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
联系电话
联系电话
:
</text>
</text>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
</view>
</view>
...
@@ -57,35 +40,12 @@
...
@@ -57,35 +40,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 证件类型弹窗 -->
<u-popup
:show=
"showIdType"
:round=
"20"
@
close=
"showIdType = false"
closeable
>
<view
style=
"padding: 24rpx;"
>
<view
style=
"text-align: center;padding-bottom:20rpx;"
>
证件类型
</view>
<view
v-for=
"(item,index) in credentialList"
:key=
'index'
class=
"idList"
@
click=
"chooseCredential(item)"
>
<text
v-if=
"item==0"
>
身份证
</text>
<text
v-if=
"item==1"
>
护照
</text>
<text
v-if=
"item==2"
>
港澳通行证
</text>
<text
v-if=
"item==3"
>
台胞通行证
</text>
<text
v-if=
"item==4"
>
台胞证
</text>
<text
v-if=
"item==5"
>
回乡证
</text>
<text
v-if=
"item==6"
>
外国人永久居留证
</text>
<text
v-if=
"item==7"
>
学生证
</text>
<text
v-if=
"item==8"
>
军官证
</text>
<text
v-if=
"item==9"
>
残疾军人证
</text>
<u-icon
name=
'checkmark'
size=
'48'
color=
'#3688FF'
v-if=
"credentialType==item"
></u-icon>
</view>
</view>
</u-popup>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'editContactData'
,
'credential'
],
props
:
[
'editContactData'
],
data
()
{
data
()
{
return
{
return
{
showPop
:
false
,
//控制组件显示隐藏
showPop
:
false
,
//控制组件显示隐藏
...
@@ -93,9 +53,6 @@ export default {
...
@@ -93,9 +53,6 @@ export default {
credentialNumber
:
''
,
//身份证号
credentialNumber
:
''
,
//身份证号
phone
:
''
,
//手机号码
phone
:
''
,
//手机号码
reviseContactId
:
''
,
//被修改人id
reviseContactId
:
''
,
//被修改人id
showIdType
:
false
,
//证件类型弹窗显示隐藏
credentialList
:[],
//证件类型列表
credentialType
:
0
,
//选中的证件类型,默认身份证
}
}
},
},
watch
:
{
watch
:
{
...
@@ -105,27 +62,12 @@ export default {
...
@@ -105,27 +62,12 @@ export default {
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
credentialType
=
newValue
.
credentialType
||
0
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
},
credential
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
){
this
.
credentialList
=
newValue
.
split
(
','
)
}
},
deep
:
true
,
immediate
:
true
}
}
},
},
methods
:
{
methods
:
{
//---选择证件类型
chooseCredential
(
item
){
this
.
credentialType
=
item
this
.
showIdType
=
false
},
//---保存
//---保存
keepSave
()
{
keepSave
()
{
if
(
!
this
.
name
){
if
(
!
this
.
name
){
...
@@ -158,7 +100,7 @@ export default {
...
@@ -158,7 +100,7 @@ export default {
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
id
:
this
.
reviseContactId
,
//被修改人id
id
:
this
.
reviseContactId
,
//被修改人id
category
:
''
,
//成人或者儿童
category
:
''
,
//成人或者儿童
credential
Type
:
this
.
credentialType
,
//证件类型
credential
sType
:
''
,
//证件类型
}
}
let
queryUrl
=
''
let
queryUrl
=
''
if
(
this
.
reviseContactId
){
if
(
this
.
reviseContactId
){
...
@@ -181,7 +123,6 @@ export default {
...
@@ -181,7 +123,6 @@ export default {
this
.
name
=
''
this
.
name
=
''
this
.
credentialNumber
=
''
this
.
credentialNumber
=
''
this
.
phone
=
''
this
.
phone
=
''
this
.
credentialType
=
0
}
else
{
}
else
{
this
.
$parent
.
getContactList
()
this
.
$parent
.
getContactList
()
}
}
...
@@ -276,11 +217,4 @@ export default {
...
@@ -276,11 +217,4 @@ export default {
background
:
$theme
;
background
:
$theme
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.idList
{
display
:
flex
;
justify-content
:
space-between
;
height
:
100rpx
;
align-items
:
center
;
border-bottom
:
1px
solid
#f3f3f3
;
}
</
style
>
</
style
>
pages/scenic/scenicComponents/editContacts.vue
View file @
a55fb317
...
@@ -17,20 +17,38 @@
...
@@ -17,20 +17,38 @@
<view
class=
"bottomContent"
>
<view
class=
"bottomContent"
>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
姓名
:
姓名
</text>
</text>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
<input
v-model
.
trim=
"name"
placeholder=
"请输入姓名,必填"
/>
</view>
</view>
<view
@
click=
"showIdType=true"
v-if=
"credentialList.length>1"
>
<text
class=
"bottom-title"
>
证件类型
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==0"
>
身份证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==1"
>
护照
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==2"
>
港澳通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==3"
>
台胞通行证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==4"
>
台胞证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==5"
>
回乡证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==6"
>
外国人永久居留证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==7"
>
学生证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==8"
>
军官证
</text>
<text
style=
"flex: 1;"
v-if=
"credentialType==9"
>
残疾军人证
</text>
<u-icon
name=
"arrow-right"
size=
'26'
color=
'#B4B4B4'
></u-icon>
</view>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
身份证:
证件号
</text>
</text>
<input
v-model
.
trim=
"credentialNumber"
maxlength=
"18"
placeholder=
"请输入身份证号码,必填"
/>
<input
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length==1"
:placeholder=
"placeholderText"
/>
<input
v-model
.
trim=
"credentialNumber"
v-if=
"credentialList.length>1"
placeholder=
"请输入证件号码,必填"
/>
</view>
</view>
<view>
<view>
<text
class=
"bottom-title"
>
<text
class=
"bottom-title"
>
联系电话
:
联系电话
</text>
</text>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
<input
type=
"number"
v-model
.
trim=
"phone"
maxlength=
"11"
placeholder=
"用于接收行程信息"
/>
</view>
</view>
...
@@ -40,12 +58,35 @@
...
@@ -40,12 +58,35 @@
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 证件类型弹窗 -->
<u-popup
:show=
"showIdType"
:round=
"20"
@
close=
"showIdType = false"
closeable
>
<view
style=
"padding: 24rpx;"
>
<view
style=
"text-align: center;padding-bottom:20rpx;"
>
证件类型
</view>
<view
v-for=
"(item,index) in credentialList"
:key=
'index'
class=
"idList"
@
click=
"chooseCredential(item)"
>
<text
v-if=
"item==0"
>
身份证
</text>
<text
v-if=
"item==1"
>
护照
</text>
<text
v-if=
"item==2"
>
港澳通行证
</text>
<text
v-if=
"item==3"
>
台胞通行证
</text>
<text
v-if=
"item==4"
>
台胞证
</text>
<text
v-if=
"item==5"
>
回乡证
</text>
<text
v-if=
"item==6"
>
外国人永久居留证
</text>
<text
v-if=
"item==7"
>
学生证
</text>
<text
v-if=
"item==8"
>
军官证
</text>
<text
v-if=
"item==9"
>
残疾军人证
</text>
<u-icon
name=
'checkmark'
size=
'48'
color=
'#3688FF'
v-if=
"credentialType==item"
></u-icon>
</view>
</view>
</u-popup>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
[
'editContactData'
],
props
:
[
'editContactData'
,
'credential'
],
data
()
{
data
()
{
return
{
return
{
showPop
:
false
,
//控制组件显示隐藏
showPop
:
false
,
//控制组件显示隐藏
...
@@ -53,6 +94,10 @@ export default {
...
@@ -53,6 +94,10 @@ export default {
credentialNumber
:
''
,
//身份证号
credentialNumber
:
''
,
//身份证号
phone
:
''
,
//手机号码
phone
:
''
,
//手机号码
reviseContactId
:
''
,
//被修改人id
reviseContactId
:
''
,
//被修改人id
showIdType
:
false
,
//证件类型弹窗显示隐藏
credentialList
:[],
//证件类型列表
credentialType
:
0
,
//选中的证件类型,默认身份证
placeholderText
:
''
,
//提示输入什么证件
}
}
},
},
watch
:
{
watch
:
{
...
@@ -62,12 +107,40 @@ export default {
...
@@ -62,12 +107,40 @@ export default {
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
phone
=
newValue
.
phone
||
''
this
.
credentialType
=
newValue
.
credentialType
||
0
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
},
credential
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
){
this
.
credentialList
=
newValue
.
split
(
','
)
if
(
this
.
credentialList
.
length
==
1
){
let
type
=
this
.
credentialList
[
0
]
if
(
type
==
'0'
){
this
.
placeholderText
=
'请输入身份证,必填'
}
if
(
type
==
'1'
){
this
.
placeholderText
=
'请输入护照,必填'
}
if
(
type
==
'2'
){
this
.
placeholderText
=
'请输入港澳通行证,必填'
}
if
(
type
==
'3'
){
this
.
placeholderText
=
'请输入台胞通行证,必填'
}
if
(
type
==
'4'
){
this
.
placeholderText
=
'请输入台胞证,必填'
}
if
(
type
==
'5'
){
this
.
placeholderText
=
'请输入回乡证,必填'
}
if
(
type
==
'6'
){
this
.
placeholderText
=
'请输入外国人永久居留证,必填'
}
if
(
type
==
'7'
){
this
.
placeholderText
=
'请输入学生证,必填'
}
if
(
type
==
'8'
){
this
.
placeholderText
=
'请输入军官证,必填'
}
if
(
type
==
'9'
){
this
.
placeholderText
=
'请输入残疾军人证,必填'
}
}
}
},
deep
:
true
,
immediate
:
true
}
}
},
},
methods
:
{
methods
:
{
//---选择证件类型
chooseCredential
(
item
){
this
.
credentialType
=
item
this
.
showIdType
=
false
},
//---保存
//---保存
keepSave
()
{
keepSave
()
{
if
(
!
this
.
name
){
if
(
!
this
.
name
){
...
@@ -91,7 +164,15 @@ export default {
...
@@ -91,7 +164,15 @@ export default {
})
})
return
return
}
}
let
credentialType
=
''
//当只有一个证件类型时取第一个
if
(
this
.
credentialList
.
length
==
1
){
credentialType
=
this
.
credentialList
[
0
]
}
//当有多个证件类型时取选中的那一个
if
(
this
.
credentialList
.
length
>
1
){
credentialType
=
this
.
credentialType
}
let
data
=
{
let
data
=
{
name
:
this
.
name
,
//保存姓名
name
:
this
.
name
,
//保存姓名
phone
:
this
.
phone
,
//电话号码
phone
:
this
.
phone
,
//电话号码
...
@@ -100,7 +181,7 @@ export default {
...
@@ -100,7 +181,7 @@ export default {
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
merchantType
:
1
,
//商户类型,1.景区,2.酒店,3.餐饮
id
:
this
.
reviseContactId
,
//被修改人id
id
:
this
.
reviseContactId
,
//被修改人id
category
:
''
,
//成人或者儿童
category
:
''
,
//成人或者儿童
credential
sType
:
''
,
//证件类型
credential
Type
,
//证件类型
}
}
let
queryUrl
=
''
let
queryUrl
=
''
if
(
this
.
reviseContactId
){
if
(
this
.
reviseContactId
){
...
@@ -123,6 +204,7 @@ export default {
...
@@ -123,6 +204,7 @@ export default {
this
.
name
=
''
this
.
name
=
''
this
.
credentialNumber
=
''
this
.
credentialNumber
=
''
this
.
phone
=
''
this
.
phone
=
''
this
.
credentialType
=
0
}
else
{
}
else
{
this
.
$parent
.
getContactList
()
this
.
$parent
.
getContactList
()
}
}
...
@@ -217,4 +299,11 @@ export default {
...
@@ -217,4 +299,11 @@ export default {
background
:
$theme
;
background
:
$theme
;
display
:
inline-block
;
display
:
inline-block
;
}
}
.idList
{
display
:
flex
;
justify-content
:
space-between
;
height
:
100rpx
;
align-items
:
center
;
border-bottom
:
1px
solid
#f3f3f3
;
}
</
style
>
</
style
>
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
a55fb317
...
@@ -247,6 +247,7 @@
...
@@ -247,6 +247,7 @@
:key="index"
:key="index"
>
>
{{
item
.
name
}}
{{
item
.
name
}}
<text
v-if=
"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>
...
@@ -874,6 +875,12 @@ export default {
...
@@ -874,6 +875,12 @@ export default {
visitorChoose
(
i
)
{
visitorChoose
(
i
)
{
//直接传入item,会造成item.ifChoose值变,但是this.contactTotal[i].ifChoose没变,故选择传入下标
//直接传入item,会造成item.ifChoose值变,但是this.contactTotal[i].ifChoose没变,故选择传入下标
let
item
=
this
.
contactTotal
[
i
]
let
item
=
this
.
contactTotal
[
i
]
if
(
!
item
.
contactVos
||
item
.
contactVos
.
length
==
0
){
//证件信息不全时,补充证件信息
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContactData
=
item
return
}
item
.
ifChoose
=
!
item
.
ifChoose
item
.
ifChoose
=
!
item
.
ifChoose
if
(
item
.
ifChoose
)
{
if
(
item
.
ifChoose
)
{
if
(
this
.
chooseContact
.
length
==
this
.
contactNum
)
{
if
(
this
.
chooseContact
.
length
==
this
.
contactNum
)
{
...
@@ -954,11 +961,20 @@ export default {
...
@@ -954,11 +961,20 @@ export default {
//---初始化联系人列表
//---初始化联系人列表
getContactList
()
{
getContactList
()
{
let
data
=
{
let
data
=
{
openid
:
this
.
openid
openid
:
this
.
openid
,
credentialTypes
:
this
.
productIfo
.
credential
.
split
(
','
)
}
}
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
=>
{
if
(
item
.
contactVos
.
length
>
0
){
item
.
id
=
item
.
contactVos
[
0
].
id
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
}
})
this
.
contactTotal
.
forEach
(
item
=>
{
this
.
contactTotal
.
forEach
(
item
=>
{
//用于判断是否被选中
//用于判断是否被选中
item
.
ifChoose
=
false
item
.
ifChoose
=
false
...
@@ -991,11 +1007,20 @@ export default {
...
@@ -991,11 +1007,20 @@ export default {
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
//---添加并选中联系人--用于添加联系人之后直接从联系人列表选出需要填写的几位联系人
addChoose
()
{
addChoose
()
{
let
data
=
{
let
data
=
{
openid
:
this
.
openid
openid
:
this
.
openid
,
credentialTypes
:
this
.
productIfo
.
credential
.
split
(
','
)
}
}
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
=>
{
if
(
item
.
contactVos
.
length
>
0
){
item
.
id
=
item
.
contactVos
[
0
].
id
item
.
credentialNumber
=
item
.
contactVos
[
0
].
credentialNumber
item
.
credentialType
=
item
.
contactVos
[
0
].
credentialType
}
})
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
contactNum
;
i
++
)
{
let
item
=
this
.
contactTotal
[
i
]
||
null
let
item
=
this
.
contactTotal
[
i
]
||
null
if
(
item
)
{
if
(
item
)
{
...
...
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