|
@@ -7,6 +7,7 @@ import { ContractTree, iShowTemplateState, iTemplateState } from '@/types/contra
|
|
import { iFile } from '@/types/file'
|
|
import { iFile } from '@/types/file'
|
|
import { apiSaveFileInfo } from '@/utils/common/api'
|
|
import { apiSaveFileInfo } from '@/utils/common/api'
|
|
import { contractConsts } from '@/utils/common/constStatus'
|
|
import { contractConsts } from '@/utils/common/constStatus'
|
|
|
|
+import { useTableExpand } from '@/utils/common/customHooks'
|
|
import consts from '@/utils/consts'
|
|
import consts from '@/utils/consts'
|
|
import { formatMoney } from '@/utils/util'
|
|
import { formatMoney } from '@/utils/util'
|
|
import { Button, message, Radio, Table, Tabs } from 'antd'
|
|
import { Button, message, Radio, Table, Tabs } from 'antd'
|
|
@@ -42,6 +43,9 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow, h
|
|
template: '',
|
|
template: '',
|
|
loading: false
|
|
loading: false
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ const [ ids, setRowKeys ] = useTableExpand(contractStore.tree)
|
|
|
|
+
|
|
const [ tempalte, setTempalte ] = useState<{ template1: iTemplateState, template2: iTemplateState }>({
|
|
const [ tempalte, setTempalte ] = useState<{ template1: iTemplateState, template2: iTemplateState }>({
|
|
template1: {
|
|
template1: {
|
|
attribution: '',
|
|
attribution: '',
|
|
@@ -358,6 +362,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow, h
|
|
defaultExpandAllRows={true}
|
|
defaultExpandAllRows={true}
|
|
onRow={onClickRow}
|
|
onRow={onClickRow}
|
|
rowClassName={handleRowClass}
|
|
rowClassName={handleRowClass}
|
|
|
|
+ expandable={{ expandedRowKeys: ids, onExpand: (expanded: boolean, record: any) => setRowKeys(expanded, record as ContractTree) }}
|
|
style={{ height: '100%', overflowY: 'scroll' }}
|
|
style={{ height: '100%', overflowY: 'scroll' }}
|
|
/>
|
|
/>
|
|
: ''
|
|
: ''
|