diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js index 85185c7f..142b53a7 100644 --- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js +++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js @@ -147,10 +147,6 @@ class Index extends Component { > {getLabel(83110, "查看详情")} - { - !showWithDrawBtn && this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} - } { showWithDrawBtn && } - { - showWithDrawBtn && - - this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} - - - }> - - - } + + + this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")} + + + }> + + ; } } diff --git a/pc4mobx/hrmSalary/pages/employeedeclare/index.js b/pc4mobx/hrmSalary/pages/employeedeclare/index.js index deb90613..453bac4c 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclare/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclare/index.js @@ -6,7 +6,8 @@ */ import React, { Component } from "react"; import { WeaInputSearch, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom"; -import { Col, message, Row } from "antd"; +import { Col, Dropdown, Menu, message, Row } from "antd"; +import LogDialog from "../../components/logViewModal"; import { taxAgentDeclareList } from "../../apis/declare"; import TipLabel from "../../components/TipLabel"; import "./index.less"; @@ -19,7 +20,8 @@ class Index extends Component { super(props); this.state = { dataSource: [], loading: false, taxAgentName: "", - pageInfo: { current: 1, pageSize: 10, total: 0 } + pageInfo: { current: 1, pageSize: 10, total: 0 }, + logDialogVisible: false, filterConditions: "[]" }; } @@ -44,22 +46,37 @@ class Index extends Component { } }).catch(() => this.setState({ loading: false })); }; + onDropMenuClick = (key, targetid = "") => { + switch (key) { + case "log": + this.setState({ + logDialogVisible: true, + filterConditions: targetid ? `[{\"connectCondition\":\"AND\",\"columIndex\":\"targetid\",\"type\":\"=\",\"value\":\"${targetid}\"}]` : "[]" + }); + break; + default: + break; + } + }; render() { - const { pageInfo, taxAgentName, dataSource } = this.state; + const { pageInfo, taxAgentName, dataSource, logDialogVisible, filterConditions } = this.state; const tipList = [ getLabel(544290, "1、点击查看详情,管理各个个税扣缴义务人的人员报送信息,如购买了在线报送服务,可在线报送,如未购买在线报送服务,也可导出数据线下报送。") ]; return ( } - buttons={[ - this.setState({ taxAgentName: val })} - onSearch={this.taxAgentDeclareList} - /> - ]} + icon={} showDropIcon onDropMenuClick={this.onDropMenuClick} + dropMenuDatas={[{ + key: "log", icon: , + content: getLabel(545781, "操作日志") + }]} buttons={[ + this.setState({ taxAgentName: val })} + onSearch={this.taxAgentDeclareList} + /> + ]} >
@@ -75,9 +92,21 @@ class Index extends Component { title: getLabel(30585, "操作"), dataIndex: "operate", width: 260, - render: (_, record) => ({getLabel(83110, "查看详情")}) + render: (_, record) => ( + {getLabel(83110, "查看详情")} + + + this.onDropMenuClick("log", record.id)}>{getLabel(545781, "操作日志")} + + + }> + + + ) } ]} dataSource={dataSource} @@ -103,6 +132,9 @@ class Index extends Component {
+ {/*操作日志*/} + this.setState({ logDialogVisible: false })}/>
); }