工单详情增加部分字段,装表新增采集器,修改工单列表查询的问题
This commit is contained in:
@@ -146,6 +146,27 @@ Page({
|
||||
collection: "C"
|
||||
})
|
||||
},
|
||||
onBindCollector() {
|
||||
const { park } = this.data;
|
||||
if (!park) {
|
||||
alertInfo("请先选择园区")
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
show: true,
|
||||
title: "采集器",
|
||||
type: 'collector',
|
||||
})
|
||||
},
|
||||
clearCollector() {
|
||||
this.setData({
|
||||
show: false,
|
||||
title: "",
|
||||
type: 'collector',
|
||||
collector: null,
|
||||
collectorName: null,
|
||||
})
|
||||
},
|
||||
uploadImage() {
|
||||
const that = this;
|
||||
wx.chooseMedia({
|
||||
@@ -204,6 +225,8 @@ Page({
|
||||
flat: null,
|
||||
valley: null,
|
||||
area: null,
|
||||
collector: null,
|
||||
collectorName: null,
|
||||
collections: [],
|
||||
})
|
||||
},
|
||||
@@ -258,6 +281,12 @@ Page({
|
||||
meterTypeName: data,
|
||||
});
|
||||
break;
|
||||
case "collector":
|
||||
this.setData({
|
||||
collector: data?.id,
|
||||
collectorName: `${data.collectorAddress}-${data.manufacturer}`,
|
||||
});
|
||||
break;
|
||||
case "meter":
|
||||
this.setData({
|
||||
meter: data.id,
|
||||
@@ -403,7 +432,7 @@ Page({
|
||||
park, meter, address, building, meterBox, meterType,
|
||||
ratio, area, card, collectionA, collectionB, collectionC,
|
||||
tenement, sharp, peak, flat, valley, overall, url, sn,
|
||||
collectionARatio, collectionBRatio, collectionCRatio
|
||||
collectionARatio, collectionBRatio, collectionCRatio, collector,
|
||||
} = this.data;
|
||||
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox || ratio == null) {
|
||||
alertInfo("请填写必填项后保存")
|
||||
@@ -434,7 +463,7 @@ Page({
|
||||
flat: flat === "" ? null : flat,
|
||||
valley: valley === "" ? null : valley,
|
||||
overall: overall === "" ? null : overall,
|
||||
url, sn
|
||||
url, sn, collector
|
||||
})
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
|
||||
Reference in New Issue
Block a user