税务申报
This commit is contained in:
		| @ -26,15 +26,8 @@ | |||||||
|   </div> |   </div> | ||||||
|  |  | ||||||
|   <!-- 数据列表 --> |   <!-- 数据列表 --> | ||||||
|   <st |   <st #st [scroll]="{ x: '1200px', y: scrollY }" [data]="service.$api_get_taxDeclaration" [columns]="columns" | ||||||
|     #st |     [req]="{ params: reqParams }" [page]="{}" [loading]="false" (change)="changeST($event)"> | ||||||
|     [scroll]="{ x: '1200px', y: scrollY }" |  | ||||||
|     [data]="service.$api_get_taxDeclaration" |  | ||||||
|     [columns]="columns" |  | ||||||
|     [req]="{ params: reqParams }" |  | ||||||
|     [page]="{}" |  | ||||||
|     [loading]="false" |  | ||||||
|   > |  | ||||||
|     <ng-template st-row="orderStatus" let-item let-index="index"> |     <ng-template st-row="orderStatus" 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?.billStatus !== '2'">{{ item?.billStatusLabel }}</span> |       <span *ngIf="item?.billStatus !== '2'">{{ item?.billStatusLabel }}</span> | ||||||
| @ -56,13 +49,11 @@ | |||||||
|       已选择 |       已选择 | ||||||
|       <strong class="text-red">{{ selectedRows.length }}</strong> 条数据 |       <strong class="text-red">{{ selectedRows.length }}</strong> 条数据 | ||||||
|     </div> |     </div> | ||||||
|     <button nz-button nzDanger [nzLoading]="service.http.loading" acl [acl-ability]="['TAX-DECLARE-search']" (click)="openDrawer()" |     <button nz-button nzDanger [nzLoading]="service.http.loading" acl [acl-ability]="['TAX-DECLARE-search']" | ||||||
|       >筛选</button |       (click)="openDrawer()">筛选</button> | ||||||
|     > |     <button nz-button nzDanger (click)="exprot()" acl [acl-ability]="['TAX-DECLARE-export']"> 导出</button> | ||||||
|     <button nz-button nzDanger (click)="exprot()"  acl [acl-ability]="['TAX-DECLARE-export']"> 导出</button> |  | ||||||
|     <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft"> |     <button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft"> | ||||||
|       更多<i nz-icon nzType="down" nzTheme="outline"></i |       更多<i nz-icon nzType="down" nzTheme="outline"></i></button> | ||||||
|     ></button> |  | ||||||
|     <nz-dropdown-menu #menu="nzDropdownMenu"> |     <nz-dropdown-menu #menu="nzDropdownMenu"> | ||||||
|       <ul nz-menu> |       <ul nz-menu> | ||||||
|         <li nz-menu-item (click)="upload()" acl [acl-ability]="['TAX-DECLARE-declare']"> 申报 </li> |         <li nz-menu-item (click)="upload()" acl [acl-ability]="['TAX-DECLARE-declare']"> 申报 </li> | ||||||
| @ -74,7 +65,8 @@ | |||||||
|   </div> |   </div> | ||||||
| </ng-template> | </ng-template> | ||||||
|  |  | ||||||
| <nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()"> | <nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()" | ||||||
|  |   (nzOnCancel)="handleCancel()"> | ||||||
|   <ng-container *nzModalContent> |   <ng-container *nzModalContent> | ||||||
|     <div> 司机姓名:张三/13812345678 </div> |     <div> 司机姓名:张三/13812345678 </div> | ||||||
|     <div> 是否确认要将该司机的起征点同步调整为超过15万? </div> |     <div> 是否确认要将该司机的起征点同步调整为超过15万? </div> | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { ActivatedRoute, Router } from '@angular/router'; | import { ActivatedRoute, Router } from '@angular/router'; | ||||||
| import { STColumn, STComponent, STData } from '@delon/abc/st'; | import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; | ||||||
| import { SFDateWidgetSchema } from '@delon/form'; | import { SFDateWidgetSchema } from '@delon/form'; | ||||||
| import { SearchDrawerService } from '@shared'; | import { SearchDrawerService } from '@shared'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| @ -26,6 +26,9 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|   selectedIndex = ''; //选择的项目 |   selectedIndex = ''; //选择的项目 | ||||||
|   serviceTel = ''; |   serviceTel = ''; | ||||||
|   isVisible: boolean = false; |   isVisible: boolean = false; | ||||||
|  |   checkedList: any[] = []; | ||||||
|  |  | ||||||
|  |   // selectedRows:any[] =[]; | ||||||
|   constructor( |   constructor( | ||||||
|     public service: TaxManagementService, |     public service: TaxManagementService, | ||||||
|     private router: Router, |     private router: Router, | ||||||
| @ -63,18 +66,6 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|     this.initST(); |     this.initST(); | ||||||
|     const object1: any = {}; |  | ||||||
|     const object2: any = {}; |  | ||||||
|     Object.defineProperty(object1, 'name', { writable: false, value: 'wang' }); |  | ||||||
|     Object.defineProperty(object2, 'xxoo', { writable: false, value: 'wang' }); |  | ||||||
|     console.log(object1); |  | ||||||
|     console.log(object1.name); |  | ||||||
|     console.log(object2); |  | ||||||
|     console.log(object2.xxoo); |  | ||||||
|     object1.name = 'ming'; |  | ||||||
|     object2.xxoo = 'ming'; |  | ||||||
|     console.log(object1); |  | ||||||
|     console.log(object2); |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
| @ -368,12 +359,13 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|       this.openWainingModal('请选择需要申报的数据'); |       this.openWainingModal('请选择需要申报的数据'); | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     // this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => { |     const ids = this.selectedRows.map(item => item?.id); | ||||||
|     //   if (res) { |     this.service.request(this.service.$api_declare_tax, ids).subscribe((res: any) => { | ||||||
|     //     this.service.msgSrv.success('申报成功'); |       if (res) { | ||||||
|     //     this.search(); |         this.service.msgSrv.success('申报成功'); | ||||||
|     //   } |         this.search(); | ||||||
|     // }) |       } | ||||||
|  |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
| @ -383,9 +375,9 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|   resetData() { |   resetData() { | ||||||
|     let params: any; |     let params: any; | ||||||
|     if (this.selectedRows.length === 0) { |     if (this.selectedRows.length === 0) { | ||||||
|       params =[] |       params = [] | ||||||
|     } else{ |     } else { | ||||||
|       params =[] |       params = [] | ||||||
|       this.selectedRows.forEach(item => { |       this.selectedRows.forEach(item => { | ||||||
|         params.push(item.id); |         params.push(item.id); | ||||||
|       }); |       }); | ||||||
| @ -431,7 +423,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|  |  | ||||||
|   // 导出 |   // 导出 | ||||||
|   exprot() { |   exprot() { | ||||||
|     this.service.exportStart({  ...this.reqParams, pageSize: -1 }, this.service.$api_taxDeclaration_export); |     this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_taxDeclaration_export); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   openWainingModal(content: string, title = '提示') { |   openWainingModal(content: string, title = '提示') { | ||||||
| @ -441,8 +433,67 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent | |||||||
|       nzContent: content |       nzContent: content | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|   handleOK() {} |   handleOK() { } | ||||||
|   handleCancel() { |   handleCancel() { | ||||||
|     this.isVisible = false; |     this.isVisible = false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * | ||||||
|  |    * @param e | ||||||
|  |    */ | ||||||
|  |   changeST(e: STChange): void { | ||||||
|  |     // console.log(e?.type); | ||||||
|  |     if (e?.type === 'checkbox') { | ||||||
|  |       if (e?.checkbox!.length === 0) { | ||||||
|  |         // 全选取消 | ||||||
|  |         this.st.list.forEach((item, index) => { | ||||||
|  |  | ||||||
|  |           this.st.setRow(index, { checked: false }); | ||||||
|  |  | ||||||
|  |         }) | ||||||
|  |         // this.st.clearCheck(); | ||||||
|  |         this.checkedList = []; | ||||||
|  |       } else { | ||||||
|  |         // 取消选择 | ||||||
|  |         if (this.checkedList.length > e?.checkbox!.length) { | ||||||
|  |           const item = this.checkedList.find(item => !item?.checked); | ||||||
|  |           this.st.list?.forEach(((row, index) => { | ||||||
|  |             if (row?.driverId === item?.driverId && row?.ltdId === item?.ltdId && row?.taxMonth === item?.taxMonth) { | ||||||
|  |               this.st.setRow(index, { checked: false }); | ||||||
|  |               this.checkedList = this.checkedList.filter(_item => _item?.id !== row?.id); | ||||||
|  |             } | ||||||
|  |           })) | ||||||
|  |         } else { | ||||||
|  |           console.log(this.checkedList); | ||||||
|  |           console.log(e?.checkbox); | ||||||
|  |           // 增加选择 | ||||||
|  |           if ((this.checkedList.length + 1) !== e?.checkbox!.length) { | ||||||
|  |             this.st.list?.forEach((row, index) => { | ||||||
|  |               const flag = this.checkedList.find(_item => _item.id === row?.id); | ||||||
|  |               if (!flag) { | ||||||
|  |                 this.checkedList.push(row); | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |             return; | ||||||
|  |           } | ||||||
|  |           e?.checkbox?.forEach(item => { | ||||||
|  |             this.st.list?.forEach((row, index) => { | ||||||
|  |               if (row?.driverId === item?.driverId && row?.ltdId === item?.ltdId && row?.taxMonth === item?.taxMonth) { | ||||||
|  |                 this.st.setRow(index, { checked: true }); | ||||||
|  |                 const flag = this.checkedList.find(_item => _item.id === row?.id); | ||||||
|  |                 if (!flag) { | ||||||
|  |                   this.checkedList.push(row); | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |           }) | ||||||
|  |  | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     // if(e?.type === 'change'){ | ||||||
|  |  | ||||||
|  |     // } | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -70,6 +70,8 @@ export class TaxManagementService extends ShipperBaseService { | |||||||
|   $api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw'; |   $api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw'; | ||||||
|   // 修改起征点 |   // 修改起征点 | ||||||
|   $api_fixThreshold = '/api/sdc/taxIncome/fixThreshold'; |   $api_fixThreshold = '/api/sdc/taxIncome/fixThreshold'; | ||||||
|  |   //申报 | ||||||
|  |   $api_declare_tax = `/api/sdc/taxDeclaration/declare`; | ||||||
|   constructor(public injector: Injector) { |   constructor(public injector: Injector) { | ||||||
|     super(injector); |     super(injector); | ||||||
|   } |   } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user