修改状态

This commit is contained in:
2025-09-24 10:24:52 +08:00
parent e64318f174
commit a2f92a0959
12 changed files with 70 additions and 24 deletions

View File

@@ -15,7 +15,8 @@ Component({
meterInfo: Object,
showLeft: Boolean,
showRight: Boolean,
routeId: String
routeId: String,
disabled: Boolean,
},
observers: {
"routeId": function(newValue) {

View File

@@ -52,14 +52,15 @@
<view style="flex: 1;">
<van-field
value="{{currentNumber}}"
placeholder="请输入本次读数"
placeholder="{{ disabled ? '已抄表' : '请输入本次读数'}}"
bind:change="onChange"
border="{{false}}"
custom-style="border: 1rpx solid #ccc; padding: 2px 14rpx; font-size: 32rpx; border-radius: 10rpx;flex: 1;"
disabled="{{disabled}}"
/>
</view>
<photo bind:finish="onPhotoFinish" />
<photo bind:finish="onPhotoFinish" wx:if="{{!disabled}}" />
</view>
</view>
<!-- <view class="photo">
@@ -79,10 +80,10 @@
</view>
<view class="operate">
<view style="flex: 1;">
<van-button type="info" block bind:click="handleCreateReading"> 确定录入 </van-button>
<van-button disabled="{{disabled}}" type="info" block bind:click="handleCreateReading"> 确定录入 </van-button>
</view>
<view style="flex: 1; margin-left: 20rpx;">
<van-button block bind:click="handleClear"> 清除记录 </van-button>
<van-button disabled="{{disabled}}" block bind:click="handleClear"> 清除记录 </van-button>
</view>
</view>
</view>