This commit is contained in:
Taric Xin
2022-05-06 14:24:12 +08:00
parent 2c8f8250e4
commit 1851f9e6d8
25 changed files with 409 additions and 637 deletions

View File

@ -1,7 +1,5 @@
<page-header-wrapper [title]="'销票处理'">
<!-- <page-header-wrapper [title]="'销票处理'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
<div nz-row nzGutter="8">
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
@ -12,30 +10,36 @@
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="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> -->
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
</button>
</div>
</div>
</nz-card>
</nz-card> -->
<nz-card class="table-box">
<div class="tab_header">
<label class="page_title">
<label class="driver">|</label>
销票处理</label>
<nz-tabset [nzTabBarExtraContent]="extraTemplate" (nzSelectedIndexChange)="selectChange($event)">
<nz-tab nzTitle="全部"></nz-tab>
<nz-tab nzTitle="待处理"></nz-tab>
<nz-tab nzTitle="待确认"></nz-tab>
<!-- <nz-tab nzTitle="已确认"></nz-tab> -->
</nz-tabset>
</div>
<nz-card class="content-box" nzBordered>
<nz-tabset [nzTabBarExtraContent]="extraTemplate" (nzSelectedIndexChange)="selectChange($event)">
<nz-tab nzTitle="全部"></nz-tab>
<nz-tab nzTitle="待处理"></nz-tab>
<nz-tab nzTitle="待确认"></nz-tab>
<!-- <nz-tab nzTitle="已确认"></nz-tab> -->
</nz-tabset>
<ng-template #extraTemplate>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center mr-sm">
<div class="mr-md">
已选择
<strong class="text-red">{{ selectedRows.length }}</strong> 张发票&nbsp;&nbsp; 发票金额总计
<strong class="text-red">{{totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a>
</div>
<button nz-button nzDanger [nzLoading]="service.http.loading" (click)="openDrawer()">筛选</button>
<!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" (click)="this.batchPush()">推送开票</button> -->
<!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus"
(click)="this.batchRemove(selectedRows)">移除</button>
@ -45,7 +49,7 @@
</ng-template>
<st #st [scroll]="{ x: '2000px' }" [data]="service.$api_ficoVatinvHList" [columns]="columns" [page]="{}"
<st #st [scroll]="{ x: '2000px',y:scrollY }" [data]="service.$api_ficoVatinvHList" [columns]="columns" [page]="{}"
[req]="{process: beforeReq }" [res]="{process:afterRes }" [loading]="false" (change)="stChange($event)">
<ng-template st-row="vatinvcode" let-item let-index="index" let-column="column">
{{ item.vatinvcode }} <br>

View File

@ -1,26 +0,0 @@
:host::ng-deep {
.search-box {
.ant-card-body {
padding-bottom: 18px;
}
}
.content-box {
.ant-card-body {
padding-top: 0;
}
}
nz-range-picker {
width: 100%;
}
.ant-tabs-tab-btn {
padding-left : 16px;
padding-right: 16px;
}
.text-truncate {
white-space: normal;
}
}

View File

@ -4,37 +4,42 @@ import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema, SFSchemaEnum } from '@delon/form';
import { dateTimePickerUtil } from '@delon/util';
import { SearchDrawerService } 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 { TicketService } from '../../services/ticket.service';
import { RequestedInvoiceModalComponent } from '../invoice-requested/requested-invoice-modal/requested-invoice-modal.component';
import { PushInvoiceComponent } from './push-invoice/push-invoice.component';
@Component({
selector: 'app-cancellation-invoice',
templateUrl: './cancellation-invoice.component.html',
styleUrls: ['./cancellation-invoice.component.less']
styleUrls: ['../../../commom/less/commom-table.less']
})
export class CancellationInvoiceComponent implements OnInit {
export class CancellationInvoiceComponent extends BasicTableComponent {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('requestedModal', { static: false })
requestedModal!: any;
columns: STColumn[] = this.initST();
searchSchema: SFSchema = this.initSF();
schema: SFSchema = this.initSF();
resourceStatus: any = '';
_$expand = false;
selectedRows: any[] = [];
totalCallNo = 0;
openInfo: any = { invoicedate: null, invoiceno: null, invoiceno2: null };
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
constructor(
public service: TicketService,
private nzModalService: NzModalService,
private router: Router,
public searchDrawerService: SearchDrawerService
) {
super(searchDrawerService);
}
ngOnInit(): void {}
search() {
this.st?.load(1);
}
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
@ -236,22 +241,6 @@ export class CancellationInvoiceComponent implements OnInit {
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this._$expand = false;
}
/**
* 伸缩查询条件
*/
expandToggle() {
this._$expand = !this._$expand;
this.sf?.setValue('/expand', this._$expand);
}
private initSF(): SFSchema {
return {
properties: {
@ -287,10 +276,7 @@ export class CancellationInvoiceComponent implements OnInit {
widget: 'select',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarder(),
visibleIf: {
expand: (value: boolean) => value
}
asyncData: () => this.service.getNetworkFreightForwarder()
}
},
sts: {
@ -300,10 +286,7 @@ export class CancellationInvoiceComponent implements OnInit {
widget: 'dict-select',
containsAllLabel: true,
params: { dictKey: 'vatinv:status' },
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value
}
containAllLable: true
} as SFSelectWidgetSchema
},
// or2derSn: {
@ -322,10 +305,7 @@ export class CancellationInvoiceComponent implements OnInit {
ui: {
widget: 'date',
mode: 'range',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
}
format: 'yyyy-MM-dd'
} as SFDateWidgetSchema
}
}
@ -407,7 +387,7 @@ export class CancellationInvoiceComponent implements OnInit {
{
text: '手工开票<br>',
acl: { ability: ['TICKET-CANCELLATION-apply'] },
iif: item => item.sts != '3' && item.sts != '4' ,
iif: item => item.sts != '3' && item.sts != '4',
click: item => this.requestedAction(item)
}
// {