From 5573c78b23f86fa4c3ef710aab65c60ef91c6468 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Tue, 4 Nov 2025 16:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/installMeter/index.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pages/workBenchNew/components/installMeter/index.js b/pages/workBenchNew/components/installMeter/index.js index 8118ae9..f53ca81 100644 --- a/pages/workBenchNew/components/installMeter/index.js +++ b/pages/workBenchNew/components/installMeter/index.js @@ -176,13 +176,25 @@ Page({ }, onConfirm(e) { const { type, data = {} } = e.detail; - const {collection} = this.data; + const {collection, park, tenement} = this.data; switch(type) { case "park": this.setData({ park: data.id, parkName: data.name, }) + if (park !== data.id) { + this.setData({ + tenement: null, + tenementName: null, + building: null, + buildingName: null, + meterBox: null, + meterBoxName: null, + meter: null, + meterName: null, + }) + } break; case "tenement": this.setData({ @@ -323,7 +335,7 @@ Page({ ratio, area, card, collectionA, collectionB, collectionC, tenement, sharp, peak, flat, valley, overall, url } = this.data; - if (!park || !meter || !address || !meterType) { + if (!park || !meter || !address || meterType == null) { alertInfo("请填写必填项后保存") return; }