USER-20230908AJ\Administrator пре 1 година
родитељ
комит
ebec89ee20

+ 8 - 4
common/system_popup/system_popup.vue

@@ -68,10 +68,14 @@
 					return uni.navigateTo({
 						url: `/page_subpack/personal_details/personal_details?id=${item.id}&title=${item.name}`
 					})
-				}
-				uni.navigateTo({
-					url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
-				})
+				}else {
+          uni.navigateTo({
+          	url: `/pages/login/index`
+          })
+        }
+				// uni.navigateTo({
+				// 	url: `/page_subpack/system_setting/system_setting?id=${item.id}&title=${item.name}`
+				// })
 			}
 		}
 	}

+ 25 - 7
components/en-utils/en-select/en-select.vue

@@ -10,8 +10,8 @@
 		</view>
 		<view class="select">
 			<scroll-view scroll-y="true" class="scroll-Y select">
-				<view id="demo1" class="scroll-view-item" v-for="(item,index) in 5" @click="onSelect(index)">
-					<text class="size-28 color-0FB160">回款回款回款</text>
+				<view id="demo1" class="scroll-view-item" v-for="(item,index) in localData" @click="onSelect(index)">
+					<text class="size-28 color-0FB160">{{item[itemText]}}</text>
 				</view>
 			</scroll-view>
 		</view>
@@ -28,7 +28,21 @@
 			title: {
 				type: String,
 				default: '选择'
-			}
+			},
+      localData: {
+        default: []
+      },
+      itemKey:{
+        type:String,
+        default:'id'
+      },
+      itemText:{
+        type:String,
+        default:'name'
+      },
+      value:{
+        default:''
+      }
 		},
 		components: {
 			EnButton
@@ -36,15 +50,19 @@
 		data() {
 			return {
 				current: 0,
-				list: ['放款', '回款']
 			};
 		},
+    watch:{
+      'value':function () {
+        if(this.current!==this.value){
+          this.current=this.value
+        }
+      }
+    },
 		methods: {
-			onChange(e) {
-				this.current = e
-			},
 			onSelect(index) {
 				this.$emit('onChange', index)
+        this.$emit('input', this.localData[index][this.itemKey])
 			}
 		}
 	}

+ 1 - 1
manifest.json

@@ -55,7 +55,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx200b542e9c6119bc",
+        "appid" : "wx26b6136cd5860186",
         "optimization" : {
             "subPackages" : true
         },

+ 42 - 10
pages/statistics/module/head_filter.vue

@@ -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;

+ 10 - 10
pages/statistics/statistics.vue

@@ -4,7 +4,7 @@
 			:navsHeight="navsHeight" :opacity="scrollTop" :justify="'left'" :color="'#fff'" :fixedHeight="160">
 			<view class="task-tabs m-t20" :style="{top:`${$tools.topHeight()}px`}">
 				<HeadFilter @onTopSelect="onTopSelect" :user-status-list="userStatusList"></HeadFilter>
-				<view class="m-lr30 m-tb30 bor-255 r-100" v-if="statType === 3">
+				<view class="m-lr30 m-tb30 bor-255 r-100" v-if="statType === 7">
 					<uv-subsection :list="list" :bgColor="'rgba(255,255,255,0.1)'" :activeColor="'#0FB160'"
 						:inactiveColor="'#004615'" :fontSize="14" custom-style="height: 70rpx;border-radius: 30rpx;"
 						custom-item-style="border-radius: 30rpx;" :current="current" @change="onChange"></uv-subsection>
@@ -14,8 +14,8 @@
 		<view class="statistics_content" :style="[{top:`${$tools.topHeight() + positionHeight}px`}]">
 
 			<view class="">
-				<HeadData v-if="statType === 0 || statType === 1"></HeadData>
-				<view class="tabs page-box-bg-fff m-lr30 r-30" v-if="statType === 2 || statType === 3"
+				<HeadData v-if="statType === 3 || statType === 4"></HeadData>
+				<view class="tabs page-box-bg-fff m-lr30 r-30" v-if="statType === 6 || statType === 7"
 					:style="[{position:is_fixed?'absolute':''},{top:`${$tools.topHeight() + 85}px`}]"
 					style="height: 100rpx;">
 					<z-tabs ref="tabs" :list="tabsList"
@@ -27,17 +27,17 @@
 				<StatSingleData :is_fixed="is_tabs_fixed" v-if="is_single_data"></StatSingleData>
 				<view class="sys-list-background-color p-lr30">
 					<!-- 汇总统计-公司 -->
-					<GeneralStat v-if="statType === 0"></GeneralStat>
+					<GeneralStat v-if="statType === 3"></GeneralStat>
 					<!-- 资金统计-部门 -->
-					<CapitalStat v-if="statType === 1"></CapitalStat>
+					<CapitalStat v-if="statType === 4"></CapitalStat>
 					<!-- 提放统计-部门 -->
-					<DrawingsStat v-if="statType === 2"></DrawingsStat>
+					<DrawingsStat v-if="statType === 6"></DrawingsStat>
 					<!-- 消金统计-部门 -->
-					<ConsumeStat v-if="statType === 3"></ConsumeStat>
+					<ConsumeStat v-if="statType === 7"></ConsumeStat>
 					<!-- 任务统计-个人 -->
-					<TaskStat v-if="statType === 4"></TaskStat>
+					<TaskStat v-if="statType === 1"></TaskStat>
 					<!-- 业绩统计-个人 -->
-					<PerformanceStat v-if="statType === 5"></PerformanceStat>
+					<PerformanceStat v-if="statType === 2"></PerformanceStat>
 					<view class="bottom_view"></view>
 				</view>
 			</view>
@@ -124,7 +124,7 @@
 			this.scrollTop = res.scrollTop / 120
 		},
 		mounted() {
-			// this.getUserType()
+			this.getUserType()
 		},
 
 		computed: {