Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
wangshiming
2022-02-16 09:49:48 +08:00
4 changed files with 77 additions and 63 deletions

View File

@ -86,13 +86,13 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
});
// 获取人脸识别结果
this.service.request(this.service.$api_getFaceFlowQuery, { id: this.route.snapshot.params.id }).subscribe(res => {
console.log(res)
if(res) {
this.faceStatus = res.status
if(res.status == 4) {
this.facetext= res.failReason
console.log(res);
if (res) {
this.faceStatus = res.status;
if (res.status == 4) {
this.facetext = res.failReason;
}
}
}
});
// 获取用户个人信息
this.service.request(this.service.$api_get_user_identity, { id: this.route.snapshot.params.id }).subscribe(res => {
@ -115,7 +115,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
this.service.request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }).subscribe(res => {
if (res?.id) {
this.licenseDetail = res;
console.log(res)
console.log(res);
this.tempalateLicenseDetail = { ...this.licenseDetail };
}
});
@ -290,10 +290,23 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
* 修改驾驶证,从业资格证信息
*/
saveDriver() {
console.log(this.route.snapshot.params.id);
const driverDetail = this.driverDetail;
const licenseDetail = this.licenseDetail;
console.log(this.driverDetail);
// console.log(this.driverDetail);
if (driverDetail.validStartTime && driverDetail.validEndTime) {
let validStartTime = driverDetail.validStartTime;
let validEndTime = driverDetail.validEndTime;
if (typeof driverDetail.validStartTime === 'string') {
validStartTime = new Date(driverDetail.validStartTime);
}
if (typeof driverDetail.validEndTime === 'string') {
validEndTime = new Date(driverDetail.validEndTime);
}
if (validStartTime?.getTime() >= validEndTime?.getTime()) {
this.service.msgSrv.warning('结束时间必须大于开始时间');
return;
}
}
const params: any = {
userId: this.route.snapshot.params.id,
mobile: this.userDetail?.phone,
@ -314,7 +327,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
driverDetail.validStartTime?.length === 10
? driverDetail.validStartTime
: this.datePipe.transform(driverDetail.validStartTime, 'yyyy-MM-dd')
},
}
// userPracticeSeniorityDTO: {
// appUserId: licenseDetail.appUserId || this.route.snapshot.params.id,
// approvalStatus: licenseDetail.approvalStatus,
@ -333,7 +346,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
// : this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd')
// }
};
if(licenseDetail.approvalStatus && licenseDetail.licenseNo && licenseDetail.regionCode) {
if (licenseDetail.approvalStatus && licenseDetail.licenseNo && licenseDetail.regionCode) {
params.userPracticeSeniorityDTO = {
appUserId: licenseDetail.appUserId || this.route.snapshot.params.id,
approvalStatus: licenseDetail.approvalStatus,
@ -350,9 +363,9 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
licenseDetail.validStartTime?.length === 10
? licenseDetail.validStartTime
: this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd')
}
};
}
console.log(params)
console.log(params);
this.service.request(this.service.$api_update_driver_license, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('修改成功');

View File

@ -1,5 +1,5 @@
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'" >
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
@ -44,34 +44,37 @@
</ng-container>
<ng-template #editButton>
<ng-container *ngIf="detailData?.approvalStatus===10">
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass()" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
通过
</button>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditNo()" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditNo()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
驳回
</button>
</ng-container>
<ng-container *ngIf="detailData?.approvalStatus!=10">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="enable"
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
(nzOnConfirm)="freezeOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
启用
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="frozen"
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
(nzOnConfirm)="freezeOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="!detailData?.stateLocked"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-lock']">
冻结
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="Payfrozen" (nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight"
*ngIf="detailData?.createPay === 1">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payfrozen"
(nzOnConfirm)="PayOrResume(0)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 1">
开通支付权限
</button>
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm
[nzPopconfirmTitle]="Payenable" (nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight"
*ngIf="detailData?.createPay === 0">
<button [disabled]="service.http.loading" nz-button nzDanger nz-popconfirm [nzPopconfirmTitle]="Payenable"
(nzOnConfirm)="PayOrResume(1)" nzPopconfirmPlacement="bottomRight" *ngIf="detailData?.createPay === 0">
关闭支付权限
</button>
</ng-container>
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-save']">
<button [disabled]="service.http.loading" nz-button nzDanger (click)="ratify()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-save']">
修改
</button>
</ng-template>
@ -145,6 +148,18 @@
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
nzTheme="fill" class="mr-xs"></i>驳回&nbsp;驳回原因:{{detailData?.approvalOpinion}}
</label>
<p style="margin-bottom: 0;">
四要素验证:
<label *ngIf="detailData?.esignCheckStatus===0" style="color: #ff4d4f;"><i nz-icon nzType="info-circle"
nzTheme="fill" class="mr-xs"></i>不通过&nbsp;&nbsp;驳回原因:{{detailData?.esignCheckMsg}}
</label>
<label *ngIf="detailData?.esignCheckStatus===1" style="color: #52c41a;"><i nz-icon nzType="check-circle"
nzTheme="fill" class="mr-xs"></i>通过
</label>
<label *ngIf="detailData?.esignCheckStatus===2" style="color: #1890ff;"><i nz-icon nzType="close-circle"
nzTheme="fill" class="mr-xs"></i>未认证
</label>
</p>
</sv-title>
<sv label="公司名称">
<input nz-input type="text" [(ngModel)]="detailData.enterpriseName" [readonly]="!isEdit" [nzBorderless]="!isEdit"
@ -172,8 +187,8 @@
<nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
</sv>
<sv label="营业期限" col="1">
<sv label="营业期限" col="3">
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
</nz-date-picker>
@ -188,7 +203,19 @@
<label nz-checkbox [ngModel]="!!!detailData.operatingEndTime"
(ngModelChange)="$event?detailData.operatingEndTime='':''" class="ml-sm">长期</label>
</ng-container>
</sv>
<sv label="常用服务" col="3">
<ng-container *ngIf="isEdit; else oftenUsedServiceselseTemplate">
<nz-select [(ngModel)]="detailData.oftenUsedServices">
<nz-option [nzValue]="10" nzLabel="整车发货"></nz-option>
<nz-option [nzValue]="20" nzLabel="大宗发货"></nz-option>
</nz-select>
</ng-container>
<ng-template #oftenUsedServiceselseTemplate>
<input nz-input type="text"
[ngModel]="detailData.oftenUsedServices?detailData.oftenUsedServices===10?'整车发货':'大宗发货':'-'"
[readonly]="!isEdit" [nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</ng-template>
</sv>
<sv label="公司所在地" col="3">
<ng-container *ngIf="isEdit; else cascaderelseTemplate">
@ -229,7 +256,7 @@
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit"
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
</sv>
<sv label="身份证有效期" col="1">
<sv label="身份证有效期" col="1">
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
class="calendar"></nz-date-picker>

View File

@ -1,31 +0,0 @@
/*
* @Author: your name
* @Date: 2021-11-29 20:19:08
* @LastEditTime: 2021-11-29 20:31:00
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FreightComponentsListDetailComponent } from './detail.component';
describe('FreightComponentsListDetailComponent', () => {
let component: FreightComponentsListDetailComponent;
let fixture: ComponentFixture<FreightComponentsListDetailComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [FreightComponentsListDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FreightComponentsListDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -33,6 +33,12 @@ export class FreightComponentsListDetailComponent implements OnInit {
approvalOpinion = '';
networkTransporter = null;
esignCheckStatus: any = {
0: '不通过',
1: '通过',
2: '未认证'
};
constructor(
public service: UsermanageService,
private route: ActivatedRoute,
@ -48,8 +54,7 @@ export class FreightComponentsListDetailComponent implements OnInit {
this.service.getNetworkFreightForwarder().subscribe(res => {
if (res) {
this.ltdId = res;
console.log(this.ltdId );
console.log(this.ltdId);
}
});
}
@ -68,7 +73,7 @@ export class FreightComponentsListDetailComponent implements OnInit {
Number(this.detailData.fullRegionVO?.cityCode),
Number(this.detailData.fullRegionVO?.areaCode)
];
console.log(this.enterpriseAddressCode)
console.log(this.enterpriseAddressCode);
}
console.log(res);
});