fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-03-14 14:17:38
|
* @Date : 2022-03-14 14:17:38
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-25 16:22:32
|
* @LastEditTime : 2022-04-27 19:39:30
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\carauth\\carauth.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\carauth\\carauth.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -38,6 +38,9 @@
|
|||||||
<ng-template sf-template="agreeImg" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="agreeImg" let-me let-ui="ui" let-schema="schema">
|
||||||
<img height="104" src="/assets/images/vehicle/agreement.png" class="borderImg" />
|
<img height="104" src="/assets/images/vehicle/agreement.png" class="borderImg" />
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
<div #aaa style="position: absolute; top: 87.5%; left: 21%; opacity: 0; ">
|
||||||
|
<div style="color: #0c77e7;" (click)='view()'>点击查看行政区域代码</div>
|
||||||
|
</div>
|
||||||
</sf>
|
</sf>
|
||||||
<img class="drivercard borderImg" height="104" src="/assets/images/vehicle/car.png" />
|
<img class="drivercard borderImg" height="104" src="/assets/images/vehicle/car.png" />
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Placeholder } from '@angular/compiler/src/i18n/i18n_ast';
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { apiConf } from '@conf/api.conf';
|
import { apiConf } from '@conf/api.conf';
|
||||||
import { cacheConf } from '@conf/cache.conf';
|
import { cacheConf } from '@conf/cache.conf';
|
||||||
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
|
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema, SFTextWidgetSchema } from '@delon/form';
|
||||||
import { _HttpClient } from '@delon/theme';
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { EACacheService, EAEnvironmentService } from '@shared';
|
import { EACacheService, EAEnvironmentService } from '@shared';
|
||||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||||
@ -17,6 +17,7 @@ import { VehicleService } from '../../../services/vehicle.service';
|
|||||||
})
|
})
|
||||||
export class CarSettleCarauthComponent implements OnInit {
|
export class CarSettleCarauthComponent implements OnInit {
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
@ViewChild('aaa', { static: false }) aaa!:any;
|
||||||
record: any = {};
|
record: any = {};
|
||||||
i: any;
|
i: any;
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
@ -25,39 +26,39 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
showJopFlag = false;
|
showJopFlag = false;
|
||||||
companyData: any = {};
|
companyData: any = {};
|
||||||
detailData: any = {};
|
detailData: any = {};
|
||||||
carNo = ''
|
carNo = '';
|
||||||
private titles = `
|
private titles = `
|
||||||
根据监管要求:总质量 4.5 吨及以下普通货 运车辆的,可填车籍地 6 位行政<div style="col: red">区域代码</div> 000000。
|
根据监管要求:总质量 4.5 吨及以下普通货 运车辆的,可填车籍地 6 位行政区域代码+000000。
|
||||||
`
|
`;
|
||||||
constructor(
|
constructor(
|
||||||
private modal: NzModalRef,
|
private modal: NzModalRef,
|
||||||
public service: VehicleService,
|
public service: VehicleService,
|
||||||
private envSrv: EAEnvironmentService,
|
private envSrv: EAEnvironmentService,
|
||||||
private eaCacheSrv: EACacheService,
|
private eaCacheSrv: EACacheService
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initData()
|
this.initData();
|
||||||
this.initSF()
|
this.initSF();
|
||||||
}
|
}
|
||||||
initData() {
|
initData() {
|
||||||
if (this.i.id) {
|
if (this.i.id) {
|
||||||
this.companyData = this.eaCacheSrv.get(cacheConf.env)
|
this.companyData = this.eaCacheSrv.get(cacheConf.env);
|
||||||
const params = {
|
const params = {
|
||||||
id: this.i.id,
|
id: this.i.id
|
||||||
}
|
};
|
||||||
this.service.request(this.service.$api_shipperCarGet, params).subscribe(res => {
|
this.service.request(this.service.$api_shipperCarGet, params).subscribe(res => {
|
||||||
this.detailData = res
|
this.detailData = res;
|
||||||
this.detailData.isSelf = res.isSelf ? 1 : 0
|
this.detailData.isSelf = res.isSelf ? 1 : 0;
|
||||||
this.detailData.isTrailer = res.isTrailer ? 1 : 0
|
this.detailData.isTrailer = res.isTrailer ? 1 : 0;
|
||||||
this.detailData.carFrontPhotoWatermark = [
|
this.detailData.carFrontPhotoWatermark = [
|
||||||
{
|
{
|
||||||
uid: -1,
|
uid: -1,
|
||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: this.detailData.carFrontPhotoWatermark,
|
url: this.detailData.carFrontPhotoWatermark,
|
||||||
response: this.detailData.carFrontPhotoWatermark,
|
response: this.detailData.carFrontPhotoWatermark
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.detailData.carProtocalWatermark = [
|
this.detailData.carProtocalWatermark = [
|
||||||
{
|
{
|
||||||
@ -65,8 +66,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: this.detailData.carProtocalWatermark,
|
url: this.detailData.carProtocalWatermark,
|
||||||
response: this.detailData.carProtocalWatermark,
|
response: this.detailData.carProtocalWatermark
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.detailData.certificatePhotoFrontWatermark = [
|
this.detailData.certificatePhotoFrontWatermark = [
|
||||||
{
|
{
|
||||||
@ -74,8 +75,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: this.detailData.certificatePhotoFrontWatermark,
|
url: this.detailData.certificatePhotoFrontWatermark,
|
||||||
response: this.detailData.certificatePhotoFrontWatermark,
|
response: this.detailData.certificatePhotoFrontWatermark
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.detailData.certificatePhotoBackWatermark = [
|
this.detailData.certificatePhotoBackWatermark = [
|
||||||
{
|
{
|
||||||
@ -83,8 +84,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: this.detailData.certificatePhotoBackWatermark,
|
url: this.detailData.certificatePhotoBackWatermark,
|
||||||
response: this.detailData.certificatePhotoBackWatermark,
|
response: this.detailData.certificatePhotoBackWatermark
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.detailData.roadTransportPhotoWatermark = [
|
this.detailData.roadTransportPhotoWatermark = [
|
||||||
{
|
{
|
||||||
@ -92,10 +93,10 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
name: 'LOGO',
|
name: 'LOGO',
|
||||||
status: 'done',
|
status: 'done',
|
||||||
url: this.detailData.roadTransportPhotoWatermark,
|
url: this.detailData.roadTransportPhotoWatermark,
|
||||||
response: this.detailData.roadTransportPhotoWatermark,
|
response: this.detailData.roadTransportPhotoWatermark
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
@ -114,7 +115,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。',
|
descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
@ -129,9 +130,9 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath,
|
||||||
response: {
|
response: {
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.sf?.setValue('/carFrontPhotoWatermark', avatar);
|
this.sf?.setValue('/carFrontPhotoWatermark', avatar);
|
||||||
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath;
|
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath;
|
||||||
@ -146,12 +147,12 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
observer.complete();
|
observer.complete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(_fileList)
|
console.log(_fileList);
|
||||||
|
|
||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(
|
// previewFile: (file: NzUploadFile) => of(
|
||||||
// file?.response?.data?.fullFilePath
|
// file?.response?.data?.fullFilePath
|
||||||
// ),
|
// ),
|
||||||
@ -162,8 +163,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
maxLength: 9,
|
maxLength: 9,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carNoColor: {
|
carNoColor: {
|
||||||
title: '车牌颜色',
|
title: '车牌颜色',
|
||||||
@ -172,16 +173,16 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
params: { dictKey: 'car:color' },
|
params: { dictKey: 'car:color' },
|
||||||
placeholder: '请选择车牌颜色',
|
placeholder: '请选择车牌颜色',
|
||||||
containsAllLabel:false,
|
containsAllLabel: false
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
carModel: {
|
carModel: {
|
||||||
title: '车型',
|
title: '车型',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder:'请上传行驶证自动带出'
|
placeholder: '请上传行驶证自动带出'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carEnergyType: {
|
carEnergyType: {
|
||||||
title: '车辆能源类型',
|
title: '车辆能源类型',
|
||||||
@ -190,8 +191,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
params: { dictKey: 'car:energy:type' },
|
params: { dictKey: 'car:energy:type' },
|
||||||
placeholder: '请选择车辆能源类型',
|
placeholder: '请选择车辆能源类型',
|
||||||
containsAllLabel:false,
|
containsAllLabel: false
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carLength: {
|
carLength: {
|
||||||
title: '车长',
|
title: '车长',
|
||||||
@ -200,8 +201,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'dict-select',
|
widget: 'dict-select',
|
||||||
params: { dictKey: 'car:length' },
|
params: { dictKey: 'car:length' },
|
||||||
placeholder: '请选择车长',
|
placeholder: '请选择车长',
|
||||||
containsAllLabel:false,
|
containsAllLabel: false
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
carLoad: {
|
carLoad: {
|
||||||
title: '核定载质量',
|
title: '核定载质量',
|
||||||
@ -210,10 +211,10 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
addOnAfter: '吨',
|
addOnAfter: '吨',
|
||||||
change: (val: any) =>{
|
change: (val: any) => {
|
||||||
const value = val.replace(/\D/g,'')
|
const value = val.replace(/\D/g, '');
|
||||||
this.sf.setValue('/carLoad', value)
|
this.sf.setValue('/carLoad', value);
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isSelf: {
|
isSelf: {
|
||||||
@ -221,11 +222,11 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '否', value: 0 },
|
{ label: '否', value: 0 },
|
||||||
{ label: '是', value: 1 },
|
{ label: '是', value: 1 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isTrailer: {
|
isTrailer: {
|
||||||
@ -233,11 +234,11 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '否', value: 0 },
|
{ label: '否', value: 0 },
|
||||||
{ label: '是', value: 1 },
|
{ label: '是', value: 1 }
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carProtocalWatermark: {
|
carProtocalWatermark: {
|
||||||
@ -253,7 +254,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。',
|
descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
@ -267,12 +268,12 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath,
|
||||||
response: {
|
response: {
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.sf?.setValue('/carProtocalWatermark', avatar);
|
this.sf?.setValue('/carProtocalWatermark', avatar);
|
||||||
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
|
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -287,7 +288,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
previewFile: (file: NzUploadFile) => of(file.url),
|
previewFile: (file: NzUploadFile) => of(file.url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
agreeImg: {
|
agreeImg: {
|
||||||
@ -295,24 +296,24 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
// enum: [{ label: '长期', value: true }],
|
// enum: [{ label: '长期', value: true }],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
titleA: {
|
titleA: {
|
||||||
title: '行驶证信息(必填)',
|
title: '行驶证信息(必填)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
},
|
},
|
||||||
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',
|
||||||
@ -327,7 +328,7 @@ export class CarSettleCarauthComponent 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,
|
||||||
@ -341,15 +342,15 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath,
|
||||||
response: {
|
response: {
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
|
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
|
||||||
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
|
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
|
||||||
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
|
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
|
||||||
} else {
|
} else {
|
||||||
this.detailData.certificatePhotoFront = ''
|
this.detailData.certificatePhotoFront = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -363,7 +364,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -372,8 +373,8 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom',
|
||||||
offsetControl: 6,
|
offsetControl: 6
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
certificatePhotoBackWatermark: {
|
certificatePhotoBackWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -388,7 +389,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。',
|
descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
@ -402,15 +403,15 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath,
|
||||||
response: {
|
response: {
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
|
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
|
||||||
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
|
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
|
||||||
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
|
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
|
||||||
} else {
|
} else {
|
||||||
this.detailData.certificatePhotoBack = ''
|
this.detailData.certificatePhotoBack = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -424,7 +425,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -433,16 +434,16 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date',
|
format: 'date',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
driverLicenseGetTime: {
|
driverLicenseGetTime: {
|
||||||
title: '行驶证发证日期',
|
title: '行驶证发证日期',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date',
|
format: 'date',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
driverLicenseEndTime: {
|
driverLicenseEndTime: {
|
||||||
title: '行驶证到期日期',
|
title: '行驶证到期日期',
|
||||||
@ -450,65 +451,64 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
format: 'date',
|
format: 'date',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
driverLicenseSigningOrg: {
|
driverLicenseSigningOrg: {
|
||||||
title: '行驶证签发机关',
|
title: '行驶证签发机关',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carDistinguishCode: {
|
carDistinguishCode: {
|
||||||
title: '车辆识别代码',
|
title: '车辆识别代码',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
useNature: {
|
useNature: {
|
||||||
title: '使用性质',
|
title: '使用性质',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
curbWeight: {
|
curbWeight: {
|
||||||
title: '整备质量',
|
title: '整备质量',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
addOnAfter: '吨',
|
addOnAfter: '吨'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carTotalLoad: {
|
carTotalLoad: {
|
||||||
title: '总质量',
|
title: '总质量',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
addOnAfter: '吨',
|
addOnAfter: '吨',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
carOwner: {
|
carOwner: {
|
||||||
title: '所有人',
|
title: '所有人',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
titleB: {
|
titleB: {
|
||||||
title: '道运证(选填)',
|
title: '道运证(选填)',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'text',
|
widget: 'text'
|
||||||
|
|
||||||
},
|
},
|
||||||
default: '照片上传后会自动识别文字并填充下列内容栏',
|
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||||
},
|
},
|
||||||
roadTransportPhotoWatermark: {
|
roadTransportPhotoWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -523,7 +523,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
widget: 'upload',
|
widget: 'upload',
|
||||||
descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证',
|
descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证',
|
||||||
data: {
|
data: {
|
||||||
appId: this.envSrv.env.appId,
|
appId: this.envSrv.env.appId
|
||||||
},
|
},
|
||||||
name: 'multipartFile',
|
name: 'multipartFile',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
@ -537,15 +537,15 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
status: 'done',
|
status: 'done',
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath,
|
||||||
response: {
|
response: {
|
||||||
url: args.file.response.data.fullFileWatermarkPath,
|
url: args.file.response.data.fullFileWatermarkPath
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
this.sf?.setValue('/roadTransportPhotoWatermark', avatar);
|
this.sf?.setValue('/roadTransportPhotoWatermark', avatar);
|
||||||
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath
|
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath;
|
||||||
this.checkTransCard(args.file.response.data.fullFilePath);
|
this.checkTransCard(args.file.response.data.fullFilePath);
|
||||||
} else {
|
} else {
|
||||||
this.detailData.roadTransportPhoto = ''
|
this.detailData.roadTransportPhoto = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: (file: any, _fileList: any) => {
|
beforeUpload: (file: any, _fileList: any) => {
|
||||||
@ -559,7 +559,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
observer.next(isLt2M);
|
observer.next(isLt2M);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
// previewFile: (file: NzUploadFile) => of(file.url),
|
// previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -568,7 +568,7 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
// enum: [{ label: '长期', value: true }],
|
// enum: [{ label: '长期', value: true }],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'custom'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
roadTransportNo: {
|
roadTransportNo: {
|
||||||
@ -579,35 +579,38 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
optionalHelp: {
|
optionalHelp: {
|
||||||
i18n: this.titles,
|
i18n: this.titles
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
'': { type: 'number', ui: { widget: 'text',
|
||||||
|
html: this.aaa,
|
||||||
|
defaultText: '点击查看行政区域代码' } as SFTextWidgetSchema },
|
||||||
roadTransportLicenceNo: {
|
roadTransportLicenceNo: {
|
||||||
title: '经营许可证号',
|
title: '经营许可证号',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
ui: {
|
ui: {
|
||||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
roadTransportStartTime: {
|
roadTransportStartTime: {
|
||||||
title: '发证日期',
|
title: '发证日期',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date',
|
format: 'date',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
roadTransportEndTime: {
|
roadTransportEndTime: {
|
||||||
title: '有效期至',
|
title: '有效期至',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date',
|
format: 'date',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入'
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
required: [
|
required: [
|
||||||
'carFrontPhotoWatermark',
|
'carFrontPhotoWatermark',
|
||||||
@ -630,61 +633,60 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
'curbWeight',
|
'curbWeight',
|
||||||
'carTotalLoad',
|
'carTotalLoad',
|
||||||
'carOwner'
|
'carOwner'
|
||||||
],
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 180,
|
spanLabelFixed: 180,
|
||||||
grid: { span: 18 },
|
grid: { span: 18 },
|
||||||
width: 600,
|
width: 600
|
||||||
},
|
},
|
||||||
$title1: {
|
$title1: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title2: {
|
$title2: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title3: {
|
$title3: {
|
||||||
spanLabelFixed: 0,
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$isTrailer:{
|
$isTrailer: {
|
||||||
grid: { span: 24 },
|
grid: { span: 24 }
|
||||||
},
|
},
|
||||||
$carProtocalWatermark: {
|
$carProtocalWatermark: {
|
||||||
grid: { span:12 },
|
grid: { span: 12 }
|
||||||
},
|
},
|
||||||
$agreeImg: {
|
$agreeImg: {
|
||||||
grid: { span: 4 },
|
grid: { span: 4 },
|
||||||
class: 'setCustom'
|
class: 'setCustom'
|
||||||
},
|
},
|
||||||
$titleB:{
|
$titleB: {
|
||||||
grid: { span: 24 },
|
grid: { span: 24 }
|
||||||
},
|
},
|
||||||
$roadTransportPhotoWatermark: {
|
$roadTransportPhotoWatermark: {
|
||||||
grid: { span: 12 },
|
grid: { span: 12 }
|
||||||
},
|
},
|
||||||
$roadImg: {
|
$roadImg: {
|
||||||
grid: { span: 4 },
|
grid: { span: 4 },
|
||||||
class: 'setCustom'
|
class: 'setCustom'
|
||||||
},
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// 道路运输证识别
|
// 道路运输证识别
|
||||||
checkTransCard(imgurl: any) {
|
checkTransCard(imgurl: any) {
|
||||||
const params = {
|
const params = {
|
||||||
transportationLicenseUrl: imgurl,
|
transportationLicenseUrl: imgurl
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.sf.setValue('/roadTransportNo', res.number);
|
this.sf.setValue('/roadTransportNo', res.number);
|
||||||
this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate);
|
this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate);
|
||||||
this.sf.setValue('/roadTransportStartTime', res.issueDate);
|
this.sf.setValue('/roadTransportStartTime', res.issueDate);
|
||||||
if(this.carNo === '') {
|
if (this.carNo === '') {
|
||||||
this.carNo = res.number
|
this.carNo = res.number;
|
||||||
} else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
|
} else if (this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
|
||||||
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
|
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -693,11 +695,12 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
checkCarCard(imgurl: any, side: any) {
|
checkCarCard(imgurl: any, side: any) {
|
||||||
const params = {
|
const params = {
|
||||||
vehicleLicenseUrl: imgurl,
|
vehicleLicenseUrl: imgurl,
|
||||||
side,
|
side
|
||||||
};
|
};
|
||||||
this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (side === 'front') { // 正面
|
if (side === 'front') {
|
||||||
|
// 正面
|
||||||
this.sf.setValue('/driverLicenseRegisterTime', res.registerDate);
|
this.sf.setValue('/driverLicenseRegisterTime', res.registerDate);
|
||||||
this.sf.setValue('/carNo', res.number);
|
this.sf.setValue('/carNo', res.number);
|
||||||
this.sf.setValue('/driverLicenseGetTime', res.issueDate);
|
this.sf.setValue('/driverLicenseGetTime', res.issueDate);
|
||||||
@ -707,15 +710,14 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
this.sf.setValue('/useNature', res.useCharacter);
|
this.sf.setValue('/useNature', res.useCharacter);
|
||||||
this.sf.setValue('/carModel', res?.vehicleType);
|
this.sf.setValue('/carModel', res?.vehicleType);
|
||||||
this.sf.setValue('/carTotalLoad', res?.grossMass.slice(0, -2) % 1000);
|
this.sf.setValue('/carTotalLoad', res?.grossMass.slice(0, -2) % 1000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.sf.setValue('/curbWeight', res.unladenMass.slice(0, -2) % 1000);
|
this.sf.setValue('/curbWeight', res.unladenMass.slice(0, -2) % 1000);
|
||||||
this.sf.setValue('/carLoad', res.approvedLoad.slice(0, -2) % 1000);
|
this.sf.setValue('/carLoad', res.approvedLoad.slice(0, -2) % 1000);
|
||||||
}
|
}
|
||||||
if(this.carNo === '') {
|
if (this.carNo === '') {
|
||||||
this.carNo = res.number
|
this.carNo = res.number;
|
||||||
} else if(this.carNo && this.carNo !== res.number) {
|
} else if (this.carNo && this.carNo !== res.number) {
|
||||||
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
|
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -725,10 +727,10 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
this.modal.close(true);
|
this.modal.close(true);
|
||||||
}
|
}
|
||||||
showExample() {
|
showExample() {
|
||||||
this.showCardFlag = !this.showCardFlag
|
this.showCardFlag = !this.showCardFlag;
|
||||||
}
|
}
|
||||||
showJopExample() {
|
showJopExample() {
|
||||||
this.showJopFlag = !this.showJopFlag
|
this.showJopFlag = !this.showJopFlag;
|
||||||
}
|
}
|
||||||
submitForm() {
|
submitForm() {
|
||||||
const params: any = {
|
const params: any = {
|
||||||
@ -736,20 +738,23 @@ export class CarSettleCarauthComponent implements OnInit {
|
|||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
bindType: this.i.bindType
|
bindType: this.i.bindType
|
||||||
};
|
};
|
||||||
params.carFrontPhoto = this.detailData.carFrontPhoto
|
params.carFrontPhoto = this.detailData.carFrontPhoto;
|
||||||
params.carProtocal = this.detailData.carProtocal
|
params.carProtocal = this.detailData.carProtocal;
|
||||||
params.certificatePhotoFront = this.detailData.certificatePhotoFront
|
params.certificatePhotoFront = this.detailData.certificatePhotoFront;
|
||||||
params.certificatePhotoBack = this.detailData.certificatePhotoBack
|
params.certificatePhotoBack = this.detailData.certificatePhotoBack;
|
||||||
params.roadTransportPhoto = this.detailData.roadTransportPhoto
|
params.roadTransportPhoto = this.detailData.roadTransportPhoto;
|
||||||
delete params.titleA
|
delete params.titleA;
|
||||||
delete params.titleB
|
delete params.titleB;
|
||||||
console.log(params);
|
console.log(params);
|
||||||
|
|
||||||
this.service.request(this.service.$api_saveUpdateShipperCar, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_saveUpdateShipperCar, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('添加成功')
|
this.service.msgSrv.success('添加成功');
|
||||||
this.modal.close(true)
|
this.modal.close(true);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
view() {
|
||||||
|
window.open('http://www.mca.gov.cn/article/sj/xzqh/1980/')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user