zkx 1 gadu atpakaļ
vecāks
revīzija
944365a9cd
2 mainītis faili ar 86 papildinājumiem un 25 dzēšanām
  1. 44 15
      pagesFinance/detailed/index.vue
  2. 42 10
      pagesFinance/share/index.vue

+ 44 - 15
pagesFinance/detailed/index.vue

@@ -23,7 +23,7 @@
 							<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>
 						 --></view>
 					</view>
-					<view class="screen-item">
+					<view class="screen-item" v-if="false" >
 						<view class="screen-head">充电桩类型</view>
 						<view class="screen-main">
 							<view 
@@ -57,18 +57,28 @@
 								active:selectstationId==''
 							}"
 							 @click="selectstationId=''"
-							>全部</view>
-							<view 
-							v-for="(item,i) in stationList" :key="i"
-							:class="{
-								active:selectstationId==item.id
-							}"
-							 @click="selectstationId=item.id,selectdeviceNo=''"
-							class="screen-entry" >{{item.name}}</view>
+							>全部</view>
+							
+							<template v-for="(item,i) in stationList" >
+								 
+								<view class="screen-head"
+								 style="width: 100%;"
+								 v-if="getStationNo(i)"  :key="i" >
+								
+								{{item.stationNo.substring(0,1)}}类</view>
+								<view
+								 :key="i"
+								:class="{
+									active:selectstationId==item.id
+								}"
+								 @click="selectstationId=item.id,selectdeviceNo=''"
+								class="screen-entry" >{{item.name}}</view>
+							</template>
+							
 						
 						</view>
 					</view>
-					<view 
+					<view  v-show="selectstationId"
 					
 					class="screen-item">
 						<view class="screen-head">桩号</view>
@@ -255,7 +265,8 @@
 				showMonthlyCard:false,
 				form:{
 					
-				},
+				},
+				stationNo:'',
 				// current: 0,
 				 tabList: [{
 				 	name: '充电订单'
@@ -345,7 +356,27 @@
 			this.getStation()
 			
 		},
-		methods: {
+		methods: {
+			getStationNo(i){
+				var no=this.stationList[i].stationNo
+				if(no){
+					if(i==0){
+						return true
+					}else{
+						var no2=this.stationList[i-1].stationNo
+						console.log(no2,no)
+						if(no2){
+							return no2.substring(0,1)!=no.substring(0,1)
+						}else{
+							return false
+						}
+						
+					}
+				}else{
+					return false
+				}
+				
+			},
 			change(index) {
 				this.current = index;
 			},
@@ -502,9 +533,7 @@
 					
 					var list2=list.sort(function(item1,item2){
 						
-						if(item1.stationNo.indexOf("D")==0){
-							return 1
-						}
+						
 						return (item1.stationNo>item2.stationNo)?1:-1
 					})
 					for(var i in list2){

+ 42 - 10
pagesFinance/share/index.vue

@@ -24,7 +24,7 @@
 						 -->
 						</view>
 					</view>
-					<view class="screen-item">
+					<view class="screen-item" v-if="false">
 						<view class="screen-head">充电桩类型</view>
 						<view class="screen-main">
 							<view :class="{
@@ -46,14 +46,28 @@
 						<view class="screen-main">
 							<view class="screen-entry  " :class="{
 								active:selectstationId==''
-							}" @click="selectstationId=''">全部</view>
-							<view v-for="(item,i) in stationList" :key="i" :class="{
-								active:selectstationId==item.id
-							}" @click="selectstationId=item.id,selectdeviceNo=''" class="screen-entry">{{item.name}}</view>
+							}" @click="selectstationId=''">全部</view>
+							
+							
+							<template v-for="(item,i) in stationList" >
+								 
+								<view class="screen-head"
+								 style="width: 100%;"
+								 v-if="getStationNo(i)"  :key="i" >
+								
+								{{item.stationNo.substring(0,1)}}类</view>
+								<view
+								 :key="i"
+								:class="{
+									active:selectstationId==item.id
+								}"
+								 @click="selectstationId=item.id,selectdeviceNo=''"
+								class="screen-entry" >{{item.name}}</view>
+							</template>
 
 						</view>
 					</view>
-					<view class="screen-item">
+					<view class="screen-item"   v-show="selectstationId">
 						<view class="screen-head">桩号</view>
 						<view class="screen-main">
 
@@ -295,7 +309,27 @@
 			this.getStation()
 
 		},
-		methods: {
+		methods: {
+			getStationNo(i){
+				var no=this.stationList[i].stationNo
+				if(no){
+					if(i==0){
+						return true
+					}else{
+						var no2=this.stationList[i-1].stationNo
+						console.log(no2,no)
+						if(no2){
+							return no2.substring(0,1)!=no.substring(0,1)
+						}else{
+							return false
+						}
+						
+					}
+				}else{
+					return false
+				}
+				
+			},
 			change(index) {
 				this.current = index;
 			},
@@ -467,9 +501,7 @@
 					
 					var list2=list.sort(function(item1,item2){
 						
-						if(item1.stationNo.indexOf("D")==0){
-							return 1
-						}
+					
 						return (item1.stationNo>item2.stationNo)?1:-1
 					})
 					for(var i in list2){