diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html index ac6eee74..aa150e85 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.html +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html @@ -271,25 +271,9 @@ 服务评级 - - + + - - - - - - - - - - - - - - - - diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.ts b/src/app/routes/usercenter/components/driver/detail/detail.component.ts index 7c3e052c..0f2f5ce3 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.ts @@ -53,6 +53,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { @ViewChild('rejectedDriverModal', { static: false }) rejectedDriverModal!: any; adressCodeList: any = []; + billEvaluateList: any = []; approvalOpinion = ''; isEditUser = false; @@ -125,6 +126,16 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { this.carList = res; } }); + // 获取评价信息 + this.service + .request(this.service.$api_get_driver_billEvaluate, { passiveUserId: this.route.snapshot.params.id }, 'POST', false) + .subscribe(res => { + if (res) { + this.billEvaluateList = res; + console.log(this.billEvaluateList); + + } + }); } /** 启用/冻结司机 */ diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 4a9c1bce..35946b7d 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -29,7 +29,7 @@
- 服务评级: + 服务评级:
@@ -188,7 +188,7 @@ [nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"> - + @@ -349,7 +349,7 @@ + [nzDisabled]="!isEdit || disabledUpload" (nzChange)="changeUpload($event,data,key,key2,hover)">
上传
diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts index 3b14db9e..dd3c20ce 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts @@ -39,6 +39,8 @@ export class FreightComponentsListDetailComponent implements OnInit { 1: '通过', 2: '未认证' }; + + billEvaluate = 0; constructor( public service: UsermanageService, private route: ActivatedRoute, @@ -54,7 +56,6 @@ export class FreightComponentsListDetailComponent implements OnInit { this.service.getNetworkFreightForwarder().subscribe(res => { if (res) { this.ltdId = res; - console.log(this.ltdId); } }); } @@ -73,9 +74,20 @@ export class FreightComponentsListDetailComponent implements OnInit { Number(this.detailData.fullRegionVO?.cityCode), Number(this.detailData.fullRegionVO?.areaCode) ]; - console.log(this.enterpriseAddressCode); } - console.log(res); + }); + + // 获取评价信息 + this.service + .request(this.service.$api_get_driver_billEvaluate, { passiveUserId: this.route.snapshot.params.id }, 'POST', false) + .subscribe(res => { + if (res) { + this.service.request(this.service.$api_get_freight_billEvaluate, res).subscribe(billEvaluate => { + if (billEvaluate) { + this.billEvaluate = billEvaluate.totalScore; + } + }); + } }); } @@ -190,10 +202,19 @@ export class FreightComponentsListDetailComponent implements OnInit { } }); } - changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string) { + changeUpload({ file, fileList, type }: any, data: any, key: string, key2: string, id: string) { if (type === 'success') { data[key] = file.response.data?.fullFileWatermarkPath; data[key2] = file.response.data?.fullFilePath; + if (id === 'legalFront' || id === 'legalBack') { + this.checkIdCard(file.response.data?.fullFilePath, id === 'legalFront' ? 'front' : 'back', 1); + } + if (id === 'certificateBackFront' || id === 'certificateBack') { + this.checkIdCard(file.response.data?.fullFilePath, id === 'certificateBackFront' ? 'front' : 'back', 0); + } + if (id === 'detailPhoto') { + this.checkBusinessLicense(file.response.data?.fullFilePath); + } } } @@ -267,4 +288,91 @@ export class FreightComponentsListDetailComponent implements OnInit { } }); } + + // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 + checkIdCard(imgurl: any, isFront: string, type: number) { + const params = { + idCardUrl: imgurl, + side: isFront + }; + this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => { + if (res) { + if (type === 1) { + // 法定代表人证件照 + if (isFront === 'front') { + // 正面 + if (res.name) { + this.detailData.legalPersonIdentityVO.name = res.name; + } + if (res.number) { + this.detailData.legalPersonIdentityVO.certificateNumber = res.number; + } + } + if (isFront === 'back') { + // 背面 + if (res.validFrom) { + this.detailData.legalPersonIdentityVO.validStartTime = res.validFrom; + } + if (res.validTo) { + this.detailData.legalPersonIdentityVO.validEndTime = res.validTo; + } else { + this.detailData.legalPersonIdentityVO.validEndTime = null; + } + } + } + // 企业管理员证件照 + if (type === 0) { + if (isFront === 'front') { + // 正面 + if (res.name) { + this.detailData.adminUserInfo.name = res.name; + } + if (res.number) { + this.detailData.adminUserInfo.certificateNumber = res.number; + } + } + } + } + }); + } + + // 识别营业执照 + checkBusinessLicense(imgurl: any) { + this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => { + if (res) { + if (res.registrationNumber) { + this.detailData.unifiedSocialCreditCode = res.registrationNumber; + } + if (res.name) { + this.detailData.enterpriseName = res.name; + } + if (res.type) { + this.detailData.enterpriseType = res.type; + } + if (res.addressRegionCodes) { + this.detailData.enterpriseAddressCode = res.addressRegionCodes; + } + if (res.address) { + this.detailData.enterpriseAddress = res.address; + } + if (res.registeredCapital) { + this.detailData.registrationCapital = res.registeredCapital; + } + if (res.foundDate) { + this.detailData.enterpriseRegistrationTime = res.foundDate; + } + if (res.businessTermStartDate) { + this.detailData.operatingStartTime = res.businessTermStartDate; + } + if (res.businessTermEndDate) { + this.detailData.operatingEndTime = res.businessTermEndDate; + } else { + this.detailData.operatingEndTime = null; + } + if (res.businessScope) { + this.detailData.businessScope = res.businessScope; + } + } + }); + } } diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts index 71fe2111..ab814107 100644 --- a/src/app/routes/usercenter/services/usercenter.service.ts +++ b/src/app/routes/usercenter/services/usercenter.service.ts @@ -18,43 +18,32 @@ import { ImageViewComponent } from 'src/app/shared/components/imagelist'; export class UsermanageService extends ShipperBaseService { // 查询企业列表 $api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page'; - // 导出企业列表 $api_export_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/export'; - // 查询企业详情 $api_get_freight_detail = '/api/mdc/cuc/enterpriseInfo/operate/detail'; - // 查询车队长列表-运营后台 $api_get_user_expand = '/api/mdc/userDriverExpand/list/page'; - // 添加企业业务员 $api_add_salesman = '/api/mdc/cuc/enterpriseInfo/operate/addSalesman'; - // 添加货主,司机,车队长业务员 $api_add_user_salesman = '/api/mdc/cuc/user/addPromoter'; - // 冻结/启用企业业 $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; - // 企业审核 $api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit'; // 货主员工列表(运营后台) $api_get_user_list = '/api/mdc/cuc/userApp/getShipperUserList'; - // 冻结或恢复员工 $api_lock_staff = '/api/mdc/cuc/userApp/freezeOrResumeStaff'; - // 冻结或恢复应用用户 $api_lock_app_user = '/api/mdc/cuc/userApp/freezeOrResume'; - // 冻结/启用用户 $api_lock_user = '/api/mdc/cuc/enterpriseInfo/operate/lock'; // 查询司机列表 $api_get_driver_list = '/api/mdc/cuc/driver/list/page'; - // 根据应用用户id获取用户详情 $api_get_user_detail = '/api/mdc/cuc/user/getUserDetailByAppUserId'; // 根据应用用户ID获取身份信息表 @@ -68,6 +57,11 @@ export class UsermanageService extends ShipperBaseService { // 司机详情查看-获取用户关联的企业项目角色信息 $api_get_driver_projects = '/api/mdc/cuc/user/getEnterpriceProjectInfo'; + // 获取服务评级 + $api_get_driver_billEvaluate = '/api/sdc/billEvaluate/getServiceRating'; + // 总评分 + $api_get_freight_billEvaluate = '/api/sdc/billEvaluate/getTotalScore'; + // 修改实名认证-运营管理后台 $api_update_driver_identity = '/api/mdc/cuc/identityInfo/operatorAlterIdentity'; // 修改驾驶证信息