From 769024c1c74c376cacac63f82510238d0bb3c2de Mon Sep 17 00:00:00 2001 From: wangyx <2838268875@qq.com> Date: Fri, 15 Aug 2025 10:11:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesA/kfPage/list.vue | 42 +++++------------------------------------ static/img/kf.png | Bin 0 -> 1423 bytes 2 files changed, 5 insertions(+), 37 deletions(-) create mode 100644 static/img/kf.png diff --git a/pagesA/kfPage/list.vue b/pagesA/kfPage/list.vue index cab9adb..b4565af 100644 --- a/pagesA/kfPage/list.vue +++ b/pagesA/kfPage/list.vue @@ -34,14 +34,14 @@ > - + {{ item.apartmentName }} | {{ item.houseTypeName }}{{ item.apartmentName }} | {{ item.houseTypeName||'' }} @@ -78,7 +78,7 @@ @@ -201,26 +201,7 @@ export default { return { searchPhone: "", // 搜索手机号 loading: false, // 加载状态 - appointmentList: [ - { - id: 1, - community: "西海岸路乐业社区", - houseType: "三居室", - appointee: "杨斌", - phone: "13362000010", - appointmentTime: "2025-08-06 上午09:00-12:00", - idCard: "370832199606062001", - }, - { - id: 2, - community: "西海岸路乐业社区", - houseType: "三居室", - appointee: "曲曼", - phone: "17700020202", - appointmentTime: "2025-08-06 上午09:00-12:00", - idCard: "370832199606062002", - }, - ], + appointmentList: [], queryParams: { pageNum: 1, pageSize: 10, @@ -246,19 +227,6 @@ export default { ], }; }, - computed: { - // 过滤后的预约列表 - filteredAppointmentList() { - if (!this.searchPhone) { - return this.appointmentList; - } - return this.appointmentList.filter( - (item) => - item.phone.includes(this.searchPhone) || - item.appointee.includes(this.searchPhone) - ); - }, - }, onLoad() { this.resetAndLoad(); }, diff --git a/static/img/kf.png b/static/img/kf.png new file mode 100644 index 0000000000000000000000000000000000000000..9361bb00672d377f2a872c0eaafb0ffe968e9730 GIT binary patch literal 1423 zcmV;A1#tR_P)Px)Nl8ROR9HvNm}^XvXB5Z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A0roomid,?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E8=A1=A8=E6=95=B0=E4=B8=8D=E6=98=AF=E5=BF=85?= =?UTF-8?q?=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesA/kfPage/list.vue | 2 +- pagesA/sdPage/dfReport.vue | 122 +++++++++---------------------------- pagesA/sdPage/sfReport.vue | 57 +++++++++++------ 3 files changed, 68 insertions(+), 113 deletions(-) diff --git a/pagesA/kfPage/list.vue b/pagesA/kfPage/list.vue index b4565af..c76166a 100644 --- a/pagesA/kfPage/list.vue +++ b/pagesA/kfPage/list.vue @@ -39,7 +39,7 @@ > - + {{ item.apartmentName }} | {{ item.houseTypeName||'' }} diff --git a/pagesA/sdPage/dfReport.vue b/pagesA/sdPage/dfReport.vue index 2b40dfc..e2e1b77 100644 --- a/pagesA/sdPage/dfReport.vue +++ b/pagesA/sdPage/dfReport.vue @@ -100,9 +100,9 @@ - * + > --> 上次表数 { queryDeptDropdownList({ type, id }).then((res) => { resolve(res.data); - console.log(res.data, "res.data"); }); }); }, async onPickerChange(e, type) { if (type == "乐业社区") { - console.log("e", e); - const apartmentInfo = this.deptOptions[e.detail.value]; - console.log("社区信息", apartmentInfo); - console.log("社区信息11", this.deptOptions); - this.blockForm.apartmentName = apartmentInfo.deptName; this.blockForm.apartmentId = apartmentInfo.deptId; // 楼 @@ -290,9 +284,7 @@ export default { apartmentInfo.deptId ); this.buildingOptions = buildingArray; - console.log("楼信息", buildingArray); const buildingNames = buildingArray.map((item) => item.name); - console.log("buildingNames:", buildingNames); this.blockForm.buildingId = buildingArray[0].id; // 单元 @@ -301,7 +293,6 @@ export default { buildingArray[0].id ); this.unitOptions = unitArray; - console.log("unitArray:", unitArray); const unitNames = unitArray.map((item) => item.name); this.blockForm.unitId = unitArray[0].id; @@ -313,6 +304,8 @@ export default { this.energyMeterConfig = houseArray[0].energyMeterConfig; this.waterMeterConfig = houseArray[0].waterMeterConfig; let house = houseArray[0]; + this.blockForm.roomId = houseArray[0].roomId; + // for (let index = 0; index < house.type; index++) { // this.form.waterMeters.push({ // waterMeter: "", @@ -325,7 +318,6 @@ export default { this.getHouseInfoBy(this.blockForm.houseId); } else if (this.energyMeterConfig == 2) { this.getRoomByHouseId(this.blockForm.houseId); - } } }, @@ -334,9 +326,7 @@ export default { }, async bindMultiPickerColumnChange(e) { if (!this.multiArray[0].length) return; - console.log( - "修改的列为:" + e.detail.column + ",值为:" + e.detail.value - ); + this.multiIndex[e.detail.column] = e.detail.value; switch (e.detail.column) { case 0: @@ -392,17 +382,7 @@ export default { this.getHouseInfoBy(this.blockForm.houseId); } else if (this.energyMeterConfig == 2) { this.getRoomByHouseId(this.blockForm.houseId); - this.getLastMeter(); - } - - console.log( - this.waterMeterConfig, - this.energyMeterConfig, - "this.waterMeterConfig, this.energyMeterConfig" - ); - console.log(this.houseOptions[e.detail.value]); - this.$forceUpdate(); }, onDelete(event, index) { @@ -461,8 +441,10 @@ export default { const res = await getHouseInfo(id); if (res.code == 200) { if (this.energyMeterConfig == 1) { + this.getRoomByHouseId(id); + this.form = [ - { + { electricMeterNumber: res.data.electricMeterNumber, }, ]; @@ -477,11 +459,11 @@ export default { }, // 获取上次抄表 async getLastMeter(item) { - let roomId = ''; - if(this.energyMeterConfig == 1){ - roomId = this.blockForm.houseId; - } else if (this.energyMeterConfig == 2) { - // roomId = this.form.map((item) => item.id).join(','); + let roomId = ""; + if (this.waterMeterConfig == 1) { + roomId = this.form[0].id; + } else { + roomId = this.blockForm.roomId; } const params = { houseId: this.blockForm.houseId, @@ -491,35 +473,17 @@ export default { }; const res = await queryLastMeterReading(params); if (this.energyMeterConfig == 1) { - this.form = [ - { - electricMeterNumber: res.data[0].meterNumber, - lastMeterReading: res.data[0].thisMeterReading, - }, - ]; + this.form = this.form.map((item) => ({ + ...item, + lastMeterReading: res.data[0].thisMeterReading, + electricMeterNumber: res.data[0].meterNumber, + })); } else if (this.energyMeterConfig == 2) { this.form = this.form.map((item) => { // 找到 getLastMeter 返回的对应项 const meter = res.data.find( (m) => String(m.roomId) === String(item.id) ); - console.log(meter, "meter"); - - if (meter) { - return { - ...item, - lastMeterReading: meter.thisMeterReading, - electricMeterNumber: meter.meterNumber, - }; - } - return item; - }); - this.form = this.form.map((item) => { - // 找到 getLastMeter 返回的对应项 - const meter = res.data.find( - (m) => String(m.roomId) === String(item.id) - ); - console.log(meter, "meter"); if (meter) { return { @@ -531,42 +495,19 @@ export default { return item; }); } - // if (Array.isArray(res.data) && res.data.length > 0) { - - // } else { - // // res.data 为空时,显示一个空表单 - // this.form = [ - // { - // lastMeterReading: "", - // // meterNumber: "", - // thisMeterReading: "", - // }, - // ]; - // } }, async getRoomByHouseId(id) { const res = await getRoomByHouseId({ houseId: id }); if (res.code == 200) { - console.log(res.data, "res.data"); - const data = res.data; if (this.energyMeterConfig == 1) { - this.form = [{}]; + this.form = this.form.map((item) => ({ + ...item, + id: res.data[0].id, + })); } else if (this.energyMeterConfig == 2) { this.form = res.data; this.getLastMeter(); } - - console.log(this.form, "this.form"); - // if (this.waterMeterConfig == 1 && this.energyMeterConfig == 1) { - // this.sbList = []; - // this.dbList = []; - // } else if (this.waterMeterConfig == 1 && this.energyMeterConfig == 2) { - // this.sbList = []; - // this.dbList = data; - // } else if (this.waterMeterConfig == 2 && this.energyMeterConfig == 1) { - // this.sbList = data; - // this.dbList = []; - // } } }, onSubmit() { @@ -621,13 +562,13 @@ export default { // }); // return; // } - if (!item.lastMeterReading && item.lastMeterReading !== 0) { - uni.showToast({ - title: `请填写上次表数`, - icon: "none", - }); - return; - } + // if (!item.lastMeterReading && item.lastMeterReading !== 0) { + // uni.showToast({ + // title: `请填写上次表数`, + // icon: "none", + // }); + // return; + // } if (!item.thisMeterReading && item.thisMeterReading !== 0) { uni.showToast({ title: `请填写本次表数`, @@ -645,7 +586,6 @@ export default { } } this.submitAdd(); - console.log("onSubmit", this.form); }, async submitAdd() { let params = this.form.map((item) => ({ @@ -653,7 +593,7 @@ export default { meterType: 1, houseId: this.blockForm.houseId, roomId: item.id || "", - lastMeterReading: parseFloat(item.lastMeterReading).toFixed(4), + lastMeterReading: isNaN(parseFloat(item.lastMeterReading)) ? '' : parseFloat(item.lastMeterReading).toFixed(4), thisMeterReading: parseFloat(item.thisMeterReading).toFixed(4), images: (item.fileList || []).map((f) => ({ url: f.url, @@ -664,7 +604,6 @@ export default { remark: item.remark || "", })); console.log(params, "params"); - const res = await submitWaterAndElectricity(params); if (res.code == 200) { uni.showToast({ @@ -687,7 +626,6 @@ export default { icon: "none", }); } - console.log(res, "reeees"); }, }, }; diff --git a/pagesA/sdPage/sfReport.vue b/pagesA/sdPage/sfReport.vue index f8ecc83..a8bef83 100644 --- a/pagesA/sdPage/sfReport.vue +++ b/pagesA/sdPage/sfReport.vue @@ -93,9 +93,9 @@ - * + > --> 上次表数 ({ + ...item, + lastMeterReading: res.data[0].thisMeterReading, + waterMeterNumber: res.data[0].meterNumber, + })); + console.log(this.form, "this.formgetLastMeter"); + } else if (this.waterMeterConfig == 2) { this.form = this.form.map((item) => { const meter = res.data.find( @@ -481,7 +490,14 @@ export default { const res = await getRoomByHouseId({ houseId: id }); if (res.code == 200) { if (this.waterMeterConfig == 1) { - this.form = [{}]; + console.log(this.form,"this.formgetRoomByHouseId11"); + + console.log(res.data,"res.data[0].id"); + + this.form = this.form.map((item) => ({ + ...item, + id:res.data[0].id + })); } else if (this.waterMeterConfig == 2) { this.form = res.data; this.getLastMeter(); @@ -545,13 +561,13 @@ export default { // }); // return; // } - if (!item.lastMeterReading && item.lastMeterReading !== 0) { - uni.showToast({ - title: `请填写上次表数`, - icon: "none", - }); - return; - } + // if (!item.lastMeterReading && item.lastMeterReading !== 0) { + // uni.showToast({ + // title: `请填写上次表数`, + // icon: "none", + // }); + // return; + // } if (!item.thisMeterReading && item.thisMeterReading !== 0) { uni.showToast({ title: `请填写本次表数`, @@ -569,15 +585,16 @@ export default { } } this.submitAdd(); - console.log("onSubmit", this.form); }, async submitAdd() { + console.log(this.form,"this.form"); + let params = this.form.map((item) => ({ meterNumber: item.waterMeterNumber, meterType: 2, houseId: this.blockForm.houseId, roomId: item.id || "", - lastMeterReading: parseFloat(item.lastMeterReading).toFixed(4), + lastMeterReading: isNaN(parseFloat(item.lastMeterReading)) ? '' : parseFloat(item.lastMeterReading).toFixed(4), thisMeterReading: parseFloat(item.thisMeterReading).toFixed(4), images: (item.fileList || []).map((f) => ({ url: f.url,