release/2.19.1.2503.01-业务线个税
黎永顺 1 year ago
parent 2a538033b2
commit 26117e7254

@ -5,7 +5,7 @@
* Date: 2023/9/14 * Date: 2023/9/14
*/ */
import React, { FunctionComponent, useEffect, useState } from "react"; import React, { FunctionComponent, useEffect, useState } from "react";
import { Button, Table, Typography } from "antd"; import { Button, Space, Table, Typography } from "antd";
import { LockOutlined } from "@ant-design/icons"; import { LockOutlined } from "@ant-design/icons";
import CustomTableTitle from "@/pages/calcTable/customTableTitle"; import CustomTableTitle from "@/pages/calcTable/customTableTitle";
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter"; import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
@ -65,7 +65,11 @@ const index: FunctionComponent<Props> = (props) => {
setTableScrollHeight(tableScrollHeight); setTableScrollHeight(tableScrollHeight);
setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), { setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), {
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: 120, title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: 120,
render: (__, record) => (<Button type="link" onClick={() => handleEdit(record?.id)}>{i18nRes["编辑"]}</Button>) render: (__, record) => (<Space>
<Button type="link" onClick={() => handleEdit(record?.id)}>{i18nRes["编辑"]}</Button>
<Button type="link"
onClick={() => handleLockEmp(record)}>{record.lockStatus === "LOCK" ? i18nRes["解锁"] : i18nRes["锁定"]}</Button>
</Space>)
}]); }]);
} }
}; };
@ -78,11 +82,12 @@ const index: FunctionComponent<Props> = (props) => {
...item, title: <CustomTableTitle {...item} onHandleFormulatd={handleFormulaTd}/>, ...item, title: <CustomTableTitle {...item} onHandleFormulatd={handleFormulaTd}/>,
children: convertColumns(_.map(item.children, o => ({ ...o, i18n: item.i18n }))), children: convertColumns(_.map(item.children, o => ({ ...o, i18n: item.i18n }))),
className: styles["td_odd"], i18n: item.i18n, className: styles["td_odd"], i18n: item.i18n,
render: (text: string) => ( render: (text: string, record: any) => (
<span className={styles.contentSpan}> <span className={styles.contentSpan}>
<span title={text} className={styles.contentTitle}>{text}</span> <span title={text} className={styles.contentTitle}>{text}</span>
{ {
item.lockStatus === "LOCK" ? <LockOutlined title={i18n["锁定的项目值"]}/> : null (item.lockStatus === "LOCK" || record.lockStatus === "LOCK") ?
<LockOutlined title={i18n["锁定的项目值"]}/> : null
} }
</span> </span>
) )
@ -108,6 +113,15 @@ const index: FunctionComponent<Props> = (props) => {
"*" "*"
); );
}; };
const handleLockEmp = (record: any) => {
const { id, lockStatus } = record;
window.parent.postMessage({
type: "turn",
payload: { id: "LOCKEMP", params: { lockStatus: lockStatus === "UNLOCK" ? "LOCK" : "UNLOCK", acctEmpIds: [id] } }
},
"*"
);
};
const sizeChange = (pageobj: IPage) => { const sizeChange = (pageobj: IPage) => {
}; };
const onChange = (pageobj: IPage) => { const onChange = (pageobj: IPage) => {

Loading…
Cancel
Save