修改抄表记录峰谷不显示的问题

This commit is contained in:
2025-06-17 17:30:51 +08:00
parent a36faa9bcb
commit 7bd4da3c84
5 changed files with 44 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
import { exportElectricityList, getAccountingList, getElectricityList, getMeterReadingList } from "../../../../../service/accounting";
import { getTenementMeterList } from "../../../../../service/meter";
import dayjs from "../../../../../utils/dayjs";
import { getParkInfoByTime } from "../../../../../service/park";
import request from '../../../../../utils/request';
import { alertInfo, getPixelRatio, loadingFunc } from "../../../../../utils/index";
const { OK } = request;
@@ -19,6 +20,9 @@ Component({
loadingFunc(async () => {
await this.getReadingList();
})
},
"parkInfo": function(newValue) {
this.setData({ park: newValue })
}
},
/**
@@ -27,6 +31,7 @@ Component({
data: {
readingDetailShow: false,
readingDetail: {},
park: {},
meterReadingHeader: [
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
{ title: '倍率', key: 'ratio' },
@@ -76,10 +81,32 @@ Component({
readingPage: 1,
}, () => {
loadingFunc(async () => {
console.log("----------")
await this.getParkInfo(time)
console.log("===========")
await this.getReadingList();
})
})
},
async getParkInfo(time) {
const park = wx.getStorageSync('park');
const { park:parkInfo, code, message } = await getParkInfoByTime(park?.id, `${time}`, `${0}`,)
if (code !== OK) {
alertInfo(message)
return;
}
const that = this;
return new Promise((resolve) => {
that.setData({
parkInfo: parkInfo
}, () => {
resolve()
})
})
},
showDetail(e) {
const { index, data = {} } = e.detail;

View File

@@ -66,7 +66,7 @@
border="{{ false }}"
label="表字"
readonly
wx:if="{{parkInfo.category !== 1}}"
wx:if="{{park.meter04kvType !== 1}}"
/>
<van-field
@@ -74,29 +74,30 @@
border="{{ false }}"
label="表字(尖)"
readonly
wx:if="{{parkInfo.category === 1}}"
wx:if="{{park.meter04kvType === 1}}"
/>
<van-field
value="{{ readingDetail.peak }}"
border="{{ false }}"
label="表字(峰)"
readonly
wx:if="{{parkInfo.category === 1}}"
wx:if="{{park.meter04kvType === 1}}"
/>
<van-field
value="{{ readingDetail.flat }}"
border="{{ false }}"
label="表字(平)"
readonly
wx:if="{{parkInfo.category === 1}}"
wx:if="{{park.meter04kvType === 1}}"
/>
<van-field
value="{{ readingDetail.valley }}"
border="{{ false }}"
label="表字(谷)"
readonly
wx:if="{{parkInfo.category === 1}}"
wx:if="{{park.meter04kvType === 1}}"
/>
</van-cell-group>
</view>
</van-dialog>