edit
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
<page-header-wrapper [title]="'收票信息'" [logo]="logo">
|
||||
<ng-template #logo>
|
||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||
</button>
|
||||
</ng-template>
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box" nzBordered nzTitle="基本信息">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="24" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #infoSf [schema]="infoSchema"
|
||||
[ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]="24" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" >保 存</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" >提 交</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="search-box" nzBordered>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #searchSf [schema]="searchSchema"
|
||||
[ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [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)">查询</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -0,0 +1,5 @@
|
||||
:host::ng-deep {
|
||||
nz-date-picker {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,177 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STComponent, STColumn } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { TicketService } from '../../../services/ticket.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-collection-invoice',
|
||||
templateUrl: './edit-collection-invoice.component.html',
|
||||
styleUrls: ['./edit-collection-invoice.component.less', '../../../../commom/less/box.less', '../../../../commom/less/expend-but.less']
|
||||
})
|
||||
export class EditCollectionInvoiceComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('infoSf', { static: false })
|
||||
infoSf!: SFComponent;
|
||||
infoSchema: SFSchema = this.initInfoSF();
|
||||
@ViewChild('searchSf', { static: false })
|
||||
searchSf!: SFComponent;
|
||||
searchSchema: SFSchema = this.initSearchSF();
|
||||
columns: STColumn[] = this.initST();
|
||||
|
||||
selectedRows: any[] = [];
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
goBack() {
|
||||
history.go(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle() {
|
||||
this._$expand = !this._$expand;
|
||||
this.searchSf?.setValue('/expand', this._$expand);
|
||||
}
|
||||
|
||||
private initInfoSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
orderSn: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'text'
|
||||
},
|
||||
default: '天津怡亚通物流科技有限公司'
|
||||
},
|
||||
orde1rSn: {
|
||||
type: 'string',
|
||||
title: '销售方',
|
||||
ui: {
|
||||
widget: 'text'
|
||||
},
|
||||
default: '天津怡亚通物流科技有限公司'
|
||||
},
|
||||
ord0erSn1: {
|
||||
type: 'string',
|
||||
title: '收票类型',
|
||||
enum: [{ label: '全部', value: '全部' }],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择'
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
orderSn2: {
|
||||
title: '发票日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
format: 'yyyy-MM-dd',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
orderS3: {
|
||||
type: 'string',
|
||||
title: '发票号',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderSn4: {
|
||||
type: 'string',
|
||||
title: '收票备注',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['']
|
||||
};
|
||||
}
|
||||
|
||||
private initSearchSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
expand: {
|
||||
type: 'boolean',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
orderSn: {
|
||||
type: 'string',
|
||||
title: '费用单号',
|
||||
ui: {
|
||||
autocomplete: 'off',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
orderS2n: {
|
||||
type: 'string',
|
||||
title: '订单号',
|
||||
ui: {
|
||||
autocomplete: 'off',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
order2S2n: {
|
||||
type: 'string',
|
||||
title: '结算客户',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
params: { dictKey: 'refund:apply:status' },
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '费用日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
createTi2me: {
|
||||
title: '订单日期',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'sl-from-to-search',
|
||||
format: 'yyyy-MM-dd',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', index: 'key', type: 'checkbox' },
|
||||
{ title: '收票单号', index: 'no', type: 'link' },
|
||||
{ title: '网络货运人', index: 'no' },
|
||||
{ title: '发票日期', index: 'no', type: 'date' },
|
||||
{ title: '发票号', index: 'callNo' },
|
||||
{ title: '发票金额', index: 'callNo' },
|
||||
{ title: '税额', render: 'call1No' },
|
||||
{ title: '发票类型', render: 'call1N2o' },
|
||||
{ title: '销售方', index: 'callNo' },
|
||||
{ title: '创建时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '创建人', index: 'updatedAt' },
|
||||
{ title: '收票状态', index: 'updatedAt' }
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user