ccj 2 lat temu
rodzic
commit
fe73f9a74e
2 zmienionych plików z 52 dodań i 17 usunięć
  1. 2 2
      manifest.json
  2. 50 15
      pages/user/report.vue

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "2.1.129",
-    "versionCode" : 21129,
+    "versionName" : "2.1.131",
+    "versionCode" : 21131,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

+ 50 - 15
pages/user/report.vue

@@ -5,11 +5,18 @@
 				title-color='white'>
 			</u-navbar>
 			<view class="row2">
-				<view class="left" @click="dateClick">
+				<!-- <view class="left" @click="dateClick">
 					{{nowDate}}
 					<u-icon name="arrow-down-fill" size="16" class="icon"></u-icon>
-				</view>
+				</view> -->
+				<!-- <view class="left">
+					<div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="type-style">新季</div>
+					<div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="type-style">历史</div>  
+				</view> -->
 				<view class="right">
+					<div :class="btnIndex==1?'activeBtn':''" @click="selectData(1)" class="btn-style">新季</div>
+					<div :class="btnIndex==2?'activeBtn':''" @click="selectData(2)" class="btn-style">历史</div>  
+					
 					<view :class="typeSelect==index?'type-bgc':''" class="type-style" v-for="(item,index) in moneyList"
 						@click="typeClick(index)">
 						{{item.name}}
@@ -266,6 +273,7 @@
 		},
 		data() {
 			return {
+				btnIndex:1,
 				scrollTop: 0,
 				carInterval: null,
 				inventoryAct: 0,
@@ -392,13 +400,14 @@
 			}
 		},
 		onLoad: function(option) {
-			uni.showLoading({
-				title: "数据加载中...",
-				mask: true
-			})
-			if (this.nowDate == '2022年1月') {
-				this.seachMoth = '2022-01'
-			}
+			// uni.showLoading({
+			// 	title: "数据加载中...",
+			// 	mask: true
+			// })
+			// if (this.nowDate == '2022年1月') {
+			// 	this.seachMoth = '2022-10-10'  
+			// }
+			this.seachMoth = '2022-10-10'  
 			this.init()
 		},
 		destroyed() {
@@ -408,6 +417,16 @@
 			clearInterval(this.carInterval)
 		},
 		methods: {
+			 selectData(type){
+			      this.seachMoth = ''
+			      this.btnIndex = type
+			      if(type==2){
+			        this.seachMoth = '2021-10-10'  
+			      }else{
+			        this.seachMoth = '2022-10-10'  
+			      }
+			      this.init()
+			},
 			goToPage(index) {
 				// console.log(index)
 				if (index == 4) {
@@ -434,6 +453,10 @@
 			init() {
 				this.url = "https://liangxin.zthymaoyi.com/map_0105.html?id=" + uni.getStorageSync('pcUserInfo').compId +
 					'&seachMoth=' + this.seachMoth
+				uni.showLoading({
+					title: "加载中",
+					mask: true
+				})
 				this.$api.doRequest('get', '/biInfoController//selectBiInfoNew?compId=' + uni.getStorageSync('pcUserInfo')
 					.compId + '&seachMoth=' + this.seachMoth).then(res => {
 					console.log("数据报表", res)
@@ -868,10 +891,7 @@
 				}, 10)
 			},
 			confirm(e) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true
-				})
+				
 				console.log(e)
 				this.nowDate = e[0].label + e[1].label
 				let _year = e[0].label.substring(0, 4)
@@ -981,7 +1001,8 @@
 			display: flex;
 			justify-content: space-between;
 
-			.left {}
+			.left {
+			}
 
 			.right {
 				display: flex;
@@ -1099,7 +1120,21 @@
 			}
 		}
 	}
-
+	.btn-style{
+		//   width: 70px;
+		// height: 28px;
+		background: rgba(47,108,233,0.2);
+		border-radius: 4px;
+		border: 1px solid rgba(0,220,255,0.2);
+		padding: 5px 20px;
+		box-sizing: border-box;
+		// font-size: 16px;
+		margin-right: 10px;
+		cursor:pointer
+	}
+	.activeBtn{
+	  color:#06DBF1
+	}
 	.content6 {
 		.map {
 			border: 0;