ソースを参照

特殊账号显示内容

zhengkaixin 1 年間 前
コミット
f3fb7a6ef5

+ 11 - 0
apis/pagejs/energyManage.js

@@ -10,6 +10,17 @@ export function deviceStatus(data) {
 	})
 }
 
+
+export function findMeterList(data) {
+	var url='/mobile/employee/findMeterList';
+	return request({
+		method: 'post',
+		data: data,
+		url: url
+	})
+}
+
+
 //物业拥有的设备的单位
 export function deviceCompanyList(data) {
 	var url='mobile/energyManage/deviceCompanyList';

+ 21 - 10
pages/deductionRecord/deductionDetails.vue

@@ -143,49 +143,60 @@
 						
 					</template>
 					 
-					<template v-if="contractItem.id&&tenantBalanceRecord.extraJson.sharedKwh!=null">
+					<template v-if="contractItem.id&&tenantBalanceRecord.remark=='公摊电费'&&tenantBalanceRecord.extraJson.sharedKwh!=null">
 						
 						
 						<table class="table1" >
-							<tr class="tr1">
+							<!-- <tr class="tr1">
 								<td></td>
 								<td>起止码</td>
 								<td>度数</td>
+							</tr> -->
+							<tr>
+								<td class="td1">起止码</td>
+								<td>{{tenantBalanceRecord.extraJson.startMeter}}-{{tenantBalanceRecord.extraJson.endMeter}}</td>
+							
 							</tr>
 							<tr>
 								<td class="td1">楼层电量</td>
-								<td>{{tenantBalanceRecord.extraJson.startMeter}}-{{tenantBalanceRecord.extraJson.endMeter}}</td>
-								<td class="td3" >{{tenantBalanceRecord.extraJson.totalKwh}}度</td>
+								<td class="td3" >{{tenantBalanceRecord.extraJson.totalKwh}}度
+								<span v-if="tenantBalanceRecord.extraJson.lineLoss">(其中线损电量:{{tenantBalanceRecord.extraJson.lineLoss}}度)</span>
+								</td>
 							</tr>
 							<tr>
 								<td class="td1">表计电量</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{tenantBalanceRecord.extraJson.childSumKwh}}度</td>
 							</tr>
 							<tr>
 								<td class="td1">公摊电量</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{(tenantBalanceRecord.extraJson.sharedKwh)}}度</td>
 							</tr>
 							<tr>
 								<td class="td1">楼层总面积</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{tenantBalanceRecord.extraJson.totalHouseArea}}平方米</td>
 							</tr>
 							<tr>
 								<td class="td1">租用面积</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{tenantBalanceRecord.extraJson.houseArea}}平方米</td>
 							</tr>
 							<tr>
 								<td class="td1">租用面积占比</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{tenantBalanceRecord.extraJson.houseAreaPercent}}%</td>
 							</tr>
+							<tr v-if="tenantBalanceRecord.extraJson.allocationRatio">
+								<td class="td1">分摊系数</td>
+								<!-- <td></td> -->
+								<td class="td3" >{{tenantBalanceRecord.extraJson.allocationRatio}}</td>
+							</tr>
 						<tr style="font-weight: bold;color:#fff;background-color:#307af6 ;" >
 							
 								<td class="td1">租户公摊电量</td>
-								<td></td>
+								<!-- <td></td> -->
 								<td class="td3" >{{tenantBalanceRecord.extraJson.tenantSharedKwh}}度</td>
 							</tr>
 							

+ 102 - 16
pages/statistics/statistics.vue

@@ -6,15 +6,23 @@
 		</u-picker-select>
 		
 		<!-- 导航栏 -->
-		<view class="navbar">
-			<view class="title">
+		<view class="navbar">
+			<view  class="title" v-if="companyInfotype==4">
+				能源管理
+				<span style="padding-left: 4px;" >
+					|
+				</span>
+				<span style="padding-left: 4px;" >	
+					{{companyInfo.name}}
+				</span>
+			</view>
+			<view class="title" v-else>
 				能源管理
 				<span style="padding-left: 4px;" v-if="companyList.length>=1&&current!=0">
-					-
+					|
 				</span>
 				<span style="padding-left: 4px;" v-if="companyList.length>=1&&current!=0">	
 					
-					
 					<template v-if="kWhList.length==1">
 						{{kWhList[0].name}}
 					</template>
@@ -22,14 +30,23 @@
 						{{merchantList1[current].name}}
 					</template>
 				</span>
-			
-				
-				
+			
 			</view>
 
-		</view>
+		</view>
+		<view class="tabs-box tabs-box2" v-if="companyInfotype==4&&readingMeterNum&&monitorMeterNum" >
+			
+			<view class="tabs2" :class="'tabs-len-2'"  
+			 :style="{width: '100%',   }">
+				<u-tabs-one    :gutter="32"
+				:list="companyInfotypeList" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF"
+					bg-color="#1677FF" :current="1" @change="companyInfotypeChange"></u-tabs-one>
+			</view>
+		
+		</view>
+		
 		<!-- 标签 -->
-		<view class="tabs-box" >
+		<view class="tabs-box" v-else >
 			
 			<view class="tabs" :class="'tabs-len-'+merchantList1.length"  v-show="companyList.length>1"
 			 :style="{width: companyList.length>3 ? '' : '100%'}">
@@ -463,7 +480,17 @@
 				codes: '', // 判断:reading用电量 detector设备数据检测
 				merchantList1: [], // 商户
 				merchantList2: [],
-				companyList: [],
+				companyList: [],
+				companyInfo:{},
+				companyInfotypeCurrent:1,
+				companyInfotypeList:[
+					{
+						name: '变压器巡检仪'
+					},
+					{
+						name: '费控电表剂量仪'
+					}
+				],
 				popShow: false,
 				popShowtest: true,
 				current: 0,
@@ -535,7 +562,10 @@
 				companyType:0,
 				incomeExpenditureObj:{},
 				getHomePageKwhshowLoading:false,
-				getHomePageManageshowLoading:false,
+				getHomePageManageshowLoading:false,
+				companyInfotype:0,
+				readingMeterNum:0, //计量仪
+				monitorMeterNum:0, //巡检仪
 			}
 		},
 		onLoad() {
@@ -546,7 +576,7 @@
 			this.endYear = new Date().getFullYear();
 			this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
 		 
-
+			this.getfindByOpenId();
 			this.getCompanyInfoList();
 			
 			
@@ -578,6 +608,40 @@
 			}
 		},
 		methods: {
+			//绑定权限
+			getfindByOpenId() {
+			
+				API_index.findByOpenId({
+					openId: this.carhelp.getOpenId()
+				}).then((response) => {
+					if(response.data&&response.data.companyInfo){
+						this.companyInfo=response.data.companyInfo
+						this.companyInfotype = response.data.companyInfo.type;
+						if(this.companyInfotype==4){
+							this.getFindMeterList()
+						}
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			getFindMeterList(){
+				
+				API.findMeterList().then((response) => {
+					//readingMeterNum 计量仪
					//monitorMeterNum 巡检仪
+					this.readingMeterNum=response.data.readingMeterNum
+					this.monitorMeterNum=response.data.monitorMeterNum
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			companyIdSet(val,item){
 				this.companyType= 0
 				if(val&&item){
@@ -801,6 +865,25 @@
 					
 				}
 				
+			},
+			companyInfotypeChange(index){
+				if(index!=this.companyInfotypeCurrent){
+					var url=""
+					if(process.car.NODE_ENV=='dev'){
+						
+						url='http://localhost:8081/#/'
+					
+					}else if(process.car.NODE_ENV=='test'){
+						
+						url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric-test/#/'
+					
+					}else{
+						url='https://dgj.hbjp.com.cn/charging-prod/jp-housekeep-electric/#/'
+					
+					}
+					
+					window.location.href=url+"pages/statistics/statistics"
+				}
 			},
 			change(index) {
 				this.current = index;
@@ -1256,11 +1339,14 @@
 			max-width: 26% !important;
 			flex: none !important;
 		}
-	}
-	/deep/.u-tab-item:first-child {
-		width: 20% !important;
-		flex: none !important;
 	}
+	.tabs{
+		/deep/.u-tab-item:first-child {
+			width: 20% !important;
+			flex: none !important;
+		}
+	}
+	
 	// /deep/.u-tab-item2 {
 	// 	width: 33% !important;
 	// 	flex: none !important;