Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -10,7 +10,6 @@ import { Observable, Observer, of } from 'rxjs';
|
|||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { UsermanageService } from '../../../services/usercenter.service';
|
import { UsermanageService } from '../../../services/usercenter.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-car-add-driver',
|
selector: 'app-car-add-driver',
|
||||||
templateUrl: './add-driver.component.html',
|
templateUrl: './add-driver.component.html',
|
||||||
@ -38,12 +37,12 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
private modal: NzModalRef,
|
private modal: NzModalRef,
|
||||||
public service: UsermanageService,
|
public service: UsermanageService,
|
||||||
private envSrv: EAEnvironmentService,
|
private envSrv: EAEnvironmentService,
|
||||||
private eaCacheSrv: EACacheService,
|
private eaCacheSrv: EACacheService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.companyData = this.eaCacheSrv.get(cacheConf.env)
|
this.companyData = this.eaCacheSrv.get(cacheConf.env);
|
||||||
this.initSF()
|
this.initSF();
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
@ -52,7 +51,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
title: '司机信息(必填)',
|
title: '司机信息(必填)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '照片上传后会自动识别文字并填充下列内容栏'
|
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||||
},
|
},
|
||||||
@ -62,8 +61,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
format: 'mobile',
|
format: 'mobile',
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
ui: {
|
ui: {
|
||||||
widget: '',
|
widget: ''
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
showName: {
|
showName: {
|
||||||
title: '身份证照片',
|
title: '身份证照片',
|
||||||
@ -72,17 +71,17 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'textarea',
|
widget: 'textarea',
|
||||||
borderless: true,
|
borderless: true,
|
||||||
showRequired: true,
|
showRequired: true
|
||||||
},
|
},
|
||||||
default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写',
|
default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写'
|
||||||
},
|
},
|
||||||
tipsA: {
|
tipsA: {
|
||||||
title: '',
|
title: '',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
offsetControl: 6,
|
offsetControl: 6
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
certificatePhotoFrontWatermark: {
|
certificatePhotoFrontWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -98,15 +97,15 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card',
|
||||||
change: (args: any) => {
|
change: (args: any) => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
console.log(args.file.response.data.fullFilePath)
|
console.log(args.file.response.data.fullFilePath);
|
||||||
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
|
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
|
||||||
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
|
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -121,7 +120,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -130,8 +129,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
offsetControl: 6,
|
offsetControl: 6
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
certificatePhotoBackWatermark: {
|
certificatePhotoBackWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -147,14 +146,14 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过2M',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card',
|
||||||
change: (args: any) => {
|
change: (args: any) => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
|
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
|
||||||
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
|
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -169,7 +168,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -179,8 +178,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
maxLength: 32,
|
maxLength: 32,
|
||||||
ui: {
|
ui: {
|
||||||
widget: '',
|
widget: '',
|
||||||
placeholder: '请输入姓名',
|
placeholder: '请输入姓名'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
certificateNumber: {
|
certificateNumber: {
|
||||||
title: '身份证号',
|
title: '身份证号',
|
||||||
@ -192,9 +191,9 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
widget: '',
|
widget: '',
|
||||||
placeholder: '请输入法定代表人证件号',
|
placeholder: '请输入法定代表人证件号',
|
||||||
errors: {
|
errors: {
|
||||||
required: '请输入18位身份证号码',
|
required: '请输入18位身份证号码'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
bankCardNo: {
|
bankCardNo: {
|
||||||
title: '银行卡号',
|
title: '银行卡号',
|
||||||
@ -202,7 +201,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
maxLength: 18,
|
maxLength: 18,
|
||||||
ui: {
|
ui: {
|
||||||
widget: '',
|
widget: '',
|
||||||
placeholder: '请输入银行卡号',
|
placeholder: '请输入银行卡号'
|
||||||
// change: (val: any) =>{
|
// change: (val: any) =>{
|
||||||
// const value = val.replace(/\D/g,'')
|
// const value = val.replace(/\D/g,'')
|
||||||
// this.sf.setValue('/bankCardNo', value)
|
// this.sf.setValue('/bankCardNo', value)
|
||||||
@ -214,18 +213,12 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
title: '开户行',
|
title: '开户行',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: '',
|
widget: ''
|
||||||
},
|
},
|
||||||
default: ''
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
required: ['certificatePhotoFrontWatermark', 'certificatePhotoBackWatermark', 'name', 'certificateNumber', 'bankCardNo']
|
||||||
required: [
|
|
||||||
'certificatePhotoFrontWatermark',
|
|
||||||
'certificatePhotoBackWatermark',
|
|
||||||
'name',
|
|
||||||
'certificateNumber',
|
|
||||||
'bankCardNo'
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
this.schema1 = {
|
this.schema1 = {
|
||||||
properties: {
|
properties: {
|
||||||
@ -233,7 +226,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
title: '驾驶证信息(必填)',
|
title: '驾驶证信息(必填)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '照片上传后会自动识别文字并填充下列内容栏'
|
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||||
},
|
},
|
||||||
@ -250,17 +243,17 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '请上传驾驶证照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。',
|
descriptionI18n: '请上传驾驶证照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card',
|
||||||
change: (args: any) => {
|
change: (args: any) => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath
|
this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath;
|
||||||
this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0);
|
this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0);
|
||||||
} else {
|
} else {
|
||||||
this.detailData.userDriverLicenseDTO.certificatePhoto = ''
|
this.detailData.userDriverLicenseDTO.certificatePhoto = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -274,7 +267,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
observer.next(isLt4M);
|
observer.next(isLt4M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -283,8 +276,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
// widget: 'text',
|
// widget: 'text',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
// default: this.ar.snapshot.queryParams.licenseNo
|
// default: this.ar.snapshot.queryParams.licenseNo
|
||||||
},
|
},
|
||||||
driverModel: {
|
driverModel: {
|
||||||
@ -297,13 +290,13 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
placeholder: '请选择准驾车型',
|
placeholder: '请选择准驾车型',
|
||||||
asyncData: () =>
|
asyncData: () =>
|
||||||
this.service.request(this.service.$api_getDictValue, { dictKey: 'driverModel' }).pipe(
|
this.service.request(this.service.$api_getDictValue, { dictKey: 'driverModel' }).pipe(
|
||||||
map((data) => {
|
map(data => {
|
||||||
return data.map((m: any) => {
|
return data.map((m: any) => {
|
||||||
return { label: m.label, value: m.label };
|
return { label: m.label, value: m.label };
|
||||||
});
|
});
|
||||||
}),
|
})
|
||||||
),
|
)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
validStartTime: {
|
validStartTime: {
|
||||||
title: '有效期起',
|
title: '有效期起',
|
||||||
@ -313,10 +306,10 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
errors: {
|
errors: {
|
||||||
required: '请选择起始日期',
|
required: '请选择起始日期'
|
||||||
},
|
},
|
||||||
change: (i) => { },
|
change: i => {}
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
validEndTime: {
|
validEndTime: {
|
||||||
title: '有效期止',
|
title: '有效期止',
|
||||||
@ -326,10 +319,10 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
errors: {
|
errors: {
|
||||||
required: '请选择终止日期',
|
required: '请选择终止日期'
|
||||||
},
|
},
|
||||||
change: (i) => { },
|
change: i => {}
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
signingOrganization: {
|
signingOrganization: {
|
||||||
title: '签发机关',
|
title: '签发机关',
|
||||||
@ -337,17 +330,11 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
required: ['certificatePhotoWatermark', 'licenseNo', 'driverModel', 'validStartTime', 'validEndTime']
|
||||||
},
|
|
||||||
required: [
|
|
||||||
'certificatePhotoWatermark',
|
|
||||||
'licenseNo',
|
|
||||||
'driverModel',
|
|
||||||
'validStartTime',
|
|
||||||
'validEndTime',
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
this.schema2 = {
|
this.schema2 = {
|
||||||
properties: {
|
properties: {
|
||||||
@ -355,9 +342,9 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
title: '从业资格证(选填)',
|
title: '从业资格证(选填)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
default: '照片上传后会自动识别文字并填充下列内容栏',
|
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||||
},
|
},
|
||||||
certificatePhotoWatermark: {
|
certificatePhotoWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -368,22 +355,22 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||||
limit: 1,
|
limit: 1,
|
||||||
limitFileCount: 1,
|
limitFileCount: 1,
|
||||||
resReName: 'data.fullFileWatermarkPath',
|
resReName: 'data.fullFilePath',
|
||||||
urlReName: 'data.fullFileWatermarkPath',
|
urlReName: 'data.fullFilePath',
|
||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
listType: 'picture-card',
|
listType: 'picture-card',
|
||||||
change: (args: any) => {
|
change: (args: any) => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath
|
this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath;
|
||||||
this.checkQualificationCertificate(args.file.response.data.fullFilePath);
|
this.checkQualificationCertificate(args.file.response.data.fullFilePath);
|
||||||
} else {
|
} else {
|
||||||
this.detailData.userPracticeSeniorityDTO.certificatePhoto = ''
|
this.detailData.userPracticeSeniorityDTO.certificatePhoto = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -398,7 +385,7 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
previewFile: (file: NzUploadFile) => of()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
licenseNo: {
|
licenseNo: {
|
||||||
@ -407,8 +394,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
regionCode: {
|
regionCode: {
|
||||||
title: '签发省份',
|
title: '签发省份',
|
||||||
@ -416,8 +403,8 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
asyncData: () => this.getProvinceData(),
|
asyncData: () => this.getProvinceData()
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
validStartTime: {
|
validStartTime: {
|
||||||
title: '发证日期',
|
title: '发证日期',
|
||||||
@ -427,10 +414,10 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
errors: {
|
errors: {
|
||||||
required: '请选择起始日期',
|
required: '请选择起始日期'
|
||||||
},
|
},
|
||||||
change: (i) => { },
|
change: i => {}
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
validEndTime: {
|
validEndTime: {
|
||||||
title: '有效期止',
|
title: '有效期止',
|
||||||
@ -440,69 +427,67 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
errors: {
|
errors: {
|
||||||
required: '请选择终止日期',
|
required: '请选择终止日期'
|
||||||
},
|
},
|
||||||
change: (i) => { },
|
change: i => {}
|
||||||
} as SFDateWidgetSchema,
|
} as SFDateWidgetSchema
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
required: []
|
||||||
required: [
|
|
||||||
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 180,
|
spanLabelFixed: 180,
|
||||||
grid: { span: 24 },
|
grid: { span: 24 },
|
||||||
width: 700,
|
width: 700
|
||||||
},
|
},
|
||||||
$title1: {
|
$title1: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title2: {
|
$title2: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title3: {
|
$title3: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title4: {
|
$title4: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$enterpriseRegistrationTime: {
|
$enterpriseRegistrationTime: {
|
||||||
width: 680,
|
width: 680
|
||||||
},
|
},
|
||||||
$operatingEndTime: {
|
$operatingEndTime: {
|
||||||
grid: { span: 9 },
|
grid: { span: 9 }
|
||||||
},
|
},
|
||||||
$dateType: {
|
$dateType: {
|
||||||
grid: { span: 4 },
|
grid: { span: 4 }
|
||||||
},
|
},
|
||||||
$validEndTime: {
|
$validEndTime: {
|
||||||
grid: { span: 9 },
|
grid: { span: 9 }
|
||||||
},
|
},
|
||||||
$dateType01: {
|
$dateType01: {
|
||||||
grid: { span: 4 },
|
grid: { span: 4 }
|
||||||
},
|
},
|
||||||
$registrationCapital: {
|
$registrationCapital: {
|
||||||
grid: { span: 12 },
|
grid: { span: 12 }
|
||||||
},
|
},
|
||||||
$unit: {
|
$unit: {
|
||||||
spanLabelFixed: 20,
|
spanLabelFixed: 20,
|
||||||
grid: { span: 3 },
|
grid: { span: 3 }
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
getProvinceData() {
|
getProvinceData() {
|
||||||
return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
|
return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
|
||||||
map(res => {
|
map(res => {
|
||||||
const result: any = []
|
const result: any = [];
|
||||||
if (res) {
|
if (res) {
|
||||||
res.map((m: any) => {
|
res.map((m: any) => {
|
||||||
const item = { label: m.name, value: m.regionCode }
|
const item = { label: m.name, value: m.regionCode };
|
||||||
result.push(item)
|
result.push(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result
|
return result;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -510,9 +495,9 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||||
const params = {
|
const params = {
|
||||||
idCardUrl: imgurl,
|
idCardUrl: imgurl,
|
||||||
side,
|
side
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_checkIdCard, params).subscribe((res) => {
|
this.service.request(this.service.$api_checkIdCard, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (type === 0) {
|
if (type === 0) {
|
||||||
// 法定代表人身份证
|
// 法定代表人身份证
|
||||||
@ -528,11 +513,13 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
checkQualificationCertificate(imgurl: any) {
|
checkQualificationCertificate(imgurl: any) {
|
||||||
// 识别从业资格证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
// 识别从业资格证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||||
const params = {
|
const params = {
|
||||||
qualificationCertificateUrl: imgurl,
|
qualificationCertificateUrl: imgurl
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_recognizeQualificationCertificate, params).subscribe((res) => {
|
this.service.request(this.service.$api_recognizeQualificationCertificate, params).subscribe(res => {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
this.sf.setValue('/licenseNo', res.continuingEducationInfo);
|
this.sf2.setValue('/licenseNo', res.certificateNumber);
|
||||||
//this.sf.setValue('/validStartTime', res.continuingEducationInfo);
|
//this.sf.setValue('/validStartTime', res.continuingEducationInfo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -542,16 +529,16 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
// 识别身份证 参数side:0-正面、1-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||||
const params = {
|
const params = {
|
||||||
driverLicenseUrl: imgurl,
|
driverLicenseUrl: imgurl,
|
||||||
side,
|
side
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res) => {
|
this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (type === 0) {
|
if (type === 0) {
|
||||||
// 法定代表人身份证
|
// 法定代表人身份证
|
||||||
if (side === 'front') {
|
if (side === 'front') {
|
||||||
// 正面
|
// 正面
|
||||||
this.sf1.setValue('/licenseNo', res.number);
|
this.sf1.setValue('/licenseNo', res.number);
|
||||||
this.sf1.setValue('/driverModel', [(res.classType).toUpperCase()]);
|
this.sf1.setValue('/driverModel', [res.classType.toUpperCase()]);
|
||||||
this.sf1.setValue('/validStartTime', res.validFrom);
|
this.sf1.setValue('/validStartTime', res.validFrom);
|
||||||
this.sf1.setValue('/validEndTime', res.validTo);
|
this.sf1.setValue('/validEndTime', res.validTo);
|
||||||
this.sf1.setValue('/signingOrganization', res.issuingAuthority);
|
this.sf1.setValue('/signingOrganization', res.issuingAuthority);
|
||||||
@ -564,19 +551,19 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
this.modal.destroy();
|
this.modal.destroy();
|
||||||
}
|
}
|
||||||
showExample() {
|
showExample() {
|
||||||
this.showCardFlag = !this.showCardFlag
|
this.showCardFlag = !this.showCardFlag;
|
||||||
}
|
}
|
||||||
showJopExample() {
|
showJopExample() {
|
||||||
this.showJopFlag = !this.showJopFlag
|
this.showJopFlag = !this.showJopFlag;
|
||||||
}
|
}
|
||||||
submitForm() {
|
submitForm() {
|
||||||
const items: any = this.sf.value
|
const items: any = this.sf.value;
|
||||||
items.certificatePhotoFrontWatermark = this.sf.value?.certificatePhotoFrontWatermark.data.fullFilePath
|
items.certificatePhotoFrontWatermark = this.sf.value?.certificatePhotoFrontWatermark.data.fullFilePath;
|
||||||
items.certificatePhotoBackWatermark = this.sf.value?.certificatePhotoBackWatermark.data.fullFilePath
|
items.certificatePhotoBackWatermark = this.sf.value?.certificatePhotoBackWatermark.data.fullFilePath;
|
||||||
const items2: any = this.sf1.value
|
const items2: any = this.sf1.value;
|
||||||
items2.certificatePhotoWatermark = this.sf1.value?.certificatePhotoWatermark.data.fullFilePath
|
items2.certificatePhotoWatermark = this.sf1.value?.certificatePhotoWatermark.data.fullFilePath;
|
||||||
const items3: any = this.sf2.value
|
const items3: any = this.sf2.value;
|
||||||
items3.certificatePhotoWatermark = this.sf2.value?.certificatePhotoWatermark.data.fullFilePath
|
items3.certificatePhotoWatermark = this.sf2.value?.certificatePhotoWatermark.data.fullFilePath;
|
||||||
const params: any = {
|
const params: any = {
|
||||||
source: 2,
|
source: 2,
|
||||||
mobile: this.sf.value.mobile,
|
mobile: this.sf.value.mobile,
|
||||||
@ -585,22 +572,22 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
identityInfoDTO: {
|
identityInfoDTO: {
|
||||||
...items,
|
...items,
|
||||||
certificatePhotoFront: this.detailData.certificatePhotoFront,
|
certificatePhotoFront: this.detailData.certificatePhotoFront,
|
||||||
certificatePhotoBack: this.detailData.certificatePhotoBack,
|
certificatePhotoBack: this.detailData.certificatePhotoBack
|
||||||
},
|
},
|
||||||
userDriverLicenseDTO: {
|
userDriverLicenseDTO: {
|
||||||
...items2,
|
...items2,
|
||||||
certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto,
|
certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto
|
||||||
},
|
},
|
||||||
userPracticeSeniorityDTO: {
|
userPracticeSeniorityDTO: {
|
||||||
...items3,
|
...items3,
|
||||||
certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto,
|
certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
if (params.userPracticeSeniorityDTO.certificatePhoto === '' || params.userPracticeSeniorityDTO.certificatePhotoWatermark === '') {
|
if (params.userPracticeSeniorityDTO.certificatePhoto === '' || params.userPracticeSeniorityDTO.certificatePhotoWatermark === '') {
|
||||||
delete params.userPracticeSeniorityDTO.certificatePhotoWatermark
|
delete params.userPracticeSeniorityDTO.certificatePhotoWatermark;
|
||||||
delete params.userPracticeSeniorityDTO.certificatePhoto
|
delete params.userPracticeSeniorityDTO.certificatePhoto;
|
||||||
}
|
}
|
||||||
params.userDriverLicenseDTO.driverModel = params.userDriverLicenseDTO.driverModel.join(',')
|
params.userDriverLicenseDTO.driverModel = params.userDriverLicenseDTO.driverModel.join(',');
|
||||||
delete params.identityInfoDTO.showName;
|
delete params.identityInfoDTO.showName;
|
||||||
delete params.identityInfoDTO.titleA;
|
delete params.identityInfoDTO.titleA;
|
||||||
delete params.userDriverLicenseDTO.titleB;
|
delete params.userDriverLicenseDTO.titleB;
|
||||||
@ -608,13 +595,13 @@ export class CarSettleAddDriverComponent implements OnInit {
|
|||||||
delete params.userDriverLicenseDTO.tipsA;
|
delete params.userDriverLicenseDTO.tipsA;
|
||||||
delete params.userPracticeSeniorityDTO.tipsC;
|
delete params.userPracticeSeniorityDTO.tipsC;
|
||||||
if (JSON.stringify(params.userPracticeSeniorityDTO) === '{}') {
|
if (JSON.stringify(params.userPracticeSeniorityDTO) === '{}') {
|
||||||
params.userPracticeSeniorityDTO = null
|
params.userPracticeSeniorityDTO = null;
|
||||||
}
|
}
|
||||||
this.service.request(this.service.$api_driver_add, params).subscribe(res => {
|
this.service.request(this.service.$api_driver_add, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('添加成功')
|
this.service.msgSrv.success('添加成功');
|
||||||
this.modal.close(true)
|
this.modal.close(true);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user