工单支持点击列表进入详情,新装电表的适合根据电表类型显示商户和尖峰平谷,拆表的时候是商户表的时候二次提示
This commit is contained in:
@@ -224,6 +224,7 @@ Page({
|
||||
peak: null,
|
||||
flat: null,
|
||||
valley: null,
|
||||
deepValley: null,
|
||||
area: null,
|
||||
collector: null,
|
||||
collectorName: null,
|
||||
@@ -233,7 +234,7 @@ Page({
|
||||
onConfirm(e) {
|
||||
console.log("e", e)
|
||||
const { type, data = {}, way } = e.detail;
|
||||
const {collection, park, tenement} = this.data;
|
||||
const {collection, park, meterType, tenement, tenementName, overall, sharp, flat, peak, valley, deepValley} = this.data;
|
||||
switch(type) {
|
||||
case "park":
|
||||
this.setData({
|
||||
@@ -276,9 +277,23 @@ Page({
|
||||
})
|
||||
break;
|
||||
case "meterType":
|
||||
let newMeterData = {};
|
||||
if (way !== 0) {
|
||||
newMeterData = {
|
||||
tenement: null,
|
||||
tenementName: null,
|
||||
overall: null,
|
||||
sharp: null,
|
||||
peak: null,
|
||||
flat: null,
|
||||
valley: null,
|
||||
deepValley: null,
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
meterType: way,
|
||||
meterTypeName: data,
|
||||
...newMeterData,
|
||||
});
|
||||
break;
|
||||
case "collector":
|
||||
@@ -402,6 +417,11 @@ Page({
|
||||
valley: e.detail
|
||||
})
|
||||
},
|
||||
changeDeepValley(e) {
|
||||
this.setData({
|
||||
deepValley: e.detail
|
||||
})
|
||||
},
|
||||
changeRatio(e) {
|
||||
this.setData({
|
||||
ratio: e.detail,
|
||||
@@ -431,7 +451,7 @@ Page({
|
||||
const {
|
||||
park, meter, address, building, meterBox, meterType,
|
||||
ratio, area, card, collectionA, collectionB, collectionC,
|
||||
tenement, sharp, peak, flat, valley, overall, url, sn,
|
||||
tenement, sharp, peak, flat, valley, deepValley, overall, url, sn,
|
||||
collectionARatio, collectionBRatio, collectionCRatio, collector,
|
||||
} = this.data;
|
||||
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox || ratio == null) {
|
||||
@@ -463,6 +483,8 @@ Page({
|
||||
flat: flat === "" ? null : flat,
|
||||
valley: valley === "" ? null : valley,
|
||||
overall: overall === "" ? null : overall,
|
||||
deepValley: deepValley == "" ? null : deepValley,
|
||||
|
||||
url, sn, collector
|
||||
})
|
||||
if (code !== OK) {
|
||||
|
||||
@@ -127,36 +127,49 @@
|
||||
placeholder="请选择商户"
|
||||
text="{{ tenementName }}"
|
||||
bind:search="onTenementFocus"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="总"
|
||||
placeholder="请输入总"
|
||||
type="input"
|
||||
bind:changeText="changeOverall"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="尖"
|
||||
placeholder="请输入尖"
|
||||
type="input"
|
||||
bind:changeText="changeSharp"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="峰"
|
||||
placeholder="请输入峰"
|
||||
type="input"
|
||||
bind:changeText="changePeak"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="平"
|
||||
placeholder="请输入平"
|
||||
type="input"
|
||||
bind:changeText="changeFlat"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="谷"
|
||||
placeholder="请输入谷"
|
||||
type="input"
|
||||
bind:changeText="changeValley"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="深谷"
|
||||
placeholder="请输入深谷"
|
||||
type="input"
|
||||
bind:changeText="changeDeepValley"
|
||||
wx:if="{{meterType === 0}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
label="图片"
|
||||
|
||||
Reference in New Issue
Block a user