edit
This commit is contained in:
@ -1,18 +1,6 @@
|
|||||||
<!--
|
|
||||||
* @Description :
|
|
||||||
* @Version : 1.0
|
|
||||||
* @Author : Shiming
|
|
||||||
* @Date : 2022-01-12 10:52:50
|
|
||||||
* @LastEditors : Shiming
|
|
||||||
* @LastEditTime : 2022-04-24 17:13:51
|
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html
|
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
|
||||||
-->
|
|
||||||
<!-- 页头 -->
|
<!-- 页头 -->
|
||||||
<page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
|
<!-- <page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 搜索区 -->
|
|
||||||
<!-- 搜索表单 -->
|
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
<div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
@ -32,10 +20,35 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card> -->
|
||||||
<nz-card [nzExtra]="extraTemplate">
|
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<!-- [data]="service.$api_get_supplier_page" -->
|
<!-- [data]="service.$api_get_supplier_page" -->
|
||||||
|
<nz-card class="table-box">
|
||||||
|
<div class="header_box">
|
||||||
|
<label class="page_title"> <label class="driver">|</label> 预收款余额</label>
|
||||||
|
<div class="mr-sm">
|
||||||
|
<button nz-button nzDanger [nzLoading]="loadingList" (click)="openDrawer()" acl
|
||||||
|
[acl-ability]="['USERCENTER-FREIGHT-LIST-list']">筛选</button>
|
||||||
|
<button nz-button nzDanger (click)="exportList()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-export']">
|
||||||
|
导出</button>
|
||||||
|
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
|
||||||
|
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
|
||||||
|
<nz-dropdown-menu #menu="nzDropdownMenu">
|
||||||
|
<ul nz-menu>
|
||||||
|
<li nz-menu-item (click)="creat()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-save']">
|
||||||
|
新增企业
|
||||||
|
</li>
|
||||||
|
<li nz-menu-item (click)="editPartner()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-partner']">
|
||||||
|
修改合伙人
|
||||||
|
</li>
|
||||||
|
<li nz-menu-item (click)="editSale()" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-sale']">
|
||||||
|
修改渠道销售
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nz-dropdown-menu>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<st #st [columns]="columns" [data]='service.$api_get_freight_list' [req]="{ process: beforeReq }"
|
<st #st [columns]="columns" [data]='service.$api_get_freight_list' [req]="{ process: beforeReq }"
|
||||||
[res]="{ process: dataProcess }" [scroll]="{ x: '1200px' }" [page]=" {}" [loading]="loadingList">
|
[res]="{ process: dataProcess }" [scroll]="{ x: '1200px' }" [page]=" {}" [loading]="loadingList">
|
||||||
@ -78,11 +91,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #extraTemplate>
|
<!-- <ng-template #extraTemplate>
|
||||||
<div>
|
<div>
|
||||||
<button nz-button nzType="primary" (click)="editPartner()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改合伙人
|
<button nz-button nzType="primary" (click)="editPartner()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改合伙人
|
||||||
</button>
|
</button>
|
||||||
<button nz-button nzType="primary" (click)="editSale()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改渠道销售
|
<button nz-button nzType="primary" (click)="editSale()" acl [acl-ability]="['ORDER-RISK-batchAudit']"> 修改渠道销售
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template> -->
|
||||||
@ -2,8 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
import { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||||
import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
|
import { DynamicSettingModalComponent, SearchDrawerService, ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { BasicTableComponent } from 'src/app/routes/commom';
|
||||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||||
import { UsermanageService } from '../../../services/usercenter.service';
|
import { UsermanageService } from '../../../services/usercenter.service';
|
||||||
import { EditPartnerComponentsAddComponent } from './editPartner/editPartner.component';
|
import { EditPartnerComponentsAddComponent } from './editPartner/editPartner.component';
|
||||||
@ -12,15 +13,11 @@ import { ShowServiceComponent } from './showService/showservice.component';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-Freight-components-list',
|
selector: 'app-Freight-components-list',
|
||||||
templateUrl: './list.component.html',
|
templateUrl: './list.component.html',
|
||||||
styleUrls: ['../../../../commom/less/expend-but.less']
|
styleUrls: ['../../../../commom/less/commom-table.less']
|
||||||
})
|
})
|
||||||
export class FreightComponentsListComponent implements OnInit {
|
export class FreightComponentsListComponent extends BasicTableComponent implements OnInit {
|
||||||
_$expand = false;
|
|
||||||
ui!: SFUISchema;
|
|
||||||
schema!: SFSchema;
|
|
||||||
columns!: STColumn[];
|
columns!: STColumn[];
|
||||||
@ViewChild('st', { static: false }) st!: STComponent;
|
@ViewChild('st', { static: false }) st!: STComponent;
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
|
||||||
|
|
||||||
@ViewChild('promoterModal', { static: false })
|
@ViewChild('promoterModal', { static: false })
|
||||||
promoterModal!: any;
|
promoterModal!: any;
|
||||||
@ -32,8 +29,11 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
private modal: NzModalService,
|
private modal: NzModalService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private ar: ActivatedRoute,
|
private ar: ActivatedRoute,
|
||||||
public shipperservice: ShipperBaseService
|
public shipperservice: ShipperBaseService,
|
||||||
) {}
|
public searchDrawerService: SearchDrawerService
|
||||||
|
) {
|
||||||
|
super(searchDrawerService);
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
@ -43,6 +43,10 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
search() {
|
||||||
|
this.st?.load(1);
|
||||||
|
}
|
||||||
|
|
||||||
beforeReq = (requestOptions: STRequestOptions) => {
|
beforeReq = (requestOptions: STRequestOptions) => {
|
||||||
Object.assign(requestOptions.body, { listSource: 1 });
|
Object.assign(requestOptions.body, { listSource: 1 });
|
||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
@ -129,9 +133,9 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
return this.st?.list.filter(item => item.checked) || [];
|
return this.st?.list.filter(item => item.checked) || [];
|
||||||
}
|
}
|
||||||
editPartner(record?: any) {
|
editPartner(record?: any) {
|
||||||
let status = 1
|
let status = 1;
|
||||||
if (record) {
|
if (record) {
|
||||||
status = 2
|
status = 2;
|
||||||
}
|
}
|
||||||
if (this.selectedRows.length <= 0 && !record) {
|
if (this.selectedRows.length <= 0 && !record) {
|
||||||
this.service.msgSrv.error('请选择订单!');
|
this.service.msgSrv.error('请选择订单!');
|
||||||
@ -159,9 +163,9 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
editSale(record?: any) {
|
editSale(record?: any) {
|
||||||
let status = 1
|
let status = 1;
|
||||||
if (record) {
|
if (record) {
|
||||||
status = 2
|
status = 2;
|
||||||
}
|
}
|
||||||
if (this.selectedRows.length <= 0 && !record) {
|
if (this.selectedRows.length <= 0 && !record) {
|
||||||
this.service.msgSrv.error('请选择订单!');
|
this.service.msgSrv.error('请选择订单!');
|
||||||
@ -237,10 +241,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
enum: [{ label: '全部', value: '' }],
|
enum: [{ label: '全部', value: '' }],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
oftenUsedServices: {
|
oftenUsedServices: {
|
||||||
@ -253,10 +254,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customerType: {
|
customerType: {
|
||||||
@ -269,10 +267,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
promotersTelephone: {
|
promotersTelephone: {
|
||||||
@ -280,10 +275,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
showRequired: false,
|
showRequired: false
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
partnerNamee: {
|
partnerNamee: {
|
||||||
@ -291,10 +283,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
showRequired: false,
|
showRequired: false
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customerServiceId: {
|
customerServiceId: {
|
||||||
@ -302,10 +291,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
showRequired: false,
|
showRequired: false
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
approvalUserName: {
|
approvalUserName: {
|
||||||
@ -313,10 +299,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
showRequired: false,
|
showRequired: false
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
@ -325,10 +308,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'sl-from-to-search',
|
widget: 'sl-from-to-search',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
nzShowTime: true,
|
nzShowTime: true
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
approvalTime: {
|
approvalTime: {
|
||||||
@ -337,10 +317,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'sl-from-to-search',
|
widget: 'sl-from-to-search',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
nzShowTime: true,
|
nzShowTime: true
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
lockedStatus: {
|
lockedStatus: {
|
||||||
@ -353,10 +330,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
source: {
|
source: {
|
||||||
@ -369,10 +343,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isExpired: {
|
isExpired: {
|
||||||
@ -385,10 +356,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select'
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networkTransporter: {
|
networkTransporter: {
|
||||||
@ -398,15 +366,11 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
|
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||||
visibleIf: {
|
|
||||||
expand: (value: boolean) => value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initST() {
|
initST() {
|
||||||
@ -543,10 +507,6 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
expandToggle() {
|
|
||||||
this._$expand = !this._$expand;
|
|
||||||
this.sf?.setValue('/expand', this._$expand);
|
|
||||||
}
|
|
||||||
creat() {
|
creat() {
|
||||||
this.router.navigate(['./new'], { relativeTo: this.ar });
|
this.router.navigate(['./new'], { relativeTo: this.ar });
|
||||||
}
|
}
|
||||||
@ -566,7 +526,6 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
resetSF() {
|
resetSF() {
|
||||||
this.sf.reset();
|
this.sf.reset();
|
||||||
this._$expand = false;
|
|
||||||
this.st.reload();
|
this.st.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,8 @@
|
|||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<button nz-button (click)="destroy()">取消</button>
|
<button nz-button (click)="destroy()">取消</button>
|
||||||
<div>
|
<div>
|
||||||
<button nz-button nzType="primary" (click)="search()"><i nz-icon nzType="search" nzTheme="outline"></i>查询</button>
|
<button nz-button nzType="primary" (click)="search()" [nzLoading]="http.loading"><i nz-icon
|
||||||
|
nzType="search" nzTheme="outline"></i>查询</button>
|
||||||
<button nz-button (click)="resetSF()"><i nz-icon nzType="redo" nzTheme="outline"></i>重置</button>
|
<button nz-button (click)="resetSF()"><i nz-icon nzType="redo" nzTheme="outline"></i>重置</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
|
import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { SearchDrawerService } from './search-drawer.service';
|
import { SearchDrawerService } from './search-drawer.service';
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ export class SearchDrawerComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
defaultValue = {};
|
defaultValue = {};
|
||||||
|
|
||||||
constructor(public service: SearchDrawerService) {}
|
constructor(public service: SearchDrawerService, public http: _HttpClient) {}
|
||||||
ngAfterViewInit(): void {}
|
ngAfterViewInit(): void {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user