根据接口修改

This commit is contained in:
2025-09-22 10:56:24 +08:00
parent ad4d9323ad
commit 76746682fa
16 changed files with 39 additions and 30 deletions

View File

@@ -60,8 +60,8 @@ Page({
},
async changeStartStatus(e) {
const that = this;
const { id } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 1 })
const { id, routeId } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 1, routeId })
if (code !== OK) {
alertError(message)
return
@@ -73,8 +73,8 @@ Page({
}, 500)
},
async changeEndStatus(e) {
const { id } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 0 })
const { id, routeId } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 0, routeId })
if (code !== OK) {
alertError(message)
return

View File

@@ -39,6 +39,7 @@
size="small"
type="primary"
bind:tap="changeStartStatus"
data-routeId="{{item.readingRouteId}}"
custom-style="margin-right: 20rpx;"
data-id="{{item.id}}"
wx:if="{{item.status === 0}}"
@@ -57,6 +58,7 @@
bind:tap="changeEndStatus"
data-id="{{item.id}}"
wx:if="{{item.status === 1}}"
data-routeId="{{item.readingRouteId}}"
> 结束抄表 </van-button>
</view>
</van-cell>