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 6773e1c6
authored
Apr 12, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式
1 parent
987526c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
23 deletions
pages/tab/output/components/StaffSort/StaffSort.js
pages/tab/output/components/StaffSort/StaffSort.scss
pages/tab/output/components/StaffSort/StaffSort.wxml
pages/tab/output/components/StaffSort/StaffSort.js
View file @
6773e1c
...
...
@@ -3,6 +3,7 @@ import { scenceList } from '~/pages/tab/index/constant/data'
const
busiOptSceneCode
=
[
'-1'
,
'SC001'
,
'SC002'
]
import
mineApi
from
'~/api/mineApi/index'
import
{
getNowMonth
}
from
'~/utils/format'
import
{
IMG_URL
}
from
'~/utils/constantData'
Component
({
/**
* 组件的属性列表
...
...
@@ -15,6 +16,7 @@ Component({
* 组件的初始数据
*/
data
:
{
IMG_URL
,
busiOptSceneCode
,
formData
:
{
// 0:全部-1;2:精品升级SC002;1:会员权益/升级SC001
...
...
@@ -74,12 +76,13 @@ Component({
return
params
},
// handleInputeClear(e) {
// this.setData({
// isInputClear: true,
// ['formData.userName']: ''
// })
// },
handleInputeClear
(
e
)
{
this
.
setData
({
isInputClear
:
true
,
[
'formData.userName'
]:
''
})
console
.
log
(
this
.
data
.
isInputClear
,
'isInputClear---'
)
},
handleInput
(
e
)
{
let
{
attr
}
=
e
.
currentTarget
.
dataset
...
...
@@ -90,7 +93,13 @@ Component({
},
changeFold
()
{
let
{
isFold
}
=
this
.
data
let
{
isInputClear
}
=
this
.
data
if
(
isInputClear
)
{
this
.
setData
({
isInputClear
:
false
})
return
true
}
this
.
setData
({
isFold
:
!
this
.
data
.
isFold
})
...
...
@@ -101,14 +110,6 @@ Component({
},
handleInputBlur
()
{
let
{
isInputClear
}
=
this
.
data
console
.
log
(
isInputClear
,
'eieieii'
)
if
(
isInputClear
)
{
this
.
setData
({
isInputClear
:
false
})
return
true
}
this
.
changeFold
()
this
.
triggerEvent
(
'staffSearch'
)
},
...
...
pages/tab/output/components/StaffSort/StaffSort.scss
View file @
6773e1c
...
...
@@ -51,20 +51,31 @@
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
width
:
1
28
rpx
;
width
:
1
36
rpx
;
height
:
60rpx
;
background
:
#F8F9FC
;
border-radius
:
38rpx
;
padding
-left
:
20rpx
;
padding
:
0
20rpx
;
margin-left
:
10rpx
;
transition
:
width
0
.2s
ease-out
;
}
.input-flex
{
display
:
flex
;
align-items
:
center
;
}
.icon-delete
{
position
:
absolute
;
top
:
6rpx
;
right
:
10rpx
;
box-sizing
:
border-box
;
width
:
50rpx
;
height
:
60rpx
;
text-align
:
center
;
flex-shrink
:
0
;
.icon
{
margin-top
:
16rpx
;
}
}
.long-input
{
...
...
pages/tab/output/components/StaffSort/StaffSort.wxml
View file @
6773e1c
...
...
@@ -20,9 +20,14 @@
</view>
</scroll-view>
<view class="right-box input {{ isFold ? 'long-input' : '' }}">
<glsx-image src="output/searchIcon.png" class="icon" />
<input type="text" placeholder="{{isFold ? '请输入员工姓名搜索' : '姓名'}}" maxlength="30" value="{{formData.userName}}" placeholder-class="input-placeholder" data-attr="userName" confirm-type="search" bindinput="handleInput" bindfocus="handleInputFocus" bindblur="handleInputBlur" />
<!-- <glsx-image wx:if="{{isFold}}" src="output/icon-delete.png" class="icon icon-delete" data-attr="userName" bindcatch="handleInputeClear" /> -->
<!-- <view class="right-box input long-input"> -->
<view class="input-flex">
<glsx-image src="output/searchIcon.png" class="icon" />
<input type="text" placeholder="{{isFold ? '请输入员工姓名搜索' : '搜索'}}" maxlength="30" value="{{formData.userName}}" placeholder-class="input-placeholder" data-attr="userName" confirm-type="search" bindinput="handleInput" bindfocus="handleInputFocus" bindblur="handleInputBlur" />
</view>
<view wx:if="{{isFold}}" class="icon-delete" bindtap="handleInputeClear" data-attr="userName">
<glsx-image src="output/icon-delete.png" class="icon" />
</view>
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="handleServiceChange" selectInfo="{{formData}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
\ No newline at end of file
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