修改电表报表抄表记录

This commit is contained in:
2025-01-17 08:44:59 +08:00
parent 2b653ea3ed
commit 24f2ec9ead
13 changed files with 323 additions and 44 deletions

View File

@@ -22,26 +22,26 @@ Page({
year: dayjs().format('YYYY'),
yearMonth: dayjs().format("YYYY-MM"),
yearMonthDay: dayjs().format("YYYY-MM-DD"),
yearStamp: new Date().getTime(),
yearMonthStamp: new Date().getTime(),
yearMonthDayStamp: new Date().getTime(),
header: [
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
{ title: '时间',renderBody: (item) => { return item.time } },
{ key: 'number', title: '耗量' },
],
meterReadingHeader: [
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
{ title: '倍率', key: 'ratio' },
{ key: 'number', title: '抄表记录' },
],
list: [],
visible: false,
meterReadingList: [],
accountingList: [],
electricNumber: 0,
meterNumber: 0,
page: 1,
readingPage: 1,
},
changeQueryType(e) {
const { type } = e.currentTarget.dataset
@@ -53,10 +53,10 @@ Page({
})
break;
case 1:
loadingFunc(async () => {
await this.getReadingList();
})
break;
// loadingFunc(async () => {
// await this.getReadingList();
// })
// break;
case 2:
loadingFunc(async () => {
await this.getAccountingBalanceList();
@@ -74,6 +74,7 @@ Page({
visible: true
})
},
changeTimeType(e) {
const { type } = e.currentTarget.dataset
const that = this;
@@ -164,15 +165,7 @@ Page({
return pieChart;
});
},
async getReadingList() {
const { meterId } = this.data;
const { code, message, data } = await getMeterReadingList(meterId)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({ meterReadingList: data, totalPage: 1 })
},
async export() {
loadingFunc(async () => {
const { queryType, timeType, meterId, year, yearMonth, yearMonthDay } = this.data;
@@ -287,6 +280,7 @@ Page({
onTimeCancel() {
this.setData({ visible: false })
},
onTimeConfirm(e) {
const { type, time } = e.detail;
switch(type) {
@@ -319,6 +313,7 @@ Page({
break;
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/