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