From 2a7db5f6d35368deb5ccca23d83c6e7261ca75a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 1 Mar 2024 17:36:37 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.10.1.2402.01-=E4=B8=AA=E7=A8=8E-?= =?UTF-8?q?=E4=B8=AA=E7=A8=8E=E7=94=B3=E6=8A=A5=E7=BA=BF=E4=B8=8B=E5=AF=B9?= =?UTF-8?q?=E6=AF=94=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E7=BC=93=E5=AD=98=E5=AF=B9=E6=AF=94=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/declareOnlineComparison/index.js | 53 ++++++++++++------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js index 5090667b..7cf297a2 100644 --- a/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js +++ b/pc4mobx/hrmSalary/pages/declareOnlineComparison/index.js @@ -8,10 +8,12 @@ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; import { WeaCheckbox, WeaLoadingGlobal, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; -import { Dropdown, Menu } from "antd"; +import { Button } from "antd"; +import { WeaTableNew } from "comsMobx"; import { exportContrast } from "../../apis/declare"; import "./index.less"; +const WeaTableComx = WeaTableNew.WeaTable; const getLabel = WeaLocaleProvider.getLabel; @inject("payrollFilesStore") @@ -50,19 +52,13 @@ class Index extends Component { queryParams: { ...queryParams, [key]: value === "1" } }, () => this.getTaxdeclarationContrastList()); }; - handleCompareOpts = async ({ key }) => { + handleExport = async () => { const { params: { taxDeclarationId } } = this.props; const { queryParams } = this.state; - switch (key) { - case "exportContrast": - WeaLoadingGlobal.start(); - const payload = { taxDeclarationId, ...queryParams }; - const promise = await exportContrast(payload); - WeaLoadingGlobal.destroy(); - break; - default: - break; - } + WeaLoadingGlobal.start(); + const payload = { taxDeclarationId, ...queryParams }; + const promise = await exportContrast(payload); + WeaLoadingGlobal.destroy(); }; getColumns = () => { const { showColumns } = this.state; @@ -91,8 +87,20 @@ class Index extends Component { } })); }; + onDropMenuClick = (key) => { + switch (key) { + case "custom_cols": + const { payrollFilesStore: { declareTableStore } } = this.props; + declareTableStore.setColSetVisible(true); + declareTableStore.tableColSet(true); + break; + default: + break; + } + }; render() { + const { payrollFilesStore: { declareTableStore } } = this.props; const { dataSource, pageInfo, queryParams } = this.state; const { onlyShowDiffEmp, onlyShowDiffItem } = queryParams; const pagination = { @@ -114,26 +122,31 @@ class Index extends Component { }; return ( } - iconBgcolor="#F14A2D" buttonSpace={10} showDropIcon={false} + iconBgcolor="#F14A2D" buttonSpace={10} showDropIcon onDropMenuClick={this.onDropMenuClick} buttons={[ - - {getLabel(81272, "导出全部")} - }> - {getLabel(111, "项目筛选")} - , + , this.handleDiffChange("onlyShowDiffEmp", v)} />, this.handleDiffChange("onlyShowDiffItem", v)} /> - ]} + ]} dropMenuDatas={[{ + key: "custom_cols", + icon: , + content: getLabel(32535, "显示列定制") + }]} > + ); }