fix bug
This commit is contained in:
@ -0,0 +1,43 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-16 10:09:23
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-16 10:14:29
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\carauth\\carauth.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">添加车辆</div>
|
||||
</div>
|
||||
<!-- <nz-spin *ngIf="!i" class="modal-spin"></nz-spin> -->
|
||||
<div class="sfBox">
|
||||
<sf #sf [compact]="true" [ui]="ui" [schema]="schema" [button]="'none'" *ngIf="schema" [formData]="detailData">
|
||||
<ng-template sf-template="tipsA" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr">
|
||||
<dl class="tips">
|
||||
<dt>行驶证首页</dt>
|
||||
<dd>示例</dd>
|
||||
</dl>
|
||||
<div class="pa"><img width="190" src="/assets/images/vehicle/driverfront.png" /></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="tipsB" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr">
|
||||
<dl class="tips">
|
||||
<dt>行驶证副页</dt>
|
||||
<dd>示例</dd>
|
||||
</dl>
|
||||
<div class="pa"><img width="190" src="/assets/images/vehicle/driverback.png" /></div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</sf>
|
||||
<img class="drivercard" height="104" src="/assets/images/vehicle/car.png" />
|
||||
<img class="agreement" height="104" src="/assets/images/vehicle/agreement.png" />
|
||||
<img class="jopcard" height="104" src="/assets/images/vehicle/road.png" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!sf?.valid">确定</button>
|
||||
</div>
|
||||
@ -0,0 +1,123 @@
|
||||
.sfBox {
|
||||
position: relative;
|
||||
.example {
|
||||
position: absolute;
|
||||
top: 215px;
|
||||
right: 265px;
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
.popBox {
|
||||
position: absolute;
|
||||
top: -170px;
|
||||
left: -125px;
|
||||
width: 300px;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border: solid 1px #eee;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 5px 1px #ececec;
|
||||
&::before {
|
||||
position: absolute;
|
||||
bottom: -5px;
|
||||
left: 50%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-left: -5px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 5px 1px #ececec;
|
||||
transform: rotate(45deg);
|
||||
content: '';
|
||||
}
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
background: #fff;
|
||||
content: '';
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.positionSet{
|
||||
top: 356px;
|
||||
right: 235px;
|
||||
}
|
||||
.positionSet01{
|
||||
top: 500px;
|
||||
right: 200px;
|
||||
}
|
||||
.positionSet02{
|
||||
top: 664px;
|
||||
right: 265px;
|
||||
}
|
||||
.positionSet03{
|
||||
top: 808px;
|
||||
right: 205px;
|
||||
|
||||
}
|
||||
}
|
||||
.exaA{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 300px
|
||||
}
|
||||
.pr {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pa {
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
left: 150px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
color: #333;
|
||||
|
||||
dt {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
dd {
|
||||
width: 190px;
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.drivercard{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 330px;
|
||||
border: solid 1px #ebf0fb;
|
||||
}
|
||||
.jopcard{
|
||||
position: absolute;
|
||||
top: 1356px;
|
||||
left: 330px;
|
||||
border: solid 1px #ebf0fb;
|
||||
}
|
||||
.agreement{
|
||||
position: absolute;
|
||||
top: 425px;
|
||||
left: 330px;
|
||||
border: solid 1px #ebf0fb;
|
||||
}
|
||||
:host{
|
||||
::ng-deep {
|
||||
.ant-input-borderless{
|
||||
padding: 0;
|
||||
padding-top: 4px;
|
||||
color: black;
|
||||
resize:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CarSettleCarauthComponent } from './carauth.component';
|
||||
|
||||
describe('CarSettleCarauthComponent', () => {
|
||||
let component: CarSettleCarauthComponent;
|
||||
let fixture: ComponentFixture<CarSettleCarauthComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CarSettleCarauthComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CarSettleCarauthComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,651 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { cacheConf } from '@conf/cache.conf';
|
||||
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
import { EACacheService, EAEnvironmentService } from '@shared';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer, of } from 'rxjs';
|
||||
import { VehicleService } from '../../../services/vehicle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-car-carauth',
|
||||
templateUrl: './carauth.component.html',
|
||||
styleUrls: ['./carauth.component.less']
|
||||
})
|
||||
export class CarSettleCarauthComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
record: any = {};
|
||||
i: any;
|
||||
ui: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
showCardFlag = false;
|
||||
showJopFlag = false;
|
||||
companyData: any = {};
|
||||
detailData: any = {};
|
||||
carNo = '';
|
||||
|
||||
constructor(
|
||||
private modal: NzModalRef,
|
||||
public service: VehicleService,
|
||||
private envSrv: EAEnvironmentService,
|
||||
private eaCacheSrv: EACacheService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log(this.i)
|
||||
this.initData();
|
||||
this.initSF();
|
||||
}
|
||||
initData() {
|
||||
if (this.i?.id) {
|
||||
this.companyData = this.eaCacheSrv.get(cacheConf.env);
|
||||
const params = {
|
||||
id: this.i?.id
|
||||
};
|
||||
this.service.request(this.service.$api_shipperCarGet, params).subscribe(res => {
|
||||
this.detailData = res;
|
||||
this.detailData.isSelf = res.isSelf ? 1 : 0;
|
||||
this.detailData.isTrailer = res.isTrailer ? 1 : 0;
|
||||
this.detailData.carFrontPhotoWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.detailData.carFrontPhotoWatermark,
|
||||
response: this.detailData.carFrontPhotoWatermark
|
||||
}
|
||||
];
|
||||
this.detailData.carProtocalWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.detailData.carProtocalWatermark,
|
||||
response: this.detailData.carProtocalWatermark
|
||||
}
|
||||
];
|
||||
this.detailData.certificatePhotoFrontWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.detailData.certificatePhotoFrontWatermark,
|
||||
response: this.detailData.certificatePhotoFrontWatermark
|
||||
}
|
||||
];
|
||||
this.detailData.certificatePhotoBackWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.detailData.certificatePhotoBackWatermark,
|
||||
response: this.detailData.certificatePhotoBackWatermark
|
||||
}
|
||||
];
|
||||
this.detailData.roadTransportPhotoWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.detailData.roadTransportPhotoWatermark,
|
||||
response: this.detailData.roadTransportPhotoWatermark
|
||||
}
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
carFrontPhotoWatermark: {
|
||||
type: 'string',
|
||||
title: '车头照照片',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '请上传车头照照片,支持JPG、PNG格式,文件小于5M。',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath;
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
// previewFile: (file: NzUploadFile) => of(file.url)
|
||||
}
|
||||
},
|
||||
carNo: {
|
||||
title: '车牌号',
|
||||
maxLength: 9,
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carNoColor: {
|
||||
title: '车牌颜色',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:color' },
|
||||
placeholder: '请选择车型',
|
||||
containsAllLabel: false
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
carModel: {
|
||||
title: '车型',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:model' },
|
||||
placeholder: '请选择车型',
|
||||
containsAllLabel: false
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
carLength: {
|
||||
title: '车长',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'car:length' },
|
||||
placeholder: '请选择车长',
|
||||
containsAllLabel: false
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
carLoad: {
|
||||
title: '载重',
|
||||
type: 'string',
|
||||
maxLength: 6,
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
change: (val: any) => {
|
||||
const value = val.replace(/\D/g, '');
|
||||
this.sf.setValue('/carLoad', value);
|
||||
}
|
||||
}
|
||||
},
|
||||
isSelf: {
|
||||
title: '是否挂靠',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
isTrailer: {
|
||||
title: '是否为挂车',
|
||||
type: 'string',
|
||||
enum: [
|
||||
{ label: '否', value: 0 },
|
||||
{ label: '是', value: 1 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
carProtocalWatermark: {
|
||||
type: 'string',
|
||||
title: '挂靠协议',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '请上传挂靠协议,支持JPG、PNG格式,文件小于5M。',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
// previewFile: (file: NzUploadFile) => of(file.url)
|
||||
}
|
||||
},
|
||||
titleA: {
|
||||
title: '行驶证信息(必填)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text'
|
||||
},
|
||||
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||
},
|
||||
tipsA: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
offsetControl: 6
|
||||
}
|
||||
},
|
||||
certificatePhotoFrontWatermark: {
|
||||
type: 'string',
|
||||
title: '行驶证首页照片',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '请上传行驶证首页照片,支持JPG、PNG格式,文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清,都不会通过审核。',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
|
||||
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
|
||||
} else {
|
||||
this.detailData.certificatePhotoFront = '';
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
// previewFile: (file: NzUploadFile) => of(file.url)
|
||||
}
|
||||
},
|
||||
tipsB: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
offsetControl: 6
|
||||
}
|
||||
},
|
||||
certificatePhotoBackWatermark: {
|
||||
type: 'string',
|
||||
title: '行驶证副页照片',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '请上传行驶证副业照片,支持JPG、PNG格式,文件小于5M。',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
|
||||
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
|
||||
} else {
|
||||
this.detailData.certificatePhotoBack = '';
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
// previewFile: (file: NzUploadFile) => of(file.url)
|
||||
}
|
||||
},
|
||||
driverLicenseRegisterTime: {
|
||||
title: '行驶证注册日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
driverLicenseGetTime: {
|
||||
title: '行驶证发证日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
driverLicenseEndTime: {
|
||||
title: '行驶证到期日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
driverLicenseSigningOrg: {
|
||||
title: '行驶证签发机关',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carDistinguishCode: {
|
||||
title: '车辆识别代码',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
useNature: {
|
||||
title: '使用性质',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
enum: [
|
||||
{ label: '非营运', value: 0 },
|
||||
{ label: '营运', value: 1 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
curbWeight: {
|
||||
title: '整备质量',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carOwner: {
|
||||
title: '所有人',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
titleB: {
|
||||
title: '道运证(选填)',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'text'
|
||||
},
|
||||
default: '照片上传后会自动识别文字并填充下列内容栏'
|
||||
},
|
||||
roadTransportPhotoWatermark: {
|
||||
type: 'string',
|
||||
title: '道运证照片',
|
||||
ui: {
|
||||
action: apiConf.fileUpload,
|
||||
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||
limit: 1,
|
||||
limitFileCount: 1,
|
||||
resReName: 'data.fullFileWatermarkPath',
|
||||
urlReName: 'data.fullFileWatermarkPath',
|
||||
widget: 'upload',
|
||||
descriptionI18n: '请上传道运证照片,支持JPG、PNG格式,文件小于5M。蓝牌绿牌车辆,可不用传道运证',
|
||||
data: {
|
||||
appId: this.envSrv.env.appId
|
||||
},
|
||||
name: 'multipartFile',
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
change: (args: any) => {
|
||||
if (args.type === 'success') {
|
||||
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath;
|
||||
this.checkTransCard(args.file.response.data.fullFilePath);
|
||||
} else {
|
||||
this.detailData.roadTransportPhoto = '';
|
||||
}
|
||||
},
|
||||
beforeUpload: (file: any, _fileList: any) => {
|
||||
return new Observable((observer: Observer<boolean>) => {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.service.msgSrv.warning('图片大小超过2M!');
|
||||
observer.complete();
|
||||
return;
|
||||
}
|
||||
observer.next(isLt2M);
|
||||
observer.complete();
|
||||
});
|
||||
},
|
||||
// previewFile: (file: NzUploadFile) => of(file.url)
|
||||
}
|
||||
},
|
||||
roadTransportNo: {
|
||||
title: '道运证号码',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
roadTransportLicenceNo: {
|
||||
title: '经营许可证号',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
roadTransportStartTime: {
|
||||
title: '发证日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
roadTransportEndTime: {
|
||||
title: '有效期至',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
}
|
||||
},
|
||||
required: [
|
||||
'carFrontPhotoWatermark',
|
||||
'carNo',
|
||||
'carNoColor',
|
||||
'carModel',
|
||||
'carLength',
|
||||
'carLoad',
|
||||
'isSelf',
|
||||
'isTrailer',
|
||||
'certificatePhotoFrontWatermark',
|
||||
'certificatePhotoBackWatermark',
|
||||
'driverLicenseRegisterTime',
|
||||
'driverLicenseGetTime',
|
||||
'driverLicenseEndTime',
|
||||
'driverLicenseSigningOrg',
|
||||
'carDistinguishCode',
|
||||
'useNature',
|
||||
'carOwner'
|
||||
]
|
||||
};
|
||||
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 180,
|
||||
grid: { span: 18 },
|
||||
width: 600
|
||||
},
|
||||
$title1: {
|
||||
spanLabelFixed: 0
|
||||
},
|
||||
$title2: {
|
||||
spanLabelFixed: 0
|
||||
},
|
||||
$title3: {
|
||||
spanLabelFixed: 0
|
||||
},
|
||||
$enterpriseRegistrationTime: {
|
||||
width: 680
|
||||
},
|
||||
$operatingEndTime: {
|
||||
grid: { span: 9 }
|
||||
},
|
||||
$dateType: {
|
||||
grid: { span: 4 }
|
||||
},
|
||||
$validEndTime: {
|
||||
grid: { span: 9 }
|
||||
},
|
||||
$dateType01: {
|
||||
grid: { span: 4 }
|
||||
},
|
||||
$registrationCapital: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$unit: {
|
||||
spanLabelFixed: 20,
|
||||
grid: { span: 3 }
|
||||
}
|
||||
};
|
||||
}
|
||||
// 道路运输证识别
|
||||
checkTransCard(imgurl: any) {
|
||||
const params = {
|
||||
transportationLicenseUrl: imgurl
|
||||
};
|
||||
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.sf.setValue('/roadTransportNo', res.number);
|
||||
this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate);
|
||||
this.sf.setValue('/roadTransportStartTime', res.issueDate);
|
||||
if (this.carNo === '') {
|
||||
this.carNo = res.number;
|
||||
} else if (this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
|
||||
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 行驶证识别
|
||||
checkCarCard(imgurl: any, side: any) {
|
||||
const params = {
|
||||
vehicleLicenseUrl: imgurl,
|
||||
side
|
||||
};
|
||||
this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe(res => {
|
||||
if (res) {
|
||||
if (side === 'front') {
|
||||
// 正面
|
||||
this.sf.setValue('/driverLicenseRegisterTime', res.registerDate);
|
||||
this.sf.setValue('/carNo', res.number);
|
||||
this.sf.setValue('/driverLicenseGetTime', res.issueDate);
|
||||
this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority);
|
||||
this.sf.setValue('/carDistinguishCode', res.vin);
|
||||
this.sf.setValue('/carOwner', res.name);
|
||||
this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1);
|
||||
} else {
|
||||
this.sf.setValue('/curbWeight', res.unladenMass);
|
||||
}
|
||||
if (this.carNo === '') {
|
||||
this.carNo = res.number;
|
||||
} else if (this.carNo && this.carNo !== res.number) {
|
||||
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
close(): void {
|
||||
this.modal.destroy();
|
||||
}
|
||||
showExample() {
|
||||
this.showCardFlag = !this.showCardFlag;
|
||||
}
|
||||
showJopExample() {
|
||||
this.showJopFlag = !this.showJopFlag;
|
||||
}
|
||||
submitForm() {
|
||||
const params: any = {
|
||||
appUserId: this.i.appUserId,
|
||||
...this.sf.value
|
||||
};
|
||||
params.carFrontPhoto = this.detailData.carFrontPhoto;
|
||||
params.carProtocal = this.detailData.carProtocal;
|
||||
params.certificatePhotoFront = this.detailData.certificatePhotoFront;
|
||||
params.certificatePhotoBack = this.detailData.certificatePhotoBack;
|
||||
params.roadTransportPhoto = this.detailData.roadTransportPhoto;
|
||||
params.carFrontPhotoWatermark = this.sf.value.carFrontPhotoWatermark.data.fullFilePath
|
||||
params.carProtocalWatermark = this.sf.value.carProtocalWatermark.data.fullFilePath
|
||||
params.certificatePhotoBackWatermark = this.sf.value.certificatePhotoBackWatermark.data.fullFilePath
|
||||
params.certificatePhotoFrontWatermark = this.sf.value.certificatePhotoFrontWatermark.data.fullFilePath
|
||||
params.roadTransportPhotoWatermark = this.sf.value.roadTransportPhotoWatermark.data.fullFilePath
|
||||
delete params.titleA;
|
||||
delete params.titleB;
|
||||
this.service.request(this.service.$api_saveUpdateShipperCar, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('添加成功');
|
||||
this.modal.close(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -37,8 +37,11 @@
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<!-- 数据列表 -->
|
||||
<!-- [data]="service.$api_get_supplier_page" -->
|
||||
|
||||
<!-- 工具栏 -->
|
||||
<div class="toolbar" style="float: right;
|
||||
padding-bottom: 15px;">
|
||||
<button nz-button nzType="primary" (click)="addModal()">添加车辆</button>
|
||||
</div>
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
|
||||
@ -2,11 +2,13 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { format } from 'path';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { VehicleService } from '../../../vehicle/services/vehicle.service';
|
||||
import { CarSettleCarauthComponent } from './carauth/carauth.component';
|
||||
@Component({
|
||||
selector: 'app-Vehicle-components-list',
|
||||
templateUrl: './list.component.html'
|
||||
@ -20,7 +22,7 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
|
||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, private modalHelper: ModalHelper) {}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -286,4 +288,12 @@ export class VehicleComponentsListComponent implements OnInit {
|
||||
exportFire() {
|
||||
this.service.downloadFile(this.service.$api_carLicense_export, this.reqParams);
|
||||
}
|
||||
addModal() {
|
||||
const i = {
|
||||
appUserId: '',
|
||||
}
|
||||
this.modalHelper.create(CarSettleCarauthComponent, {i}, { size: 900 }).subscribe((res) => {
|
||||
this.st.load()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ import { BaseService } from 'src/app/shared/services/core/base.service';
|
||||
import { EAFileUtil } from 'src/app/shared/utils/file.util';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class VehicleService extends BaseService {
|
||||
// 查询车辆认证表
|
||||
@ -35,7 +35,6 @@ export class VehicleService extends BaseService {
|
||||
// 审核司机挂靠协议(审核列表)
|
||||
$api_get_auditCarProtocal_audit = `/api/mdc/cuc/carLicenseAudit/operate/auditCarProtocal`;
|
||||
|
||||
|
||||
// 更新司机车辆审核信息(审核列表)
|
||||
$api_get_update_audit = `/api/mdc/cuc/carLicenseAudit/operate/update`;
|
||||
// 更新司机车辆审核信息
|
||||
@ -55,8 +54,16 @@ export class VehicleService extends BaseService {
|
||||
// 导出(车辆审核认证表)
|
||||
$api_carLicenseAudit_export = `/api/mdc/cuc/carLicenseAudit/operate/export`;
|
||||
|
||||
|
||||
|
||||
// 获取货主车辆信息
|
||||
$api_shipperCarGet = '/api/mdc/shipperCar/get';
|
||||
// 根据地区code查询列表
|
||||
$api_getRegionByCode = '/api/mdc/pbc/region/getRegionByCode';
|
||||
// 道路运输证识别
|
||||
$api_recognizeTransportationLicense = '/api/mdc/pbc/hwc/ocr/recognizeTransportationLicense';
|
||||
// 行驶证识别
|
||||
$api_recognizeVehicleLicense = '/api/mdc/pbc/hwc/ocr/recognizeVehicleLicense';
|
||||
// 保存货主车辆关联表
|
||||
$api_saveUpdateShipperCar = '/api/mdc/shipperCar/saveUpdateShipperCar';
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '@shared';
|
||||
import { VehicleComponentsAuditComponent } from './components/audit/audit.component';
|
||||
import { VehicleComponentsAuditDetailComponent } from './components/audit/detail/detail.component';
|
||||
import { CarSettleCarauthComponent } from './components/list/carauth/carauth.component';
|
||||
import { VehicleComponentsListDetailComponent } from './components/list/detail/detail.component';
|
||||
import { VehicleComponentsListEditComponent } from './components/list/edit/edit.component';
|
||||
import { VehicleImgViewComponent } from './components/list/img-view/img-view.component';
|
||||
@ -24,6 +25,7 @@ const COMPONENTS = [
|
||||
VehicleImgViewComponent,
|
||||
VehicleComponentsAuditComponent,
|
||||
VehicleComponentsAuditDetailComponent,
|
||||
CarSettleCarauthComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
BIN
src/assets/images/vehicle/agree.png
Normal file
BIN
src/assets/images/vehicle/agree.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 336 KiB |
BIN
src/assets/images/vehicle/agreement.png
Normal file
BIN
src/assets/images/vehicle/agreement.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
BIN
src/assets/images/vehicle/car.png
Normal file
BIN
src/assets/images/vehicle/car.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/images/vehicle/driverback.png
Normal file
BIN
src/assets/images/vehicle/driverback.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
src/assets/images/vehicle/driverfront.png
Normal file
BIN
src/assets/images/vehicle/driverfront.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/images/vehicle/road.png
Normal file
BIN
src/assets/images/vehicle/road.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user