Просмотр исходного кода

uas手机版
列表页面控制添加按钮是否显示

RaoMeng 5 лет назад
Родитель
Сommit
778c3aa744

+ 9 - 7
uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyList.jsx

@@ -12,7 +12,6 @@ import {
   PullToRefresh,
   ListView,
   Drawer,
-  List,
   Button, Toast,
 } from 'antd-mobile'
 import './currency-list.less'
@@ -84,7 +83,7 @@ class CurrencyList extends Component {
   }
 
   render () {
-    const { listState: { tabList, tabSelect, listData }, rowCount } = this.props
+    const { listState: { tabList, tabSelect, listData }, rowCount, addAble } = this.props
     const { listDataSource, height, hasNextPage, filterOpen } = this.state
 
     const refreshLayout = this.getRefreshLayout()
@@ -146,11 +145,14 @@ class CurrencyList extends Component {
           onEndReached={hasNextPage ? this.loadDataList : null}
           pageSize={LIST_PAGE_SIZE}
         />
-        <UasIcon
-          type={'uas-add-doc'}
-          className='com-hover-button'
-          onClick={this.onDocAdd}
-        />
+        {
+          addAble && <UasIcon
+            type={'uas-add-doc'}
+            className='com-hover-button'
+            onClick={this.onDocAdd}
+          />
+        }
+
       </div>
     )
   }

+ 1 - 1
uas-office-web/uas-mobile/src/pages/common/UasEntry.jsx

@@ -27,8 +27,8 @@ class UasEntry extends Component {
     clearMainState()
     clearReportState()
     clearDocState()
-    clearUserInfo()
     clearListState()
+    clearUserInfo()
 
     this.props.history.replace('/homePage')
   }

+ 2 - 1
uas-office-web/uas-mobile/src/pages/private/report/ReportList.jsx

@@ -16,6 +16,7 @@ import { visitApplyBill } from '../../../components/common/currencyList/visitApp
 import { Drawer } from 'antd-mobile'
 import CurrencyListItem
   from '../../../components/common/currencyList/CurrencyListItem'
+import './report.less'
 
 class ReportList extends Component {
 
@@ -50,7 +51,6 @@ class ReportList extends Component {
           onOpenChange={this.onFilterOpen}
           open={detailOpen}
           position={'bottom'}
-          className='currency-list-content-filter-root'
           onOpenChange={this.onOpenChange}
         />
         <CurrencyList
@@ -59,6 +59,7 @@ class ReportList extends Component {
           handlePrompt={this.handlePrompt.bind(this)}
           requestSearchConfig={this.requestSearchConfig.bind(this)}
           onItemClick={this.onItemClick.bind(this)}
+          addAble={false}
         />
       </div>
     )

+ 1 - 0
uas-office-web/uas-mobile/src/pages/private/service/ServiceList.jsx

@@ -41,6 +41,7 @@ class ServiceList extends Component {
           requestTab={this.requestTab.bind(this)}
           requestSearchConfig={this.requestSearchConfig.bind(this)}
           onItemClick={this.onItemClick.bind(this)}
+          addAble
         />
       </div>
     )

+ 2 - 2
uas-office-web/uas-mobile/src/redux/reducers/redListState.js

@@ -3,13 +3,13 @@ import { CLEAR_LIST_STATE, SAVE_LIST_STATE } from '../constants/actionTypes'
 const initListState = {
   scrollTop: 0,
   listData: [],
-  pageIndex: 1,
+  pageIndex: 0,
   itemIndex: -1,
 
   tabIndex: 0,
   scrollTop2: 0,
   listData2: [],
-  pageIndex2: 1,
+  pageIndex2: 0,
   itemIndex2: -1,
 
   leftSelect: 0,