发票上传接口联调

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"> <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 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)="resetSF()">导出</button> <button nz-button (click)="export()">导出</button>
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
@ -27,7 +27,7 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }" [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10,20, 50, 100] }" [loading]="service.http.loading"> [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> --> <!-- <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> -->
<span *ngIf="item?.uploadSts == '1'">待上传</span> <span *ngIf="item?.uploadSts == '1'">待上传</span>
<span *ngIf="item?.uploadSts == '3'">已上传</span> <span *ngIf="item?.uploadSts == '3'">已上传</span>

View File

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

View File

@ -56,7 +56,12 @@ export class TaxManagementService extends ShipperBaseService {
$api_async_export_order_reporting_list = ``; // 导出订单上报 $api_async_export_order_reporting_list = ``; // 导出订单上报
$api_get_upload_setting = ``; // 修改上传设置 $api_get_upload_setting = ``; // 修改上传设置
$api_upload_setting_save = ``; // 修改上传设置 $api_upload_setting_save = ``; // 修改上传设置
// 获取发票上传列表
$api_getInvoiceReport_page = '/api/sdc/invoiceUploadInfo/list/page'; $api_getInvoiceReport_page = '/api/sdc/invoiceUploadInfo/list/page';
// 发票上传列表导出
$api_invoiceUpload_export = '/api/sdc/invoiceUploadInfo/reportList';
// 发票上传撤回
$api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw';
constructor(public injector: Injector) { constructor(public injector: Injector) {
super(injector); super(injector);
} }