diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index 8aa9522..12cae05 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -86,7 +86,7 @@ .expand-th:hover { .toogle-lock-tool { - width: 30%; + width: 37%; } } @@ -118,7 +118,7 @@ justify-content: center; align-items: center; - & > :first-child { + & > :not(:last-child) { margin-right: 4px; } diff --git a/src/pages/calcTable/calcExplainFooter.tsx b/src/pages/calcTable/calcExplainFooter.tsx index 5799820..6b6fa3e 100644 --- a/src/pages/calcTable/calcExplainFooter.tsx +++ b/src/pages/calcTable/calcExplainFooter.tsx @@ -29,6 +29,10 @@ const CalcExplainFooter: FunctionComponent = (props) => { {i18n["当前状态未锁定,点击锁定"]} +
+ + {i18n["批量更新"]} +
); }; diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index 3931d39..cdcad41 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -13,20 +13,22 @@ interface OwnProps { dataIndex?: string; title?: string; lockStatus?: string; + dataType?: string; onHandleFormulatd?: any; i18n?: any; + pattern?: number; } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { - const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {} } = props; + const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType } = props; - const handleToggleSalaryItemVal = (salaryItemId: string, type: string) => { + const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => { window.parent.postMessage( { type: "turn", - payload: { id: "LOCKING", params: { lockType: type, salaryItemId } } + payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*" ); @@ -42,6 +44,10 @@ const customTableTitle: FunctionComponent = (props) => { onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/> + handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { + pattern, salaryItemName: title, dataType + })}/> }