master-薪资核算添加批量更新功能

custom/鲁控数字-薪资核算列表页面批量编辑
黎永顺 1 year ago
parent 0c00895f18
commit 2ea548bd7f

@ -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;
}

@ -29,6 +29,10 @@ const CalcExplainFooter: FunctionComponent<Props> = (props) => {
<UnlockOutlined/>
<span>{i18n["当前状态未锁定,点击锁定"]}</span>
</div>
<div className={styles["icon-item"]}>
<Icon type="icon-pilianggengxin"/>
<span>{i18n["批量更新"]}</span>
</div>
</div>
);
};

@ -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> = (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> = (props) => {
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/>
<Icon type="icon-piliangjiesuo" title={i18n["点击解锁所有锁定的项目值"]}
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/>
<Icon type="icon-pilianggengxin" title={i18n["批量更新"]}
onClick={() => handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", {
pattern, salaryItemName: title, dataType
})}/>
</div>
}
</div>

Loading…
Cancel
Save