@@ -67,7 +78,15 @@ export default class AbnormalListIndex extends Component {
-
+
+ console.log("多人力", ids, names, datas)
+ }
+ isSingle={false}
+ />
{/* table */}
@@ -76,7 +95,7 @@ export default class AbnormalListIndex extends Component {
columns={columns}
dataSource={list}
loading={loading}
- pagination={{ total }}
+ pagination={pagination}
scroll={{ x: 1200 }}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
index 553f32c9..4b196a60 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
@@ -2,13 +2,13 @@
* Author: 黎永顺
* Description: 正常缴纳月份
* Date: 2022-04-20 08:56:08
- * LastEditTime: 2022-04-22 14:05:50
+ * LastEditTime: 2022-04-22 19:06:46
*/
import React, { Component } from "react";
import { Icon, Tooltip, Button, message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
-import { WeaInputSearch, WeaTable, WeaPopoverHrm, WeaDialog } from "ecCom";
+import { WeaBrowser, WeaTable, WeaPopoverHrm, WeaDialog } from "ecCom";
import { getSearchs } from "../../../../util";
import _ from "lodash";
import "./index.less";
@@ -20,6 +20,7 @@ export default class NormalIndex extends Component {
super(props);
this.state = {
date: "",
+ current: 1,
selectedRowKeys: [],
addProps: {
title: "",
@@ -35,17 +36,19 @@ export default class NormalIndex extends Component {
componentDidMount() {
const { billMonth, selectedKey } = this.props;
+ const { current } = this.state;
selectedKey === "1"
- ? this.getNormalList({ billMonth })
- : this.getSupplementaryList({ billMonth });
+ ? this.getNormalList({ billMonth, current })
+ : this.getSupplementaryList({ billMonth, current });
}
componentWillReceiveProps(nextProps) {
if (nextProps.selectedKey != this.props.selectedKey) {
const { billMonth } = nextProps;
+ const { current } = this.state;
nextProps.selectedKey === "1"
- ? this.getNormalList({ billMonth })
- : this.getSupplementaryList({ billMonth });
+ ? this.getNormalList({ billMonth, current })
+ : this.getSupplementaryList({ billMonth, current });
}
}
@@ -54,14 +57,15 @@ export default class NormalIndex extends Component {
this.props.standingBookStore;
const { billMonth, selectedKey } = this.props;
if (selectedKey === "1") {
- const { includes } = form.getFormParams();
+ const { includes, excludes } = form.getFormParams();
const payload = {
billMonth,
includes: includes.split(","),
+ excludes: _.isEmpty(excludes) ? excludes.split(",") : [],
};
siaccountCommonSave(payload).then(() => {
message.success("添加成功");
- this.getNormalList({ billMonth });
+ this.getNormalList({ billMonth, current: this.state.current });
this.setState({
addProps: {
...this.state.addProps,
@@ -88,7 +92,10 @@ export default class NormalIndex extends Component {
};
siaccountSupplementarySave(payload).then(() => {
message.success("添加成功");
- this.getSupplementaryList({ billMonth });
+ this.getSupplementaryList({
+ billMonth,
+ current: this.state.current,
+ });
this.setState({
addProps: {
...this.state.addProps,
@@ -216,8 +223,11 @@ export default class NormalIndex extends Component {
message.success("删除成功");
this.setState({ selectedRowKeys: [] });
selectedKey === "1"
- ? this.getNormalList({ billMonth })
- : this.getSupplementaryList({ billMonth });
+ ? this.getNormalList({ billMonth, current: this.state.current })
+ : this.getSupplementaryList({
+ billMonth,
+ current: this.state.current,
+ });
});
},
onCancel: () => {},
@@ -251,6 +261,20 @@ export default class NormalIndex extends Component {
selectedRowKeys,
onChange: this.onSelectChange,
};
+ const pagination = {
+ total,
+ current: this.state.current,
+ showTotal: (total) => `共 ${total} 条`,
+ onChange: (current) => {
+ this.setState({ current });
+ selectedKey === "1"
+ ? this.getNormalList({ billMonth, current })
+ : this.getSupplementaryList({
+ billMonth,
+ current,
+ });
+ },
+ };
return (
{selectedKey === "1" && (
@@ -315,7 +339,15 @@ export default class NormalIndex extends Component {
{selectedKey === "1" && }
-
+
+ console.log("多人力", ids, names, datas)
+ }
+ isSingle={false}
+ />
{/* table */}
@@ -324,7 +356,7 @@ export default class NormalIndex extends Component {
columns={columns}
dataSource={list}
loading={loading}
- pagination={{ total }}
+ pagination={pagination}
rowSelection={rowSelection}
scroll={{ x: 1200 }}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js
index 043384ea..5ef7597b 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/overView.js
@@ -2,22 +2,15 @@
* Author: 黎永顺
* Description: 总览
* Date: 2022-04-20 20:49:23
- * LastEditTime: 2022-04-20 21:36:46
+ * LastEditTime: 2022-04-22 18:35:12
*/
-/*
- * Author: 黎永顺
- * Description: 总览月份
- * Date: 2022-04-20 08:56:08
- * LastEditTime: 2022-04-20 20:45:54
- */
-import React, { Component } from 'react';
-import { Icon, Tooltip, Button } from 'antd';
-import { inject, observer } from 'mobx-react';
-import { WeaInputSearch, WeaTable } from 'ecCom';
-import './index.less';
+import React, { Component } from "react";
+import { Icon, Tooltip, Button } from "antd";
+import { inject, observer } from "mobx-react";
+import { WeaInputSearch, WeaTable } from "ecCom";
+import "./index.less";
-
-@inject('standingBookStore')
+@inject("standingBookStore")
@observer
export default class OverViewIndex extends Component {
constructor(props) {
@@ -25,75 +18,95 @@ export default class OverViewIndex extends Component {
this.state = {
selectedRowKeys: [],
tableData: {
- list: [], columns: [], total: 0
- }
- }
+ list: [],
+ columns: [],
+ total: 0,
+ },
+ };
}
componentDidMount() {
const { billMonth } = this.props;
- this.getOverViewList({ billMonth })
+ this.getOverViewList({ billMonth });
}
getOverViewList = (payload = {}) => {
const { getOverViewList } = this.props.standingBookStore;
- getOverViewList({ ...payload }).then(({ list, columns = [], total }) => {
- columns = _.map(_.filter(columns, it => it.dataIndex !== 'id'), it => {
- // if (it.dataIndex === "employeeId") {
- // it = {
- // ...it,
- // width: 150,
- // fixed: 'left'
- // }
- // }
- return {
- ...it,
- title:
,
- }
- })
- this.setState({
- tableData: {
- list,
- columns,
- total
- }
- })
- })
- }
+ getOverViewList({ ...payload, current: 1 }).then(
+ ({ list, columns = [], total }) => {
+ columns = _.map(
+ _.filter(columns, (it) => it.dataIndex !== "id"),
+ (it) => {
+ // if (it.dataIndex === "employeeId") {
+ // it = {
+ // ...it,
+ // width: 150,
+ // fixed: 'left'
+ // }
+ // }
+ return {
+ ...it,
+ title: (
+
+ ),
+ };
+ }
+ );
+ this.setState({
+ tableData: {
+ list,
+ columns,
+ total,
+ },
+ });
+ }
+ );
+ };
render() {
const { remarks, billMonth, selectedKey } = this.props;
const { selectedRowKeys } = this.state;
const { loading } = this.props.standingBookStore;
let { list, columns, total } = this.state.tableData;
+ const pagination = {
+ total,
+ showTotal: (total) => `共 ${total} 条`,
+ onShowSizeChange(current, pageSize) {
+ console.log("Current: ", current, "; PageSize: ", pageSize);
+ },
+ onChange(current) {
+ console.log("Current: ", current);
+ },
+ };
return (
-
-
-
+
+
-
+
{/* table */}
-
- )
+ );
}
}
-
diff --git a/pc4mobx/hrmSalary/stores/StandingBook.js b/pc4mobx/hrmSalary/stores/StandingBook.js
index 65f99ed1..d378e2f4 100644
--- a/pc4mobx/hrmSalary/stores/StandingBook.js
+++ b/pc4mobx/hrmSalary/stores/StandingBook.js
@@ -36,9 +36,9 @@ export class StandingBookStore {
if (status) {
// 接口请求成功/失败处理
const {
- pageInfo: { list, columns, total },
+ pageInfo: { list, columns, total, pageNum },
} = data;
- resolve({ list, columns, total });
+ resolve({ list, columns, total, pageNum });
} else {
message.error("接口调用失败!");
reject();