Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -44,17 +44,17 @@
|
|||||||
<button [disabled]="service.http.loading" nz-button (click)="reset()">
|
<button [disabled]="service.http.loading" nz-button (click)="reset()">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save()">
|
<button [disabled]="service.http.loading" nz-button nzDanger (click)="save({})">
|
||||||
保存
|
保存
|
||||||
</button>
|
</button>
|
||||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass()" acl
|
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass(true)" acl
|
||||||
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
|
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
|
||||||
通过
|
通过
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #editButton>
|
<ng-template #editButton>
|
||||||
<ng-container *ngIf="detailData?.approvalStatus===10">
|
<ng-container *ngIf="detailData?.approvalStatus===10">
|
||||||
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass()" acl
|
<button [disabled]="service.http.loading" nz-button nzDanger (click)="auditPass(false)" acl
|
||||||
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
|
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-D-audit']">
|
||||||
通过
|
通过
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { apiConf } from '@conf/api.conf';
|
import { apiConf } from '@conf/api.conf';
|
||||||
import { DatePipe, _HttpClient } from '@delon/theme';
|
import { DatePipe, _HttpClient } from '@delon/theme';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
@ -48,6 +48,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
public service: UsermanageService,
|
public service: UsermanageService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private nzModalService: NzModalService,
|
private nzModalService: NzModalService,
|
||||||
|
private router: Router,
|
||||||
private datePipe: DatePipe
|
private datePipe: DatePipe
|
||||||
) {}
|
) {}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
@ -55,9 +56,11 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.route.params.subscribe(({ params }) => {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.loadltdId();
|
this.loadltdId();
|
||||||
this.loadRoles();
|
this.loadRoles();
|
||||||
|
});
|
||||||
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
|
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
|
||||||
this.scrollTop = document.documentElement.scrollTop;
|
this.scrollTop = document.documentElement.scrollTop;
|
||||||
});
|
});
|
||||||
@ -157,7 +160,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
auditPass() {
|
auditPass(isSave: boolean) {
|
||||||
this.networkTransporter = null;
|
this.networkTransporter = null;
|
||||||
this.roleId = null;
|
this.roleId = null;
|
||||||
this.nzModalService.create({
|
this.nzModalService.create({
|
||||||
@ -167,7 +170,15 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
if (!this.networkTransporter || !this.roleId) {
|
if (!this.networkTransporter || !this.roleId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (isSave) {
|
||||||
|
this.save({
|
||||||
|
passSave: true,
|
||||||
|
roleId: this.roleId,
|
||||||
|
networkTransporter: this.networkTransporter
|
||||||
|
});
|
||||||
|
} else {
|
||||||
this.auditEnterprise(20);
|
this.auditEnterprise(20);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -200,8 +211,8 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(res => {
|
.subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功');
|
this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功');
|
||||||
|
this.refreshData(status);
|
||||||
}
|
}
|
||||||
this.initData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +274,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
save(data: any) {
|
||||||
const dateil = { ...this.detailData };
|
const dateil = { ...this.detailData };
|
||||||
Object.assign(dateil.legalPersonIdentityVO, {
|
Object.assign(dateil.legalPersonIdentityVO, {
|
||||||
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
|
validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'),
|
||||||
@ -300,15 +311,28 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
|
|||||||
taxAuthority: dateil.taxAuthority,
|
taxAuthority: dateil.taxAuthority,
|
||||||
unifiedSocialCreditCode: dateil.unifiedSocialCreditCode
|
unifiedSocialCreditCode: dateil.unifiedSocialCreditCode
|
||||||
});
|
});
|
||||||
|
Object.assign(params, { ...data });
|
||||||
this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
|
this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('企业修改成功');
|
this.service.msgSrv.success('企业修改成功');
|
||||||
this.initData();
|
this.refreshData(data.passSave ? 20 : 10);
|
||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private refreshData(status: number) {
|
||||||
|
if (status === 20) {
|
||||||
|
this.service.request(this.service.$api_get_next_audit_freight, { id: this.route.snapshot.params.id }).subscribe(res => {
|
||||||
|
if (res?.id) {
|
||||||
|
this.router.navigate(['/usercenter/freight/enterprise/detail/' + res.id]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.initData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
|
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||||
checkIdCard(imgurl: any, isFront: string, type: number) {
|
checkIdCard(imgurl: any, isFront: string, type: number) {
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
@ -34,6 +34,8 @@ export class UsermanageService extends ShipperBaseService {
|
|||||||
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
|
$api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock';
|
||||||
// 企业审核
|
// 企业审核
|
||||||
$api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit';
|
$api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit';
|
||||||
|
// 查询下一个待审核的企业ID
|
||||||
|
$api_get_next_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/getNextWaitAuditId';
|
||||||
|
|
||||||
// 查询货主配置列表
|
// 查询货主配置列表
|
||||||
$api_freight_config_page = '/api/mdc/cuc/enterpriseInfo/operate/list/configPage';
|
$api_freight_config_page = '/api/mdc/cuc/enterpriseInfo/operate/list/configPage';
|
||||||
|
|||||||
Reference in New Issue
Block a user