From 990a3a17aa00a25b6d5c974bcd19fe08f1c8914d Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Fri, 21 Nov 2025 16:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=94=AF=E6=8C=81=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=88=97=E8=A1=A8=E8=BF=9B=E5=85=A5=E8=AF=A6=E6=83=85?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E8=A3=85=E7=94=B5=E8=A1=A8=E7=9A=84=E9=80=82?= =?UTF-8?q?=E5=90=88=E6=A0=B9=E6=8D=AE=E7=94=B5=E8=A1=A8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=95=86=E6=88=B7=E5=92=8C=E5=B0=96=E5=B3=B0?= =?UTF-8?q?=E5=B9=B3=E8=B0=B7=EF=BC=8C=E6=8B=86=E8=A1=A8=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=98=AF=E5=95=86=E6=88=B7=E8=A1=A8=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BA=8C=E6=AC=A1=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/installMeter/index.js | 26 +++++++++- .../components/installMeter/index.wxml | 13 +++++ .../components/uninstallMeter/index.js | 49 ++++++++++++++----- pages/workBenchTodoList/index.js | 6 +++ pages/workBenchTodoList/index.wxml | 13 +++-- pages/workOrderDetail/index.js | 1 - pages/workOrderDetail/index.wxml | 4 +- 7 files changed, 89 insertions(+), 23 deletions(-) diff --git a/pages/workBenchNew/components/installMeter/index.js b/pages/workBenchNew/components/installMeter/index.js index e69f17e..d9ebac9 100644 --- a/pages/workBenchNew/components/installMeter/index.js +++ b/pages/workBenchNew/components/installMeter/index.js @@ -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) { diff --git a/pages/workBenchNew/components/installMeter/index.wxml b/pages/workBenchNew/components/installMeter/index.wxml index 8d12cdb..bde7fde 100644 --- a/pages/workBenchNew/components/installMeter/index.wxml +++ b/pages/workBenchNew/components/installMeter/index.wxml @@ -127,36 +127,49 @@ placeholder="请选择商户" text="{{ tenementName }}" bind:search="onTenementFocus" + wx:if="{{meterType === 0}}" /> + { + wx.navigateTo({ + url: '/pages/workBenchTodoList/index', + }) + }, 300) + return; } - alertSuccess("拆除成功") - setTimeout(() => { - wx.navigateTo({ - url: '/pages/workBenchTodoList/index', - }) - }, 300) + wx.showModal({ + title: '提示', + content: '拆出后电表和商户关系,电表和卡的关系会自动解绑,是否拆出', + complete: async (res) => { + if (res.cancel) { + + } + + if (res.confirm) { + const { code, message } = await uninstallMeter({sn: meter, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall}) + if (code !== OK) { + alertInfo(message) + return + } + alertSuccess("拆除成功") + setTimeout(() => { + wx.navigateTo({ + url: '/pages/workBenchTodoList/index', + }) + }, 300) + return; + } + } + }) }, uploadImage() { const that = this; diff --git a/pages/workBenchTodoList/index.js b/pages/workBenchTodoList/index.js index 801652b..51ea683 100644 --- a/pages/workBenchTodoList/index.js +++ b/pages/workBenchTodoList/index.js @@ -108,6 +108,12 @@ handleDoNoticeBtn(e) { url: '/pages/workOrderDetail/index?id=' + id, }) }, + listJumpToDetail(e) { + const { id } = e.currentTarget.dataset; + wx.navigateTo({ + url: '/pages/workOrderDetail/index?id=' + id, + }) + }, onConfirm(e) { const { type, data = {}, way } = e.detail; const that = this; diff --git a/pages/workBenchTodoList/index.wxml b/pages/workBenchTodoList/index.wxml index 2f96d6f..7cdcb55 100644 --- a/pages/workBenchTodoList/index.wxml +++ b/pages/workBenchTodoList/index.wxml @@ -46,8 +46,8 @@ 操作 - - + + {{ item.time }} @@ -62,14 +62,14 @@ 确认 已确认 - + - - + diff --git a/pages/workOrderDetail/index.js b/pages/workOrderDetail/index.js index bc67909..f6e279e 100644 --- a/pages/workOrderDetail/index.js +++ b/pages/workOrderDetail/index.js @@ -6,7 +6,6 @@ const { OK } = request; // pages/workOrderDetail/index.js Page({ - /** * 页面的初始数据 */ diff --git a/pages/workOrderDetail/index.wxml b/pages/workOrderDetail/index.wxml index a4c5f9e..cedf8dc 100644 --- a/pages/workOrderDetail/index.wxml +++ b/pages/workOrderDetail/index.wxml @@ -48,12 +48,12 @@ readonly title-width="132rpx" /> - + /> -->