This commit is contained in:
Taric Xin
2022-04-25 10:29:41 +08:00
parent b8415bbac5
commit ca11cf85f4
18 changed files with 507 additions and 889 deletions

View File

@ -6,17 +6,10 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\abnormal-appear\\abnormal-appear.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)="search()" (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>
@ -32,57 +25,62 @@
</div>
</ng-container>
</div>
</nz-card> -->
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title"> <label class="driver">|</label> 异常上报</label>
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectedIndexChange)="selectChange($event)"
[nzTabBarExtraContent]="extraTemplate">
<nz-tab [nzTitle]="'待回复(' + tabs?.stayQuantity + ')'"></nz-tab>
<nz-tab [nzTitle]="'已回复(' + tabs?.receivedQuantity + ')'"> </nz-tab>
</nz-tabset>
</div>
<div>
<st #st [data]="service.$api_get_listOperatePage" [columns]="columns" [req]="{ params: reqParams }" [page]="{ }"
[loading]="false" [scroll]="{ x: '2000px' ,y:scrollY }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateFirstFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateSecondFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateThirdFilePath]">
</app-imagelist>
</div>
</div>
</ng-template>
</st>
<!-- <st #st2 *ngIf="selectedIndex===1" [data]="service.$api_get_listOperatePage" [columns]="columns2"
[req]="{ params: reqParams2 }" [page]="{ }" [loading]="false" [scroll]="{ x: '2000px',y:scrollY }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateFirstFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateSecondFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateThirdFilePath]"> </app-imagelist>
</div>
</div>
</ng-template>
</st> -->
</div>
</nz-card>
<nz-card class="content-box">
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectedIndexChange)="selectChange($event)">
<nz-tab [nzTitle]="'待回复(' + tabs?.stayQuantity + ')'">
<st #st [data]="service.$api_get_listOperatePage" [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"
[scroll]="{ x: '2000px' }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateFirstFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateSecondFilePath]">
</app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist style="width: 40px;height: 40px" [imgList]="[item?.exceptionCertificateThirdFilePath]">
</app-imagelist>
</div>
</div>
</ng-template>
</st>
</nz-tab>
<nz-tab [nzTitle]="'已回复(' + tabs?.receivedQuantity + ')'">
<st #st2 [data]="service.$api_get_listOperatePage" [columns]="columns2"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams2 }"
[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"
[scroll]="{ x: '2000px' }">
<ng-template st-row="exceptionCertificateFirstFilePath" let-item let-index="index">
<div class="imgBox">
<div *ngIf="item?.exceptionCertificateFirstFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateFirstFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateSecondFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateSecondFilePath]"> </app-imagelist>
</div>
<div *ngIf="item?.exceptionCertificateThirdFilePath">
<app-imagelist [imgList]="[item?.exceptionCertificateThirdFilePath]"> </app-imagelist>
</div>
</div>
</ng-template>
</st>
</nz-tab>
</nz-tabset>
</nz-card>
<ng-template #extraTemplate>
<div class="mr-sm">
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()" acl
[acl-ability]="['WAYBILL-ABNORMAL-search']">筛选</button>
</div>
</ng-template>
<ng-template #detailModal>
<div nz-row nzGutter="8">

View File

@ -10,32 +10,28 @@ import {
SFSelectWidgetSchema,
SFUISchema
} from '@delon/form';
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 { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({
selector: 'app-abnormal-appear',
templateUrl: './abnormal-appear.component.html',
styleUrls: ['./abnormal-appear.component.less']
styleUrls: ['../../../commom/less/commom-table.less', './abnormal-appear.component.less']
})
export class WaybillManagementAbnormalAppearComponent implements OnInit {
export class WaybillManagementAbnormalAppearComponent extends BasicTableComponent implements OnInit {
@ViewChild('detailModal', { static: true })
detailModal!: any;
@ViewChild('replyModal', { static: true })
replyModal!: any;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('st2', { static: true })
st2!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = {};
ui2: SFUISchema = {};
schema: SFSchema = {};
addSchema: SFSchema = {};
_$expand = false;
editText = '';
formData: any;
isVisible = false;
@ -74,44 +70,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '300px', className: 'text-left' },
{ title: '上报时间', index: 'createTime', width: '180px', className: 'text-center' },
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left', iif: _ => this.selectedIndex === 1 },
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left', iif: _ => this.selectedIndex === 1 },
{
title: '操作',
fixed: 'right',
width: '100px',
iif: _ => this.selectedIndex === 0,
className: 'text-center',
buttons: [{ text: '回复', click: item => this.replyAction(item) }]
}
];
columns2: STColumn[] = [
{
title: '异常编号',
index: 'exceptionCode',
width: '180px',
className: 'text-left',
type: 'link',
click: item => this.reviewDetailAction(item)
},
{ title: '异常类型', index: 'exceptionTypeLabel', width: '180px', className: 'text-left' },
{
title: '关联运单号',
index: 'wayBillCode',
width: '180px',
className: 'text-left',
type: 'link',
click: item => this.routeToBill(item)
},
{ title: '网络货运人', index: 'enterpriseInfoName', width: '180px', className: 'text-left' },
{ title: '货主', index: 'shipperAppUserName', width: '180px', className: 'text-left' },
{ title: '装货地', index: 'loadingAddressArr', width: '180px', className: 'text-left' },
{ title: '卸货地', index: 'unloadingAddressArr', width: '180px', className: 'text-left' },
{ title: '承运司机', index: 'driver', width: '200px', className: 'text-left' },
{ title: '异常信息', index: 'exceptionContent', width: '250px', className: 'text-left' },
{ title: '异常图片', render: 'exceptionCertificateFirstFilePath', width: '220px', className: 'text-left' },
{ title: '上报时间', index: 'createTime', width: '180px', className: 'text-left' },
{ title: '回复内容', index: 'replyContent', width: '180px', className: 'text-left' },
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left' },
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left' }
];
resourceStatus: number | undefined;
get reqParams() {
@ -140,28 +109,17 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
public service: WaybillManagementServe,
private nzModalService: NzModalService,
public shipperSrv: ShipperBaseService,
private router: Router
) {}
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {
this.initSF();
this.getGoodsSourceStatistical();
}
/**
* 伸缩查询条件
*/
expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
}
/**
* 查询字段个数
*/
get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
}
reviewDetailAction(item: any) {
this.itemInfo = {};
this.service.request(`${this.service.$api_get_listOperate_detail}${item.id}`, {}, 'GET').subscribe(res => {
@ -217,7 +175,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
exceptionCode: {
type: 'string',
title: '异常编号',
@ -259,9 +216,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
},
change: (q: any) => {
this.getRegionCode(q);
},
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
@ -270,29 +224,16 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
title: '所属项目',
ui: {
widget: 'select',
placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
}
placeholder: '请先选择货主'
} as SFSelectWidgetSchema
},
driverName: {
title: '承运司机',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
carNo: {
title: '车牌号',
type: 'string',
ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
}
type: 'string'
},
reportingTime: {
title: '上报时间',
@ -300,10 +241,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
_$expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
},
enterpriseInfoId: {
@ -312,9 +250,6 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value
},
allowClear: true,
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
}
@ -328,7 +263,7 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
this.resourceStatus = e;
setTimeout(() => {
this?.st?.load(1);
this?.st2?.load(1);
this.st.resetColumns();
}, 0);
}
getGoodsSourceStatistical() {
@ -351,11 +286,9 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
});
}
search() {
if (this.selectedIndex === 0) {
this.st?.load(1);
} else {
this.st2?.load(1);
}
console.log(this.st);
this.st?.load(1);
this.getGoodsSourceStatistical();
}
/**

View File

@ -7,24 +7,9 @@
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk\\bulk.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>
@ -40,32 +25,26 @@
</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?.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_Bulkpage"
[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>
<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?.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_Bulkpage" [columns]="columns"
[req]="{ params: reqParams }" [page]="{ }" [loading]="false">
<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>
@ -78,7 +57,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="freightPrice" let-item let-index="index">
@ -98,7 +77,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>
@ -107,3 +87,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-BULK-search']">筛选</button>
<button nz-button nzDanger acl [acl-ability]="['WAYBILL-BULK-export']" (click)="exprot()">导出</button>
</div>
</ng-template>

View File

@ -2,29 +2,24 @@ 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 { 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';
@Component({
selector: 'app-supply-management-bulk',
templateUrl: './bulk.component.html',
styleUrls: ['./bulk.component.less']
styleUrls: ['../../../commom/less/commom-table.less','./bulk.component.less']
})
export class WaybillManagementBulkComponent implements OnInit {
ui: SFUISchema = {};
export class WaybillManagementBulkComponent extends BasicTableComponent implements OnInit {
uiView: SFUISchema = {};
schema: SFSchema = {};
schemaView: SFSchema = {};
isVisibleEvaluate = false;
_$expand = false;
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
columns: STColumn[] = [];
resourceStatus: any;
tabs = {
@ -38,15 +33,19 @@ export class WaybillManagementBulkComponent implements OnInit {
constructor(
public service: WaybillManagementServe,
private modal: NzModalService,
public shipperservice: ShipperBaseService) { }
public shipperservice: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
/**
* 查询参数
*/
* 查询参数
*/
get reqParams() {
const a: any = {};
if (this.resourceStatus) {
a.wayBillStatus = this.resourceStatus
a.wayBillStatus = this.resourceStatus;
}
const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
@ -55,24 +54,22 @@ export class WaybillManagementBulkComponent implements OnInit {
...params,
createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
end: this.sf?.value?.createTime?.[1] || ''
}
};
}
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
return this.st?.list.filter(item => item.checked) || [];
}
ngOnInit(): void {
this.initSF();
this.initST();
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
}
/**
* 初始化查询表单
*/
* 初始化查询表单
*/
initSF() {
this.schema = {
properties: {
@ -104,68 +101,39 @@ export class WaybillManagementBulkComponent implements OnInit {
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => {
console.log(q)
let str =q.replace(/^\s+|\s+$/g,"");
console.log(q);
let str = q.replace(/^\s+|\s+$/g, '');
if (str) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: str})
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.request(this.service.$api_enterpriceList, { enterpriseName: str })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
} as SFSelectWidgetSchema,
}
} 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: '支付状态',
@ -173,11 +141,8 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'overall:payment:status' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
containsAllLabel: true
} as SFSelectWidgetSchema
},
serviceType: {
title: '服务类型',
@ -185,10 +150,7 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'service:type' },
visibleIf: {
_$expand: (value: boolean) => value
}
params: { dictKey: 'service:type' }
} as SFSelectWidgetSchema
},
@ -203,11 +165,8 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: {
widget: 'select',
allowClear: true,
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
},
placeholder: '请选择'
}
},
enterpriseInfoId: {
type: 'string',
@ -215,12 +174,9 @@ export class WaybillManagementBulkComponent implements OnInit {
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
}
},
createTime: {
title: '创建时间',
@ -229,16 +185,12 @@ export class WaybillManagementBulkComponent implements OnInit {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFDateWidgetSchema,
},
allowClear: true
} as SFDateWidgetSchema
}
},
type: 'object',
type: 'object'
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
/**
@ -288,15 +240,14 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '接单数量',
index: 'orderReceivingQuantity',
width: '200px',
className: 'text-left',
className: 'text-left'
},
{
title: '结算数量',
index: '结算数量',
width: '200px',
className: 'text-left',
format: (item: any) =>
`${item.settlementWeight || ''}`
format: (item: any) => `${item.settlementWeight || ''}`
},
{
title: '承运司机',
@ -308,7 +259,7 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '车队长',
className: 'text-left',
width: '200px',
render: 'payeeName',
render: 'payeeName'
},
{
title: '装卸货时间',
@ -320,7 +271,7 @@ export class WaybillManagementBulkComponent implements OnInit {
title: '创建时间',
width: '180px',
className: 'text-left',
index: 'createTime',
index: 'createTime'
},
{
title: '操作',
@ -330,81 +281,36 @@ export class WaybillManagementBulkComponent implements OnInit {
buttons: [
{
text: '确认发车',
click: (_record) => this.sureDepart(_record),
click: _record => this.sureDepart(_record),
iif: item => item.wayBillStatus == '2',
acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] },
acl: { ability: ['WAYBILL-BULK-insertBulkStartCarInfo'] }
},
{
text: '确认到车',
click: (_record) => this.sureArrive(_record),
click: _record => this.sureArrive(_record),
iif: item => item.wayBillStatus == '3',
acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] },
},
],
},
acl: { ability: ['WAYBILL-BULK-insertBulkUnloadCarInfo'] }
}
]
}
];
}
search() {
this.st?.load(1);
this.getGoodsSourceStatistical()
}
/**
* 查询字段个数
*/
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;
this.getGoodsSourceStatistical();
}
selectChange(e: number) {
console.log(e);
if (e >= 1) {
this.resourceStatus = e + 1;
} else {
this.resourceStatus = 0
this.resourceStatus = 0;
}
this.initST();
setTimeout(() => {
this.st.load(1);
}, 500);
}
/**
* 导入货源
*/
importGoodsSource() {
}
audit(item: any) {
console.log(item)
}
/**
* 审核通过按钮
*/
handleOK() {
}
/**
*查看评价
*/
viewEvaluate(item: any) {
console.log(item)
this.isVisibleEvaluate = true
}
getGoodsSourceStatistical() {
this.tabs = {
signQuantity: 0,
@ -415,7 +321,7 @@ export class WaybillManagementBulkComponent implements OnInit {
deltQuantity: 0
};
const params: any = Object.assign({}, this.reqParams || {});
delete params.wayBillStatus
delete params.wayBillStatus;
this.service.request(this.service.$api_get_getBulkStatistics, params).subscribe(res => {
if (res) {
let totalCount = 0;
@ -437,11 +343,11 @@ export class WaybillManagementBulkComponent implements OnInit {
this.tabs.deltQuantity = ele?.count;
break;
}
totalCount += ele.count
totalCount += ele.count;
});
this.tabs.totalQuantity = totalCount
this.tabs.totalQuantity = totalCount;
}
})
});
}
// *确认发车
@ -458,7 +364,7 @@ export class WaybillManagementBulkComponent implements OnInit {
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
});
}
// 确认到车
@ -475,11 +381,11 @@ export class WaybillManagementBulkComponent implements OnInit {
});
modalRef.afterClose.subscribe((result: any) => {
this.st.load(1);
this.getGoodsSourceStatistical()
this.getGoodsSourceStatistical();
});
}
// 导出
exprot() {
this.service.exportStart(this.reqParams,this.service.$api_asyncExportBulkList)
}
// 导出
exprot() {
this.service.exportStart(this.reqParams, this.service.$api_asyncExportBulkList);
}
}

View File

@ -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>

View File

@ -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();