diff --git a/src/app/routes/commom/components/basic-table/basic-table.component.ts b/src/app/routes/commom/components/basic-table/basic-table.component.ts index ffd15394..ab7c5e86 100644 --- a/src/app/routes/commom/components/basic-table/basic-table.component.ts +++ b/src/app/routes/commom/components/basic-table/basic-table.component.ts @@ -15,6 +15,8 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy { drawer: Subscription[] = []; schema: SFSchema = {}; + deviationHeight = 0; + constructor(public searchDrawerService: SearchDrawerService) {} ngAfterViewInit(): void { @@ -66,11 +68,12 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy { scrollY -= headerWrapper.clientHeight; } // 计算所有tabs高度 - const tabset = document.getElementsByTagName('nz-tabset'); + const tabset = document.getElementsByTagName('nz-tabs-nav'); let tabsetHeight = 0; for (let index = 0; index < tabset.length; index++) { tabsetHeight += tabset[index].clientHeight; } + console.log('tabsetHeight', tabsetHeight); if (tabset) { scrollY -= tabsetHeight; } @@ -81,9 +84,14 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy { for (let index = 0; index < headerBox.length; index++) { headerBoxHeight += headerBox[index].clientHeight; } + console.log('headerBoxHeight', headerBoxHeight); + if (headerBox) { scrollY -= headerBoxHeight; } + if (typeof this.deviationHeight === 'number') { + scrollY -= this.deviationHeight; + } this.scrollY = scrollY + 'px'; } } diff --git a/src/app/routes/commom/less/commom-table.less b/src/app/routes/commom/less/commom-table.less index 2bc0f547..1fcbf112 100644 --- a/src/app/routes/commom/less/commom-table.less +++ b/src/app/routes/commom/less/commom-table.less @@ -42,12 +42,13 @@ } } - .header_box { - display : flex; - align-items : center; - justify-content: space-between; - min-height : 47px; + } + .double_tabset_box { + margin : -24px -24px 0; + background: #ffffff; + + .tab_header { .page_title { font-weight: bold; font-size : 17px; @@ -59,6 +60,13 @@ } } } + + .header_tab { + + nz-tabs-nav { + margin-bottom: 0; + } + } } .ant-table-pagination.ant-pagination { @@ -105,4 +113,23 @@ line-height: 21px; } } +} + + +.header_box { + display : flex; + align-items : center; + justify-content: space-between; + min-height : 47px; + + .page_title { + font-weight: bold; + font-size : 17px; + + .driver { + color : #ff4d4f; + margin-left : 17px; + margin-right: 6px; + } + } } \ No newline at end of file diff --git a/src/app/routes/order-management/components/risk/risk.component.ts b/src/app/routes/order-management/components/risk/risk.component.ts index eda512a5..118f1e60 100644 --- a/src/app/routes/order-management/components/risk/risk.component.ts +++ b/src/app/routes/order-management/components/risk/risk.component.ts @@ -37,7 +37,6 @@ export class OrderManagementRiskComponent extends BasicTableComponent implements constructor( public service: OrderManagementService, public shipperservice: ShipperBaseService, - private modal: NzModalService, public router: Router, public searchDrawerService: SearchDrawerService ) { diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.html b/src/app/routes/supply-management/components/bulk/bulk.component.html index 483a6ed1..15bdfa35 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.html +++ b/src/app/routes/supply-management/components/bulk/bulk.component.html @@ -8,30 +8,15 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - - + -
- -
- -
- +
-
+ -->
- - + + + + +
    +
  • + 审核 +
  • +
  • + 代发货源 +
  • +
+
- - - - - - - -
- - + +
+ + + + + +
-
- +
+ + +
+ - -
{{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}}
-
+ [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false"> + +
{{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : ''}}
+
{{ item?.freightPrice | currency }}
@@ -97,8 +88,7 @@
- ({{ item?.count }}) + ({{ item?.count }})
@@ -115,10 +105,12 @@
- +
- +
@@ -133,4 +125,4 @@
- --> + --> \ No newline at end of file diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index 1975e2f3..5055964a 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -3,32 +3,31 @@ import { Router } from '@angular/router'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component'; import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component'; @Component({ selector: 'app-supply-management-bulk', - templateUrl: './bulk.component.html' + templateUrl: './bulk.component.html', + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class SupplyManagementBulkComponent implements OnInit { +export class SupplyManagementBulkComponent extends BasicTableComponent implements OnInit { resourceStatus: any; ui: SFUISchema = {}; ui2: SFUISchema = {}; - schema: SFSchema = {}; auditMany = false; isVisible = false; loading: boolean = true; auditID: any; - _$expand = false; columns: STColumn[] = []; freightSchema: SFSchema = {}; @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; tabs: any = { @@ -37,12 +36,16 @@ export class SupplyManagementBulkComponent implements OnInit { receivedQuantity: 0, stayQuantity: 0 }; + deviationHeight = 10; constructor( public service: SupplyManagementService, private modal: NzModalService, private router: Router, - public shipperservice: ShipperBaseService - ) { } + public shipperservice: ShipperBaseService, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } ngOnInit(): void { this.initSF(); @@ -136,10 +139,7 @@ export class SupplyManagementBulkComponent implements OnInit { widget: 'dict-select', containsAllLabel: true, params: { dictKey: 'service:type' }, - containAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containAllLable: true } as SFSelectWidgetSchema }, settlementBasis: { @@ -149,10 +149,7 @@ export class SupplyManagementBulkComponent implements OnInit { widget: 'dict-select', containsAllLabel: true, params: { dictKey: 'goodresource:settlement:type' }, - containAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containAllLable: true } as SFSelectWidgetSchema }, releaseTime: { @@ -162,9 +159,6 @@ export class SupplyManagementBulkComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true } as SFDateWidgetSchema }, @@ -175,9 +169,6 @@ export class SupplyManagementBulkComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true } as SFDateWidgetSchema }, @@ -187,9 +178,6 @@ export class SupplyManagementBulkComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } @@ -202,9 +190,6 @@ export class SupplyManagementBulkComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, onSearch: (q: any) => { let str = q.replace(/^\s+|\s+$/g, ''); @@ -364,27 +349,7 @@ export class SupplyManagementBulkComponent implements OnInit { // .createStatic(FormEditComponent, { i: { id: 0 } }) // .subscribe(() => this.st.reload()); } - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } get selectedRows() { return this.st?.list.filter(item => item.checked) || []; } @@ -565,7 +530,7 @@ export class SupplyManagementBulkComponent implements OnInit { } }); } - userAction() { } + userAction() {} // 导出 exportFire() { this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList); diff --git a/src/app/routes/supply-management/components/index/index.component.html b/src/app/routes/supply-management/components/index/index.component.html index 5d61d68b..ebe89624 100644 --- a/src/app/routes/supply-management/components/index/index.component.html +++ b/src/app/routes/supply-management/components/index/index.component.html @@ -8,7 +8,7 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\index\\index.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + +
+
+ +
+ + + + + + + + +
\ No newline at end of file diff --git a/src/app/routes/supply-management/components/index/index.component.ts b/src/app/routes/supply-management/components/index/index.component.ts index 1cb8ec9c..17b7b0c7 100644 --- a/src/app/routes/supply-management/components/index/index.component.ts +++ b/src/app/routes/supply-management/components/index/index.component.ts @@ -2,17 +2,17 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFSchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { SearchDrawerService } from '@shared'; +import { BasicTableComponent } from 'src/app/routes/commom'; @Component({ selector: 'app-supply-management-index', templateUrl: './index.component.html', + styleUrls: ['../../../commom/less/commom-table.less'] }) export class SupplyManagementIndexComponent implements OnInit { selectedIndex = 0; - - constructor(private http: _HttpClient, private modal: ModalHelper) { } - - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.html b/src/app/routes/supply-management/components/vehicle/vehicle.component.html index 9ed09a00..bb5b6d6a 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.html @@ -10,28 +10,18 @@ --> - + - - - - - - - -
+ +
+ + + + + + +
+ +
-
- +
+
- - -
{{ item?.createUserName }}/{{ item?.createUserPhone }}
-
+ + +
{{ item?.createUserName }}/{{ item?.createUserPhone }}
+
{{ item?.resourceCode }}

{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}

@@ -97,25 +78,41 @@
- - - + + + + +
    +
  • + 审核 +
  • +
  • + 代发货源 +
  • +
  • + 导入货源 +
  • +
+
- +
- +
- +
-
+
\ No newline at end of file diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index dcaf4062..1d0f3c65 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -9,17 +9,17 @@ import { SupplyManagementService } from '../../services/supply-management.servic import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component'; import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component'; import { of } from 'rxjs'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component'; +import { BasicTableComponent } from 'src/app/routes/commom'; @Component({ selector: 'app-supply-management-vehicle', templateUrl: './vehicle.component.html', - styleUrls: ['./vehicle.component.less'] + styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less'] }) -export class SupplyManagementVehicleComponent implements OnInit { +export class SupplyManagementVehicleComponent extends BasicTableComponent implements OnInit { @ViewChild('st') private readonly st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; loading: boolean = true; schema: SFSchema = this.initSF(); @@ -38,13 +38,18 @@ export class SupplyManagementVehicleComponent implements OnInit { resourceStatus: any; auditID: any; + + deviationHeight = 10; constructor( public service: SupplyManagementService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute, - public shipperSrv: ShipperBaseService - ) { } + public shipperSrv: ShipperBaseService, + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -150,7 +155,7 @@ export class SupplyManagementVehicleComponent implements OnInit { /** * 导入货源 */ - importGoodsSource() { + importGoodsSource() { const modalRef = this.modal.create({ nzTitle: '货源导入', nzWidth: 600, @@ -181,25 +186,25 @@ export class SupplyManagementVehicleComponent implements OnInit { type: 'primary', loading: this.service.http.loading, onClick: () => { - if(!result?.failNumber) { + if (!result?.failNumber) { this.service.msgSrv.error('没有失败数据!'); tipsModal.destroy(); this.st?.reload(); this.getGoodsSourceStatistical(); return; } - this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids) + this.service.downloadFile(this.service.$api_getFailUploadGoodsOperateResource, result.ids); tipsModal.destroy(); this.st?.reload(); this.getGoodsSourceStatistical(); } - }, + } ] - }) - tipsModal.afterClose.subscribe(result => { + }); + tipsModal.afterClose.subscribe(result => { this.st?.reload(); - this.getGoodsSourceStatistical(); - }) + this.getGoodsSourceStatistical(); + }); } else { this.st?.reload(); this.getGoodsSourceStatistical(); @@ -207,7 +212,6 @@ export class SupplyManagementVehicleComponent implements OnInit { }); } - /** * 重新指派 */ @@ -396,9 +400,6 @@ export class SupplyManagementVehicleComponent implements OnInit { serverSearch: true, searchDebounceTime: 300, searchLoadingText: '搜索中...', - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true, onSearch: (q: any) => { let str = q.replace(/^\s+|\s+$/g, ''); @@ -434,10 +435,7 @@ export class SupplyManagementVehicleComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - } + placeholder: '请先选择货主' } as SFSelectWidgetSchema }, serviceType: { @@ -447,9 +445,6 @@ export class SupplyManagementVehicleComponent implements OnInit { widget: 'dict-select', containsAllLabel: true, params: { dictKey: 'service:type' }, - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true } as SFSelectWidgetSchema }, @@ -460,10 +455,7 @@ export class SupplyManagementVehicleComponent implements OnInit { widget: 'dict-select', allowClear: true, containsAllLabel: true, - params: { dictKey: 'goodresource:audit:status' }, - visibleIf: { - _$expand: (value: boolean) => value - } + params: { dictKey: 'goodresource:audit:status' } } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -473,9 +465,6 @@ export class SupplyManagementVehicleComponent implements OnInit { widget: 'select', placeholder: '请选择', asyncData: () => this.shipperSrv.getNetworkFreightForwarder(), - visibleIf: { - _$expand: (value: boolean) => value - }, allowClear: true } }