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

feat: 修复tab切换页码问题

parent 139ea625
...@@ -255,7 +255,10 @@ const AfterSale = props => { ...@@ -255,7 +255,10 @@ const AfterSale = props => {
const tabChange = tabIndex => { const tabChange = tabIndex => {
setCurrentTab(tabIndex); setCurrentTab(tabIndex);
const { type, dealStatus } = TAB_MAPPING_DATA[tabIndex]; const { type, dealStatus } = TAB_MAPPING_DATA[tabIndex];
form.resetFields(); form.resetFields();
// 清空页码
actionRef.current.reloadAndRest();
form.setFieldsValue({ form.setFieldsValue({
...tableParams, ...tableParams,
dealStatus, dealStatus,
...@@ -332,6 +335,7 @@ const AfterSale = props => { ...@@ -332,6 +335,7 @@ const AfterSale = props => {
scroll: { x: '100%', y: tableScrollY }, scroll: { x: '100%', y: tableScrollY },
rowKey: r => r.serviceNo, rowKey: r => r.serviceNo,
request: async params => { request: async params => {
console.log(params);
const [start, end] = params.afterTime || afterTime; const [start, end] = params.afterTime || afterTime;
const { current: pageNo, pageSize } = params; const { current: pageNo, pageSize } = params;
const startDate = start ? moment(start).format('YYYY-MM-DD') : ''; const startDate = start ? moment(start).format('YYYY-MM-DD') : '';
...@@ -345,7 +349,6 @@ const AfterSale = props => { ...@@ -345,7 +349,6 @@ const AfterSale = props => {
}; };
delete requestParams.afterTime; delete requestParams.afterTime;
delete requestParams.current; delete requestParams.current;
delete requestParams.pageSize;
const countRes = await getAfterPendingNum({ const countRes = await getAfterPendingNum({
startDate, startDate,
endDate, 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