|
|
@@ -26,6 +26,7 @@ import { saveListState } from '../../../redux/actions/listState'
|
|
|
import { LIST_PAGE_SIZE } from '../../../configs/constans.config'
|
|
|
import CurrencyDetail from '../currencyDetail/CurrencyDetail'
|
|
|
import { refreshFormState } from '../../../redux/actions/formState'
|
|
|
+import { getFormAndGrid } from '../../../utils/common/form.request'
|
|
|
|
|
|
class CurrencyList extends Component {
|
|
|
|
|
|
@@ -70,6 +71,13 @@ class CurrencyList extends Component {
|
|
|
} else {
|
|
|
this.recoveryScroll()
|
|
|
}
|
|
|
+ const {
|
|
|
+ requestSearchConfig,
|
|
|
+ formState: { filterGroupList },
|
|
|
+ } = this.props
|
|
|
+ if (isObjEmpty(filterGroupList) && !isObjNull(requestSearchConfig)) {
|
|
|
+ requestSearchConfig()
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
componentWillUnmount () {
|
|
|
@@ -182,6 +190,7 @@ class CurrencyList extends Component {
|
|
|
const {
|
|
|
params, formState: { filterGroupList },
|
|
|
} = this.props
|
|
|
+ console.log(filterGroupList)
|
|
|
return (
|
|
|
<div
|
|
|
className='currency-list-content-filter-content'>
|
|
|
@@ -238,9 +247,6 @@ class CurrencyList extends Component {
|
|
|
saveListState({
|
|
|
scrollTop: ReactDOM.findDOMNode(this.lv).scrollTop,
|
|
|
})
|
|
|
- refreshFormState({
|
|
|
- filterGroupList: this.cd && this.cd.state.billGroupList,
|
|
|
- })
|
|
|
const { onItemClick } = this.props
|
|
|
onItemClick && onItemClick(rowData)
|
|
|
}
|
|
|
@@ -255,9 +261,6 @@ class CurrencyList extends Component {
|
|
|
saveListState({
|
|
|
scrollTop: ReactDOM.findDOMNode(this.lv).scrollTop,
|
|
|
})
|
|
|
- refreshFormState({
|
|
|
- filterGroupList: this.cd && this.cd.state.billGroupList,
|
|
|
- })
|
|
|
const { onDocAdd } = this.props
|
|
|
onDocAdd && onDocAdd()
|
|
|
}
|
|
|
@@ -277,11 +280,9 @@ class CurrencyList extends Component {
|
|
|
}
|
|
|
|
|
|
onFilterCommit = () => {
|
|
|
- // const { formState: { filterGroupList } } = this.props
|
|
|
- // let formAndGrid = getFormAndGrid(filterGroupList)
|
|
|
- // console.log(formAndGrid)
|
|
|
- console.log(this.lv)
|
|
|
- console.log(this.cd)
|
|
|
+ const filterGroupList = this.cd && this.cd.state.billGroupList
|
|
|
+ let formAndGrid = getFormAndGrid(filterGroupList)
|
|
|
+ console.log(formAndGrid)
|
|
|
}
|
|
|
}
|
|
|
|