列表加载
This commit is contained in:
parent
658b10e36a
commit
9fbf1e988e
|
|
@ -0,0 +1,20 @@
|
|||
import React from 'react'
|
||||
import { WeaTable } from 'ecCom'
|
||||
import { Spin } from 'antd'
|
||||
|
||||
export default class CustomTable extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
this.props.loading ?
|
||||
<div style={{textAlign: 'center'}}>
|
||||
<Spin />
|
||||
</div>
|
||||
:
|
||||
<WeaTable {...this.props}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ import ContentWrapper from '../../components/contentWrapper';
|
|||
import { columns, dataSource } from './columns';
|
||||
import moment from 'moment';
|
||||
import BaseFormModal from './baseFormModal'
|
||||
import CustomTable from '../../components/customTable'
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
|
|
@ -226,7 +227,7 @@ export default class Calculate extends React.Component {
|
|||
onChange={(v) => {
|
||||
}}
|
||||
/>
|
||||
<WeaTable columns={this.getColumns()} dataSource={salaryListDataSource}/>
|
||||
<CustomTable loadding={loading} columns={this.getColumns()} dataSource={salaryListDataSource}/>
|
||||
</WeaTop>
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import EditSlideContent from './editSlideContent';
|
|||
import TwoColContent from '../../../components/twoColContent'
|
||||
import TipLabel from '../../../components/TipLabel'
|
||||
import ItemMangeFormModal from './itemMangeFormModal'
|
||||
import CustomTable from '../../../components/customTable';
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
const { Option } = Select
|
||||
|
|
@ -495,7 +496,8 @@ export default class Attendance extends React.Component {
|
|||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
|
||||
<WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
<CustomTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
loading={loading}
|
||||
columns={this.getColumns(attendanceColumns)}
|
||||
dataSource={attendanceDataSource}
|
||||
// getColumns={this.getColumns}
|
||||
|
|
@ -530,7 +532,8 @@ export default class Attendance extends React.Component {
|
|||
// onOperatesClick={this.onItemOperatesClick.bind(this)}
|
||||
// />
|
||||
|
||||
<WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
<CustomTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
loading={loading}
|
||||
dataSource={fieldDataSource}
|
||||
columns={getFieldColumns(fieldTableStore.columns ? fieldTableStore.columns : [])}
|
||||
pagination={{
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaDatePicker }
|
|||
import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from '../../components/customTab';
|
||||
import ContentWrapper from '../../components/contentWrapper';
|
||||
import CustomTable from '../../components/customTable'
|
||||
|
||||
import { columns, dataSource } from './columns';
|
||||
import GenerateModal from './generateModal'
|
||||
|
|
@ -25,8 +26,8 @@ export default class Declare extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
declarationModalVisible: false,
|
||||
startDate: "",
|
||||
endDate: ""
|
||||
startDate: moment(new Date()).format("YYYY-MM"),
|
||||
endDate: moment(new Date()).format("YYYY-MM")
|
||||
}
|
||||
this.searchParams = {current: 1}
|
||||
columns.map(item => {
|
||||
|
|
@ -41,7 +42,13 @@ export default class Declare extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
this.handleSearch()
|
||||
const { declareStore : {getDeclareList} } = this.props;
|
||||
this.searchParams = {
|
||||
fromSalaryMonthStr: this.state.startDate,
|
||||
endSalaryMonthStr: this.state.endDate,
|
||||
current: 1
|
||||
}
|
||||
getDeclareList(this.searchParams)
|
||||
}
|
||||
|
||||
// 日期区间改变事件
|
||||
|
|
@ -130,6 +137,7 @@ export default class Declare extends React.Component {
|
|||
return <div style={{display: "inline-block"}}>
|
||||
|
||||
<RangePicker picker="month" format="yyyy-MM"
|
||||
defaultValue={[this.state.startDate, this.state.endDate]}
|
||||
onChange={(value) => this.handleRangePickerChange(value)}
|
||||
/>
|
||||
<Button type="primary" style={{marginLeft: "10px"}} onClick={() => {
|
||||
|
|
@ -160,7 +168,7 @@ export default class Declare extends React.Component {
|
|||
renderRightOperation()
|
||||
}
|
||||
/>
|
||||
<WeaTable columns={this.getColumns()} dataSource={listDataSource}
|
||||
<CustomTable loading={loading} columns={this.getColumns()} dataSource={listDataSource}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: pageInfo.total,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaDatePicker }
|
|||
import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from '../../components/customTab';
|
||||
import ContentWrapper from '../../components/contentWrapper';
|
||||
import CustomTable from '../../components/customTable'
|
||||
import moment from 'moment'
|
||||
import "./index.less"
|
||||
|
||||
|
|
@ -176,7 +177,7 @@ export default class MySalary extends React.Component {
|
|||
|
||||
{
|
||||
this.state.selectedKey == '0' &&
|
||||
<WeaTable columns={this.getColumns()} dataSource={myBillDataSource ? myBillDataSource : []}/>
|
||||
<CustomTable loading={loading} columns={this.getColumns()} dataSource={myBillDataSource ? myBillDataSource : []}/>
|
||||
}
|
||||
{
|
||||
this.state.selectedKey == '1' && <WeaTable columns={socialSecurityBenefitsColumns} dataSource={dataSource} scroll={{ x: 1000}}/>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import { Table, Menu, Dropdown } from 'antd'
|
|||
import { WeaTable } from 'ecCom'
|
||||
import moment from 'moment'
|
||||
|
||||
|
||||
import CustomTable from '../../components/customTable';
|
||||
|
||||
@inject('payrollStore')
|
||||
@observer
|
||||
export default class SalarySendList extends React.Component {
|
||||
|
|
@ -101,10 +104,10 @@ export default class SalarySendList extends React.Component {
|
|||
|
||||
render() {
|
||||
const { payrollStore } = this.props;
|
||||
const { salarySendTableStore, salarySendDataSource, pageInfo } = payrollStore;
|
||||
const { salarySendTableStore, salarySendDataSource, pageInfo, loading } = payrollStore;
|
||||
return (
|
||||
<div>
|
||||
<WeaTable columns={this.getColumns()} dataSource={salarySendDataSource}
|
||||
<CustomTable loading={loading} columns={this.getColumns()} dataSource={salarySendDataSource}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: pageInfo.total,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import SalaryFileViewSlide from './saralyFileViewSlide'
|
|||
const { MonthPicker } = DatePicker;
|
||||
|
||||
import "./index.less"
|
||||
import CustomTable from '../../components/customTable';
|
||||
|
||||
@inject('salaryFileStore')
|
||||
@observer
|
||||
|
|
@ -299,7 +300,8 @@ export default class SalaryFile extends React.Component {
|
|||
renderRightOperation()
|
||||
}
|
||||
/>
|
||||
<WeaTable
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
rowSelection={rowSelection}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import SlideModalTitle from "../../components/slideModalTitle"
|
|||
import CustomSalaryItemSlide from './customSalaryItemSlide'
|
||||
import DeleteSalaryItemModal from './deleteSalaryItemModal';
|
||||
import FormalFormModal from './formalFormModal';
|
||||
import CustomTable from '../../components/customTable';
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
|
||||
|
|
@ -255,7 +256,8 @@ export default class SalaryItem extends React.Component {
|
|||
onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
|
||||
<WeaTable
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
dataSource={tableDataSource}
|
||||
columns={this.getColumns(tableColumns)}
|
||||
pagination={{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import SocialSecurityForm from './socialSecurityForm';
|
|||
import AccumulationFundForm from './accumulationFundForm';
|
||||
import OtherForm from './otherForm';
|
||||
import { tempateColumns } from '../../payroll/columns';
|
||||
import CustomTable from '../../../components/customTable';
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
|
|
@ -132,12 +133,8 @@ export default class Archives extends React.Component {
|
|||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div></div>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className="mySalaryBenefitsWrapper">
|
||||
<WeaRightMenu
|
||||
|
|
@ -173,7 +170,8 @@ export default class Archives extends React.Component {
|
|||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
|
||||
<WeaTable
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
scroll={{ x: 2300 }}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { Button, Table, DatePicker, Row, Col, Switch, Modal, Dropdown, Menu } fr
|
|||
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaInputSearch, WeaSlideModal, WeaSelect, WeaTable } from 'ecCom';
|
||||
|
||||
import { WeaTableNew } from "comsMobx"
|
||||
|
||||
import CustomTable from '../../../components/customTable'
|
||||
import "./index.less";
|
||||
const WeaMobxTable = WeaTableNew.WeaTable;
|
||||
|
||||
|
|
@ -381,18 +381,8 @@ export default class Programme extends React.Component {
|
|||
renderCustomRightContent()
|
||||
}
|
||||
/> :
|
||||
// <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
// comsWeaTableStore={tableStore} // table store
|
||||
// hasOrder={true} // 是否启用排序
|
||||
// needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
// />
|
||||
|
||||
<WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
// comsWeaTableStore={tableStore} // table store
|
||||
// hasOrder={true} // 是否启用排序
|
||||
// needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
<CustomTable
|
||||
loading={loading}
|
||||
columns={this.getColumns(tableColumns)}
|
||||
dataSource={tableDataSource}
|
||||
pagination={{
|
||||
|
|
@ -400,7 +390,6 @@ export default class Programme extends React.Component {
|
|||
total: tablePageInfo.total,
|
||||
current: tablePageInfo.pageNum
|
||||
}}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/>
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ export class calculateStore {
|
|||
// 薪资记录--薪资核算列表
|
||||
@action
|
||||
getSalaryAcctList = (params = {}) => {
|
||||
this.loading = true
|
||||
API.getSalaryAcctList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.salaryListDataSource = res.data.list;
|
||||
|
|
@ -101,6 +102,7 @@ export class calculateStore {
|
|||
} else {
|
||||
message.error(res.errormsg || '获取失败');
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ export class DeclareStore {
|
|||
//个税申报表-个税申报表列表
|
||||
@action
|
||||
getDeclareList = (params = {}) => {
|
||||
this.loading = true
|
||||
API.getDeclareList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.listDataSource = res.data.list ? res.data.list: [];
|
||||
|
|
@ -82,6 +83,7 @@ export class DeclareStore {
|
|||
} else {
|
||||
message.error(res.errormsg || '获取失败')
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ export class payrollStore {
|
|||
// 工资单-工资单发放列表
|
||||
@action
|
||||
getPayrollList = (parmas = {salaryYearMonth: []}) => {
|
||||
this.loading = true
|
||||
API.getPayrollList(parmas).then(res => {
|
||||
if(res.status) {
|
||||
this.salarySendDataSource = res.data.datas
|
||||
|
|
@ -327,6 +328,7 @@ export class payrollStore {
|
|||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue