发票上传接口联调

This commit is contained in:
weiyu
2022-04-21 15:33:57 +08:00
parent 06ccfaf642
commit 092daa83e2
3 changed files with 16 additions and 8 deletions

View File

@ -9,7 +9,7 @@
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" (click)="search()" >查询</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button (click)="resetSF()">导出</button>
<button nz-button (click)="export()">导出</button>
<button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -27,7 +27,7 @@
[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, 50, 100] }" [loading]="service.http.loading">
<ng-template st-row="putStatus" let-item let-index="index">
<ng-template st-row="uploadSts" let-item let-index="index">
<!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
<span *ngIf="item?.uploadSts == '1'">待上传</span>
<span *ngIf="item?.uploadSts == '3'">已上传</span>

View File

@ -27,7 +27,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
{ name: '异常', value: '4' },
{ name: '全部', value: '' }
];
selectedIndex = ''; //选择的项目
selectedIndex = '1'; //选择的项目
serviceTel = '';
constructor(
public service: TaxManagementService,
@ -50,7 +50,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
* 查询参数
*/
get reqParams() {
const params = Object.assign({}, this.sf?.value || {});
const params = Object.assign({}, this.sf?.value || {}, {uploadSts: this.selectedIndex});
delete params._$expand;
return { ...params };
}
@ -247,17 +247,18 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
this.openWainingModal('请选择需要撤回的数据');
return;
}
let params: any[] = [];
let ids: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
ids.push(item.id);
});
this.modal.confirm({
nzTitle: '撤回提示',
nzContent: ' 撤回后可以重新上传,重新上传会覆盖已上传数据,确定要撤回?',
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => {
this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => {
this.service.request(this.service.$api_invoiceUpload_withdraw, {ids}).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('撤销成功');
this.search();
@ -322,6 +323,8 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
console.log(item);
this.selectedIndex = item?.value || '';
console.log(this.selectedIndex);
setTimeout(() => {
this.st.load();
})
@ -380,7 +383,7 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
* 异步导出
*/
export() {
this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list);
this.service.exportStart(this.reqParams, this.service.$api_invoiceUpload_export);
}
openWainingModal(content: string, title = '提示') {