|
|
@ -53,11 +53,9 @@ |
|
|
|
:range="multiArray" |
|
|
|
> |
|
|
|
<view class="uni-input">{{ |
|
|
|
multiIndex[0] === -1 |
|
|
|
? "请选择" |
|
|
|
: multiArray[0][multiIndex[0]] + |
|
|
|
multiArray[1][multiIndex[1]] + |
|
|
|
multiArray[2][multiIndex[2]] |
|
|
|
multiArray[0][multiIndex[0]] + |
|
|
|
multiArray[1][multiIndex[1]] + |
|
|
|
multiArray[2][multiIndex[2]] |
|
|
|
}}</view> |
|
|
|
</picker> |
|
|
|
</view> |
|
|
@ -74,6 +72,7 @@ |
|
|
|
</view> |
|
|
|
<scroll-view class="house-view" scroll-y="true"> |
|
|
|
<view class="section-card" v-for="(item, index) in form" :key="index"> |
|
|
|
<view class="section-title">{{ item.roomTypeName }}</view> |
|
|
|
<view class="meter-row"> |
|
|
|
<view class="meter-label"> |
|
|
|
<view style="color: #f93838; margin-right: 4rpx; font-size: 24rpx" |
|
|
@ -193,7 +192,7 @@ export default { |
|
|
|
unitOptions: [], |
|
|
|
houseOptions: [], |
|
|
|
multiArray: [[], [], []], |
|
|
|
multiIndex: [-1, -1, -1], |
|
|
|
multiIndex: [0, 0, 0], |
|
|
|
form: [ |
|
|
|
{ |
|
|
|
meterNumber: "", |
|
|
@ -296,12 +295,7 @@ export default { |
|
|
|
this.blockForm.houseId = houseArray[0].id; |
|
|
|
this.energyMeterConfig = houseArray[0].energyMeterConfig; |
|
|
|
this.waterMeterConfig = houseArray[0].waterMeterConfig; |
|
|
|
if (this.energyMeterConfig == 1) { |
|
|
|
this.getHouseInfoBy(this.blockForm.houseId); |
|
|
|
} else if (this.energyMeterConfig == 2) { |
|
|
|
this.getRoomByHouseId(this.blockForm.houseId); |
|
|
|
} |
|
|
|
this.getLastMeter(); |
|
|
|
|
|
|
|
this.blockForm.roomId = houseArray[0].roomId; |
|
|
|
let house = houseArray[0]; |
|
|
|
// for (let index = 0; index < house.type; index++) { |
|
|
@ -314,6 +308,12 @@ export default { |
|
|
|
// }); |
|
|
|
// } |
|
|
|
this.multiArray = [buildingNames, unitNames, houseNames]; |
|
|
|
if (this.energyMeterConfig == 1) { |
|
|
|
this.getHouseInfoBy(this.blockForm.houseId); |
|
|
|
} else if (this.energyMeterConfig == 2) { |
|
|
|
this.getRoomByHouseId(this.blockForm.houseId); |
|
|
|
} |
|
|
|
this.getLastMeter(); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleShowToast() { |
|
|
@ -366,13 +366,14 @@ export default { |
|
|
|
this.blockForm.roomId = this.houseOptions[e.detail.value].roomId; |
|
|
|
this.waterMeterConfig = |
|
|
|
this.houseOptions[e.detail.value].waterMeterConfig; |
|
|
|
if (this.waterMeterConfig == 1) { |
|
|
|
this.getHouseInfoBy(this.blockForm.houseId); |
|
|
|
} else if (this.waterMeterConfig == 2) { |
|
|
|
this.getRoomByHouseId(this.blockForm.houseId); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.waterMeterConfig == 1) { |
|
|
|
this.getHouseInfoBy(this.blockForm.houseId); |
|
|
|
} else if (this.waterMeterConfig == 2) { |
|
|
|
this.getRoomByHouseId(this.blockForm.houseId); |
|
|
|
} |
|
|
|
this.getLastMeter(); |
|
|
|
this.$forceUpdate(); |
|
|
|
}, |
|
|
|
//图片超过大小时取消上传 |
|
|
@ -465,7 +466,7 @@ export default { |
|
|
|
} else if (this.waterMeterConfig == 2) { |
|
|
|
this.form = res.data; |
|
|
|
} |
|
|
|
this.getLastMeter(); |
|
|
|
// this.getLastMeter(); |
|
|
|
} |
|
|
|
}, |
|
|
|
onDelete(event, index) { |
|
|
@ -486,16 +487,16 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
// 必填校验:水表号、上次表数、本次表数、图片/视频 |
|
|
|
for (let i = 0; i < this.form.length; i++) { |
|
|
|
for (let i = 0; i < this.form.length; i++) { |
|
|
|
const item = this.form[i]; |
|
|
|
if (this.waterMeterConfig == 2) { |
|
|
|
if (!item.electricMeterNumber) { |
|
|
|
uni.showToast({ |
|
|
|
title: `第${i + 1}个房间请填写水表号`, |
|
|
|
icon: "none", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
// if (!item.electricMeterNumber) { |
|
|
|
// uni.showToast({ |
|
|
|
// title: `第${i + 1}个房间请填写水表号`, |
|
|
|
// icon: "none", |
|
|
|
// }); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
// if (!item.lastMeterReading && item.lastMeterReading !== 0) { |
|
|
|
// uni.showToast({ |
|
|
|
// title: `第${i + 1}个房间请填写上次表数`, |
|
|
|