Compare commits
3 Commits
c5d5609a1f
...
497c635d26
| Author | SHA1 | Date |
|---|---|---|
|
|
497c635d26 | |
|
|
45862052c7 | |
|
|
4e231ec401 |
|
|
@ -65,10 +65,10 @@ const OCTable: FC = (props) => {
|
||||||
<span>{excelResultValue}</span>
|
<span>{excelResultValue}</span>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
showDifference &&
|
showDifference && !!parseInt(calculateDifference(acctResultValue, excelResultValue || 0)) &&
|
||||||
<div className={cs(styles["danger"], styles["comparison-single-row"])}>
|
<div className={cs(styles["danger"], styles["comparison-single-row"])}>
|
||||||
<span>{lanObj["差值"]}:</span>
|
<span>{lanObj["差值"]}:</span>
|
||||||
<span>{calculateDifference(acctResultValue, excelResultValue)}</span>
|
<span>{calculateDifference(acctResultValue, excelResultValue || 0)}</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>;
|
</div>;
|
||||||
|
|
@ -104,7 +104,7 @@ const OCTable: FC = (props) => {
|
||||||
return <Table
|
return <Table
|
||||||
rowKey="id" className={styles.tableWrapper}
|
rowKey="id" className={styles.tableWrapper}
|
||||||
columns={columns} dataSource={dataSource} bordered size="small"
|
columns={columns} dataSource={dataSource} bordered size="small"
|
||||||
scroll={{ x: 1200, y: `calc(100vh - 137px)` }}
|
scroll={{ x: 1200, y: `calc(100vh - 165px)` }}
|
||||||
pagination={{
|
pagination={{
|
||||||
...paginationFun(pageInfo, sizeChange, onChange, i18n),
|
...paginationFun(pageInfo, sizeChange, onChange, i18n),
|
||||||
size: "default"
|
size: "default"
|
||||||
|
|
|
||||||
|
|
@ -245,8 +245,8 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
columnWidth: 50,
|
columnWidth: 50,
|
||||||
columnTitle: isDetailTable ? "序号" : "",
|
columnTitle: isDetailTable && _.isNil(showSee) ? "序号" : "",
|
||||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
|
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && _.isNil(showSee) ? <span>{index + 1}</span> : originNode),
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
preserveSelectedRowKeys: true,
|
preserveSelectedRowKeys: true,
|
||||||
onChange: (rowKeys: React.Key[]) => {
|
onChange: (rowKeys: React.Key[]) => {
|
||||||
|
|
|
||||||
|
|
@ -444,6 +444,58 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
|
||||||
return col;
|
return col;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
} else if (type === "attendanceView") {
|
||||||
|
return [
|
||||||
|
..._.map(initialState, (g) => {
|
||||||
|
let col = { ...g, ellipsis: true };
|
||||||
|
switch (g.dataIndex) {
|
||||||
|
case "operate":
|
||||||
|
col = {
|
||||||
|
...col,
|
||||||
|
width: 176,
|
||||||
|
fixed: "right" // render: (__: string, record: any) => {
|
||||||
|
// let items: MenuProps["items"] = [
|
||||||
|
// {
|
||||||
|
// key: "DeleteList",
|
||||||
|
// label: i18n?.["删除"],
|
||||||
|
// onClick: () => postMessageToParent("DEL", record)
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// key: "Log",
|
||||||
|
// label: i18n?.["操作日志"],
|
||||||
|
// onClick: () => postMessageToParent("log", record)
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
// isSpecial && items.shift();
|
||||||
|
// return (
|
||||||
|
// <Space>
|
||||||
|
// <Button type="link" onClick={() => postMessageToParent("EDIT", record)}>
|
||||||
|
// {i18n?.["编辑"]}
|
||||||
|
// </Button>
|
||||||
|
// {isSpecial ? (
|
||||||
|
// <Button type="link" onClick={() => postMessageToParent("DEL", record)}>
|
||||||
|
// {i18n?.["删除"]}
|
||||||
|
// </Button>
|
||||||
|
// ) : (
|
||||||
|
// <Button type="link" onClick={() => postMessageToParent("VIEW", record)}>
|
||||||
|
// {i18n?.["查看明细"]}
|
||||||
|
// </Button>
|
||||||
|
// )}
|
||||||
|
// <Dropdown menu={{ items }} placement="bottomRight">
|
||||||
|
// <Button type="link" icon={<MoreOutlined />} />
|
||||||
|
// </Dropdown>
|
||||||
|
// </Space>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
col = { ...col };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return col;
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
return initialState;
|
return initialState;
|
||||||
}, [initialState, type, i18n, extraParams]);
|
}, [initialState, type, i18n, extraParams]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue