|
@ -14,6 +14,7 @@ Page({ |
|
|
imgUrl: getApp().globalData.imgUrl, |
|
|
imgUrl: getApp().globalData.imgUrl, |
|
|
checkItems: [], // 检查项
|
|
|
checkItems: [], // 检查项
|
|
|
inspectContent: {}, // 巡检内容
|
|
|
inspectContent: {}, // 巡检内容
|
|
|
|
|
|
isCommitting: false, |
|
|
/*** 扫码巡检 ***/ |
|
|
/*** 扫码巡检 ***/ |
|
|
planList: null, // 巡检计划列表
|
|
|
planList: null, // 巡检计划列表
|
|
|
planListVisible: true, |
|
|
planListVisible: true, |
|
@ -300,6 +301,7 @@ Page({ |
|
|
// 开始巡检录入
|
|
|
// 开始巡检录入
|
|
|
addPatrolRecord: function () { |
|
|
addPatrolRecord: function () { |
|
|
const that = this; |
|
|
const that = this; |
|
|
|
|
|
if (that.data.isCommitting) { return } |
|
|
let { |
|
|
let { |
|
|
itemData, |
|
|
itemData, |
|
|
inspectContent, |
|
|
inspectContent, |
|
@ -342,7 +344,6 @@ Page({ |
|
|
let data = { |
|
|
let data = { |
|
|
patrolPlanId: dataList.id, |
|
|
patrolPlanId: dataList.id, |
|
|
pointId: itemData.id, |
|
|
pointId: itemData.id, |
|
|
lastInspectionTime: itemData.lastInspectionTime, |
|
|
|
|
|
inspectionTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
inspectionTime: moment().format('YYYY-MM-DD HH:mm:ss'), |
|
|
points: { |
|
|
points: { |
|
|
user: dataList.user, |
|
|
user: dataList.user, |
|
@ -354,7 +355,11 @@ Page({ |
|
|
}, |
|
|
}, |
|
|
alarm |
|
|
alarm |
|
|
} |
|
|
} |
|
|
|
|
|
wx.showLoading({ title: '提交中...' }); |
|
|
|
|
|
that.setData({ isCommitting: true }); |
|
|
Request.post(addPatrolRecord(), data).then(res => { |
|
|
Request.post(addPatrolRecord(), data).then(res => { |
|
|
|
|
|
wx.hideLoading(); |
|
|
|
|
|
that.setData({ isCommitting: false }); |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '提交成功', |
|
|
title: '提交成功', |
|
|
icon: 'success' |
|
|
icon: 'success' |
|
|