|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Author: sueRimn |
|
|
|
|
* @Date: 2020-12-25 16:13:50 |
|
|
|
|
* @LastEditors: sueRimn |
|
|
|
|
* @LastEditTime: 2021-03-02 10:29:47 |
|
|
|
|
* @LastEditTime: 2021-03-02 15:08:13 |
|
|
|
|
*/ |
|
|
|
|
import { Component, Inject, OnInit } from '@angular/core'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
@ -162,8 +162,11 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
this.fetchUrl='' |
|
|
|
|
this.viewer={} |
|
|
|
|
if(item.contentType==11){ |
|
|
|
|
this.showtype=3 |
|
|
|
|
sessionStorage.setItem('companyId',item.itemId) |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.showtype=3 |
|
|
|
|
sessionStorage.setItem('companyId',item.itemId) |
|
|
|
|
},0) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ |
|
|
|
|
this.companyId=data.companyId |
|
|
|
@ -311,6 +314,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
//同意操作
|
|
|
|
|
agree(){ |
|
|
|
|
var agreeList=[] |
|
|
|
|
var companyAgreeList=[] |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
@ -351,18 +355,34 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?2:16, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var body={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:4 |
|
|
|
|
} |
|
|
|
|
companyAgreeList.push(body) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,companyAgreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ //批量审核预案
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?2:16, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
} |
|
|
|
|
agreeList.push(cart) |
|
|
|
|
} |
|
|
|
|
agreeList.push(cart) |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,agreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,agreeList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
} |
|
|
|
@ -372,6 +392,7 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
var refuseList=[] |
|
|
|
|
var companyrefuseList=[] |
|
|
|
|
if(this.shenheTable.length==0){ |
|
|
|
|
this.snackBar.open('请选择要审核的预案!','确定',config); |
|
|
|
|
} |
|
|
|
@ -408,18 +429,34 @@ export class WaitExamineerComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
//批量审核
|
|
|
|
|
else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?4:32, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
if(this.shenheTable[0].contentType==11||this.shenheTable[0].contentType==12){ //批量审批水源和重点单位
|
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var body={ |
|
|
|
|
id:this.shenheTable[i].id, |
|
|
|
|
itemId:this.shenheTable[i].itemId, |
|
|
|
|
verifyState:4 |
|
|
|
|
} |
|
|
|
|
companyrefuseList.push(body) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/ContentVerifies/Batch`,companyrefuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
for(var i=0;i<this.shenheTable.length;i++){ |
|
|
|
|
var cart={ |
|
|
|
|
planComponentId:this.shenheTable[i].itemId, |
|
|
|
|
auditStatus:this.shenheTable[i].verifyState==3?4:32, |
|
|
|
|
auditOpinion:'' |
|
|
|
|
} |
|
|
|
|
refuseList.push(cart) |
|
|
|
|
} |
|
|
|
|
refuseList.push(cart) |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,refuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.http.put(`/api/PlanAudits/Batch`,refuseList).subscribe(data=>{ |
|
|
|
|
this.snackBar.open('操作成功!','确定',config); |
|
|
|
|
this.getAlltabledate() |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.shenheTable=[] |
|
|
|
|
|
|
|
|
|