From a1fd840fb667a0decf7330cd3bb165f41a83415d Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 13 May 2022 14:16:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=AE=8C=E6=88=90=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=97=B6=E9=97=B4=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../audit-details-inform-time.component.html | 16 +++---- .../audit-details-inform-time.component.ts | 4 ++ .../audit-inform-time.component.html | 5 ++- .../audit-inform-time.component.ts | 24 +++++++++-- .../edit-inform-time.component.html | 2 +- .../edit-inform-time.component.scss | 6 ++- .../edit-inform-time.component.ts | 43 ++++++++++++++++--- 7 files changed, 78 insertions(+), 22 deletions(-) diff --git a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html index 3e0e8e3..a63e40e 100644 --- a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html +++ b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.html @@ -7,23 +7,23 @@
-

山东省某中化公司

+

{{organizationName}}

- 办理提醒时间:修改时间 80天 - 默认时间 90天 + 办理提醒时间:修改时间 {{data.handleRemindDays}}天 + 默认时间 {{data.handleRemindDaysDefault}}天

- 临期提醒时间:修改时间 15天 - 默认时间 30天 + 临期提醒时间:修改时间 {{data.closingRemindDays}}天 + 默认时间 {{data.closingRemindDaysDefault}}天

-

修改说明:修改原因陈述修改原因陈述,修改原因陈述。

+

修改说明:{{data.remark}}

-

审核状态:审核驳回

+

审核状态:{{data.auditStatus | auditStatus}}

-

驳回说明:不同意

+

驳回说明:

diff --git a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts index 52f0e6b..d2d65a2 100644 --- a/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts +++ b/src/app/pages/audit/audit-inform-time/audit-details-inform-time/audit-details-inform-time.component.ts @@ -10,7 +10,11 @@ export class AuditDetailsInformTimeComponent implements OnInit { @Input() data?: any; constructor(private modal: NzModalRef) { } + + organizationName ngOnInit(): void { + + this.organizationName = JSON.parse(sessionStorage.getItem('userdata')).organization.displayName } destroyModal() { this.modal.destroy({ data: 'this the result data' }); diff --git a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html index b36aa5e..cd3a5a5 100644 --- a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.html @@ -32,7 +32,10 @@ {{item.commitTime ? (item.commitTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} {{item.auditStatus | auditStatus}} - 编辑 + 编辑 + 撤销审核 审核详情 diff --git a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts index 15b00ca..fe83c75 100644 --- a/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts +++ b/src/app/pages/audit/audit-inform-time/audit-inform-time.component.ts @@ -1,5 +1,6 @@ import { HttpClient } from '@angular/common/http'; import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; +import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; import { Observable, fromEvent } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; @@ -14,7 +15,7 @@ import { EditInformTimeComponent } from './edit-inform-time/edit-inform-time.com }) export class AuditInformTimeComponent implements OnInit { - constructor(private http: HttpClient, private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } + constructor(private message: NzMessageService, private http: HttpClient, private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { } tableSpin = false list = [] @@ -44,7 +45,7 @@ export class AuditInformTimeComponent implements OnInit { this.http.get('/api/services/app/OrganizationValidityLicenseRule/GetCurOrgRules', { params: params }).subscribe((data: any) => { - this.list = this.list.concat(data.result); + this.list = data.result this.list = [...this.list] console.log('时间表格', data) this.tableSpin = false @@ -61,6 +62,11 @@ export class AuditInformTimeComponent implements OnInit { edit(item) { console.log('item', item) + if (item.auditStatus == 1) { + this.message.create('warning', '审核中不允许编辑'); + return + } + const modal = this.modal.create({ nzContent: EditInformTimeComponent, nzViewContainerRef: this.viewContainerRef, @@ -78,7 +84,7 @@ export class AuditInformTimeComponent implements OnInit { nzFooter: null, nzClosable: false, nzOnOk: async () => { - + this.getTimeList() } }); const instance = modal.getContentComponent(); @@ -109,4 +115,16 @@ export class AuditInformTimeComponent implements OnInit { const instance = modal.getContentComponent(); modal.afterClose.subscribe(result => { }); } + + unCommit(item) { + let params = { + id: item.id + } + this.http.post('/api/services/app/OrganizationValidityLicenseRule/Uncommit', '', { params: params }).subscribe((data) => { + this.message.create('success', '撤销审核成功'); + this.getTimeList() + }, err => { + this.message.create('error', '撤销审核失败'); + }) + } } diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html index 8025296..176eade 100644 --- a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.html @@ -47,7 +47,7 @@
- +
diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss index 58a90a1..4be1a5b 100644 --- a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.scss @@ -54,13 +54,13 @@ display: flex; flex-direction: column; box-sizing: border-box; - padding:0 6px; + padding: 0 6px; } } .explain { box-sizing: border-box; - padding:0 6px; + padding: 0 6px; textarea { width: 100%; @@ -77,6 +77,8 @@ margin-bottom: 17px; display: flex; justify-content: flex-end; + box-sizing: border-box; + padding: 0 7px; button { border-radius: 0px; diff --git a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts index b138e4d..3e4b643 100644 --- a/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts +++ b/src/app/pages/audit/audit-inform-time/edit-inform-time/edit-inform-time.component.ts @@ -3,6 +3,7 @@ import { NzModalRef } from 'ng-zorro-antd/modal'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { ObjectsSimpleService } from 'src/app/service/objectsSimple.service'; +import { NzMessageService } from 'ng-zorro-antd/message'; @Component({ selector: 'app-edit-inform-time', templateUrl: './edit-inform-time.component.html', @@ -13,25 +14,53 @@ export class EditInformTimeComponent implements OnInit { @Input() data?: any; validateForm!: FormGroup; - constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } + constructor(private message: NzMessageService, private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private objectsSrv: ObjectsSimpleService) { } - data2 + dataCopy ngOnInit(): void { + this.dataCopy = JSON.parse(JSON.stringify(this.data)) this.validateForm = this.fb.group({ - time1: [null, [Validators.required]], - time2: [null, [Validators.required]], + time1: [this.dataCopy.handleRemindDays, [Validators.required]], + time2: [this.dataCopy.closingRemindDays, [Validators.required]], explain: [null] }); - this.data2 = JSON.parse(JSON.stringify(this.data)) + } - + destroyModal() { this.modal.destroy({ data: 'this the result data' }); + } + + + isLoading = false ok() { - this.modal.triggerOk() + if (this.validateForm.valid) { + this.isLoading = true + let body = { + licenseTypeId: this.dataCopy.licenseTypeId, + organizationId: this.dataCopy.organizationId, + handleRemindDays: this.validateForm.value.time1, + closingRemindDays: this.validateForm.value.time2, + remark: this.validateForm.value.explain + } + console.log(body) + this.http.put('/api/services/app/OrganizationValidityLicenseRule/UpdateAndCommit', body).subscribe((data) => { + console.log('提交审核成功') + this.message.create('success', '提交审核成功'); + this.isLoading = false + this.modal.triggerOk() + }, err => { + this.message.create('error', '提交审核失败'); + this.isLoading = false + }) + } else { + this.message.create('warning', '请填写完整!'); + } + + }