UI
This commit is contained in:
		@ -25,7 +25,7 @@ export class BasicSettingComponent implements OnInit {
 | 
				
			|||||||
  configList: any = [];
 | 
					  configList: any = [];
 | 
				
			||||||
  isCanSave = false;
 | 
					  isCanSave = false;
 | 
				
			||||||
  constructor(public service: SystemService, private acl: ACLService) {
 | 
					  constructor(public service: SystemService, private acl: ACLService) {
 | 
				
			||||||
    this.isCanSave = !!acl.data.abilities?.find(a => a === 'SYSTEM-BASIC_SETTING-save');
 | 
					    this.isCanSave = acl.data.full || !!acl.data.abilities?.find(a => a === 'SYSTEM-BASIC_SETTING-save');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ngOnInit() {
 | 
					  ngOnInit() {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,17 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!-- <page-header-wrapper [title]="'司机列表'"></page-header-wrapper>
 | 
				
			||||||
 * @Description  : 
 | 
					 | 
				
			||||||
 * @Version      : 1.0
 | 
					 | 
				
			||||||
 * @Author       : Shiming
 | 
					 | 
				
			||||||
 * @Date         : 2022-01-12 13:35:56
 | 
					 | 
				
			||||||
 * @LastEditors  : Shiming
 | 
					 | 
				
			||||||
 * @LastEditTime : 2022-02-28 14:17:40
 | 
					 | 
				
			||||||
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\driver\\driver.component.html
 | 
					 | 
				
			||||||
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
<!-- 页头 -->
 | 
					 | 
				
			||||||
<page-header-wrapper [title]="'司机列表'"></page-header-wrapper>
 | 
					 | 
				
			||||||
<nz-card>
 | 
					<nz-card>
 | 
				
			||||||
  <!-- 搜索表单 -->
 | 
					 | 
				
			||||||
  <div nz-row nzGutter="8">
 | 
					  <div nz-row nzGutter="8">
 | 
				
			||||||
    <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
 | 
					    <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
 | 
				
			||||||
      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
 | 
					      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
 | 
				
			||||||
@ -27,25 +15,40 @@
 | 
				
			|||||||
      </button>
 | 
					      </button>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</nz-card>
 | 
					</nz-card> -->
 | 
				
			||||||
<nz-card class="content-box">
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<nz-card class="table-box">
 | 
				
			||||||
 | 
					  <div class="tab_header">
 | 
				
			||||||
 | 
					    <label class="page_title"><label class="driver">|</label>司机列表</label>
 | 
				
			||||||
    <nz-tabset [nzSelectedIndex]="1" [nzTabBarExtraContent]="extraTemplate">
 | 
					    <nz-tabset [nzSelectedIndex]="1" [nzTabBarExtraContent]="extraTemplate">
 | 
				
			||||||
      <nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
 | 
					      <nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
 | 
				
			||||||
      <nz-tab nzTitle="待审核" (nzClick)="selectChange(10)"></nz-tab>
 | 
					      <nz-tab nzTitle="待审核" (nzClick)="selectChange(10)"></nz-tab>
 | 
				
			||||||
      <nz-tab nzTitle="已审核" (nzClick)="selectChange(20)"></nz-tab>
 | 
					      <nz-tab nzTitle="已审核" (nzClick)="selectChange(20)"></nz-tab>
 | 
				
			||||||
    </nz-tabset>
 | 
					    </nz-tabset>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <!-- 数据列表 -->
 | 
					  <!-- 数据列表 -->
 | 
				
			||||||
  <st #st [columns]="columns" [scroll]="{x: '1200px'}" [data]='service.$api_get_driver_list'
 | 
					  <st #st [columns]="columns" [scroll]="{x: '1200px',y:scrollY}" [data]='service.$api_get_driver_list'
 | 
				
			||||||
    [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
 | 
					    [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
 | 
				
			||||||
    [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
 | 
					    [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
 | 
				
			||||||
    [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
 | 
					    [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
 | 
				
			||||||
    [loading]="service.http.loading">
 | 
					    [loading]="service.http.loading">
 | 
				
			||||||
    <ng-template st-row="promotersTelephone" let-item let-index="index">
 | 
					    <ng-template st-row="promotersTelephone" let-item let-index="index">
 | 
				
			||||||
      <a (click)="addPromoter(item)"  acl  [acl-ability]="['USERCENTER-DRIVER-LIST-promoter']">{{ item.promotersTelephone || '添加' }}</a>
 | 
					
 | 
				
			||||||
 | 
					      <ng-container *ngIf="item.promotersTelephone; else promotersTelephoneTemplate">
 | 
				
			||||||
 | 
					        <a (click)="addPromoter(item)">{{
 | 
				
			||||||
 | 
					          item.promotersTelephone
 | 
				
			||||||
 | 
					          || '添加' }}</a>
 | 
				
			||||||
 | 
					      </ng-container>
 | 
				
			||||||
 | 
					      <ng-template #promotersTelephoneTemplate>
 | 
				
			||||||
 | 
					        <a (click)="addPromoter(item)" acl [acl-ability]="['USERCENTER-DRIVER-LIST-promoter']">添加</a>
 | 
				
			||||||
 | 
					      </ng-template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
    <ng-template st-row="carNo" let-item let-index="index">
 | 
					    <ng-template st-row="carNo" let-item let-index="index">
 | 
				
			||||||
      <a (click)="viewCar(item)" >{{ item?.carNo  }}</a>
 | 
					      <a (click)="viewCar(item)">{{ item?.carNo }}</a>
 | 
				
			||||||
    </ng-template>
 | 
					    </ng-template>
 | 
				
			||||||
  </st>
 | 
					  </st>
 | 
				
			||||||
</nz-card>
 | 
					</nz-card>
 | 
				
			||||||
@ -60,7 +63,11 @@
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</ng-template>
 | 
					</ng-template>
 | 
				
			||||||
<ng-template #extraTemplate>
 | 
					<ng-template #extraTemplate>
 | 
				
			||||||
  <div>
 | 
					  <div class="mr-sm">
 | 
				
			||||||
 | 
					    <button nz-button nzDanger [nzLoading]="service.http.loading" acl [acl-ability]="['USERCENTER-DRIVER-LIST-list']"
 | 
				
			||||||
 | 
					      (click)="openDrawer()">筛选</button>
 | 
				
			||||||
 | 
					    <button nz-button nzDanger (click)="exportList()" acl [acl-ability]="['USERCENTER-DRIVER-LIST-export']">
 | 
				
			||||||
 | 
					      导出</button>
 | 
				
			||||||
    <button nz-button nzType="primary" (click)="add()">添加司机</button>
 | 
					    <button nz-button nzType="primary" (click)="add()">添加司机</button>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</ng-template>
 | 
					</ng-template>
 | 
				
			||||||
@ -3,21 +3,19 @@ import { ActivatedRoute, Router } from '@angular/router';
 | 
				
			|||||||
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
 | 
					import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
 | 
				
			||||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
 | 
					import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
 | 
				
			||||||
import { ModalHelper } from '@delon/theme';
 | 
					import { ModalHelper } from '@delon/theme';
 | 
				
			||||||
import { DynamicSettingModalComponent } from '@shared';
 | 
					import { DynamicSettingModalComponent, SearchDrawerService } from '@shared';
 | 
				
			||||||
import { NzModalService } from 'ng-zorro-antd/modal';
 | 
					import { NzModalService } from 'ng-zorro-antd/modal';
 | 
				
			||||||
 | 
					import { BasicTableComponent } from 'src/app/routes/commom';
 | 
				
			||||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
 | 
					import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
 | 
				
			||||||
import { UsermanageService } from '../../services/usercenter.service';
 | 
					import { UsermanageService } from '../../services/usercenter.service';
 | 
				
			||||||
import { CarSettleAddDriverComponent } from './add-driver/add-driver.component';
 | 
					import { CarSettleAddDriverComponent } from './add-driver/add-driver.component';
 | 
				
			||||||
@Component({
 | 
					@Component({
 | 
				
			||||||
  selector: 'app-usercenter-components-driver',
 | 
					  selector: 'app-usercenter-components-driver',
 | 
				
			||||||
  styleUrls: ['./driver.component.less'],
 | 
					  styleUrls: ['../../../commom/less/commom-table.less'],
 | 
				
			||||||
  templateUrl: './driver.component.html'
 | 
					  templateUrl: './driver.component.html'
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
export class UserCenterComponentsDriverComponent implements OnInit {
 | 
					export class UserCenterComponentsDriverComponent extends BasicTableComponent implements OnInit {
 | 
				
			||||||
  _$expand = false;
 | 
					 | 
				
			||||||
  @ViewChild('st', { static: false }) st!: STComponent;
 | 
					  @ViewChild('st', { static: false }) st!: STComponent;
 | 
				
			||||||
  @ViewChild('sf', { static: false }) sf!: SFComponent;
 | 
					 | 
				
			||||||
  ui: SFUISchema = { '*': { spanLabelFixed: 130, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
 | 
					 | 
				
			||||||
  schema: SFSchema = this.initSF();
 | 
					  schema: SFSchema = this.initSF();
 | 
				
			||||||
  columns: STColumn[] = this.initST();
 | 
					  columns: STColumn[] = this.initST();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -31,8 +29,15 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
    private modal: NzModalService,
 | 
					    private modal: NzModalService,
 | 
				
			||||||
    private router: Router,
 | 
					    private router: Router,
 | 
				
			||||||
    private ar: ActivatedRoute,
 | 
					    private ar: ActivatedRoute,
 | 
				
			||||||
    private modalHelper: ModalHelper
 | 
					    private modalHelper: ModalHelper,
 | 
				
			||||||
  ) {}
 | 
					    public searchDrawerService: SearchDrawerService
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
 | 
					    super(searchDrawerService);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  search() {
 | 
				
			||||||
 | 
					    this.st?.load(1);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
   * 查询参数
 | 
					   * 查询参数
 | 
				
			||||||
@ -127,18 +132,6 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  expandToggle() {
 | 
					 | 
				
			||||||
    this._$expand = !this._$expand;
 | 
					 | 
				
			||||||
    this.sf?.setValue('/expand', this._$expand);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * 重置表单
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  resetSF() {
 | 
					 | 
				
			||||||
    this.sf.reset();
 | 
					 | 
				
			||||||
    this._$expand = false;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  exportList() {
 | 
					  exportList() {
 | 
				
			||||||
    const params = this.reqParams;
 | 
					    const params = this.reqParams;
 | 
				
			||||||
    this.service.downloadFile(this.service.$api_export_driver, { ...params, pageSize: -1 });
 | 
					    this.service.downloadFile(this.service.$api_export_driver, { ...params, pageSize: -1 });
 | 
				
			||||||
@ -188,10 +181,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          ],
 | 
					          ],
 | 
				
			||||||
          default: '',
 | 
					          default: '',
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'select',
 | 
					            widget: 'select'
 | 
				
			||||||
            visibleIf: {
 | 
					 | 
				
			||||||
              expand: (value: boolean) => value
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        practiceSenioritLicenseStatus: {
 | 
					        practiceSenioritLicenseStatus: {
 | 
				
			||||||
@ -206,10 +196,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          ],
 | 
					          ],
 | 
				
			||||||
          default: '',
 | 
					          default: '',
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'select',
 | 
					            widget: 'select'
 | 
				
			||||||
            visibleIf: {
 | 
					 | 
				
			||||||
              expand: (value: boolean) => value
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        promotersTelephone: {
 | 
					        promotersTelephone: {
 | 
				
			||||||
@ -217,10 +204,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
          maxLength: 11,
 | 
					          maxLength: 11,
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            placeholder: '请输入手机号',
 | 
					            placeholder: '请输入手机号'
 | 
				
			||||||
            visibleIf: {
 | 
					 | 
				
			||||||
              expand: (value: boolean) => value
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        source: {
 | 
					        source: {
 | 
				
			||||||
@ -234,10 +218,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          ],
 | 
					          ],
 | 
				
			||||||
          default: '',
 | 
					          default: '',
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'select',
 | 
					            widget: 'select'
 | 
				
			||||||
            visibleIf: {
 | 
					 | 
				
			||||||
              expand: (value: boolean) => value
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        effectiveDate: {
 | 
					        effectiveDate: {
 | 
				
			||||||
@ -246,10 +227,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'date',
 | 
					            widget: 'date',
 | 
				
			||||||
            mode: 'range',
 | 
					            mode: 'range',
 | 
				
			||||||
            format: 'yyyy-MM-dd',
 | 
					            format: 'yyyy-MM-dd'
 | 
				
			||||||
            visibleIf: {
 | 
					 | 
				
			||||||
              expand: (value: boolean) => value
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          } as SFDateWidgetSchema
 | 
					          } as SFDateWidgetSchema
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -304,7 +282,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
 | 
				
			|||||||
          '-1': { text: '未提交', color: 'default' },
 | 
					          '-1': { text: '未提交', color: 'default' },
 | 
				
			||||||
          1: { text: '已提交', color: 'processing' },
 | 
					          1: { text: '已提交', color: 'processing' },
 | 
				
			||||||
          2: { text: '已通过', color: 'success' },
 | 
					          2: { text: '已通过', color: 'success' },
 | 
				
			||||||
          3: { text: '已过期', color: 'error' },
 | 
					          3: { text: '已过期', color: 'error' }
 | 
				
			||||||
          // 10: { text: '待审核', color: 'default' },
 | 
					          // 10: { text: '待审核', color: 'default' },
 | 
				
			||||||
          // 20: { text: '审核通过', color: 'success' },
 | 
					          // 20: { text: '审核通过', color: 'success' },
 | 
				
			||||||
          // 30: { text: '驳回', color: 'warning' },
 | 
					          // 30: { text: '驳回', color: 'warning' },
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<nz-card class="table-box">
 | 
					<nz-card class="table-box">
 | 
				
			||||||
  <div class="tab_header">
 | 
					  <div class="tab_header">
 | 
				
			||||||
    <label class="page_title"><label class="driver">|</label>货主员工列表</label>
 | 
					    <label class="page_title"><label class="driver">|</label>企业审核列表</label>
 | 
				
			||||||
    <nz-tabset [nzTabBarExtraContent]="extraTemplate">
 | 
					    <nz-tabset [nzTabBarExtraContent]="extraTemplate">
 | 
				
			||||||
      <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
 | 
					      <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
 | 
				
			||||||
    </nz-tabset>
 | 
					    </nz-tabset>
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<nz-card class="table-box">
 | 
					<nz-card class="table-box">
 | 
				
			||||||
  <div class="tab_header">
 | 
					  <div class="tab_header">
 | 
				
			||||||
    <label class="page_title"><label class="driver">|</label>企业审核列表</label>
 | 
					    <label class="page_title"><label class="driver">|</label>货主员工列表</label>
 | 
				
			||||||
    <nz-tabset [nzSelectedIndex]="1" [nzTabBarExtraContent]="extraTemplate">
 | 
					    <nz-tabset [nzSelectedIndex]="1" [nzTabBarExtraContent]="extraTemplate">
 | 
				
			||||||
      <nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
 | 
					      <nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
 | 
				
			||||||
      <nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
 | 
					      <nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user