工单列表查询电表接口修改
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import { getLoginParkList, getParkBuildingList } from "../../service/park"
|
||||
import { getParkSimpleMeterList, getParkBoxList, getCardList, getCollectionList, getInventoryMeter, getCollectorList } from "../../service/meter"
|
||||
import {
|
||||
getParkSimpleMeterList, getParkBoxList,
|
||||
getCardList, getCollectionList,
|
||||
getInventoryMeter, getCollectorList,
|
||||
getWorkOrderAllMeter,
|
||||
} from "../../service/meter"
|
||||
import { alertInfo } from "../../utils/index";
|
||||
import request from "../../utils/request"
|
||||
import { payWays, feeType, meterType, noticeFlowType, noticeFlowStatus,
|
||||
@@ -179,6 +184,9 @@ Component({
|
||||
case "collector":
|
||||
this.onSearchCollector();
|
||||
break;
|
||||
case "workOrderMeter":
|
||||
this.onSearchWorkOrderMeter();
|
||||
break;
|
||||
}
|
||||
},
|
||||
async onSearchCollector() {
|
||||
@@ -193,6 +201,18 @@ Component({
|
||||
list: data,
|
||||
})
|
||||
},
|
||||
async onSearchWorkOrderMeter() {
|
||||
const { searchText = "", park } = this.data;
|
||||
const { code, message, data = [] } = await getWorkOrderAllMeter({keyword: searchText, park: park, page: 1, size: 20});
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
columns: data?.map(item => `${item.address}-${item.meter_no}`),
|
||||
list: data,
|
||||
})
|
||||
},
|
||||
async onSearchPark() {
|
||||
const { searchText = "" } = this.data;
|
||||
const { code, message, data: parks = [] } = await getLoginParkList({keyword: searchText});
|
||||
|
||||
@@ -147,9 +147,9 @@ handleDoNoticeBtn(e) {
|
||||
})
|
||||
});
|
||||
break;
|
||||
case "meter":
|
||||
case "workOrderMeter":
|
||||
this.setData({
|
||||
meter: data.id,
|
||||
meter: data.meter_id,
|
||||
meterName: data.address,
|
||||
meterInfo: data,
|
||||
page: 1,
|
||||
@@ -199,7 +199,7 @@ handleDoNoticeBtn(e) {
|
||||
this.setData({
|
||||
show: true,
|
||||
title: "电表",
|
||||
type: 'meter'
|
||||
type: 'workOrderMeter'
|
||||
})
|
||||
},
|
||||
onChangePage(e) {
|
||||
|
||||
@@ -83,4 +83,9 @@ export const uninstallMeter = async function(data) {
|
||||
// 获取商户下的电表,后台
|
||||
export const getCollectorList = async function(keyword) {
|
||||
return await GET(`/collector/list?collectorAddress=${replaceSpecialIcon(keyword)}`);
|
||||
}
|
||||
|
||||
// 微信工单列表查询所有电表
|
||||
export const getWorkOrderAllMeter = async function({ keyword, park, page = 1, size = 20 }) {
|
||||
return await GET(`/vx/getAllMeter?keyword=${replaceSpecialIcon(keyword)}&pid=${park}&page=${page}&size=${size}`,);
|
||||
}
|
||||
@@ -63,7 +63,8 @@ export const doNoticeFlow = async function(id) {
|
||||
return await PUT(`/noticeFlow/${id}/meter/dispose`,);
|
||||
}
|
||||
|
||||
// 确认当前流程
|
||||
// 当前流程详情
|
||||
export const getNoticeFlowDetail = async function(id) {
|
||||
return await GET(`/noticeFlow/${id}/detail`,);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user