|
|
|
@ -38,7 +38,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
const getPCDataList = (params: any = {}) => {
|
|
|
|
|
let { type, listType, hasOperate = true, ...extraParams } = params;
|
|
|
|
|
let { type, listType, hasOperate = true, i18n: newI18n, ...extraParams } = params;
|
|
|
|
|
setLoading({ query: true });
|
|
|
|
|
setTab(type);
|
|
|
|
|
setUsertab(listType);
|
|
|
|
@ -49,7 +49,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
if (type === "PC") {
|
|
|
|
|
if (listType === "SA") {
|
|
|
|
|
const { columns = [], list = [], total, pageSize: size, pageNum } = dataCopy;
|
|
|
|
|
setColumns(getUserListColumns(columns));
|
|
|
|
|
setColumns(getUserListColumns(columns, newI18n));
|
|
|
|
|
setDataSource(list);
|
|
|
|
|
setPageParams({ ...pageParams, total, size, pageNum });
|
|
|
|
|
} else if (listType === "MA") {
|
|
|
|
@ -61,7 +61,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
} else {
|
|
|
|
|
const { columns = [], pageInfo = {} } = dataCopy;
|
|
|
|
|
const { list = [], total, pageSize: size, pageNum } = pageInfo;
|
|
|
|
|
setColumns(getColumns(columns, hasOperate));
|
|
|
|
|
setColumns(getColumns(columns, hasOperate, newI18n));
|
|
|
|
|
setDataSource(list);
|
|
|
|
|
setPageParams({ ...pageParams, total, size, pageNum });
|
|
|
|
|
const confCode: any = await API.CalculateService.getSysconfcode({ code: "OPEN_ACCT_RESULT_SUM" });
|
|
|
|
@ -81,10 +81,10 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const getUserListColumns = (acctemployeeListColumns: any) => {
|
|
|
|
|
const getUserListColumns = (acctemployeeListColumns: any, newI18n:any) => {
|
|
|
|
|
let tmpColumns = [...acctemployeeListColumns, {
|
|
|
|
|
key: "cz",
|
|
|
|
|
title: i18n["操作"],
|
|
|
|
|
title: newI18n["操作"],
|
|
|
|
|
render: (text: string, record: any) => {
|
|
|
|
|
return (
|
|
|
|
|
<Button type="link" style={{ padding: "0" }}
|
|
|
|
@ -98,7 +98,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{i18n["删除"]}
|
|
|
|
|
{newI18n["删除"]}
|
|
|
|
|
</Button>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -130,7 +130,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
return tmpColumns;
|
|
|
|
|
};
|
|
|
|
|
//薪资核算页面列表
|
|
|
|
|
const getColumns = (column: any, hasOperate: boolean = true) => {
|
|
|
|
|
const getColumns = (column: any, hasOperate: boolean = true, newI18n: any) => {
|
|
|
|
|
let tmpColumns = [...column];
|
|
|
|
|
tmpColumns = tmpColumns.filter(item => item.hide == "FALSE").map((item, index) => {
|
|
|
|
|
let result = { ...item };
|
|
|
|
@ -148,7 +148,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
item.lockStatus && <span className={styles.titleIcon}>
|
|
|
|
|
{
|
|
|
|
|
item.lockStatus === "UNLOCK" && <LockOutlined
|
|
|
|
|
title={i18n["点击锁定所有解锁的项目值"]}
|
|
|
|
|
title={newI18n["点击锁定所有解锁的项目值"]}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
window.parent.postMessage(
|
|
|
|
|
{
|
|
|
|
@ -162,7 +162,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
item.lockStatus !== "UNLOCK" && <UnlockOutlined
|
|
|
|
|
title={i18n["点击解锁所有锁定的项目值"]}
|
|
|
|
|
title={newI18n["点击解锁所有锁定的项目值"]}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
window.parent.postMessage(
|
|
|
|
|
{
|
|
|
|
@ -197,7 +197,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
return <span className={styles.contentSpan}>
|
|
|
|
|
<span title={text} className={styles.contentTitle}>{text}</span>
|
|
|
|
|
{
|
|
|
|
|
result.lockStatus === "LOCK" ? <LockOutlined title={i18n["锁定的项目值"]}/> : null
|
|
|
|
|
result.lockStatus === "LOCK" ? <LockOutlined title={newI18n["锁定的项目值"]}/> : null
|
|
|
|
|
}
|
|
|
|
|
</span>;
|
|
|
|
|
};
|
|
|
|
@ -220,7 +220,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
{
|
|
|
|
|
child.lockStatus === "UNLOCK" &&
|
|
|
|
|
<LockOutlined
|
|
|
|
|
title={i18n["点击锁定所有解锁的项目值"]}
|
|
|
|
|
title={newI18n["点击锁定所有解锁的项目值"]}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
window.parent.postMessage(
|
|
|
|
|
{
|
|
|
|
@ -235,7 +235,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
{
|
|
|
|
|
child.lockStatus !== "UNLOCK" &&
|
|
|
|
|
<UnlockOutlined
|
|
|
|
|
title={i18n["点击解锁所有锁定的项目值"]}
|
|
|
|
|
title={newI18n["点击解锁所有锁定的项目值"]}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
window.parent.postMessage(
|
|
|
|
|
{
|
|
|
|
@ -257,7 +257,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
return <span className={styles.contentSpan}>
|
|
|
|
|
<span title={text} className={styles.contentTitle}>{text}</span>
|
|
|
|
|
{
|
|
|
|
|
child.lockStatus === "LOCK" ? <LockOutlined title={i18n["锁定的项目值"]}/> : null
|
|
|
|
|
child.lockStatus === "LOCK" ? <LockOutlined title={newI18n["锁定的项目值"]}/> : null
|
|
|
|
|
}
|
|
|
|
|
</span>;
|
|
|
|
|
};
|
|
|
|
@ -274,7 +274,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
return result;
|
|
|
|
|
});
|
|
|
|
|
hasOperate && tmpColumns.push({
|
|
|
|
|
title: i18n["操作"],
|
|
|
|
|
title: newI18n["操作"],
|
|
|
|
|
key: "cz",
|
|
|
|
|
width: "100px",
|
|
|
|
|
fixed: "right",
|
|
|
|
@ -287,7 +287,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
},
|
|
|
|
|
"*"
|
|
|
|
|
);
|
|
|
|
|
}}>{i18n["编辑"]}</Button>;
|
|
|
|
|
}}>{newI18n["编辑"]}</Button>;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return tmpColumns;
|
|
|
|
@ -298,7 +298,7 @@ const AntdTable: FC<ITableProps> = (props) => {
|
|
|
|
|
if (!_.isEmpty(data)) {
|
|
|
|
|
const { selectedRowKeys, i18n, ...extraData } = data;
|
|
|
|
|
setI18n(i18n);
|
|
|
|
|
getPCDataList({ ...extraData, ...pageParams });
|
|
|
|
|
getPCDataList({ ...extraData, ...pageParams, i18n });
|
|
|
|
|
if (selectedRowKeys) setSelected(selectedRowKeys);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|