edit
This commit is contained in:
		| @ -233,11 +233,11 @@ | ||||
|     </sv-container> | ||||
|  | ||||
|     <sv-container class="new-sv-container" labelWidth="140" col="3"> | ||||
|       <sv label="核定载质量(吨)"> | ||||
|       <sv label="核定载质量(kg)"> | ||||
|         <input nz-input type="text" [(ngModel)]="detailData.carLoad" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|           [placeholder]="isEdit ? '' : '-'" /> | ||||
|       </sv> | ||||
|       <sv label="整备质量"> | ||||
|       <sv label="整备质量(kg)"> | ||||
|         <input nz-input type="text" [(ngModel)]="detailData.curbWeight" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|           [placeholder]="isEdit ? '' : '-'" /> | ||||
|       </sv> | ||||
| @ -246,7 +246,7 @@ | ||||
|           [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''"> | ||||
|         </nz-date-picker> | ||||
|       </sv> | ||||
|       <sv label="总质量"> | ||||
|       <sv label="总质量(kg)"> | ||||
|         <input nz-input type="text" [(ngModel)]="detailData.carTotalLoad" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|           [placeholder]="isEdit ? '' : '-'" /> | ||||
|       </sv> | ||||
|  | ||||
| @ -101,6 +101,15 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy | ||||
|       id: this.route.snapshot?.params?.id | ||||
|     }; | ||||
|     this.service.request(`${this.service.$api_get_operate_getaudit}`, params).subscribe(res => { | ||||
|       if (res.curbWeight) { | ||||
|         res.curbWeight = res.curbWeight * 1000; | ||||
|       } | ||||
|       if (res.carTotalLoad) { | ||||
|         res.carTotalLoad = res.carTotalLoad * 1000; | ||||
|       } | ||||
|       if (res.carLoad) { | ||||
|         res.carLoad = res.carLoad * 1000; | ||||
|       } | ||||
|       this.detailData = res; | ||||
|       this.tempalateData = res; | ||||
|     }); | ||||
| @ -157,7 +166,9 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy | ||||
|     this.detailData.driverLicenseEndTime = EADateUtil.yearToDate(this.detailData?.driverLicenseEndTime); | ||||
|  | ||||
|     this.detailData.driverLicenseGetTime = EADateUtil.yearToDateTime(this.detailData?.driverLicenseGetTime); | ||||
|     this.detailData.scrapTime = this.dateTimePickerUtil.format(this.detailData?.scrapTime, 'yyyy-MM-dd HH:mm:ss'); | ||||
|     if (this.detailData.scrapTime) { | ||||
|       this.detailData.scrapTime = this.dateTimePickerUtil.format(this.detailData?.scrapTime, 'yyyy-MM-dd HH:mm:ss'); | ||||
|     } | ||||
|  | ||||
|     this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime); | ||||
|  | ||||
| @ -170,7 +181,19 @@ export class VehicleComponentsAuditDetailComponent implements OnInit, OnDestroy | ||||
|       this.service.msgSrv.error('发证日期起始不能大于结束日期!'); | ||||
|       return; | ||||
|     } | ||||
|     this.service.request(this.service.$api_get_update_audit, this.detailData).subscribe(res => { | ||||
|  | ||||
|     const params = { ...this.detailData }; | ||||
|     if (params.curbWeight) { | ||||
|       params.curbWeight = params.curbWeight / 1000; | ||||
|     } | ||||
|     if (params.carTotalLoad) { | ||||
|       params.carTotalLoad = params.carTotalLoad / 1000; | ||||
|     } | ||||
|     if (params.carLoad) { | ||||
|       params.carLoad = params.carLoad / 1000; | ||||
|     } | ||||
|  | ||||
|     this.service.request(this.service.$api_get_update_audit, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.getDetailList(); | ||||
|         this.isEdit = false; | ||||
|  | ||||
| @ -274,11 +274,11 @@ | ||||
|       </sv-container> | ||||
|  | ||||
|       <sv-container col="3"> | ||||
|         <sv label="核定载质量(吨)"> | ||||
|         <sv label="核定载质量(kg)"> | ||||
|           <input nz-input type="text" [(ngModel)]="detailData.carLoad" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|             [placeholder]="isEdit ? '' : '-'" /> | ||||
|         </sv> | ||||
|         <sv label="整备质量"> | ||||
|         <sv label="整备质量(kg)"> | ||||
|           <input nz-input type="text" [(ngModel)]="detailData.curbWeight" [readonly]="!isEdit" [nzBorderless]="!isEdit" | ||||
|             [placeholder]="isEdit ? '' : '-'" /> | ||||
|         </sv> | ||||
| @ -287,7 +287,7 @@ | ||||
|             [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit ? 'calendar' : ''"> | ||||
|           </nz-date-picker> | ||||
|         </sv> | ||||
|         <sv label="总质量"> | ||||
|         <sv label="总质量(kg)"> | ||||
|           <input nz-input type="text" [(ngModel)]="detailData.carTotalLoad" [readonly]="!isEdit" | ||||
|             [nzBorderless]="!isEdit" [placeholder]="isEdit ? '' : '-'" /> | ||||
|         </sv> | ||||
|  | ||||
| @ -185,6 +185,15 @@ export class VehicleComponentsListDetailComponent implements OnInit { | ||||
|       id: this.route.snapshot?.params?.id | ||||
|     }; | ||||
|     this.service.request(`${this.service.$api_get_operate_get}`, params).subscribe(res => { | ||||
|       if (res.curbWeight) { | ||||
|         res.curbWeight = res.curbWeight * 1000; | ||||
|       } | ||||
|       if (res.carTotalLoad) { | ||||
|         res.carTotalLoad = res.carTotalLoad * 1000; | ||||
|       } | ||||
|       if (res.carLoad) { | ||||
|         res.carLoad = res.carLoad * 1000; | ||||
|       } | ||||
|       this.detailData = res; | ||||
|       this.tempalateData = res; | ||||
|     }); | ||||
| @ -267,8 +276,9 @@ export class VehicleComponentsListDetailComponent implements OnInit { | ||||
|     this.detailData.driverLicenseEndTime = EADateUtil.yearToDate(this.detailData?.driverLicenseEndTime); | ||||
|  | ||||
|     this.detailData.driverLicenseGetTime = EADateUtil.yearToDate(this.detailData?.driverLicenseGetTime); | ||||
|  | ||||
|     this.detailData.scrapTime = this.dateTimePickerUtil.format(this.detailData?.scrapTime, 'yyyy-MM-dd HH:mm:ss'); | ||||
|     if (this.detailData.scrapTime) { | ||||
|       this.detailData.scrapTime = this.dateTimePickerUtil.format(this.detailData?.scrapTime, 'yyyy-MM-dd HH:mm:ss'); | ||||
|     } | ||||
|  | ||||
|     this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime); | ||||
|  | ||||
| @ -280,8 +290,19 @@ export class VehicleComponentsListDetailComponent implements OnInit { | ||||
|       this.service.msgSrv.error('发证日期起始不能大于结束日期!'); | ||||
|       return; | ||||
|     } | ||||
|     this.service.request(this.service.$api_get_update, this.detailData).subscribe(res => { | ||||
|       console.log(res); | ||||
|  | ||||
|     const params = { ...this.detailData }; | ||||
|     if (params.curbWeight) { | ||||
|       params.curbWeight = params.curbWeight / 1000; | ||||
|     } | ||||
|     if (params.carTotalLoad) { | ||||
|       params.carTotalLoad = params.carTotalLoad / 1000; | ||||
|     } | ||||
|     if (params.carLoad) { | ||||
|       params.carLoad = params.carLoad / 1000; | ||||
|     } | ||||
|  | ||||
|     this.service.request(this.service.$api_get_update, params).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.getDetailList(); | ||||
|         this.isEdit = false; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user