This commit is contained in:
Taric Xin
2022-05-05 17:14:41 +08:00
parent d9d6546226
commit 283e6e4a26
12 changed files with 205 additions and 440 deletions

View File

@ -1,14 +1,4 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-02-15 13:35:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\enterprise-audit\\enterprise-audit.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'企业审核列表'" [content]="content">
<!-- <page-header-wrapper [title]="'企业审核列表'" [content]="content">
<ng-template #content>
<nz-tabset class="tabs-wrap">
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
@ -16,7 +6,6 @@
</ng-template>
</page-header-wrapper>
<nz-card class="mb-md">
<!-- 搜索表单 -->
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
@ -25,8 +14,8 @@
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-list']">查询</button>
<button *ngIf="tabType == 1" nz-button nzType="primary" [disabled]="false" (click)="exportList()"
acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']">导出</button>
<button *ngIf="tabType == 1" nz-button nzType="primary" [disabled]="false" (click)="exportList()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']">导出</button>
<button nz-button (click)="resetSF()" [disabled]="false">重置</button>
<button nz-button nzType="link" (click)="expandToggle(!_$expand)">
{{ !_$expand ? '展开' : '收起' }}
@ -34,12 +23,27 @@
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card>
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"><label class="driver">|</label>货主员工列表</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate">
<nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
</nz-tabset>
</div>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-list']" (click)="openDrawer()">筛选</button>
<button *ngIf="tabType == 1" nz-button nzDanger (click)="exportList()" acl
[acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']"> 导出</button>
</div>
</ng-template>
<!-- 数据列表 -->
<st #st multiSort [data]="service.$api_get_freight_list" [columns]="tabType===1?enterColumns:adminColumns"
[req]="{ process: beforeReq }" [page]=" {}" [loading]="false" [scroll]="{ x: '1200px' }">
[req]="{ process: beforeReq }" [page]=" {}" [loading]="false" [scroll]="{ x: '1200px',y:scrollY }">
<ng-template st-row="approvalStatus" let-item let-index="index">
<ng-container [ngSwitch]="item.approvalStatus">
<nz-badge *ngSwitchCase="10" nzColor="#108ee9" nzText="待审核"></nz-badge>

View File

@ -1,32 +0,0 @@
:host {
::ng-deep {
.tabs-wrap>.ant-tabs-nav {
margin-bottom: 0;
}
.myForm .ant-upload.ant-upload-select-picture-card>.ant-upload {
flex-direction: column !important;
}
span {
word-break: break-all
}
}
}
.expend-options {
margin-top: 0px;
}
@media (min-width: 990px) {
.expend-options {
margin-top: -40px;
max-width : 400px;
position : absolute;
right : 0;
bottom : 30px;
}
}

View File

@ -2,23 +2,22 @@ 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, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { BasicTableComponent } from 'src/app/routes/commom';
import { UsermanageService } from '../../../services/usercenter.service';
import { AuditAdminComponent } from './audit-admin/audit-admin.component';
@Component({
selector: 'app-Freight-components-enterprise-audit',
templateUrl: './enterprise-audit.component.html',
styleUrls: ['./enterprise-audit.component.less']
styleUrls: ['../../../../commom/less/commom-table.less']
})
export class FreightComponentsEnterpriseAuditComponent implements OnInit {
_$expand = false;
ui: SFUISchema = { '*': { spanLabelFixed: 90, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } };
schema: SFSchema = this.initSF();
export class FreightComponentsEnterpriseAuditComponent extends BasicTableComponent implements OnInit {
enterColumns: STColumn[] = this.initEnterST();
adminColumns: STColumn[] = this.initAdminST();
schema = this.initSF();
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
tabType = 1;
tabs = [
{
@ -45,7 +44,18 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
networkTransporter = null;
roleId = null;
customerServiceId = null;
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
constructor(
public service: UsermanageService,
private router: Router,
private modal: NzModalService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -65,21 +75,6 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
return requestOptions;
};
/**
* 伸缩查询条件
*/
expandToggle(status: boolean) {
this._$expand = status;
this.sf?.setValue('/expand', this._$expand);
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 程序初始化入口
*/
@ -221,7 +216,6 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
// 切换Tab
changeTab(item: any) {
this.tabType = item.type;
this.expandToggle(false);
this.sf?.reset();
this.st.data = this.tabType === 1 ? this.service.$api_get_freight_list : this.service.$api_get_enterprise_admin_list;
setTimeout(() => {
@ -240,7 +234,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
}
exportList() {
const params = { ...this.sf?.value, flag: this.tabType, listSource: 2, pageSize: -1 };
const params = { ...this.sf?.value, flag: this.tabType, listSource: 2, pageSize: -1 };
this.service.downloadFile(this.service.$api_export_enterprise, params);
}
@ -403,10 +397,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => this.tabType === 1
}
widget: 'select'
}
},
enterpriseAddressCode: {
@ -415,10 +406,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
enum: [{ label: '全部', value: '' }],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
widget: 'select'
}
},
oftenUsedServices: {
@ -431,10 +419,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
widget: 'select'
}
},
// approval11St11atus: {
@ -454,10 +439,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
type: 'string',
ui: {
placeholder: '请输入',
showRequired: false,
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
showRequired: false
}
},
mobile: {
@ -465,10 +447,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
type: 'string',
maxLength: 11,
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => this.tabType === 2
}
placeholder: '请输入'
}
},
approvalUserName: {
@ -476,10 +455,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
type: 'string',
maxLength: 11,
ui: {
placeholder: '请输入',
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
placeholder: '请输入'
}
},
createTime: {
@ -488,10 +464,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd HH:mm:ss',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
}
nzShowTime: true
} as SFDateWidgetSchema
},
approvalTime: {
@ -500,10 +473,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
ui: {
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd HH:mm:ss',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
nzShowTime: true
} as SFDateWidgetSchema
},
approvalStatus: {
@ -518,10 +488,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => value
}
widget: 'select'
}
},
source: {
@ -534,10 +501,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
],
default: '',
ui: {
widget: 'select',
visibleIf: {
expand: (value: boolean) => this.tabType === 1 && value
}
widget: 'select'
}
}
}