|
@@ -447,7 +447,8 @@ export function OperatorReconPage() {
|
|
|
const periodsFetch = useViewFetch(() => reconGetPeriods(), []);
|
|
const periodsFetch = useViewFetch(() => reconGetPeriods(), []);
|
|
|
const periods = periodsFetch.data?.periods ?? null;
|
|
const periods = periodsFetch.data?.periods ?? null;
|
|
|
const fetchState = useViewFetch(
|
|
const fetchState = useViewFetch(
|
|
|
- () => reconGetList({ page, page_size: 20, period: month || undefined, keyword: keyword.trim() || undefined }),
|
|
|
|
|
|
|
+ // 分页器是 1 基、后端 `page` 是 0 基(openapi:页码 0 基索引)⇒ 只在请求边界换算。
|
|
|
|
|
+ () => reconGetList({ page: Math.max(0, page - 1), page_size: 20, period: month || undefined, keyword: keyword.trim() || undefined }),
|
|
|
[month, keyword, page],
|
|
[month, keyword, page],
|
|
|
);
|
|
);
|
|
|
const { data, fail } = fetchState;
|
|
const { data, fail } = fetchState;
|
|
@@ -692,7 +693,8 @@ export function PartyCustomerListPage({ kind }: { kind: "partner" | "operator" }
|
|
|
const [page, setPage] = useState(1);
|
|
const [page, setPage] = useState(1);
|
|
|
// ⛔ 前端下传 partner_id/operator_id(总则§16.1:范围在服务端谓词层展开)。
|
|
// ⛔ 前端下传 partner_id/operator_id(总则§16.1:范围在服务端谓词层展开)。
|
|
|
const fetchState = useViewFetch(
|
|
const fetchState = useViewFetch(
|
|
|
- () => customerGetList({ page, page_size: 20, keyword: keyword.trim() || undefined }),
|
|
|
|
|
|
|
+ // 分页器是 1 基、后端 `page` 是 0 基(openapi:页码 0 基索引)⇒ 只在请求边界换算。
|
|
|
|
|
+ () => customerGetList({ page: Math.max(0, page - 1), page_size: 20, keyword: keyword.trim() || undefined }),
|
|
|
[keyword, page],
|
|
[keyword, page],
|
|
|
);
|
|
);
|
|
|
const { data, fail } = fetchState;
|
|
const { data, fail } = fetchState;
|
|
@@ -762,7 +764,8 @@ export function PartyContractListPage({ kind }: { kind: "partner" | "operator" }
|
|
|
const [page, setPage] = useState(1);
|
|
const [page, setPage] = useState(1);
|
|
|
// 行集=本方客户集合传导(SQL-2 第二段);⛔ 前端下传范围入参。
|
|
// 行集=本方客户集合传导(SQL-2 第二段);⛔ 前端下传范围入参。
|
|
|
const fetchState = useViewFetch(
|
|
const fetchState = useViewFetch(
|
|
|
- () => contractGetList({ page, page_size: 20, keyword: keyword.trim() || undefined }),
|
|
|
|
|
|
|
+ // 分页器是 1 基、后端 `page` 是 0 基(openapi:页码 0 基索引)⇒ 只在请求边界换算。
|
|
|
|
|
+ () => contractGetList({ page: Math.max(0, page - 1), page_size: 20, keyword: keyword.trim() || undefined }),
|
|
|
[keyword, page],
|
|
[keyword, page],
|
|
|
);
|
|
);
|
|
|
const { data, fail } = fetchState;
|
|
const { data, fail } = fetchState;
|