Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
wangshiming
2022-05-13 10:12:36 +08:00
3 changed files with 78 additions and 40 deletions

View File

@ -26,15 +26,8 @@
</div>
<!-- 数据列表 -->
<st
#st
[scroll]="{ x: '1200px', y: scrollY }"
[data]="service.$api_get_taxDeclaration"
[columns]="columns"
[req]="{ params: reqParams }"
[page]="{}"
[loading]="false"
>
<st #st [scroll]="{ x: '1200px', y: scrollY }" [data]="service.$api_get_taxDeclaration" [columns]="columns"
[req]="{ params: reqParams }" [page]="{}" [loading]="false" (change)="changeST($event)">
<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>
@ -56,13 +49,11 @@
已选择
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据
</div>
<button nz-button nzDanger [nzLoading]="service.http.loading" acl [acl-ability]="['TAX-DECLARE-search']" (click)="openDrawer()"
>筛选</button
>
<button nz-button nzDanger (click)="exprot()" acl [acl-ability]="['TAX-DECLARE-export']"> 导出</button>
<button nz-button nzDanger [nzLoading]="service.http.loading" acl [acl-ability]="['TAX-DECLARE-search']"
(click)="openDrawer()">筛选</button>
<button nz-button nzDanger (click)="exprot()" acl [acl-ability]="['TAX-DECLARE-export']"> 导出</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menu" nzPlacement="bottomLeft">
更多<i nz-icon nzType="down" nzTheme="outline"></i
></button>
更多<i nz-icon nzType="down" nzTheme="outline"></i></button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item (click)="upload()" acl [acl-ability]="['TAX-DECLARE-declare']"> 申报 </li>
@ -74,7 +65,8 @@
</div>
</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>
<div> 司机姓名:张三/13812345678 </div>
<div> 是否确认要将该司机的起征点同步调整为超过15万 </div>

View File

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
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 { SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -26,6 +26,9 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
selectedIndex = ''; //选择的项目
serviceTel = '';
isVisible: boolean = false;
checkedList: any[] = [];
// selectedRows:any[] =[];
constructor(
public service: TaxManagementService,
private router: Router,
@ -63,18 +66,6 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
ngOnInit() {
this.initSF();
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('请选择需要申报的数据');
return;
}
// this.service.request(this.service.$api_recall_reporting, { rows: this.selectedRows }).subscribe((res: any) => {
// if (res) {
// this.service.msgSrv.success('申报成功');
// this.search();
// }
// })
const ids = this.selectedRows.map(item => item?.id);
this.service.request(this.service.$api_declare_tax, ids).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('申报成功');
this.search();
}
})
}
/**
@ -383,9 +375,9 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
resetData() {
let params: any;
if (this.selectedRows.length === 0) {
params =[]
} else{
params =[]
params = []
} else {
params = []
this.selectedRows.forEach(item => {
params.push(item.id);
});
@ -431,7 +423,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
// 导出
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 = '提示') {
@ -441,8 +433,60 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
nzContent: content
});
}
handleOK() {}
handleOK() { }
handleCancel() {
this.isVisible = false;
}
/**
*
* @param e
*/
changeST(e: STChange): void {
if (e?.type === 'checkbox') {
if (e?.checkbox!.length === 0) {
// 全选取消
this.st.list.forEach((item, index) => {
this.st.setRow(index, { checked: false });
})
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 {
// 全选
const allChecked = this.st?.list.every(item => item.checked);
if (allChecked) {
this.st.list?.forEach((row, index) => {
const flag = this.checkedList.find(_item => _item.id === row?.id);
if (!flag) {
this.checkedList.push(row);
}
})
return;
}
// 单个新增选择
const list = e?.checkbox?.filter(item => !this.checkedList.some(_item => _item?.id === item.id));
list?.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);
}
}
})
})
}
}
}
}
}

View File

@ -70,6 +70,8 @@ export class TaxManagementService extends ShipperBaseService {
$api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw';
// 修改起征点
$api_fixThreshold = '/api/sdc/taxIncome/fixThreshold';
//申报
$api_declare_tax = `/api/sdc/taxDeclaration/declare`;
constructor(public injector: Injector) {
super(injector);
}