edit
This commit is contained in:
@ -7,31 +7,18 @@
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle\\vehicle.component.html
|
||||
-->
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<!-- <page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="ui"
|
||||
[mode]="'search'"
|
||||
[disabled]="!sf?.valid"
|
||||
[loading]="false"
|
||||
(formSubmit)="st?.load(1)"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
<ng-container *ngIf="queryFieldCount > 4">
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl [acl-ability]="['WAYBILL-VEHICLE-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['WAYBILL-VEHICLE-export']" (click)="exprot()">导出</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()" acl
|
||||
[acl-ability]="['WAYBILL-VEHICLE-search']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="false" acl [acl-ability]="['WAYBILL-VEHICLE-export']"
|
||||
(click)="exprot()">导出</button>
|
||||
<button nz-button [disabled]="false" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
@ -40,36 +27,32 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</nz-card>
|
||||
</nz-card> -->
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待接单(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px">
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
[scroll]="{ x: '2000px' }"
|
||||
[data]="service.$api_get_wholePage"
|
||||
[columns]="columns"
|
||||
<nz-card class="table-box">
|
||||
<div class="tab_header">
|
||||
<label class="page_title"> <label class="driver">|</label> 整车运单</label>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待接单(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待发车(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'运输中(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待签收(' + tabs?.signQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已完成(' + tabs?.compolatelQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.deltQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
</div>
|
||||
<div>
|
||||
<st #st [bordered]="true" [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_get_wholePage" [columns]="columns"
|
||||
[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] }"
|
||||
[loading]="false"
|
||||
>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" [loading]="false">
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="createUserName" let-item let-index="index">
|
||||
<div> {{ item?.createUserName }}/{{ item?.createUserPhone }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.driverLicenseCarNo }} </div>
|
||||
</ng-template>
|
||||
@ -95,7 +78,7 @@
|
||||
<span>{{item?.wayBillStatusLabel}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span >{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span>
|
||||
<span>{{item?.resourceTypeLabel}}{{item?.serviceTypeLabel}}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="wayBill" let-item let-index="index">
|
||||
@ -103,7 +86,8 @@
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsInfos" let-item let-index="index">
|
||||
<div>{{ item?.goodsInfos?.goodsName }}</div>
|
||||
<div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{ item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div>
|
||||
<div>{{ item?.goodsInfos?.weight }}{{ item?.goodsInfos?.volume? '/' +item?.goodsInfos?.volume : '' }}{{
|
||||
item?.goodsInfos?.number ? '/' + item?.goodsInfos?.number : '' }}</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="loadingTime" let-item let-index="index">
|
||||
<div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
|
||||
@ -112,3 +96,11 @@
|
||||
</st>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div class="mr-sm">
|
||||
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
|
||||
[acl-ability]="['WAYBILL-VEHICLE-search']">筛选</button>
|
||||
<button nz-button nzDanger acl [acl-ability]="['WAYBILL-VEHICLE-export']" (click)="exprot()">导出</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -2,11 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { SearchDrawerService, ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BasicTableComponent } from 'src/app/routes/commom';
|
||||
import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component';
|
||||
import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component';
|
||||
import { WaybillManagementServe } from '../../services/waybill-management.service';
|
||||
@ -14,17 +15,13 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
|
||||
@Component({
|
||||
selector: 'app-supply-management-vehicle',
|
||||
templateUrl: './vehicle.component.html',
|
||||
styleUrls: ['./vehicle.component.less', '../../../commom/less/expend-but.less', '../../../commom/less/box.less']
|
||||
styleUrls: ['../../../commom/less/commom-table.less', './vehicle.component.less']
|
||||
})
|
||||
export class WaybillManagementVehicleComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
export class WaybillManagementVehicleComponent extends BasicTableComponent implements OnInit {
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
_$expand = false;
|
||||
resourceStatus: any;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
tabs = {
|
||||
signQuantity: 0,
|
||||
@ -35,7 +32,14 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
compolatelQuantity: 0,
|
||||
deltQuantity: 0
|
||||
};
|
||||
constructor(public service: WaybillManagementServe, private modal: NzModalService, public shipperservice: ShipperBaseService) {}
|
||||
constructor(
|
||||
public service: WaybillManagementServe,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public searchDrawerService: SearchDrawerService
|
||||
) {
|
||||
super(searchDrawerService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
@ -99,9 +103,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
onSearch: (q: any) => {
|
||||
let str = q.replace(/^\s+|\s+$/g, '');
|
||||
if (str) {
|
||||
@ -123,57 +124,29 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请先选择货主',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
placeholder: '请先选择货主'
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
loadingPlace: {
|
||||
type: 'string',
|
||||
title: '装货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
title: '装货地'
|
||||
},
|
||||
dischargePlace: {
|
||||
type: 'string',
|
||||
title: '卸货地',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
title: '卸货地'
|
||||
},
|
||||
|
||||
driverName: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
type: 'string'
|
||||
},
|
||||
licenseCarNo: {
|
||||
title: '车牌号',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
type: 'string'
|
||||
},
|
||||
carCaptainName: {
|
||||
title: '车队长',
|
||||
type: 'string',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
type: 'string'
|
||||
},
|
||||
paymentstatus: {
|
||||
title: '支付状态',
|
||||
@ -181,10 +154,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'overall:payment:status' },
|
||||
containsAllLabel: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
containsAllLabel: true
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
serviceType: {
|
||||
@ -193,10 +163,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'service:type' },
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
params: { dictKey: 'service:type' }
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
|
||||
@ -211,10 +178,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
allowClear: true
|
||||
}
|
||||
},
|
||||
enterpriseInfoId: {
|
||||
@ -223,9 +187,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||
}
|
||||
@ -237,16 +198,12 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
allowClear: true
|
||||
} as SFDateWidgetSchema
|
||||
}
|
||||
},
|
||||
type: 'object'
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
@ -364,29 +321,9 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {
|
||||
console.log(item);
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF(): void {
|
||||
this.sf.reset();
|
||||
this._$expand = false;
|
||||
}
|
||||
search() {
|
||||
this.st?.load(1);
|
||||
this.getGoodsSourceStatistical();
|
||||
|
||||
Reference in New Issue
Block a user