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