车辆对接
This commit is contained in:
@ -453,18 +453,18 @@ export class CarAddDriverComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
getProvinceData() {
|
||||
// return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
|
||||
// map(res => {
|
||||
// const result: any = []
|
||||
// if (res) {
|
||||
// res.map((m: any) => {
|
||||
// const item = { label: m.name, value: m.regionCode }
|
||||
// result.push(item)
|
||||
// });
|
||||
// }
|
||||
// return result
|
||||
// })
|
||||
// );
|
||||
return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
|
||||
map((res: any) => {
|
||||
const result: any = []
|
||||
if (res) {
|
||||
res.map((m: any) => {
|
||||
const item = { label: m.name, value: m.regionCode }
|
||||
result.push(item)
|
||||
});
|
||||
}
|
||||
return result
|
||||
})
|
||||
);
|
||||
}
|
||||
checkIdCard(imgurl: any, side: any, type: any) {
|
||||
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||
@ -472,18 +472,18 @@ export class CarAddDriverComponent implements OnInit {
|
||||
idCardUrl: imgurl,
|
||||
side,
|
||||
};
|
||||
// this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// if (type === 0) {
|
||||
// // 法定代表人身份证
|
||||
// if (side === 'front') {
|
||||
// // 正面
|
||||
// this.sf.setValue('/name', res.name);
|
||||
// this.sf.setValue('/certificateNumber', res.number);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_checkIdCard, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
if (type === 0) {
|
||||
// 法定代表人身份证
|
||||
if (side === 'front') {
|
||||
// 正面
|
||||
this.sf.setValue('/name', res.name);
|
||||
this.sf.setValue('/certificateNumber', res.number);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
checkDriverCard(imgurl: any, side: any, type: any) {
|
||||
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||
@ -491,21 +491,21 @@ export class CarAddDriverComponent implements OnInit {
|
||||
driverLicenseUrl: imgurl,
|
||||
side,
|
||||
};
|
||||
// this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// if (type === 0) {
|
||||
// // 法定代表人身份证
|
||||
// if (side === 'front') {
|
||||
// // 正面
|
||||
// this.sf1.setValue('/licenseNo', res.number);
|
||||
// this.sf1.setValue('/driverModel', res.number);
|
||||
// this.sf1.setValue('/validStartTime', res.validFrom);
|
||||
// this.sf1.setValue('/validEndTime', res.validTo);
|
||||
// this.sf1.setValue('/signingOrganization', res.issuingAuthority);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
if (type === 0) {
|
||||
// 法定代表人身份证
|
||||
if (side === 'front') {
|
||||
// 正面
|
||||
this.sf1.setValue('/licenseNo', res.number);
|
||||
this.sf1.setValue('/driverModel', res.number);
|
||||
this.sf1.setValue('/validStartTime', res.validFrom);
|
||||
this.sf1.setValue('/validEndTime', res.validTo);
|
||||
this.sf1.setValue('/signingOrganization', res.issuingAuthority);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
@ -546,11 +546,11 @@ export class CarAddDriverComponent implements OnInit {
|
||||
delete params.userDriverLicenseDTO.tipsA;
|
||||
delete params.userPracticeSeniorityDTO.tipsC;
|
||||
delete params.showName
|
||||
// this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe(res => {
|
||||
// if(res){
|
||||
// this.service.msgSrv.success('添加成功')
|
||||
// this.close()
|
||||
// }
|
||||
// })
|
||||
this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe((res: any) => {
|
||||
if(res){
|
||||
this.service.msgSrv.success('添加成功')
|
||||
this.modal.close(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user