feature/2.9.42310.01-工资单发放页面重构
This commit is contained in:
parent
02863814ba
commit
ab3be2c1f9
|
|
@ -5,6 +5,7 @@
|
|||
* Date: 2023/10/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { Dropdown, Menu, Tag } from "antd";
|
||||
import { getPayrollList } from "../../../../apis/payroll";
|
||||
|
|
@ -12,6 +13,8 @@ import moment from "moment";
|
|||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -80,6 +83,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { loading, dataSource, columns, pageInfo } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
|
|
@ -106,17 +110,29 @@ class Index extends Component {
|
|||
{
|
||||
dataIndex: "operate", title: getLabel(30585, "操作"), width: 170,
|
||||
render: (__, record) => {
|
||||
const { canSeeDetail, sendNum, sendTotal, haveBackCalc, salaryAcctType } = record;
|
||||
//显示更新模板
|
||||
const showGrant = haveBackCalc === 1 && salaryAcctType === 0;
|
||||
return <React.Fragment>
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(542702, "发放")}</a>
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(83110, "查看详情")}</a>
|
||||
<Dropdown
|
||||
overlay={<Menu>
|
||||
<Menu.Item key="1">{getLabel(543603, "更新模板")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(542702, "发放")}</a>
|
||||
}
|
||||
{
|
||||
canSeeDetail &&
|
||||
<a href="javascript:void(0);" style={{ marginRight: 10 }}>{getLabel(83110, "查看详情")}</a>
|
||||
}
|
||||
{
|
||||
sendNum !== sendTotal && !showGrant &&
|
||||
<Dropdown
|
||||
overlay={<Menu>
|
||||
<Menu.Item key="1">{getLabel(543603, "更新模板")}</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
<a href="javascript:void(0);"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
</React.Fragment>;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue