工单支持点击列表进入详情,新装电表的适合根据电表类型显示商户和尖峰平谷,拆表的时候是商户表的时候二次提示
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { uninstallMeter, } from "../../../../service/meter";
|
||||
import dayjs from "../../../../utils/dayjs"
|
||||
import request from "../../../../utils/request"
|
||||
import { alertInfo, alertSuccess, loadingFunc} from "../../../../utils/index"
|
||||
import { alertInfo, alertSuccess, loadingFunc, wxModal} from "../../../../utils/index"
|
||||
import { uploadUninstallMeter } from "../../../../service/public"
|
||||
|
||||
const { OK } = request;
|
||||
@@ -152,17 +152,44 @@ Page({
|
||||
alertInfo("请选择表号")
|
||||
return;
|
||||
}
|
||||
const { code, message } = await uninstallMeter({sn: meter, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall})
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
if (!meterInfo?.tenement) {
|
||||
const { code, message } = await uninstallMeter({sn: meter, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall})
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
alertSuccess("拆除成功")
|
||||
setTimeout(() => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/workBenchTodoList/index',
|
||||
})
|
||||
}, 300)
|
||||
return;
|
||||
}
|
||||
alertSuccess("拆除成功")
|
||||
setTimeout(() => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/workBenchTodoList/index',
|
||||
})
|
||||
}, 300)
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '拆出后电表和商户关系,电表和卡的关系会自动解绑,是否拆出',
|
||||
complete: async (res) => {
|
||||
if (res.cancel) {
|
||||
|
||||
}
|
||||
|
||||
if (res.confirm) {
|
||||
const { code, message } = await uninstallMeter({sn: meter, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall})
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
}
|
||||
alertSuccess("拆除成功")
|
||||
setTimeout(() => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/workBenchTodoList/index',
|
||||
})
|
||||
}, 300)
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
uploadImage() {
|
||||
const that = this;
|
||||
|
||||
Reference in New Issue
Block a user