Commit 59513ccd authored by 张子雨's avatar 张子雨

feat: 修复tab切换页码问题

parent 139ea625
......@@ -255,7 +255,10 @@ const AfterSale = props => {
const tabChange = tabIndex => {
setCurrentTab(tabIndex);
const { type, dealStatus } = TAB_MAPPING_DATA[tabIndex];
form.resetFields();
// 清空页码
actionRef.current.reloadAndRest();
form.setFieldsValue({
...tableParams,
dealStatus,
......@@ -332,6 +335,7 @@ const AfterSale = props => {
scroll: { x: '100%', y: tableScrollY },
rowKey: r => r.serviceNo,
request: async params => {
console.log(params);
const [start, end] = params.afterTime || afterTime;
const { current: pageNo, pageSize } = params;
const startDate = start ? moment(start).format('YYYY-MM-DD') : '';
......@@ -345,7 +349,6 @@ const AfterSale = props => {
};
delete requestParams.afterTime;
delete requestParams.current;
delete requestParams.pageSize;
const countRes = await getAfterPendingNum({
startDate,
endDate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment