Browse Source

巡查上報不能提交

v4.3.1_xiaowang_bug
是小王呀\24601 1 year ago
parent
commit
8ec851a57b
  1. 24
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.js

24
subpages/InspectionReport/pages/InspectionReport/InspectionReport.js

@ -127,6 +127,17 @@ Page({
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
submitBiao() {
if (this.data.newContent) {
let newArr = this.data.addHiddenDangeList.concat({
hazardDesc: this.data.newContent,
hazardStatus: 0
});
console.log(newArr)
this.setData({
addHiddenDangeList: newArr,
});
}
console.log(this.data.addHiddenDangeList);
if(!this.data.companyId){
wx.showToast({
title: '请选择企业',
@ -156,7 +167,7 @@ Page({
return false
}
if(this.data.checkResultFlag == 0 && this.data.checkboxValue.length<1&&!this.data.addHiddenDangeList<1){
if(this.data.checkResultFlag == 0 && this.data.checkboxValue.length<1&&this.data.addHiddenDangeList<1){
wx.showToast({
title: '隐患明细最少输入一条',
icon:'none'
@ -175,16 +186,7 @@ Page({
}
})
}
if (this.data.newContent) {
let newArr = this.data.addHiddenDangeList.concat({
hazardDesc: this.data.newContent,
hazardStatus: 0
});
console.log(newArr)
this.setData({
addHiddenDangeList: newArr,
});
}
if (this.data.hazardDesc2) {
let newArr = this.data.addHiddenDangeList.concat({
hazardDesc: this.data.hazardDesc2,

Loading…
Cancel
Save