diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts index de1f108..3abce58 100644 --- a/src/app/http-interceptors/base-interceptor.ts +++ b/src/app/http-interceptors/base-interceptor.ts @@ -84,11 +84,15 @@ export class BaseInterceptor implements HttpInterceptor { this.message.create('error', `请核对您的输入信息或格式是否正确!`); } if (error.status === 500) { - this.message.create('error', `状态500,服务器错误!${error.error.message}`); + // console.log('xxxx',error) + this.message.create('error', `状态500,服务器错误!${error.error.error.message}`); + } + if (error.status === 404) { + this.message.create('error', `实体未找到!${error.error.error.message}`); } if (error.error instanceof ErrorEvent) { // 发生客户端或网络错误。相应处理。 - console.error('An error occurred:', error.error.message); + console.error('An error occurred:', error.error.error.message); } else { // 服务端返回http状态码 // 服务端返回错误信息 diff --git a/src/app/pages/audit/annual-inspection/annual-inspection.component.ts b/src/app/pages/audit/annual-inspection/annual-inspection.component.ts index 9cd5035..a1ea706 100644 --- a/src/app/pages/audit/annual-inspection/annual-inspection.component.ts +++ b/src/app/pages/audit/annual-inspection/annual-inspection.component.ts @@ -16,15 +16,18 @@ export class AnnualInspectionComponent implements OnInit { tableSpin = false tableScrollHeight + resizeListener ngOnInit(): void { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' // 页面监听 - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' }); this.getAnnualInspectionList() } - + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } list = [] diff --git a/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts index 5f10426..4c55922 100644 --- a/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts +++ b/src/app/pages/audit/annual-inspection/edit-annual-inspection/edit-annual-inspection.component.ts @@ -43,7 +43,7 @@ export class EditAnnualInspectionComponent implements OnInit { let body = { licenseTypeId: this.dataCopy.licenseTypeId, organizationId: JSON.parse(sessionStorage.getItem('userdata')).organization.id, - yearlyCheckDate: moment(this.validateForm.value.time).format('YYYY-MM-DD')//开业时间格式化 + yearlyCheckDate: moment(this.validateForm.value.time).format('YYYY-MM-DD') } this.http.put('/api/services/app/OrganizationValidityLicenseRule/UpdateYearlyCheckDate', body).subscribe((data) => { this.message.create('success', '修改成功'); 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 b90112b..dbece97 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 @@ -14,20 +14,22 @@

公司名称: {{data.organization ? data.organization.displayName : null}}

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

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

-

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

+

年检时间: {{data.yearlyCheckDate | date:"MM/dd"}}

+
+

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

-

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

+

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

-

审核说明:{{data.auditLog? data.auditLog.rejectReason : ''}}

+

审核说明: {{data.auditLog? data.auditLog.rejectReason : ''}}

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 d2d65a2..a77aa23 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 @@ -13,7 +13,6 @@ export class AuditDetailsInformTimeComponent implements OnInit { organizationName ngOnInit(): void { - this.organizationName = JSON.parse(sessionStorage.getItem('userdata')).organization.displayName } destroyModal() { 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 aadc2ca..c30ed8a 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 @@ -9,6 +9,7 @@ 办理提醒时间 临期提醒时间 + 年检设置 提交审核时间 审核状态 操作 @@ -18,6 +19,8 @@ 现用时间 默认时间 现用时间 + 是否年检 + 年检时间 @@ -29,6 +32,8 @@ {{item.handleRemindDays}}天 {{item.closingRemindDaysDefault}}天 {{item.closingRemindDays}}天 + {{item.isYearlyCheckDefault ? '是' : '否'}} + {{item.yearlyCheckDate | date:"MM/dd"}} {{(item.auditLog && item.auditLog.committedTime) ? (item.auditLog.committedTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} {{item.auditStatus | auditStatus}} @@ -36,7 +41,7 @@ [ngClass]="{'greyColor': item.auditStatus == 1}">编辑 撤销审核 - 审核详情 + 详情 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 fe83c75..b4189c0 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 @@ -20,16 +20,23 @@ export class AuditInformTimeComponent implements OnInit { list = [] tableScrollHeight + + resizeListener ngOnInit(): void { // 页面监听 this.tableScrollHeight = '0px' - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader) + 'px' }); this.getTimeList() } + + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } + SkipCount: string = '0' MaxResultCount: string = '100' 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 176eade..6d4e7d1 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 @@ -35,6 +35,15 @@

默认时间: 30天

+
+

年检时间

+ + + + + + +

修改说明

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 3e4b643..fe1c5f5 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 @@ -4,6 +4,7 @@ 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'; +import * as moment from 'moment'; @Component({ selector: 'app-edit-inform-time', templateUrl: './edit-inform-time.component.html', @@ -14,18 +15,20 @@ export class EditInformTimeComponent implements OnInit { @Input() data?: any; validateForm!: FormGroup; - constructor(private message: NzMessageService, 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) { } + dateFormat = 'MM/dd'; dataCopy ngOnInit(): void { this.dataCopy = JSON.parse(JSON.stringify(this.data)) this.validateForm = this.fb.group({ time1: [this.dataCopy.handleRemindDays, [Validators.required]], time2: [this.dataCopy.closingRemindDays, [Validators.required]], + time: [this.dataCopy.yearlyCheckDate, this.dataCopy.isYearlyCheckDefault ? [Validators.required] : null],//年检时间 explain: [null] }); + } @@ -44,6 +47,7 @@ export class EditInformTimeComponent implements OnInit { organizationId: this.dataCopy.organizationId, handleRemindDays: this.validateForm.value.time1, closingRemindDays: this.validateForm.value.time2, + yearlyCheckDate: this.dataCopy.isYearlyCheckDefault ? moment(this.validateForm.value.time).format('YYYY-MM-DD') : null, remark: this.validateForm.value.explain } console.log(body) diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html index 0ed445b..02b58bd 100644 --- a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html @@ -7,52 +7,80 @@
-

{{data.gasStation.companyName}} - {{data.gasStation.locationName}} - {{data.gasStation.stationName}}

+

{{data.gasStation.companyName}} - + {{data.gasStation.locationName}} - {{data.gasStation.stationName}}

-
+
+ +

公司名称:   {{data.organization.displayName}}

-

证件名称:   {{data.getData.licenseType.licenseName}}

+

证照名称:   {{data.getData.licenseType.licenseName}}

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

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

-

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

+

年检时间: {{data.getData.yearlyCheckDate | date:"MM/dd"}}

+
+

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

-

证件名称:   {{data.getData.licenseTypeName}}

+

证照名称:   {{data.getData.licenseTypeName}}

-

证件编号:   {{data.getData.licenseCode || ''}}

+

证照编号:   {{data.getData.licenseCode || ''}}

-

证件有效期:   {{data.getData.validityStartTime | date:"yyyy/MM/dd"}} - {{data.getData.validityEndTime | date:"yyyy/MM/dd"}}

+

证照效期:   {{data.getData.isLongTerm ? '长期证照' : (data.getData.validityEndTime | date:"yyyy/MM/dd")}}

-

办理类型:   {{getHandleTypes(data.getData.handleTypes)}}

+

办理类型:   {{getHandleTypes(data.getData.handleTypesDefault)}}

-

有效期类型:   {{data.getData.validityDays || 0}}天

+

有效天数:    + + 长期 + + + {{data.getData.validityDays ? data.getData.validityDays+'天' : '/'}} + +

是否年检:   

-

证件名称:   {{data.getData.licenseTypeName}}

+

证照名称:   {{data.getData.licenseTypeName}}

+
+

有无证照:    + 不适用 +

-

有无证照:   不适用

+

说明:   {{data.getData.remark}}

-

证件图片:    - - - +

附件:    + + +

-

审批意见:

- +

附件副本:    + + + +

+

审批意见:

+
diff --git a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts index e09e7cd..2a9b9a5 100644 --- a/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts +++ b/src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.ts @@ -85,15 +85,15 @@ export class AuditDisposeComponent implements OnInit { //查看文件 lookFile(item) { - if (!item.imageUrl) { + if (!item) { return } - if (this.getFileType(item.imageUrl) == 'word') { - let arr = item.imageUrl.split('.') + if (this.getFileType(item) == 'word') { + let arr = item.split('.') arr[arr.length - 1] = 'pdf' window.open(arr.join('.')) - } else if (this.getFileType(item.imageUrl) == 'pdf') { - window.open(item.imageUrl) + } else if (this.getFileType(item) == 'pdf') { + window.open(item) } else { this.message.create('warning', '暂不支持查看!'); } diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.html b/src/app/pages/audit/audit-ing/audit-ing.component.html index c03a84a..7fe981e 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.html +++ b/src/app/pages/audit/audit-ing/audit-ing.component.html @@ -5,15 +5,15 @@ - 审批类型 + 审批信息 - 审批信息 + 审批类型 加油站名称 - 区域 - 省公司 - 提交时间 + 区域名称 + 省公司名称 + 审批状态 - 操作 + 审批 @@ -23,9 +23,9 @@ 油站信息 - 更新类证照提醒时间 - 更新类证照 - 档案类证照 + 经营类证照提醒时间 + 经营类证照 + 资产类证照 @@ -36,13 +36,11 @@ - - - {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss" }} + {{item.auditStatusDesc}} - 处置 + 审批 详情 diff --git a/src/app/pages/audit/audit-ing/audit-ing.component.ts b/src/app/pages/audit/audit-ing/audit-ing.component.ts index b482f0f..4f47dc9 100644 --- a/src/app/pages/audit/audit-ing/audit-ing.component.ts +++ b/src/app/pages/audit/audit-ing/audit-ing.component.ts @@ -21,16 +21,19 @@ export class AuditIngComponent implements OnInit { tableSpin = false tableScrollHeight + resizeListener ngOnInit(): void { this.tableScrollHeight = '100px' // 页面监听 - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' }); this.getStationList() } - + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } ngAfterViewInit(): void { fromEvent(this.element.nativeElement.querySelector(`.ant-table-body`) as HTMLCanvasElement, 'scroll').pipe(debounceTime(100)).subscribe((event: any) => { //监听 DOM 滚动事件 if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) { @@ -103,19 +106,19 @@ export class AuditIngComponent implements OnInit { nzClosable: false, nzOnOk: async () => { await new Promise(resolve => { - let url - if (item.auditType == 0) { - url = '/api/services/app/GasStation/Audit' - } else if (item.auditType == 1) { - url = '/api/services/app/OrganizationValidityLicenseRule/Audit' - } else if (item.auditType == 2) { - url = '/api/services/app/StationValidityLicense/Audit' - } else if (item.auditType) { - url = '/api/services/app/StationFileLicense/Audit' - } + let url = '/api/services/app/ContentAuditLog/Audit' + // if (item.auditType == 0) { + // url = '/api/services/app/GasStation/Audit' + // } else if (item.auditType == 1) { + // url = '/api/services/app/OrganizationValidityLicenseRule/Audit' + // } else if (item.auditType == 2) { + // url = '/api/services/app/StationValidityLicense/Audit' + // } else if (item.auditType) { + // url = '/api/services/app/StationFileLicense/Audit' + // } let params = { - id: item.auditType == 0 ? item.gasStation.id : item.getData.id, - remark: instance.textarea + id: item.id, + rejectReason: instance.textarea } let body = instance.isPass ? 2 : 3; this.http.post(url, body, { params }).subscribe(data => { @@ -135,18 +138,24 @@ export class AuditIngComponent implements OnInit { } details(item) { + let itemCopy = JSON.parse(JSON.stringify(item)) let component if (item.auditType == 0) { component = GasBaseInfoComponent } else if (item.auditType == 1) { component = AuditDetailsInformTimeComponent + } else if (item.auditType == 2) { component = DetailsUpdateCategoryComponent } else if (item.auditType) { component = DetailsFileCategoryComponent } - this.getData(item).then(res => { + this.getData(item).then((res: any) => { + // console.log('res', res) item.getData = res + if (item.auditType == 1) { + item.getData.isYearlyCheckDefault = res.licenseType.isYearlyCheck + } const modal = this.modal.create({ nzContent: component, nzViewContainerRef: this.viewContainerRef, @@ -189,13 +198,16 @@ export class AuditIngComponent implements OnInit { let params = { id: item.itemId } this.http.get(url, { params }).subscribe((data: any) => { let auditLog = { rejectReason: item.rejectReason } - let organization = { displayName: item.organization? item.organization.displayName : "" } + let organization = { displayName: item.organization ? item.organization.displayName : "" } if (item.auditType == 1) { data.result.auditLog = auditLog data.result.organization = organization data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays } + if (item.auditType == 2 || item.auditType == 3) { + data.result.auditLogId = item.id + } resolve(data.result) }) }) diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.html b/src/app/pages/audit/audit-nav/audit-nav.component.html index 49f53ab..f339bf3 100644 --- a/src/app/pages/audit/audit-nav/audit-nav.component.html +++ b/src/app/pages/audit/audit-nav/audit-nav.component.html @@ -6,18 +6,17 @@
- - - - + + + + +
\ No newline at end of file diff --git a/src/app/pages/audit/audit-nav/audit-nav.component.ts b/src/app/pages/audit/audit-nav/audit-nav.component.ts index 08f23b6..fdee4fe 100644 --- a/src/app/pages/audit/audit-nav/audit-nav.component.ts +++ b/src/app/pages/audit/audit-nav/audit-nav.component.ts @@ -10,8 +10,8 @@ export class AuditNavComponent implements OnInit { constructor() { } - navList = ['审批', '历史纪录'] - selectedItem = '审批' + navList = ['经营类证照', '资产类证照','待办', '审批记录'] + selectedItem = '经营类证照' selectNav(item) { this.selectedItem = item } diff --git a/src/app/pages/audit/audit-record/audit-record.component.html b/src/app/pages/audit/audit-record/audit-record.component.html index 70597bf..f765342 100644 --- a/src/app/pages/audit/audit-record/audit-record.component.html +++ b/src/app/pages/audit/audit-record/audit-record.component.html @@ -14,9 +14,9 @@ - - - + + + @@ -91,10 +91,12 @@ 审批类型 审批信息 - 加油站名称 - 区域 + 省公司 - 提交时间 + 申请人 + 审批时间 + 审批人 审批状态 操作 @@ -106,12 +108,12 @@ 油站信息 - 更新类证照提醒时间 - 更新类证照 - 档案类证照 + 经营类证照提醒时间 + 经营类证照 + 资产类证照 - - + @@ -120,7 +122,9 @@ - {{item.committedTime | date:"yyyy/MM/dd HH:mm:ss"}} + {{item.creatorUser.name || ''}} + {{item.auditTime | date:"yyyy/MM/dd HH:mm:ss"}} + {{item.auditUser.name || ''}} {{item.auditStatusDesc}} 详情 diff --git a/src/app/pages/audit/audit-record/audit-record.component.ts b/src/app/pages/audit/audit-record/audit-record.component.ts index d74fe81..0d8a724 100644 --- a/src/app/pages/audit/audit-record/audit-record.component.ts +++ b/src/app/pages/audit/audit-record/audit-record.component.ts @@ -22,12 +22,13 @@ export class AuditRecordComponent implements OnInit { list = [] tableScrollHeight + resizeListener startdate enddate async ngOnInit(): Promise { this.tableScrollHeight = '100px' // 页面监听 - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { let tableHeader = this.element.nativeElement.querySelector(`.ant-table-header`).clientHeight this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - tableHeader - 30) + 'px' @@ -59,6 +60,9 @@ export class AuditRecordComponent implements OnInit { this.getRecordList() } + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } submitForm(): void { if (this.validateForm.value.datePicker[0].toLocaleDateString) { this.validateForm.value.datePicker[0] = this.validateForm.value.datePicker[0].toLocaleDateString() @@ -256,6 +260,9 @@ export class AuditRecordComponent implements OnInit { data.result.handleRemindDaysDefault = data.result.licenseType.handleRemindDays data.result.closingRemindDaysDefault = data.result.licenseType.closingRemindDays } + if (item.auditType == 2 || item.auditType == 3) { + data.result.auditLogId = item.id + } resolve(data.result) }) }) diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 27657a1..0781041 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -20,7 +20,7 @@ 预警记录
  • - 审批 + 证照管理
  • diff --git a/src/app/pages/license/file-category/details-file-category/details-file-category.component.html b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html index 44f6cc7..085f6bb 100644 --- a/src/app/pages/license/file-category/details-file-category/details-file-category.component.html +++ b/src/app/pages/license/file-category/details-file-category/details-file-category.component.html @@ -7,13 +7,13 @@
    -

    证件名称:   {{data.licenseTypeName}}

    +

    证照名称:   {{data.licenseTypeName}}

    有无证照:   不适用

    -

    证件图片:    +

    附件:    diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html index 85f86ac..f852a09 100644 --- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.html @@ -6,7 +6,7 @@

    -

    证件名称: {{data2.licenseTypeName || ''}}

    +

    证照名称: {{data2.licenseTypeName || ''}}

    @@ -31,12 +31,11 @@ - +
    - +
    @@ -44,8 +43,8 @@
    - - + +
    diff --git a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts index 9dd6a98..1d6cde1 100644 --- a/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts +++ b/src/app/pages/license/file-category/edit-file-category/edit-file-category.component.ts @@ -57,6 +57,7 @@ export class EditFileCategoryComponent implements OnInit { isLoadingSave: boolean = false uploadIndex: string filechange(e) { + this.isLoadingSave = true let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id let file = e.target.files[0] || null //获取上传的文件 this.openFileSelect(file, `stationPhotos/${oilStationId}/`) @@ -84,7 +85,7 @@ export class EditFileCategoryComponent implements OnInit { let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName; this.imageUrl = filePath this.data2.imageUrl = filePath - console.log('上传成功', filePath) + this.isLoadingSave = false resolve('success') }); }) @@ -100,7 +101,7 @@ export class EditFileCategoryComponent implements OnInit { let filePath = dataObj.filePath this.imageUrl = filePath this.data2.imageUrl = filePath - console.log('上传成功', filePath) + this.isLoadingSave = false }); } diff --git a/src/app/pages/license/file-category/file-category.component.html b/src/app/pages/license/file-category/file-category.component.html index 42fcd2c..8a20736 100644 --- a/src/app/pages/license/file-category/file-category.component.html +++ b/src/app/pages/license/file-category/file-category.component.html @@ -4,12 +4,12 @@ [nzShowPagination]="false" [nzScroll]="{ y:tableScrollHeight }" [nzNoResult]='null' nzTableLayout="fixed"> - - 证照名称 + + 证照名称 有无证照 - + + 审核状态 附件 操作 @@ -17,17 +17,17 @@ - {{item.licenseTypeName || ''}} + {{item.licenseTypeName || ''}} 不适用 - {{item.auditLog.auditStatusDesc || ''}} - --> + diff --git a/src/app/pages/license/file-category/file-category.component.ts b/src/app/pages/license/file-category/file-category.component.ts index 5f557ca..7088429 100644 --- a/src/app/pages/license/file-category/file-category.component.ts +++ b/src/app/pages/license/file-category/file-category.component.ts @@ -20,15 +20,22 @@ export class FileCategoryComponent implements OnInit { list = []; //tabelData tableScrollHeight + resizeListener ngOnInit(): void { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' // 页面监听 - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' }); this.getStationList() } + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } + + + //获取当前油站档案类证照 getStationList() { this.tableSpin = true @@ -120,22 +127,27 @@ export class FileCategoryComponent implements OnInit { this.message.create('warning', '请上传附件!'); return false; } - await new Promise(resolve => { - instance.data2.validatyType = Number(instance.validatyType) + if (instance.validatyType != '2' && !instance.data2.remark) { + this.message.create('warning', '请填写完整!'); + return false; + } + instance.data2.validatyType = Number(instance.validatyType) + if (!instance.isSubmit) { this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => { - if (!instance.isSubmit) { - resolve(data); - this.getStationList(); - this.message.create('success', '修改成功!'); - return true; - } else { //提交审核 + this.getStationList(); + this.message.create('success', '修改成功!'); + }) + return false; + } else { + await new Promise(resolve => { + this.http.post('/api/services/app/StationFileLicense/Create', instance.data2).subscribe((data: any) => { this.submitReview(data.result).then(res=>{ resolve(data); return true; }); - } + }) }) - }) + } //else } }); const instance = modal.getContentComponent(); diff --git a/src/app/pages/license/histories/histories.component.html b/src/app/pages/license/histories/histories.component.html index 3dcfc90..8037efe 100644 --- a/src/app/pages/license/histories/histories.component.html +++ b/src/app/pages/license/histories/histories.component.html @@ -5,10 +5,10 @@ - 证件名称 + 证照名称 - 证件编号 - 证件有效期 + 证照编号 + 证照有效期 有效期类型 办理类型 通知内容 @@ -32,7 +32,7 @@ {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}} - {{getHandleTypes(item.handleTypes)}} + {{getHandleTypes(item.licenseSnapshot.handleTypes)}} {{item.notificationContent | notificationContent}} diff --git a/src/app/pages/license/histories/histories.component.ts b/src/app/pages/license/histories/histories.component.ts index 9cbd2dd..a37dd35 100644 --- a/src/app/pages/license/histories/histories.component.ts +++ b/src/app/pages/license/histories/histories.component.ts @@ -19,17 +19,20 @@ export class HistoriesComponent implements OnInit { list = [] tableScrollHeight + resizeListener ngOnInit(): void { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' // 页面监听 - fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' }); this.getInform() } - + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } dispose() { console.log('处置') } diff --git a/src/app/pages/license/inform/inform.component.html b/src/app/pages/license/inform/inform.component.html index f77cf12..180fe05 100644 --- a/src/app/pages/license/inform/inform.component.html +++ b/src/app/pages/license/inform/inform.component.html @@ -5,10 +5,10 @@ - 证件名称 + 证照名称 - 证件编号 - 证件有效期 + 证照编号 + 证照有效期 有效期类型 办理类型 通知内容 @@ -29,10 +29,10 @@ 长期
    - {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays+'天' : '/'}} + {{item.licenseSnapshot.validityDays ? item.licenseSnapshot.validityDays +'天' : '/'}} - {{getHandleTypes(item.handleTypes)}} + {{getHandleTypes(item.licenseSnapshot.handleTypes)}} {{item.notificationContent | notificationContent}} diff --git a/src/app/pages/license/inform/inform.component.ts b/src/app/pages/license/inform/inform.component.ts index 41e6777..4008729 100644 --- a/src/app/pages/license/inform/inform.component.ts +++ b/src/app/pages/license/inform/inform.component.ts @@ -16,19 +16,21 @@ export class InformComponent implements OnInit { tableScrollHeight - fromEvent + resizeListener ngOnInit(): void { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' // 页面监听 - this.fromEvent = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { + this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => { this.tableScrollHeight = (document.getElementById('tablebox').clientHeight - 42) + 'px' }); this.getInform() } - + ngOnDestroy(): void { + this.resizeListener.unsubscribe() + } dispose() { diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.html b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html index 9dfca80..a9cbce2 100644 --- a/src/app/pages/license/update-category/details-update-category/details-update-category.component.html +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.html @@ -7,24 +7,37 @@
    -

    证件名称:   {{data.licenseTypeName || ''}}

    +

    证照名称:   {{data.licenseTypeName || ''}}

    -

    证件编号:   {{data.licenseCode || ''}}

    +

    证照编号:   {{data.licenseCode || ''}}

    -

    证件有效期:   {{data.validityStartTime | date:"yyyy/MM/dd"}} - {{data.validityEndTime | date:"yyyy/MM/dd"}}

    +

    证照效期:   {{data.isLongTerm ? '长期证照' : (data.validityEndTime | date:"yyyy/MM/dd")}}

    -

    办理类型:   {{getHandleTypes(data.handleTypes)}}

    +

    办理类型:   {{getHandleTypes(data.handleTypesDefault)}}

    -

    有效期类型:   {{data.validityDays || 0}}天

    +

    有效天数:    + + 长期 + + + {{data.validityDays ? data.validityDays+'天' : '/'}} + +

    -

    证件图片:    +

    附件:    - - + +

    +

    附件副本:    + + + +

    +

    审核记录 diff --git a/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts index 18de9d9..76ccfbb 100644 --- a/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts +++ b/src/app/pages/license/update-category/details-update-category/details-update-category.component.ts @@ -91,15 +91,15 @@ export class DetailsUpdateCategoryComponent implements OnInit { //查看文件 lookFile(item) { - if (!item.imageUrl) { + if (!item) { return } - if (this.getFileType(item.imageUrl) == 'word') { - let arr = item.imageUrl.split('.') + if (this.getFileType(item) == 'word') { + let arr = item.split('.') arr[arr.length - 1] = 'pdf' window.open(arr.join('.')) - } else if (this.getFileType(item.imageUrl) == 'pdf') { - window.open(item.imageUrl) + } else if (this.getFileType(item) == 'pdf') { + window.open(item) } else { this.message.create('warning', '暂不支持查看!'); } diff --git a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html index 4bbc24a..4323f8b 100644 --- a/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html +++ b/src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html @@ -6,20 +6,20 @@

    -

    证件名称: {{data2.licenseTypeName}}

    +

    证照名称: {{data2.licenseTypeName}}

    -

    证件编号*

    +

    证照编号*

    - + -

    证件有效期*

    +

    证照效期*