diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/index.js b/pc4mobx/hrmSalary/pages/calculateDetail/index.js index 7b02b40a..a238a1fe 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/index.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/index.js @@ -63,7 +63,7 @@ export default class CalculateDetail extends React.Component { return (
- + {/* */} 更多
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index 5e151f88..12f899d4 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -111,7 +111,7 @@ export default class SalaryDetail extends React.Component { 引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`} placement="topLeft" /> - {this.setState({visible: true})}}>校验异常:0 + {/* {this.setState({visible: true})}}>校验异常:0 */}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index 7472495f..c28d3c92 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -6,7 +6,7 @@ import { WeaTableNew } from "comsMobx" import { Button, Table, DatePicker, Row, Col, Menu, Dropdown, Switch } from 'antd'; import { WeaInputSearch, WeaSlideModal, WeaHelpfulTip, WeaCheckbox, WeaDatePicker, WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaSelect, WeaTable } from 'ecCom'; - +import moment from 'moment' import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from '../../../components/customTab'; import ContentWrapper from '../../../components/contentWrapper'; @@ -24,7 +24,9 @@ import TwoColContent from '../../../components/twoColContent' import TipLabel from '../../../components/TipLabel' import ItemMangeFormModal from './itemMangeFormModal' -const { MonthPicker } = DatePicker; +// const { MonthPicker } = DatePicker; + +const { RangePicker } = DatePicker; @inject('attendanceStore') @@ -45,8 +47,6 @@ export default class Attendance extends React.Component { this.state = { value: "", selectedKey: "0", - startDate: "", - endDate: "", modalParam: {}, modalVisiable: false, selectItemVisible: false, @@ -108,7 +108,7 @@ export default class Attendance extends React.Component { const { attendanceStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = attendanceStore; const { step, setStep, setSlideVisiable, slideVisiable, doBatchDelete, attendTableStore, fieldSettingAttendList, fieldSettingCustomList, setFieldSettingAttendList, setFieldSettingCustomList, searchFieldSettingList } = attendanceStore; - const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo, attendanceDataSource, attendanceColumns} = attendanceStore + const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo, attendanceDataSource, attendanceColumns, attendancePageInfo} = attendanceStore const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; // tableStore 右侧选中数组 if (!hasRight && !loading) { // 无权限处理 @@ -161,35 +161,19 @@ export default class Attendance extends React.Component { const renderSearchOperationItem = () => { return
- +
} const renderLeftOperation = () => { const { attendanceStore: {getAttendanceList}} = this.props; - return { - this.setState({ - startDate: value - }) - this.listSearch = { - salaryYearMonth: [value, this.state.endDate] - } - getAttendanceList(this.listSearch) - - }} - onEndDateChange={(value) => { - this.setState({ - endDate: value - }) - this.listSearch = { - salaryYearMonth: [this.state.startDate, value] - } - getAttendanceList(this.listSearch) - }} - /> + return 薪资所属月: { + this.listSearch = { + salaryYearMonth: range.map(item => moment(item).format("YYYY-MM")) + } + getAttendanceList(this.listSearch) + }}/> } diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index 66b13252..9f4a53c1 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -28,6 +28,7 @@ export default class Declare extends React.Component { startDate: moment(new Date()).format("YYYY-MM"), endDate: moment(new Date()).format("YYYY-MM") } + this.searchParams = {current: 1} columns.map(item => { if(item.dataIndex == "cz") { item.render =(text, record) => { @@ -63,20 +64,21 @@ export default class Declare extends React.Component { }) const { declareStore } = this.props; const { getDeclareList } = declareStore - getDeclareList({ - fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: value - }) + this.searchParams.fromSalaryMonthStr = this.state.startDate + this.searchParams.endSalaryMonthStr = value + getDeclareList(this.searchParams) } // 查询列表 handleSearch() { const { declareStore } = this.props; const { getDeclareList } = declareStore - getDeclareList({ + this.searchParams = { fromSalaryMonthStr: this.state.startDate, - endSalaryMonthStr: this.state.endDate - }) + endSalaryMonthStr: this.state.endDate, + current: 1 + } + getDeclareList(this.searchParams) } getColumns() { @@ -95,11 +97,16 @@ export default class Declare extends React.Component { } + handleDataPageChange(value) { + + } + + render() { const { declareStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, - setShowSearchAd, listDataSource, listColumns } = declareStore; + setShowSearchAd, listDataSource, listColumns, pageInfo } = declareStore; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -171,7 +178,13 @@ export default class Declare extends React.Component { renderRightOperation() } /> - + {this.handleDataPageChange(value)}, + total: pageInfo.total, + current: pageInfo.pageNum + }} + /> { diff --git a/pc4mobx/hrmSalary/pages/ledger/columns.js b/pc4mobx/hrmSalary/pages/ledger/columns.js index f3127c39..42a1669e 100644 --- a/pc4mobx/hrmSalary/pages/ledger/columns.js +++ b/pc4mobx/hrmSalary/pages/ledger/columns.js @@ -67,11 +67,11 @@ export const slideStep3Columns = [ dataIndex: 'formulaContent', key: 'formulaContent' }, - { - title: "个税申请表对应字段", - dataIndex: 'taxDeclarationColumn', - key: 'taxDeclarationColumn', - } + // { + // title: "个税申请表对应字段", + // dataIndex: 'taxDeclarationColumn', + // key: 'taxDeclarationColumn', + // } ] export const slideStep4Columns = [ diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index 70c80ef0..ab5ab90f 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -216,7 +216,7 @@ export default class Ledger extends React.Component { "关联人员", "薪资项目", "调薪记薪规则", - "校验规则", + // "校验规则", ] const handleStep1Save = () => { @@ -305,14 +305,14 @@ export default class Ledger extends React.Component {
} { - (currentStep == 2 || currentStep == 3) &&
+ currentStep == 2 &&
} { - currentStep == 4 && + currentStep == 3 &&
@@ -336,9 +336,9 @@ export default class Ledger extends React.Component { { currentStep == 3 && } - { + {/* { currentStep == 4 && - } + } */}
@@ -357,7 +357,7 @@ export default class Ledger extends React.Component { title={ this.handleEditSlideSave()} @@ -379,9 +379,9 @@ export default class Ledger extends React.Component { { selectedTab == 3 && } - { + {/* { selectedTab == 4 && - } + } */}
} onClose={() => this.setState({editSlideVisible: false})} showMask={true} diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js index c3e436f4..50c36282 100644 --- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js +++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js @@ -102,7 +102,7 @@ export default class CanMoveItem extends React.Component { { - this.state.showContent && + this.state.showContent && } { this.state.addItemVisible && - + {this.handleDataPageChange(value)}, + total: pageInfo.total, + current: pageInfo.pageNum + }} + /> ) } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js b/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js index fd38d8fa..aa01fb80 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/changeSalaryModal.js @@ -1,7 +1,7 @@ import React from 'react' import { Row, Col, Table, Modal, Icon, Button, Select, message } from 'antd' const { Option } = Select -import { WeaInput, WeaSelect, WeaDatePicker } from "ecCom" +import { WeaInput, WeaSelect, WeaDatePicker, WeaTable } from "ecCom" import { changeSalaryModalColumns, dataSource } from './columns' import RequiredLabelTip from '../../components/requiredLabelTip' import "./index.less" @@ -267,7 +267,7 @@ export default class ChangeSalaryModal extends React.Component {
{ - this.state.inited &&
+ this.state.inited && } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index c89d9b85..49d5d7ee 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js @@ -152,10 +152,17 @@ export default class SalaryFile extends React.Component { }) } + // 页面跳转 + handlePageChange = (value) => { + const { salaryFileStore: {getTableDatas, form}} = this.props; + form.updateFields({ current: value }) + getTableDatas() + } + render() { const { salaryFileStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = salaryFileStore; - const { importType, previewColumns, previewDataSource, dataSource, currentId, editAgentVisible, setEditAgentVisible } = salaryFileStore; + const { importType, previewColumns, previewDataSource, dataSource, currentId, editAgentVisible, setEditAgentVisible, pageInfo } = salaryFileStore; const { selectedTab, step, selectedRowKeys } = this.state; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -291,6 +298,11 @@ export default class SalaryFile extends React.Component { rowSelection={rowSelection} columns={this.getColumns()} dataSource={dataSource} + pagination={{ + onChange: (value) => {this.handlePageChange(value)}, + total: pageInfo.total, + current: pageInfo.pageNum + }} /> diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js index cda7ca1c..76aba627 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js @@ -1,5 +1,6 @@ import React from 'react'; import { Table } from 'antd' +import { WeaTable } from 'ecCom' import { inject, observer } from 'mobx-react'; import ChangeSalaryModal from './changeSalaryModal' @@ -12,12 +13,13 @@ export default class SalaryItemChangeList extends React.Component { changeSalaryVisible: false, recordId: "" } + this.searchParams = {} } componentWillMount() { const { salaryFileStore: { fetchSingleSalaryItemList }, id} = this.props; - fetchSingleSalaryItemList({salaryArchiveId: this.props.id}) - + this.searchParams = {salaryArchiveId: this.props.id, current: 1} + fetchSingleSalaryItemList(this.searchParams) } handleEdit(record) { @@ -30,34 +32,47 @@ export default class SalaryItemChangeList extends React.Component { }) } - // 获取Columns - getColumns() { - const { salaryFileStore: {singleSalaryItemList} } = this.props; - let columns = [] - if(singleSalaryItemList.columns) { - columns = [...singleSalaryItemList.columns] + // 获取Columns + getColumns() { + const { salaryFileStore: {singleSalaryItemList} } = this.props; + let columns = [] + if(singleSalaryItemList.columns) { + columns = [...singleSalaryItemList.columns] + } + if(columns.length > 0) { + columns.push({ + title: '操作', + key: "cz", + dataIndex: "cz", + render: (text, record) => { + return ( + {this.handleEdit(record)}}>编辑 + ) + } + }) + } + return columns } - if(columns.length > 0) { - columns.push({ - title: '操作', - key: "cz", - dataIndex: "cz", - render: (text, record) => { - return ( - {this.handleEdit(record)}}>编辑 - ) - } - }) + + // 页面跳转 + handlePageChange(value) { + this.searchParams.current = value + const { salaryFileStore: {singleSalaryItemList} } = this.props; + singleSalaryItemList(this.searchParams) } - return columns -} render() { const { salaryFileStore } = this.props; const { singleSalaryItemList } = salaryFileStore return (
-
+ {this.handlePageChange(value)}, + total: singleSalaryItemList.total, + current: singleSalaryItemList.pageNum + }} + /> { this.state.changeSalaryVisible &&
-
+ {this.handlePageChange(value)}, + total: salaryItemList.total, + current: salaryItemList.pageNum + }} + /> ) diff --git a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js index aa1e4b95..f3de5e25 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js @@ -1,5 +1,6 @@ import React from 'react'; import { Table } from 'antd' +import { WeaTable } from 'ecCom' import { inject, observer } from 'mobx-react'; import EditAgentModal from './editAgentModal' @@ -12,11 +13,13 @@ export default class TaxAgentChangeList extends React.Component { recordId: '', editAgentVisible: false } + this.searchParams = {} } componentWillMount() { const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props; - fetchSingleTaxAgentList({salaryArchiveId: this.props.id}) + this.searchParams = {salaryArchiveId: this.props.id, current: 1} + fetchSingleTaxAgentList(this.searchParams) } // 编辑回调 @@ -50,12 +53,27 @@ export default class TaxAgentChangeList extends React.Component { return columns } + // 页面跳转 + handlePageChange(value) { + this.searchParams.current = value + const { salaryFileStore: { fetchSingleTaxAgentList }} = this.props; + fetchSingleTaxAgentList(this.searchParams) + } + render() { const { salaryFileStore } = this.props; const { singleTaxAgentList } = salaryFileStore return (
-
+ {this.handlePageChange(value)}, + total: singleTaxAgentList.total, + current: singleTaxAgentList.pageNum + }} + /> { this.state.editAgentVisible && { if(item.dataIndex == "refere") { item.render = () => { @@ -115,13 +116,21 @@ export default class SalaryItem extends React.Component { handleSearch(value) { const { salaryItemStore: {getTableDatas}} = this.props; - getTableDatas({name: value}) + this.searchParams = {name: value, current: 1} + getTableDatas(this.searchParams) + } + + + handlePageChnage(value) { + this.searchParams.current = value; + const { salaryItemStore: {getTableDatas}} = this.props; + getTableDatas(this.searchParams) } render() { const { salaryItemStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = salaryItemStore; - const { tableDataSource, tableColumns, systemItemVisible, setSystemItemVisible, deleteItemVisible, setDeleteItemVisible, deleteItemList, editSlideVisible, setEditSlideVisible, request } = salaryItemStore + const { tableDataSource, tableColumns, systemItemVisible, setSystemItemVisible, deleteItemVisible, setDeleteItemVisible, deleteItemList, editSlideVisible, setEditSlideVisible, request, pageInfo } = salaryItemStore const { formalModalVisible} = this.state; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -218,9 +227,6 @@ export default class SalaryItem extends React.Component { setRequest(value) } - - - return (
{this.handlePageChnage(value)}, + total: pageInfo.total, + current: pageInfo.pageNum + }} /> @@ -265,8 +276,6 @@ export default class SalaryItem extends React.Component { deleteItemVisible && {setDeleteItemVisible(false)}}/> } - - { editSlideVisible &&