|
|
@@ -11,171 +11,24 @@ import { SUBSCRIBE_ITEM_NOT } from '../../../configs/constans.config'
|
|
|
import SubLeftMenu from '../../../components/private/subscribe/SubLeftMenu'
|
|
|
import { saveListState } from '../../../redux/actions/listState'
|
|
|
import { isObjEmpty } from '../../../utils/common/common.util'
|
|
|
-import { requestSubscribeConfig } from '../../../utils/private/subscribe.util'
|
|
|
-
|
|
|
-const subMenuList = [
|
|
|
- {
|
|
|
- className: '财务管理',
|
|
|
- subList: [
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3126,
|
|
|
- 'title': '我的事业部应收款统计(华商龙)',
|
|
|
- 'status': 2,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'public',
|
|
|
- 'id': 3140,
|
|
|
- 'title': '风控周报',
|
|
|
- 'status': 2,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3107,
|
|
|
- 'title': '上月利润统计(华商龙)',
|
|
|
- 'status': 2,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3127,
|
|
|
- 'title': '我的事业部逾期应收统计(华商龙)',
|
|
|
- 'status': 2,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3102,
|
|
|
- 'title': '应收款统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': '',
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 8806,
|
|
|
- 'title': '逾期应收统计(英唐集团)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': '',
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 8809,
|
|
|
- 'title': '应付款统计(英唐集团)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- className: '数据统计',
|
|
|
- subList: [
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'public',
|
|
|
- 'id': 17143,
|
|
|
- 'title': '优软云流量统计',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- className: '销售管理',
|
|
|
- subList: [
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3080,
|
|
|
- 'title': '当月毛利润统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3122,
|
|
|
- 'title': '我的事业部当月销售额统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': '',
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 8811,
|
|
|
- 'title': '当月毛利润统计(英唐集团)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': '',
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 8812,
|
|
|
- 'title': '当月销售额统计(英唐集团)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3100,
|
|
|
- 'title': '当月销售额统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- className: '库存管理',
|
|
|
- subList: [
|
|
|
- {
|
|
|
- 'img': '',
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 8810,
|
|
|
- 'title': '总库存统计(英唐集团)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3124,
|
|
|
- 'title': '我的事业部呆滞库存统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3123,
|
|
|
- 'title': '我的事业部总库存统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3120,
|
|
|
- 'title': '呆滞库存统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- {
|
|
|
- 'img': null,
|
|
|
- 'kind': 'private',
|
|
|
- 'id': 3125,
|
|
|
- 'title': '我的事业部死库存统计(华商龙)',
|
|
|
- 'status': 3,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
-]
|
|
|
+import {
|
|
|
+ requestMySubscribe,
|
|
|
+ requestSubscribeConfig,
|
|
|
+} from '../../../utils/private/subscribe.util'
|
|
|
+import RefreshLayout
|
|
|
+ from '../../../components/common/refreshLayout/RefreshLayout'
|
|
|
|
|
|
class SubscribeNot extends Component {
|
|
|
|
|
|
constructor () {
|
|
|
super()
|
|
|
|
|
|
- this.state = {}
|
|
|
+ this.state = {
|
|
|
+ refreshing: false,
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
componentDidMount () {
|
|
|
- // saveListState({
|
|
|
- // listData: subMenuList,
|
|
|
- // leftSelect: 0,
|
|
|
- // scrollTop: 0,
|
|
|
- // })
|
|
|
requestSubscribeConfig()
|
|
|
}
|
|
|
|
|
|
@@ -214,12 +67,19 @@ class SubscribeNot extends Component {
|
|
|
}
|
|
|
return (
|
|
|
<div className='subscribe-not-root'>
|
|
|
- <div className='subscribe-not-left-menu'>
|
|
|
+ <div
|
|
|
+ className='subscribe-not-left-menu'>
|
|
|
{leftItems}
|
|
|
</div>
|
|
|
<div className='subscribe-not-right-list'>
|
|
|
- {rightItems}
|
|
|
+ <RefreshLayout
|
|
|
+ refreshing={this.state.refreshing}
|
|
|
+ direction={'down'}
|
|
|
+ onRefresh={this.refreshData}>
|
|
|
+ {rightItems}
|
|
|
+ </RefreshLayout>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
@@ -230,6 +90,21 @@ class SubscribeNot extends Component {
|
|
|
scrollTop: 0,
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ refreshData = () => {
|
|
|
+ this.setState({
|
|
|
+ refreshing: true,
|
|
|
+ })
|
|
|
+ requestSubscribeConfig().then(() => {
|
|
|
+ this.setState({
|
|
|
+ refreshing: false,
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.setState({
|
|
|
+ refreshing: false,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
let mapStateToProps = (state) => ({
|