bug处理

release/2.19.1.2503.01-业务线个税
lys 6 months ago
parent 632f42bf07
commit f90fda8bfb

@ -17,21 +17,15 @@ interface OwnProps {
i18n?: any;
pattern?: number;
calcDetail?: boolean; //查看详情页面
children?: any;
}
type Props = OwnProps;
const customTableTitle: FunctionComponent<Props> = (props) => {
const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail } = props;
const { dataIndex, title, onHandleFormulatd, i18n = {}, pattern, dataType, calcDetail, children } = props;
const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => {
window.parent.postMessage(
{
type: "turn",
payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } }
},
"*"
);
window.parent.postMessage({ type: "turn", payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*");
};
return (
// th-width-lock
@ -39,7 +33,7 @@ const customTableTitle: FunctionComponent<Props> = (props) => {
<div className={styles["title-text"]} title={title} onClick={() => onHandleFormulatd(dataIndex)}>
{title}
</div>
{!calcDetail && (
{!calcDetail && _.isEmpty(children) && (
<div className={styles["toogle-lock-tool"]}>
<Icon type="icon-piliangsuoding" title={i18n["点击锁定所有解锁的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")} />
<Icon type="icon-piliangjiesuo" title={i18n["点击解锁所有锁定的项目值"]} onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")} />

Loading…
Cancel
Save