diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index d9929ba..dcdbad8 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -58,8 +58,9 @@ cursor: pointer; } - span.anticon-lock { + span.anticon-lock, span.anticon-question-circle { margin-left: 4px; + color: #5d9cec; } } } @@ -97,6 +98,10 @@ } } + .feedbackBg { + background: #FF0; + } + .danger { font-size: var(--data-size); color: rgb(217, 0, 27) diff --git a/src/pages/calcTable/calcExplainFooter.tsx b/src/pages/calcTable/calcExplainFooter.tsx index b2cd8ee..bdd3dae 100644 --- a/src/pages/calcTable/calcExplainFooter.tsx +++ b/src/pages/calcTable/calcExplainFooter.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent } from "react"; import Icon from "@/lib/CustomIcon"; -import { LockOutlined, UnlockOutlined } from "@ant-design/icons"; +import { LockOutlined, UnlockOutlined, QuestionCircleOutlined } from "@ant-design/icons"; import styles from "@/pages/atdTable/components/index.less"; interface OwnProps { @@ -14,21 +14,27 @@ const CalcExplainFooter: FunctionComponent = (props) => { return (
- + {i18n["批量锁定"]}
- + {i18n["批量解锁"]}
- + {i18n["当前状态锁定,右击解锁"]}
- + {i18n["当前状态未锁定,右击锁定"]}
+ {(i18n["反馈信息,右击删除反馈信息"] || i18n["反馈信息,右击设置反馈信息"]) && ( +
+ + {i18n["反馈信息,右击删除反馈信息"] || i18n["反馈信息,右击设置反馈信息"]} +
+ )}
{i18n["查看拓扑图"]} diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 91c003a..8d8a5d1 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -6,8 +6,8 @@ */ import React, { FunctionComponent, useEffect, useState } from "react"; import type { MenuProps } from "antd"; -import { Button, Dropdown, Space, Table, Typography } from "antd"; -import { LockOutlined, UnlockOutlined } from "@ant-design/icons"; +import { Button, Dropdown, Space, Table, Tooltip, Typography } from "antd"; +import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons"; import CustomTableTitle from "@/pages/calcTable/customTableTitle"; import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter"; import CaclFixedTotal from "./calcFixedTotal"; @@ -131,43 +131,81 @@ const index: FunctionComponent = (props) => { className: styles["td_odd"], i18n: item.i18n, onCell: (record: any) => ({ + className: !_.isEmpty(record[`${item.dataIndex}_feedback`]) && styles["feedbackBg"], onContextMenu: (e: any) => { - !item.calcDetail && e.preventDefault(); + (!item.calcDetail || item.rightClickType) && e.preventDefault(); } }), render: (text: string, record: any) => { - const items: MenuProps["items"] = [ - { - label: item.i18n["锁定"], - key: "LOCK", - icon: , - onClick: () => - handleLockEmp({ - lockStatus: "LOCK", - acctEmpId: record?.id, - salaryItemId: item?.dataIndex - }) - }, - { - label: item.i18n["解锁"], - key: "UNLOCK", - icon: , - onClick: () => - handleLockEmp({ - lockStatus: "UNLOCK", - acctEmpId: record?.id, - salaryItemId: item?.dataIndex - }) - } - ]; + let items: MenuProps["items"] = !item.calcDetail + ? [ + { + label: item.i18n["锁定"], + key: "LOCK", + icon: , + onClick: () => + handleLockEmp({ + lockStatus: "LOCK", + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + }, + { + label: item.i18n["解锁"], + key: "UNLOCK", + icon: , + onClick: () => + handleLockEmp({ + lockStatus: "UNLOCK", + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + } + ] + : []; + item.rightClickType && + item.rightClickType.includes("DELFEEDBACK") && + (items = [ + ...items, + { + label: item.i18n["删除反馈"], + key: "DELFEEDBACK", + icon: , + onClick: () => + handleDelFeedback({ + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + } + ]); + item.rightClickType && + item.rightClickType.includes("SETFEEDBACK") && + (items = [ + ...items, + { + label: item.i18n["设置反馈"], + key: "SETFEEDBACK", + icon: , + onClick: () => + handleSetFeedback({ + acctEmpId: record?.id, + salaryItemId: item?.dataIndex + }) + } + ]); return ( - + {text} handleDiagramTd(item?.dataIndex, record?.id)} /> {record.lockItems && record.lockItems.includes(item.dataIndex) ? : null} + {!_.isEmpty(record[`${item.dataIndex}_feedback`]) ? ( + + + + ) : null} ); @@ -188,6 +226,13 @@ const index: FunctionComponent = (props) => { const handleLockEmp = (params: any) => { window.parent.postMessage({ type: "turn", payload: { id: "LOCKEMP", params } }, "*"); }; + // 复旦大学附属医院二开-薪资核算项添加右击删除反馈的操作 + const handleDelFeedback = (params: any) => { + window.parent.postMessage({ type: "turn", payload: { id: "DELFEEDBACK", params } }, "*"); + }; + const handleSetFeedback = (params: any) => { + window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*"); + }; const sizeChange = (pageobj: IPage) => {}; const onChange = (pageobj: IPage) => { setPageInfo(() => {