账单支持峰谷
This commit is contained in:
parent
34995ef9a3
commit
3e9857bdcd
3
app.json
3
app.json
@ -32,7 +32,8 @@
|
|||||||
"pages/discountCoupon/index",
|
"pages/discountCoupon/index",
|
||||||
"pages/integralRecord/index",
|
"pages/integralRecord/index",
|
||||||
"pages/meterList/index",
|
"pages/meterList/index",
|
||||||
"pages/workBench/components/tenement/components/createTenement/index"
|
"pages/workBench/components/tenement/components/createTenement/index",
|
||||||
|
"pages/billMeterDetail/index"
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,11 @@ import { getReportDetail } from "../../../service/report";
|
|||||||
import { alertInfo, alertSuccess, getPixelRatio, loadingFunc } from "../../../utils/index";
|
import { alertInfo, alertSuccess, getPixelRatio, loadingFunc } from "../../../utils/index";
|
||||||
import request from '../../../utils/request'
|
import request from '../../../utils/request'
|
||||||
import * as echarts from '../../components/echarts/echarts';
|
import * as echarts from '../../components/echarts/echarts';
|
||||||
|
import { getRoundNumber } from "../../../utils/index"
|
||||||
const { OK } = request
|
const { OK } = request
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// pages/billDetail/index.js
|
// pages/billDetail/index.js
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -53,8 +56,11 @@ Page({
|
|||||||
detail,
|
detail,
|
||||||
amount: amount,
|
amount: amount,
|
||||||
meters: detail?.meters?.map(item => {
|
meters: detail?.meters?.map(item => {
|
||||||
const finalAmount = Number(item?.overall?.amount || 0) + Number(item?.loss?.amount || 0) + Number(item?.publicAmount || 0)
|
if (item?.loss?.amount) {
|
||||||
item.finalAmount = Number(finalAmount).toFixed(2)
|
item.loss.amount = getRoundNumber(Number(item.loss.amount))
|
||||||
|
}
|
||||||
|
// const finalAmount = Number(item?.overall?.amount || 0) + Number(item?.loss?.amount || 0) + Number(item?.publicAmount || 0)
|
||||||
|
item.finalAmount = getRoundNumber(Number(item.finalAmount))
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -162,6 +168,13 @@ Page({
|
|||||||
return pieChart;
|
return pieChart;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
jumpToDetail(e) {
|
||||||
|
const { meter } = e.currentTarget.dataset;
|
||||||
|
console.log("meter", meter)
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/billMeterDetail/index?data=' + JSON.stringify(meter),
|
||||||
|
})
|
||||||
|
},
|
||||||
download() {
|
download() {
|
||||||
const { id: tenement } = wx.getStorageSync('tenement')
|
const { id: tenement } = wx.getStorageSync('tenement')
|
||||||
const { id } = this.data;
|
const { id } = this.data;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--pages/billDetail/index.wxml-->
|
<!--pages/billDetail/index.wxml-->
|
||||||
<navigator title="{{ time }}电费账单" canBack="{{true}}" />
|
<navigator title="{{ time }}电费账单" canBack="{{true}}" />
|
||||||
<view class="title" style="top: {{statusBarHeight + 46}}px">
|
<view class="title" style="top: {{statusBarHeight + 46}}px">
|
||||||
<avatar text="{{detail.tenement.shortName}}" />
|
<avatar text="{{detail.tenement.shortName}}" />
|
||||||
<view class="titleContent">
|
<view class="titleContent">
|
||||||
<view class="park">
|
<view class="park">
|
||||||
<view class="label">
|
<view class="label">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<view class="label">
|
<view class="label">
|
||||||
账单周期:
|
账单周期:
|
||||||
</view>
|
</view>
|
||||||
<view class="value"> {{ detail.comprehensive.startDate }} 至 {{ detail.comprehensive.endDate }} </view>
|
<view class="value"> {{ detail.comprehensive.startDate }} 至 {{ detail.comprehensive.endDate }} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<van-button type="info" size="small" class="download" bind:click="download">下载</van-button>
|
<van-button type="info" size="small" class="download" bind:click="download">下载</van-button>
|
||||||
@ -50,14 +50,7 @@
|
|||||||
</van-row>
|
</van-row>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="contentTitle"> 电费构成 </view>
|
<view class="contentTitle"> 电费构成 </view>
|
||||||
<echarts
|
<echarts style="width:200rpx;height:180rpx;" id="echarts" class='mychart-bar' canvas-id="mychart-bar" ec="{{ ec }}" forceUseOldCanvas="{{false}}">
|
||||||
style="width:200rpx;height:180rpx;"
|
|
||||||
id="echarts"
|
|
||||||
class='mychart-bar'
|
|
||||||
canvas-id="mychart-bar"
|
|
||||||
ec="{{ ec }}"
|
|
||||||
forceUseOldCanvas="{{false}}"
|
|
||||||
>
|
|
||||||
</echarts>
|
</echarts>
|
||||||
<view class="tooltip">
|
<view class="tooltip">
|
||||||
(本月电量+本月线损电量)*电单价+摊薄公摊电费+摊薄调整电费
|
(本月电量+本月线损电量)*电单价+摊薄公摊电费+摊薄调整电费
|
||||||
@ -113,7 +106,7 @@
|
|||||||
<van-col span="12">
|
<van-col span="12">
|
||||||
<view class="colContent">
|
<view class="colContent">
|
||||||
<view class="colContentTitle">本期用电量</view>
|
<view class="colContentTitle">本期用电量</view>
|
||||||
<view class="colContentValue" > {{ amount }} 千瓦时 </view>
|
<view class="colContentValue"> {{ detail.comprehensive.finalAmount }} 千瓦时 </view>
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="12">
|
<van-col span="12">
|
||||||
@ -126,40 +119,28 @@
|
|||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="contentTitle"> 分时明细 </view>
|
<view class="contentTitle"> 分时明细 </view>
|
||||||
<van-row gutter="10">
|
<van-row gutter="10">
|
||||||
<van-col span="8">
|
<van-col span="12">
|
||||||
<view class="colContent">
|
<view class="colContent">
|
||||||
<view class="colContentTitle">
|
<view class="colContentTitle">
|
||||||
分时电量
|
分时电量
|
||||||
<view> (千瓦时) </view>
|
<view> (千瓦时) </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="colContentValue2" >尖: {{ detail.comprehensive.sharpAmount }} </view>
|
<view class="colContentValue2">尖: {{ detail.comprehensive.sharpAmount }} </view>
|
||||||
<view class="colContentValue2" >峰: {{ detail.comprehensive.peakAmount }} </view>
|
<view class="colContentValue2">峰: {{ detail.comprehensive.peakAmount }} </view>
|
||||||
<view class="colContentValue2" >平: {{ detail.comprehensive.flatAmount }} </view>
|
<view class="colContentValue2">平: {{ detail.comprehensive.flatAmount }} </view>
|
||||||
<view class="colContentValue2" >谷: {{ detail.comprehensive.valleyAmount }} </view>
|
<view class="colContentValue2">谷: {{ detail.comprehensive.valleyAmount }} </view>
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="8">
|
<van-col span="12">
|
||||||
<view class="colContent">
|
<view class="colContent">
|
||||||
<view class="colContentTitle">
|
<view class="colContentTitle">
|
||||||
分时单价
|
分时单价
|
||||||
<view> (元/千瓦时) </view>
|
<view> (元/千瓦时) </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="colContentValue2" >尖: {{ detail.comprehensive.priceSharp }} </view>
|
<view class="colContentValue2">尖: {{ detail.comprehensive.priceSharp }} </view>
|
||||||
<view class="colContentValue2" >峰: {{ detail.comprehensive.pricePeak }} </view>
|
<view class="colContentValue2">峰: {{ detail.comprehensive.pricePeak }} </view>
|
||||||
<view class="colContentValue2" >平: {{ detail.comprehensive.priceFlat }} </view>
|
<view class="colContentValue2">平: {{ detail.comprehensive.priceFlat }} </view>
|
||||||
<view class="colContentValue2" >谷: {{ detail.comprehensive.priceValley }} </view>
|
<view class="colContentValue2">谷: {{ detail.comprehensive.priceValley }} </view>
|
||||||
</view>
|
|
||||||
</van-col>
|
|
||||||
<van-col span="8">
|
|
||||||
<view class="colContent">
|
|
||||||
<view class="colContentTitle">
|
|
||||||
分时电费
|
|
||||||
<view> (元) </view>
|
|
||||||
</view>
|
|
||||||
<view class="colContentValue2" >尖: {{ detail.comprehensive.sharpFee }} </view>
|
|
||||||
<view class="colContentValue2" >峰: {{ detail.comprehensive.peakFee }} </view>
|
|
||||||
<view class="colContentValue2" >平: {{ detail.comprehensive.flatFee }} </view>
|
|
||||||
<view class="colContentValue2" >谷: {{ detail.comprehensive.valleyFee }} </view>
|
|
||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
@ -169,46 +150,117 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="contentTitle"> 分时电量明细 </view>
|
<view class="contentTitle"> 分时电量明细 </view>
|
||||||
<view class="tableWrapper" wx:for="{{meters}}">
|
<view class="tableWrapper">
|
||||||
<view style="font-size: 30rpx;font-weight: 600;"> 尖 </view>
|
<view class="meterListItem" wx:for="{{meters}}" wx:key="id">
|
||||||
<view style="margin: 20rpx 0; background-color: #fff;">
|
<div class="top">
|
||||||
|
<view class="address">{{item.address}}</view>
|
||||||
|
<view class="detail primaryTextBtn" bind:tap="jumpToDetail" data-meter="{{item}}"> 详情 </view>
|
||||||
|
</div>
|
||||||
|
<view style="margin: 20rpx 0; background-color: #fff;">
|
||||||
|
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableTitle"> 电度电量 </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableTitle"> 线损电量 </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableTitle"> 合计电量 </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableTitle"> 合计电费 </view>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<van-row class="meterListItemContent">
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.overall.amount}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.loss.amount}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.finalAmount}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.finalTotal}} </view>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view style="font-size: 30rpx;font-weight: 600;"> 尖 </view> -->
|
||||||
|
<!-- <view style="margin: 20rpx 0; background-color: #fff;">
|
||||||
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 电表地址 </view>
|
<view class="tableTitle"> 电表地址 </view>
|
||||||
<view class="tableContent"> {{item.address}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 起码 </view>
|
<view class="tableTitle"> 起码 </view>
|
||||||
<view class="tableContent"> {{item.startSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 止码 </view>
|
<view class="tableTitle"> 止码 </view>
|
||||||
<view class="tableContent"> {{item.endSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 电度电量 </view>
|
<view class="tableTitle"> 电度电量 </view>
|
||||||
<view class="tableContent"> {{item.critical.amount}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
|
<view class="top">
|
||||||
|
<view class="meterListItem" wx:for="{{meters}}" wx:key="id">
|
||||||
|
<van-row>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.address}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.startSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.endSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.critical.amount}} </view>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 线损电量 </view>
|
<view class="tableTitle"> 线损电量 </view>
|
||||||
<view class="tableContent"> {{item.lossSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 公摊电量 </view>
|
<view class="tableTitle"> 公摊电量 </view>
|
||||||
<view class="tableContent"> {{item.poolSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 合计电量 </view>
|
<view class="tableTitle"> 合计电量 </view>
|
||||||
<view class="tableContent"> {{item.finalSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="6">
|
<van-col span="6">
|
||||||
<view class="tableTitle"> 合计电费 </view>
|
<view class="tableTitle"> 合计电费 </view>
|
||||||
<view class="tableContent"> {{item.chargeSharp}} </view>
|
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
<view class="bottom">
|
||||||
|
<view class="meterListItem" wx:for="{{meters}}" wx:key="id">
|
||||||
|
<van-row>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.lossSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.poolSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.finalSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="6">
|
||||||
|
<view class="tableContent"> {{item.chargeSharp}} </view>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view style="font-size: 30rpx;font-weight: 600;"> 峰 </view>
|
<view style="font-size: 30rpx;font-weight: 600;"> 峰 </view>
|
||||||
<view style="margin: 20rpx 0; background-color: #fff;">
|
<view style="margin: 20rpx 0; background-color: #fff;">
|
||||||
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
||||||
@ -327,7 +379,7 @@
|
|||||||
<view class="tableContent"> {{item.chargeValley}} </view>
|
<view class="tableContent"> {{item.chargeValley}} </view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 20rpx;"></view>
|
<view style="height: 20rpx;"></view>
|
@ -74,7 +74,7 @@ page {
|
|||||||
|
|
||||||
.colContentValue2 {
|
.colContentValue2 {
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
padding-left: 20rpx;
|
padding-left: 40rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,10 +100,37 @@ page {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download {
|
.download {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20rpx;
|
top: 20rpx;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meterListItem {
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meterListItem .top {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.meterListItem .address {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* .top .meterListItem:nth-child(even) .tableContent,
|
||||||
|
.bottom .meterListItem:nth-child(even) .tableContent,
|
||||||
|
.top .meterListItem:nth-child(even),
|
||||||
|
.bottom .meterListItem:nth-child(even)
|
||||||
|
{
|
||||||
|
|
||||||
|
} */
|
||||||
|
|
||||||
|
.meterListItemContent, .meterListItemContent .tableContent {
|
||||||
|
background-color: #fff;
|
||||||
}
|
}
|
87
pages/billMeterDetail/index.js
Normal file
87
pages/billMeterDetail/index.js
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
// pages/billMeterDetail/index.js
|
||||||
|
import { getRoundNumber } from "../../utils/index"
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
data: {},
|
||||||
|
headers: [
|
||||||
|
{ key: 'type', title: '' },
|
||||||
|
{ title: '尖',renderBody: (item) => { return item?.sharp } },
|
||||||
|
{ title: '峰',renderBody: (item) => { return item?.peak } },
|
||||||
|
{ title: '平',renderBody: (item) => { return item?.flat } },
|
||||||
|
{ title: '谷',renderBody: (item) => { return item?.valley } },
|
||||||
|
],
|
||||||
|
list: []
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
const data = JSON.parse(options.data) || {}
|
||||||
|
this.setData({
|
||||||
|
data: data,
|
||||||
|
list: [
|
||||||
|
{ type: "起码", sharp: data.startSharp, peak: data.startPeak, flat: data.startFlat, valley: data.startValley },
|
||||||
|
{ type: "止码", sharp: data.endSharp, peak: data.endPeak, flat: data.endFlat, valley: data.endValley },
|
||||||
|
{ type: "退补电量", sharp: data.refundSharp, peak: data.refundPeak, flat: data.refundFlat, valley: data.refundValley },
|
||||||
|
{ type: "从表电量", sharp: getRoundNumber(data.nestSharp), peak: getRoundNumber(data.nestPeak), flat: getRoundNumber(data.nestFlat), valley: getRoundNumber(data.nestValley) },
|
||||||
|
{ type: "电度电量", sharp: getRoundNumber(data?.critical?.amount), peak: getRoundNumber(data.peak?.amount), flat: getRoundNumber(data.flat?.amount), valley: getRoundNumber(data.valley?.amount) },
|
||||||
|
{ type: "分时单价", sharp: data.critical?.price, peak: data.peak?.price, flat: data.flat?.price, valley: data.valley?.price },
|
||||||
|
{ type: "电费", sharp: getRoundNumber(data.chargeSharp), peak: getRoundNumber(data.chargePeak), flat: getRoundNumber(data.chargeFlat), valley: getRoundNumber(data.chargeValley) },
|
||||||
|
]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
10
pages/billMeterDetail/index.json
Normal file
10
pages/billMeterDetail/index.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {
|
||||||
|
"navigator": "/components/navigator/index",
|
||||||
|
"van-row": "@vant/weapp/row/index",
|
||||||
|
"van-col": "@vant/weapp/col/index",
|
||||||
|
"van-field": "@vant/weapp/field/index",
|
||||||
|
"table": "/components/table/table"
|
||||||
|
},
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
45
pages/billMeterDetail/index.wxml
Normal file
45
pages/billMeterDetail/index.wxml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<!--pages/billMeterDetail/index.wxml-->
|
||||||
|
<navigator title="详情" canBack="{{true}}" />
|
||||||
|
<view class="contentWrapper">
|
||||||
|
<van-field
|
||||||
|
label="电表编号"
|
||||||
|
readonly="{{true}}"
|
||||||
|
border="{{false}}"
|
||||||
|
custom-style="padding-left: 0; padding-right: 0;"
|
||||||
|
title-width="132rpx"
|
||||||
|
value="{{data.meterNo}}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
label="电表地址"
|
||||||
|
readonly="{{true}}"
|
||||||
|
custom-style="padding-left: 0; padding-right: 0;"
|
||||||
|
title-width="132rpx"
|
||||||
|
border="{{false}}"
|
||||||
|
value="{{data.address}}"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
label="倍率"
|
||||||
|
readonly="{{true}}"
|
||||||
|
border="{{false}}"
|
||||||
|
custom-style="padding-left: 0; padding-right: 0;"
|
||||||
|
title-width="132rpx"
|
||||||
|
value="{{data.ratio}}"
|
||||||
|
/>
|
||||||
|
<view class="table">
|
||||||
|
<table header="{{headers}}" list="{{list}}" />
|
||||||
|
</view>
|
||||||
|
<view class="total">
|
||||||
|
<van-row>
|
||||||
|
<van-col span="12">
|
||||||
|
<view class="totalNumber">
|
||||||
|
电度电量:{{data.overall.amount}}
|
||||||
|
</view>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<view class="totalNumber">
|
||||||
|
电度电费:{{data.overall.fee}}
|
||||||
|
</view>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
22
pages/billMeterDetail/index.wxss
Normal file
22
pages/billMeterDetail/index.wxss
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* pages/billMeterDetail/index.wxss */
|
||||||
|
.infoItem {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contentWrapper {
|
||||||
|
margin: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
border: 1rpx solid rgba(204,204,204,.5);
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
padding-top: 30rpx;
|
||||||
|
padding-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalNumber {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
@ -13,7 +13,7 @@
|
|||||||
{
|
{
|
||||||
"name": "childPackage/pages/billDetail/index",
|
"name": "childPackage/pages/billDetail/index",
|
||||||
"pathName": "childPackage/pages/billDetail/index",
|
"pathName": "childPackage/pages/billDetail/index",
|
||||||
"query": "id=R00102714036256769&time=2025-03",
|
"query": "id=R00103882183475201&time=2025-03",
|
||||||
"launchMode": "default",
|
"launchMode": "default",
|
||||||
"scene": null
|
"scene": null
|
||||||
},
|
},
|
||||||
|
@ -45,10 +45,10 @@ export function getConfigByEnv() {
|
|||||||
switch (envVersion) {
|
switch (envVersion) {
|
||||||
// 开发版
|
// 开发版
|
||||||
case 'develop':
|
case 'develop':
|
||||||
api = "http://localhost:8000"
|
// api = "http://localhost:8000"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
// api = "https://zgd.hbhcbn.com/api3"
|
||||||
// api = "https://zgd.hbhcbn.com/api3"
|
// api = "https://zgd.hbhcbn.com/api3"
|
||||||
// api = "https://zgd.hbhcbn.com/wxApi"
|
api = "https://zgd.hbhcbn.com/wxApi"
|
||||||
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
// api = "http://127.0.0.1:4523/m1/4143821-0-default"
|
||||||
break;
|
break;
|
||||||
// 体验版
|
// 体验版
|
||||||
@ -249,4 +249,8 @@ export function getFileName(path) {
|
|||||||
|
|
||||||
export function replaceSpecialIcon(str) {
|
export function replaceSpecialIcon(str) {
|
||||||
return str.replace(/#/g, escape("#"))
|
return str.replace(/#/g, escape("#"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getRoundNumber(number) {
|
||||||
|
return (Math.round(number * 100) / 100).toFixed(2)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user