返佣
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-17 15:01:33
|
||||
* @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
|
||||
* 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">
|
||||
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div>
|
||||
</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">
|
||||
<div class="pr">
|
||||
<div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div>
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
:host {
|
||||
::ng-deep {
|
||||
nz-card {
|
||||
|
||||
nz-card {
|
||||
|
||||
.pr {
|
||||
position: relative;
|
||||
}
|
||||
.pa {
|
||||
position: absolute;
|
||||
top : 50px;
|
||||
left : 150px;
|
||||
top: 50px;
|
||||
left: 150px;
|
||||
}
|
||||
.pa2 {
|
||||
position: absolute;
|
||||
top: 28px;
|
||||
left: 180px;
|
||||
}
|
||||
.tips {
|
||||
display : flex;
|
||||
.tips {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
color : #333;
|
||||
color: #333;
|
||||
|
||||
dt {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
dd {
|
||||
width : 190px;
|
||||
width: 190px;
|
||||
margin-bottom: 0;
|
||||
text-align : center;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.form-title {
|
||||
margin-bottom: 10px;
|
||||
padding-left : 8px;
|
||||
color : #333;
|
||||
font-weight : 700;
|
||||
font-size : 18px;
|
||||
line-height : 20px;
|
||||
border-left : solid 3px #1890ff;
|
||||
padding-left: 8px;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
border-left: solid 3px #1890ff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.ant-form-item {
|
||||
@ -51,21 +51,31 @@
|
||||
nz-input-number {
|
||||
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 {
|
||||
nz-form-item {
|
||||
margin-left: 0px;
|
||||
margin-left: 0;
|
||||
|
||||
.ant-form-item-label {
|
||||
flex: 0 !important;
|
||||
}
|
||||
|
||||
.ant-form-item-control {
|
||||
max-width : 100% !important;
|
||||
max-width: 100% !important;
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { of } from 'rxjs';
|
||||
import { SystemService } from '../../../services/system.service';
|
||||
|
||||
|
||||
const IMAGECONFIG = {
|
||||
previewFile: (file: NzUploadFile) => of(file.url),
|
||||
action: apiConf.waterFileUpload,
|
||||
@ -50,14 +49,14 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
@ViewChild('sf1', { static: false })
|
||||
sf1!: SFComponent;
|
||||
sf1FormData: any = {
|
||||
sf1FormData: any = {
|
||||
legalPersonIdentityVO: {
|
||||
certificatePhotoFrontWatermark: '',
|
||||
certificatePhotoBackWatermark: '',
|
||||
},
|
||||
};;
|
||||
subText = '确认新增'
|
||||
TabText = '新增网络货运人'
|
||||
certificatePhotoBackWatermark: ''
|
||||
}
|
||||
};
|
||||
subText = '确认新增';
|
||||
TabText = '新增网络货运人';
|
||||
sf2FormData: any = {};
|
||||
schema: SFSchema = this.initOthersSF();
|
||||
schema1: SFSchema = this.initBasicInfoSF();
|
||||
@ -85,22 +84,29 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
$isLoingDate: {
|
||||
spanLabelFixed: 100,
|
||||
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) {}
|
||||
ngOnInit() {
|
||||
if(this.route.snapshot.params.id !== 'undefined') {
|
||||
this.dataListInit(this.route.snapshot.params.id)
|
||||
this.subText = '确认编辑'
|
||||
this.TabText = '编辑网络货运人'
|
||||
if (this.route.snapshot.params.id !== 'undefined') {
|
||||
this.dataListInit(this.route.snapshot.params.id);
|
||||
this.subText = '确认编辑';
|
||||
this.TabText = '编辑网络货运人';
|
||||
}
|
||||
}
|
||||
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);
|
||||
this.sf2FormData = res
|
||||
this.sf1FormData = res.enterpriseInfoVO
|
||||
this.sf2FormData = res;
|
||||
this.sf1FormData = res.enterpriseInfoVO;
|
||||
this.sf1FormData.isLoingDate = this.sf1FormData.operatingEndTime !== null ? false : true;
|
||||
this.sf1FormData.licensePhotoWatermark = [
|
||||
{
|
||||
@ -109,19 +115,19 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
status: 'done',
|
||||
url: this.sf1FormData.licensePhotoWatermark,
|
||||
response: this.sf1FormData.licensePhotoWatermark
|
||||
},
|
||||
}
|
||||
];
|
||||
console.log(this.sf1FormData);
|
||||
// 营业执照法人信息
|
||||
|
||||
|
||||
this.sf1FormData.legalPersonIdentityVO.certificatePhotoFrontWatermark = [
|
||||
{
|
||||
uid: -1,
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark,
|
||||
response: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark
|
||||
},
|
||||
url: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark,
|
||||
response: res.enterpriseInfoVO.legalPersonIdentityVO.certificatePhotoFrontWatermark
|
||||
}
|
||||
];
|
||||
this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark = [
|
||||
{
|
||||
@ -129,20 +135,29 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
name: 'LOGO',
|
||||
status: 'done',
|
||||
url: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark,
|
||||
response: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark,
|
||||
},
|
||||
response: this.sf1FormData.legalPersonIdentityVO.certificatePhotoBackWatermark
|
||||
}
|
||||
];
|
||||
const province = this.sf1FormData.fullRegionVO.provinceCode
|
||||
const city = this.sf1FormData.fullRegionVO.cityCode
|
||||
const area = this.sf1FormData.fullRegionVO.areaCode
|
||||
this.sf1FormData.legalPersonIdentityVO.roadTransportPhotoWatermark = [
|
||||
{
|
||||
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.getRegionToThree();
|
||||
})
|
||||
});
|
||||
}
|
||||
getRegionToThree() {
|
||||
// 获取一、二、三级地区详情
|
||||
this.service.http.post(this.service.$api_getRegionToThree).subscribe((res) => {
|
||||
if(this.sf1){
|
||||
this.service.http.post(this.service.$api_getRegionToThree).subscribe(res => {
|
||||
if (this.sf1) {
|
||||
this.sf1.getProperty('/enterpriseAddressCode')!.schema.enum = res.data;
|
||||
this.sf1?.getProperty('/enterpriseAddressCode')?.widget.reset(res.data);
|
||||
}
|
||||
@ -171,31 +186,37 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
if (this.sf1.value.isLoingDate) {
|
||||
this.sf1.value.operatingEndTime = '';
|
||||
}
|
||||
console.log(this.sf1.value)
|
||||
console.log(this.sf1.valid)
|
||||
console.log(this.sf.value)
|
||||
console.log(this.sf.valid)
|
||||
console.log(this.sf1.value);
|
||||
console.log(this.sf1.valid);
|
||||
console.log(this.sf.value);
|
||||
console.log(this.sf.valid);
|
||||
const sfVlaue = this.sf1.value;
|
||||
const params: any = {};
|
||||
Object.assign(
|
||||
params,
|
||||
{
|
||||
...this.sf.value ,
|
||||
enterpriseInfoDTO: {
|
||||
...this.sf1.value,
|
||||
legalPersonIdentityDTO: this.sf1.value.legalPersonIdentityVO
|
||||
}
|
||||
}
|
||||
);
|
||||
delete params.enterpriseInfoDTO.legalPersonIdentityVO
|
||||
console.log(this.sf1.value);
|
||||
|
||||
Object.assign(params, {
|
||||
...this.sf.value,
|
||||
enterpriseInfoDTO: {
|
||||
...this.sf1.value,
|
||||
legalPersonIdentityDTO: this.sf1.value.legalPersonIdentityVO,
|
||||
|
||||
},
|
||||
roadTransportAddress: this.sf1.value.legalPersonIdentityVO.roadTransportAddress, //道路运输证地址
|
||||
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);
|
||||
params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2];
|
||||
if(this.route.snapshot.params.id !== 'undefined') {
|
||||
params.id = this.route.snapshot.params.id
|
||||
if (this.route.snapshot.params.id !== 'undefined') {
|
||||
params.id = this.route.snapshot.params.id;
|
||||
}
|
||||
this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => {
|
||||
if (res) {
|
||||
if(this.route.snapshot.params.id !== 'undefined') {
|
||||
if (this.route.snapshot.params.id !== 'undefined') {
|
||||
this.service.msgSrv.success('修改成功');
|
||||
} else {
|
||||
this.service.msgSrv.success('新增成功');
|
||||
@ -252,7 +273,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
// 识别营业执照
|
||||
checkBusinessLicense(imgurl: any) {
|
||||
console.log('触发了识别');
|
||||
|
||||
|
||||
this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
|
||||
if (res) {
|
||||
if (res.registrationNumber) {
|
||||
@ -313,7 +334,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
}
|
||||
} as SFUploadWidgetSchema
|
||||
},
|
||||
|
||||
|
||||
enterpriseName: {
|
||||
title: '公司名称',
|
||||
type: 'string',
|
||||
@ -433,7 +454,7 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
|
||||
|
||||
operatingStartTime: {
|
||||
title: '营业期限',
|
||||
type: 'string',
|
||||
@ -583,9 +604,84 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||
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: '请输入'
|
||||
}
|
||||
},
|
||||
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']
|
||||
required: [
|
||||
'certificatePhotoFront',
|
||||
'certificatePhotoBack',
|
||||
'name',
|
||||
'certificateType',
|
||||
'certificateNumber',
|
||||
'certificatePhotoFrontWatermark',
|
||||
'certificatePhotoBackWatermark',
|
||||
'roadTransportEndTime',
|
||||
'roadTransportStartTime',
|
||||
'roadTransportLicenceNo',
|
||||
'roadTransportPhotoWatermark',
|
||||
'roadTransportAddress',
|
||||
]
|
||||
}
|
||||
},
|
||||
required: [
|
||||
@ -623,13 +719,25 @@ export class NetworkFreightNewComponent implements OnInit {
|
||||
type: 'string',
|
||||
addOnAfter: '%',
|
||||
ui: {
|
||||
addOnAfter: '%',
|
||||
addOnAfter: '%',
|
||||
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||
placeholder: '请输入成本费率'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user