This commit is contained in:
Taric Xin
2021-12-06 17:49:20 +08:00
parent 1c5643b7e9
commit 76951f250c
33 changed files with 1835 additions and 35 deletions

View File

@ -1 +1,26 @@
<p>etc-invoiced-list works!</p>
<page-header-wrapper [title]="'运单开票记录'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
<sf #sf [schema]="searchSchema"
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzXl]="6" [nzLg]="24" [nzMd]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button>
</div>
</div>
</nz-card>
<nz-card class="content-box" nzBordered>
<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]="{ x:'1200px',y: '400px' }" (change)="stChange($event)"></st>
</nz-card>

View File

@ -0,0 +1,13 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 16px;
}
}
}

View File

@ -1,4 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
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/system.service';
import { TransactionDetailsComponent } from './transaction-details/transaction-details.component';
@Component({
selector: 'app-etc-invoiced-list',
@ -6,10 +12,119 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./etc-invoiced-list.component.less']
})
export class ETCInvoicedListComponent implements OnInit {
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = [
{ title: '运单号', index: 'no' },
{ title: '开票状态', index: 'callNo' },
{ title: '业务方', index: 'callNo' },
{ title: '业务方税号', index: 'callNo' },
{ title: '开票金额', index: 'callNo' },
{ title: '发票张数', index: 'callNo' },
{ title: '申请时间', index: 'updatedAt', type: 'date' },
{
title: '操作',
buttons: [
{
text: '交易明细',
click: item => this.showDetail(item)
}
]
}
];
searchSchema: SFSchema = {
properties: {
orderSn: {
type: 'string',
title: '运单号',
ui: {
autocomplete: 'off'
}
},
receiveName: {
type: 'string',
title: '开票状态',
enum: [
{ label: '全部', value: '' },
{ label: '待受理', value: '待受理' },
{ label: '待开票', value: '待开票' },
{ label: '开票中', value: '开票中' },
{ label: '已开票', value: '已开票' },
{ label: '已撤销', value: '已撤销' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
}
},
default: ''
},
receiveName2: {
type: 'string',
title: '业务方',
enum: [
{ label: '全部', value: '' },
{ label: '待受理', value: '待受理' },
{ label: '待开票', value: '待开票' },
{ label: '开票中', value: '开票中' },
{ label: '已开票', value: '已开票' },
{ label: '已撤销', value: '已撤销' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
}
},
default: ''
}
}
};
constructor() { }
reqParams = {};
ngOnInit(): void {
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
stChange(e: STChange): void {
switch (e.type) {
case 'filter':
this.st.load();
break;
}
}
showDetail(item: any) {
const modal = this.nzModalService.create({
nzTitle: '运单交易明细',
nzContent: TransactionDetailsComponent,
nzWidth: 800,
nzComponentParams: { data: [] },
nzOnOk: com => {
console.log(com.selectedData);
},
nzOkText: '导出'
});
modal.afterClose.subscribe(res => {
this.st.load();
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
}
}

View File

@ -0,0 +1,16 @@
<div nz-row nzGutter="8">
<div nz-col nzSpan="19">
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 12 } }}" [compact]="true"
[button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="5" class="text-right mb-md">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
<st #st [data]="url" [columns]="columns" bordered size="small"
[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]="{ x:'756px',y: '400px' }" (change)="stChange($event)"></st>
</div>

View File

@ -0,0 +1,84 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TicketService } from '../../../services/system.service';
@Component({
selector: 'app-transaction-details',
templateUrl: './transaction-details.component.html',
styleUrls: ['./transaction-details.component.less']
})
export class TransactionDetailsComponent implements OnInit {
data = [];
selectedData = [];
url = `/rule?_allow_anonymous=true`;
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
columns: STColumn[] = [
{ title: '交易id', index: 'no' },
{ title: '交易流水号', index: 'callNo' },
{ title: '交易金额', index: 'callNo' },
{ title: '开票状态', index: 'callNo' },
{ title: '交易时间', index: 'updatedAt', type: 'date' }
];
searchSchema: SFSchema = {
properties: {
receiveName: {
type: 'string',
title: '开票状态',
enum: [
{ label: '全部', value: '' },
{ label: '待受理', value: '待受理' },
{ label: '待开票', value: '待开票' },
{ label: '开票中', value: '开票中' },
{ label: '已开票', value: '已开票' },
{ label: '已撤销', value: '已撤销' },
{ label: '已拒绝', value: '已拒绝' }
],
ui: {
widget: 'select',
placeholder: '请选择',
change: (i: any) => {
this.sf.value.receiveName = i;
this.sf?.setValue('/receiveName', i);
}
},
default: ''
},
createTime: {
title: '交易时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
}
}
};
reqParams = {};
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
ngOnInit(): void {}
stChange(e: STChange): void {
switch (e.type) {
case 'filter':
this.st.load();
break;
}
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
}
}