Browse Source

安检

v4.3.1_xiaowang_bug
是小王呀\24601 1 year ago
parent
commit
ceb3bea639
  1. 1
      pages/index/index.wxss
  2. 27
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.js
  3. 37
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml
  4. 4
      subpages/securityCheck/pages/securityCheck.wxml

1
pages/index/index.wxss

@ -803,6 +803,7 @@ height: auto;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
margin-left: 20rpx;
} }
.Information_test4{ .Information_test4{
width: auto; width: auto;

27
subpages/InspectionReport/pages/InspectionReport/InspectionReport.js

@ -113,6 +113,11 @@ Page({
beforeFlag: res.data[0].checkResultFlag beforeFlag: res.data[0].checkResultFlag
}) })
console.log(this.data.beforeFlag); console.log(this.data.beforeFlag);
}else{
this.setData({
beforeFlag: res.data[0].checkResultFlag
})
console.log(this.data.beforeFlag)
} }
}) })
}, },
@ -176,27 +181,29 @@ Page({
}) })
} }
if (this.data.hazardDesc2) {
if (this.data.newContent) {
let newArr = this.data.addHiddenDangeList.concat({ let newArr = this.data.addHiddenDangeList.concat({
hazardDesc: this.data.hazardDesc2, hazardDesc: this.data.newContent,
hazardStatus: 2 hazardStatus: 0
}); });
console.log(newArr) console.log(newArr)
this.setData({ this.setData({
addHiddenDangeList: newArr, addHiddenDangeList: newArr,
newContent:''
}); });
} }
if (this.data.newContent) { console.log(this.data.addHiddenDangeList);
if (this.data.hazardDesc2) {
let newArr = this.data.addHiddenDangeList.concat({ let newArr = this.data.addHiddenDangeList.concat({
hazardDesc: this.data.newContent, hazardDesc: this.data.hazardDesc2,
hazardStatus: 0 hazardStatus: 2
}); });
console.log(newArr) console.log(newArr)
this.setData({ this.setData({
addHiddenDangeList: newArr, addHiddenDangeList: newArr,
}); });
} }
console.log(this.data.addHiddenDangeList);
let form={ let form={
companyId: this.data.companyId, companyId: this.data.companyId,
checkTime: this.getCurrentDateTime(), checkTime: this.getCurrentDateTime(),
@ -208,6 +215,9 @@ Page({
remark: this.data.remarks, remark: this.data.remarks,
reviewAddress:this.data.addressContent reviewAddress:this.data.addressContent
} }
this.setData({
checkboxValue:''
})
// if (!this.data.reviewTime) { // if (!this.data.reviewTime) {
// form.reviewTime=null // form.reviewTime=null
// } // }
@ -389,13 +399,14 @@ Page({
}); });
}, },
addAnother() { addAnother() {
let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.newContent, hazardStatus: 0, requirements:this.data.hazardDesc2}); let newArr = this.data.addHiddenDangeList.concat({ hazardDesc: this.data.newContent, hazardStatus: 2});
console.log() console.log()
this.setData({ this.setData({
addHiddenDangeList: newArr, addHiddenDangeList: newArr,
newContent: '', // 清空输入框的值 newContent: '', // 清空输入框的值
}); });
console.log('添加后的数组:', this.data.addHiddenDangeList); console.log('添加后的数组:', this.data.addHiddenDangeList);
}, },
pickerChange: function (e) { pickerChange: function (e) {
this.setData({ this.setData({

37
subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml

@ -39,12 +39,29 @@
<image src="../../../../images/right.png" class="prosecutors_img"></image> <image src="../../../../images/right.png" class="prosecutors_img"></image>
</view></view> </view></view>
</view>
<view class="prosecutors">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查结论</text>
<picker class="prosecutors_name" bindchange="pickerChange" value="{{index}}" range="{{array}}">
<view class="{{checkResultName?'':'gray'}}">
{{checkResultName?checkResultName:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view>
</view>
</view> </view>
<view class="pitfall"> <view class="pitfall">
<view class="prosecutors"> <view class="prosecutors">
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text> <text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<view class="conclusion1"> <view class="conclusion1">
<text class="prosecutors_pre">{{beforeFlag == 1?'隐患明细':'未整改隐患'}}</text> <text class="prosecutors_pre">{{ beforeFlag ?'隐患明细':'未整改隐患'}}</text>
</view> </view>
</view> </view>
<view class="checkbox1"> <view class="checkbox1">
@ -68,7 +85,7 @@
</view> </view>
</view> </view>
<view class="pitfall" wx:if="{{beforeFlag == 1}}"> <view class="pitfall" wx:if="{{beforeFlag}}">
<view class="prosecutors"> <view class="prosecutors">
<!-- <text class="prosecutors_req">*</text> --> <!-- <text class="prosecutors_req">*</text> -->
<view class="conclusion1"> <view class="conclusion1">
@ -81,23 +98,7 @@
</view> </view>
</view> </view>
<view class="prosecutors">
<text class="prosecutors_req">*</text>
<view class="nes">
<view class="conclusion">
<text class="prosecutors_pre">检查结论</text>
<picker class="prosecutors_name" bindchange="pickerChange" value="{{index}}" range="{{array}}">
<view class="{{checkResultName?'':'gray'}}">
{{checkResultName?checkResultName:'请选择'}}
</view>
</picker>
</view>
<view class="conclusion_right">
<image src="../../../../images/right.png" class="prosecutors_img"></image>
</view>
</view>
</view>
<view class="prosecutors"> <view class="prosecutors">
<text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text> <text class="prosecutors_req" wx:if="{{checkResultFlag == 0}}">*</text>
<view class="nes" bind:tap="showTime" > <view class="nes" bind:tap="showTime" >

4
subpages/securityCheck/pages/securityCheck.wxml

@ -46,11 +46,11 @@
<view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}"> <view class="list_1" wx:for="{{flag1Array}}" data-resiId="{{item.id}}" bind:tap="toDetails" data-flag="{{item.checkResultFlag}}">
<view class="section_1-0" id="scrollToHere" > <view class="section_1-0" id="scrollToHere" >
<view class="title">{{item.name}}</view> <view class="title">{{item.name}}</view>
<view class="title_mall">检查时间: {{item.orderDate}}</view> <view class="title_mall">检查时间: {{item.createdTime}}</view>
<view class="title_mall">检查人员: {{item.checkPersons}}</view> <view class="title_mall">检查人员: {{item.checkPersons}}</view>
<view class="title_mall">检查结论: 合格</view> <view class="title_mall">检查结论: 合格</view>
<view class="title_mall">合格时间: {{item.reviewTime}}</view> <view class="title_mall">合格时间: {{item.orderDate}}</view>
</view> </view>
</view> </view>
<movable-area class="movable-area"> <movable-area class="movable-area">

Loading…
Cancel
Save