准备联调抄表记录

This commit is contained in:
2025-09-16 17:35:49 +08:00
194 changed files with 6560 additions and 1095 deletions

View File

@@ -1,6 +1,6 @@
// pages/workBench/components/reading/index.js
import { getMeterReadingRouteList } from "../../../../service/workBench"
import { alertError, loadingFunc } from "../../../../utils/index"
import { getMeterReadingRouteList, changeMeterRouteStatus } from "../../../../service/workBench"
import { alertError, alertSuccess, loadingFunc } from "../../../../utils/index"
import request from "../../../../utils/request"
const { OK } = request
@@ -66,8 +66,32 @@ Component({
jumpToReading(e) {
const { id } = e.currentTarget.dataset;
wx.navigateTo({
url: '/pages/writeReading/index',
url: `/pages/writeReading/index?id=${id}`,
})
},
async changeStartStatus(e) {
const that = this;
const { id } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 1 })
if (code !== OK) {
alertError(message)
return
}
alertSuccess("操作成功")
this.init()
setTimeout(() => {
that.jumpToReading()
}, 500)
},
async changeEndStatus(e) {
const { id } = e.currentTarget.dataset;
const { code, message } = await changeMeterRouteStatus({ id, status: 0 })
if (code !== OK) {
alertError(message)
return
}
alertSuccess("操作成功")
this.init()
}
}
})