edit
This commit is contained in:
@ -93,20 +93,10 @@ export class FreightComponentsListNewComponent implements OnInit {
|
||||
enterpriseBusinessAddressCode = '';
|
||||
regionData: any = [];
|
||||
|
||||
constructor(
|
||||
private routerinfo: ActivatedRoute,
|
||||
public msg: NzMessageService,
|
||||
private router: Router,
|
||||
private modalService: NzModalService,
|
||||
private service: UsermanageService
|
||||
) {}
|
||||
ngOnInit() {
|
||||
this.getRegionToThree('');
|
||||
}
|
||||
constructor(public msg: NzMessageService, private router: Router, private service: UsermanageService) {}
|
||||
ngOnInit() {}
|
||||
|
||||
submitForm() {
|
||||
console.log(this.sf.value);
|
||||
console.log(this.sf1.value);
|
||||
const sfVlaue = this.sf.value;
|
||||
const params = {};
|
||||
Object.assign(
|
||||
@ -134,182 +124,13 @@ export class FreightComponentsListNewComponent implements OnInit {
|
||||
);
|
||||
this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('企业新增成功');
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
// submitForm() {
|
||||
// // 营业执照基本信息
|
||||
// if (!this.sf.value.contactsName) {
|
||||
// // this.service.msgSrv.warning('请填写申请人姓名');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.enterpriseQualificationCertificate) {
|
||||
// // this.service.msgSrv.warning('请上传营业执照');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.unifiedSocialCreditCode) {
|
||||
// // this.service.msgSrv.warning('请填写统一社会信用代码');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.enterpriseName) {
|
||||
// // this.service.msgSrv.warning('请填写公司名称');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.enterpriseType) {
|
||||
// // this.service.msgSrv.warning('请填写公司类型');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.region) {
|
||||
// // this.service.msgSrv.warning('请选择所在地区');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.enterpriseAddress) {
|
||||
// // this.service.msgSrv.warning('请填写营业执照详细地址');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.registrationCapital) {
|
||||
// // this.service.msgSrv.warning('请填写注册资本');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.enterpriseRegistrationTime) {
|
||||
// // this.service.msgSrv.warning('请选择成立日期');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.operatingStartTime) {
|
||||
// // this.service.msgSrv.warning('请选择营业期限开始日期');
|
||||
// return;
|
||||
// }
|
||||
// if (this.sf1.value.dateType !== true) {
|
||||
// if (!this.sf1.value.operatingEndTime) {
|
||||
// this.service.msgSrv.warning('请选择营业期限结束日期');
|
||||
// return;
|
||||
// }
|
||||
// if (this.sf1.value.operatingEndTime <= this.sf1.value.operatingStartTime) {
|
||||
// this.service.msgSrv.warning('营业期限结束日期不能小于或等于开始日期');
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// if (!this.sf1.value.businessScope) {
|
||||
// this.service.msgSrv.warning('请填写经营范围');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.certificatePhotoFront) {
|
||||
// this.service.msgSrv.warning('请上传身份证正面照');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.certificatePhotoBack) {
|
||||
// this.service.msgSrv.warning('请上传身份证反面照');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.name) {
|
||||
// this.service.msgSrv.warning('请填写法定代表人');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.certificateNumber) {
|
||||
// this.service.msgSrv.warning('请填写法定代表人身份证号');
|
||||
// return;
|
||||
// }
|
||||
// if (!this.sf1.value.validStartTime) {
|
||||
// this.service.msgSrv.warning('请选择身份证有效开始日期');
|
||||
// return;
|
||||
// }
|
||||
// if (this.sf1.value.dateType1 !== true) {
|
||||
// if (!this.sf1.value.validEndTime) {
|
||||
// this.service.msgSrv.warning('请选择身份证有效截止日期');
|
||||
// return;
|
||||
// }
|
||||
// if (this.sf1.value.validEndTime <= this.sf1.value.validStartTime) {
|
||||
// this.service.msgSrv.warning('身份证有效截止日期不能小于或等于开始日期');
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// const params: any = {
|
||||
// contactsName: this.sf.value.contactsName,
|
||||
// contactsPhone: this.sf.value.telephone,
|
||||
// certificateNumber: this.sf1.value.certificateNumber,
|
||||
// unifiedSocialCreditCode: this.sf1.value.unifiedSocialCreditCode,
|
||||
// enterpriseAddressCodeStr: this.sf1.value.enterpriseAddressCodeStr,
|
||||
// enterpriseAddressCode: this.sf1.value.region[2],
|
||||
// enterpriseAddress: this.sf1.value.enterpriseAddress,
|
||||
// enterpriseName: this.sf1.value.enterpriseName,
|
||||
// enterpriseNameAbbreviation: this.sf1.value.enterpriseNameAbbreviation,
|
||||
// enterpriseQualificationCertificate: this.sf1.value.enterpriseQualificationCertificate,
|
||||
// enterpriseType: this.sf1.value.enterpriseType,
|
||||
// enterpriseTelephone: this.sf1.value.enterpriseTelephone,
|
||||
// enterpriseRegistrationTime: this.sf1.value.enterpriseRegistrationTime,
|
||||
// businessScope: this.sf1.value.businessScope,
|
||||
// operatingEndTime: this.sf1.value.operatingEndTime,
|
||||
// operatingStartTime: this.sf1.value.operatingStartTime,
|
||||
// organizationCode: this.sf1.value.organizationCode,
|
||||
// registrationCapital: this.sf1.value.registrationCapital,
|
||||
|
||||
// legalPersonIdentity: {
|
||||
// // ...this.sf1.value,
|
||||
// validStartTime: this.sf1.value.validStartTime,
|
||||
// validEndTime: this.sf1.value.validEndTime,
|
||||
// certificatePhotoBack: this.sf1.value.certificatePhotoBack,
|
||||
// certificateNumber: this.sf1.value.certificateNumber,
|
||||
// certificatePhotoFront: this.sf1.value.certificatePhotoFront,
|
||||
// certificateType: this.sf1.value.certificateType,
|
||||
// handCertificate: this.sf1.value.handCertificate,
|
||||
// name: this.sf1.value.name,
|
||||
// },
|
||||
// };
|
||||
// if (this.routerinfo.snapshot.queryParams.id) {
|
||||
// params.id = this.routerinfo.snapshot.queryParams.id;
|
||||
// }
|
||||
// delete params?.tips;
|
||||
// this.service.http.post(this.service.$api_supplierSubmitInfo, params).subscribe((res) => {
|
||||
// if (res) {
|
||||
// this.getApplicationInfo(res.data?.id);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
viewImg(image: any) {
|
||||
// this.modal.createStatic(AccountComponentsImgViewComponent, { i: { imgUrl: image } }).subscribe(() => {
|
||||
// // this.st.reload();
|
||||
// });
|
||||
}
|
||||
getRegionToThree(regionCode: string) {
|
||||
// 获取一、二、三级地区详情
|
||||
this.service
|
||||
.request(this.service.$api_get_region_by_code, { regionCode })
|
||||
.pipe(map(data => data.map((item: any) => ({ label: item.regionFullName, value: item.regionCode, ...item }))))
|
||||
.subscribe(res => {
|
||||
this.regionData = res;
|
||||
this.schema1 = this.initBasicInfoSF();
|
||||
});
|
||||
}
|
||||
|
||||
updateArea(parentId: string, target: string, type: number, nextTarget: string, sfObj: SFComponent): any {
|
||||
// 改变二级数据时,同时清空三级数据
|
||||
if (type === 2 && sfObj) {
|
||||
sfObj.getProperty(nextTarget)!.schema.enum = [];
|
||||
sfObj.getProperty(nextTarget)!.widget.reset([]);
|
||||
sfObj.getProperty(nextTarget)!.setValue(null, true);
|
||||
}
|
||||
|
||||
if (!parentId && sfObj) {
|
||||
sfObj.getProperty(target)!.schema.enum = [];
|
||||
sfObj.getProperty(target)!.widget.reset([]);
|
||||
sfObj.getProperty(target)!.setValue(null, true);
|
||||
} else {
|
||||
// return this.service.http
|
||||
// .get(this.service.$api_getRegionByCode, { regionCode: parentId })
|
||||
// .pipe(
|
||||
// map((res) => {
|
||||
// return res.data.map((m: { regionFullName: string; name: any; regionCode: any }) => {
|
||||
// const fullName = m.regionFullName.split(',').reverse().join('');
|
||||
// return { label: m.name, value: m.regionCode, fullName };
|
||||
// });
|
||||
// }),
|
||||
// )
|
||||
// .subscribe((res) => {
|
||||
// sfObj.getProperty(target)!.schema.enum = res;
|
||||
// sfObj.getProperty(target)!.widget.reset(res);
|
||||
// });
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 根据地区code查询地区详情
|
||||
* code:请求参数
|
||||
|
||||
Reference in New Issue
Block a user