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 deaa92de
authored
Apr 19, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sort抖动,新增/编辑客户历史数据处理
1 parent
0b317108
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
12 deletions
packageMine/pages/customerManagement/editCustomer/editCustomer.js
pages/tab/output/components/client/client.js
pages/tab/output/components/client/client.scss
pages/tab/output/components/client/client.wxml
pages/tab/output/components/sortTab/sortTab.js
packageMine/pages/customerManagement/editCustomer/editCustomer.js
View file @
deaa92d
...
@@ -244,7 +244,7 @@ Page({
...
@@ -244,7 +244,7 @@ Page({
if
(
addOrEdit
==
'edit'
)
{
if
(
addOrEdit
==
'edit'
)
{
wx
.
setNavigationBarTitle
({
title
:
'编辑客户'
})
wx
.
setNavigationBarTitle
({
title
:
'编辑客户'
})
scenceList
.
forEach
(
item
=>
{
scenceList
.
forEach
(
item
=>
{
item
.
isCheck
=
target
.
sceneList
.
findIndex
(
k
=>
k
==
item
.
sceneCode
)
!=
-
1
item
.
isCheck
=
target
.
sceneList
?
.
findIndex
(
k
=>
k
==
item
.
sceneCode
)
!=
-
1
})
})
this
.
setData
({
this
.
setData
({
scenceList
,
scenceList
,
...
...
pages/tab/output/components/client/client.js
View file @
deaa92d
...
@@ -85,6 +85,11 @@ Component({
...
@@ -85,6 +85,11 @@ Component({
// 升降序
// 升降序
handleSort
()
{
handleSort
()
{
let
{
detail
}
=
e
let
sortTabModule
=
this
.
selectComponent
(
"#sortTab"
)
let
sortTabFixModule
=
this
.
selectComponent
(
"#sortTabFix"
)
sortTabModule
.
syncVal
(
detail
)
sortTabFixModule
.
syncVal
(
detail
)
this
.
getBusiStatistics
(
true
)
this
.
getBusiStatistics
(
true
)
},
},
...
...
pages/tab/output/components/client/client.scss
View file @
deaa92d
...
@@ -54,9 +54,14 @@
...
@@ -54,9 +54,14 @@
.sort-fix
{
.sort-fix
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
absolute
;
width
:
100%
;
top
:
0
;
height
:
86rpx
;
left
:
16rpx
;
padding
:
0
16rpx
;
transition
:
height
0
.05s
ease-in-out
;
}
.sort-hide
{
height
:
0
;
}
}
.price-txt
{
.price-txt
{
...
...
pages/tab/output/components/client/client.wxml
View file @
deaa92d
<!-- pages/tab/output/components/client/client.wxml -->
<!-- pages/tab/output/components/client/client.wxml -->
<wxs src="../../index.wxs" module="filter" />
<wxs src="../../index.wxs" module="filter" />
<total-tab id="totalTab" bindbusiSearch="handleBusiSearch" bindtabChange="handleTabChange"></total-tab>
<total-tab id="totalTab" bindbusiSearch="handleBusiSearch" bindtabChange="handleTabChange"></total-tab>
<view class="sort-fix {{stickyScrollTop >= 96 ? '' : 'sort-hide'}}" wx:if="{{tabActive == 'business'}}">
<sort-tab id="sortTabFix" sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab>
</view>
<scroll-view wx:if="{{tabActive == 'store'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindscrolltolower="onReachBottom" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}">
<scroll-view wx:if="{{tabActive == 'store'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindscrolltolower="onReachBottom" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}">
<view class="client-box">
<view class="client-box">
<view class="profit-box flex-between">
<view class="profit-box flex-between">
...
@@ -62,7 +65,7 @@
...
@@ -62,7 +65,7 @@
<text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text>
</view>
</view>
<view>
<view>
<sort-tab id="sortTab"
class="{{stickyScrollTop > 74 ? 'sort-fix' : ''}}" style="top: {{stickyScrollTop - 16 + 'px'}}"
sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab>
<sort-tab id="sortTab" sceneCode="{{formData.sceneCode}}" bindhandleSort="handleSort"></sort-tab>
</view>
</view>
</view>
</view>
<!-- 售后众筹 -->
<!-- 售后众筹 -->
...
...
pages/tab/output/components/sortTab/sortTab.js
View file @
deaa92d
...
@@ -93,16 +93,16 @@ Component({
...
@@ -93,16 +93,16 @@ Component({
}
}
},
},
lifetimes
:
{
attached
()
{
console
.
log
(
this
.
data
.
formObj
[
this
.
data
.
sceneCode
])
}
},
/**
/**
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
// 同步值
syncVal
(
value
)
{
this
.
setData
({
...
value
})
},
// 处理升降序排序参数
// 处理升降序排序参数
dealParams
()
{
dealParams
()
{
let
{
actIdx
,
formObj
,
sceneCode
}
=
this
.
data
let
{
actIdx
,
formObj
,
sceneCode
}
=
this
.
data
...
@@ -174,7 +174,7 @@ Component({
...
@@ -174,7 +174,7 @@ Component({
[
`formObj.
${
sceneCode
}
[
${
idx
}
].asc`
]:
_asc
,
[
`formObj.
${
sceneCode
}
[
${
idx
}
].asc`
]:
_asc
,
actIdx
:
_actIdx
actIdx
:
_actIdx
})
})
this
.
triggerEvent
(
'handleSort'
)
this
.
triggerEvent
(
'handleSort'
,
this
.
data
)
},
},
}
}
})
})
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