Commit a5ccfa13 authored by 耿迪迪's avatar 耿迪迪

作业单 gengdidi

parent f043d1b4
...@@ -215,6 +215,11 @@ public class TWorkPermitController extends BaseController ...@@ -215,6 +215,11 @@ public class TWorkPermitController extends BaseController
return toAjax(tWorkPermitService.updateTWorkPermit(tWorkPermit)); return toAjax(tWorkPermitService.updateTWorkPermit(tWorkPermit));
} }
@GetMapping("/judgeSignUpdateTWorkPermit")
public AjaxResult judgeSignUpdateTWorkPermit(TWorkPermit tWorkPermit){
return AjaxResult.success(tWorkPermitService.judgeSignUpdateTWorkPermit(tWorkPermit));
}
/** /**
* 删除作业许可证 * 删除作业许可证
*/ */
......
...@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; ...@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity; import com.zehong.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* 特殊作业许可证对象 t_special_work_permit * 特殊作业许可证对象 t_special_work_permit
* *
...@@ -40,7 +42,17 @@ public class TSpecialWorkPermit extends BaseEntity ...@@ -40,7 +42,17 @@ public class TSpecialWorkPermit extends BaseEntity
@Excel(name = "备注信息") @Excel(name = "备注信息")
private String remarks; private String remarks;
public void setSpecialWorkPermitId(Long specialWorkPermitId) private List<TSpecialWorkPermitSign> signs;
public List<TSpecialWorkPermitSign> getSigns() {
return signs;
}
public void setSigns(List<TSpecialWorkPermitSign> signs) {
this.signs = signs;
}
public void setSpecialWorkPermitId(Long specialWorkPermitId)
{ {
this.specialWorkPermitId = specialWorkPermitId; this.specialWorkPermitId = specialWorkPermitId;
} }
......
...@@ -35,6 +35,8 @@ public interface ITWorkPermitService ...@@ -35,6 +35,8 @@ public interface ITWorkPermitService
*/ */
public int insertTWorkPermit(TWorkPermit tWorkPermit); public int insertTWorkPermit(TWorkPermit tWorkPermit);
int judgeSignUpdateTWorkPermit(TWorkPermit tWorkPermit);
/** /**
* 修改作业许可证 * 修改作业许可证
* *
......
...@@ -5,12 +5,15 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,12 +5,15 @@ import com.alibaba.fastjson.JSONObject;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TSpecialWorkPermit; import com.zehong.system.domain.TSpecialWorkPermit;
import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.domain.TWorkPermit; import com.zehong.system.domain.TWorkPermit;
import com.zehong.system.domain.vo.TWorkPermitVo; import com.zehong.system.domain.vo.TWorkPermitVo;
import com.zehong.system.mapper.TSpecialWorkPermitMapper; import com.zehong.system.mapper.TSpecialWorkPermitMapper;
import com.zehong.system.service.ISysPostService; import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ITSpecialWorkPermitService; import com.zehong.system.service.ITSpecialWorkPermitService;
import com.zehong.system.service.ITSpecialWorkPermitSignService;
import com.zehong.system.service.ITWorkPermitService; import com.zehong.system.service.ITWorkPermitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -35,6 +38,9 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService ...@@ -35,6 +38,9 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
@Resource @Resource
private ISysPostService postService; private ISysPostService postService;
@Resource
private ITSpecialWorkPermitSignService tSpecialWorkPermitSignService;
/** /**
* 查询特殊作业许可证 * 查询特殊作业许可证
* *
...@@ -171,7 +177,14 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService ...@@ -171,7 +177,14 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
tWorkPermitVo.setPostIds(postIds);*/ tWorkPermitVo.setPostIds(postIds);*/
TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit(); TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit();
tSpecialWorkPermit.setWorkPermitId(workPermitId); tSpecialWorkPermit.setWorkPermitId(workPermitId);
tWorkPermitVo.setSpecialWorkPermits(tSpecialWorkPermitMapper.selectTSpecialWorkPermitList(tSpecialWorkPermit)); List<TSpecialWorkPermit> specialWorkPermits = tSpecialWorkPermitMapper.selectTSpecialWorkPermitList(tSpecialWorkPermit);
tWorkPermitVo.setSpecialWorkPermits(specialWorkPermits);
for(TSpecialWorkPermit special : specialWorkPermits){
TSpecialWorkPermitSign tSpecialWorkPermitSign = new TSpecialWorkPermitSign();
tSpecialWorkPermitSign.setPermitId(special.getSpecialWorkPermitId());
special.setSigns(tSpecialWorkPermitSignService.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign));
}
return tWorkPermitVo; return tWorkPermitVo;
} }
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import com.zehong.system.domain.TSpecialWorkPermit;
import org.springframework.stereotype.Service; import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.mapper.TWorkPermitMapper;
import com.zehong.system.domain.TWorkPermit; import com.zehong.system.domain.TWorkPermit;
import com.zehong.system.mapper.TSpecialWorkPermitMapper;
import com.zehong.system.mapper.TSpecialWorkPermitSignMapper;
import com.zehong.system.mapper.TWorkPermitMapper;
import com.zehong.system.service.ITWorkPermitService; import com.zehong.system.service.ITWorkPermitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/** /**
* 作业许可证Service业务层处理 * 作业许可证Service业务层处理
...@@ -19,6 +26,10 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService ...@@ -19,6 +26,10 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
{ {
@Autowired @Autowired
private TWorkPermitMapper tWorkPermitMapper; private TWorkPermitMapper tWorkPermitMapper;
@Autowired
private TSpecialWorkPermitMapper tSpecialWorkPermitMapper;
@Autowired
private TSpecialWorkPermitSignMapper tSpecialWorkPermitSignMapper;
/** /**
* 查询作业许可证 * 查询作业许可证
...@@ -63,6 +74,36 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService ...@@ -63,6 +74,36 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
* @param tWorkPermit 作业许可证 * @param tWorkPermit 作业许可证
* @return 结果 * @return 结果
*/ */
@Override
@Transactional(rollbackFor = Exception.class)
public int judgeSignUpdateTWorkPermit(TWorkPermit tWorkPermit)
{
boolean flag = true;
TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit();
tSpecialWorkPermit.setWorkPermitId(tWorkPermit.getWorkPermitId());
List<TSpecialWorkPermit> specialWorkPermits = tSpecialWorkPermitMapper.selectTSpecialWorkPermitList(tSpecialWorkPermit);
if(null != specialWorkPermits){
for(TSpecialWorkPermit special : specialWorkPermits){
TSpecialWorkPermitSign tSpecialWorkPermitSign = new TSpecialWorkPermitSign();
tSpecialWorkPermitSign.setPermitId(special.getSpecialWorkPermitId());
List<TSpecialWorkPermitSign> signs = tSpecialWorkPermitSignMapper.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
if(null != signs){
for(TSpecialWorkPermitSign sign : signs){
if(sign.getSignName() == "" || null == sign.getSignName()){
flag = false;
}
}
}
}
}
if (flag){
tWorkPermit.setUpdateTime(DateUtils.getNowDate());
return tWorkPermitMapper.updateTWorkPermit(tWorkPermit);
}
return 0;
}
@Override @Override
public int updateTWorkPermit(TWorkPermit tWorkPermit) public int updateTWorkPermit(TWorkPermit tWorkPermit)
{ {
...@@ -77,8 +118,36 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService ...@@ -77,8 +118,36 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int deleteTWorkPermitByIds(Long[] workPermitIds) public int deleteTWorkPermitByIds(Long[] workPermitIds)
{ {
List<Long> specialIds = new ArrayList<>();
List<Long> signIds = new ArrayList<>();
for(Long workPermitId : workPermitIds){
TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit();
tSpecialWorkPermit.setWorkPermitId(workPermitId);
List<TSpecialWorkPermit> specialWorkPermits = tSpecialWorkPermitMapper.selectTSpecialWorkPermitList(tSpecialWorkPermit);
if(null != specialWorkPermits){
for(TSpecialWorkPermit special : specialWorkPermits){
specialIds.add(special.getSpecialWorkPermitId());
TSpecialWorkPermitSign tSpecialWorkPermitSign = new TSpecialWorkPermitSign();
tSpecialWorkPermitSign.setPermitId(special.getSpecialWorkPermitId());
List<TSpecialWorkPermitSign> signs = tSpecialWorkPermitSignMapper.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
if(null != signs){
for(TSpecialWorkPermitSign sign : signs){
signIds.add(sign.getSignId());
}
}
}
}
}
if(specialIds.size() >0){
tSpecialWorkPermitMapper.deleteTSpecialWorkPermitByIds(specialIds.toArray(new Long[specialIds.size()]));
}
if(signIds.size() >0){
tSpecialWorkPermitSignMapper.deleteTSpecialWorkPermitSignByIds(signIds.toArray(new Long[signIds.size()]));
}
return tWorkPermitMapper.deleteTWorkPermitByIds(workPermitIds); return tWorkPermitMapper.deleteTWorkPermitByIds(workPermitIds);
} }
......
...@@ -43,6 +43,14 @@ export function updatePermit(data) { ...@@ -43,6 +43,14 @@ export function updatePermit(data) {
}) })
} }
export function judgeSignUpdateTWorkPermit(query) {
return request({
url: '/work/permit/judgeSignUpdateTWorkPermit',
method: 'get',
params: query
})
}
// 删除作业许可证 // 删除作业许可证
export function delPermit(workPermitId) { export function delPermit(workPermitId) {
return request({ return request({
...@@ -51,6 +59,7 @@ export function delPermit(workPermitId) { ...@@ -51,6 +59,7 @@ export function delPermit(workPermitId) {
}) })
} }
// 导出作业许可证 // 导出作业许可证
export function exportPermit(query) { export function exportPermit(query) {
return request({ return request({
......
<template> <template>
<el-dialog title="作业单" :visible.sync="certificateDetailOpen" width="900px" :close-on-click-modal="false" append-to-body :before-close="certificateDetailClose"> <el-dialog title="作业单" :visible.sync="certificateDetailOpen" width="950px" :close-on-click-modal="false" append-to-body :before-close="certificateDetailClose">
<div class="tags_box"> <div class="tags_box">
<div class="tags"> <div class="tags">
<div :class="{isActive:'workPermit'== active}" @click="handelToogel('workPermit')">作业单</div> <div :class="{isActive:'workPermit'== active}" @click="handelToogel('workPermit')">作业单</div>
...@@ -112,6 +112,11 @@ ...@@ -112,6 +112,11 @@
:workPermitId = "item.workPermitId" :workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum" :licenceNum = "item.licenceNum"
applyStatus="4"/> applyStatus="4"/>
<BlindPlate v-if="item.specialWorkType == 'blindPlate'"
:ref="item.specialWorkType"
:workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum"
applyStatus="4"/>
</div> </div>
</div> </div>
...@@ -123,12 +128,14 @@ ...@@ -123,12 +128,14 @@
<script> <script>
import NewEsign from "@/components/SaftyWork/NewEsign"; import NewEsign from "@/components/SaftyWork/NewEsign";
import FlareUp from "@/components/NewSaftyWork/FlareUp"; import FlareUp from "@/components/NewSaftyWork/FlareUp";
import BlindPlate from "@/components/NewSaftyWork/BlindPlate";
import { getSpecialWorkPermitByWorkPermitId } from "@/api/workPermit/specialPermit"; import { getSpecialWorkPermitByWorkPermitId } from "@/api/workPermit/specialPermit";
import { listSign } from "@/api/workPermit/workPermitSign"; import { listSign } from "@/api/workPermit/workPermitSign";
export default { export default {
components: { components: {
NewEsign, NewEsign,
FlareUp FlareUp,
BlindPlate
}, },
name: "new-work-permit-detail", name: "new-work-permit-detail",
props:{ props:{
......
This diff is collapsed.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-date-picker> </el-date-picker>
</td> </td>
<td colspan="5" v-if="(applyStatus-0) > 0"> <td colspan="5" v-if="(applyStatus-0) > 0">
{{ (flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[1]}}{{ (flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[1]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[2]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[1].split(":")[0]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[1].split(":")[1]}} {{ (flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[0]}}{{ (flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[1]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[0].split("-")[2]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[1].split(":")[0]}}{{(flareUp.applyDate == null || flareUp.applyDate =='') ? "-" :flareUp.applyDate.split(" ")[1].split(":")[1]}}
</td> </td>
<td colspan="2">编号</td> <td colspan="2">编号</td>
<td colspan="3"><input v-model="flareUp.num" disabled class="editInput"/></td> <td colspan="3"><input v-model="flareUp.num" disabled class="editInput"/></td>
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<el-col :span="4"> <el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">所在单位意见</div> <div style="font-size: 18px;margin-top: 5px">所在单位:</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="beyondUnitDeptId" filterable placeholder="请选择所在单位" @change="switchDept(beyondUnitDeptId)"> <el-select v-model="beyondUnitDeptId" filterable placeholder="请选择所在单位" @change="switchDept(beyondUnitDeptId)">
...@@ -412,7 +412,7 @@ ...@@ -412,7 +412,7 @@
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<el-col :span="4"> <el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">审核部门意见</div> <div style="font-size: 18px;margin-top: 5px">审核部门:</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="auditDeptDeptId" filterable placeholder="请选择审核部门" @change="switchDept(auditDeptDeptId)"> <el-select v-model="auditDeptDeptId" filterable placeholder="请选择审核部门" @change="switchDept(auditDeptDeptId)">
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<el-col :span="4"> <el-col :span="4">
<div style="font-size: 18px;margin-top: 5px">动火审批人意见</div> <div style="font-size: 18px;margin-top: 5px">动火审部门</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="approvalDeptId" filterable placeholder="请选择动火审批人" @change="switchDept(approvalDeptId)"> <el-select v-model="approvalDeptId" filterable placeholder="请选择动火审批人" @change="switchDept(approvalDeptId)">
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
import { addSpecialPermit, getSpecialWorkPermitByWorkPermitId } from "@/api/workPermit/specialPermit"; import { addSpecialPermit, getSpecialWorkPermitByWorkPermitId } from "@/api/workPermit/specialPermit";
import { addSign, listSign, updateSign } from "@/api/workPermit/workPermitSign"; import { addSign, listSign, updateSign } from "@/api/workPermit/workPermitSign";
import { updatePermit } from "@/api/workPermit/permit"; import { judgeSignUpdateTWorkPermit } from "@/api/workPermit/permit";
import NewEsign from "@/components/SaftyWork/NewEsign"; import NewEsign from "@/components/SaftyWork/NewEsign";
export default { export default {
name: "flare-up", name: "flare-up",
...@@ -732,9 +732,9 @@ ...@@ -732,9 +732,9 @@
}, },
//新增特殊作业单 //新增特殊作业单
addSpecialWorkPermit(){ addSpecialWorkPermit(){
if(this.validateData()){ /*if(this.validateData()){
return true; return true;
} }*/
let param = {}; let param = {};
param.workPermitId = this.workPermitId; param.workPermitId = this.workPermitId;
param.licenceNum = this.licenceNum; param.licenceNum = this.licenceNum;
...@@ -748,11 +748,11 @@ ...@@ -748,11 +748,11 @@
//数据校验 //数据校验
validateData(){ validateData(){
if(typeof this.flareUp.applyUnit== "undefined" || this.flareUp.applyUnit== null || this.flareUp.applyUnit== ""){ if(typeof this.flareUp.applyUnit== "undefined" || this.flareUp.applyUnit== null || this.flareUp.applyUnit== ""){
this.msgError("申请单位为空!"); this.msgError("动火作业单申请单位为空!");
return true; return true;
} }
if(typeof this.flareUp.workContent== "undefined" || this.flareUp.workContent== null || this.flareUp.workContent== ""){ if(typeof this.flareUp.workContent== "undefined" || this.flareUp.workContent== null || this.flareUp.workContent== ""){
this.msgError("作业内容为空!"); this.msgError("动火作业单作业内容为空!");
return true; return true;
} }
if(typeof this.flareUp.fireMethod== "undefined" || this.flareUp.fireMethod== null || this.flareUp.fireMethod== ""){ if(typeof this.flareUp.fireMethod== "undefined" || this.flareUp.fireMethod== null || this.flareUp.fireMethod== ""){
...@@ -764,15 +764,15 @@ ...@@ -764,15 +764,15 @@
return true; return true;
} }
if(typeof this.leaderAuditor== "undefined" || this.leaderAuditor== null || this.leaderAuditor== ""){ if(typeof this.leaderAuditor== "undefined" || this.leaderAuditor== null || this.leaderAuditor== ""){
this.msgError("作业负责人未选择!"); this.msgError("动火作业单作业负责人未选择!");
return true; return true;
} }
if(typeof this.beyondUnitAuditor== "undefined" || this.beyondUnitAuditor== null || this.beyondUnitAuditor== ""){ if(typeof this.beyondUnitAuditor== "undefined" || this.beyondUnitAuditor== null || this.beyondUnitAuditor== ""){
this.msgError("所在单位审核人未选择!"); this.msgError("动火作业单所在单位审核人未选择!");
return true; return true;
} }
if(typeof this.auditDeptAuditor== "undefined" || this.auditDeptAuditor== null || this.auditDeptAuditor== ""){ if(typeof this.auditDeptAuditor== "undefined" || this.auditDeptAuditor== null || this.auditDeptAuditor== ""){
this.msgError("审核部门审核人未选择!"); this.msgError("动火作业单审核部门审核人未选择!");
return true; return true;
} }
if(typeof this.approvalAuditor== "undefined" || this.approvalAuditor== null || this.approvalAuditor== ""){ if(typeof this.approvalAuditor== "undefined" || this.approvalAuditor== null || this.approvalAuditor== ""){
...@@ -780,11 +780,11 @@ ...@@ -780,11 +780,11 @@
return true; return true;
} }
if(typeof this.fireBeforeAuditor== "undefined" || this.fireBeforeAuditor== null || this.fireBeforeAuditor== ""){ if(typeof this.fireBeforeAuditor== "undefined" || this.fireBeforeAuditor== null || this.fireBeforeAuditor== ""){
this.msgError("岗位当班班长未选择!"); this.msgError("动火作业单岗位当班班长未选择!");
return true; return true;
} }
if(typeof this.completeAuditor== "undefined" || this.completeAuditor== null || this.completeAuditor== ""){ if(typeof this.completeAuditor== "undefined" || this.completeAuditor== null || this.completeAuditor== ""){
this.msgError("完工验收人未选择!"); this.msgError("动火作业单完工验收人未选择!");
return true; return true;
} }
}, },
...@@ -820,23 +820,22 @@ ...@@ -820,23 +820,22 @@
getSpecialWorkPermitByWorkPermitId({workPermitId:this.workPermitId}).then(res =>{ getSpecialWorkPermitByWorkPermitId({workPermitId:this.workPermitId}).then(res =>{
let specialWorkPermits = res.data.specialWorkPermits; let specialWorkPermits = res.data.specialWorkPermits;
let flag = true; let flag = true;
for(let key in specialWorkPermits ){ for(let key in specialWorkPermits){
listSign({ pageNum: 1,pageSize: 99999,permitId:specialWorkPermits[key].specialWorkPermitId}).then(res =>{ let signs = specialWorkPermits[key].signs;
for(key in res.rows){ for(let signKey in signs){
if(res.rows[key].signName == "" || null == res.rows[key].signName){ if(signs[signKey].staffId == this.$store.state.user.userId){
flag = false; if("" == signs[signKey].signName && null == signs[signKey].signName){
} flag = false;
} }
}) }
}
} }
if(flag){ if(flag){
updatePermit({workPermitId:this.workPermitId,applyStatus:"2"}).then(res =>{ this.cancelApproval();
this.cancelApproval(); this.$parent.$parent.getList();
this.$parent.$parent.getList();
})
} }
}) judgeSignUpdateTWorkPermit({workPermitId:this.workPermitId,applyStatus:"2"});
})
}, },
cancelApproval(){ cancelApproval(){
this.$parent.$parent.cancelCertificateApproval(); this.$parent.$parent.cancelCertificateApproval();
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
v-hasPermi="['system:permit:edit']" v-hasPermi="['system:permit:edit']"
>作业证审核</el-button> >作业证审核</el-button>
<el-button <el-button
v-if="scope.row.applyStatus=='2' && scope.row.produceComfirm.monitorId === $store.state.user.userId" v-if="scope.row.applyStatus=='2' && JSON.parse(scope.row.produceComfirm).monitorId == $store.state.user.userId"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -284,16 +284,21 @@ ...@@ -284,16 +284,21 @@
<el-dialog title="作业单申请" :visible.sync="certificateApprovalApplyOpen" append-to-body :close-on-click-modal="false" @close="cancelCertificateApply"> <el-dialog title="作业单申请" :visible.sync="certificateApprovalApplyOpen" append-to-body :close-on-click-modal="false" @close="cancelCertificateApply">
<div class="tags_box"> <div class="tags_box">
<div v-for="item in tags" class="tags"> <div v-for="item in tags" class="tags">
<div :class="{isActive:item.name==active}" @click="handelToogel(item.name)">{{item.name}}</div> <div :class="{isActive:item.name==active}" @click="handelToogel(item.name,'1')">{{item.name}}</div>
</div> </div>
</div> </div>
<div class="con_box"> <div class="con_box">
<div v-for="item in tags" v-if="active == item.name"> <div v-for="item in tags" v-show="active == item.name">
<FlareUp v-if="item.mark == 'flareUp'" <FlareUp v-if="item.mark == 'flareUp'"
:ref="item.mark" :ref="item.mark"
:workPermitId = "item.workPermitId" :workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum" :licenceNum = "item.licenceNum"
applyStatus = "0"/> applyStatus = "0"/>
<BlindPlate v-if="item.mark == 'blindPlate'"
:ref="item.mark"
:workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum"
applyStatus = "0"/>
</div> </div>
</div> </div>
...@@ -307,16 +312,21 @@ ...@@ -307,16 +312,21 @@
<el-dialog title="作业单审核" :visible.sync="certificateApprovalOpen" append-to-body :close-on-click-modal="false"> <el-dialog title="作业单审核" :visible.sync="certificateApprovalOpen" append-to-body :close-on-click-modal="false">
<div class="tags_box"> <div class="tags_box">
<div v-for="item in specialWorkPermits" class="tags"> <div v-for="item in specialWorkPermits" class="tags">
<div :class="{isActive:item.specialWorkType==approvalActive}" @click="handelToogel(item.specialWorkType)">{{ getTagName(item.specialWorkType) }}</div> <div :class="{isActive:item.specialWorkType==approvalActive}" @click="handelToogel(item.specialWorkType,'2')">{{ getTagName(item.specialWorkType) }}</div>
</div> </div>
</div> </div>
<div class="con_box"> <div class="con_box">
<div v-for="item in specialWorkPermits" v-if="approvalActive == item.specialWorkType"> <div v-for="item in specialWorkPermits" v-show="approvalActive == item.specialWorkType">
<FlareUp v-if="item.specialWorkType == 'flareUp'" <FlareUp v-if="item.specialWorkType == 'flareUp'"
:ref="item.specialWorkType" :ref="item.specialWorkType"
:workPermitId = "item.workPermitId" :workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum" :licenceNum = "item.licenceNum"
applyStatus="1"/> applyStatus="1"/>
<BlindPlate v-if="item.specialWorkType == 'blindPlate'"
:ref="item.specialWorkType"
:workPermitId = "item.workPermitId"
:licenceNum = "item.licenceNum"
applyStatus="1"/>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -445,6 +455,7 @@ ...@@ -445,6 +455,7 @@
import { listUser,getAllUserName } from "@/api/system/user"; import { listUser,getAllUserName } from "@/api/system/user";
import { listAll } from "@/api/contractor/contractorInfo"; import { listAll } from "@/api/contractor/contractorInfo";
import FlareUp from "@/components/NewSaftyWork/FlareUp"; import FlareUp from "@/components/NewSaftyWork/FlareUp";
import BlindPlate from "@/components/NewSaftyWork/BlindPlate";
import { listSign } from "@/api/workPermit/workPermitSign"; import { listSign } from "@/api/workPermit/workPermitSign";
import { listDept } from "@/api/system/dept"; import { listDept } from "@/api/system/dept";
import NewEsign from "@/components/SaftyWork/NewEsign"; import NewEsign from "@/components/SaftyWork/NewEsign";
...@@ -454,6 +465,7 @@ ...@@ -454,6 +465,7 @@
name: "index", name: "index",
components:{ components:{
FlareUp, FlareUp,
BlindPlate,
NewEsign, NewEsign,
Editor, Editor,
NewWorkPermitDetail NewWorkPermitDetail
...@@ -839,6 +851,7 @@ ...@@ -839,6 +851,7 @@
//作业单申请 //作业单申请
certificateApprovalApply(row){ certificateApprovalApply(row){
this.certificateApprovalApplyOpen = true; this.certificateApprovalApplyOpen = true;
this.tags = [];
const workPermitId = row.workPermitId; const workPermitId = row.workPermitId;
getPermit(workPermitId).then(res => { getPermit(workPermitId).then(res => {
let licence = JSON.parse(res.data.licenceInfo); let licence = JSON.parse(res.data.licenceInfo);
...@@ -874,8 +887,13 @@ ...@@ -874,8 +887,13 @@
} }
}, },
//tag切换 //tag切换
handelToogel(item) { handelToogel(item,type) {
this.active = item; if(type == '1'){
this.active = item;
}
if(type == '2'){
this.approvalActive = item;
}
}, },
cancelCertificateApply(){ cancelCertificateApply(){
this.tags = []; this.tags = [];
...@@ -886,6 +904,9 @@ ...@@ -886,6 +904,9 @@
let that = this; let that = this;
let flag = true; let flag = true;
this.tags.forEach(item =>{ this.tags.forEach(item =>{
if(that.$refs[item.mark][0].validateData()){
return;
}
if(that.$refs[item.mark][0].addSpecialWorkPermit()){ if(that.$refs[item.mark][0].addSpecialWorkPermit()){
flag = false; flag = false;
} }
...@@ -900,21 +921,20 @@ ...@@ -900,21 +921,20 @@
//作业单审核 //作业单审核
certificateApproval(row){ certificateApproval(row){
this.certificateApprovalOpen = true; this.certificateApprovalOpen = true;
this.specialWorkPermits = [];
getSpecialWorkPermitByWorkPermitId({workPermitId:row.workPermitId}).then(res =>{ getSpecialWorkPermitByWorkPermitId({workPermitId:row.workPermitId}).then(res =>{
//this.specialWorkPermits = res.data.specialWorkPermits;
let specialWorkPermits = res.data.specialWorkPermits; let specialWorkPermits = res.data.specialWorkPermits;
this.$nextTick(() => { console.log("specialWorkPermits",specialWorkPermits)
for(let key in specialWorkPermits ){ for(let key in specialWorkPermits ){
listSign({ pageNum: 1,pageSize: 99999,permitId:specialWorkPermits[key].specialWorkPermitId}).then(res =>{ if(-1 != specialWorkPermits[key].signs.findIndex(item => item.staffId === this.$store.state.user.userId)){
if(-1 != res.rows.findIndex(item => item.staffId === $store.state.user.userId)){ this.specialWorkPermits.push(specialWorkPermits[key]);
this.specialWorkPermits.push(specialWorkPermits[key]); this.$nextTick(() => {
this.$refs[specialWorkPermits[key].specialWorkType][0][specialWorkPermits[key].specialWorkType] = JSON.parse(specialWorkPermits[key].specialWorkData); this.$refs[specialWorkPermits[key].specialWorkType][0][specialWorkPermits[key].specialWorkType] = JSON.parse(specialWorkPermits[key].specialWorkData);
this.$refs[specialWorkPermits[key].specialWorkType][0].specialWorkPermitId = specialWorkPermits[key].specialWorkPermitId; this.$refs[specialWorkPermits[key].specialWorkType][0].specialWorkPermitId = specialWorkPermits[key].specialWorkPermitId;
this.$refs[specialWorkPermits[key].specialWorkType][0].specialWorkPermitSigns = res.rows; this.$refs[specialWorkPermits[key].specialWorkType][0].specialWorkPermitSigns = specialWorkPermits[key].signs;
}
}) })
} }
}) }
this.approvalActive = this.specialWorkPermits[0].specialWorkType; this.approvalActive = this.specialWorkPermits[0].specialWorkType;
}) })
}, },
...@@ -925,7 +945,7 @@ ...@@ -925,7 +945,7 @@
certificateCheck(row){ certificateCheck(row){
this.checkOpen=true; this.checkOpen=true;
this.workPermitTitle = "事前检查"; this.workPermitTitle = "事前检查";
const workPermitId = row.workPermitId; let workPermitId = row.workPermitId;
getPermit(workPermitId).then(response => { getPermit(workPermitId).then(response => {
this.certificateData = response.data; this.certificateData = response.data;
this.certificateData.linkMan = this.applyNameFormate( this.certificateData); this.certificateData.linkMan = this.applyNameFormate( this.certificateData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment