修改工单查询的问题

This commit is contained in:
2025-11-19 10:58:16 +08:00
parent 6fee2d0435
commit 0ef96344ce

View File

@@ -36,7 +36,7 @@ Page({
}, },
onClearPark() { onClearPark() {
const that = this; const that = this;
this.setData({ park: null, parkName: null, meter: null, meterName: null }, () => { this.setData({ park: "", parkName: "", meter: "", meterName: "" }, () => {
loadingFunc(async () => { loadingFunc(async () => {
await that.init() await that.init()
}) })
@@ -44,7 +44,7 @@ onClearPark() {
}, },
onClearMeter() { onClearMeter() {
const that = this; const that = this;
this.setData({ meter: null, meterName: null }, () => { this.setData({ meter: "", meterName: "" }, () => {
loadingFunc(async () => { loadingFunc(async () => {
await that.init() await that.init()
}) })
@@ -52,7 +52,7 @@ onClearMeter() {
}, },
onClearType() { onClearType() {
const that = this; const that = this;
this.setData({ noticeFlowType: null, noticeFlowTypeName: null }, () => { this.setData({ noticeFlowType: "", noticeFlowTypeName: "" }, () => {
loadingFunc(async () => { loadingFunc(async () => {
await that.init() await that.init()
}) })
@@ -60,7 +60,7 @@ onClearType() {
}, },
onClearStatus() { onClearStatus() {
const that = this; const that = this;
this.setData({ noticeFlowStatus: null, noticeFlowStatusName: null }, () => { this.setData({ noticeFlowStatus: "", noticeFlowStatusName: "" }, () => {
loadingFunc(async () => { loadingFunc(async () => {
await that.init() await that.init()
}) })
@@ -68,7 +68,7 @@ onClearStatus() {
}, },
hideActionMenu() { hideActionMenu() {
this.setData({ this.setData({
currentActionSheet: null currentActionSheet: ""
}); });
}, },
onMenuSelect(e) { onMenuSelect(e) {
@@ -114,8 +114,8 @@ handleDoNoticeBtn(e) {
switch(type) { switch(type) {
case "park": case "park":
this.setData({ this.setData({
park: data.id, park: data?.id,
parkName: data.name, parkName: data?.name,
}) })
break; break;
case "tenement": case "tenement":
@@ -149,8 +149,8 @@ handleDoNoticeBtn(e) {
break; break;
case "workOrderMeter": case "workOrderMeter":
this.setData({ this.setData({
meter: data.meter_id, meter: data?.meter_id,
meterName: data.address, meterName: data?.address,
meterInfo: data, meterInfo: data,
page: 1, page: 1,
}, () => { }, () => {
@@ -213,7 +213,8 @@ handleDoNoticeBtn(e) {
}) })
}, },
async init() { async init() {
const { page, size, park, tenement, meter, noticeFlowType, noticeFlowStatus, time } = this.data; const { page, size, park, tenement = "", meter = "", noticeFlowType, noticeFlowStatus, time } = this.data;
const { code, message, data, total } = await getWorkOrderList({ page, size, park, tenement, meter, type: noticeFlowType, time, status: noticeFlowStatus }) const { code, message, data, total } = await getWorkOrderList({ page, size, park, tenement, meter, type: noticeFlowType, time, status: noticeFlowStatus })
if (code !== OK) { if (code !== OK) {
alertInfo(message) alertInfo(message)