diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index f5c2c8f8..7472495f 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -59,6 +59,7 @@ export default class Attendance extends React.Component { fieldCurrent: 1 } this.fieldSearch = {} + this.listSearch = {} } componentWillMount() { @@ -91,17 +92,23 @@ export default class Attendance extends React.Component { // 字段列表分页 handleFieldPageChange(value) { - this.setState({fieldCurrent: value}) const { attendanceStore: {getAttendanceFieldList} } = this.props; this.fieldSearch.current = value getAttendanceFieldList(this.fieldSearch) } + // 列表 + handleDataPageChange(value) { + const { attendanceStore: { getAttendanceList }} = this.props; + this.listSearch.current = value + getAttendanceList(this.listSearch) + } + render() { 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} = attendanceStore + const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo, attendanceDataSource, attendanceColumns} = attendanceStore const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; // tableStore 右侧选中数组 if (!hasRight && !loading) { // 无权限处理 @@ -167,20 +174,20 @@ export default class Attendance extends React.Component { this.setState({ startDate: value }) - - getAttendanceList({ + this.listSearch = { salaryYearMonth: [value, this.state.endDate] - }) + } + getAttendanceList(this.listSearch) }} onEndDateChange={(value) => { this.setState({ endDate: value }) - getAttendanceList({ + this.listSearch = { salaryYearMonth: [this.state.startDate, value] - }) - + } + getAttendanceList(this.listSearch) }} /> } @@ -278,7 +285,8 @@ export default class Attendance extends React.Component { this.fieldSearch = {fieldName: this.state.fieldName} getAttendanceFieldList(this.fieldSearch) } else if(v == "0") { - getAttendanceList({}) + this.listSearch = {} + getAttendanceList(this.listSearch) } } @@ -414,6 +422,18 @@ export default class Attendance extends React.Component { // getColumns={this.getColumns} // onOperatesClick={this.onOperatesClick.bind(this)} /> */} + + {this.handleDataPageChange(value)}, + total: attendancePageInfo.total, + current: attendancePageInfo.pageNum + }} + /> :
@@ -444,7 +464,7 @@ export default class Attendance extends React.Component { pagination={{ onChange: (value) => {this.handleFieldPageChange(value)}, total: fieldPageInfo.total, - current: this.state.fieldCurrent + current: fieldPageInfo.pageNum }} /> } diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index ae951f4c..70c80ef0 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -135,7 +135,7 @@ export default class Ledger extends React.Component { case "3": // 关联人员 this.handleItemClick(record, 1) case "4": // 删除 - ({ + Modal.confirm({ title: '信息确认', content: '确认删除', onOk:() => { diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js index 13ddfdf7..ce0073f8 100644 --- a/pc4mobx/hrmSalary/stores/attendanceStore.js +++ b/pc4mobx/hrmSalary/stores/attendanceStore.js @@ -30,6 +30,11 @@ export class AttendanceStore { @observable fieldTableStore = new TableStore(); // new Table @observable fieldPageInfo = {}; + // 考勤数据列表 + @observable attendanceDataSource = []; + @observable attendancePageInfo = {}; + @observable attendanceColumns = []; + @action searchFieldSettingList = (value) => { if(value != "") { @@ -225,7 +230,10 @@ export class AttendanceStore { this.loading = true; API.getAttendanceList(params).then(res => { if (res.status) { // 接口请求成功/失败处理 - this.attendTableStore.getDatas(res.data.datas); // table 请求数据 + // this.attendTableStore.getDatas(res.data.datas); // table 请求数据 + this.attendanceDataSource = res.data.list; + this.attendancePageInfo = res.data; + this.attendanceColumns = res.data.columns } else { message.error(res.errormsg || '接口调用失败!') }