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

作业单问题修改 gengdidi

parent bdbc2c15
...@@ -100,4 +100,14 @@ public class TSpecialWorkPermitSignController extends BaseController ...@@ -100,4 +100,14 @@ public class TSpecialWorkPermitSignController extends BaseController
{ {
return toAjax(tSpecialWorkPermitSignService.deleteTSpecialWorkPermitSignByIds(signIds)); return toAjax(tSpecialWorkPermitSignService.deleteTSpecialWorkPermitSignByIds(signIds));
} }
@PostMapping("/batchUpdateSignWorkPermit")
public AjaxResult batchUpdateSignWorkPermit(@RequestBody List<TSpecialWorkPermitSign> tSpecialWorkPermitSigns){
try {
return toAjax(tSpecialWorkPermitSignService.batchUpdateSignWorkPermit(tSpecialWorkPermitSigns));
}catch (Exception e){
logger.error("批量更新签名失败!");
}
return AjaxResult.error();
}
} }
...@@ -229,4 +229,6 @@ public class TWorkPermitController extends BaseController ...@@ -229,4 +229,6 @@ public class TWorkPermitController extends BaseController
{ {
return toAjax(tWorkPermitService.deleteTWorkPermitByIds(workPermitIds)); return toAjax(tWorkPermitService.deleteTWorkPermitByIds(workPermitIds));
} }
} }
...@@ -58,4 +58,11 @@ public interface ITSpecialWorkPermitSignService ...@@ -58,4 +58,11 @@ public interface ITSpecialWorkPermitSignService
* @return 结果 * @return 结果
*/ */
public int deleteTSpecialWorkPermitSignById(Long signId); public int deleteTSpecialWorkPermitSignById(Long signId);
/**
* 批量更新
* @param tSpecialWorkPermitSigns
* @return
*/
int batchUpdateSignWorkPermit(List<TSpecialWorkPermitSign> tSpecialWorkPermitSigns) throws Exception;
} }
...@@ -72,6 +72,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService ...@@ -72,6 +72,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int insertTSpecialWorkPermit(TSpecialWorkPermit tSpecialWorkPermit) public int insertTSpecialWorkPermit(TSpecialWorkPermit tSpecialWorkPermit)
{ {
tSpecialWorkPermit.setCreateTime(DateUtils.getNowDate()); tSpecialWorkPermit.setCreateTime(DateUtils.getNowDate());
...@@ -123,35 +124,14 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService ...@@ -123,35 +124,14 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int addSpecialPermit(TWorkPermitVo tWorkPermitVo){ public int addSpecialPermit(TWorkPermitVo tWorkPermitVo){
TWorkPermit tWorkPermit = itWorkPermitService.selectTWorkPermitById(tWorkPermitVo.gettWorkPermit().getWorkPermitId());
JSONObject licence = JSON.parseObject(tWorkPermit.getLicenceInfo());
for(TSpecialWorkPermit tSpecialWorkPermit : tWorkPermitVo.getSpecialWorkPermits()){ for(TSpecialWorkPermit tSpecialWorkPermit : tWorkPermitVo.getSpecialWorkPermits()){
JSONObject info = (JSONObject)licence.get(tSpecialWorkPermit.getSpecialWorkType()); tSpecialWorkPermitMapper.insertTSpecialWorkPermit(tSpecialWorkPermit);
if((Boolean) info.get("isChecked")){ if(null != tSpecialWorkPermit.getSigns()){
if("2".equals(info.get("status"))){ for(TSpecialWorkPermitSign sign : tSpecialWorkPermit.getSigns()){
TSpecialWorkPermit update = new TSpecialWorkPermit(); sign.setPermitId(tSpecialWorkPermit.getSpecialWorkPermitId());
update.setSpecialWorkPermitId(tSpecialWorkPermit.getSpecialWorkPermitId()); tSpecialWorkPermitSignService.insertTSpecialWorkPermitSign(sign);
update.setIsDel("1");
tSpecialWorkPermitMapper.updateTSpecialWorkPermit(update);
}
if(!"1".equals(info.get("status"))){
tSpecialWorkPermitMapper.insertTSpecialWorkPermit(tSpecialWorkPermit);
}
}
}
if("3".equals(tWorkPermitVo.gettWorkPermit().getApplyStatus())){
//只遍历key
for (String key : licence.keySet()) {
if(key !="jsa" && key != "specialLicence" && key != "lockListing"){
JSONObject info = (JSONObject)licence.get(key);
if((Boolean) info.get("isChecked")){
if(!"1".equals(info.get("status"))){
info.put("status","0");
}
}
} }
} }
tWorkPermitVo.gettWorkPermit().setLicenceInfo(JSON.toJSONString(licence));
} }
return itWorkPermitService.updateTWorkPermit(tWorkPermitVo.gettWorkPermit()); return itWorkPermitService.updateTWorkPermit(tWorkPermitVo.gettWorkPermit());
} }
......
...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service; ...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSpecialWorkPermitSignMapper; import com.zehong.system.mapper.TSpecialWorkPermitSignMapper;
import com.zehong.system.domain.TSpecialWorkPermitSign; import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.service.ITSpecialWorkPermitSignService; import com.zehong.system.service.ITSpecialWorkPermitSignService;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 【请填写功能名称】Service业务层处理 * 【请填写功能名称】Service业务层处理
...@@ -92,4 +93,23 @@ public class TSpecialWorkPermitSignServiceImpl implements ITSpecialWorkPermitSig ...@@ -92,4 +93,23 @@ public class TSpecialWorkPermitSignServiceImpl implements ITSpecialWorkPermitSig
{ {
return tSpecialWorkPermitSignMapper.deleteTSpecialWorkPermitSignById(signId); return tSpecialWorkPermitSignMapper.deleteTSpecialWorkPermitSignById(signId);
} }
/**
* 批量更新
* @param tSpecialWorkPermitSigns
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int batchUpdateSignWorkPermit(List<TSpecialWorkPermitSign> tSpecialWorkPermitSigns) throws Exception {
int count = 0;
for(TSpecialWorkPermitSign tSpecialWorkPermitSign :tSpecialWorkPermitSigns){
int result = tSpecialWorkPermitSignMapper.updateTSpecialWorkPermitSign(tSpecialWorkPermitSign);
if(result == 0){
throw new Exception("签名更新失败!");
}
count++;
}
return count;
}
} }
...@@ -9,6 +9,14 @@ export function listSign(query) { ...@@ -9,6 +9,14 @@ export function listSign(query) {
}) })
} }
export function batchUpdateSignWorkPermit(data) {
return request({
url: '/workPermit/sign/batchUpdateSignWorkPermit',
method: 'post',
data: data
})
}
// 查询【请填写功能名称】详细 // 查询【请填写功能名称】详细
export function getSign(signId) { export function getSign(signId) {
return request({ return request({
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
<td colspan="3" v-if="(applyStatus-0) ==1"><input :disabled="item.staffId != $store.state.user.userId" v-model="item.opinion" class="editInput"/></td> <td colspan="3" v-if="(applyStatus-0) ==1"><input :disabled="item.staffId != $store.state.user.userId" v-model="item.opinion" class="editInput"/></td>
<td colspan="3" v-if="(applyStatus-0) !=1"><input disabled v-model="item.opinion" class="editInput"/></td> <td colspan="3" v-if="(applyStatus-0) !=1"><input disabled v-model="item.opinion" class="editInput"/></td>
<td colspan="1">签字:</td> <td colspan="1">签字:</td>
<td colspan="2"><NewEsign :resultImg.sync ="item.signName" :isReWrite="(applyStatus-0) ==1" :width="918" :height="100"/></td> <td colspan="2"><NewEsign :resultImg.sync ="item.signName" :isDisabled="item.staffId != $store.state.user.userId" :isReWrite="(applyStatus-0) ==1" :width="918" :height="100"/></td>
<td colspan="2" v-if="(applyStatus-0) ==1"> <td colspan="2" v-if="(applyStatus-0) ==1">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="item.signDate" v-model="item.signDate"
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
import { listDept } from "@/api/system/dept"; import { listDept } from "@/api/system/dept";
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, batchUpdateSignWorkPermit } from "@/api/workPermit/workPermitSign";
import { judgeSignUpdateTWorkPermit } 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 {
...@@ -531,18 +531,13 @@ ...@@ -531,18 +531,13 @@
}, },
//新增特殊作业单 //新增特殊作业单
addSpecialWorkPermit(){ addSpecialWorkPermit(){
if(this.validateData()){
return true;
}
let param = {}; let param = {};
param.workPermitId = this.workPermitId; param.workPermitId = this.workPermitId;
param.licenceNum = this.licenceNum; param.licenceNum = this.licenceNum;
param.specialWorkType = "blindPlate" param.specialWorkType = "blindPlate"
param.specialWorkData = JSON.stringify(this.blindPlate); param.specialWorkData = JSON.stringify(this.blindPlate);
addSpecialPermit(param).then(res =>{ param.signs = this.combinSign();
this.addWorkPermitSign(res.data.specialWorkPermitId); return param;
})
return false;
}, },
//数据校验 //数据校验
validateData(){ validateData(){
...@@ -584,9 +579,16 @@ ...@@ -584,9 +579,16 @@
} }
}, },
//新增审核人 //新增审核人
addWorkPermitSign(permitId){ combinSign(){
let signs = [];
signs.push({staffId:this.leaderAuditor,staffType:"leader"});
signs.push({staffId:this.workAuditor,staffType:"workDept"});
signs.push({staffId:this.auditDeptAuditor,staffType:"auditDept"});
signs.push({staffId:this.approvalAuditor,staffType:"approval"});
signs.push({staffId:this.completeAuditor,staffType:"complete"});
return signs;
//新增作业负责人 //新增作业负责人
addSign({permitId:permitId,staffId:this.leaderAuditor,staffType:"leader"}); /* addSign({permitId:permitId,staffId:this.leaderAuditor,staffType:"leader"});
//新增单位意见 //新增单位意见
addSign({permitId:permitId,staffId:this.workAuditor,staffType:"workDept"}); addSign({permitId:permitId,staffId:this.workAuditor,staffType:"workDept"});
//新增审核部门 //新增审核部门
...@@ -594,18 +596,24 @@ ...@@ -594,18 +596,24 @@
//新增动火审批人 //新增动火审批人
addSign({permitId:permitId,staffId:this.approvalAuditor,staffType:"approval"}); addSign({permitId:permitId,staffId:this.approvalAuditor,staffType:"approval"});
//新增完工验收 //新增完工验收
addSign({permitId:permitId,staffId:this.completeAuditor,staffType:"complete"}); addSign({permitId:permitId,staffId:this.completeAuditor,staffType:"complete"});*/
}, },
submitApproval(){ submitApproval(){
let data =[];
for(let key in this.specialWorkPermitSigns){ for(let key in this.specialWorkPermitSigns){
if(this.specialWorkPermitSigns[key].staffId == this.$store.state.user.userId if(this.specialWorkPermitSigns[key].staffId == this.$store.state.user.userId
&& '' != this.specialWorkPermitSigns[key].signName && '' != this.specialWorkPermitSigns[key].signName
&& null != this.specialWorkPermitSigns[key].signName){ && null != this.specialWorkPermitSigns[key].signName){
updateSign(this.specialWorkPermitSigns[key]).then(res =>{ data.push(this.specialWorkPermitSigns[key]);
}
}
if(data.length >0){
batchUpdateSignWorkPermit(data).then(res =>{
if(res.code == 200){
this.updateWorkPermitStatus(); this.updateWorkPermitStatus();
this.msgSuccess("审核成功"); this.msgSuccess("审核成功");
}) }
} })
} }
}, },
//更新作业单状态 //更新作业单状态
...@@ -617,7 +625,7 @@ ...@@ -617,7 +625,7 @@
let signs = specialWorkPermits[key].signs; let signs = specialWorkPermits[key].signs;
for(let signKey in signs){ for(let signKey in signs){
if(signs[signKey].staffId == this.$store.state.user.userId){ if(signs[signKey].staffId == this.$store.state.user.userId){
if("" == signs[signKey].signName && null == signs[signKey].signName){ if("" == signs[signKey].signName || null == signs[signKey].signName){
flag = false; flag = false;
} }
} }
......
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
<td colspan="6" v-if="(applyStatus-0) ==1"><input :disabled="item.staffId != $store.state.user.userId" v-model="item.opinion" class="editInput"/></td> <td colspan="6" v-if="(applyStatus-0) ==1"><input :disabled="item.staffId != $store.state.user.userId" v-model="item.opinion" class="editInput"/></td>
<td colspan="6" v-if="(applyStatus-0) !=1"><input disabled v-model="item.opinion" class="editInput"/></td> <td colspan="6" v-if="(applyStatus-0) !=1"><input disabled v-model="item.opinion" class="editInput"/></td>
<td colspan="2">签字:</td> <td colspan="2">签字:</td>
<td colspan="4"><NewEsign :resultImg.sync ="item.signName" :isReWrite="(applyStatus-0) ==1" :width="918" :height="100"/></td> <td colspan="4"><NewEsign :resultImg.sync ="item.signName" :isDisabled="item.staffId != $store.state.user.userId" :isReWrite="(applyStatus-0) ==1" :width="918" :height="100"/></td>
<td colspan="4" v-if="(applyStatus-0) ==1"> <td colspan="4" v-if="(applyStatus-0) ==1">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="item.signDate" v-model="item.signDate"
...@@ -539,7 +539,7 @@ ...@@ -539,7 +539,7 @@
import { listDept } from "@/api/system/dept"; import { listDept } from "@/api/system/dept";
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, batchUpdateSignWorkPermit } from "@/api/workPermit/workPermitSign";
import { judgeSignUpdateTWorkPermit } 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 {
...@@ -740,10 +740,8 @@ ...@@ -740,10 +740,8 @@
param.licenceNum = this.licenceNum; param.licenceNum = this.licenceNum;
param.specialWorkType = "flareUp" param.specialWorkType = "flareUp"
param.specialWorkData = JSON.stringify(this.flareUp); param.specialWorkData = JSON.stringify(this.flareUp);
addSpecialPermit(param).then(res =>{ param.signs = this.combinSign();
this.addWorkPermitSign(res.data.specialWorkPermitId); return param;
})
return false;
}, },
//数据校验 //数据校验
validateData(){ validateData(){
...@@ -789,9 +787,18 @@ ...@@ -789,9 +787,18 @@
} }
}, },
//新增审核人 //新增审核人
addWorkPermitSign(permitId){ combinSign(){
let signs = [];
signs.push({staffId:this.leaderAuditor,staffType:"leader"});
signs.push({staffId:this.beyondUnitAuditor,staffType:"beyondUnit"});
signs.push({staffId:this.auditDeptAuditor,staffType:"auditDept"});
signs.push({staffId:this.approvalAuditor,staffType:"approval"});
signs.push({staffId:this.fireBeforeAuditor,staffType:"fireBefore"});
signs.push({staffId:this.completeAuditor,staffType:"complete"});
return signs;
// batchInsertTSpecialWorkPermitSign(signs);
//新增作业负责人 //新增作业负责人
addSign({permitId:permitId,staffId:this.leaderAuditor,staffType:"leader"}); /* addSign({permitId:permitId,staffId:this.leaderAuditor,staffType:"leader"});
//新增单位意见 //新增单位意见
addSign({permitId:permitId,staffId:this.beyondUnitAuditor,staffType:"beyondUnit"}); addSign({permitId:permitId,staffId:this.beyondUnitAuditor,staffType:"beyondUnit"});
//新增审核部门 //新增审核部门
...@@ -801,18 +808,24 @@ ...@@ -801,18 +808,24 @@
//新增岗位当班班长 //新增岗位当班班长
addSign({permitId:permitId,staffId:this.fireBeforeAuditor,staffType:"fireBefore"}); addSign({permitId:permitId,staffId:this.fireBeforeAuditor,staffType:"fireBefore"});
//新增完工验收 //新增完工验收
addSign({permitId:permitId,staffId:this.completeAuditor,staffType:"complete"}); addSign({permitId:permitId,staffId:this.completeAuditor,staffType:"complete"});*/
}, },
submitApproval(){ submitApproval(){
let data = [];
for(let key in this.specialWorkPermitSigns){ for(let key in this.specialWorkPermitSigns){
if(this.specialWorkPermitSigns[key].staffId == this.$store.state.user.userId if(this.specialWorkPermitSigns[key].staffId == this.$store.state.user.userId
&& '' != this.specialWorkPermitSigns[key].signName && '' != this.specialWorkPermitSigns[key].signName
&& null != this.specialWorkPermitSigns[key].signName){ && null != this.specialWorkPermitSigns[key].signName){
updateSign(this.specialWorkPermitSigns[key]).then(res =>{ data.push(this.specialWorkPermitSigns[key]);
}
}
if(data.length >0){
batchUpdateSignWorkPermit(data).then(res =>{
if(res.code == 200){
this.updateWorkPermitStatus(); this.updateWorkPermitStatus();
this.msgSuccess("审核成功"); this.msgSuccess("审核成功");
}) }
} })
} }
}, },
//更新作业单状态 //更新作业单状态
...@@ -824,7 +837,7 @@ ...@@ -824,7 +837,7 @@
let signs = specialWorkPermits[key].signs; let signs = specialWorkPermits[key].signs;
for(let signKey in signs){ for(let signKey in signs){
if(signs[signKey].staffId == this.$store.state.user.userId){ if(signs[signKey].staffId == this.$store.state.user.userId){
if("" == signs[signKey].signName && null == signs[signKey].signName){ if("" == signs[signKey].signName || null == signs[signKey].signName){
flag = false; flag = false;
} }
} }
......
<template> <template>
<div> <div>
<input class="editInput" placeholder="请签名" v-if="resultImg == '' || resultImg == null" @click="signOpen =true"/> <input class="editInput" placeholder="请签名" :disabled="isDisabled" v-if="resultImg == '' || resultImg == null" @click="signName"/>
<el-dialog title="签名" :visible.sync="signOpen" :close-on-click-modal="false" :z-index="2000"> <el-dialog title="签名" :visible.sync="signOpen" :close-on-click-modal="false" :z-index="2000">
<div style="border: 1px solid #cccccc"> <div style="border: 1px solid #cccccc">
<vue-esign ref="esign" :width="width" :height="height" :isCrop="isCrop" :lineWidth="lineWidth" :lineColor="lineColor" :bgColor.sync="bgColor" /> <vue-esign ref="esign" :width="width" :height="height" :isCrop="isCrop" :lineWidth="lineWidth" :lineColor="lineColor" :bgColor.sync="bgColor" />
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
isReWrite:{ isReWrite:{
type:Boolean, type:Boolean,
default:true default:true
},
isDisabled:{
type:Boolean,
default:false
} }
}, },
data () { data () {
...@@ -69,6 +73,11 @@ ...@@ -69,6 +73,11 @@
if(this.isReWrite){ if(this.isReWrite){
this.signOpen = true; this.signOpen = true;
} }
},
signName(){
if(!this.isDisabled){
this.signOpen =true
}
} }
} }
......
...@@ -249,7 +249,10 @@ ...@@ -249,7 +249,10 @@
</table> </table>
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<el-col :span="5"> <el-col :span="5">
<div style="font-size: 18px;margin-top: 5px">生产组当班班长:</div> <div style="font-size: 18px;margin-top: 5px">
<span style="color: red;font-weight: bold;margin-right: 3px">*</span>
生产组当班班长:
</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="produceComfirm.leaderDeptId" filterable placeholder="请选择生产组当班班长部门" @change="switchDept()"> <el-select v-model="produceComfirm.leaderDeptId" filterable placeholder="请选择生产组当班班长部门" @change="switchDept()">
...@@ -451,7 +454,7 @@ ...@@ -451,7 +454,7 @@
<script> <script>
import { listPermit, selectTWorkPermitListByLoginUser, getPermit, delPermit, addPermit, updatePermit, exportPermit } from "@/api/workPermit/permit"; import { listPermit, selectTWorkPermitListByLoginUser, getPermit, delPermit, addPermit, updatePermit, exportPermit } from "@/api/workPermit/permit";
import { getSpecialWorkPermitByWorkPermitId } from "@/api/workPermit/specialPermit"; import { getSpecialWorkPermitByWorkPermitId,addBatchSpecialPermit } from "@/api/workPermit/specialPermit";
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";
...@@ -775,6 +778,9 @@ ...@@ -775,6 +778,9 @@
}, },
/** 提交按钮 */ /** 提交按钮 */
addCertificate() { addCertificate() {
if(this.validateAddCertificate()){
return;
}
this.certificateData.mainDangerousMark = JSON.stringify(this.mainDangerousMark); this.certificateData.mainDangerousMark = JSON.stringify(this.mainDangerousMark);
this.certificateData.licenceInfo = JSON.stringify(this.licenceInfo); this.certificateData.licenceInfo = JSON.stringify(this.licenceInfo);
this.certificateData.relationSign = JSON.stringify(this.relationSign); this.certificateData.relationSign = JSON.stringify(this.relationSign);
...@@ -793,6 +799,27 @@ ...@@ -793,6 +799,27 @@
}); });
} }
}, },
validateAddCertificate(){
//许可证校验
let flag = true;
for(let key in this.licenceInfo){
if(this.licenceInfo[key].isChecked){
if(null == this.licenceInfo[key].num || '' == this.licenceInfo[key].num){
this.msgError("许可证编号未填写");
return flag;
}
flag = false;
}
}
if(flag){
this.msgError("许可证未选择!")
return flag;
}
if(null == this.produceComfirm.monitorId || '' == this.produceComfirm.monitorId){
this.msgError("生产组当班班长未选择!");
return true;
}
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const workPermitIds = row.workPermitId || this.ids; const workPermitIds = row.workPermitId || this.ids;
...@@ -901,22 +928,19 @@ ...@@ -901,22 +928,19 @@
this.certificateApprovalApplyOpen = false; this.certificateApprovalApplyOpen = false;
}, },
submitCertificateApply(){ submitCertificateApply(){
let that = this; let param= {};
let flag = true; param.tWorkPermit = {workPermitId:this.tags[0].workPermitId,applyStatus:"1"};
this.tags.forEach(item =>{ param.specialWorkPermits = [];
if(that.$refs[item.mark][0].validateData()){ for(let i = 0;i<this.tags.length;i++){
if(this.$refs[this.tags[i].mark][0].validateData()){
return; return;
} }
if(that.$refs[item.mark][0].addSpecialWorkPermit()){ param.specialWorkPermits.push(this.$refs[this.tags[i].mark][0].addSpecialWorkPermit())
flag = false; };
} addBatchSpecialPermit(param).then(res =>{
});
//更新作业单状态
if(flag){
updatePermit({workPermitId:this.tags[0].workPermitId,applyStatus:"1"});
this.certificateApprovalApplyOpen = false; this.certificateApprovalApplyOpen = false;
this.getList(); this.getList();
} })
}, },
//作业单审核 //作业单审核
certificateApproval(row){ certificateApproval(row){
......
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