|
@@ -32,6 +32,11 @@
|
|
|
<view class="flex-col justify-center" style="margin-left: 10rpx;">
|
|
<view class="flex-col justify-center" style="margin-left: 10rpx;">
|
|
|
<u-button text="清空" type="primary" size="mini" @click="cancelParam"></u-button>
|
|
<u-button text="清空" type="primary" size="mini" @click="cancelParam"></u-button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="totalCount">
|
|
|
|
|
+ <text class="totalCountLabel">总计:</text>
|
|
|
|
|
+ <text class="totalCountValue">{{ totalCount }}</text>
|
|
|
|
|
+ <text class="totalCountLabel">单</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -42,7 +47,7 @@
|
|
|
<swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
|
|
<swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
|
|
|
<swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index">
|
|
<swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index">
|
|
|
<view>
|
|
<view>
|
|
|
- <mescroll-item ref="MescrollItem" :i="index" :index="tabIndex" :tabs="tabList" :height="windowHeight" :selectStartDate="selectStartDate" :selectEndDate="selectEndDate" :selectServiceId="selectServiceId" >
|
|
|
|
|
|
|
+ <mescroll-item ref="MescrollItem" :i="index" :index="tabIndex" :tabs="tabList" :height="windowHeight" :selectStartDate="selectStartDate" :selectEndDate="selectEndDate" :selectServiceId="selectServiceId" @updateTotal="updateTotal" >
|
|
|
</mescroll-item>
|
|
</mescroll-item>
|
|
|
</view>
|
|
</view>
|
|
|
</swiper-item>
|
|
</swiper-item>
|
|
@@ -79,6 +84,7 @@
|
|
|
selectEndDate:null,
|
|
selectEndDate:null,
|
|
|
selectServiceId:null,
|
|
selectServiceId:null,
|
|
|
selectServiceName:null,
|
|
selectServiceName:null,
|
|
|
|
|
+ totalCount:0,
|
|
|
|
|
|
|
|
windowHeight:'',
|
|
windowHeight:'',
|
|
|
serviceList:[],
|
|
serviceList:[],
|
|
@@ -96,14 +102,25 @@
|
|
|
}else {
|
|
}else {
|
|
|
this.windowHeight = sysInfo.windowHeight - 74 - 90 + 'px' //除标题栏栏外的屏幕可用高度
|
|
this.windowHeight = sysInfo.windowHeight - 74 - 90 + 'px' //除标题栏栏外的屏幕可用高度
|
|
|
}
|
|
}
|
|
|
|
|
+ // 页面加载后延迟触发初始数据加载,确保组件已挂载
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ if (this.$refs.MescrollItem && this.$refs.MescrollItem[this.tabIndex]) {
|
|
|
|
|
+ this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 300)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 更新统计总数
|
|
|
|
|
+ updateTotal(total){
|
|
|
|
|
+ this.totalCount = total
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
cancelParam(){
|
|
cancelParam(){
|
|
|
this.selectStartDate = null
|
|
this.selectStartDate = null
|
|
|
this.selectEndDate = null
|
|
this.selectEndDate = null
|
|
|
this.selectServiceId = null
|
|
this.selectServiceId = null
|
|
|
this.selectServiceName = null
|
|
this.selectServiceName = null
|
|
|
|
|
+ this.totalCount = 0
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
|
this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
|
},100)
|
|
},100)
|
|
@@ -170,11 +187,21 @@
|
|
|
this.selectEndDate = null
|
|
this.selectEndDate = null
|
|
|
this.selectServiceId = null
|
|
this.selectServiceId = null
|
|
|
this.selectServiceName = null
|
|
this.selectServiceName = null
|
|
|
|
|
+ this.totalCount = 0
|
|
|
this.tabIndex = e.index
|
|
this.tabIndex = e.index
|
|
|
|
|
+ // 切换tab时触发数据加载以更新统计
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
|
|
|
+ }, 100)
|
|
|
},
|
|
},
|
|
|
swiperChange(e) {
|
|
swiperChange(e) {
|
|
|
this.tabIndex = e.detail.current
|
|
this.tabIndex = e.detail.current
|
|
|
-
|
|
|
|
|
|
|
+ // 滑动切换时触发数据加载以更新统计
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ if (this.$refs.MescrollItem && this.$refs.MescrollItem[this.tabIndex]) {
|
|
|
|
|
+ this.$refs.MescrollItem[this.tabIndex].downCallback()
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 100)
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|