退差删除分页查询的问题

This commit is contained in:
黎永顺 2022-11-25 13:46:51 +08:00
parent ce8f79eea4
commit b3f9ddcd11
2 changed files with 8 additions and 7 deletions

View File

@ -41,7 +41,7 @@ class RegList extends Component {
handleResetSelectRowKeys = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
recessionList = (userName = "") => {
recessionList = (module = {}) => {
const { loading, pageInfo } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
@ -49,9 +49,9 @@ class RegList extends Component {
const paymentStatus = "3";
const payload = {
billMonth, paymentStatus,
creator, userName,
paymentOrganization,
...pageInfo
creator, paymentOrganization,
...pageInfo,
...module
};
this.setState({ loading: { ...loading, query: true } });
API.recessionList(payload).then(({ status, data }) => {

View File

@ -11,6 +11,7 @@ import RegList from "./regList";
import RegAddEmployee from "./regAddEmployee";
import RegEditDetial from "./regEditDetial";
import { getQueryString } from "../../../../util/url";
import { calcPageNo } from "../../../../util";
import * as API from "../../../../apis/standingBook";
import "./index.less";
@ -40,8 +41,8 @@ class Regression extends Component {
API.delRecession(selectKey).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
this.regListRef.recessionList();
const current = calcPageNo(this.regListRef.state.pageInfo.total, this.regListRef.state.pageInfo.current, 10, selectKey.length);
this.regListRef.recessionList({ current });
this.regListRef.handleResetSelectRowKeys([]);
this.setState({ selectKey: [] });
} else {
@ -95,7 +96,7 @@ class Regression extends Component {
window.open(url, "_self");
break;
case "search":
this.regListRef.recessionList(name);
this.regListRef.recessionList({ userName: name });
break;
default:
break;