bug修改

This commit is contained in:
MustangDeng 2022-06-07 09:08:36 +08:00
parent b94af53ed4
commit c7128fcfb0
25 changed files with 599 additions and 201 deletions

View File

@ -0,0 +1,25 @@
import React from 'react'
import { WeaTable } from 'ecCom'
import CustomTable from '../../components/customTable'
export default class CustomPaginationTable extends React.Component {
render() {
return (
<CustomTable
{...this.props}
pagination={{
onChange: (value) => {this.props.onPageChange(value)},
total: this.props.total,
showTotal: (total) => `${total}`,
current: this.props.current,
showSizeChanger: true,
showQuickJumper: true,
pageSize: this.props.pageSize,
onShowSizeChange: (current, pageSize) => {
this.props.onShowSizeChange && this.props.onShowSizeChange(current, pageSize);
}
}}
/>
)
}
}

View File

@ -14,6 +14,7 @@ import { columns, dataSource } from './columns';
import moment from 'moment';
import BaseFormModal from './baseFormModal'
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
const { RangePicker } = DatePicker;
@ -42,6 +43,7 @@ export default class Calculate extends React.Component {
}
})
}
this.pageInfo = { current: 1, pageSize: 10}
}
componentWillMount() {
@ -170,6 +172,7 @@ export default class Calculate extends React.Component {
// 分页
handleDataPageChange(value) {
this.setState({current: value})
this.pageInfo.current = value
const { calculateStore } = this.props;
const { getSalaryAcctList } = calculateStore
getSalaryAcctList({
@ -180,6 +183,17 @@ export default class Calculate extends React.Component {
})
}
handleShowSizeChange(pageInfo){
const { calculateStore } = this.props;
const { getSalaryAcctList } = calculateStore
getSalaryAcctList({
name: this.state.searchValue,
startMonthStr: this.state.startDate,
endMonthStr: this.state.endDate,
...pageInfo
})
}
render() {
@ -258,12 +272,20 @@ export default class Calculate extends React.Component {
onChange={(v) => {
}}
/>
<CustomTable loadding={loading} columns={this.getColumns()} dataSource={salaryListDataSource}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: salaryListPageInfo.total,
current: salaryListPageInfo.pageNum,
showTotal: (total) => `${total}`,
<CustomPaginationTable
loading={loading}
columns={this.getColumns()}
dataSource={salaryListDataSource}
total={salaryListPageInfo.total}
current={salaryListPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</WeaTop>

View File

@ -7,6 +7,7 @@ import CustomTab from '../../components/customTab'
import { inject, observer } from 'mobx-react';
import CompareDetailImportModal from './compareDetailImportModal'
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('calculateStore')
@observer
@ -20,6 +21,7 @@ export default class CompareDetail extends React.Component {
importModalVisible: false,
searchValue: ""
}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -80,11 +82,25 @@ export default class CompareDetail extends React.Component {
handleDataPageChange(value) {
const { calculateStore: {fetchComparisonResultList}} = this.props;
const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
let params = {
onlyDiffEmployee,
onlyDiffSalaryItem,
salaryAcctRecordId: this.id,
current: value
current: value,
...this.pageInfo
}
fetchComparisonResultList(params)
}
handleShowSizeChange(pageInfo) {
const { calculateStore: {fetchComparisonResultList}} = this.props;
const { onlyDiffEmployee, onlyDiffSalaryItem} = this.state;
let params = {
onlyDiffEmployee,
onlyDiffSalaryItem,
salaryAcctRecordId: this.id,
...pageInfo
}
fetchComparisonResultList(params)
}
@ -146,6 +162,8 @@ export default class CompareDetail extends React.Component {
// 线下对比导入
handleComparisonFinish() {
this.pageInfo.current = 1
this.pageInfo.pageSize = 10
this.handleSearch(this.state.searchValue)
}
@ -198,18 +216,23 @@ export default class CompareDetail extends React.Component {
</div>
<div className="tableWrapper">
<CustomTable
<CustomPaginationTable
loading={loading}
dataSource={comparisonResultPageInfo.list ? comparisonResultPageInfo.list : []}
columns={this.getColumns(comparisonResultColumns ? comparisonResultColumns : [])}
scroll={{x: this.getColumns(comparisonResultColumns ? comparisonResultColumns : []).length * 150}}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: comparisonResultPageInfo.total,
current: comparisonResultPageInfo.pageNum,
showTotal: (total) => `${total}`,
}}
/>
total={comparisonResultPageInfo.total}
current={comparisonResultPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</div>
{

View File

@ -7,6 +7,7 @@ import SlideModalTitle from "../../components/slideModalTitle"
import FileMergeDetail from './fileMergeDetail'
import { getQueryString } from "../../util/url";
import { inject, observer } from 'mobx-react';
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('calculateStore')
@observer
@ -22,9 +23,15 @@ export default class PlaceOnFileDetail extends React.Component {
})
this.state = {
slideVisiable: false,
selectedRowKeys: []
selectedRowKeys: [],
searchValue: ""
}
this.id = "";
this.length = 0
this.pageInfo = {
current: 1,
pageSize: 10
}
}
componentWillMount() {
@ -46,11 +53,17 @@ export default class PlaceOnFileDetail extends React.Component {
result.dataIndex = item.column
result.oldWidth = result.width;
result.width = null;
this.length = 0
if(result.children) {
result.children.map(child => {
child.width = 150
child.title = child.text
child.dataIndex = child.column
this.length ++
})
} else {
this.length ++
result.width = 150
}
return result;
})
@ -67,11 +80,21 @@ export default class PlaceOnFileDetail extends React.Component {
onDetail() {
this.setState({slideVisiable: true})
}
handleSearch(value){
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, value, this.pageInfo.current, this.pageInfo)
}
// 分页
handleDataPageChange(value) {
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, this.props.employeeName, value)
acctResultList(this.id, this.state.searchValue, value, this.pageInfo)
}
handleShowSizeChange(pageInfo) {
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, this.state.searchValue, pageInfo.current, pageInfo )
}
handleMenuClick() {
@ -116,7 +139,7 @@ export default class PlaceOnFileDetail extends React.Component {
return (
<div style={{display: "inline-block"}}>
<Dropdown.Button type="primary" style={{marginRight: "10px"}} onClick={() => {this.handleExportAll()}} overlay={menu}>导出全部</Dropdown.Button>
<WeaInputSearch />
<WeaInputSearch onChange={(value) => {this.setState({searchValue: value})}} value={this.state.searchValue} onSearch={(value) => {this.handleSearch(value)}}/>
</div>
)
}
@ -147,17 +170,23 @@ export default class PlaceOnFileDetail extends React.Component {
/>
</div>
<div className="tableWrapper">
<WeaTable columns={this.getColumns()}
scroll={{x: this.getColumns().length * 150}}
dataSource={acctResultListDateSource}
rowSelection={rowSelection}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
showTotal: (total) => `${total}`,
current: acctResultListPageInfo.pageNum
}}
/>
<CustomPaginationTable
columns={this.getColumns()}
scroll={{x: this.length * 150}}
dataSource={acctResultListDateSource}
rowSelection={rowSelection}
total={acctResultListPageInfo.total}
current={acctResultListPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</div>
{

View File

@ -11,6 +11,7 @@ import { columns } from '../salaryItem/columns'
import { getQueryString } from '../../util/url'
import { inject, observer } from 'mobx-react';
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('calculateStore')
@observer
@ -32,6 +33,7 @@ export default class SalaryDetail extends React.Component {
}
this.recordId = ""
this.id = ""
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -114,7 +116,12 @@ export default class SalaryDetail extends React.Component {
// 分页
handleDataPageChange(value) {
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, this.props.employeeName, value)
acctResultList(this.id, this.props.employeeName, value, this.pageInfo)
}
handleShowSizeChange(pageInfo) {
const { calculateStore: {acctResultList}} = this.props;
acctResultList(this.id, this.props.employeeName, pageInfo.current, pageInfo)
}
render() {
@ -141,17 +148,23 @@ export default class SalaryDetail extends React.Component {
{/* <span className="warningspan" onClick={() => {this.setState({visible: true})}}>校验异常0</span> */}
</div>
<div className="tableWrapper">
<CustomTable
<CustomPaginationTable
loading={loading}
dataSource={acctResultListDateSource} columns={this.getColumns()}
dataSource={acctResultListDateSource}
columns={this.getColumns()}
scroll={{x: this.getColumns().length * 150}}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
showTotal: (total) => `${total}`,
current: acctResultListPageInfo.pageNum
}}
/>
total={acctResultListPageInfo.total}
current={acctResultListPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</div>
<WarningModal visible={this.state.visible} onCancel={() => {this.setState({visible: false})}}/>
{

View File

@ -6,6 +6,7 @@ import { dataSource , monthOnMonthColumns, userSureColumns} from './columns'
import "./index.less"
import { getQueryString } from '../../util/url'
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable';
@inject('calculateStore')
@observer
@ -19,6 +20,8 @@ export default class UserSure extends React.Component {
}
this.id = ""
this.current = 1
this.pageInfo = {current: 1, pageSize: 10}
this.reducePageInfo = { current: 1, pageSize: 10}
}
componentWillMount() {
@ -139,7 +142,12 @@ export default class UserSure extends React.Component {
handleUserListPageChange(value) {
const { calculateStore: {acctemployeeList}} = this.props;
this.current = value;
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, ...this.pageInfo})
}
handleShowSizeChange(pageInfo) {
const { calculateStore: {acctemployeeList}} = this.props;
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, ...pageInfo})
}
// 环比减少人员分页
@ -149,14 +157,19 @@ export default class UserSure extends React.Component {
this.current = value
}
handleReduceShowSizeChange(pageInfo) {
const { calculateStore: { reducedemployeeList }} = this.props;
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, ...pageInfo})
}
// 搜索
handleUserListSearch(value) {
const { calculateStore: {acctemployeeList, reducedemployeeList}} = this.props;
this.pageInfo.current = 1
if(this.state.selectedKey == 0) {
acctemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
acctemployeeList({salaryAcctRecordId: this.id, employeeName: value, ...this.pageInfo})
this.current = 1
} else {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, ...this.pageInfo})
this.current = 1
}
}
@ -265,30 +278,42 @@ export default class UserSure extends React.Component {
</div>
<div className="tableWrapper">
{
this.state.selectedKey == 0 && <CustomTable
loading={loading}
rowSelection={rowSelection}
dataSource={this.getUserListDataSource()}
columns={this.getUserListColumns()}
pagination={{
onChange: (value) => {this.handleUserListPageChange(value)},
total: acctemployeeListPageInfo.total,
showTotal: (total) => `${total}`,
current: acctemployeeListPageInfo.pageNum
}}
/>
this.state.selectedKey == 0 &&
<CustomPaginationTable
loading={loading}
rowSelection={rowSelection}
dataSource={this.getUserListDataSource()}
columns={this.getUserListColumns()}
total={acctemployeeListPageInfo.total}
current={acctemployeeListPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleUserListPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
}
{
this.state.selectedKey == 1 && <CustomTable
dataSource={reducedemployeeListDataSource}
columns={reducedemployeeListColumns}
pagination={{
onChange: (value) => {this.handleReducedemployeeListPageChange(value)},
total: reducedemployeeListPageInfo.total,
showTotal: (total) => `${total}`,
current: reducedemployeeListPageInfo.pageNum
}}
/>
this.state.selectedKey == 1 &&
<CustomPaginationTable
dataSource={reducedemployeeListDataSource}
columns={reducedemployeeListColumns}
total={reducedemployeeListPageInfo.total}
current={reducedemployeeListPageInfo.pageNum}
pageSize={this.reducePageInfo.pageSize}
onPageChange={(value) => {
this.reducePageInfo.current = value
this.handleReducedemployeeListPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleReduceShowSizeChange(this.pageInfo)
}}
/>
}
</div>

View File

@ -24,6 +24,7 @@ import TwoColContent from '../../../components/twoColContent'
import TipLabel from '../../../components/TipLabel'
import ItemMangeFormModal from './itemMangeFormModal'
import CustomTable from '../../../components/customTable';
import CustomPaginationTable from '../../../components/customPaginationTable'
const { RangePicker } = DatePicker;
const { Option } = Select
@ -67,6 +68,7 @@ export default class Attendance extends React.Component {
this.listSearch = {}
this.recordId = ""; // 考勤数据列表查看选择项
this.salaryYearMonth = ""; // 考勤数据查看,当前数据的薪资所属月
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -109,6 +111,12 @@ export default class Attendance extends React.Component {
getAttendanceFieldList(this.fieldSearch)
}
handleFieldShowSizeChange(pageInfo) {
const { attendanceStore: {getAttendanceFieldList} } = this.props;
this.fieldSearch.current = value
getAttendanceFieldList({...this.fieldSearch, ...pageInfo})
}
// 列表
handleDataPageChange(value) {
const { attendanceStore: { getAttendanceList }} = this.props;
@ -116,6 +124,11 @@ export default class Attendance extends React.Component {
getAttendanceList(this.listSearch)
}
handleDataShowSizeChange(pageInfo) {
const { attendanceStore: { getAttendanceList }} = this.props;
getAttendanceList({...this.listSearch, ...pageInfo})
}
// 下载导入模板链接点击
handleTemplateLinkClick() {
const { attendanceStore: { downloadTemplate }} = this.props;
@ -532,17 +545,20 @@ export default class Attendance extends React.Component {
// onOperatesClick={this.onOperatesClick.bind(this)}
/> */}
<CustomTable // table内部做了loading加载处理页面就不需要再加了
<CustomPaginationTable
loading={loading}
columns={this.getColumns(attendanceColumns)}
dataSource={attendanceDataSource}
// getColumns={this.getColumns}
// onOperatesClick={this.onOperatesClick.bind(this)}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: attendancePageInfo.total,
showTotal: (total) => `${total}`,
current: attendancePageInfo.pageNum
total={attendancePageInfo.total}
current={attendancePageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleDataShowSizeChange(this.pageInfo)
}}
/>
</div>
@ -569,17 +585,24 @@ export default class Attendance extends React.Component {
// onOperatesClick={this.onItemOperatesClick.bind(this)}
// />
<CustomTable // table内部做了loading加载处理页面就不需要再加了
loading={loading}
dataSource={fieldDataSource}
columns={getFieldColumns(fieldTableStore.columns ? fieldTableStore.columns : [])}
pagination={{
onChange: (value) => {this.handleFieldPageChange(value)},
total: fieldPageInfo.total,
showTotal: (total) => `${total}`,
current: fieldPageInfo.pageNum
<CustomPaginationTable
loading={loading}
dataSource={fieldDataSource}
columns={getFieldColumns(fieldTableStore.columns ? fieldTableStore.columns : [])}
total={fieldPageInfo.total}
current={fieldPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleFieldPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleFieldShowSizeChange(this.pageInfo)
}}
/>
}
rightContent={
<TipLabel tipList={

View File

@ -6,6 +6,7 @@ import { declarationColumns, dataSource} from './columns'
import "./index.less"
import { inject, observer } from 'mobx-react';
import { getQueryString } from '../../util/url'
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('declareStore')
@observer
@ -13,12 +14,14 @@ export default class GenerateDeclarationDetail extends React.Component {
constructor(props) {
super(props)
this.id = getQueryString("id")
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
const { declareStore: { getDetailList, getDeclareInfo }} = this.props;
getDetailList(this.id)
getDeclareInfo(this.id)
}
// 导出
@ -33,12 +36,21 @@ export default class GenerateDeclarationDetail extends React.Component {
return columns.map(item => {
item = {...item}
item.width = "150px"
if(item.dataIndex == "employeeName") {
item.fixed = 'left'
}
return item;
})
}
handlePageChange() {
const { declareStore: { getDetailList, getDeclareInfo }} = this.props;
getDetailList(this.id, this.pageInfo)
}
render() {
const { declareStore: { detailDataSource, detailTableStore, declareInfo, datailColumns }} = this.props;
const { declareStore: { detailDataSource, detailTableStore, declareInfo, datailColumns, detailPageInfo }} = this.props;
const renderRightOperation = () => {
return (
@ -67,7 +79,22 @@ export default class GenerateDeclarationDetail extends React.Component {
}
/>
<div>
<WeaTable dataSource={detailDataSource} columns={this.getColumns()} scroll={{x: 2300}}/>
<CustomPaginationTable
dataSource={detailDataSource}
columns={this.getColumns()}
total={detailPageInfo.total}
current={detailPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
scroll={{x: 2300}}
onPageChange={(value) => {
this.pageInfo.current = value;
this.handlePageChange()
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handlePageChange()
}}
/>
</div>
</div>
)

View File

@ -10,6 +10,7 @@ import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的
import CustomTab from '../../components/customTab';
import ContentWrapper from '../../components/contentWrapper';
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
import { columns, dataSource } from './columns';
import GenerateModal from './generateModal'
@ -30,6 +31,7 @@ export default class Declare extends React.Component {
endDate: moment(new Date()).subtract(-3,'months').startOf('month').format('YYYY-MM')
}
this.searchParams = {current: 1}
this.pageInfo = {current: 1, pageSize: 10}
columns.map(item => {
if(item.dataIndex == "cz") {
item.render =(text, record) => {
@ -59,11 +61,14 @@ export default class Declare extends React.Component {
startDate: range[0],
endDate: range[1]
})
this.pageInfo.current = 1
getDeclareList({
fromSalaryMonthStr: range[0],
endSalaryMonthStr: range[1],
current: 1
...this.pageInfo
})
}
@ -105,6 +110,16 @@ export default class Declare extends React.Component {
getDeclareList(this.searchParams)
}
handleShowSizeChange(pageInfo) {
const { declareStore : {getDeclareList} } = this.props;
this.searchParams = {
fromSalaryMonthStr: this.state.startDate,
endSalaryMonthStr: this.state.endDate,
...pageInfo
}
getDeclareList(this.searchParams)
}
render() {
const { declareStore } = this.props;
@ -176,14 +191,24 @@ export default class Declare extends React.Component {
renderRightOperation()
}
/>
<CustomTable loading={loading} columns={this.getColumns()} dataSource={listDataSource}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
showTotal: (total) => `${total}`,
current: pageInfo.pageNum
}}
<CustomPaginationTable
loading={loading}
columns={this.getColumns()}
dataSource={listDataSource}
total={pageInfo.total}
current={pageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current =value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</WeaTop>
</WeaRightMenu>
{

View File

@ -127,6 +127,7 @@ export default class CanMoveItem extends React.Component {
handleTableDrop = (datas) => {
console.log("datas:", datas);
console.log("datas.parent():", $(datas).parent());
}
render() {
@ -163,6 +164,10 @@ export default class CanMoveItem extends React.Component {
rowSelection={rowSelection}
dataSource={this.props.dataSource}
columns={this.state.columns}
onRow={(record, index) => ({
index,
moveRow: record,
})}
pagination={false}
onDrop={(datas) => this.handleTableDrop(datas)}
draggable={true}/>

View File

@ -10,6 +10,7 @@ import { renderNoright, getSearchs } from '../../util'; // 渲染form数据的
import CustomTab from '../../components/customTab';
import ContentWrapper from '../../components/contentWrapper';
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
import moment from 'moment'
import "./index.less"
@ -32,6 +33,9 @@ export default class MySalary extends React.Component {
salaryBillVisible: false
}
this.salaryInfoId = ""
this.range = []
this.pageInfo = {current: 1, pageSize: 10}
this.historyPageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -77,7 +81,8 @@ export default class MySalary extends React.Component {
// 区间改变事件
handleSalaryRangePickerChange(range) {
const { mySalaryStore : {mySalaryBillList}} = this.props;
mySalaryBillList(range.map(item => moment(item).format("YYYY-MM")))
this.range = range.map(item => moment(item).format("YYYY-MM"))
mySalaryBillList(this.range, this.pageInfo)
}
@ -88,10 +93,20 @@ export default class MySalary extends React.Component {
}
}
handlePageChange() {
const { mySalaryStore : {mySalaryBillList}} = this.props;
mySalaryBillList(this.range, this.pageInfo)
}
handleHistoryPageChange() {
const { mySalaryStore: {getRecordList}} = this.props;
getRecordList(this.historyPageInfo)
}
render() {
const { mySalaryStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = mySalaryStore;
const { tabIndex, myBillTableStore, myBillDataSource, recordListColumns, recordListDataSource, recordListPageInfo } = mySalaryStore
const { tabIndex, myBillTableStore, myBillDataSource, recordListColumns, recordListDataSource, recordListPageInfo, myBillPageInfo } = mySalaryStore
const { salaryBillVisible } = this.state;
if (!hasRight && !loading) { // 无权限处理
return renderNoright();
@ -160,8 +175,6 @@ export default class MySalary extends React.Component {
}
return (
<div className="mySalaryBenefitsWrapper">
<WeaRightMenu
@ -188,13 +201,44 @@ export default class MySalary extends React.Component {
{
this.state.selectedKey == '0' &&
<CustomTable loading={loading} columns={this.getColumns()} dataSource={myBillDataSource ? myBillDataSource : []}/>
<CustomPaginationTable
loading={loading}
columns={this.getColumns()}
dataSource={myBillDataSource ? myBillDataSource : []}
total={myBillPageInfo.total}
current={myBillPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handlePageChange()
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handlePageChange()
}}
/>
}
{/* {
this.state.selectedKey == '1' && <WeaTable columns={socialSecurityBenefitsColumns} dataSource={dataSource} scroll={{ x: 1000}}/>
} */}
{
this.state.selectedKey == '2' && <WeaTable columns={recordListColumns} dataSource={recordListDataSource}/>
this.state.selectedKey == '2' &&
<CustomPaginationTable
columns={recordListColumns}
dataSource={recordListDataSource}
total={recordListPageInfo.total}
current={recordListPageInfo.pageNum}
pageSize={this.historyPageInfo.pageSize}
onPageChange={(value) => {
this.historyPageInfo.current = value
this.handleHistoryPageChange()
}}
onShowSizeChange={(current, pageSize) => {
this.historyPageInfo = {current, pageSize}
this.handleHistoryPageChange()
}}
/>
}
</WeaTop>

View File

@ -6,13 +6,15 @@ import moment from 'moment'
import CustomTable from '../../components/customTable';
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('payrollStore')
@observer
export default class SalarySendList extends React.Component {
constructor(props) {
super(props)
this.searchParams = {}
this.searchParams = {salaryYearMonth: this.props.salaryYearMonth}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -20,7 +22,6 @@ export default class SalarySendList extends React.Component {
getPayrollList()
}
// 发放回调
handleGrant(record) {
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/payrollGrant?id=" + record.id)
@ -42,12 +43,7 @@ export default class SalarySendList extends React.Component {
this.props.onEditTemplate && this.props.onEditTemplate(templateRecord)
}
// 页面跳转
handleDataPageChange(value) {
this.searchParams.current = value;
const { payrollStore: {getPayrollList} } = this.props;
getPayrollList(this.searchParams)
}
// 获取表头数据
getColumns() {
@ -112,14 +108,23 @@ export default class SalarySendList extends React.Component {
const { salarySendTableStore, salarySendDataSource, pageInfo, loading } = payrollStore;
return (
<div>
<CustomTable loading={loading} columns={this.getColumns()} dataSource={salarySendDataSource}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
showTotal: (total) => `${total}`,
current: pageInfo.pageNum
<CustomPaginationTable
loading={loading}
columns={this.getColumns()}
dataSource={salarySendDataSource}
total={pageInfo.total}
current={pageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.props.handleListDataPageChange(value, this.pageInfo)
}}
/>
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.props.handleListShowSizeChange(this.pageInfo)
}}
/>
</div>
)
}

View File

@ -43,6 +43,8 @@ export default class Payroll extends React.Component {
copyModalVisible: false
}
this.recordId = ""
this.salaryYearMonth = []
this.listPageInfo = {current: 1, pageSize: 10}
columns.map(item => {
if(item.dataIndex == "cz") {
item.render = (text, record) => {
@ -81,7 +83,6 @@ export default class Payroll extends React.Component {
// 更新模板
handleUpdateTemplate(record) {
alert(JSON.stringify(record))
this.setState({
selectedKey: "1",
editSlideVisible: true,
@ -184,7 +185,8 @@ export default class Payroll extends React.Component {
handleRangePickerChange(value) {
let range = value.map(item => moment(item).format("YYYY-MM"))
const { payrollStore: { getPayrollList } } = this.props;
getPayrollList({salaryYearMonth: range})
this.salaryYearMonth = range
getPayrollList({salaryYearMonth: range, ...this.listPageInfo})
}
// 预览
@ -208,6 +210,20 @@ export default class Payroll extends React.Component {
})
}
// 发放页面页码跳转
handleListDataPageChange(value, pageInfo) {
const { payrollStore: {getPayrollList} } = this.props;
this.listPageInfo = pageInfo
getPayrollList({salaryYearMonth: this.salaryYearMonth, ...pageInfo})
}
// 发放页面每页条数
handleListShowSizeChange(pageInfo) {
const { payrollStore: {getPayrollList} } = this.props;
this.listPageInfo = pageInfo
getPayrollList({salaryYearMonth: this.salaryYearMonth, ...pageInfo})
}
render() {
const { payrollStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = payrollStore;
@ -336,6 +352,13 @@ export default class Payroll extends React.Component {
onEditTemplate={(record) => {
this.handleTemplateListEdit(record)
}}
salaryYearMonth={this.salaryYearMonth}
handleListDataPageChange={(value, pageInfo) => {
this.handleListDataPageChange(value, pageInfo)
}}
handleListShowSizeChange={(pageInfo) => {
this.handleListShowSizeChange(pageInfo)
}}
/>
// <WeaTable columns={columns} dataSource={dataSource}/>

View File

@ -8,6 +8,7 @@ import CustomTab from '../../../components/customTab'
import "./index.less"
import { getQueryString } from '../../../util/url'
import { renderNoright, getSearchs } from '../../../util';
import CustomPaginationTable from '../../../components/customPaginationTable';
@inject('payrollStore')
@observer
@ -18,6 +19,7 @@ export default class PayrollDetail extends React.Component {
currentId: "",
current: 1
}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -116,17 +118,21 @@ export default class PayrollDetail extends React.Component {
}
// 分页
handleDataPageChange(value) {
this.setState({current: value})
const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props;
getPayrollDetailList({salarySendId: this.state.currentId, current: value})
}
// 分页
handleDataPageChange(value) {
const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props;
getPayrollDetailList({salarySendId: this.state.currentId, ...this.pageInfo})
}
handleShowSizeChange(pageInfo) {
const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props;
getPayrollDetailList({salarySendId: this.state.currentId, ...pageInfo})
}
handleSearch() {
const { payrollStore: {getPayrollDetailList}} = this.props;
getPayrollDetailList({salarySendId: this.state.currentId, current: this.state.current})
getPayrollDetailList({salarySendId: this.state.currentId, ...this.pageInfo})
}
render() {
const {payrollStore} = this.props;
@ -176,18 +182,23 @@ export default class PayrollDetail extends React.Component {
</div>
<div className="tableWrapper">
<WeaTable
dataSource={salarySendDetailDataSource}
columns={this.getColumns()}
scroll={{x: this.getColumns().length * 150}}
pagination={{
onChange: (value) => {
this.handleDataPageChange(value)},
total: salarySendDetailPageInfo.total,
current: salarySendDetailPageInfo.pageNum,
showTotal: (total) => `${total}`,
}}
/>
<CustomPaginationTable
dataSource={salarySendDetailDataSource}
columns={this.getColumns()}
scroll={{x: this.getColumns().length * 150}}
total={salarySendDetailPageInfo.total}
current={salarySendDetailPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</div>
</div>
)

View File

@ -10,6 +10,7 @@ import PayrollGrantModal from './payrollGrantModal'
import PayrollWithdrawModal from './payrollWithdrawModal'
import { getQueryString } from '../../../util/url'
import { renderNoright, getSearchs } from '../../../util';
import CustomPaginationTable from '../../../components/customPaginationTable';
@inject('payrollStore')
@observer
@ -21,6 +22,7 @@ export default class PayrollGrant extends React.Component {
payrollWithdrawVisible: false,
currentId: ""
}
this.pageInfo = {current : 1, pageSize: 10}
}
componentWillMount() {
@ -151,11 +153,18 @@ export default class PayrollGrant extends React.Component {
// 分页
handleDataPageChange(value) {
this.setState({current: value})
const { payrollStore: { getInfoList } } = this.props;
getInfoList({
salarySendId:this.state.currentId,
current: value
...this.pageInfo
})
}
handleShowSizeChange(pageInfo) {
const { payrollStore: { getInfoList } } = this.props;
getInfoList({
salarySendId:this.state.currentId,
...pageInfo
})
}
@ -163,7 +172,7 @@ export default class PayrollGrant extends React.Component {
const { payrollStore: { getInfoList } } = this.props;
getInfoList({
salarySendId:this.state.currentId,
current: this.state.current
...this.pageInfo
})
}
@ -217,13 +226,19 @@ export default class PayrollGrant extends React.Component {
</div>
<div className="tableWrapper">
<WeaTable dataSource={salaryGrantDataSource} columns={this.getColumns()}
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: salaryGrantPageInfo.total,
current: salaryGrantPageInfo.pageNum,
showTotal: (total) => `${total}`,
}}
<CustomPaginationTable
dataSource={salaryGrantDataSource} columns={this.getColumns()}
total={salaryGrantPageInfo.total}
current={salaryGrantPageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.pageInfo.current = value
this.handleDataPageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</div>
{

View File

@ -76,9 +76,11 @@ export default class ShowSettingForm extends React.Component {
</Row>
</Col>
<Col span={12}>
<span style={{float: "right"}}>
插入变量
<a onClick={() => {this.handleThemeNameCllck("${companyName}")}} className="themeFormalStr">公司名称</a>
<a onClick={() => {this.handleThemeNameCllck("${salaryMonth}")}} className="themeFormalStr">薪资所属月</a>
</span>
</Col>
</Row>
<Row className="formItem">

View File

@ -20,6 +20,7 @@ import SlideSalaryItem from './slideSalaryItem'
import SlideAgent from './slideAgent'
import ImportModal from '../../components/importModal'
import SalaryFileViewSlide from './saralyFileViewSlide'
import CustomPaginationTable from "../../components/customPaginationTable"
const { MonthPicker } = DatePicker;
@ -47,6 +48,7 @@ export default class SalaryFile extends React.Component {
importResult: {},
searchValue: ""
}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -161,7 +163,13 @@ export default class SalaryFile extends React.Component {
// 页面跳转
handlePageChange = (value) => {
const { salaryFileStore: {getTableDatas, form}} = this.props;
getTableDatas({ current: value })
this.pageInfo.current = value;
getTableDatas(this.pageInfo)
}
handleShowSizeChange(pageInfo) {
const { salaryFileStore: {getTableDatas, form}} = this.props;
getTableDatas(pageInfo)
}
// 搜索
@ -317,18 +325,23 @@ export default class SalaryFile extends React.Component {
renderRightOperation()
}
/>
<CustomTable
<CustomPaginationTable
loading={loading}
rowSelection={rowSelection}
columns={this.getColumns()}
dataSource={dataSource}
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: pageInfo.total,
showTotal: (total) => `${total}`,
current: pageInfo.pageNum
}}
total={pageInfo.total}
current={pageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
scroll={{x: 2300}}
onPageChange={(value) => {
this.handlePageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
</WeaTop>
</WeaRightMenu>

View File

@ -16,7 +16,7 @@ import SlideModalTitle from "../../components/slideModalTitle"
import CustomSalaryItemSlide from './customSalaryItemSlide'
import DeleteSalaryItemModal from './deleteSalaryItemModal';
import FormalFormModal from './formalFormModal';
import CustomTable from '../../components/customTable';
import CustomPaginationTable from '../../components/customPaginationTable';
const { MonthPicker } = DatePicker;
@ -33,7 +33,7 @@ export default class SalaryItem extends React.Component {
searchValue: "",
formalModalVisible: false
}
this.searchParams = {}
this.searchParams = {current: 1, pageSize: 10}
columns.map(item => {
if(item.dataIndex == "refere") {
item.render = () => {
@ -169,6 +169,11 @@ export default class SalaryItem extends React.Component {
getTableDatas(this.searchParams)
}
handleShowSizeChange(searchParams) {
const { salaryItemStore: {getTableDatas}} = this.props;
getTableDatas(searchParams)
}
render() {
const { salaryItemStore } = this.props;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = salaryItemStore;
@ -302,17 +307,22 @@ export default class SalaryItem extends React.Component {
onOperatesClick={this.onOperatesClick.bind(this)}
/> */}
<CustomTable
loading={loading}
dataSource={tableDataSource}
columns={this.getColumns(tableColumns)}
pagination={{
onChange: (value) => {this.handlePageChnage(value)},
total: pageInfo.total,
showTotal: (total) => `${total}`,
current: pageInfo.pageNum
}}
/>
<CustomPaginationTable
loading={loading}
dataSource={tableDataSource}
columns={this.getColumns(tableColumns)}
total={pageInfo.total}
current={pageInfo.pageNum}
pageSize={this.searchParams.pageSize}
onPageChange={(value) => {
this.handlePageChnage(value)
}}
onShowSizeChange={(current, pageSize) => {
this.searchParams.current = current;
this.searchParams.pageSize = pageSize;
this.handleShowSizeChange(this.searchParams)
}}
/>
</WeaTop>
</WeaRightMenu>

View File

@ -17,7 +17,7 @@ import SocialSecurityForm from './socialSecurityForm';
import AccumulationFundForm from './accumulationFundForm';
import OtherForm from './otherForm';
import { tempateColumns } from '../../payroll/columns';
import CustomTable from '../../../components/customTable';
import CustomPaginationTable from '../../../components/customPaginationTable';
import ImportModal from '../../../components/importModal';
const { MonthPicker } = DatePicker;
@ -40,6 +40,7 @@ export default class Archives extends React.Component {
}
this.record = {}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -91,7 +92,8 @@ export default class Archives extends React.Component {
handlePageChnage(value) {
const { archivesStore: {form, getTableDatas}} = this.props;
getTableDatas({current: value})
this.pageInfo.current = value
getTableDatas(this.pageInfo)
}
// 导入
@ -149,6 +151,11 @@ export default class Archives extends React.Component {
}
this.setState({importVisible: false, step: 0});
}
handleSearch() {
const { archivesStore: {getTableDatas}} = this.props;
getTableDatas(this.pageInfo)
}
render() {
const { archivesStore } = this.props;
@ -247,7 +254,7 @@ export default class Archives extends React.Component {
setShowSearchAd={bool => setShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
buttonsAd={adBtn} // 高级搜索内部按钮
onSearch={getTableDatas} // 点搜索按钮时的回调
onSearch={() => {this.handleSearch()}} // 点搜索按钮时的回调
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
/>
@ -259,19 +266,23 @@ export default class Archives extends React.Component {
// getColumns={this.getColumns}
// onOperatesClick={this.onOperatesClick.bind(this)}
/> */}
<CustomTable
<CustomPaginationTable
loading={loading}
columns={this.getColumns()}
dataSource={dataSource}
rowSelection={rowSelection}
total={pageInfo.total}
current={pageInfo.pageNum}
pageSize={this.pageInfo.pageSize}
scroll={{ x: this.getColumns().length > 0 ? this.getColumns().length * 150: 1000 }}
pagination={{
onChange: (value) => {this.handlePageChnage(value)},
total: pageInfo.total,
showTotal: (total) => `${total}`,
current: pageInfo.pageNum
onPageChange={(value) => {
this.handlePageChnage(value)
}}
/>
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
getTableDatas(this.pageInfo)
}}
/>
</WeaTop>
</WeaRightMenu>

View File

@ -19,6 +19,7 @@ import TipLabel from '../../../components/TipLabel'
import DefaultSlideForm from './defaultSlideForm'
import CustomNewModal from './customNewModal'
import { welfareTypeEnum, paymentScopeEnum } from './enum';
import CustomPaginationTable from '../../../components/customPaginationTable'
import {
@ -48,6 +49,8 @@ export default class Programme extends React.Component {
customNewVisible: false,
customEdit: false
}
this.pageInfo = {current: 1, pageSize: 10}
}
componentWillMount() {
@ -186,7 +189,8 @@ export default class Programme extends React.Component {
// 页面跳转
handlePageChange(value) {
const { programmeStore: {form, getTableDatas, selectedKey} } = this.props;
getTableDatas(selectedKey, {current: value})
this.pageInfo.current = value
getTableDatas(selectedKey, this.pageInfo)
}
render() {
@ -391,15 +395,21 @@ export default class Programme extends React.Component {
renderCustomRightContent()
}
/> :
<CustomTable
<CustomPaginationTable
loading={loading}
columns={this.getColumns(tableColumns)}
dataSource={tableDataSource}
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: tablePageInfo.total,
showTotal: (total) => `${total}`,
current: tablePageInfo.pageNum
total={tablePageInfo.total}
current={tablePageInfo.pageNum}
onPageChange={(value) => {
this.handlePageChange(value)
}}
onShowSizeChange={(current,pageSize) => {
this.pageInfo = {current, pageSize}
const { programmeStore: {form, getTableDatas, selectedKey} } = this.props;
getTableDatas(selectedKey, this.pageInfo)
}}
/>

View File

@ -11,6 +11,7 @@ import CustomTab from "../../../components/customTab";
import ContentWrapper from "../../../components/contentWrapper";
import Accountdialog from "./components/accountDialog";
import AbnormalDrawer from "./components/abnormalDrawer";
import CustomPaginationTable from '../../../components/customPaginationTable'
import moment from "moment";
import _ from "lodash";
@ -49,6 +50,7 @@ export default class StandingBook extends React.Component {
},
};
this.payload = {}
this.pageInfo = {current: 1, pageSize: 10}
}
componentDidMount() {
@ -169,10 +171,17 @@ export default class StandingBook extends React.Component {
});
}
handleGoDetail = (billMonth) => {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=detail&billMonth=${billMonth}`
);
handleGoDetail = (billMonth, detail) => {
if(detail) {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}`
);
} else {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}`
);
}
setTimeout(() => {
this.getCommonList({
...this.state.tableParams,
@ -226,7 +235,7 @@ export default class StandingBook extends React.Component {
});
break;
case "view":
this.handleGoDetail(billMonth);
this.handleGoDetail(billMonth, "detail");
break;
default:
break;
@ -274,6 +283,22 @@ export default class StandingBook extends React.Component {
});
};
handlePageChange(value) {
this.setState({current: value})
this.pageInfo.current = value;
this.getCommonList({
...this.state.tableParams,
...this.pageInfo,
});
}
handleShowSizeChange(pageInfo) {
this.getCommonList({
...this.state.tableParams,
...pageInfo,
});
}
render() {
const { standingBookStore } = this.props;
const {
@ -394,15 +419,22 @@ export default class StandingBook extends React.Component {
onChange={(val) => this.handleChangeMonth("endTime", val)}
/>
</div>
<CustomPaginationTable
loading={loading}
columns={_.filter(columns, (it) => it.dataIndex !== "id")}
dataSource={list}
total={total}
current={this.state.current}
pageSize={this.pageInfo.pageSize}
onPageChange={(value) => {
this.handlePageChange(value)
}}
onShowSizeChange={(current, pageSize) => {
this.pageInfo = {current, pageSize}
this.handleShowSizeChange(this.pageInfo)
}}
/>
<Spin spinning={loading}>
<WeaTable
columns={_.filter(columns, (it) => it.dataIndex !== "id")}
dataSource={list}
loading={loading}
pagination={pagination}
/>
</Spin>
{dialogProps.visible && (
<Accountdialog
{...dialogProps}

View File

@ -174,6 +174,7 @@ export default class TaxRate extends React.Component {
needScroll={true} // 是否启用table内部列表滚动将自适应到父级高度
getColumns={this.getColumns}
onOperatesClick={this.onOperatesClick.bind(this)}
/>
</WeaTop>
</WeaRightMenu>

View File

@ -291,9 +291,9 @@ export class calculateStore {
// 核算结果--列表
@action
acctResultList = (salaryAcctRecordId, employeeName = "", current = 1) => {
acctResultList = (salaryAcctRecordId, employeeName = "", current = 1, params = {}) => {
this.loading = true
API.acctResultList({salaryAcctRecordId, employeeName, current}).then(res => {
API.acctResultList({salaryAcctRecordId, employeeName, current, ...params}).then(res => {
if(res.status) {
// this.acctResultListTableStore.getDatas(res.data.dataKey.datas)

View File

@ -24,6 +24,7 @@ export class DeclareStore {
@observable detailTableStore = new TableStore();
@observable detailDataSource = [];
@observable datailColumns = [];
@observable detailPageInfo = {}
// 初始化操作
@action
@ -118,11 +119,12 @@ export class DeclareStore {
// 个税申报表详情列表
@action
getDetailList = (taxDeclarationIdStr) => {
API.getDetailList({taxDeclarationIdStr}).then(res => {
getDetailList = (taxDeclarationIdStr, params = {}) => {
API.getDetailList({taxDeclarationIdStr, ...params}).then(res => {
if(res.status) {
this.detailDataSource = res.data.pageInfo.list ? res.data.pageInfo.list : [];
this.datailColumns = res.data.pageInfo.columns
this.detailPageInfo = res.data.pageInfo
// this.detailTableStore.getDatas(res.data.dataKey.datas)
} else {
message.error(res.errrmsg || "获取失败")

View File

@ -30,7 +30,8 @@ export class MySalaryStore {
// 调薪记录
@observable recordListColumns = [];
@observable recordListDataSource = [];
@observable recordListPageInfo = {}
@observable recordListPageInfo = {};
@observable myBillPageInfo = {}
@action
initParams = () => {
@ -99,12 +100,13 @@ export class MySalaryStore {
// 我的工资单列表
@action
mySalaryBillList = (salaryYearMonth = []) => {
mySalaryBillList = (salaryYearMonth = [], params = {}) => {
this.loading = true
API.mySalaryBillList({salaryYearMonth}).then(res => {
API.mySalaryBillList({salaryYearMonth, ...params}).then(res => {
if(res.status) {
this.myBillDataSource = res.data.datas
this.myBillTableStore.getDatas(res.data.dataKey.datas)
this.myBillPageInfo = res.data.pageInfo
this.loading = false
} else {
message.error(res.errormsg || "获取失败")