Browse Source

(*) 巡检成功提示优化

master
liujiangyong 2 years ago
parent
commit
1489a389dd
  1. 12
      weapp/package/startInspection/startInspection.js

12
weapp/package/startInspection/startInspection.js

@ -275,9 +275,12 @@ Page({
Request.post(addPatrolRecord(), data).then(res => { Request.post(addPatrolRecord(), data).then(res => {
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
icon: 'success'
}) })
that.getPatrolRecord()
that.bindCancel(); that.bindCancel();
setTimeout(() => {
that.getPatrolRecord()
}, 1500)
}) })
} else { } else {
if (changeTwo == 'normal') { if (changeTwo == 'normal') {
@ -305,9 +308,12 @@ Page({
Request.post(addPatrolRecord(), data).then(res => { Request.post(addPatrolRecord(), data).then(res => {
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',
icon: 'success'
}) })
that.getPatrolRecord()
that.bindCancel(); that.bindCancel();
setTimeout(() => {
that.getPatrolRecord()
}, 1500)
}) })
return; return;
} }
@ -329,9 +335,9 @@ Page({
title: '加载中' title: '加载中'
}) })
Request.get(getPatrolRecord(dataList.id, 'null', 'null', 'null', pointId)).then(res => { Request.get(getPatrolRecord(dataList.id, 'null', 'null', 'null', pointId)).then(res => {
wx.hideLoading();
dataList.points.map(e => { dataList.points.map(e => {
res.map(i => { res.map(i => {
wx.hideLoading();
if (i == null) { if (i == null) {
e.lastInspectionTime = moment().format('YYYY-MM-DD'); e.lastInspectionTime = moment().format('YYYY-MM-DD');
e.inspectionTime = moment().format('YYYY-MM-DD'); e.inspectionTime = moment().format('YYYY-MM-DD');

Loading…
Cancel
Save