工单支持点击列表进入详情,新装电表的适合根据电表类型显示商户和尖峰平谷,拆表的时候是商户表的时候二次提示

This commit is contained in:
2025-11-21 16:25:43 +08:00
parent 0ef96344ce
commit 990a3a17aa
7 changed files with 89 additions and 23 deletions

View File

@@ -224,6 +224,7 @@ Page({
peak: null,
flat: null,
valley: null,
deepValley: null,
area: null,
collector: null,
collectorName: null,
@@ -233,7 +234,7 @@ Page({
onConfirm(e) {
console.log("e", e)
const { type, data = {}, way } = e.detail;
const {collection, park, tenement} = this.data;
const {collection, park, meterType, tenement, tenementName, overall, sharp, flat, peak, valley, deepValley} = this.data;
switch(type) {
case "park":
this.setData({
@@ -276,9 +277,23 @@ Page({
})
break;
case "meterType":
let newMeterData = {};
if (way !== 0) {
newMeterData = {
tenement: null,
tenementName: null,
overall: null,
sharp: null,
peak: null,
flat: null,
valley: null,
deepValley: null,
}
}
this.setData({
meterType: way,
meterTypeName: data,
...newMeterData,
});
break;
case "collector":
@@ -402,6 +417,11 @@ Page({
valley: e.detail
})
},
changeDeepValley(e) {
this.setData({
deepValley: e.detail
})
},
changeRatio(e) {
this.setData({
ratio: e.detail,
@@ -431,7 +451,7 @@ Page({
const {
park, meter, address, building, meterBox, meterType,
ratio, area, card, collectionA, collectionB, collectionC,
tenement, sharp, peak, flat, valley, overall, url, sn,
tenement, sharp, peak, flat, valley, deepValley, overall, url, sn,
collectionARatio, collectionBRatio, collectionCRatio, collector,
} = this.data;
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox || ratio == null) {
@@ -463,6 +483,8 @@ Page({
flat: flat === "" ? null : flat,
valley: valley === "" ? null : valley,
overall: overall === "" ? null : overall,
deepValley: deepValley == "" ? null : deepValley,
url, sn, collector
})
if (code !== OK) {