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