Merge branch 'release/2.19.1.2501.01' into release/2.19.1.2501.01-个税
This commit is contained in:
commit
ac40faa79a
|
|
@ -1,27 +1,24 @@
|
|||
import React from "react";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import * as API from "../../apis/declare";
|
||||
import { Button } from "antd";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
export default class GenerateDeclarationDetail extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
columns: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
declareInfo: {}
|
||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
componentDidMount() {
|
||||
this.getDetailList();
|
||||
this.getDeclareInfo();
|
||||
}
|
||||
|
|
@ -37,31 +34,19 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current, pageSize, total
|
||||
},
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
|
||||
if (item.dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return <a className="ellipsis"
|
||||
href={`javaScript:openhrm(${record.employeeId});`}
|
||||
...item, width: 180,
|
||||
render: (text, record) => (<a className="ellipsis" href={`javaScript:openhrm(${record.employeeId});`}
|
||||
onClick={e => window.pointerXY(e)}
|
||||
title={text}
|
||||
>
|
||||
{text}
|
||||
</a>;
|
||||
}
|
||||
title={text}>{text}</a>)
|
||||
};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}>{text}</span>;
|
||||
}
|
||||
...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100,
|
||||
render: (text) => (<span className="ellipsis" title={text}>{text}</span>)
|
||||
};
|
||||
})
|
||||
});
|
||||
|
|
@ -78,26 +63,19 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
|
||||
window.open(url, "_self");
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { declareInfo } = this.state;
|
||||
return (<React.Fragment>
|
||||
<span>{getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}</span>
|
||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||
</React.Fragment>);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { declareInfo, loading, pageInfo, columns, dataSource } = this.state;
|
||||
const { loading, pageInfo, columns, dataSource } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
|
||||
const renderRightOperation = () => {
|
||||
return (
|
||||
<div style={{ display: "inline-block" }}>
|
||||
<Button type="primary" onClick={this.handleExport}>导出</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const renderLeftOperation = () => {
|
||||
return (
|
||||
<div style={{ display: "inline-block", lineHeight: "47px" }}>
|
||||
<span>薪资所属月:{declareInfo.salaryMonth}</span>
|
||||
<span style={{ marginLeft: "10px" }}>个税扣缴义务人:{declareInfo.taxAgentName}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const buttons = showOperateBtn ? [<Button type="primary"
|
||||
onClick={this.handleExport}>{getLabel(111, "导出全部")}</Button>] : [];
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
|
|
@ -115,23 +93,12 @@ export default class GenerateDeclarationDetail extends React.Component {
|
|||
}, () => this.getDetailList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="generateDeclarationDetail">
|
||||
<CustomTab
|
||||
searchOperationItem={showOperateBtn && renderRightOperation()}
|
||||
leftOperation={renderLeftOperation()}
|
||||
/>
|
||||
<div className="tableWrapper">
|
||||
<UnifiedTable
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading}
|
||||
xWidth={columns.length * 120}
|
||||
/>
|
||||
return (<WeaTop title={this.renderTitle()} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={buttons}>
|
||||
<div className="declare-detail-table-container">
|
||||
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} loading={loading}
|
||||
scroll={{ x: 1200, y: `calc(100vh - 186px)` }}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
</WeaTop>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
.generateDeclarationDetail {
|
||||
.tabWrapper {
|
||||
padding-left: 10px
|
||||
}
|
||||
.declare-detail-table-container {
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.tableWrapper {
|
||||
height: calc(100vh - 48px);
|
||||
overflow: auto;
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -599,6 +599,7 @@ export default class PayrollGrant extends React.Component {
|
|||
<WeaTab
|
||||
datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]}
|
||||
onChange={v => this.setState({ selectedKey: v }, () => {
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
getInfoList({ salarySendId: currentId, isGranted: v !== "0" });
|
||||
})}
|
||||
searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn}
|
||||
|
|
@ -652,7 +653,7 @@ export default class PayrollGrant extends React.Component {
|
|||
this.pageInfo = { current, pageSize };
|
||||
this.handleShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
scroll={{ y: `calc(100vh - 236px)` }}
|
||||
scroll={{ y: `calc(100vh - 255px)` }}
|
||||
/> : renderLoading()
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue