Browse Source

[新增]重点单位批量审核功能

zhuzhou
chenjingyu 4 years ago
parent
commit
bf09688da5
  1. 39
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts

39
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -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){
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,6 +355,20 @@ export class WaitExamineerComponent implements OnInit {
}
//批量审核
else{
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,
@ -364,6 +382,8 @@ export class WaitExamineerComponent implements OnInit {
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,6 +429,20 @@ export class WaitExamineerComponent implements OnInit {
}
//批量审核
else{
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,
@ -421,6 +456,8 @@ export class WaitExamineerComponent implements OnInit {
this.getAlltabledate()
})
}
}
this.shenheTable=[]

Loading…
Cancel
Save