diff --git a/pages/application/hidden-danger-management/hidden-danger-check/hidden-danger-check-detail.vue b/pages/application/hidden-danger-management/hidden-danger-check/hidden-danger-check-detail.vue index b503475..69fdb0d 100644 --- a/pages/application/hidden-danger-management/hidden-danger-check/hidden-danger-check-detail.vue +++ b/pages/application/hidden-danger-management/hidden-danger-check/hidden-danger-check-detail.vue @@ -327,7 +327,7 @@ 计划图片 - + diff --git a/pages/application/key-project-management/hidden-management/detail-list.vue b/pages/application/key-project-management/hidden-management/detail-list.vue index 9c0568a..fdda509 100644 --- a/pages/application/key-project-management/hidden-management/detail-list.vue +++ b/pages/application/key-project-management/hidden-management/detail-list.vue @@ -55,19 +55,23 @@ - + @@ -98,7 +102,7 @@ - + @@ -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){ // 如果不处罚 修改隐患 diff --git a/pages/application/key-project-management/hidden-management/detail.vue b/pages/application/key-project-management/hidden-management/detail.vue index dd0987c..36704fb 100644 --- a/pages/application/key-project-management/hidden-management/detail.vue +++ b/pages/application/key-project-management/hidden-management/detail.vue @@ -7,128 +7,176 @@ - - - 隐患照片 - - - - - - - - - - - - 隐患视频 - - - - - - - - - - - 隐患描述 - - - - 隐患部位 - - {{ hiddenForm.HIDDENPART }} - - - - 隐患级别 - - {{ hiddenForm.HIDDENLEVEL_NAME }} - - - - 隐患类型 - - {{ hiddenForm.HIDDENTYPE_NAME }} - - - - 隐患处置: - 限期整改 - - - 整改期限: - {{ hiddenForm.RECTIFICATIONDEADLINE }} - - - - 整改部门: - - - {{ hiddenForm.RECTIFICATIONDEPT_NAME }} - - - - 整改人: - {{ hiddenForm.RECTIFICATIONOR_NAME }} - - - 整改时间: - {{ hiddenForm.RECTIFICATIONTIME }} - - - - 整改照片 - - - - - - - - - - - 验收时间: - - {{hiddenForm.CHECKTIME}} - - - - 验收照片 - - - {{hiddenForm.ysImgs.length}}/4 - - - - - - - - - - - - - - - - - - + + + 隐患照片 + + + + + + + + + + + + 隐患视频 + + + + + + + + + + + 隐患描述 + + + + 隐患部位 + + {{ hiddenForm.HIDDENPART }} + + + + 隐患级别 + + {{ hiddenForm.HIDDENLEVEL_NAME }} + + + + 隐患类型 + + {{ hiddenForm.HIDDENTYPE_NAME }} + + + + 隐患处置: + 限期整改 + + + 整改期限: + {{ hiddenForm.RECTIFICATIONDEADLINE }} + + + + 整改部门: + + + {{ hiddenForm.RECTIFICATIONDEPT_NAME }} + + + + 整改人: + {{ hiddenForm.RECTIFICATIONOR_NAME }} + + + 整改时间: + {{ hiddenForm.RECTIFICATIONTIME }} + + + + 整改照片 + + + + + + + + + + + 验收时间: + + {{hiddenForm.CHECKTIME}} + + + + 验收照片 + + + {{hiddenForm.ysImgs.length}}/4 + + + + + + + + + + + + + + + + + + + + + 处罚信息 + + + + 处罚原因: + {{ punishForm.REASON }} + + + 处罚金额: + {{ punishForm.AMOUT }}元 + + + 被处罚单位: + {{ punishForm.UNITS_NAME }} + + + 被处罚人: + {{ punishForm.PERSON_NAME }} + + + 下发人: + {{ punishForm.CREATOR_NAME }} + + + 下发处罚时间: + {{ punishForm.DATE }} + + + + 罚款缴纳单 + + + + + + + + + + + 是否缴纳罚款: + {{punishForm.HANDLED === '1' ? '已缴' : '未缴' }} + + + 处罚处理人: + {{punishForm.PERSON_NAME}} + + + 处罚处理时间: + {{punishForm.HANLDE_TIME}} + + @@ -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 { diff --git a/pages/application/key-project-management/hidden-management/list.vue b/pages/application/key-project-management/hidden-management/list.vue index 298bd63..e1003c5 100644 --- a/pages/application/key-project-management/hidden-management/list.vue +++ b/pages/application/key-project-management/hidden-management/list.vue @@ -20,10 +20,20 @@ - {{item.OUTSOURCED_NAME}} + + + {{item.co}} + + @@ -32,7 +42,7 @@ - 监督部门:{{ item.Q_DEPARTMENT_NAME }} + 监督部门:{{ item.DEPARTMENT_NAME }} @@ -52,7 +62,7 @@ - diff --git a/pages/application/key-project-management/penalty-management/detail-list.vue b/pages/application/key-project-management/penalty-management/detail-list.vue index 3b10b40..f0fe7e6 100644 --- a/pages/application/key-project-management/penalty-management/detail-list.vue +++ b/pages/application/key-project-management/penalty-management/detail-list.vue @@ -19,24 +19,31 @@ - {{item.OUTSOURCED_NAME}} + {{item.HIDDENDESCR}} 被处罚单位:{{ item.UNITS_NAME }} - 被处罚人:{{ item.PERSON_NAME }} + 被处罚人:{{ item.PERSON_NAME }} - + 处罚原因:{{ item.REASON }} - + 下发人:{{ item.CREATOR_NAME }} + 是否处罚:{{ item.ISPUNISH == "2" ? "否":"是" }} - 处罚处理状态:{{ (TabCur + 1) == "1" ? "待处理" : "已处理" }} + 处罚处理状态:{{ item.ISPUNISH == "2" ? "不处罚":item.HANDLED == "1" ?"已完成":item.ISPUNISH == "1" ? "待反馈" : "待处罚" }} - + + @@ -52,6 +59,57 @@ + + + + 处罚 + + + + + + + 是否进行罚款: + + + + + + + + 处罚原因 + + + + 处罚金额(元) + + + + 被处罚单位 + + + + 被处罚人 + + + + 下发处罚时间 + + + + + + + + + + + + + + + @@ -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; + } + } } } diff --git a/pages/application/key-project-management/penalty-management/list.vue b/pages/application/key-project-management/penalty-management/list.vue index 67addf4..f88a91e 100644 --- a/pages/application/key-project-management/penalty-management/list.vue +++ b/pages/application/key-project-management/penalty-management/list.vue @@ -23,6 +23,16 @@ {{item.OUTSOURCED_NAME}} + + + {{item.cfcount}} + + @@ -31,7 +41,7 @@ - 监督部门:{{ item.Q_DEPARTMENT_NAME }} + 监督部门:{{ item.DEPARTMENT_NAME }} @@ -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();//结束加载中动画 diff --git a/pages/application/key-project-management/safety-environmental-inspection/detail.vue b/pages/application/key-project-management/safety-environmental-inspection/detail.vue index 574dc5f..c43b458 100644 --- a/pages/application/key-project-management/safety-environmental-inspection/detail.vue +++ b/pages/application/key-project-management/safety-environmental-inspection/detail.vue @@ -244,7 +244,7 @@ - + + + 隐患类型 + + {{hiddenForm.HIDDENTYPE_NAME?hiddenForm.HIDDENTYPE_NAME:'请选择'}} + + + 隐患处置: @@ -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 请求 diff --git a/pages/application/safety-environmental-inspection/archive/detail-check.vue b/pages/application/safety-environmental-inspection/archive/detail-check.vue index 47baff6..b2636b4 100644 --- a/pages/application/safety-environmental-inspection/archive/detail-check.vue +++ b/pages/application/safety-environmental-inspection/archive/detail-check.vue @@ -344,7 +344,7 @@ - + 计划图片