Browse Source

[修改]修改消防设施字段;修改油站信息保存

dev
邵佳豪 3 years ago
parent
commit
ebe624ef7d
  1. 16
      src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
  2. 16
      src/app/pages/criminal-records/criminal-records.component.ts
  3. 16
      src/app/pages/equipment-info/addequipment/addequipment.component.html
  4. 8
      src/app/pages/equipment-info/addequipment/addequipment.component.ts
  5. 20
      src/app/pages/equipment-info/editequipment/editequipment.component.html
  6. 8
      src/app/pages/equipment-info/editequipment/editequipment.component.ts
  7. 16
      src/app/pages/equipment-info/equipment-info.component.ts
  8. 16
      src/app/pages/home-page/home-page.component.ts
  9. 16
      src/app/pages/home/home.component.ts
  10. 153
      src/app/pages/oil-station-info/oil-station-info.component.html
  11. 127
      src/app/pages/oil-station-info/oil-station-info.component.scss
  12. 31
      src/app/pages/oil-station-info/oil-station-info.component.ts
  13. 16
      src/app/pages/today-warning-admin/today-warning-admin.component.ts
  14. 16
      src/app/pages/today-warning/today-warning.component.ts
  15. 26
      src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html
  16. 8
      src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts
  17. 16
      src/app/pages/warning-statistics-list/warning-statistics-list.component.ts

16
src/app/pages/criminal-records-admin/criminal-records-admin.component.ts

@ -612,10 +612,10 @@ export class CriminalRecordsAdminComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'),
isScrapped: true,
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
@ -639,10 +639,10 @@ export class CriminalRecordsAdminComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

16
src/app/pages/criminal-records/criminal-records.component.ts

@ -557,10 +557,10 @@ export class CriminalRecordsComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'),
isScrapped: true,
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
@ -583,10 +583,10 @@ export class CriminalRecordsComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

16
src/app/pages/equipment-info/addequipment/addequipment.component.html

@ -14,30 +14,30 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>规格</p>
<p>存放地点</p>
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input nz-input type="text" formControlName="specification" placeholder="请输入规格" />
<input nz-input type="text" formControlName="storageLocation" placeholder="请输入存放地点" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>购入日期</p>
<p>生产日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker formControlName="buytime" nzPlaceHolder="请输入购入日期"></nz-date-picker>
<nz-date-picker formControlName="productionDate" nzPlaceHolder="请输入生产日期"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<p>生产日期</p>
<p>下次维保日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker formControlName="prodtime" nzPlaceHolder="请输入生产日期"></nz-date-picker>
<nz-date-picker formControlName="maintenanceDate" nzPlaceHolder="请输入下次维保日期"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<p>有效期至</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker formControlName="validitytime" nzPlaceHolder="有效期至"></nz-date-picker>
<nz-date-picker formControlName="validityEndTime" nzPlaceHolder="有效期至"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<div class="btnbox">
@ -45,4 +45,4 @@
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div>
</form>
</div>
</div>

8
src/app/pages/equipment-info/addequipment/addequipment.component.ts

@ -15,10 +15,10 @@ export class AddequipmentComponent implements OnInit {
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
specification: [null, [Validators.required]],
buytime: [null, [Validators.required]],
prodtime: [null, [Validators.required]],
validitytime: [null, [Validators.required]]
storageLocation: [null, [Validators.required]],
productionDate: [null, [Validators.required]],
maintenanceDate: [null, [Validators.required]],
validityEndTime: [null, [Validators.required]]
});
}

20
src/app/pages/equipment-info/editequipment/editequipment.component.html

@ -14,30 +14,34 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>规格</p>
<p>存放地点</p>
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input [(ngModel)]="data2.specification" nz-input type="text" formControlName="specification" placeholder="请输入规格" />
<input [(ngModel)]="data2.storageLocation" nz-input type="text" formControlName="storageLocation"
placeholder="请输入存放地点" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>购入日期</p>
<p>生产日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker [(ngModel)]="data2.purchaseDate" formControlName="buytime" nzPlaceHolder="请输入购入日期"></nz-date-picker>
<nz-date-picker [(ngModel)]="data2.productionDate" formControlName="productionDate" nzPlaceHolder="请输入生产日期">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<p>生产日期</p>
<p>下次维保日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker [(ngModel)]="data2.productionDate" formControlName="prodtime" nzPlaceHolder="请输入生产日期"></nz-date-picker>
<nz-date-picker [(ngModel)]="data2.maintenanceDate" formControlName="maintenanceDate" nzPlaceHolder="请输入下次维保日期">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<p>有效期至</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker [(ngModel)]="data2.validityEndTime" formControlName="validitytime" nzPlaceHolder="有效期至"></nz-date-picker>
<nz-date-picker [(ngModel)]="data2.validityEndTime" formControlName="validityEndTime" nzPlaceHolder="有效期至">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<div class="btnbox">
@ -45,4 +49,4 @@
<button nz-button type="button" class="cancel" (click)="destroyModal()">取消</button>
</div>
</form>
</div>
</div>

8
src/app/pages/equipment-info/editequipment/editequipment.component.ts

@ -19,10 +19,10 @@ export class EditequipmentComponent implements OnInit {
ngOnInit(): void {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
specification: [null, [Validators.required]],
buytime: [null, [Validators.required]],
prodtime: [null, [Validators.required]],
validitytime: [null, [Validators.required]]
storageLocation: [null, [Validators.required]],
productionDate: [null, [Validators.required]],
maintenanceDate: [null, [Validators.required]],
validityEndTime: [null, [Validators.required]]
});
this.data2 = JSON.parse(JSON.stringify(this.data))
}

16
src/app/pages/equipment-info/equipment-info.component.ts

@ -73,10 +73,10 @@ export class EquipmentInfoComponent implements OnInit {
await new Promise(resolve => {
let body = {
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id
}
this.http.post('/api/services/app/FireEquipment/Create', body).subscribe(data => {
@ -118,10 +118,10 @@ export class EquipmentInfoComponent implements OnInit {
let body = {
id: item.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe(data => {

16
src/app/pages/home-page/home-page.component.ts

@ -698,10 +698,10 @@ export class HomePageComponent implements OnInit {
isScrapped: true,
organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD')
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD')
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
let body = {
@ -723,10 +723,10 @@ export class HomePageComponent implements OnInit {
let body = {
id: copydata.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

16
src/app/pages/home/home.component.ts

@ -151,10 +151,10 @@ export class HomeComponent implements OnInit {
isScrapped: true,
organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD')
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD')
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {
let body = {
@ -183,10 +183,10 @@ export class HomeComponent implements OnInit {
let body = {
id: copydata.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: copydata.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

153
src/app/pages/oil-station-info/oil-station-info.component.html

@ -304,7 +304,90 @@
<tr *ngFor="let item of httpBody.licenses;let key = index">
<td class="head" [title]="item.name">{{item.name}}</td>
<td colspan="3" class="imgbox">
<div class="timeDiv">
<div class="timeDivflex">
<div class="itemname">
证件编号:<span style="color: red;">*</span>
</div>
<nz-form-item title="证件编号">
<nz-form-control>
<nz-input-group>
<input style="border: 1px solid #91CCFF" [ngModelOptions]="{standalone: true}"
placeholder="请输入证件编号" [(ngModel)]="item.code" nz-input type="text" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex">
<div class="itemname">
证照有效期:<span style="color: red;">*</span>
</div>
<label style="color: white;" [ngModelOptions]="{standalone: true}" nz-checkbox
[(ngModel)]="item.isPerpetual" (ngModelChange)="perpetualChange(item,$event)">是否为长期证照</label>
<nz-form-item style="border: 1px solid #91CCFF" title="证照有效期开始时间">
<nz-form-control>
<nz-date-picker required [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'开始时间'"
[(ngModel)]="item.startTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="证照有效期结束时间" *ngIf="!item.isPerpetual">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'结束时间'"
[(ngModel)]="item.endTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex">
<div class="itemname">
证照提醒时间:<span style="color: red;">*</span>
</div>
<nz-form-item style="border: 1px solid #91CCFF" title="证照到期第一次提醒时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'一次提醒时间'"
[(ngModel)]="item.firstWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="证照到期第二次提醒时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'二次提醒时间'"
[(ngModel)]="item.secondWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex">
<div class="itemname">
证照年检时间:<span style="color: red;">*</span>
</div>
<label style="color: white;" [ngModelOptions]="{standalone: true}" nz-checkbox
[(ngModel)]="item.hasAnnualInspection">是否年检</label>
<nz-form-item style="border: 1px solid #91CCFF" title="年检时间" *ngIf="item.hasAnnualInspection">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检时间'"
[(ngModel)]="item.annualInspectionTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="年检提醒时间" *ngIf="item.hasAnnualInspection">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检提醒时间'"
[(ngModel)]="item.annualInspectionWarnTime" (ngModelChange)="onChange($event)">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item title="年检机构" *ngIf="item.hasAnnualInspection">
<nz-form-control>
<nz-input-group>
<input style="border: 1px solid #91CCFF" [ngModelOptions]="{standalone: true}"
placeholder="年检机构" [(ngModel)]="item.annualInspectionOrganizationName" nz-input
type="text" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div class="uploadDivbox">
<div class="itemname">
证照图片:
</div>
<div class="uploadDiv">
<img *ngIf="item.imageUrl" style="width: 100%;height: 100%;" [src]="item.imageUrl" alt="">
<input *ngIf="!item.imageUrl" (change)="filechange($event,key)" class="fileinput" type="file"
@ -316,82 +399,12 @@
<input (change)="filechange($event,key)" class="fileinput" type="file" name="" id="">
<button nz-button [nzLoading]=""><i nz-icon nzType="upload" nzTheme="outline"></i>重新上传</button>
</div>
<div class="timeDiv" style="width: 500px;">
<div class="timeDivflex" style="margin-bottom: 6px;">
<nz-form-item title="证件编号">
<nz-form-control>
<nz-input-group>
<input style="border: 1px solid #91CCFF" [ngModelOptions]="{standalone: true}"
placeholder="证件编号" [(ngModel)]="item.code" nz-input
type="text" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex">
<nz-form-item style="border: 1px solid #91CCFF" title="证照有效期开始时间">
<nz-form-control>
<nz-date-picker required [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'开始时间'"
[(ngModel)]="item.startTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="证照有效期结束时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'结束时间'"
[(ngModel)]="item.endTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex" style="margin: 6px 0;">
<nz-form-item style="border: 1px solid #91CCFF" title="证照到期第一次提醒时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'一次提醒时间'"
[(ngModel)]="item.firstWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="证照到期第二次提醒时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'二次提醒时间'"
[(ngModel)]="item.secondWarnTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div class="timeDivflex" style="margin-bottom: 6px;">
<label style="color: white;" [ngModelOptions]="{standalone: true}" nz-checkbox
[(ngModel)]="item.hasAnnualInspection">是否年检</label>
</div>
<div class="timeDivflex timeDivflex2" *ngIf="item.hasAnnualInspection">
<nz-form-item style="border: 1px solid #91CCFF" title="年检时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检时间'"
[(ngModel)]="item.annualInspectionTime" (ngModelChange)="onChange($event)"></nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item style="border: 1px solid #91CCFF" title="年检提醒时间">
<nz-form-control>
<nz-date-picker [ngModelOptions]="{standalone: true}" [nzPlaceHolder]="'年检提醒时间'"
[(ngModel)]="item.annualInspectionWarnTime" (ngModelChange)="onChange($event)">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<nz-form-item title="年检机构">
<nz-form-control>
<nz-input-group>
<input style="border: 1px solid #91CCFF" [ngModelOptions]="{standalone: true}"
placeholder="年检机构" [(ngModel)]="item.annualInspectionOrganizationName" nz-input
type="text" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</div>
</div>
</div>
<a class="deleteTr" nz-popconfirm nzPopconfirmTitle="确定删除该证照吗?" nzPopconfirmPlacement="bottom"
(nzOnConfirm)="deleteTrConfirm(key)">
<i *ngIf="item.name != '营业执照' && item.name != '危险化学品' && item.name != '成品油零售'" nz-icon nzType="close"
nzTheme="outline"></i>
</a>
</td>
</tr>
<tr style="height: 50px;">

127
src/app/pages/oil-station-info/oil-station-info.component.scss

@ -89,91 +89,92 @@
}
.imgtable {
tr,
td {
height: 200px;
}
width: 100%;
text-align: center;
border-collapse: collapse;
.imgbox {
width: 100%;
height: 100%;
position: relative;
.deleteTr{
position: absolute;
right: 5px;
top: 5px;
cursor: pointer;
}
.uploadDivbox {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 16px;
display: flex;
align-items: center;
position: relative;
}
.uploadDiv {
margin-left: 16px;
width: 120px;
height: 80px;
// border: 1px solid red;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.fileinput {
width: 114px;
height: 32px;
position: absolute;
z-index: 100;
opacity: 0;
top: 23px;
cursor: pointer;
}
button {
z-index: 99;
width: 114px;
height: 32px;
background: rgba(0, 129, 255, 0.3);
border: 1px solid #36A2FF;
opacity: 1;
border-radius: 0px;
color: #91CCFF;
}
}
display: flex;
flex-direction: column;
.timeDiv {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-around;
.timeDivflex {
width: 100%;
height: 34px;
display: flex;
align-items: center;
margin: 5px 0;
nz-form-item {
width: 45%;
width: 20%;
margin-right: 15px;
}
}
.timeDivflex2 {
}
.uploadDivbox {
width: 100%;
height: 80px;
display: flex;
align-items: center;
position: relative;
margin: 5px 0;
.uploadDiv {
width: 120px;
height: 80px;
display: flex;
align-items: center;
nz-form-item {
width: 30%;
margin-right: 9px;
justify-content: center;
position: relative;
.fileinput {
width: 114px;
height: 32px;
position: absolute;
z-index: 100;
opacity: 0;
top: 23px;
cursor: pointer;
}
button {
z-index: 99;
width: 114px;
height: 32px;
background: rgba(0, 129, 255, 0.3);
border: 1px solid #36A2FF;
opacity: 1;
border-radius: 0px;
color: #91CCFF;
}
}
}
.itemname {
width: 120px;
text-align: right;
box-sizing: border-box;
padding-right: 12px;
}
.deleteTr {
position: absolute;
right: 5px;
top: 5px;
cursor: pointer;
}
}
}
}

31
src/app/pages/oil-station-info/oil-station-info.component.ts

@ -94,10 +94,19 @@ export class OilStationInfoComponent implements OnInit {
}
if (this.httpBody.licenses.length == 0) {
this.httpBody.licenses = [
{ name: '营业执照', code: '', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 1, hasAnnualInspection: true },
{ name: '危险化学品', code: '', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 3, hasAnnualInspection: false },
{ name: '成品油零售', code: '', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 2, hasAnnualInspection: true }
{ name: '营业执照', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 1, hasAnnualInspection: true },
{ name: '危险化学品', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 3, hasAnnualInspection: false },
{ name: '成品油零售', code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: 2, hasAnnualInspection: true }
]
} else {
console.log('走这里了',this.httpBody.licenses)
this.httpBody.licenses.forEach(item => {
if (item.endTime == '9999-01-01T00:00:00') {
item.isPerpetual = true
} else {
item.isPerpetual = false
}
})
}
this.httpBody.stationType ? this.httpBody.stationType = String(this.httpBody.stationType) : null
setTimeout(() => {
@ -179,6 +188,13 @@ export class OilStationInfoComponent implements OnInit {
licenses: [
]
}
perpetualChange(item, $event) {
if ($event) {
item.endTime = '9999-01-01'
}
}
onChange($event) {
}
@ -204,7 +220,7 @@ export class OilStationInfoComponent implements OnInit {
}
addTr() {
this.httpBody.licenses.push(
{ name: this.addName, code: '', startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: -1, hasAnnualInspection: false },
{ name: this.addName, code: '', isPerpetual: false, startTime: '', endTime: '', firstWarnTime: '', secondWarnTime: '', imageUrl: '', annualInspectionTime: '', annualInspectionWarnTime: '', annualInspectionOrganizationName: '', type: -1, hasAnnualInspection: false },
)
}
deleteTrConfirm(key) {
@ -247,10 +263,15 @@ export class OilStationInfoComponent implements OnInit {
body.stationType
body.govUnitDetail = JSON.stringify(this.httpBody.govUnitDetail)
console.log(body)
body.licenses.forEach(item => {
delete item.isPerpetual
})
this.http.put('/api/services/app/GasStation/Update', body).subscribe((data: any) => {
this.isLoadingSave = false
this.message.create('success', '保存成功!');
this.httpBody.licenses = data.result.licenses
// this.httpBody.licenses = data.result.licenses
}, err => {
this.isLoadingSave = false
this.message.create('error', '保存失败!');

16
src/app/pages/today-warning-admin/today-warning-admin.component.ts

@ -229,10 +229,10 @@ export class TodayWarningAdminComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'),
isScrapped: true,
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
@ -256,10 +256,10 @@ export class TodayWarningAdminComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

16
src/app/pages/today-warning/today-warning.component.ts

@ -176,10 +176,10 @@ export class TodayWarningComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'),
isScrapped: true,
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
@ -203,10 +203,10 @@ export class TodayWarningComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

26
src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html

@ -17,9 +17,9 @@
<span *ngIf="isScraped == '维保'" style="color: green;">处置方式:维保<br></span>
<span *ngIf="isScraped == '报废'" style="color: red;">处置方式:报废<br></span>
<span>处置时间:{{data2.handleTime | date:"yyyy-MM-dd HH:mm:ss"}}<br></span>
<span>规格:{{newdata.specification}}<br></span>
<span>购入时间:{{newdata.purchaseDate | date:"yyyy-MM-dd"}}<br></span>
<span>生产时间:{{newdata.productionDate | date:"yyyy-MM-dd"}}<br></span>
<span>存放地点:{{newdata.storageLocation}}<br></span>
<span>生产日期:{{newdata.productionDate | date:"yyyy-MM-dd"}}<br></span>
<span>下次维保日期:{{newdata.maintenanceDate | date:"yyyy-MM-dd"}}<br></span>
<span>有效期至:{{newdata.validityEndTime | date:"yyyy-MM-dd"}}</span>
</p>
<form nz-form [formGroup]="validateForm" class="form">
@ -33,28 +33,28 @@
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>规格</p>
<p>存放地点</p>
<nz-form-item>
<nz-form-control>
<nz-input-group>
<input [(ngModel)]="data2.violatedItemSnapshotObj.specification" nz-input type="text"
formControlName="specification" placeholder="请输入规格" />
<input [(ngModel)]="data2.violatedItemSnapshotObj.storageLocation" nz-input type="text"
formControlName="storageLocation" placeholder="请输入存放地点" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
<p>购入日期</p>
<p>生产日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker [nzAllowClear]="false" [(ngModel)]="data2.violatedItemSnapshotObj.purchaseDate"
formControlName="buytime" nzPlaceHolder="请输入购入日期">
<nz-date-picker [nzAllowClear]="false" [(ngModel)]="data2.violatedItemSnapshotObj.productionDate"
formControlName="prodtime" nzPlaceHolder="请输入生产日期">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
<p>生产日期</p>
<p>下次维保日期</p>
<nz-form-item>
<nz-form-control>
<nz-date-picker [nzAllowClear]="false" [(ngModel)]="data2.violatedItemSnapshotObj.productionDate"
formControlName="prodtime" nzPlaceHolder="请输入生产日期">
<nz-date-picker [nzAllowClear]="false" [(ngModel)]="data2.violatedItemSnapshotObj.maintenanceDate"
formControlName="maintenanceDate" nzPlaceHolder="请输入下次维保日期">
</nz-date-picker>
</nz-form-control>
</nz-form-item>
@ -62,7 +62,7 @@
<nz-form-item>
<nz-form-control>
<nz-date-picker [nzAllowClear]="false" [(ngModel)]="data2.violatedItemSnapshotObj.validityEndTime"
formControlName="validitytime" nzPlaceHolder="有效期至">
formControlName="validityEndTime" nzPlaceHolder="有效期至">
</nz-date-picker>
</nz-form-control>
</nz-form-item>

8
src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts

@ -42,10 +42,10 @@ export class DisposeequipmentComponent implements OnInit {
this.validateForm = this.fb.group({
name: [null, [Validators.required]],
specification: [null, [Validators.required]],
buytime: [null, [Validators.required]],
prodtime: [null, [Validators.required]],
validitytime: [null, [Validators.required]]
storageLocation: [null, [Validators.required]],
productionDate: [null, [Validators.required]],
maintenanceDate: [null, [Validators.required]],
validityEndTime: [null, [Validators.required]]
});

16
src/app/pages/warning-statistics-list/warning-statistics-list.component.ts

@ -663,10 +663,10 @@ export class WarningStatisticsListComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.copydata2.violatedItemSnapshotObj.name,
specification: instance.copydata2.violatedItemSnapshotObj.specification,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.copydata2.violatedItemSnapshotObj.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.copydata2.violatedItemSnapshotObj.storageLocation,
productionDate: moment(instance.copydata2.violatedItemSnapshotObj.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.copydata2.violatedItemSnapshotObj.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.copydata2.violatedItemSnapshotObj.validityEndTime).format('yyyy-MM-DD'),
isScrapped: true,
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
@ -690,10 +690,10 @@ export class WarningStatisticsListComponent implements OnInit {
let body = {
id: item.violatedItemSnapshotObj.id,
name: instance.validateForm.value.name,
specification: instance.validateForm.value.specification,
productionDate: moment(instance.validateForm.value.prodtime).format('yyyy-MM-DD'),
purchaseDate: moment(instance.validateForm.value.buytime).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validitytime).format('yyyy-MM-DD'),
storageLocation: instance.validateForm.value.storageLocation,
productionDate: moment(instance.validateForm.value.productionDate).format('yyyy-MM-DD'),
maintenanceDate: moment(instance.validateForm.value.maintenanceDate).format('yyyy-MM-DD'),
validityEndTime: moment(instance.validateForm.value.validityEndTime).format('yyyy-MM-DD'),
organizationUnitId: item.violatedItemSnapshotObj.organizationUnitId
}
this.http.put('/api/services/app/FireEquipment/Update', body).subscribe((data: any) => {

Loading…
Cancel
Save