This commit is contained in:
Taric Xin
2022-01-12 10:47:36 +08:00
parent 9d8da4f37e
commit 75808bbaf5
27 changed files with 330 additions and 395 deletions

View File

@ -16,10 +16,9 @@
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -34,7 +33,7 @@
<st #st [columns]="columns" [data]='service.$api_get_user_expand'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">
<ng-template st-row="promotersTelephone" let-item let-index="index">
<a (click)="addPromoter(item)">

View File

@ -109,7 +109,7 @@
</ng-container>
<ng-template #editDriverButton>
<button *ngIf="driverDetail?.approvalStatus==10" nz-button nzType="default" nzDanger
(click)="approveDriver()">审核通过88</button>
(click)="approveDriver()">审核通过</button>
<button *ngIf="driverDetail?.approvalStatus==10" nz-button nzType="default" nzDanger
(click)="rejectedDriver()">驳回审核</button>
<button nz-button nzType="default" nzDanger (click)="ratify(1)">修改</button>

View File

@ -8,10 +8,9 @@
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" (click)="exportList()" [disabled]="service.http.loading">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -26,7 +25,7 @@
<st #st [columns]="columns" [data]='service.$api_get_driver_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">
<ng-template st-row="promotersTelephone" let-item let-index="index">
<a (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>

View File

@ -7,11 +7,10 @@
</div>
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button *ngIf="tabType === 1" nz-button nzType="primary" [nzLoading]="service.http.loading"
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button *ngIf="tabType === 1" nz-button nzType="primary" [disabled]="service.http.loading"
(click)="exportList()">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle(!_$expand)">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -23,7 +22,7 @@
<nz-card>
<!-- 数据列表 -->
<st #st multiSort [data]="service.$api_get_freight_list" [columns]="tabType===1?enterColumns:adminColumns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STComponent, STData } from '@delon/abc/st';
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from '../../../services/usercenter.service';
@ -34,16 +34,15 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
];
constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {}
/**
* 查询参数
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {}, {
flag: this.tabType
});
delete params._$expand;
return { ...params, listSource: 2 };
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value
});
}
Object.assign(requestOptions.body, { flag: this.tabType, listSource: 2 });
return requestOptions;
};
/**
* 伸缩查询条件
@ -65,13 +64,6 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
*/
ngOnInit() {}
/**
* 数据列表状态变化事件
*/
change(e: STChange) {
// console.log(e.checkbox);
}
/**
* 查看详情
*/
@ -145,7 +137,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
}
exportList() {
const params = this.reqParams;
const params = { ...this.sf.value, flag: this.tabType, listSource: 2 };
this.service.downloadFile(this.service.$api_export_enterprise, params);
}

View File

@ -8,11 +8,10 @@
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="creat()">新增企业</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" (click)="creat()">新增企业</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -27,7 +26,7 @@
<st #st [columns]="columns" [data]='service.$api_get_freight_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' }, process: dataProcess }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">
<ng-template st-row="enterpriseName" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
@ -51,7 +50,7 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="24" se-container [labelWidth]="80">
<se [col]="1" label="手机号">
<input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required/>
<input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
</se>
</div>
</div>

View File

@ -16,10 +16,9 @@
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
</div>
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
(click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">导出</button>
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="st?.load(1)">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -28,14 +27,20 @@
</div>
</nz-card>
<nz-card>
<nz-card class="content-box">
<nz-tabset [nzSelectedIndex]="1">
<nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
<nz-tab nzTitle="已成功" (nzClick)="selectChange(1)"></nz-tab>
<nz-tab nzTitle="已驳回" (nzClick)="selectChange(2)"></nz-tab>
</nz-tabset>
<!-- 数据列表 -->
<!-- [data]="service.$api_get_supplier_page" -->
<st #st [columns]="columns" [data]='service.$api_get_user_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loadingDelay]="500"
<st #st [columns]="columns" [data]='service.$api_get_user_list'
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [scroll]="{ x:'1200px',y: '400px' }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading">
<ng-template st-row="enterpriseName" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">

View File

@ -3,4 +3,10 @@
nz-range-picker {
width: 100%;
}
.content-box {
.ant-card-body {
padding-top: 6px;
}
}
}

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from '../../../services/usercenter.service';
@ -21,40 +21,41 @@ export class FreightComponentsUserComponent implements OnInit {
promoterModal!: any;
promotersTelephone = '';
resourceStatus: any = 0;
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
* 查询参数
*/
get reqParams() {
const params: any = {
...(this.sf && this.sf.value)
};
if (this.sf?.value.effectiveDate) {
Object.assign(params, {
time: {
start: this.sf?.value.effectiveDate[0],
end: this.sf?.value.effectiveDate[1]
}
});
// params.effectiveDateStart = this.sf?.value.effectiveDate[0];
// params.effectiveDateEnd = this.sf?.value.effectiveDate[1];
}
delete params.effectiveDate;
delete params.expand;
return params;
}
get selectedRows() {
return this.st?.list.filter(item => item.checked) || [];
}
ngOnInit() {
this.ar.url.subscribe(params => {
this.st?.load(1);
});
}
beforeReq = (requestOptions: STRequestOptions) => {
Object.assign(requestOptions.body, { certificationStatus: this.resourceStatus });
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value
});
if (this.sf?.value.effectiveDate) {
Object.assign(requestOptions.body, {
time: {
start: this.sf?.value.effectiveDate[0],
end: this.sf?.value.effectiveDate[1]
}
});
}
delete requestOptions.body.effectiveDate;
delete requestOptions.body.expand;
}
return requestOptions;
};
selectChange(e: any) {
this.resourceStatus = e;
this.st.load();
}
addPromoter(item?: any) {
this.promotersTelephone = item?.promotersTelephone;
const modal = this.modal.create({
@ -109,9 +110,6 @@ export class FreightComponentsUserComponent implements OnInit {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
creat() {
this.router.navigate(['./new'], { relativeTo: this.ar });
}
/**
* 重置表单