From 4779cc1718ac42ef2a8b1c0dbc5b9d5b0aa94c35 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Tue, 18 Nov 2025 15:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E8=AF=A6=E6=83=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5,=E8=A3=85?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E9=87=87=E9=9B=86=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=8D=95=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/searchSelect/index.js | 17 +++++++++- .../components/installMeter/index.js | 33 +++++++++++++++++-- .../components/installMeter/index.wxml | 8 +++++ pages/workBenchTodoList/index.js | 4 +-- pages/workBenchTodoList/index.wxml | 2 +- pages/workOrderDetail/index.js | 7 +++- pages/workOrderDetail/index.json | 3 +- pages/workOrderDetail/index.wxml | 33 +++++++++++++++++++ service/meter.js | 5 +++ 9 files changed, 104 insertions(+), 8 deletions(-) diff --git a/components/searchSelect/index.js b/components/searchSelect/index.js index b9b3870..9b1c4bc 100644 --- a/components/searchSelect/index.js +++ b/components/searchSelect/index.js @@ -1,5 +1,5 @@ import { getLoginParkList, getParkBuildingList } from "../../service/park" -import { getParkSimpleMeterList, getParkBoxList, getCardList, getCollectionList, getInventoryMeter } from "../../service/meter" +import { getParkSimpleMeterList, getParkBoxList, getCardList, getCollectionList, getInventoryMeter, getCollectorList } from "../../service/meter" import { alertInfo } from "../../utils/index"; import request from "../../utils/request" import { payWays, feeType, meterType, noticeFlowType, noticeFlowStatus, @@ -176,8 +176,23 @@ Component({ case "collection": this.onSearchCollection(); return; + case "collector": + this.onSearchCollector(); + break; } }, + async onSearchCollector() { + const { searchText = "", } = this.data; + const { code, message, data = [] } = await getCollectorList(searchText); + if (code !== OK) { + alertInfo(message) + return + } + this.setData({ + columns: data?.map(item => `${item.collectorAddress}-${item.manufacturer}`), + list: data, + }) + }, async onSearchPark() { const { searchText = "" } = this.data; const { code, message, data: parks = [] } = await getLoginParkList({keyword: searchText}); diff --git a/pages/workBenchNew/components/installMeter/index.js b/pages/workBenchNew/components/installMeter/index.js index b12503a..e69f17e 100644 --- a/pages/workBenchNew/components/installMeter/index.js +++ b/pages/workBenchNew/components/installMeter/index.js @@ -146,6 +146,27 @@ Page({ collection: "C" }) }, + onBindCollector() { + const { park } = this.data; + if (!park) { + alertInfo("请先选择园区") + return; + } + this.setData({ + show: true, + title: "采集器", + type: 'collector', + }) + }, + clearCollector() { + this.setData({ + show: false, + title: "", + type: 'collector', + collector: null, + collectorName: null, + }) + }, uploadImage() { const that = this; wx.chooseMedia({ @@ -204,6 +225,8 @@ Page({ flat: null, valley: null, area: null, + collector: null, + collectorName: null, collections: [], }) }, @@ -258,6 +281,12 @@ Page({ meterTypeName: data, }); break; + case "collector": + this.setData({ + collector: data?.id, + collectorName: `${data.collectorAddress}-${data.manufacturer}`, + }); + break; case "meter": this.setData({ meter: data.id, @@ -403,7 +432,7 @@ Page({ park, meter, address, building, meterBox, meterType, ratio, area, card, collectionA, collectionB, collectionC, tenement, sharp, peak, flat, valley, overall, url, sn, - collectionARatio, collectionBRatio, collectionCRatio + collectionARatio, collectionBRatio, collectionCRatio, collector, } = this.data; if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox || ratio == null) { alertInfo("请填写必填项后保存") @@ -434,7 +463,7 @@ Page({ flat: flat === "" ? null : flat, valley: valley === "" ? null : valley, overall: overall === "" ? null : overall, - url, sn + url, sn, collector }) if (code !== OK) { alertInfo(message) diff --git a/pages/workBenchNew/components/installMeter/index.wxml b/pages/workBenchNew/components/installMeter/index.wxml index a103bd3..8d12cdb 100644 --- a/pages/workBenchNew/components/installMeter/index.wxml +++ b/pages/workBenchNew/components/installMeter/index.wxml @@ -90,6 +90,14 @@ allowClear="{{true}}" bind:clear="clearCard" /> + - {{ noticeFlowType[item.types - 1] }} + {{ noticeFlowTypeList[item.types - 1] }} diff --git a/pages/workOrderDetail/index.js b/pages/workOrderDetail/index.js index e514826..bc67909 100644 --- a/pages/workOrderDetail/index.js +++ b/pages/workOrderDetail/index.js @@ -11,7 +11,12 @@ Page({ * 页面的初始数据 */ data: { - detail: {} + detail: {}, + header: [ + // { key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address }, + { title: '操作人',renderBody: (item) => { return item.user_name } }, + { title: '状态',renderBody: (item) => { return item.status === 0 ? "未确认" : "已确认" } }, + ], }, /** diff --git a/pages/workOrderDetail/index.json b/pages/workOrderDetail/index.json index 827f19a..c9ed298 100644 --- a/pages/workOrderDetail/index.json +++ b/pages/workOrderDetail/index.json @@ -3,7 +3,8 @@ "navigator": "/components/navigator/index", "van-popup": "@vant/weapp/popup/index", "van-field": "@vant/weapp/field/index", - "van-button": "@vant/weapp/button/index" + "van-button": "@vant/weapp/button/index", + "custom-table": "/components/table/table" }, "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/workOrderDetail/index.wxml b/pages/workOrderDetail/index.wxml index a369acc..a4c5f9e 100644 --- a/pages/workOrderDetail/index.wxml +++ b/pages/workOrderDetail/index.wxml @@ -36,6 +36,39 @@ - + + + + + + + + 确认 diff --git a/service/meter.js b/service/meter.js index ff1afe8..ab96a3a 100644 --- a/service/meter.js +++ b/service/meter.js @@ -78,4 +78,9 @@ export const installMeter = async function(data) { // 拆表 export const uninstallMeter = async function(data) { return await POST(`/flow/doMeterRemoveApproval`, data); +} + +// 获取商户下的电表,后台 +export const getCollectorList = async function(keyword) { + return await GET(`/collector/list?collectorAddress=${replaceSpecialIcon(keyword)}`); } \ No newline at end of file