This commit is contained in:
wangshiming
2022-04-20 16:47:57 +08:00
parent d3362c9023
commit 58c709dc21
5 changed files with 231 additions and 110 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-17 15:01:33 * @Date : 2022-02-17 15:01:33
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-11 14:50:05 * @LastEditTime : 2022-04-20 16:21:58
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\new\\new.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\new\\new.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -36,7 +36,13 @@
<ng-template sf-template="legalPersonIdentityVO/title2" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentityVO/title2" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div> <div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div>
</ng-template> </ng-template>
<ng-template sf-template="legalPersonIdentityVO/title3" let-me let-ui="ui" let-schema="schema">
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">道运证信息</div>
</ng-template>
<ng-template sf-template="roadImg" let-me let-ui="ui" let-schema="schema">
<img height="104" src="./assets/images/road.png" class="borderImg" />
</ng-template>
<ng-template sf-template="legalPersonIdentityVO/tipsC" let-me let-ui="ui" let-schema="schema"> <ng-template sf-template="legalPersonIdentityVO/tipsC" let-me let-ui="ui" let-schema="schema">
<div class="pr"> <div class="pr">
<div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div> <div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div>

View File

@ -1,5 +1,6 @@
:host { :host {
::ng-deep { ::ng-deep {
nz-card { nz-card {
.pr { .pr {
@ -40,7 +41,6 @@
line-height: 20px; line-height: 20px;
border-left: solid 3px #1890ff; border-left: solid 3px #1890ff;
} }
} }
.ant-form-item { .ant-form-item {
@ -51,10 +51,21 @@
nz-input-number { nz-input-number {
width: 100% !important; width: 100% !important;
} }
.ant-input-borderless{
padding: 0;
padding-top: 4px;
color: black;
resize:none;
}
.setCustom .ant-form-item-control{
margin-left: -100px !important
}
.borderImg{
border: solid 1px #ebf0fb;
}
.input-back { .input-back {
nz-form-item { nz-form-item {
margin-left: 0px; margin-left: 0;
.ant-form-item-label { .ant-form-item-label {
flex: 0 !important; flex: 0 !important;
@ -66,6 +77,5 @@
} }
} }
} }
} }
} }

View File

@ -17,7 +17,6 @@ import { NzUploadFile } from 'ng-zorro-antd/upload';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { SystemService } from '../../../services/system.service'; import { SystemService } from '../../../services/system.service';
const IMAGECONFIG = { const IMAGECONFIG = {
previewFile: (file: NzUploadFile) => of(file.url), previewFile: (file: NzUploadFile) => of(file.url),
action: apiConf.waterFileUpload, action: apiConf.waterFileUpload,
@ -53,11 +52,11 @@ export class NetworkFreightNewComponent implements OnInit {
sf1FormData: any = { sf1FormData: any = {
legalPersonIdentityVO: { legalPersonIdentityVO: {
certificatePhotoFrontWatermark: '', certificatePhotoFrontWatermark: '',
certificatePhotoBackWatermark: '', certificatePhotoBackWatermark: ''
}, }
};; };
subText = '确认新增' subText = '确认新增';
TabText = '新增网络货运人' TabText = '新增网络货运人';
sf2FormData: any = {}; sf2FormData: any = {};
schema: SFSchema = this.initOthersSF(); schema: SFSchema = this.initOthersSF();
schema1: SFSchema = this.initBasicInfoSF(); schema1: SFSchema = this.initBasicInfoSF();
@ -85,22 +84,29 @@ export class NetworkFreightNewComponent implements OnInit {
$isLoingDate: { $isLoingDate: {
spanLabelFixed: 100, spanLabelFixed: 100,
grid: { xxl: 6, xl: 6, lg: 4, md: 6 } grid: { xxl: 6, xl: 6, lg: 4, md: 6 }
} },
$roadTransportPhotoWatermark: {
grid: { span: 12 },
},
$roadImg: {
grid: { span: 4 },
class: 'setCustom'
},
}; };
constructor(private router: Router, public service: SystemService, private route: ActivatedRoute) {} constructor(private router: Router, public service: SystemService, private route: ActivatedRoute) {}
ngOnInit() { ngOnInit() {
if (this.route.snapshot.params.id !== 'undefined') { if (this.route.snapshot.params.id !== 'undefined') {
this.dataListInit(this.route.snapshot.params.id) this.dataListInit(this.route.snapshot.params.id);
this.subText = '确认编辑' this.subText = '确认编辑';
this.TabText = '编辑网络货运人' this.TabText = '编辑网络货运人';
} }
} }
dataListInit(id: any) { dataListInit(id: any) {
this.service.request(this.service.$api_get_networkTransporter_getDetail,{id: id}).subscribe((res) => { this.service.request(this.service.$api_get_networkTransporter_getDetail, { id: id }).subscribe(res => {
console.log(res); console.log(res);
this.sf2FormData = res this.sf2FormData = res;
this.sf1FormData = res.enterpriseInfoVO this.sf1FormData = res.enterpriseInfoVO;
this.sf1FormData.isLoingDate = this.sf1FormData.operatingEndTime !== null ? false : true; this.sf1FormData.isLoingDate = this.sf1FormData.operatingEndTime !== null ? false : true;
this.sf1FormData.licensePhotoWatermark = [ this.sf1FormData.licensePhotoWatermark = [
{ {
@ -109,7 +115,7 @@ export class NetworkFreightNewComponent implements OnInit {
status: 'done', status: 'done',
url: this.sf1FormData.licensePhotoWatermark, url: this.sf1FormData.licensePhotoWatermark,
response: this.sf1FormData.licensePhotoWatermark response: this.sf1FormData.licensePhotoWatermark
}, }
]; ];
console.log(this.sf1FormData); console.log(this.sf1FormData);
// 营业执照法人信息 // 营业执照法人信息
@ -121,7 +127,7 @@ export class NetworkFreightNewComponent implements OnInit {
status: 'done', status: 'done',
url: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark, url: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark,
response: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark response: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark
}, }
]; ];
this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark = [ this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark = [
{ {
@ -129,19 +135,28 @@ export class NetworkFreightNewComponent implements OnInit {
name: 'LOGO', name: 'LOGO',
status: 'done', status: 'done',
url: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark, url: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark,
response: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark, response: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark
}, }
]; ];
const province = this.sf1FormData.fullRegionVO.provinceCode this.sf1FormData.legalPersonIdentityVO.roadTransportPhotoWatermark = [
const city = this.sf1FormData.fullRegionVO.cityCode {
const area = this.sf1FormData.fullRegionVO.areaCode uid: -1,
name: 'LOGO',
status: 'done',
url: this.sf1FormData.legalPersonIdentityVO.roadTransportPhotoWatermark,
response: this.sf1FormData.legalPersonIdentityVO.roadTransportPhotoWatermark
}
];
const province = this.sf1FormData.fullRegionVO.provinceCode;
const city = this.sf1FormData.fullRegionVO.cityCode;
const area = this.sf1FormData.fullRegionVO.areaCode;
this.sf1FormData.enterpriseAddressCode = [parseInt(province), parseInt(city), parseInt(area)]; this.sf1FormData.enterpriseAddressCode = [parseInt(province), parseInt(city), parseInt(area)];
this.getRegionToThree(); this.getRegionToThree();
}) });
} }
getRegionToThree() { getRegionToThree() {
// 获取一、二、三级地区详情 // 获取一、二、三级地区详情
this.service.http.post(this.service.$api_getRegionToThree).subscribe((res) => { this.service.http.post(this.service.$api_getRegionToThree).subscribe(res => {
if (this.sf1) { if (this.sf1) {
this.sf1.getProperty('/enterpriseAddressCode')!.schema.enum = res.data; this.sf1.getProperty('/enterpriseAddressCode')!.schema.enum = res.data;
this.sf1?.getProperty('/enterpriseAddressCode')?.widget.reset(res.data); this.sf1?.getProperty('/enterpriseAddressCode')?.widget.reset(res.data);
@ -171,27 +186,33 @@ export class NetworkFreightNewComponent implements OnInit {
if (this.sf1.value.isLoingDate) { if (this.sf1.value.isLoingDate) {
this.sf1.value.operatingEndTime = ''; this.sf1.value.operatingEndTime = '';
} }
console.log(this.sf1.value) console.log(this.sf1.value);
console.log(this.sf1.valid) console.log(this.sf1.valid);
console.log(this.sf.value) console.log(this.sf.value);
console.log(this.sf.valid) console.log(this.sf.valid);
const sfVlaue = this.sf1.value; const sfVlaue = this.sf1.value;
const params: any = {}; const params: any = {};
Object.assign( console.log(this.sf1.value);
params,
{ Object.assign(params, {
...this.sf.value, ...this.sf.value,
enterpriseInfoDTO: { enterpriseInfoDTO: {
...this.sf1.value, ...this.sf1.value,
legalPersonIdentityDTO: this.sf1.value.legalPersonIdentityVO legalPersonIdentityDTO: this.sf1.value.legalPersonIdentityVO,
}
} },
); roadTransportAddress: this.sf1.value.legalPersonIdentityVO.roadTransportAddress, //道路运输证地址
delete params.enterpriseInfoDTO.legalPersonIdentityVO roadTransportEndTime: this.sf1.value.legalPersonIdentityVO.roadTransportEndTime, //道路运输许可证有效结束时间
roadTransportStartTime: this.sf1.value.legalPersonIdentityVO.roadTransportStartTime, //道路运输许可证有效开始时间
roadTransportPhotoWatermark: this.sf1.value.legalPersonIdentityVO.roadTransportPhotoWatermark, //带水印道路运输照片
roadTransportPhoto: this.sf1.value.legalPersonIdentityVO.roadTransportPhoto, //经营许可证号
roadTransportLicenceNo: this.sf1.value.legalPersonIdentityVO.roadTransportLicenceNo, //道路运输照片
});
delete params.enterpriseInfoDTO.legalPersonIdentityVO;
console.log(params); console.log(params);
params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2]; params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2];
if (this.route.snapshot.params.id !== 'undefined') { if (this.route.snapshot.params.id !== 'undefined') {
params.id = this.route.snapshot.params.id params.id = this.route.snapshot.params.id;
} }
this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => { this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => {
if (res) { if (res) {
@ -583,9 +604,84 @@ export class NetworkFreightNewComponent implements OnInit {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入法定代表人证件号' placeholder: '请输入法定代表人证件号'
} }
},
title3: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } },
roadTransportPhoto: { title: '', type: 'string', ui: { hidden: true } },
roadTransportPhotoWatermark: {
type: 'string',
title: '道运证照片',
ui: {
...IMAGECONFIG,
descriptionI18n: '请上传道运证照片支持JPG、PNG格式文件小于5M。蓝牌绿牌车辆可不用传道运证',
change: args => {
if (args.type === 'success') {
console.log(args);
this.sf1.setValue('/legalPersonIdentityVO/roadTransportPhoto', args.fileList[0].response.data.fullFilePath);
this.checkTransCard(args.fileList[0].response.data.fullFilePath);
}
}
} as SFUploadWidgetSchema
},
// roadImg: {
// title: '',
// type: 'boolean',
// // enum: [{ label: '长期', value: true }],
// ui: {
// widget: 'custom'
// }
// },
roadTransportLicenceNo: {
title: '经营许可证号',
type: 'string',
maxLength: 30,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入'
} }
}, },
required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber','certificatePhotoFrontWatermark','certificatePhotoBackWatermark'] roadTransportAddress: {
title: '地址',
type: 'string',
maxLength: 30,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入'
}
},
roadTransportStartTime: {
title: '发证日期',
type: 'string',
format: 'date',
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入'
}
},
roadTransportEndTime: {
title: '有效期至',
type: 'string',
format: 'date',
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入'
}
}
},
required: [
'certificatePhotoFront',
'certificatePhotoBack',
'name',
'certificateType',
'certificateNumber',
'certificatePhotoFrontWatermark',
'certificatePhotoBackWatermark',
'roadTransportEndTime',
'roadTransportStartTime',
'roadTransportLicenceNo',
'roadTransportPhotoWatermark',
'roadTransportAddress',
]
} }
}, },
required: [ required: [
@ -632,4 +728,16 @@ export class NetworkFreightNewComponent implements OnInit {
required: ['website', 'costRate'] required: ['website', 'costRate']
}; };
} }
// 道路运输证识别
checkTransCard(imgurl: any) {
const params = {
transportationLicenseUrl: imgurl
};
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe(res => {
if (res) {
this.sf.setValue('/roadTransportLicenceNo', res?.businessCertificate);
this.sf.setValue('/roadTransportStartTime', res?.issueDate);
}
});
}
} }

View File

@ -1,7 +1,7 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-20 17:18:43 * @Date: 2021-12-20 17:18:43
* @LastEditTime : 2022-02-18 13:42:49 * @LastEditTime : 2022-04-20 16:15:23
* @LastEditors : Shiming * @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\services\\system.service.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\services\\system.service.ts
@ -30,7 +30,6 @@ export class SystemService extends BaseService {
// 运营管理后台转授超管角色 // 运营管理后台转授超管角色
$api_set_shift_admin = `/api/mdc/cuc/userAuthority/shiftAdmin`; $api_set_shift_admin = `/api/mdc/cuc/userAuthority/shiftAdmin`;
// 分页获取应用角色列表 // 分页获取应用角色列表
$api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList'; $api_get_role_page = '/api/mdc/cuc/roleInfo/getAppRoleInfoList';
// 分页获取配置角色列表 // 分页获取配置角色列表
@ -123,7 +122,6 @@ export class SystemService extends BaseService {
// 删除系统配置项 // 删除系统配置项
public $api_remove_config_item = '/api/mdc/pbc/sysConfigItem/deletebatch'; public $api_remove_config_item = '/api/mdc/pbc/sysConfigItem/deletebatch';
// 根据网络货运人ID获取票务信息 // 根据网络货运人ID获取票务信息
public $api_getTicketByNetworkTransporterId = '/api/mdc/cuc/networkTransporterTicket/getTicketByNetworkTransporterId'; public $api_getTicketByNetworkTransporterId = '/api/mdc/cuc/networkTransporterTicket/getTicketByNetworkTransporterId';
// 保存票务信息 // 保存票务信息
@ -133,7 +131,6 @@ export class SystemService extends BaseService {
// 根据地区code查询地区详情 // 根据地区code查询地区详情
$api_getRegionDetailByCode = '/api/mdc/pbc/region/getRegionDetailByCode'; $api_getRegionDetailByCode = '/api/mdc/pbc/region/getRegionDetailByCode';
// 分页查询按钮列表 // 分页查询按钮列表
$api_getButtonInfoPage = '/api/mdc/cuc/buttonInfo/getButtonInfoPage'; $api_getButtonInfoPage = '/api/mdc/cuc/buttonInfo/getButtonInfoPage';
// 新增编辑按钮信息 // 新增编辑按钮信息
@ -143,7 +140,6 @@ export class SystemService extends BaseService {
// 删除按钮信息(id) // 删除按钮信息(id)
$api_deletebatchButton = '/api/mdc/cuc/buttonInfo/deletebatchButton'; $api_deletebatchButton = '/api/mdc/cuc/buttonInfo/deletebatchButton';
// 根据条件获取公告列表 // 根据条件获取公告列表
$api_getAnnouncementInfoList_page = '/api/mdc/pbc/announcementInfo/getAnnouncementInfoList'; $api_getAnnouncementInfoList_page = '/api/mdc/pbc/announcementInfo/getAnnouncementInfoList';
// 获取公告信息详情 // 获取公告信息详情
@ -155,7 +151,6 @@ export class SystemService extends BaseService {
// 新增公告信息 // 新增公告信息
$api_addAnnouncementInfo = '/api/mdc/pbc/announcementInfo/addAnnouncementInfo'; $api_addAnnouncementInfo = '/api/mdc/pbc/announcementInfo/addAnnouncementInfo';
// 查询保险配置 // 查询保险配置
$api_insuranceConfig_list = '/api/mdc/cuc/insuranceConfig/list'; $api_insuranceConfig_list = '/api/mdc/cuc/insuranceConfig/list';
// 获取保险配置费率 // 获取保险配置费率
@ -179,6 +174,8 @@ export class SystemService extends BaseService {
$api_setCrmCustomer = '/api/mdc/cuc/networkTransporter/setCrmCustomer'; $api_setCrmCustomer = '/api/mdc/cuc/networkTransporter/setCrmCustomer';
// 获取一、二、三级地区详情 // 获取一、二、三级地区详情
$api_getRegionToThree = '/api/mdc/pbc/region/getRegionToThree'; $api_getRegionToThree = '/api/mdc/pbc/region/getRegionToThree';
// 道路运输证识别
$api_recognizeTransportationLicense = '/api/mdc/pbc/hwc/ocr/recognizeTransportationLicense';
$api_getRoleTemplateInfo: string = ''; $api_getRoleTemplateInfo: string = '';
$api_getFunctionButtonInfo: string = '/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId'; $api_getFunctionButtonInfo: string = '/api/mdc/cuc/functionButton/getFunctionButtonByFunctionId';
$api_getFunctionDataInfo: string = ''; $api_getFunctionDataInfo: string = '';

BIN
src/assets/images/road.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB