This commit is contained in:
wangshiming
2022-05-11 21:09:34 +08:00
parent 081d185d4c
commit 2d48fff9ef
6 changed files with 188 additions and 65 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-05-06 15:31:19
* @LastEditors : Shiming
* @LastEditTime : 2022-05-11 14:54:00
* @LastEditTime : 2022-05-11 21:04:42
* @FilePath : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\individual-income\\individual-income.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -73,11 +73,17 @@
</div>
</ng-template>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()"
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate"
(nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div> 司机姓名:张三/13812345678 </div>
<div *ngIf="oneStatus">
<div> 司机姓名:{{driverRecord?.xm}}/{{driverRecord.lxdh}} </div>
<div> 是否确认要将该司机的起征点同步调整为超过15万 </div>
</div>
<div *ngIf="!oneStatus">
<div> 已选择{{selectedRows.length}}个司机 </div>
<div> 是否确认要将该司机的起征点同步调整为超过15万 </div>
</div>
</ng-container>
<ng-template #nzModalFooterEvaluate>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>

View File

@ -23,8 +23,10 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
];
selectedIndex = '0'; //选择的项目
isVisible: boolean = false;
oneStatus: boolean = false;
selectedRows: any[] = [];
driverRecord!: any;
constructor(public service: TaxManagementService, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
@ -287,11 +289,20 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
* @param record 记录实例
*/
resetData() {
// if (this.selectedRows.length === 0) {
// this.openWainingModal('请选择需要更新的数据!');
// return;
// }
// this.isVisible = true;
if (this.selectedRows.length === 0) {
this.service.msgSrv.error('请选择明细!');
return;
}
if(this.selectedRows.length === 1) {
console.log(this.selectedRows);
this.oneStatus = true
this.driverRecord = this.selectedRows[0]
} else {
this.oneStatus = false
}
this.isVisible = true;
}
selectChange(item: any) {
@ -352,7 +363,18 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
this.service.exportStart({ ...this.sfValue,declareStatus: this.selectedIndex, pageSize: -1 }, this.service.$api_taxIncome_export);
}
handleOK() {}
handleOK() {
let params: any = [];
if (this.selectedRows.length !== 0) {
this.selectedRows.forEach(item => {
params.push(item.id);
});
}
this.service.request(this.service.$api_fixThreshold, params).subscribe((res) => {
console.log(res);
})
}
handleCancel() {
this.isVisible = false;
}

View File

@ -68,6 +68,8 @@ export class TaxManagementService extends ShipperBaseService {
$api_taxDeclaration_export = '/api/sdc/taxDeclaration/asyncExport';
// 发票上传撤回
$api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw';
// 修改起征点
$api_fixThreshold = '/api/sdc/taxIncome/fixThreshold';
constructor(public injector: Injector) {
super(injector);
}