Merge branch 'master' into feature/业务线管理

release/2.19.1.2503.01-业务线个税
lys 8 months ago
commit 7b95a64415

@ -105,7 +105,7 @@ const index: FunctionComponent<Props> = (props) => {
i18n: item.i18n,
onCell: (record: any) => ({
onContextMenu: (e: any) => {
record.lockItems && e.preventDefault();
!item.calcDetail && e.preventDefault();
}
}),
render: (text: string, record: any) => {
@ -134,7 +134,7 @@ const index: FunctionComponent<Props> = (props) => {
}
];
return (
<Dropdown menu={{ items: record.lockItems ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide>
<Dropdown menu={{ items: !item.calcDetail ? items : [] }} trigger={["contextMenu"]} overlayClassName={styles.contextMenu} destroyPopupOnHide>
<span className={styles.contentSpan}>
<span title={text} className={styles.contentTitle} style={{ color: `${record?.[item.dataIndex + "_color"]}` }}>
{text}

@ -15,6 +15,7 @@ export type extraType = {
rowKey: string;
showTotalCell: boolean;
isSpecial: boolean;
showRowSelection: boolean;
};
const UnitTable: FC = (props) => {
const [unitTableType, setUnitTableType] = useState<string>("");
@ -48,7 +49,8 @@ const UnitTable: FC = (props) => {
rowKey,
showTotalCell = false,
sumDataSource = {},
isSpecial = false
isSpecial = false,
showRowSelection = true
} = data;
setI18n(i18n);
setColumns(columns);
@ -63,6 +65,7 @@ const UnitTable: FC = (props) => {
rowKey,
showTotalCell,
isSpecial,
showRowSelection,
selectedRowKeys: [...(extraParams.selectedRowKeys as string[] | number[]), ...rowKeys]
});
}
@ -99,15 +102,8 @@ const UnitTable: FC = (props) => {
columns={renderCols(columns, unitTableType, i18n, extraParams)}
scroll={{ x: 1200, y: `calc(100vh - ${extraParams?.scrollHeight || 109}px)` }}
bordered={_.some(columns, (k) => k.children)}
rowSelection={!_.isNil(extraParams?.selectedRowKeys) ? rowSelection : undefined}
pagination={
!_.isNil(pageInfo)
? {
...paginationAction(pageInfo, i18n, onChange),
size: "default"
}
: false
}
rowSelection={extraParams?.showRowSelection ? rowSelection : undefined}
pagination={!_.isNil(pageInfo) ? { ...paginationAction(pageInfo, i18n, onChange), size: "default" } : false}
summary={() =>
!extraParams.showTotalCell ? (
<></>

@ -69,7 +69,7 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
width: 185,
fixed: "right",
render: (__: string, record: any) => {
const { billStatus } = record;
const { billStatus, customOptAuth } = record;
const items: MenuProps["items"] = [
{
key: "DeleteList",
@ -111,9 +111,11 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
<Button type="link" onClick={() => postMessageToParent("CALC", record)}>
{i18n?.["核算"]}
</Button>
{(_.isEmpty(customOptAuth) || customOptAuth.FILE) && (
<Button type="link" onClick={() => postMessageToParent("FILE", record)}>
{i18n?.["归档"]}
</Button>
)}
<Dropdown menu={{ items }} placement="bottomRight">
<Button type="link" icon={<MoreOutlined />} />
</Dropdown>
@ -124,9 +126,11 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
<Button type="link" onClick={() => postMessageToParent("VIEW", record)}>
{i18n?.["查看"]}
</Button>
{(_.isEmpty(customOptAuth) || customOptAuth.RECALC) && (
<Button type="link" onClick={() => postMessageToParent("RECALC", record)}>
{i18n?.["重新核算"]}
</Button>
)}
<Dropdown
menu={{
items: [

Loading…
Cancel
Save