feature/2.9.42310.01-工资单发放页面重构

This commit is contained in:
黎永顺 2023-10-13 10:57:47 +08:00
parent ab3be2c1f9
commit 79a3f460e7
1 changed files with 19 additions and 5 deletions

View File

@ -80,6 +80,16 @@ class Index extends Component {
}
}).catch(() => this.setState({ loading: false }));
};
handleOpts = ({ key }, record) => {
const { id, templateId } = record;
switch (key) {
case "template":
console.log(templateId);
break;
default:
break;
}
};
render() {
const { loading, dataSource, columns, pageInfo } = this.state;
@ -110,23 +120,27 @@ class Index extends Component {
{
dataIndex: "operate", title: getLabel(30585, "操作"), width: 170,
render: (__, record) => {
const { canSeeDetail, sendNum, sendTotal, haveBackCalc, salaryAcctType } = record;
const { canSeeDetail, sendNum, sendTotal, haveBackCalc, salaryAcctType, id, ackFeedbackStatus } = record;
//显示更新模板
const showGrant = haveBackCalc === 1 && salaryAcctType === 0;
return <React.Fragment>
{
showOperateBtn &&
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(542702, "发放")}</a>
<a
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=${id}&ackFeedbackStatus=${ackFeedbackStatus}`}
style={{ marginRight: 10 }} target="_blank">{getLabel(542702, "发放")}</a>
}
{
canSeeDetail &&
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(83110, "查看详情")}</a>
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollDetail?id=${id}`}
style={{ marginRight: 10 }} target="_blank"
>{getLabel(83110, "查看详情")}</a>
}
{
sendNum !== sendTotal && !showGrant &&
<Dropdown
overlay={<Menu>
<Menu.Item key="1">{getLabel(543603, "更新模板")}</Menu.Item>
overlay={<Menu onClick={e => this.handleOpts(e, record)}>
<Menu.Item key="template">{getLabel(543603, "更新模板")}</Menu.Item>
</Menu>
}
>