|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import React from "react";
|
|
|
|
|
import { Button, Dropdown, MenuProps, Space, Typography } from "antd";
|
|
|
|
|
import { MoreOutlined } from "@ant-design/icons";
|
|
|
|
|
import { Button, Dropdown, MenuProps, Space, Tooltip, Typography } from "antd";
|
|
|
|
|
import { MoreOutlined, QuestionCircleFilled } from "@ant-design/icons";
|
|
|
|
|
|
|
|
|
|
const { Text } = Typography;
|
|
|
|
|
|
|
|
|
@ -97,19 +97,12 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
} else if (type === "bonusplan") {
|
|
|
|
|
return [..._.map(_.filter(initialState, o => o.dataIndex !== "id"), g => {
|
|
|
|
|
let col = { ...g, ellipsis: true, fixed: g.dataIndex === "billMonth", width: 180 };
|
|
|
|
|
return [..._.map(initialState, g => {
|
|
|
|
|
let col = { ...g, ellipsis: true, fixed: false, width: 150 };
|
|
|
|
|
switch (g.dataIndex) {
|
|
|
|
|
case "billMonth":
|
|
|
|
|
col = {
|
|
|
|
|
...col,
|
|
|
|
|
width: 120,
|
|
|
|
|
render: (text: string, record: any) => {
|
|
|
|
|
const { billStatus } = record;
|
|
|
|
|
return (<Button type="link"
|
|
|
|
|
onClick={() => postMessageToParent(billStatus === "0" ? "CALC" : "VIEW", record)}>{text}</Button>);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
case "taxYear":
|
|
|
|
|
case "fileStatusDesc":
|
|
|
|
|
col = { ...col, width: 80 };
|
|
|
|
|
break;
|
|
|
|
|
case "billStatus":
|
|
|
|
|
col = {
|
|
|
|
@ -120,23 +113,61 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case "paymentOrganization":
|
|
|
|
|
col = { ...col, width: 200 };
|
|
|
|
|
case "optimizedBonusSum":
|
|
|
|
|
col = { ...col, width: 220 };
|
|
|
|
|
break;
|
|
|
|
|
case "socialNum":
|
|
|
|
|
case "otherNum":
|
|
|
|
|
case "fundNum":
|
|
|
|
|
col = { ...col, width: 118 };
|
|
|
|
|
break;
|
|
|
|
|
case "remarks":
|
|
|
|
|
col = { ...col, width: 200 };
|
|
|
|
|
case "employeeCount":
|
|
|
|
|
col = {
|
|
|
|
|
...col, title: <Space>
|
|
|
|
|
<Text>{g.title}</Text>
|
|
|
|
|
<Tooltip placement="top"
|
|
|
|
|
title={i18n?.["若同一个人 在两个个税扣缴义务人下 同一纳税年度 同时发年终奖,统计为两个人"]}>
|
|
|
|
|
<QuestionCircleFilled/>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Space>
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
col = { ...col };
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return col;
|
|
|
|
|
})];
|
|
|
|
|
}), {
|
|
|
|
|
dataIndex: "operate", title: i18n?.["操作"], width: 185, fixed: "right",
|
|
|
|
|
render: (__: string, record: any) => {
|
|
|
|
|
const { fileStatus } = record;
|
|
|
|
|
const items: MenuProps["items"] = [
|
|
|
|
|
{
|
|
|
|
|
key: "FileList",
|
|
|
|
|
label: fileStatus === 0 ? i18n?.["归档"] : i18n?.["取消归档"],
|
|
|
|
|
onClick: () => postMessageToParent("FILE", record)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "DeleteList",
|
|
|
|
|
label: i18n?.["删除"],
|
|
|
|
|
onClick: () => postMessageToParent("DEL", record)
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
{
|
|
|
|
|
!permission ?
|
|
|
|
|
<Button type="link"
|
|
|
|
|
onClick={() => postMessageToParent("VIEW", record)}>{i18n?.["查看详情"]}</Button> :
|
|
|
|
|
<>
|
|
|
|
|
<Button type="link"
|
|
|
|
|
onClick={() => postMessageToParent("VIEW", record)}>{i18n?.["查看详情"]}</Button>
|
|
|
|
|
<Button type="link"
|
|
|
|
|
onClick={() => postMessageToParent("EDIT", record)}>{i18n?.["编辑"]}</Button>
|
|
|
|
|
<Dropdown menu={{ items }} placement="bottomRight">
|
|
|
|
|
<Button type="link" icon={<MoreOutlined/>}/>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
</Space>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
}
|
|
|
|
|
return [];
|
|
|
|
|
}, [initialState, type, i18n, permission]);
|
|
|
|
|