Commit deaa92de by chenwq

sort抖动,新增/编辑客户历史数据处理

1 parent 0b317108
...@@ -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,
......
...@@ -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)
}, },
......
...@@ -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 --> <!-- 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>
<!-- 售后众筹 --> <!-- 售后众筹 -->
......
...@@ -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)
}, },
} }
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!