This commit is contained in:
Taric Xin
2022-02-24 16:53:11 +08:00
parent af019cb962
commit 24596c388d
11 changed files with 125 additions and 46 deletions

View File

@ -1,7 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from '../../../services/usercenter.service';
import { AuditAdminComponent } from './audit-admin/audit-admin.component';
@ -37,7 +37,11 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value
...this.sf.value,
createTime: {
start: this.sf.value.createTime?.[0] || '',
end: this.sf.value.createTime?.[1] || ''
}
});
}
Object.assign(requestOptions.body, { flag: this.tabType, listSource: 2 });
@ -151,10 +155,10 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
initEnterST(): STColumn[] {
return [
{ title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 350 },
{ title: '企业税号', className: 'text-center', index: 'unifiedSocialCreditCode', width: 180 },
{ title: '企业税号', className: 'text-center', index: 'unifiedSocialCreditCode', width: 190 },
{ title: '管理员', className: 'text-center', index: 'contacter', width: 150 },
{ title: '手机号', className: 'text-center', index: 'mobile', width: 140 },
{ title: '申请时间', className: 'text-center', index: 'createTime', width: 160 },
{ title: '注册时间', className: 'text-center', index: 'createTime', width: 170 },
{
title: '审核状态',
className: 'text-center',
@ -287,6 +291,19 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
expand: (value: boolean) => value
}
}
},
createTime: {
title: '注册时间',
type: 'string',
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
} as SFDateWidgetSchema
}
}
};

View File

@ -354,6 +354,11 @@
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option>
</nz-select>
</se>
<se [col]="1" label="企业角色" required>
<nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId">
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option>
</nz-select>
</se>
</div>
</div>
</ng-template>

View File

@ -28,9 +28,11 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
disabledUpload = false;
enterpriseAddressCode: any = [];
ltdId: any = [];
roles: any = [];
approvalOpinion = '';
networkTransporter = null;
roleId = null;
esignCheckStatus: any = {
0: '不通过',
@ -55,6 +57,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
ngOnInit() {
this.initData();
this.loadltdId();
this.loadRoles();
this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => {
this.scrollTop = document.documentElement.scrollTop;
});
@ -66,6 +69,13 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
}
});
}
loadRoles() {
this.service.getRoles({ enterpriseId: 0, projectId: 0 }).subscribe(res => {
if (res) {
this.roles = res;
}
});
}
initData() {
this.service
@ -149,11 +159,12 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
auditPass() {
this.networkTransporter = null;
this.roleId = null;
this.nzModalService.create({
nzTitle: '审核通过',
nzContent: this.approvedModal,
nzOnOk: () => {
if (!this.networkTransporter) {
if (!this.networkTransporter || !this.roleId) {
return false;
}
this.auditEnterprise(20);
@ -163,6 +174,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
}
auditNo() {
this.approvalOpinion = '';
this.roleId = null;
this.nzModalService.create({
nzTitle: '审核驳回',
nzContent: this.redectModal,
@ -183,7 +195,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy {
id: this.detailData.id,
approvalOpinion: this.approvalOpinion,
networkTransporter: this.networkTransporter,
roleIds: [1]
roleId: this.roleId || null
})
.subscribe(res => {
if (res) {

View File

@ -47,7 +47,7 @@
</div>
</ng-template>
<ng-template st-row="contacter" let-item let-index="index">
{{ item.contacter }}/{{item.mobile}}
{{ item.contacter }}<br>/{{item.mobile}}
</ng-template>
<ng-template st-row="promotersTelephone" let-item let-index="index">
<a acl [acl-ability]="['USERCENTER-FREIGHT-LIST-salesman']" (click)="addPromoter(item)">{{ item.promotersTelephone

View File

@ -179,15 +179,28 @@ export class FreightComponentsListComponent implements OnInit {
initST() {
this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' },
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' , width: 350},
{ title: '企业税号', className: 'text-center', index: 'unifiedSocialCreditCode', width: 180 },
{ title: '管理员', className: 'text-center', render: 'contacter' },
{ title: '审核人', className: 'text-center', index: 'approvalUserName' },
{ title: '网络货运人', className: 'text-center', index: 'netTranName' },
{ title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } },
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '货主注册', 2: '平台添加', 3: '运营添加' } },
{ title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 350 },
{ title: '企业税号', className: 'text-center', index: 'unifiedSocialCreditCode', width: 200 },
{ title: '管理员', className: 'text-center', render: 'contacter', width: 150 },
{ title: '审核人', className: 'text-center', index: 'approvalUserName', width: 130 },
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 180 },
{
title: '常用服务',
className: 'text-center',
index: 'oftenUsedServices',
type: 'enum',
enum: { 10: '整车发货', 20: '大宗发货' },
width: 140
},
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone', width: 150 },
{
title: '注册渠道',
className: 'text-center',
index: 'source',
type: 'enum',
enum: { 1: '货主注册', 2: '平台添加', 3: '运营添加' },
width: 130
},
{
title: '企业状态',
className: 'text-center',
@ -196,15 +209,17 @@ export class FreightComponentsListComponent implements OnInit {
badge: {
0: { text: '正常', color: 'success' },
1: { text: '冻结', color: 'error' }
}
},
width: 130
},
{
title: '操作',
width: '110px',
className: 'text-center',
fixed: 'right',
buttons: [
{ type: 'divider' },
{
text: '查看<br/>',
text: '查看<br>',
acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] },
click: item => {
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });

View File

@ -598,18 +598,6 @@ export class FreightComponentsListNewComponent implements OnInit {
},
title99: { title: '', type: 'string', ui: { widget: 'custom' } },
adminMobile: {
title: ' 企业管理员手机号',
type: 'string',
minLength: 1,
format: 'mobile',
maxLength: 11,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入企业管理员手机号',
errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
}
},
tipsA: {
title: '企业管理员证件照',
type: 'string',
@ -663,6 +651,18 @@ export class FreightComponentsListNewComponent implements OnInit {
placeholder: '请输入企业管理员姓名'
}
},
adminMobile: {
title: ' 企业管理员手机号',
type: 'string',
minLength: 1,
format: 'mobile',
maxLength: 11,
ui: {
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
placeholder: '请输入企业管理员手机号',
errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
}
},
certificateNumber: {
title: '企业管理员身份证号',
type: 'string',