diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html index e81d414..e0f13f7 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.html @@ -35,6 +35,16 @@ + + 重要等级 + + + + + + + + 是否上传副本 @@ -48,5 +58,6 @@ + \ No newline at end of file diff --git a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts index 4b5af42..376fb7e 100644 --- a/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/add-update-of-license/add-update-of-license.component.ts @@ -1,20 +1,28 @@ -import { Component, OnInit, Input } from '@angular/core'; -import { NzModalRef } from 'ng-zorro-antd/modal'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { HttpClient } from '@angular/common/http'; -import { handleType,handleTypeList } from 'src/app/pages/license/inform/inform.component'; - +import { Component, OnInit, Input } from "@angular/core"; +import { NzModalRef } from "ng-zorro-antd/modal"; +import { FormBuilder, FormGroup, Validators } from "@angular/forms"; +import { HttpClient } from "@angular/common/http"; +import { + handleType, + handleTypeList, +} from "src/app/pages/license/inform/inform.component"; @Component({ - selector: 'app-add-update-of-license', - templateUrl: './add-update-of-license.component.html', - styleUrls: ['./add-update-of-license.component.scss'] + selector: "app-add-update-of-license", + templateUrl: "./add-update-of-license.component.html", + styleUrls: ["./add-update-of-license.component.scss"], }) export class AddUpdateOfLicenseComponent implements OnInit { - validateForm!: FormGroup; - constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } - + constructor( + private modal: NzModalRef, + private fb: FormBuilder, + private http: HttpClient + ) {} + importantLevelList= [ + { name: "普通", value: 0 }, + { name: "重要", value: 1 } + ]; ngOnInit(): void { this.validateForm = this.fb.group({ name: [null, [Validators.required]], @@ -22,13 +30,13 @@ export class AddUpdateOfLicenseComponent implements OnInit { closingRemindDays: [30, [Validators.required]], handleType: [[], [Validators.required]], isEctype: [false, [Validators.required]], - isYearlyCheck: [true, [Validators.required]] + isYearlyCheck: [true, [Validators.required]], + importantLevel: [0, [Validators.required]], }); } destroyModal(): void { - this.modal.destroy({ data: 'this the result data' }); + this.modal.destroy({ data: "this the result data" }); } handleTypeList: handleTypeList[] = new handleType().list; //办理类型list - } diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html index d1395a1..7dbfd4b 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.html @@ -34,6 +34,16 @@ + + 重要等级 + + + + + + + + 是否上传副本 diff --git a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts index 0fc8089..33e66f7 100644 --- a/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts +++ b/src/app/system-management/update-of-license/edit-update-of-license/edit-update-of-license.component.ts @@ -14,7 +14,10 @@ export class EditUpdateOfLicenseComponent implements OnInit { @Input() data?: any; validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } - + importantLevelList= [ + { name: "普通", value: 0 }, + { name: "重要", value: 1 } + ]; ngOnInit(): void { this.validateForm = this.fb.group({ name: [this.data.licenseName, [Validators.required]], @@ -22,7 +25,8 @@ export class EditUpdateOfLicenseComponent implements OnInit { closingRemindDays: [this.data.closingRemindDays, [Validators.required]], handleType: [this.data.handleTypes, [Validators.required]], isEctype: [this.data.hasAttachment, [Validators.required]], - isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]] + isYearlyCheck: [this.data.isYearlyCheck, [Validators.required]], + importantLevel: [this.data.importantLevel, [Validators.required]] }); } destroyModal(): void { diff --git a/src/app/system-management/update-of-license/update-of-license.component.html b/src/app/system-management/update-of-license/update-of-license.component.html index 6e8c812..0ef1cad 100644 --- a/src/app/system-management/update-of-license/update-of-license.component.html +++ b/src/app/system-management/update-of-license/update-of-license.component.html @@ -19,6 +19,7 @@ 办理类型 是否上传副本 是否年检 + 重要等级 操作 @@ -30,6 +31,7 @@ {{getHandleTypes(data.handleTypes)}} {{data.hasAttachment ? '是' : '否'}} {{data.isYearlyCheck ? '是' : '否'}} + {{data.importantLevel ? '重要':'普通'}} 编辑 删除 diff --git a/src/app/system-management/update-of-license/update-of-license.component.ts b/src/app/system-management/update-of-license/update-of-license.component.ts index 35cd12c..d108841 100644 --- a/src/app/system-management/update-of-license/update-of-license.component.ts +++ b/src/app/system-management/update-of-license/update-of-license.component.ts @@ -49,6 +49,7 @@ export class UpdateOfLicenseComponent implements OnInit { nzWidth: 588, nzComponentParams: {}, nzOnOk: async () => { + if (instance.validateForm.valid) { await new Promise(resolve => { let body = { @@ -57,7 +58,8 @@ export class UpdateOfLicenseComponent implements OnInit { closingRemindDays: instance.validateForm.value.closingRemindDays, hasAttachment: instance.validateForm.value.isEctype, handleTypes: instance.validateForm.value.handleType, - isYearlyCheck: instance.validateForm.value.isYearlyCheck + isYearlyCheck: instance.validateForm.value.isYearlyCheck, + importantLevel: instance.validateForm.value.importantLevel, } this.http.post('/api/services/app/ValidityLicenseType/Create', body).subscribe(data => { resolve(data) @@ -90,7 +92,7 @@ export class UpdateOfLicenseComponent implements OnInit { }, nzOnOk: async () => { if (instance.validateForm.valid) { - await new Promise(resolve => { + await new Promise(resolve => { console.log('表单信息', instance.validateForm) let body = { id: item.id, @@ -99,7 +101,8 @@ export class UpdateOfLicenseComponent implements OnInit { closingRemindDays: instance.validateForm.value.closingRemindDays, hasAttachment: instance.validateForm.value.isEctype, handleTypes: instance.validateForm.value.handleType, - isYearlyCheck: instance.validateForm.value.isYearlyCheck + isYearlyCheck: instance.validateForm.value.isYearlyCheck, + importantLevel: instance.validateForm.value.importantLevel, } this.http.put('/api/services/app/ValidityLicenseType/Update', body).subscribe(data => { resolve(data)