Browse Source

[新增]经营类证照年检更新附件功能

beijing
邵佳豪 3 years ago
parent
commit
6f5e40a418
  1. 16
      src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html
  2. 30
      src/app/pages/license/update-category/details-update-category/details-update-category.component.html
  3. 92
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html
  4. 29
      src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts
  5. 28
      src/app/pages/license/update-category/update-category.component.html
  6. 11
      src/app/pages/license/update-category/update-category.component.ts
  7. 1
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts
  8. 6
      src/theme.less

16
src/app/pages/audit/audit-ing/audit-dispose/audit-dispose.component.html

@ -71,30 +71,30 @@
<div class="cutoffrule"></div>
<p>所属机构: &nbsp;&nbsp;{{data.getData.organizationName}}</p>
<div class="cutoffrule"></div>
<p>角色: &nbsp;&nbsp; <span style="margin-right: 8px;"
*ngFor="let item of role1">{{item}}</span></p>
<p>角色: &nbsp;&nbsp; <span style="margin-right: 8px;" *ngFor="let item of role1">{{item}}</span></p>
<div class="cutoffrule"></div>
<p>预警接收级别: &nbsp;&nbsp; <span style="margin-right: 8px;"
*ngFor="let item of role2">{{item}}</span></p>
<p>预警接收级别: &nbsp;&nbsp; <span style="margin-right: 8px;" *ngFor="let item of role2">{{item}}</span></p>
<div class="cutoffrule"></div>
<p>手机号: &nbsp;&nbsp;{{data.getData.phoneNumber}}</p>
</div>
<div class="cutoffrule"></div>
<p [hidden]="data.getData.imageUrl === undefined">附件: &nbsp;&nbsp;</p>
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'img'" [src]="data.getData.imageUrl"
(click)="viewImg(data.getData.imageUrl)">
<p [hidden]="data.getData.imageUrl === undefined">附件: &nbsp;&nbsp;
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'img'"
[src]="data.getData.imageUrl" (click)="viewImg(data.getData.imageUrl)">
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.imageUrl)">
<img *ngIf="data.getData.imageUrl && getFileType(data.getData.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.imageUrl)">
</p>
<div class="cutoffrule" [hidden]="data.getData.imageUrl === undefined"></div>
<p *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment">附件副本: &nbsp;&nbsp;</p>
<p *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment">附件副本: &nbsp;&nbsp;
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'img'"
[src]="data.getData.attachment" (click)="viewImg(data.getData.attachment)">
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.getData.attachment)">
<img *ngIf="data.getData.attachment && getFileType(data.getData.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.getData.attachment)">
</p>
<div class="cutoffrule" *ngIf="data.getData.hasAttachmentDefault && data.getData.attachment"></div>
<p>审批意见: </p>
<textarea style="background: #173350;height: 100px;width: 100%;border-radius: 0;border: 0;color: white;"

30
src/app/pages/license/update-category/details-update-category/details-update-category.component.html

@ -27,17 +27,35 @@
<!-- <p>是否年检: &nbsp;&nbsp;<span *ngIf="data.isYearlyCheck">是</span><span *ngIf="!data.isYearlyCheck">否</span></p>
<div class="cutoffrule"></div> -->
<p>附件: &nbsp;&nbsp;
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'img'" [src]="data.imageUrl" (click)="viewImg(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'img'" [src]="data.imageUrl"
(click)="viewImg(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.imageUrl)">
<img *ngIf="data.imageUrl && getFileType(data.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.imageUrl)">
</p>
<div class="cutoffrule"></div>
<p *ngIf="data.hasAttachmentDefault && data.attachment">附件副本: &nbsp;&nbsp;
<img *ngIf="data.attachment && getFileType(data.attachment) == 'img'" [src]="data.attachment" (click)="viewImg(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'img'" [src]="data.attachment"
(click)="viewImg(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.attachment)">
<img *ngIf="data.attachment && getFileType(data.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.attachment)">
</p>
<div class="cutoffrule" *ngIf="data.hasAttachmentDefault && data.attachment"></div>
<p *ngIf="data.yearlyCheckAttachment">年检更新附件: &nbsp;&nbsp;
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'img'"
[src]="data.yearlyCheckAttachment" (click)="viewImg(data.yearlyCheckAttachment)">
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data.yearlyCheckAttachment)">
<img *ngIf="data.yearlyCheckAttachment && getFileType(data.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data.yearlyCheckAttachment)">
</p>
<div *ngIf="data.yearlyCheckAttachment" class="cutoffrule"></div>
<p *ngIf="data.yearlyCheckDescription">年检更新说明: &nbsp;&nbsp;{{data.yearlyCheckDescription || ''}}</p>
<div *ngIf="data.yearlyCheckDescription" class="cutoffrule"></div>
<p class="recordP" style="margin-bottom: 32px">
<span>审核记录</span>
<span>

92
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.html

@ -14,7 +14,8 @@
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input nz-input type="text" formControlName="number" placeholder="请输入证照编号" [(ngModel)]="data2.licenseCode"/>
<input nz-input type="text" formControlName="number" placeholder="请输入证照编号"
[(ngModel)]="data2.licenseCode" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
@ -22,52 +23,105 @@
<p>证照效期<span style="color: red;">*</span></p>
<div class="validity">
<label nz-checkbox (ngModelChange)="validityChange($event)" [(ngModel)]="data2.isLongTerm" formControlName="isLongTerm">
<label nz-checkbox (ngModelChange)="validityChange($event)" [(ngModel)]="data2.isLongTerm"
formControlName="isLongTerm">
<span>长期</span>
</label>
<nz-date-picker *ngIf="data2.isLongTerm" nzPlaceHolder="请选择开始日期" [(ngModel)]="isLongTermTime" (ngModelChange)="onChange($event)" formControlName="isLongTermTime"></nz-date-picker>
<nz-range-picker *ngIf="!data2.isLongTerm" [(ngModel)]="isNoLongTermTime" (ngModelChange)="onChange($event)" formControlName="isNoLongTermTime"></nz-range-picker>
<nz-date-picker *ngIf="data2.isLongTerm" nzPlaceHolder="请选择开始日期" [(ngModel)]="isLongTermTime"
(ngModelChange)="onChange($event)" formControlName="isLongTermTime"></nz-date-picker>
<nz-range-picker *ngIf="!data2.isLongTerm" [(ngModel)]="isNoLongTermTime" (ngModelChange)="onChange($event)"
formControlName="isNoLongTermTime"></nz-range-picker>
</div>
<p>
<span style="margin-right: 12px;">有效期类型: {{data2.validityDays || 0}}天</span>
<!-- <span>是否年检: <span *ngIf="data2.isYearlyCheck">是</span><span *ngIf="!data2.isYearlyCheck">否</span></span> -->
</p>
<p>办理类型: &nbsp;&nbsp;{{getHandleTypes(data2.handleTypesDefault)}}</p>
<p>附件上传(图片格式、pdf格式、word格式)</p>
<p>附件上传(图片格式、pdf格式、word格式)</p>
<div class="uploadDivbox">
<div class="uploadDiv">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'img'" style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.imageUrl" (click)="viewImg(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'img'"
style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.imageUrl"
(click)="viewImg(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data2.imageUrl)">
<img *ngIf="data2.imageUrl && getFileType(data2.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.imageUrl)">
<input *ngIf="!data2.imageUrl" (change)="filechange($event,true)" class="fileinput" type="file" name="" id="">
<button *ngIf="!data2.imageUrl" nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload" nzTheme="outline"></i>上传附件</button>
<input *ngIf="!data2.imageUrl" (change)="filechange($event,0)" class="fileinput" type="file" name=""
id="">
<button *ngIf="!data2.imageUrl" nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>上传附件</button>
</div>
<div class="uploadDiv" *ngIf="data2.imageUrl" style="margin: 0 10px;">
<input (change)="filechange($event,true)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload" nzTheme="outline"></i>重新上传</button>
<input (change)="filechange($event,0)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>重新上传</button>
</div>
<div class="uploadDiv" *ngIf="data2.hasAttachmentDefault" style="margin: 0 10px;">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'img'" style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.attachment" (click)="viewImg(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'img'"
style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.attachment"
(click)="viewImg(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(data2.attachment)">
<img *ngIf="data2.attachment && getFileType(data2.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.attachment)">
<input *ngIf="!data2.attachment" (change)="filechange($event,false)" class="fileinput" type="file" name="" id="">
<input *ngIf="!data2.attachment" (change)="filechange($event,1)" class="fileinput" type="file" name=""
id="">
<button *ngIf="!data2.attachment" nz-button [nzLoading]="isLoadingSave">上传附件副本</button>
</div>
<div class="uploadDiv" *ngIf="data2.attachment && data2.hasAttachmentDefault">
<input (change)="filechange($event,false)" class="fileinput" type="file" name="" id="">
<input (change)="filechange($event,1)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave">重新上传副本</button>
</div>
</div>
<div *ngIf="data2.isYearlyCheck">
<p>
<nz-radio-group [(ngModel)]="data2.lastLicenseAuditType" (ngModelChange)="radioChange($event)"
formControlName="radioTypeForm">
<label nz-radio [nzValue]="0">基本信息</label>
<label nz-radio [nzValue]="1">年检更新</label>
</nz-radio-group>
</p>
<p *ngIf="data2.lastLicenseAuditType == 1">年检更新附件上传</p>
<div *ngIf="data2.lastLicenseAuditType == 1" class="uploadDivbox">
<div class="uploadDiv">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'img'"
style="width: 100%;height: 100%;cursor: pointer;" [src]="data2.yearlyCheckAttachment"
(click)="viewImg(data2.yearlyCheckAttachment)">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png"
(click)="lookFile(data2.yearlyCheckAttachment)">
<img *ngIf="data2.yearlyCheckAttachment && getFileType(data2.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(data2.yearlyCheckAttachment)">
<input *ngIf="!data2.yearlyCheckAttachment" (change)="filechange($event,2)" class="fileinput"
type="file" name="" id="">
<button *ngIf="!data2.yearlyCheckAttachment" nz-button [nzLoading]="isLoadingSave"><i nz-icon
nzType="upload" nzTheme="outline"></i>上传附件</button>
</div>
<div class="uploadDiv" *ngIf="data2.yearlyCheckAttachment" style="margin: 0 10px;">
<input (change)="filechange($event,2)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]="isLoadingSave"><i nz-icon nzType="upload"
nzTheme="outline"></i>重新上传</button>
</div>
</div>
<p *ngIf="data2.lastLicenseAuditType == 1">年检更新说明</p>
<div *ngIf="data2.lastLicenseAuditType == 1">
<textarea [(ngModel)]="data2.yearlyCheckDescription" formControlName="explain" nz-input
rows="2"></textarea>
</div>
</div>
<div class="btnbox">
<button nz-button type="submit" class="ok" (click)="submitReview()" [nzLoading]="isLoadingSave">提交审核</button>
<button nz-button type="submit" class="ok" (click)="submitReview()"
[nzLoading]="isLoadingSave">提交审核</button>
<button nz-button type="submit" class="ok" (click)="ok()" [nzLoading]="isLoadingSave">保存</button>
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div>

29
src/app/pages/license/update-category/edit-update-category/edit-update-category.component.ts

@ -27,8 +27,10 @@ export class EditUpdateCategoryComponent implements OnInit {
this.validateForm = this.fb.group({
number: [null, [Validators.required]],
isLongTerm: [null, [Validators.required]],
isLongTermTime: [null,],
isNoLongTermTime: [null,],
isLongTermTime: [null],
isNoLongTermTime: [null],
radioTypeForm: [null],
explain: [null]
});
// 日期
this.data2 = JSON.parse(JSON.stringify(this.data))
@ -48,8 +50,15 @@ export class EditUpdateCategoryComponent implements OnInit {
}
console.log(this.data2)
console.log(typeof(this.data2.lastLicenseAuditType))
}
radioChange($event) {
this.data2.LastLicenseAuditType = $event
}
imageUrl = '/api/Objects/sinochemweb/stationPhotos/175/timg.jpg'
destroyModal() {
@ -149,10 +158,10 @@ export class EditUpdateCategoryComponent implements OnInit {
}
uploadType: boolean; //是否是上传副本
uploadType: number; //是否是上传副本
isLoadingSave: boolean = false
uploadIndex: string
filechange(e, type: boolean) {
filechange(e, type: number) {
this.uploadType = type
this.isLoadingSave = true
let oilStationId = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id
@ -180,10 +189,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile(this.postFilePath, file).subscribe(data => {
let dataObj = data as any;
let filePath: string = ObjectsSimpleService.baseUrl + dataObj.objectName;
if (this.uploadType){
if (this.uploadType === 0) {
this.data2.imageUrl = filePath
} else {
} else if (this.uploadType === 1) {
this.data2.attachment = filePath
} else if (this.uploadType === 2) {
this.data2.yearlyCheckAttachment = filePath
}
this.isLoadingSave = false
resolve('success')
@ -199,10 +210,12 @@ export class EditUpdateCategoryComponent implements OnInit {
this.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => {
let dataObj = value as any;
let filePath = dataObj.filePath
if (this.uploadType){
if (this.uploadType === 0) {
this.data2.imageUrl = filePath
} else {
} else if (this.uploadType === 1) {
this.data2.attachment = filePath
} else if (this.uploadType === 2) {
this.data2.yearlyCheckAttachment = filePath
}
this.isLoadingSave = false
});

28
src/app/pages/license/update-category/update-category.component.html

@ -48,13 +48,29 @@
<span *ngIf="item.licenseViolationType == 3">逾期报警</span>
</td>
<td>
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl" (click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'img'" [src]="item.imageUrl"
(click)="viewImg(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(item.imageUrl)">
<img *ngIf="item.imageUrl && getFileType(item.imageUrl) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.imageUrl)">
<label *ngIf="item.attachment && item.hasAttachmentDefault" style="margin-left: 10px;">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'img'" [src]="item.attachment" (click)="viewImg(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'word'" src="../../../../assets/images/license/word.png" (click)="lookFile(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'pdf'" src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'img'"
[src]="item.attachment" (click)="viewImg(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'word'"
src="../../../../assets/images/license/word.png" (click)="lookFile(item.attachment)">
<img *ngIf="item.attachment && getFileType(item.attachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png" (click)="lookFile(item.attachment)">
</label>
<label *ngIf="item.yearlyCheckAttachment" style="margin-left: 10px;">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'img'"
[src]="item.yearlyCheckAttachment" (click)="viewImg(item.yearlyCheckAttachment)">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'word'"
src="../../../../assets/images/license/word.png"
(click)="lookFile(item.yearlyCheckAttachment)">
<img *ngIf="item.yearlyCheckAttachment && getFileType(item.yearlyCheckAttachment) == 'pdf'"
src="../../../../assets/images/license/pdf.png"
(click)="lookFile(item.yearlyCheckAttachment)">
</label>
</td>
<td class="operation">

11
src/app/pages/license/update-category/update-category.component.ts

@ -162,6 +162,12 @@ export class UpdateCategoryComponent implements OnInit {
let newUrl = window.location.protocol + '//' + window.location.host + body.attachment
body.attachment = newUrl
}
if (body.lastLicenseAuditType == 0) {
body.yearlyCheckAttachment = null
body.yearlyCheckDescription = null
}
if (!instance.isSubmit) {
this.http.post('/api/services/app/StationValidityLicense/Create', body).subscribe((data: any) => {
this.getStationList();
@ -221,7 +227,10 @@ export class UpdateCategoryComponent implements OnInit {
return
}
return new Promise((resolve, reject) => {
let params = { id: item.id }
let params: any = {
id: item.id,
type: item.lastLicenseAuditType
}
this.http.post('/api/services/app/StationValidityLicense/Commit', {}, { params }).subscribe(data => {
this.message.create('success', '提交审核成功!');
this.getStationList();

1
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DomSanitizer } from '@angular/platform-browser';
import { Console } from 'console';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
@Component({

6
src/theme.less

@ -288,7 +288,6 @@
#detailsfilecategory {
nz-form-item {
margin-bottom: 0;
input,
select {
color: rgba(145, 204, 255, 0.95) !important;
@ -297,11 +296,12 @@
nz-date-picker,
nz-range-picker,
nz-select {
nz-select,
textarea {
background-color: #143c61;
}
nz-select {
nz-select,textarea {
color: rgba(145, 204, 255, 0.95) !important;
}

Loading…
Cancel
Save