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
5dd6a148
Commit
5dd6a148
authored
Dec 26, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联系人bug处理
parent
ea308504
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
29 deletions
+23
-29
contactList.vue
pages/scenic/scenicComponents/contactList.vue
+8
-13
editContacts.vue
pages/scenic/scenicComponents/editContacts.vue
+11
-8
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+4
-8
No files found.
pages/scenic/scenicComponents/contactList.vue
View file @
5dd6a148
...
@@ -2,15 +2,15 @@
...
@@ -2,15 +2,15 @@
<view
class=
"list-bg"
v-show=
"showPop"
>
<view
class=
"list-bg"
v-show=
"showPop"
>
<view
class=
"list-wrap"
>
<view
class=
"list-wrap"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"top-num"
>
<view
class=
"top-num"
@
click=
"showPop=false"
>
<text>
<text>
需
填写
{{
contactNum
}}
位联系人
需
选中
{{
contactNum
}}
位联系人
</text>
</text>
<view
class=
"top-icon"
@
click=
"showPop=false"
>
<view
class=
"top-icon"
>
<u-icon
name=
"close"
bold
></u-icon>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
</view>
</view>
<view
@
click=
"
show
Edit()"
class=
"top-add"
>
<view
@
click=
"
go
Edit()"
class=
"top-add"
>
<text>
<text>
+添加旅客信息
+添加旅客信息
</text>
</text>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</view>
</view>
</label>
</label>
<view
@
click=
"goEdit(item)"
style=
"margin-right:
2
0rpx;"
>
<view
@
click=
"goEdit(item)"
style=
"margin-right:
3
0rpx;"
>
<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.id)"
>
...
@@ -86,15 +86,10 @@ export default {
...
@@ -86,15 +86,10 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
//---点击新增,展示编辑联系人弹窗,并传空值给编辑弹窗
showEdit
()
{
this
.
$parent
.
showEdit
()
this
.
$emit
(
'getEditContact'
,
''
)
},
//---展示编辑弹窗,并传值给编辑弹窗
//---展示编辑弹窗,并传值给编辑弹窗
goEdit
(
obj
)
{
goEdit
(
data
)
{
this
.
$parent
.
showEdit
()
let
obj
=
data
||
''
this
.
$
emit
(
'getEditContact'
,
obj
)
this
.
$
parent
.
showEdit
(
obj
)
},
},
//---确定选中的联系人
//---确定选中的联系人
config
()
{
config
()
{
...
...
pages/scenic/scenicComponents/editContacts.vue
View file @
5dd6a148
<
template
>
<
template
>
<view
class=
"edit-bg"
v-show=
"show
Edit
"
>
<view
class=
"edit-bg"
v-show=
"show
Pop
"
>
<view
class=
"edit-wrap"
>
<view
class=
"edit-wrap"
>
<view
class=
"return"
>
<view
class=
"return"
@
click=
"showPop = false"
>
<!-- 新增的时候 -->
<view>
<view
v-if=
"!reviseContactId"
>
新增/编辑联系人
已新增
{{
contactTotal
.
length
}}
位联系人
</view>
</view>
<view
@
click=
"showEdit = false"
class=
"return-icon"
>
<view
class=
"return-icon"
>
<u-icon
name=
"close"
bold
></u-icon>
<u-icon
name=
"close"
bold
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -49,7 +48,7 @@ export default {
...
@@ -49,7 +48,7 @@ export default {
props
:
[
'editContact'
,
'contactTotal'
],
props
:
[
'editContact'
,
'contactTotal'
],
data
()
{
data
()
{
return
{
return
{
show
Edit
:
false
,
//控制组件显示隐藏
show
Pop
:
false
,
//控制组件显示隐藏
name
:
''
,
//姓名
name
:
''
,
//姓名
credentialNumber
:
''
,
//身份证号
credentialNumber
:
''
,
//身份证号
phone
:
''
,
//手机号码
phone
:
''
,
//手机号码
...
@@ -59,6 +58,7 @@ export default {
...
@@ -59,6 +58,7 @@ export default {
watch
:
{
watch
:
{
editContact
:
{
editContact
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
this
.
reviseContactId
)
this
.
name
=
newValue
.
name
||
''
this
.
name
=
newValue
.
name
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
credentialNumber
=
newValue
.
credentialNumber
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
this
.
reviseContactId
=
newValue
.
id
||
''
...
@@ -117,6 +117,8 @@ export default {
...
@@ -117,6 +117,8 @@ export default {
if
(
!
this
.
reviseContactId
){
if
(
!
this
.
reviseContactId
){
//新增的时候
//新增的时候
this
.
$parent
.
addChoose
()
this
.
$parent
.
addChoose
()
//显示联系人列表弹窗
this
.
$parent
.
showContacts
()
//成功之后清空数据,防止下次新增的时候出现之前的数据
//成功之后清空数据,防止下次新增的时候出现之前的数据
this
.
name
=
''
this
.
name
=
''
this
.
credentialNumber
=
''
this
.
credentialNumber
=
''
...
@@ -124,7 +126,8 @@ export default {
...
@@ -124,7 +126,8 @@ export default {
}
else
{
}
else
{
this
.
$parent
.
getContactList
()
this
.
$parent
.
getContactList
()
}
}
this
.
showEdit
=
false
//关闭当前弹窗
this
.
showPop
=
false
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
5dd6a148
...
@@ -257,7 +257,7 @@
...
@@ -257,7 +257,7 @@
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#3688FF"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"visitorBtn"
v-else
@
click=
"
$refs.editContacts.showEdit = true
"
>
<view
class=
"visitorBtn"
v-else
@
click=
"
showEdit()
"
>
<u-icon
name=
"plus-circle"
color=
"#3688FF"
size=
"52"
></u-icon>
<u-icon
name=
"plus-circle"
color=
"#3688FF"
size=
"52"
></u-icon>
<text
style=
"margin-left:16rpx;"
>
新增
</text>
<text
style=
"margin-left:16rpx;"
>
新增
</text>
</view>
</view>
...
@@ -347,7 +347,6 @@
...
@@ -347,7 +347,6 @@
<editContacts
ref=
"editContacts"
:editContact=
"editContact"
:contactTotal=
"contactTotal"
></editContacts>
<editContacts
ref=
"editContacts"
:editContact=
"editContact"
:contactTotal=
"contactTotal"
></editContacts>
<contactList
<contactList
ref=
"contactList"
ref=
"contactList"
@
getEditContact=
"getEditContact"
:contactTotal=
"contactTotal"
:contactTotal=
"contactTotal"
:contactNum=
"contactNum"
:contactNum=
"contactNum"
></contactList>
></contactList>
...
@@ -834,10 +833,6 @@ export default {
...
@@ -834,10 +833,6 @@ export default {
this
.
timeScroll
=
(
data
[
index
].
width
+
6
)
*
index
this
.
timeScroll
=
(
data
[
index
].
width
+
6
)
*
index
}).
exec
()
}).
exec
()
},
},
//---获取点击的编辑联系人信息,传给编辑联系人组件
getEditContact
(
data
)
{
this
.
editContact
=
data
},
//---删除选中的联系人
//---删除选中的联系人
delChooseContact
(
item
,
index
)
{
delChooseContact
(
item
,
index
)
{
//所有联系人中找到删除联系人下标,改成未选中状态
//所有联系人中找到删除联系人下标,改成未选中状态
...
@@ -846,8 +841,9 @@ export default {
...
@@ -846,8 +841,9 @@ export default {
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
this
.
chooseContact
.
splice
(
index
,
1
)
//删除数组
},
},
//---展示编辑联系人
//---展示编辑联系人
showEdit
(
obj
)
{
showEdit
(
data
)
{
this
.
$refs
.
editContacts
.
showEdit
=
true
let
obj
=
data
||
''
this
.
$refs
.
editContacts
.
showPop
=
true
this
.
editContact
=
obj
this
.
editContact
=
obj
},
},
//---展示新增联系人,并获取联系人列表
//---展示新增联系人,并获取联系人列表
...
...
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