解决冲突
This commit is contained in:
@ -1,23 +1,56 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-17 20:24:17
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-24 17:04:41
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\freight-config\\freight-config.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<page-header-wrapper [title]="'货主配置'"></page-header-wrapper>
|
||||
<nz-card class="search-box">
|
||||
<!-- 搜索表单 -->
|
||||
<!-- 搜索表单 -->
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]=" 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
|
||||
[compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]=" 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button>
|
||||
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24, gutter: 4 } } }"
|
||||
[compact]="true"
|
||||
[button]="'none'"
|
||||
></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" class="text-right">
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
[nzLoading]="service.http.loading"
|
||||
(click)="st?.load(1)"
|
||||
acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-list']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-export']"
|
||||
>导出</button
|
||||
>
|
||||
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<!-- 数据列表 -->
|
||||
<st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading">
|
||||
</st>
|
||||
</nz-card>
|
||||
<!-- 数据列表 -->
|
||||
<st
|
||||
#st
|
||||
[data]="service.$api_freight_config_page"
|
||||
[columns]="columns"
|
||||
[req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading"
|
||||
[scroll]="{ x: '1200px', y: '500px' }"
|
||||
>
|
||||
</st>
|
||||
</nz-card>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent, STRequestOptions, STData } from '@delon/abc/st';
|
||||
import { SFUISchema, SFSchema, SFComponent } from '@delon/form';
|
||||
import { SFUISchema, SFSchema, SFComponent, SFDateWidgetSchema } from '@delon/form';
|
||||
import { ShipperBaseService, DynamicSettingModalComponent } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||
@ -17,7 +17,7 @@ export class FreightConfigComponent implements OnInit {
|
||||
columns: STColumn[] = this.initST();
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
|
||||
_$expand = false;
|
||||
constructor(public service: UsermanageService, private modal: NzModalService, public shipperservice: ShipperBaseService) {}
|
||||
|
||||
ngOnInit() {
|
||||
@ -28,7 +28,11 @@ export class FreightConfigComponent implements OnInit {
|
||||
Object.assign(requestOptions.body, { listSource: 1 });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value
|
||||
...this.sf.value,
|
||||
createTime: {
|
||||
start: this.sf?.value.effectiveDate[0],
|
||||
end: this.sf?.value.effectiveDate[1]
|
||||
}
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
@ -82,18 +86,25 @@ export class FreightConfigComponent implements OnInit {
|
||||
}
|
||||
this.service.downloadFile(this.service.$api_export_enterprise, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
resetSF(): void {
|
||||
this.sf.reset();
|
||||
this.st.reload();
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
enterpriseName: {
|
||||
title: '企业名称',
|
||||
type: 'string',
|
||||
@ -111,22 +122,47 @@ export class FreightConfigComponent implements OnInit {
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsSurchargeRatio: {
|
||||
title: '货源单费率',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
showRequired: false
|
||||
}
|
||||
},
|
||||
contractSurchargeRatio: {
|
||||
title: '合同单费率',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
showRequired: false,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
}
|
||||
},
|
||||
effectiveDate: {
|
||||
title: '注册时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
allowClear: true,
|
||||
} as SFDateWidgetSchema,
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 160 },
|
||||
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 160 },
|
||||
{
|
||||
title: '合同单费率',
|
||||
className: 'text-right',
|
||||
index: 'contractSurchargeRatio',
|
||||
width: 140,
|
||||
format: item => `${item.contractSurchargeRatio}%`
|
||||
},
|
||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 250 },
|
||||
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 250 },
|
||||
{
|
||||
title: '货源单费率',
|
||||
className: 'text-right',
|
||||
@ -134,10 +170,17 @@ export class FreightConfigComponent implements OnInit {
|
||||
width: 140,
|
||||
format: item => `${item.goodsSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单费率',
|
||||
className: 'text-right',
|
||||
index: 'contractSurchargeRatio',
|
||||
width: 140,
|
||||
format: item => `${item.contractSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单业务量(元)',
|
||||
index: 'contractQuota',
|
||||
width: 100,
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) }
|
||||
@ -145,14 +188,21 @@ export class FreightConfigComponent implements OnInit {
|
||||
{
|
||||
title: '货源单业务量(元)',
|
||||
index: 'goodsQuota',
|
||||
width: 100,
|
||||
width: 180,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.goodsQuota }) }
|
||||
},
|
||||
{
|
||||
title: '注册时间',
|
||||
index: 'createTime',
|
||||
width: 180,
|
||||
className: 'text-right',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '110px',
|
||||
fixed: 'right',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user