Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 88e5c7fe
authored
Mar 23, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
选择客户 添加搜索
1 parent
93ddcb34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.js
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.wxml
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.js
View file @
88e5c7f
...
...
@@ -13,6 +13,7 @@ Component({
let
{
connectionList
}
=
this
.
data
if
(
n
?.
length
)
{
connectionList
.
map
(
val
=>
{
val
.
show
=
true
if
(
n
.
findIndex
(
item
=>
item
.
merchantId
==
val
.
merchantId
)
>
-
1
)
val
.
checked
=
true
return
val
})
...
...
@@ -26,7 +27,7 @@ Component({
* 组件的初始数据
*/
data
:
{
searchKeyword
:
''
},
/**
...
...
@@ -45,6 +46,27 @@ Component({
connectionList
})
},
search
(
e
)
{
let
{
connectionList
}
=
this
.
data
let
{
value
}
=
e
.
currentTarget
.
dataset
&&
Object
.
keys
(
e
.
currentTarget
.
dataset
).
length
?
e
.
currentTarget
.
dataset
:
e
.
detail
console
.
log
(
value
)
connectionList
.
forEach
(
item
=>
{
console
.
log
(
item
)
item
.
show
=
item
.
merchantName
?.
includes
(
value
)
})
this
.
setData
({
connectionList
})
console
.
log
(
connectionList
)
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
this
.
setData
({
searchKeyword
:
value
})
},
// 确定
handleConfirm
()
{
// 处理选中的数据
...
...
packageMine/components/selectConnectionConfirm/selectConnectionConfirm.wxml
View file @
88e5c7f
...
...
@@ -16,7 +16,7 @@
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search" bindtap="s
howConfirm
">
<view class="search" bindtap="s
earch" data-value="{{searchKeyword}}
">
<view class="text-center">搜索</view>
</view>
</view>
...
...
@@ -34,9 +34,11 @@
refresher-triggered="{{triggered}}">
<view>
<block wx:for="{{connectionList}}" wx:key="index">
<view
<view hidden="{{!item.show}}">
<view
class="service-items text-hide"
data-item="{{item}}"
data-index="{{index}}"
hidden="{{!item.show}}"
bindtap="select">
<view class="item-radio">
<view wx:if="{{!item.checked}}" class="radio_class radio {{item.disabled?'disabled': ''}}"></view>
...
...
@@ -49,6 +51,8 @@
</view>
<view class="item-text {{item.disabled?'disabled_text':''}}">{{item.merchantName}}</view>
</view>
</view>
</block>
</view>
</scroll-view>
...
...
Write
Preview
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