退差删除分页查询的问题

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

View File

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