|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="head_filter row-justify-sb center p-lr30">
|
|
|
- <view class="filter_item r-100 bg-rgba-255" @click="startAnimation">
|
|
|
- <text class="text-color-fff size-28 sys-weight-600 p-r10">汇总统计-公司</text>
|
|
|
+ <view class="filter_item r-100 bg-rgba-255" @click="startAnimation(1)">
|
|
|
+ <text class="text-color-fff size-28 sys-weight-600 p-r10">{{newUserTypeName}}</text>
|
|
|
<uni-icons :animation="animationData" class="dropdown-icon" :type="type" size="16"
|
|
|
color="#fff"></uni-icons>
|
|
|
</view>
|
|
|
- <view class="filter_item last_item r-100 bg-rgba-255" @click="startAnimation">
|
|
|
- <text class="text-color-fff size-28 sys-weight-600 p-r10">周数据</text>
|
|
|
+ <view class="filter_item last_item r-100 bg-rgba-255" @click="startAnimation(2)">
|
|
|
+ <text class="text-color-fff size-28 sys-weight-600 p-r10">{{dateName}}</text>
|
|
|
<uni-icons :animation="animationData" class="dropdown-icon" type="down" size="16"
|
|
|
color="#fff"></uni-icons>
|
|
|
</view>
|
|
|
@@ -18,7 +18,13 @@
|
|
|
</view>
|
|
|
<uni-popup background-color="#fff" ref="popup" type="bottom" border-radius="10px"
|
|
|
@touchmove.stop.prevent="moveHandle">
|
|
|
- <EnSelect ref="system" @onChange="onChange"></EnSelect>
|
|
|
+ <view v-if="selectType===1">
|
|
|
+ <EnSelect title="请选择统计类型" v-model="dateTypeObj.censusUserType" :local-data="userStatusList" ref="system" @onChange="setCensusUserType"></EnSelect>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <EnSelect title="请选择统计周期" v-model="dateTypeObj.dateType" :local-data="dateData" ref="system" @onChange="setDateType"></EnSelect>
|
|
|
+ </view>
|
|
|
+
|
|
|
</uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -45,18 +51,44 @@
|
|
|
animationData: {},
|
|
|
isRote: false,
|
|
|
animation: null,
|
|
|
+ newUserTypeName:'',
|
|
|
+ dateName:'日数据',
|
|
|
+ dateData:[{'id':1,'name':'日数据'},{'id':2,'name':'周数据'},{'id':3,'name':'月数据'},{'id':4,'name':'年数据'}],
|
|
|
+ dateTypeObj:{
|
|
|
+ dateType:1,//时间类型
|
|
|
+ selectDate:'2023-02-25',//自定义的时候传数组,其它传开始日期
|
|
|
+ money_type:1,
|
|
|
+ censusUserType:1,
|
|
|
+ product_id:5,
|
|
|
+ },
|
|
|
+ selectType:1
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'userStatusList':function () {
|
|
|
+ console.log(this.userStatusList)
|
|
|
+ this.setCensusUserType(0)
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
- onChange(type) {
|
|
|
+ setCensusUserType(index){
|
|
|
+ this.dateTypeObj.censusUserType=this.userStatusList[index].id
|
|
|
+ this.newUserTypeName=this.userStatusList[index].name
|
|
|
+ this.endPopup()
|
|
|
+ },
|
|
|
+ setDateType(index){
|
|
|
+ this.dateTypeObj.dateType=this.dateData[index].id
|
|
|
+ this.dateName=this.dateData[index].name
|
|
|
+ this.endPopup()
|
|
|
+ },
|
|
|
+ endPopup() {
|
|
|
this.$refs.popup.close('bottom')
|
|
|
- this.$emit('onTopSelect', type)
|
|
|
},
|
|
|
- startAnimation() {
|
|
|
+ startAnimation(type) {
|
|
|
+ this.selectType=type
|
|
|
//旋转角度
|
|
|
this.$refs.popup.open('bottom')
|
|
|
let rota = 180;
|