edit
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
<page-header-wrapper title="基础配置">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="6">
|
||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8" nzOffset="1">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
|
||||
<div class="d-flex justify-content-end mb-sm">
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="printOrder()" >打印面单</button>
|
||||
</div>
|
||||
</div>
|
||||
<st #st [data]="url" [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]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,102 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { TicketService } from '../../services/ticket.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-express-info',
|
||||
templateUrl: './express-info.component.html',
|
||||
styleUrls: ['./express-info.component.less']
|
||||
})
|
||||
export class ExpressInfoComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
receiveName: {
|
||||
title: '配置类型',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
// asyncData: () => {
|
||||
// return this.service.request(this.service.$api_getAppRoleList).pipe(
|
||||
// map((res: any) => {
|
||||
// this.roleList = res;
|
||||
// return res.map((item: any) => {
|
||||
// return { label: item.roleName, value: item.id };
|
||||
// });
|
||||
// }),
|
||||
// );
|
||||
// },
|
||||
change: (i: any) => {
|
||||
this.sf.value.receiveName = i;
|
||||
this.sf?.setValue('/receiveName', i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '配置类型', index: 'no' },
|
||||
{ title: '配置项', index: 'description' },
|
||||
{
|
||||
title: '启用状态',
|
||||
className: 'text-center',
|
||||
index: 'status',
|
||||
type: 'badge',
|
||||
badge: {
|
||||
0: { text: '启用', color: 'success' },
|
||||
2: { text: '停用', color: 'error' },
|
||||
3: { text: '停用', color: 'error' },
|
||||
1: { text: '停用', color: 'error' }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
}
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
printOrder() {
|
||||
this.nzModalService.warning({
|
||||
nzTitle: '确认打印面单所选快递单?',
|
||||
nzClosable: false,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import { ETCBlacklistComponent } from './components/etc-blacklist/etc-blacklist.
|
||||
import { ETCInvoicedListComponent } from './components/etc-invoiced-list/etc-invoiced-list.component';
|
||||
import { ETCInvoicedLogsComponent } from './components/etc-invoiced-logs/etc-invoiced-logs.component';
|
||||
import { ETCInvoicedRequestedComponent } from './components/etc-invoiced-requested/etc-invoiced-requested.component';
|
||||
import { ExpressInfoComponent } from './components/express-info/express-info.component';
|
||||
import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-collection-invoice/edit-collection-invoice.component';
|
||||
import { InputInvoiceDetailComponent } from './components/input-invoice/input-invoice-detail/input-invoice-detail.component';
|
||||
import { InputInvoiceComponent } from './components/input-invoice/input-invoice.component';
|
||||
@ -26,7 +27,8 @@ const routes: Routes = [
|
||||
{ path: 'etc-blacklist', component: ETCBlacklistComponent },
|
||||
{ path: 'input-invoice', component: InputInvoiceComponent },
|
||||
{ path: 'input-invoice/detail/:id', component: InputInvoiceDetailComponent },
|
||||
{ path: 'input-invoice/edit/:id', component: EditCollectionInvoiceComponent }
|
||||
{ path: 'input-invoice/edit/:id', component: EditCollectionInvoiceComponent },
|
||||
{ path: 'express-info', component: ExpressInfoComponent },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -23,6 +23,7 @@ import { AddCollectionInvoiceModalComponent } from './components/input-invoice/a
|
||||
import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-collection-invoice/edit-collection-invoice.component';
|
||||
import { AddCostDetailComponent } from './components/input-invoice/add-cost-detail/add-cost-detail.component';
|
||||
import { PrintOrderModalComponent } from './components/invoice-requested/print-order-modal/print-order-modal.component';
|
||||
import { ExpressInfoComponent } from './components/express-info/express-info.component';
|
||||
|
||||
const COMPONENTS: any = [
|
||||
ETCInvoicedListComponent,
|
||||
@ -37,7 +38,8 @@ const COMPONENTS: any = [
|
||||
PushInvoiceComponent,
|
||||
InputInvoiceComponent,
|
||||
InputInvoiceDetailComponent,
|
||||
EditCollectionInvoiceComponent
|
||||
EditCollectionInvoiceComponent,
|
||||
ExpressInfoComponent
|
||||
];
|
||||
const NOTROUTECOMPONENTS: any = [
|
||||
TransactionDetailsComponent,
|
||||
@ -46,10 +48,11 @@ const NOTROUTECOMPONENTS: any = [
|
||||
AddOwnerComponent,
|
||||
AddCartComponent,
|
||||
AddCollectionInvoiceModalComponent,
|
||||
AddCostDetailComponent
|
||||
AddCostDetailComponent,
|
||||
PrintOrderModalComponent
|
||||
];
|
||||
@NgModule({
|
||||
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS, PrintOrderModalComponent],
|
||||
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS],
|
||||
imports: [CommonModule, TicketManagementRoutingModule, SharedModule]
|
||||
})
|
||||
export class TicketManagementModule {}
|
||||
|
||||
Reference in New Issue
Block a user