From d4a4b45194901f0986f6d74e4671913d66e64979 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 9 Dec 2021 16:46:40 +0800 Subject: [PATCH] edit --- .../contract-list.component.less | 1 + .../driver-account-detail.component.less | 4 + .../driver-account.component.less | 6 +- .../freight-account-detail.component.less | 5 +- .../freight-account.component.less | 4 + .../recharge-record.component.html | 2 +- .../recharge-record.component.less | 11 - .../etc-invoiced-logs.component.less | 6 +- .../etc-invoiced-requested.component.html | 2 +- .../etc-invoiced-requested.component.less | 5 +- .../invoice-requested.component.less | 4 + .../invoiced-list.component.less | 4 + .../components/driver/driver.component.html | 86 ++--- .../components/driver/driver.component.less | 22 ++ .../driver/driver.component.spec.ts | 31 -- .../components/driver/driver.component.ts | 302 +++++++++--------- .../enterprise-audit.component.less | 6 +- .../components/freight/user/user.component.ts | 6 +- 18 files changed, 235 insertions(+), 272 deletions(-) create mode 100644 src/app/routes/usercenter/components/driver/driver.component.less delete mode 100644 src/app/routes/usercenter/components/driver/driver.component.spec.ts diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.less b/src/app/routes/contract-management/components/contract-list/contract-list.component.less index 3579aa56..e275a512 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.less +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.less @@ -29,6 +29,7 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; + z-index : -99; } } \ No newline at end of file diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less index 97e3643e..56c8dbf5 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.less @@ -23,6 +23,10 @@ @media (min-width: 990px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/financial-management/components/driver-account/driver-account.component.less b/src/app/routes/financial-management/components/driver-account/driver-account.component.less index f8d28003..bb5275a2 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account.component.less +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.less @@ -24,6 +24,10 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; - } + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; + } } \ No newline at end of file diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less index 97e3643e..39e9adeb 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.less @@ -23,6 +23,9 @@ @media (min-width: 990px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } - } \ No newline at end of file diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.less b/src/app/routes/financial-management/components/freight-account/freight-account.component.less index f8d28003..25f8aa16 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.less +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.less @@ -24,6 +24,10 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html index 7e99d504..39c71405 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html @@ -27,7 +27,7 @@ [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" [button]="'none'"> -
diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less index 97e3643e..2936df5d 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.less @@ -15,14 +15,3 @@ width: 100%; } } - -.expend-options { - margin-top: 0px; -} - -@media (min-width: 990px) { - .expend-options { - margin-top: -40px; - } - -} \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.less b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.less index 3579aa56..528ee028 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.less +++ b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.less @@ -26,9 +26,13 @@ } -@media (min-width: 1200px) { +@media (min-width: 900px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.html b/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.html index 4bb31236..d7896ee5 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.html +++ b/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.html @@ -24,7 +24,7 @@ -
+
已选择 diff --git a/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.less b/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.less index 3579aa56..fa54474b 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.less +++ b/src/app/routes/ticket-management/components/etc-invoiced-requested/etc-invoiced-requested.component.less @@ -29,6 +29,9 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } - } \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less index 3579aa56..9b585022 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.less @@ -29,6 +29,10 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.less b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.less index 55b8191b..01444c35 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.less +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.less @@ -25,6 +25,10 @@ @media (min-width: 1200px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/usercenter/components/driver/driver.component.html b/src/app/routes/usercenter/components/driver/driver.component.html index 76715051..36971ab3 100644 --- a/src/app/routes/usercenter/components/driver/driver.component.html +++ b/src/app/routes/usercenter/components/driver/driver.component.html @@ -1,83 +1,37 @@ - -
- -
- - +
+ +
+
+ + + +
- - - - -
- -
-
- - - - -
-
- - -
-
- {{ item.enterpriseName }} -
-
-
+ [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" + [loading]="service.http.loading"> -
- {{ item.contactsPhone }} +
+ {{ item.contactsPhone }}
- - 冻结 - 正常 - - + \ No newline at end of file diff --git a/src/app/routes/usercenter/components/driver/driver.component.less b/src/app/routes/usercenter/components/driver/driver.component.less new file mode 100644 index 00000000..4d14e2a8 --- /dev/null +++ b/src/app/routes/usercenter/components/driver/driver.component.less @@ -0,0 +1,22 @@ +.expend-options { + margin-top: 0px; +} + + +@media (min-width: 1200px) { + .expend-options { + margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; + } + +} + +:host::ng-deep { + + nz-range-picker { + width: 100%; + } +} \ No newline at end of file diff --git a/src/app/routes/usercenter/components/driver/driver.component.spec.ts b/src/app/routes/usercenter/components/driver/driver.component.spec.ts deleted file mode 100644 index f2b5ea4e..00000000 --- a/src/app/routes/usercenter/components/driver/driver.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * @Author: your name - * @Date: 2021-11-30 16:56:15 - * @LastEditTime: 2021-11-30 17:00:07 - * @LastEditors: your name - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\driver\driver.component.spec.ts - */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { UserCenterComponentsDriverComponent } from './driver.component'; - -describe('UserCenterComponentsDriverComponent', () => { - let component: UserCenterComponentsDriverComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [UserCenterComponentsDriverComponent], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserCenterComponentsDriverComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/usercenter/components/driver/driver.component.ts b/src/app/routes/usercenter/components/driver/driver.component.ts index 3ed64981..b7eacc1b 100644 --- a/src/app/routes/usercenter/components/driver/driver.component.ts +++ b/src/app/routes/usercenter/components/driver/driver.component.ts @@ -1,176 +1,54 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STColumnBadge, STComponent, STData } 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'; @Component({ selector: 'app-usercenter-components-driver', - templateUrl: './driver.component.html', + styleUrls: ['./driver.component.less'], + templateUrl: './driver.component.html' }) export class UserCenterComponentsDriverComponent implements OnInit { _$expand = false; url = `/rule?_allow_anonymous=true`; - ui!: SFUISchema; - schema!: SFSchema; + ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } }; + schema: SFSchema = this.initSF(); columns!: STColumn[]; - datalist = [ - { - storeName: '企业名称', - contactsName: '152746565', - enterpriseName: '湖南', - unifiedSocialCreditCode: '45454', - contactsPhone: '*97889461561', - effectiveDateStr: '废弃eww', - enStatusStr2: '正常', - enStatusStr3: '正常', - unifiedSocialCreditCode3: '常用服务', - unifiedSocialCreditCode2: '正常', - tenantId: 1 - }, - { - storeName: '企业名称', - contactsName: '152746565', - enterpriseName: '湖南', - unifiedSocialCreditCode: '45454', - contactsPhone: '*97889461561', - effectiveDateStr: '废弃eww', - enStatusStr2: '正常', - enStatusStr3: '正常', - unifiedSocialCreditCode3: '常用服务', - unifiedSocialCreditCode2: '正常', - tenantId: 2 - }, - ] @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} - /** - * 查询字段个数navigate - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } /** * 查询参数 */ get reqParams() { const params: any = { - ...(this.sf && this.sf.value), + ...(this.sf && this.sf.value) }; if (this.sf?.value.effectiveDate) { - params.effectiveDateStart = this.sf?.value.effectiveDate[0]; - params.effectiveDateEnd = this.sf?.value.effectiveDate[1]; + 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.initSF(); this.initST(); - this.ar.url.subscribe((params) => { + this.ar.url.subscribe(params => { this.st?.load(1); }); } - dataProcess(data: STData[]): STData[] { - return data.map((i, index) => { - i.showSortFlag = false; - return i; - }); - } - initSF() { - this.schema = { - properties: { - expand: { - type: 'boolean', - ui: { - hidden: true, - }, - }, - storeName: { title: '司机姓名', type: 'string', ui: { showRequired: false } }, - phone: { - title: '手机号', - type: 'string', - format: 'mobile', - maxLength: 11, - ui: { - placeholder: '请输入手机号', - }, - }, - enStatus: { - type: 'string', - title: '实名状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, - }, - }, - enStatus2: { - type: 'string', - title: '驾驶证状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, - }, - }, - enStatus23: { - type: 'string', - title: '从业资格证状态', - enum: [ - { label: '全部', value: '' }, - { label: '正常', value: 0 }, - { label: '冻结', value: 1 }, - { label: '废弃', value: 2 }, - ], - default: '', - ui: { - widget: 'select', - visibleIf: { - expand: (value: boolean) => value, - }, - }, - }, - phone2: { - title: '业务员手机号', - type: 'string', - format: 'mobile', - maxLength: 11, - ui: { - placeholder: '请输入手机号', - }, - }, - - }, - }; - this.ui = { '*': { spanLabelFixed: 180, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; - } initST() { this.columns = [ @@ -179,14 +57,17 @@ export class UserCenterComponentsDriverComponent implements OnInit { { title: '手机号', className: 'text-center', index: 'contactsName' }, { title: '承运总单量', className: 'text-center', render: 'enterpriseName' }, { title: '当前车辆', className: 'text-center', index: 'unifiedSocialCreditCode' }, - { title: '实名认证状态', className: 'text-center', index: 'effectiveDateStr', - type: 'badge', - badge: { - 正常: { text: '正常', color: 'success' }, - 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, + { + title: '实名认证状态', + className: 'text-center', + index: 'effectiveDateStr', + type: 'badge', + badge: { + 正常: { text: '正常', color: 'success' }, + 冻结: { text: '冻结', color: 'warning' }, + 废弃: { text: '废弃', color: 'default' } + } }, - }, { title: '驾驶证状态', className: 'text-center', @@ -195,8 +76,8 @@ export class UserCenterComponentsDriverComponent implements OnInit { badge: { 正常: { text: '正常', color: 'success' }, 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, - }, + 废弃: { text: '废弃', color: 'default' } + } }, { title: '从业资格证状态', @@ -206,8 +87,8 @@ export class UserCenterComponentsDriverComponent implements OnInit { badge: { 正常: { text: '正常', color: 'success' }, 冻结: { text: '冻结', color: 'warning' }, - 废弃: { text: '废弃', color: 'default' }, - }, + 废弃: { text: '废弃', color: 'default' } + } }, { title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' }, { title: '注册时间', className: 'text-center', index: 'unifiedSocialCreditCode3' }, @@ -218,13 +99,13 @@ export class UserCenterComponentsDriverComponent implements OnInit { buttons: [ { text: '查看', - click: (item) => { + click: item => { this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar }); // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); - }, - }, - ], - }, + } + } + ] + } ]; } daoyun(item: any) { @@ -235,7 +116,7 @@ export class UserCenterComponentsDriverComponent implements OnInit { this.sf?.setValue('/expand', this._$expand); } creat() { - this.router.navigate(['./new',], { relativeTo: this.ar }); + this.router.navigate(['./new'], { relativeTo: this.ar }); } /** * 重置表单 @@ -244,4 +125,117 @@ export class UserCenterComponentsDriverComponent implements OnInit { this.sf.reset(); this._$expand = false; } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + name: { title: '司机姓名', type: 'string', ui: { placeholder: '请输入', showRequired: false } }, + mobile: { + title: '手机号', + type: 'string', + format: 'mobile', + maxLength: 11, + ui: { + placeholder: '请输入' + } + }, + identityStatus: { + type: 'string', + title: '实名状态', + enum: [ + { label: '全部', value: '' }, + { label: '待审核', value: 0 }, + { label: '通过', value: 1 }, + { label: '驳回', value: 2 } + ], + default: '', + ui: { + widget: 'select' + } + }, + driverLicenseStatus: { + type: 'string', + title: '驾驶证状态', + enum: [ + { label: '全部', value: '' }, + { label: '待审核', value: 10 }, + { label: '审核通过', value: 20 }, + { label: '驳回', value: 30 }, + { label: '证件过期', value: 40 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + practiceSenioritLicenseStatus: { + type: 'string', + title: '从业资格证状态', + enum: [ + { label: '全部', value: '' }, + { label: '待审核', value: 10 }, + { label: '审核通过', value: 20 }, + { label: '驳回', value: 30 }, + { label: '证件过期', value: 40 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + promotersTelephone: { + title: '推广业务员', + type: 'string', + format: 'mobile', + maxLength: 11, + ui: { + placeholder: '请输入手机号', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + source: { + type: 'string', + title: '注册渠道', + enum: [ + { label: '全部', value: '' }, + { label: '自己录入', value: 1 }, + { label: '货主录入', value: 2 } + ], + default: '', + ui: { + widget: 'select', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + effectiveDate: { + title: '申请时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + } + } + }; + } } diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.less b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.less index 0e1403ad..ca2b433d 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.less +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.less @@ -15,9 +15,13 @@ } -@media (min-width: 1200px) { +@media (min-width: 990px) { .expend-options { margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; } } \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/user/user.component.ts b/src/app/routes/usercenter/components/freight/user/user.component.ts index e70731f9..f1d1cc49 100644 --- a/src/app/routes/usercenter/components/freight/user/user.component.ts +++ b/src/app/routes/usercenter/components/freight/user/user.component.ts @@ -11,7 +11,7 @@ import { UsermanageService } from '../../../services/usercenter.service'; }) export class FreightComponentsUserComponent implements OnInit { _$expand = false; - ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; + ui: SFUISchema = { '*': { spanLabelFixed: 120, grid: {lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } }; schema: SFSchema = this.initSF(); columns: STColumn[] = this.initST(); @ViewChild('st', { static: false }) st!: STComponent; @@ -108,7 +108,7 @@ export class FreightComponentsUserComponent implements OnInit { this._$expand = false; } - initSF(): SFSchema { + private initSF(): SFSchema { return { properties: { expand: { @@ -186,7 +186,7 @@ export class FreightComponentsUserComponent implements OnInit { }; } - initST(): STColumn[] { + private initST(): STColumn[] { return [ { title: '用户姓名', className: 'text-center', index: 'name' }, { title: '手机号', className: 'text-center', index: 'telephone' },