edit
This commit is contained in:
@ -14,6 +14,7 @@ import { VehicleService } from '../../../services/vehicle.service';
|
||||
import { EADateUtil } from '@shared';
|
||||
import { VehicleImgViewComponent } from '../../list/img-view/img-view.component';
|
||||
import { VehicleComponentsListEditComponent } from '../../list/edit/edit.component';
|
||||
import { NzImageService } from 'ng-zorro-antd/image';
|
||||
|
||||
@Component({
|
||||
selector: 'app-Vehicle-components-Audit-detail',
|
||||
@ -25,7 +26,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
@ViewChild('redectModal', { static: false }) redectModal!: any;
|
||||
columns!: STColumn[];
|
||||
detailData: any = this.initData();
|
||||
tempalateData :any;
|
||||
tempalateData: any;
|
||||
contenCarNoColor: any;
|
||||
contencarModel: any;
|
||||
contenCarLength: any;
|
||||
@ -33,21 +34,26 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
approvalOpinion = '';
|
||||
uploadURl = apiConf.waterFileUpload;
|
||||
disabledUpload = false;
|
||||
constructor(public service: VehicleService, private route: ActivatedRoute, private nzModalService: NzModalService, private modal: ModalHelper,) {}
|
||||
constructor(
|
||||
public service: VehicleService,
|
||||
private route: ActivatedRoute,
|
||||
private nzModalService: NzModalService,
|
||||
private modal: ModalHelper,
|
||||
private nzImageService: NzImageService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.getSelectList();
|
||||
console.log(this.route.snapshot.params)
|
||||
this.getDetailList();
|
||||
this.initST();
|
||||
}
|
||||
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '司机姓名', index: 'name', className: 'text-center' },
|
||||
{ title: '司机手机号', index: 'mobile', className: 'text-center' },
|
||||
{ title: '身份证号', index: 'idCardNo', className: 'text-center' },
|
||||
{ title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
|
||||
{ title: '司机姓名', index: 'name', className: 'text-center' },
|
||||
{ title: '司机手机号', index: 'mobile', className: 'text-center' },
|
||||
{ title: '身份证号', index: 'idCardNo', className: 'text-center' },
|
||||
{ title: '挂靠协议', render: 'auditStatusEnum', className: 'text-center' },
|
||||
{
|
||||
title: '车主申明/挂靠协议',
|
||||
fixed: 'right',
|
||||
@ -56,21 +62,20 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '查看协议',
|
||||
click: (_record) => this.viewEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20,
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == 10 || item.auditStatusEnum == 20
|
||||
},
|
||||
{
|
||||
text: '上传协议',
|
||||
click: (_record) => this.updateEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == -1,
|
||||
},
|
||||
click: _record => this.updateEvaluate(_record),
|
||||
iif: item => item.auditStatusEnum == -1
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
getDetailList() {
|
||||
console.log(this.route.snapshot.queryParams.carId);
|
||||
const params = {
|
||||
id: this.route.snapshot?.params?.id
|
||||
};
|
||||
@ -88,7 +93,7 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
this.adjuctUser(
|
||||
{
|
||||
approvalStatus: 20,
|
||||
id: this.route.snapshot?.params?.id,
|
||||
id: this.route.snapshot?.params?.id
|
||||
},
|
||||
'审核成功'
|
||||
);
|
||||
@ -125,23 +130,21 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
|
||||
save() {
|
||||
this.isEdit = false;
|
||||
this.detailData.driverLicenseRegisterTime = EADateUtil.yearToDate(this.detailData?.driverLicenseRegisterTime)
|
||||
this.detailData.driverLicenseRegisterTime = EADateUtil.yearToDate(this.detailData?.driverLicenseRegisterTime);
|
||||
|
||||
this.detailData.driverLicenseEndTime = EADateUtil.yearToDate(this.detailData?.driverLicenseEndTime)
|
||||
this.detailData.driverLicenseEndTime = EADateUtil.yearToDate(this.detailData?.driverLicenseEndTime);
|
||||
|
||||
this.detailData.driverLicenseGetTime = EADateUtil.yearToDate(this.detailData?.driverLicenseGetTime)
|
||||
this.detailData.driverLicenseGetTime = EADateUtil.yearToDate(this.detailData?.driverLicenseGetTime);
|
||||
|
||||
this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime)
|
||||
this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime);
|
||||
|
||||
this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime)
|
||||
console.log(this.detailData)
|
||||
this.service.request(this.service.$api_get_update_audit, this.detailData).subscribe((res)=>{
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.getDetailList()
|
||||
this.service.msgSrv.success('修改成功!')
|
||||
this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime);
|
||||
this.service.request(this.service.$api_get_update_audit, this.detailData).subscribe(res => {
|
||||
if (res) {
|
||||
this.getDetailList();
|
||||
this.service.msgSrv.success('修改成功!');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
ratify() {
|
||||
@ -149,7 +152,6 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
}
|
||||
|
||||
changeUpload({ file, fileList, type }: any, key: string) {
|
||||
console.log({ file, fileList, type });
|
||||
if (type === 'success') {
|
||||
this.detailData[key] = file.response.data.fullFileWatermarkPath;
|
||||
}
|
||||
@ -158,18 +160,19 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
}
|
||||
/**
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
return { id: this.route.snapshot.queryParams.carId };
|
||||
}
|
||||
get reqParams() {
|
||||
return { id: this.route.snapshot.queryParams.carId };
|
||||
}
|
||||
showImg(url: any) {
|
||||
const params = {
|
||||
imgList: [url],
|
||||
index: 0
|
||||
};
|
||||
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
|
||||
this.nzImageService.preview([{ src: url }]);
|
||||
// this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
|
||||
}
|
||||
|
||||
deleteImg(key: string) {
|
||||
@ -218,38 +221,39 @@ export class VehicleComponentsAuditDetailComponent implements OnInit {
|
||||
carFrontPhotoWatermark: ''
|
||||
};
|
||||
}
|
||||
// 获取录单员
|
||||
getSelectList() {
|
||||
this.Serveice("car:color")
|
||||
this.Serveice("car:model")
|
||||
this.Serveice("car:length")
|
||||
}
|
||||
Serveice(param :any) {
|
||||
let value: any;
|
||||
this.service.request(`${this.service.$api_get_getDictValue}`,
|
||||
{
|
||||
// 获取录单员
|
||||
getSelectList() {
|
||||
this.Serveice('car:color');
|
||||
this.Serveice('car:model');
|
||||
this.Serveice('car:length');
|
||||
}
|
||||
Serveice(param: any) {
|
||||
let value: any;
|
||||
this.service
|
||||
.request(`${this.service.$api_get_getDictValue}`, {
|
||||
dictKey: param
|
||||
}).subscribe((res) => {
|
||||
if(param === 'car:color') {
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (param === 'car:color') {
|
||||
this.contenCarNoColor = res;
|
||||
} else if(param === 'car:model') {
|
||||
} else if (param === 'car:model') {
|
||||
this.contencarModel = res;
|
||||
} else if(param === 'car:length') {
|
||||
} else if (param === 'car:length') {
|
||||
this.contenCarLength = res;
|
||||
}
|
||||
})
|
||||
return value;
|
||||
}
|
||||
viewEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleImgViewComponent, { i: item } ).subscribe((i) => {
|
||||
this.st.reload();
|
||||
this.getDetailList()
|
||||
});
|
||||
}
|
||||
updateEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe((i) => {
|
||||
this.st.reload();
|
||||
this.getDetailList()
|
||||
});
|
||||
}
|
||||
return value;
|
||||
}
|
||||
viewEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleImgViewComponent, { i: item }).subscribe(i => {
|
||||
this.st.reload();
|
||||
this.getDetailList();
|
||||
});
|
||||
}
|
||||
updateEvaluate(item: any) {
|
||||
this.modal.createStatic(VehicleComponentsListEditComponent, { i: item }).subscribe(i => {
|
||||
this.st.reload();
|
||||
this.getDetailList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user