发票上传接口联调
This commit is contained in:
@ -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>
|
||||
|
||||
@ -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 = '提示') {
|
||||
|
||||
@ -56,7 +56,12 @@ export class TaxManagementService extends ShipperBaseService {
|
||||
$api_async_export_order_reporting_list = ``; // 导出订单上报
|
||||
$api_get_upload_setting = ``; // 修改上传设置
|
||||
$api_upload_setting_save = ``; // 修改上传设置
|
||||
// 获取发票上传列表
|
||||
$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) {
|
||||
super(injector);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user