安全环保检查bug修复
parent
35bcb78b59
commit
266c860d7d
|
@ -327,7 +327,7 @@
|
|||
<view class="title">
|
||||
<text>计划图片</text>
|
||||
</view>
|
||||
<view class="de-sub-content">
|
||||
<view class="cu-form-p">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||||
<view class="cu-item" v-for="(item,index) in files5" v-bind:key="index">
|
||||
<view class="imgs">
|
||||
|
|
|
@ -55,19 +55,23 @@
|
|||
<text></text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
v-if="item.CREATOR == loginUserId || (TabCur + 1) == '2'"
|
||||
v-if="item.CREATOR == loginUserId && (TabCur + 1) == '1'"
|
||||
@click="$noMultipleClicks(goToDetail,item.HIDDEN_ID)">
|
||||
{{(TabCur + 1) == '1' ? '验收' : '查看'}}
|
||||
验收
|
||||
</button>
|
||||
<button style="margin-left: 20upx;"
|
||||
v-if="item.ISPUNISH !== '2'
|
||||
&& !item.KEYPROJECTPUNISH_ID
|
||||
<button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm"
|
||||
@click="$noMultipleClicks(goToDetailView,item.HIDDEN_ID)">
|
||||
查看
|
||||
</button>
|
||||
<!-- <button style="margin-left: 20upx;"
|
||||
v-if="item.ISPUNISH !== '2'
|
||||
&& !item.KEYPROJECTPUNISH_ID
|
||||
&& item.PUNISH_THE_PERSON.includes(loginUserId)
|
||||
"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
@click.stop="fnModalShow(item)">
|
||||
处罚
|
||||
</button>
|
||||
</button> -->
|
||||
<!-- && item.CREATOR == loginUserId" -->
|
||||
</text>
|
||||
</view>
|
||||
|
@ -98,7 +102,7 @@
|
|||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="punishForm.ISPUNISH === '1'" :disabled="TabCur == 2" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="punishForm.ISPUNISH === '2'" :disabled="TabCur == 2" />否</label>
|
||||
</radio-group>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view v-if="punishForm.ISPUNISH==1">
|
||||
<view class="cu-form-group">
|
||||
|
@ -242,6 +246,12 @@
|
|||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=' + (this.TabCur + 1)
|
||||
});
|
||||
},
|
||||
goToDetailView(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/hidden-management/detail?HIDDEN_ID=' + e +
|
||||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=2'
|
||||
});
|
||||
},
|
||||
getQuery() { //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = 10;
|
||||
|
@ -338,8 +348,17 @@
|
|||
OPERATOR: loginUserId,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
|
||||
if ("success" == res.data.result) {
|
||||
_this.punishForm= {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
},
|
||||
_this.editHiddenIspunish(1)
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
@ -352,7 +371,7 @@
|
|||
}else {
|
||||
_this.editHiddenIspunish(2)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
editHiddenIspunish(Ispunish){
|
||||
// 如果不处罚 修改隐患
|
||||
|
|
|
@ -7,128 +7,176 @@
|
|||
<view class="form">
|
||||
<view class="wui-form-list">
|
||||
<view class="de-drawer">
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="action">
|
||||
隐患照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.hiddenImgs" :key="index" @tap="ViewImage"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.hiddenImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.hiddenImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="action">
|
||||
隐患视频
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in hiddenForm.hiddenVideos" :key="vindex"
|
||||
style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="hiddenForm.hiddenVideos[vindex].FILEPATH"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-textarea">
|
||||
<view class="cu-form-title text-hui">隐患描述</view>
|
||||
<textarea maxlength="-1" disabled v-model="hiddenForm.HIDDENDESCR" placeholder="请对隐患进行详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患部位</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENPART }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患级别</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENLEVEL_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENTYPE_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
<view>限期整改</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改期限:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONDEADLINE }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title" style="height: auto;">
|
||||
<view>整改部门:</view>
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
{{ hiddenForm.RECTIFICATIONDEPT_NAME }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改人:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改时间:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONTIME }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
整改照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.zgImgs" :key="index" @tap="ViewImage1"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.zgImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.zgImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">验收时间:</view>
|
||||
<ruiDatePicker v-if="TabCur == 1" :start="todayDate" fields="minute" :value="CHECKTIME || '请选择'"
|
||||
@change="changeDiscoverDate"></ruiDatePicker>
|
||||
<view v-else>{{hiddenForm.CHECKTIME}}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<view class="action">
|
||||
验收照片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{hiddenForm.ysImgs.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.ysImgs" :key="index" @tap="ViewImage2" :data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.ysImgs[index].FILEPATH">
|
||||
<image v-if="item.IMGFILES_ID" :src="baseImgPath + hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<image v-else :src="hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg" data-type="0" :data-index="index" v-if="TabCur == 1">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage(0)" v-if="hiddenForm.ysImgs.length<4 && TabCur == 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cu-form-group">
|
||||
<view class="title">是否进行罚款:</view>
|
||||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="hiddenForm.ISPUNISH === '1'" :disabled="TabCur == 2" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="hiddenForm.ISPUNISH === '2'" :disabled="TabCur == 2" />否</label>
|
||||
</radio-group>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="action">
|
||||
隐患照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenImgs">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.hiddenImgs" :key="index" @tap="ViewImage"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.hiddenImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.hiddenImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="action">
|
||||
隐患视频
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="hiddenForm.hiddenVideos">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,vindex) in hiddenForm.hiddenVideos" :key="vindex"
|
||||
style="background-color: #000">
|
||||
<image src="/static/icon-apps/video.png" mode="aspectFill" @click="playVideo"
|
||||
:data-src="hiddenForm.hiddenVideos[vindex].FILEPATH"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-textarea">
|
||||
<view class="cu-form-title text-hui">隐患描述</view>
|
||||
<textarea maxlength="-1" disabled v-model="hiddenForm.HIDDENDESCR" placeholder="请对隐患进行详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患部位</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENPART }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患级别</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENLEVEL_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view>{{ hiddenForm.HIDDENTYPE_NAME }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
<view>限期整改</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改期限:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONDEADLINE }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title" style="height: auto;">
|
||||
<view>整改部门:</view>
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
{{ hiddenForm.RECTIFICATIONDEPT_NAME }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">整改人:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="title">整改时间:</view>
|
||||
<view>{{ hiddenForm.RECTIFICATIONTIME }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="action">
|
||||
整改照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='2'||hiddenForm.STATE==='4'">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.zgImgs" :key="index" @tap="ViewImage1"
|
||||
:data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.zgImgs[index].FILEPATH">
|
||||
<image :src="baseImgPath + hiddenForm.zgImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="title">验收时间:</view>
|
||||
<ruiDatePicker v-if="TabCur == 1" :start="todayDate" fields="minute" :value="CHECKTIME || '请选择'"
|
||||
@change="changeDiscoverDate"></ruiDatePicker>
|
||||
<view v-else>{{hiddenForm.CHECKTIME}}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="action">
|
||||
验收照片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{hiddenForm.ysImgs.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-show="hiddenForm.STATE==='4'||TabCur==='1'">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in hiddenForm.ysImgs" :key="index" @tap="ViewImage2" :data-id="item.IMGFILES_ID" data-type="0" :data-url="hiddenForm.ysImgs[index].FILEPATH">
|
||||
<image v-if="item.IMGFILES_ID" :src="baseImgPath + hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<image v-else :src="hiddenForm.ysImgs[index].FILEPATH" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg" data-type="0" :data-index="index" v-if="TabCur == 1">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage(0)" v-if="hiddenForm.ysImgs.length<4 && TabCur == 1">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="punishForm">
|
||||
<view class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>处罚信息</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚原因:</view>
|
||||
<view>{{ punishForm.REASON }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚金额:</view>
|
||||
<view>{{ punishForm.AMOUT }}元</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚单位:</view>
|
||||
<view>{{ punishForm.UNITS_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚人:</view>
|
||||
<view>{{ punishForm.PERSON_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发人:</view>
|
||||
<view>{{ punishForm.CREATOR_NAME }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发处罚时间:</view>
|
||||
<view>{{ punishForm.DATE }}</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white" v-if="punishForm.HANDLE_IMG">
|
||||
<view class="action">
|
||||
罚款缴纳单
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLE_IMG">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" @tap="viewImagePunish">
|
||||
<image :src="baseImgPath + punishForm.HANDLE_IMG" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">是否缴纳罚款:</view>
|
||||
<view>{{punishForm.HANDLED === '1' ? '已缴' : '未缴' }}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLED === '1'">
|
||||
<view class="title">处罚处理人:</view>
|
||||
<view >{{punishForm.PERSON_NAME}}</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="punishForm.HANDLED === '1'">
|
||||
<view class="title" >处罚处理时间:</view>
|
||||
<view >{{punishForm.HANLDE_TIME}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30upx;">
|
||||
<button v-if="TabCur == 1" class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goSubmit)">验收</button>
|
||||
|
@ -175,6 +223,7 @@ export default {
|
|||
ysImgs:[],
|
||||
CHECKTIME :formatDate(new Date(), 'yyyy-MM-dd hh:mm')
|
||||
},
|
||||
punishForm:{},
|
||||
videoSrc:'',
|
||||
modalShow:false,
|
||||
todayDate:formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
|
@ -207,10 +256,22 @@ export default {
|
|||
uni.hideLoading();//结束加载中动画
|
||||
if (res.data != null) {
|
||||
this.hiddenForm = res.data.pd
|
||||
if(res.data.pd.punishForm){
|
||||
this.punishForm = res.data.pd.punishForm
|
||||
}else{
|
||||
this.punishForm = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
viewImagePunish(e) {
|
||||
let files = [];
|
||||
files.push(this.baseImgPath + this.punishForm.HANDLE_IMG)
|
||||
uni.previewImage({
|
||||
urls: files
|
||||
});
|
||||
},
|
||||
ViewImage(e) {
|
||||
let files = [];
|
||||
for (var i = 0; i < this.hiddenForm.hiddenImgs.length; i++) {
|
||||
|
@ -293,6 +354,17 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
fnImagePreview(list, index) {
|
||||
const urls = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
urls.push(list[i].url);
|
||||
}
|
||||
const current = urls[index];
|
||||
uni.previewImage({
|
||||
urls,
|
||||
current
|
||||
})
|
||||
},
|
||||
changeRadioGroup(e){
|
||||
if(this.TabCur == 2) return
|
||||
this.hiddenForm.ISPUNISH = e.detail.value
|
||||
|
@ -306,13 +378,13 @@ export default {
|
|||
})
|
||||
return
|
||||
}
|
||||
if(this.hiddenForm.ysImgs.length === 0){
|
||||
uni.showToast({
|
||||
title: `请上传验收图片`,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
//if(this.hiddenForm.ysImgs.length === 0){
|
||||
// uni.showToast({
|
||||
// title: `请上传验收图片`,
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
//}
|
||||
// if(!this.hiddenForm.ISPUNISH){
|
||||
// uni.showToast({
|
||||
// title: `请选择是否进行罚款`,
|
||||
|
@ -384,5 +456,8 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.dy-title-flex{
|
||||
font-weight: bold;
|
||||
font-size: 35upx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -20,10 +20,20 @@
|
|||
<scroll-view class="dy-scroll" @scrolltolower="scrolltolower" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="dy-list">
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID"
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID"
|
||||
@click="$noMultipleClicks(goToDetail,item)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>
|
||||
<view v-if="item.co>0" style="border-radius: 96px;
|
||||
font-size: 10px;
|
||||
padding: 0px 10px;
|
||||
height: 13px;
|
||||
color: #ffffff;
|
||||
background-color:#dd514c ;">
|
||||
{{item.co}}
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
|
@ -32,7 +42,7 @@
|
|||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
监督部门:{{ item.Q_DEPARTMENT_NAME }}
|
||||
监督部门:{{ item.DEPARTMENT_NAME }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '0'" class="dy-subtitle-flex">
|
||||
|
@ -52,7 +62,7 @@
|
|||
<view class="dy-subtitle-flex" style="height: 34upx;">
|
||||
<text></text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm"
|
||||
@click="$noMultipleClicks(goToDetail,item)">查看</button>
|
||||
</text>
|
||||
</view>
|
||||
|
|
|
@ -19,24 +19,31 @@
|
|||
<view class="dy-list">
|
||||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID" @click="$noMultipleClicks(goToDetail,item.KEYPROJECTPUNISH_ID)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>{{item.HIDDENDESCR}}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<text>被处罚单位:{{ item.UNITS_NAME }}</text>
|
||||
<text>被处罚人:{{ item.PERSON_NAME }}</text>
|
||||
<text v-show="item.ISPUNISH==='1'&&item.HANDLED==='0'">被处罚人:{{ item.PERSON_NAME }}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<view v-show="item.ISPUNISH==='1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
处罚原因:{{ item.REASON }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex">
|
||||
<view v-show="item.ISPUNISH" class="dy-subtitle-flex">
|
||||
<text>下发人:{{ item.CREATOR_NAME }}</text>
|
||||
<text>是否处罚:{{ item.ISPUNISH == "2" ? "否":"是" }}</text>
|
||||
</view>
|
||||
<view class="dy-subtitle-flex" style="height: 34upx;">
|
||||
<text>处罚处理状态:{{ (TabCur + 1) == "1" ? "待处理" : "已处理" }}</text>
|
||||
<text>处罚处理状态:{{ item.ISPUNISH == "2" ? "不处罚":item.HANDLED == "1" ?"已完成":item.ISPUNISH == "1" ? "待反馈" : "待处罚" }}</text>
|
||||
<text>
|
||||
<button class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToDetail,item.KEYPROJECTPUNISH_ID)">查看</button>
|
||||
<button
|
||||
v-if="!item.ISPUNISH"
|
||||
class="cu-btn bg-red margin-tb-sm sm"
|
||||
@click.stop="fnModalShow(item)">
|
||||
处罚
|
||||
</button>
|
||||
<button style="margin-left: 20upx;" class="cu-btn bg-blue margin-tb-sm sm" @click="$noMultipleClicks(goToDetail,item.HIDDEN_ID)">查看</button>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -52,6 +59,57 @@
|
|||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
<view :class="['cu-modal',{'show':modalShow}]" v-if="modalShow">
|
||||
<view class="cu-dialog">
|
||||
<view class="cu-bar bg-white justify-end">
|
||||
<view class="content">处罚</view>
|
||||
<view class="action" @tap="modalShow = false">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">是否进行罚款:</view>
|
||||
<radio-group @change="changeRadioGroup($event)">
|
||||
<label class="radio"><radio value="1" :checked="punishForm.ISPUNISH === '1'" />是</label>
|
||||
<label class="radio"><radio value="2" :checked="punishForm.ISPUNISH === '2'" />否</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view v-if="punishForm.ISPUNISH==1">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚原因</view>
|
||||
<input v-model="punishForm.REASON" placeholder="请输入处罚原因"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">处罚金额(元)</view>
|
||||
<input type="number" v-model="punishForm.AMOUT" placeholder="请输入处罚金额" @blur="checkNumber"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚单位</view>
|
||||
<input disabled v-model="punishForm.RECTIFICATIONDEPT_NAME" placeholder="请输入被处罚单位"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">被处罚人</view>
|
||||
<input disabled v-model="punishForm.RECTIFICATIONOR_NAME" placeholder="请输入被处罚人"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">下发处罚时间</view>
|
||||
<ruiDatePicker fields="minute" :value="punishForm.DATE || '请选择'" @change="changeStartDate">
|
||||
</ruiDatePicker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-bar bg-white justify-between">
|
||||
<view class="action" style="flex-basis: 100%">
|
||||
<button class="cu-btn" style="flex-basis: 50%" @click="modalShow = false">关闭</button>
|
||||
<button class="cu-btn line-green text-green" style="flex-basis: 50%"
|
||||
@click="fnSubmit">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -84,6 +142,16 @@ export default {
|
|||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
tabNav: ['待反馈处罚', '已完成处罚'],
|
||||
modalShow: false,
|
||||
punishForm: {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
},
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
@ -119,12 +187,24 @@ export default {
|
|||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
||||
this.getQuery();
|
||||
},
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/penalty-management/detail?KEYPROJECTPUNISH_ID='+e + '&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=' + (this.TabCur+1)
|
||||
});
|
||||
},
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/key-project-management/hidden-management/detail?HIDDEN_ID=' + e +
|
||||
'&OUTSOURCED_ID=' + this.OUTSOURCED_ID + '&TabCur=2'
|
||||
});
|
||||
},
|
||||
fnModalShow(item) {
|
||||
this.punishForm.HIDDEN_ID = item.HIDDEN_ID
|
||||
this.punishForm.RECTIFICATIONDEPT_NAME = item.UNITS_NAME
|
||||
this.punishForm.RECTIFICATIONOR_NAME = item.RECTIFICATIONOR_NAME
|
||||
this.punishForm.ISPUNISH = '2'
|
||||
this.modalShow = true
|
||||
},
|
||||
changeStartDate(e) {
|
||||
this.punishForm.DATE = e
|
||||
this.$forceUpdate(); //强制刷新
|
||||
},
|
||||
getQuery(){ //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = 10;
|
||||
|
@ -154,7 +234,7 @@ export default {
|
|||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/keyprojectpunish/list?showCount='+_this.showCount+'¤tPage='+_this.currentPage,
|
||||
url: basePath +'/app/keyprojectcheck/punishlist?showCount='+_this.showCount+'¤tPage='+_this.currentPage,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -183,6 +263,91 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
fnSubmit() {
|
||||
var _this = this
|
||||
console.log(this.punishForm)
|
||||
//如果处罚,添加罚单
|
||||
if (this.punishForm.ISPUNISH === "1") {
|
||||
for (const key in this.punishRules) {
|
||||
if (!this.punishForm[key]) {
|
||||
uni.showToast({
|
||||
title: this.punishRules[key],
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
uni.request({
|
||||
url: basePath + '/app/keyprojectpunish/add',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
...this.punishForm,
|
||||
CORPINFO_ID: corpinfoId,
|
||||
CREATOR: loginUserId,
|
||||
OPERATOR: loginUserId,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if ("success" == res.data.result) {
|
||||
_this.editHiddenIspunish(1);
|
||||
_this.punishForm= {
|
||||
HIDDEN_ID: '',
|
||||
ISPUNISH: '',
|
||||
RECTIFICATIONDEPT_NAME: '',
|
||||
RECTIFICATIONOR_NAME: '',
|
||||
REASON: '',
|
||||
AMOUT: '',
|
||||
DATE: formatDate(new Date(), 'yyyy-MM-dd hh:mm'),
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msaesge,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
_this.editHiddenIspunish(2)
|
||||
}
|
||||
|
||||
},
|
||||
editHiddenIspunish(Ispunish){
|
||||
// 如果不处罚 修改隐患
|
||||
uni.request({
|
||||
url: basePath + '/app/keyprojectcheck/editHiddenIspunish',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
...this.punishForm,
|
||||
ISPUNISH:Ispunish,
|
||||
PUNISH_PERSON:loginUserId
|
||||
},
|
||||
success: (res) => {
|
||||
this.modalShow = false
|
||||
this.getQuery()
|
||||
}
|
||||
});
|
||||
},
|
||||
changeRadioGroup(e){
|
||||
if(this.TabCur == 2) return
|
||||
this.punishForm.ISPUNISH = e.detail.value
|
||||
},
|
||||
checkNumber(e){
|
||||
var reg = /^[0-9]+(\.[0-9]{1,2})?$/;
|
||||
if(!(reg.test(e.detail.value))){
|
||||
uni.showToast({
|
||||
title: "处罚金额只能输入整数或两位小数",
|
||||
icon: 'none'
|
||||
})
|
||||
this.punishForm.AMOUT = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
<view v-for="(item,index) of list" :key="index" :data-id="item.INSPECTION_ID" @click="$noMultipleClicks(goToDetail,item.OUTSOURCED_ID)" class="dy-list-item p20">
|
||||
<view class="dy-title-flex align-center">
|
||||
<text>{{item.OUTSOURCED_NAME}}</text>
|
||||
<text>
|
||||
<view v-if="item.cfcount>0" style="border-radius: 96px;
|
||||
font-size: 10px;
|
||||
padding: 0px 10px;
|
||||
height: 13px;
|
||||
color: #ffffff;
|
||||
background-color:#dd514c ;">
|
||||
{{item.cfcount}}
|
||||
</view>
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
|
@ -31,7 +41,7 @@
|
|||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '1'" class="dy-subtitle-flex">
|
||||
<text>
|
||||
监督部门:{{ item.Q_DEPARTMENT_NAME }}
|
||||
监督部门:{{ item.DEPARTMENT_NAME }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-show="item.IS_CORP_TYPE== '0'" class="dy-subtitle-flex">
|
||||
|
@ -161,7 +171,7 @@ export default {
|
|||
title:"加载中..."
|
||||
});//加载中动画
|
||||
uni.request({
|
||||
url: basePath +'/app/keyProjects/listOutsourced?showCount='+_this.showCount+'¤tPage='+_this.currentPage ,
|
||||
url: basePath +'/app/keyProjects/getPUNISHlist?showCount='+_this.showCount+'¤tPage='+_this.currentPage ,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
|
@ -170,7 +180,7 @@ export default {
|
|||
data: {
|
||||
KEYWORDS : _this.NameLikes, //关键字模糊查询
|
||||
CORPINFO_ID:corpinfoId,
|
||||
UserId:loginUserId
|
||||
PUNISHUser:loginUserId
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();//结束加载中动画
|
||||
|
|
|
@ -244,7 +244,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<!-- <view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="forbidEdit ? null : showZgTree('tkiTree5', 5)">
|
||||
|
@ -254,6 +254,19 @@
|
|||
<tki-tree ref="tkiTree5" :selectParent=false :range="hiddenTypeTreeList" rangeKey="name"
|
||||
@confirm="zgtreeConfirm($event,'hiddenTypeTreeList')" @cancel="zgtreeCancel">
|
||||
</tki-tree>
|
||||
</view> -->
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患类型</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" @tap="showZgTree2">{{hiddenForm.HIDDENTYPE_NAME?hiddenForm.HIDDENTYPE_NAME:'请选择'}}</view>
|
||||
</view>
|
||||
<tki-tree ref="tkiTree2"
|
||||
:selectParent="true"
|
||||
:range="hiddenTypeList"
|
||||
rangeKey="name"
|
||||
@confirm="zgtreeConfirm2"
|
||||
@cancel="zgtreeCancel2">
|
||||
</tki-tree>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">隐患处置:</view>
|
||||
|
@ -403,6 +416,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
hiddenTypeList: [],
|
||||
// 罚单开关
|
||||
punishFormType: false,
|
||||
baseImgPath: baseImgPath,
|
||||
|
@ -600,10 +614,30 @@
|
|||
// 初始化现场作业负责人
|
||||
this.getDept()
|
||||
this.getDict()
|
||||
this.getHiddenType();
|
||||
loginSession();
|
||||
|
||||
},
|
||||
methods: {
|
||||
showZgTree2(){
|
||||
this.isUps=true
|
||||
this.$refs.tkiTree2._show();
|
||||
},
|
||||
zgtreeConfirm2(e){
|
||||
this.isUps=false;
|
||||
if(e[0]?.parents.length === 1){
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.parents[0]?.id || '', e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.parents[0]?.name || '', e[0]?.name || ''].join('/')
|
||||
}else if(e[0]?.parents.length === 2) {
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.parents[0]?.id || '', e[0]?.parents[1]?.id || '', e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.parents[0]?.name || '', e[0]?.parents[1]?.name || '', e[0]?.name || ''].join('/')
|
||||
}else{
|
||||
this.hiddenForm.HIDDENTYPE = [e[0]?.id || ''];
|
||||
this.hiddenForm.HIDDENTYPE_NAME = [e[0]?.name || ''].join('/');
|
||||
}
|
||||
this.$forceUpdate();//强制刷新
|
||||
},
|
||||
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
|
@ -1390,6 +1424,51 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
getHiddenType: function () {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/getLevels',
|
||||
data: {
|
||||
DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff8',
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function ({data}) {
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
if (data.list[i].BIANMA.indexOf(loginUser.PROVINCE) > -1) {
|
||||
_this.getTrainDicList(data.list[i].DICTIONARIES_ID)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getTrainDicList(parentId) { // trainDicList
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/listAllDictToParId',
|
||||
data: {
|
||||
parentId,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function ({data}) {
|
||||
let zTreeNodes = data.zTreeNodes
|
||||
zTreeNodes = zTreeNodes.replace(/"nodes":\[/g, '"children":[')
|
||||
_this.hiddenTypeList = JSON.parse(zTreeNodes)
|
||||
}
|
||||
});
|
||||
},
|
||||
playVideo(e) {
|
||||
if (e.currentTarget.dataset.src) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
|
@ -1452,7 +1531,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//获取人员列表
|
||||
getUserList(list, dept, i) {
|
||||
//发送 post 请求
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="de-item">
|
||||
<view class="de-item-sp">
|
||||
<view class="de-sub-title">
|
||||
<text class="text-grey">计划图片</text>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue