fix bug
This commit is contained in:
		| @ -4,7 +4,7 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-03-30 14:00:43 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-30 14:20:03 | ||||
|  * @LastEditTime : 2022-03-30 14:41:01 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\order-reporting\\order-reporting.component.html | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
| --> | ||||
| @ -42,6 +42,7 @@ | ||||
|     <ng-template st-row="orderStatus" let-item let-index="index"> | ||||
|       <a (click)="viewAuditResult(item)" *ngIf="item?.billStatus === '2'">{{item?.billStatusLabel}}</a> | ||||
|       <span *ngIf="item?.billStatus !== '2'">{{item?.billStatusLabel}}</span> | ||||
|       <span style="color: red;" (click)="unnormal(item)">异常</span> | ||||
|  | ||||
|     </ng-template> | ||||
|  | ||||
|  | ||||
| @ -7,6 +7,7 @@ import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { of } from 'rxjs'; | ||||
| import { map } from 'rxjs/operators'; | ||||
| import { TaxManagementService } from '../../services/tax-management.service'; | ||||
| import { TaxManagementUploadSettingComponent } from './upload-setting/upload-setting.component'; | ||||
| import { TaxManagementOrderVerifyResultComponent } from './verify-result/verify-result.component'; | ||||
| // import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component'; | ||||
| // import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component'; | ||||
| @ -311,6 +312,27 @@ export class TaxManagementOrderReportingComponent implements OnInit { | ||||
|       } | ||||
|     }); | ||||
|  | ||||
|   } | ||||
|   /** | ||||
|    *撤销 | ||||
|    * @param record 记录实例 | ||||
|    */ | ||||
|   unnormal(value: any) { | ||||
|     this.modal.confirm({ | ||||
|       nzTitle: '税务审核结果', | ||||
|       nzContent: '订单结算时间所在月份与申报月份不一致', | ||||
|       nzOkText: '确定', | ||||
|       nzCancelText: '', | ||||
|       nzOnOk: () => { | ||||
|         this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => { | ||||
|           if (res) { | ||||
|             this.service.msgSrv.success('撤销成功'); | ||||
|             this.search(); | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     }); | ||||
|  | ||||
|   } | ||||
|  | ||||
|   selectChange(item: any) { | ||||
| @ -373,15 +395,15 @@ export class TaxManagementOrderReportingComponent implements OnInit { | ||||
|    * @param params 上传设置 | ||||
|    */ | ||||
|   uploadSetting() { | ||||
|     // const modalRef = this.modal.create({ | ||||
|     //   nzTitle: '上传设置', | ||||
|     //   nzWidth: 600, | ||||
|     //   nzContent: DatatableReportingUploadSettingComponent, | ||||
|     //   nzComponentParams: {}, | ||||
|     //   nzFooter: null | ||||
|     // }); | ||||
|     // modalRef.afterClose.subscribe(res => { | ||||
|     // }) | ||||
|     const modalRef = this.modal.create({ | ||||
|       nzTitle: '税务上传设置', | ||||
|       nzWidth: 600, | ||||
|       nzContent: TaxManagementUploadSettingComponent, | ||||
|       nzComponentParams: {}, | ||||
|       nzFooter: null | ||||
|     }); | ||||
|     modalRef.afterClose.subscribe(res => { | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|  | ||||
| @ -0,0 +1,8 @@ | ||||
| <nz-spin [nzSpinning]="!i"></nz-spin> | ||||
| <sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none"> | ||||
|   <div class="modal-footer"> | ||||
|     <button nz-button type="button" (click)="close()">取消</button> | ||||
|     <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid" | ||||
|       [nzLoading]="service.http.loading">修改</button> | ||||
|   </div> | ||||
| </sf> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { DatatableReportingUploadSettingComponent } from './upload-setting.component'; | ||||
|  | ||||
| describe('DatatableReportingUploadSettingComponent', () => { | ||||
|   let component: DatatableReportingUploadSettingComponent; | ||||
|   let fixture: ComponentFixture<DatatableReportingUploadSettingComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [DatatableReportingUploadSettingComponent] | ||||
|     }) | ||||
|       .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(DatatableReportingUploadSettingComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,110 @@ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { SFSchema, SFUISchema } from '@delon/form'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { TaxManagementService } from '../../../services/tax-management.service'; | ||||
|  | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-datatable-upload-setting', | ||||
|   templateUrl: './upload-setting.component.html', | ||||
| }) | ||||
| export class TaxManagementUploadSettingComponent implements OnInit { | ||||
|   record: any = {}; | ||||
|   i: any = {}; | ||||
|   schema!: SFSchema; | ||||
|   ui!: SFUISchema; | ||||
|  | ||||
|   constructor( | ||||
|     private modal: NzModalRef, | ||||
|     public service: TaxManagementService | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|     // this.loadData(); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|  * 初始化查询表单 | ||||
|  */ | ||||
|   initSF() { | ||||
|     this.schema = { | ||||
|       properties: { | ||||
|         no: { | ||||
|           type: 'string', | ||||
|           title: '订单数据', | ||||
|           enum: [ | ||||
|             { | ||||
|               label: '手动上传', | ||||
|               value: '1' | ||||
|             }, | ||||
|             { | ||||
|               label: '自动上传', | ||||
|               value: '2' | ||||
|             } | ||||
|           ], | ||||
|           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|  | ||||
|           } | ||||
|         }, | ||||
|         owner: { | ||||
|           type: 'string', | ||||
|           title: '资金数据', | ||||
|           enum: [ | ||||
|             { | ||||
|               label: '手动上传', | ||||
|               value: '1' | ||||
|             }, | ||||
|             { | ||||
|               label: '自动上传', | ||||
|               value: '2' | ||||
|             } | ||||
|           ], | ||||
|           description: '开启自动上传后,订单将在支付完成且风险单校验通过后自动上传', | ||||
|           ui: { | ||||
|             widget: 'radio', | ||||
|  | ||||
|           } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['owner', 'no'], | ||||
|     } | ||||
|     this.ui = { | ||||
|       '*': { | ||||
|         spanLabelFixed: 100, | ||||
|         grid: { span: 24 }, | ||||
|       }, | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 获取设置数据 | ||||
|    */ | ||||
|   loadData() { | ||||
|     this.service.request(this.service.$api_get_upload_setting, {}).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.i = res; | ||||
|  | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 修改 | ||||
|    * @param value | ||||
|    */ | ||||
|   save(value: any): void { | ||||
|     this.service.request(this.service.$api_upload_setting_save, { ...value }).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('保存成功'); | ||||
|         this.modal.close(true); | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
| } | ||||
| @ -4,20 +4,22 @@ | ||||
|  * @Author       : Shiming | ||||
|  * @Date         : 2022-03-30 13:58:28 | ||||
|  * @LastEditors  : Shiming | ||||
|  * @LastEditTime : 2022-03-30 14:27:22 | ||||
|  * @LastEditTime : 2022-03-30 14:35:17 | ||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\tax-management\\taxmanagement.module.ts | ||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||
|  */ | ||||
| import { NgModule, Type } from '@angular/core'; | ||||
| import { SharedModule, SHARED_G2_MODULES } from '@shared'; | ||||
| import { TaxManagementOrderReportingComponent } from './components/order-reporting/order-reporting.component'; | ||||
| import { TaxManagementUploadSettingComponent } from './components/order-reporting/upload-setting/upload-setting.component'; | ||||
| import { TaxManagementOrderVerifyResultComponent } from './components/order-reporting/verify-result/verify-result.component'; | ||||
| import { TaxManagementModuleRoutingModule } from './tax-management-routing.module'; | ||||
|  | ||||
|  | ||||
| const COMPONENTS: Type<void>[] = [ | ||||
|   TaxManagementOrderReportingComponent, | ||||
|   TaxManagementOrderVerifyResultComponent | ||||
|   TaxManagementOrderVerifyResultComponent, | ||||
|   TaxManagementUploadSettingComponent | ||||
| ] | ||||
|   | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user