|
@@ -1,33 +1,13 @@
|
|
|
-/**
|
|
|
|
|
- * 册 8《合伙人与运营商只读视图》页面族(视图§14 页面契约逐页)。
|
|
|
|
|
- *
|
|
|
|
|
- * 路由与菜单契约(视图§3.4/§14.1,⛔ 三身份路由前缀不同、组件不复用路由):
|
|
|
|
|
- * partnerAcct ⇒ /bos/pv/*(V-P1 合并页/V-P2 客户/V-P3 合同);
|
|
|
|
|
- * opAcct ⇒ /bos/ov/*(V-P5 对账清单/V-P6 账单明细/V-P7 客户/V-P8 合同);
|
|
|
|
|
- * teamLead ⇒ /bos/tv/recon(V-P1b,复用 V-P1 合并页组件——⚠️ 仅此两页允许共用;
|
|
|
|
|
- * V-P5/V-P6 与合并页内两表「同名不同路由」,⛔ 合并组件靠 props 抹平差异,A51)。
|
|
|
|
|
- * 变更记录 V-P4/V-P9 三条路由 /bos/{pv,ov,tv}/n 建在册 10:读口就绪位 `audit_read_ready=true` ⇒ 入口渲染(视图§3.4 纪律 1)。
|
|
|
|
|
- *
|
|
|
|
|
- * 接线状态(2026-11-18):bos.view/partner_recon@v1 已在 openapi.yaml 声明并由
|
|
|
|
|
- * billing::view_partner_recon 实现(六段一次返回)⇒ 合并页走真数据;
|
|
|
|
|
- * 11001 占位分支仅作契约兜底保留。opAcct 两页复用对账§同名口(R1/R2,reconGetList/billGetList);
|
|
|
|
|
- * 单批导出复用对账§ reconExportDetail(R4,本册⛔ 自立导出口)。
|
|
|
|
|
- *
|
|
|
|
|
- * 硬纪律:⛔「无权限」字样(U-68/总则§16.4);⛔ history.back()(14.6);
|
|
|
|
|
- * ⛔ 列表级导出/批量操作/人工补跑/已读异议按钮(14.5 白名单);
|
|
|
|
|
- * ⛔「涉及分成方」卡与「同一张应收上其他分成方」面板(14.5,服务端亦不返回);
|
|
|
|
|
- * 金额整数分传输、前端不做浮点运算;本方对账默认全部自然月,其余只读台账默认预选 lastClosedMonth()。
|
|
|
|
|
- */
|
|
|
|
|
-import { Children, useCallback, useEffect, useRef, useState, type ReactNode } from "react";
|
|
|
|
|
|
|
+/** 各身份的只读台账。合伙人与团队使用本方快照,运营商使用对账和账单列表接口。 */
|
|
|
|
|
+import { Children, useCallback, useEffect, useState, type ReactNode } from "react";
|
|
|
import { PageIntro } from "../components/PageIntro";
|
|
import { PageIntro } from "../components/PageIntro";
|
|
|
import { ContractLedgerAmountCell } from "../components/ContractLedgerAmountCell";
|
|
import { ContractLedgerAmountCell } from "../components/ContractLedgerAmountCell";
|
|
|
import { SettlementLedgerHead, useSettlementLedgerTable, type SettlementLedgerColumn } from "../components/SettlementLedger";
|
|
import { SettlementLedgerHead, useSettlementLedgerTable, type SettlementLedgerColumn } from "../components/SettlementLedger";
|
|
|
-import { ArrowDown, ArrowLeft, ArrowRight, CalendarClock, CalendarDays, Download, Info, Search, X } from "lucide-react";
|
|
|
|
|
|
|
+import { ArrowLeft, ArrowRight, CalendarClock, CalendarDays, Download, Search, X } from "lucide-react";
|
|
|
import { Link, useLocation, useParams, useSearchParams } from "react-router";
|
|
import { Link, useLocation, useParams, useSearchParams } from "react-router";
|
|
|
import { detailBack, detailLinkState, partnerReconDetailPath } from "../lib/detail-navigation";
|
|
import { detailBack, detailLinkState, partnerReconDetailPath } from "../lib/detail-navigation";
|
|
|
-import { ListPager, ServerListPager } from "../components/ListPager";
|
|
|
|
|
|
|
+import { ListPager } from "../components/ListPager";
|
|
|
import { Button } from "../components/ui/button";
|
|
import { Button } from "../components/ui/button";
|
|
|
-import { Input } from "../components/ui/input";
|
|
|
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
import { SearchInput } from "../components/ui/search-input";
|
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
|
import { MonthFilter } from "../components/ui/month-filter";
|
|
import { MonthFilter } from "../components/ui/month-filter";
|
|
@@ -48,41 +28,30 @@ import {
|
|
|
import type {
|
|
import type {
|
|
|
BillDetailResult,
|
|
BillDetailResult,
|
|
|
ContractRow,
|
|
ContractRow,
|
|
|
- ViewBillDetailRow,
|
|
|
|
|
- ViewPartnerReconResult,
|
|
|
|
|
- ViewReconBatchRow,
|
|
|
|
|
} from "../lib/api/types";
|
|
} from "../lib/api/types";
|
|
|
import { WORD_FETCH_FAILED, WORD_NOT_PROVIDED, WORD_UNCONFIGURED } from "../lib/api/lockedCopy";
|
|
import { WORD_FETCH_FAILED, WORD_NOT_PROVIDED, WORD_UNCONFIGURED } from "../lib/api/lockedCopy";
|
|
|
import { ACCT_STATUS, PAY_CYCLE, SUBJECT_TYPE, label } from "../lib/api/labels";
|
|
import { ACCT_STATUS, PAY_CYCLE, SUBJECT_TYPE, label } from "../lib/api/labels";
|
|
|
import { contractFromRow, contractStatusOf, contractStatusTone } from "../lib/contract-demo";
|
|
import { contractFromRow, contractStatusOf, contractStatusTone } from "../lib/contract-demo";
|
|
|
import { EXPIRING_SOON_DAYS } from "../lib/expiring-soon";
|
|
import { EXPIRING_SOON_DAYS } from "../lib/expiring-soon";
|
|
|
import { settleTextFromSnapshot } from "../lib/settle-text";
|
|
import { settleTextFromSnapshot } from "../lib/settle-text";
|
|
|
-import { lastClosedMonth } from "../lib/recon";
|
|
|
|
|
import { ALL_PERIODS_LABEL, BACKEND_NOT_WIRED, BATCH_STATUS_TEXT, EXPORT_EMPTY_NOTE, RECONCILE_STATUS_TEXT, TRIGGER_TYPE_TEXT, exportResultNote, saveReconExportCsv } from "../lib/copy-billing";
|
|
import { ALL_PERIODS_LABEL, BACKEND_NOT_WIRED, BATCH_STATUS_TEXT, EXPORT_EMPTY_NOTE, RECONCILE_STATUS_TEXT, TRIGGER_TYPE_TEXT, exportResultNote, saveReconExportCsv } from "../lib/copy-billing";
|
|
|
import {
|
|
import {
|
|
|
BACK_TO_BILL_DETAIL_LIST,
|
|
BACK_TO_BILL_DETAIL_LIST,
|
|
|
BACK_TO_CONTRACT_LIST,
|
|
BACK_TO_CONTRACT_LIST,
|
|
|
BACK_TO_CUSTOMER_LIST,
|
|
BACK_TO_CUSTOMER_LIST,
|
|
|
- BACK_TO_SELF_RECON,
|
|
|
|
|
CARD1_TITLE,
|
|
CARD1_TITLE,
|
|
|
- CARD_SNAPSHOT_TITLE,
|
|
|
|
|
OWNERSHIP_CHANGED,
|
|
OWNERSHIP_CHANGED,
|
|
|
- VIEW_ALL_PERIODS_NOTE,
|
|
|
|
|
VIEW_BINDING_FAILED,
|
|
VIEW_BINDING_FAILED,
|
|
|
VIEW_CONFIG_UNSET,
|
|
VIEW_CONFIG_UNSET,
|
|
|
VIEW_DEFAULT_PAY_CYCLE,
|
|
VIEW_DEFAULT_PAY_CYCLE,
|
|
|
- VIEW_DETAIL_ONLY_SETTLED,
|
|
|
|
|
VIEW_EXPORT_EXPIRED,
|
|
VIEW_EXPORT_EXPIRED,
|
|
|
VIEW_FILTER_INCOMPLETE,
|
|
VIEW_FILTER_INCOMPLETE,
|
|
|
- VIEW_KEYWORD_FILTER_NOTE,
|
|
|
|
|
VIEW_LIST_EMPTY,
|
|
VIEW_LIST_EMPTY,
|
|
|
- VIEW_MONTH_NO_BATCH,
|
|
|
|
|
VIEW_NOT_FOUND,
|
|
VIEW_NOT_FOUND,
|
|
|
VIEW_ROLE_FORBIDDEN,
|
|
VIEW_ROLE_FORBIDDEN,
|
|
|
VIEW_SNAPSHOT_NOT_READY,
|
|
VIEW_SNAPSHOT_NOT_READY,
|
|
|
VIEW_WIRING_NOTE,
|
|
VIEW_WIRING_NOTE,
|
|
|
viewExportOverLimit,
|
|
viewExportOverLimit,
|
|
|
- viewMonthTruncated,
|
|
|
|
|
} from "../lib/copy-views";
|
|
} from "../lib/copy-views";
|
|
|
import { PartyContractRecord, PartyCustomerRecord } from "./PartyReadOnlyRecords";
|
|
import { PartyContractRecord, PartyCustomerRecord } from "./PartyReadOnlyRecords";
|
|
|
import "../styles/operations.css";
|
|
import "../styles/operations.css";
|
|
@@ -180,8 +149,6 @@ function FullPageState({ text, retry }: { text: string; retry?: () => void }) {
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* ── V-P1/V-P1b 合并页(六段一次请求,⛔ 分段懒加载) ────────────────────── */
|
|
|
|
|
-
|
|
|
|
|
type PartyListView = { page: number; month?: string; keyword?: string; subject?: string; status?: string; expiring?: boolean };
|
|
type PartyListView = { page: number; month?: string; keyword?: string; subject?: string; status?: string; expiring?: boolean };
|
|
|
|
|
|
|
|
function usePartyListReturn() {
|
|
function usePartyListReturn() {
|
|
@@ -215,252 +182,132 @@ function ReconOverview({ title, month, reconDay, payCycle, settlementRule, child
|
|
|
</div>;
|
|
</div>;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
|
|
- const teamView = kind === "team";
|
|
|
|
|
- const title = kind === "partner" ? "本运营区域对账" : "本方对账";
|
|
|
|
|
- const prefix = kindPrefix(kind);
|
|
|
|
|
- const { saved, stateFor } = usePartyListReturn();
|
|
|
|
|
- const defaultMonth = teamView ? "" : lastClosedMonth();
|
|
|
|
|
- const [month, setMonth] = useState(saved?.month ?? defaultMonth);
|
|
|
|
|
- const [keyword, setKeyword] = useState(saved?.keyword ?? "");
|
|
|
|
|
- const [page, setPage] = useState(saved?.page ?? 1);
|
|
|
|
|
- const linkState = stateFor({ month, keyword, page });
|
|
|
|
|
- const [notice, setNotice] = useState("");
|
|
|
|
|
- const detailRef = useRef<HTMLDivElement>(null);
|
|
|
|
|
- const exportBatch = useExportBatch(setNotice);
|
|
|
|
|
|
|
+type ScopedReconKind = "partner" | "team";
|
|
|
|
|
|
|
|
- const fetchState = useViewFetch<ViewPartnerReconResult>(
|
|
|
|
|
- // 对外分页 0 基(总则§16.5;组件页码 1 基,只在请求边界换算)。
|
|
|
|
|
- () => viewPartnerRecon({ month: month || undefined, keyword, page: Math.max(0, page - 1), page_size: 20 }),
|
|
|
|
|
- [month, keyword, page],
|
|
|
|
|
- );
|
|
|
|
|
- const { data, fail } = fetchState;
|
|
|
|
|
- const wiring = fail?.kind === "wiring";
|
|
|
|
|
- // 快照未建立=整页态(KLT-O20703):200 响应仍带数据骨架,⛔ 渲染成空表或 0。
|
|
|
|
|
- const snapshotNotReady = data?.snapshot_state === "not_ready";
|
|
|
|
|
- const monthOptions = data && data.month_options !== "failed" ? data.month_options : null;
|
|
|
|
|
- const monthOptionsFailed = data?.month_options === "failed";
|
|
|
|
|
|
|
+function useLedgerQuery() {
|
|
|
|
|
+ const location = useLocation();
|
|
|
|
|
+ const [params, setParams] = useSearchParams();
|
|
|
|
|
+ const pageParam = Number(params.get("page"));
|
|
|
|
|
+ const page = Number.isSafeInteger(pageParam) && pageParam > 0 ? pageParam : 1;
|
|
|
|
|
+ const options = { replace: true, state: location.state };
|
|
|
|
|
|
|
|
- // C35:预选月不在 month_options 内 ⇒ 退回首项 month_options[0](⛔ 停在空月份静默成「筛选无结果」)。
|
|
|
|
|
- useEffect(() => {
|
|
|
|
|
- if (teamView || !monthOptions?.length || !month) return;
|
|
|
|
|
- if (!monthOptions.some((o) => o.period === month)) setMonth(monthOptions[0].period);
|
|
|
|
|
- }, [teamView, monthOptions, month]);
|
|
|
|
|
- const monthFallback = !teamView && Boolean(monthOptions?.length && month && !monthOptions.some((o) => o.period === month));
|
|
|
|
|
-
|
|
|
|
|
- function resetFilter() {
|
|
|
|
|
- setKeyword("");
|
|
|
|
|
- setMonth(defaultMonth);
|
|
|
|
|
- setPage(1);
|
|
|
|
|
- }
|
|
|
|
|
- /** 表 1「查看明细」=页内锚点定位表 2 并自动填筛选(不跳页,视图§4.1.2)。 */
|
|
|
|
|
- function drillBatch(batchNo: string) {
|
|
|
|
|
- setKeyword(batchNo);
|
|
|
|
|
- setPage(1);
|
|
|
|
|
- detailRef.current?.focus({ preventScroll: true });
|
|
|
|
|
- detailRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
|
|
|
|
|
+ function setFilter(key: "month" | "batch" | "customer" | "page", value: string) {
|
|
|
|
|
+ const next = new URLSearchParams(params);
|
|
|
|
|
+ if (value) next.set(key, value); else next.delete(key);
|
|
|
|
|
+ if (key !== "page") next.delete("page");
|
|
|
|
|
+ setParams(next, options);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const config = data?.config ?? null;
|
|
|
|
|
- const settle = data?.settle ?? null;
|
|
|
|
|
- const batches = data?.batches ?? [];
|
|
|
|
|
- const details = data?.details ?? [];
|
|
|
|
|
- const reconDay = !wiring && config ? (config.recon_day == null ? VIEW_CONFIG_UNSET : `每月 ${config.recon_day} 日`) : BACKEND_NOT_WIRED;
|
|
|
|
|
- const payCycle = !wiring && config ? (config.pay_cycle ?? VIEW_DEFAULT_PAY_CYCLE) : BACKEND_NOT_WIRED;
|
|
|
|
|
- const settlementRule = wiring ? <Tri tone="missing" text={BACKEND_NOT_WIRED} />
|
|
|
|
|
- : settle && (settle.mode != null || settle.value != null) ? settleTextFromSnapshot(settle.mode, settle.value) : WORD_UNCONFIGURED;
|
|
|
|
|
- const batchTotal = wiring ? BACKEND_NOT_WIRED : `${data?.batch_total ?? 0} 批`;
|
|
|
|
|
- const detailTotal = wiring ? BACKEND_NOT_WIRED : `${data?.detail_total ?? 0} 条`;
|
|
|
|
|
- const shareTotal = wiring ? BACKEND_NOT_WIRED : moneyCell(data?.share_sum ?? null);
|
|
|
|
|
- const showLedger = wiring || (data && !snapshotNotReady);
|
|
|
|
|
-
|
|
|
|
|
- const pageSize = 20;
|
|
|
|
|
|
|
+ return {
|
|
|
|
|
+ location, params, month: params.get("month") ?? "", batch: params.get("batch") ?? "", page,
|
|
|
|
|
+ linkState: detailLinkState(location.pathname + location.search + location.hash, location.state),
|
|
|
|
|
+ setFilter, setPage: (next: number) => setFilter("page", next > 1 ? String(next) : ""),
|
|
|
|
|
+ reset: () => setParams({}, options),
|
|
|
|
|
+ };
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+/** 合伙人和运维团队使用本方快照接口。两张表分别使用当前筛选命中的总数分页。 */
|
|
|
|
|
+function useScopedLedger(kind: ScopedReconKind) {
|
|
|
|
|
+ const query = useLedgerQuery();
|
|
|
|
|
+ const { month, batch, page } = query;
|
|
|
|
|
+ const response = useViewFetch(
|
|
|
|
|
+ () => viewPartnerRecon({ month: month || undefined, keyword: batch || undefined, page: page - 1, page_size: PARTY_PAGE_SIZE }),
|
|
|
|
|
+ [kind, month, batch, page],
|
|
|
|
|
+ );
|
|
|
|
|
+ const fail: ViewFail | null = response.data?.snapshot_state === "not_ready" ? { kind: "snapshot" } : response.fail;
|
|
|
const filters = <>
|
|
const filters = <>
|
|
|
- <div className="ops-toolbar team-recon-toolbar">
|
|
|
|
|
- <label className="ops-search">
|
|
|
|
|
- <Search size={17} aria-hidden="true" />
|
|
|
|
|
- <Input
|
|
|
|
|
- aria-label="搜索对账单号或明细号"
|
|
|
|
|
- placeholder="搜索对账单号/明细号"
|
|
|
|
|
- value={keyword}
|
|
|
|
|
- onChange={(event) => { setKeyword(event.target.value); setPage(1); }}
|
|
|
|
|
- />
|
|
|
|
|
- {keyword && <button type="button" aria-label="清空搜索" onClick={() => { setKeyword(""); setPage(1); }}><X size={15} aria-hidden="true" /></button>}
|
|
|
|
|
- </label>
|
|
|
|
|
- {/* 合伙人视图的月份选项取接口返回的两表并集。 */}
|
|
|
|
|
- {teamView ? <MonthFilter
|
|
|
|
|
- value={month}
|
|
|
|
|
- onChange={(value) => { setMonth(value); setPage(1); }}
|
|
|
|
|
- /> : <FilterSelect
|
|
|
|
|
- icon="month"
|
|
|
|
|
- aria-label="自然月"
|
|
|
|
|
- value={month}
|
|
|
|
|
- disabled={!monthOptions}
|
|
|
|
|
- onChange={(event) => { setMonth(event.target.value); setPage(1); }}
|
|
|
|
|
- >
|
|
|
|
|
- <option value="">{ALL_PERIODS_LABEL}</option>
|
|
|
|
|
- {(monthOptions ?? (month ? [{ period: month }] : [])).map((o) => <option key={o.period} value={o.period}>{o.period}</option>)}
|
|
|
|
|
- </FilterSelect>}
|
|
|
|
|
- {(month !== defaultMonth || keyword) && <Button variant="ghost" size="sm" onClick={resetFilter}>重置筛选</Button>}
|
|
|
|
|
- {fetchState.loading && data && <span className="team-recon-filter-hint" role="status">
|
|
|
|
|
- <Info size={14} aria-hidden="true" />正在更新筛选结果…
|
|
|
|
|
- </span>}
|
|
|
|
|
- </div>
|
|
|
|
|
- {!teamView && <p className="ops-import-note" role="note">{VIEW_KEYWORD_FILTER_NOTE}</p>}
|
|
|
|
|
- {monthFallback && <p className="ops-import-note" role="status">{VIEW_MONTH_NO_BATCH}</p>}
|
|
|
|
|
- {!teamView && data?.month_options_truncated && <p className="ops-import-note" role="status">{viewMonthTruncated(monthOptions?.length ?? 0)}</p>}
|
|
|
|
|
- {!teamView && monthOptionsFailed && <p className="ops-import-note" role="status">{WORD_FETCH_FAILED}:月份选项暂不可用。</p>}
|
|
|
|
|
|
|
+ <PartySearch label="搜索对账单号或明细号" placeholder="搜索对账单号或明细号" value={batch} onChange={(value) => query.setFilter("batch", value)} />
|
|
|
|
|
+ <MonthFilter value={month} onChange={(value) => query.setFilter("month", value)} />
|
|
|
|
|
+ {(month || batch) && <Button variant="ghost" size="sm" onClick={query.reset}>重置筛选</Button>}
|
|
|
</>;
|
|
</>;
|
|
|
-
|
|
|
|
|
- return (
|
|
|
|
|
- <section className="ops-page reconcile-index team-recon-view">
|
|
|
|
|
- <header className="ops-heading statement-heading">
|
|
|
|
|
- <div>
|
|
|
|
|
- <h1>{title}</h1>
|
|
|
|
|
- <PageIntro>{teamView ? "按账期查看团队的对账批次、已出账明细和分成金额。" : "从每个账期的对账批次查到本方参与的结算和分成。"}</PageIntro>
|
|
|
|
|
- </div>
|
|
|
|
|
- </header>
|
|
|
|
|
- {notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
|
|
|
- {wiring && <p className="ops-import-note" role="status">{VIEW_WIRING_NOTE}</p>}
|
|
|
|
|
-
|
|
|
|
|
- <div className="ops-list-shell team-recon-filters">
|
|
|
|
|
- {showLedger && <ReconOverview title={CARD_SNAPSHOT_TITLE} month={month} reconDay={reconDay} payCycle={payCycle} settlementRule={settlementRule}>
|
|
|
|
|
- <div><dt>当前筛选分成合计</dt><dd className={wiring || data?.share_sum == null ? "is-unavailable" : undefined}>{shareTotal}</dd></div>
|
|
|
|
|
- <div><dt>本方全部分成合计</dt><dd className={wiring || data?.share_sum_all == null ? "is-unavailable" : undefined}>{wiring ? BACKEND_NOT_WIRED : moneyCell(data?.share_sum_all ?? null)}</dd></div>
|
|
|
|
|
- </ReconOverview>}
|
|
|
|
|
- {filters}
|
|
|
|
|
- </div>
|
|
|
|
|
- {fetchState.loading && !data && !fail && <p className="ops-list-shell team-recon-loading" role="status">正在读取对账数据…</p>}
|
|
|
|
|
-
|
|
|
|
|
- {/* 整页态:KLT-O20701(⛔ 重试)/KLT-O20703(筛选条保留,①—⑥ 全替换,⛔ 渲染空表)/KLT-P301。 */}
|
|
|
|
|
- {fail?.kind === "binding" && <FullPageState text={VIEW_BINDING_FAILED} />}
|
|
|
|
|
- {fail?.kind === "snapshot" && <FullPageState text={VIEW_SNAPSHOT_NOT_READY} retry={fetchState.reload} />}
|
|
|
|
|
- {snapshotNotReady && <FullPageState text={VIEW_SNAPSHOT_NOT_READY} retry={fetchState.reload} />}
|
|
|
|
|
- {fail?.kind === "forbidden" && <FullPageState text={VIEW_ROLE_FORBIDDEN} />}
|
|
|
|
|
- {fail?.kind === "param" && <FullPageState text={VIEW_FILTER_INCOMPLETE} />}
|
|
|
|
|
- {fail?.kind === "fail" && <FullPageState text={fail.message} retry={fetchState.reload} />}
|
|
|
|
|
-
|
|
|
|
|
- {showLedger && (
|
|
|
|
|
- <>
|
|
|
|
|
- {/* ⑤ 表 1 本方对账清单(出账状态与批次状态两维度两列并排)。 */}
|
|
|
|
|
- <div className="ops-list-shell team-recon-ledger">
|
|
|
|
|
- <header className="team-recon-ledger-heading">
|
|
|
|
|
- <h2 id="party-recon-batches">对账清单</h2>
|
|
|
|
|
- {!wiring && <span>共 {batchTotal},当前显示 {data?.batch_shown} 批</span>}
|
|
|
|
|
- </header>
|
|
|
|
|
- <div className="ops-table-wrap" role="region" aria-labelledby="party-recon-batches" tabIndex={0}>
|
|
|
|
|
- <table className="ops-table" aria-labelledby="party-recon-batches" aria-busy={fetchState.loading}>
|
|
|
|
|
- <OpsTableColumns widths={[210, 102, 112, 112, 100, 145, 286]} />
|
|
|
|
|
- <thead><tr><th scope="col">对账单号</th><th scope="col">自然月</th><th scope="col">出账状态</th><th scope="col">批次状态</th><th scope="col">明细条数</th><th scope="col">本方分成金额</th><th scope="col">操作</th></tr></thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {wiring ? (
|
|
|
|
|
- <tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
|
|
|
- ) : (
|
|
|
|
|
- batches.map((row: ViewReconBatchRow) => (
|
|
|
|
|
- <tr key={row.batch_no}>
|
|
|
|
|
- <td className="ops-mono" title={row.batch_no}>{row.batch_no}</td>
|
|
|
|
|
- <td>{row.period}</td>
|
|
|
|
|
- <td><OpsStatus tone={row.reconcile_status === "settled" ? "success" : row.reconcile_status === "abnormal" ? "danger" : "neutral"}>{RECONCILE_STATUS_TEXT[row.reconcile_status]}</OpsStatus></td>
|
|
|
|
|
- <td><OpsStatus tone={row.status === "executed" ? "success" : row.status === "failed" ? "danger" : "neutral"}>{BATCH_STATUS_TEXT[row.status]}</OpsStatus></td>
|
|
|
|
|
- <td className="table-number">{row.detail_count}</td>
|
|
|
|
|
- <td><strong className="reconcile-money table-number">{moneyFromCents(row.share_cents)}</strong></td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {/* 无明细 ⇒ 导出按钮整块不渲染(⚠️ 不是禁用,总则§16.9;KLT-H205xx 仅直调防护)。 */}
|
|
|
|
|
- {row.has_detail && (
|
|
|
|
|
- <button type="button" className="ops-table-action" onClick={() => exportBatch(row.batch_no)}>
|
|
|
|
|
- <Download size={14} aria-hidden="true" />导出明细
|
|
|
|
|
- </button>
|
|
|
|
|
- )}{" "}
|
|
|
|
|
- <button type="button" className="ops-table-action" onClick={() => drillBatch(row.batch_no)}>查看明细<ArrowDown size={14} aria-hidden="true" /></button>
|
|
|
|
|
- {kind === "partner" && <>{" "}<Link className="ops-table-action" to={partnerReconDetailPath(row.batch_no)} state={linkState}>查看详情<ArrowRight size={14} aria-hidden="true" /></Link></>}
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- ))
|
|
|
|
|
- )}
|
|
|
|
|
- {!wiring && !batches.length && (
|
|
|
|
|
- <OpsTableEmpty colSpan={7}>
|
|
|
|
|
- {VIEW_LIST_EMPTY}{!month && `;${VIEW_ALL_PERIODS_NOTE}`}
|
|
|
|
|
- </OpsTableEmpty>
|
|
|
|
|
- )}
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- {!wiring && (
|
|
|
|
|
- <ServerListPager
|
|
|
|
|
- total={data?.batch_total ?? 0}
|
|
|
|
|
- page={page}
|
|
|
|
|
- pageSize={pageSize}
|
|
|
|
|
- onPageChange={setPage}
|
|
|
|
|
- unit="批"
|
|
|
|
|
- />
|
|
|
|
|
- )}
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- {/* 账单明细由接口按已出账口径返回。 */}
|
|
|
|
|
- <div className="ops-list-shell team-recon-ledger team-recon-details" ref={detailRef} tabIndex={-1}>
|
|
|
|
|
- <header className="team-recon-ledger-heading">
|
|
|
|
|
- <h2 id="party-recon-bills">账单明细</h2>
|
|
|
|
|
- {!wiring && <span>共 {detailTotal},当前显示 {data?.detail_shown} 条</span>}
|
|
|
|
|
- </header>
|
|
|
|
|
- {!teamView && <p className="team-recon-ledger-note" role="note">{VIEW_DETAIL_ONLY_SETTLED}</p>}
|
|
|
|
|
- <div className="ops-table-wrap" role="region" aria-labelledby="party-recon-bills" tabIndex={0}>
|
|
|
|
|
- <table className="ops-table" aria-labelledby="party-recon-bills" aria-busy={fetchState.loading}>
|
|
|
|
|
- <OpsTableColumns widths={[200, 210, 155, 102, 138, 170, 126]} />
|
|
|
|
|
- <thead><tr><th scope="col">账单明细号</th><th scope="col">客户名称</th><th scope="col">应收单号</th><th scope="col">自然月</th><th scope="col">应结金额</th><th scope="col">对账单号</th><th scope="col">操作</th></tr></thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {wiring ? (
|
|
|
|
|
- <tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
|
|
|
- ) : (
|
|
|
|
|
- details.map((row: ViewBillDetailRow) => (
|
|
|
|
|
- <tr key={row.bill_detail_id}>
|
|
|
|
|
- <td className="ops-mono" title={row.bill_detail_id}>{row.bill_detail_id}</td>
|
|
|
|
|
- <td>
|
|
|
|
|
- {/* C76:当前归属≠我 ⇒ 纯文本无链接+「归属已变更」;teamLead 无客户详情页 ⇒ 恒纯文本。 */}
|
|
|
|
|
- {kind === "partner" && row.customer_visible ? (
|
|
|
|
|
- <Link className="table-cell-title team-recon-customer-link" to={`${prefix}/customer/${encodeURIComponent(row.customer_id)}`} state={linkState} title={row.customer_name}>{row.customer_name}</Link>
|
|
|
|
|
- ) : (
|
|
|
|
|
- <span className="table-cell-title" title={row.customer_name}>
|
|
|
|
|
- {row.customer_name}{!row.customer_visible && <OpsTag tone="neutral">{OWNERSHIP_CHANGED}</OpsTag>}
|
|
|
|
|
- </span>
|
|
|
|
|
- )}
|
|
|
|
|
- </td>
|
|
|
|
|
- <td className="ops-mono" title={row.receivable_no}>{row.receivable_no}</td>
|
|
|
|
|
- <td>{row.period}</td>
|
|
|
|
|
- <td><strong className="reconcile-money table-number">{moneyFromCents(row.receivable_cents)}</strong></td>
|
|
|
|
|
- <td className="ops-mono" title={row.batch_no}>{row.batch_no}</td>
|
|
|
|
|
- <td><Link className="ops-table-action" to={`${prefix}/bill-detail/${encodeURIComponent(row.bill_detail_id)}`} state={linkState}>查看详情<ArrowRight size={14} aria-hidden="true" /></Link></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- ))
|
|
|
|
|
- )}
|
|
|
|
|
- {!wiring && !details.length && (
|
|
|
|
|
- <OpsTableEmpty colSpan={7}>
|
|
|
|
|
- {VIEW_LIST_EMPTY}{!month && `;${VIEW_ALL_PERIODS_NOTE}`}
|
|
|
|
|
- </OpsTableEmpty>
|
|
|
|
|
- )}
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- </div>
|
|
|
|
|
- {!wiring && (
|
|
|
|
|
- <ServerListPager
|
|
|
|
|
- total={data?.detail_total ?? 0}
|
|
|
|
|
- page={page}
|
|
|
|
|
- pageSize={pageSize}
|
|
|
|
|
- onPageChange={setPage}
|
|
|
|
|
- />
|
|
|
|
|
- )}
|
|
|
|
|
- </div>
|
|
|
|
|
- </>
|
|
|
|
|
- )}
|
|
|
|
|
- </section>
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ return { ...query, data: fail ? null : response.data, state: { ...response, fail }, filters };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export function PartnerReconPage() {
|
|
|
|
|
- return <PartyReconMergedPage kind="partner" />;
|
|
|
|
|
|
|
+const scopedReconColumns = [
|
|
|
|
|
+ { label: "对账单号 / 自然月", width: 200 },
|
|
|
|
|
+ { label: "出账状态", width: 100 },
|
|
|
|
|
+ { label: "批次状态", width: 100 },
|
|
|
|
|
+ { label: "明细条数", width: 85, numeric: true },
|
|
|
|
|
+ { label: "本方分成金额", width: 126, numeric: true },
|
|
|
|
|
+] as const;
|
|
|
|
|
+
|
|
|
|
|
+export function ScopedReconPage({ kind }: { kind: ScopedReconKind }) {
|
|
|
|
|
+ const { data, state, filters, month, batch, page, setPage, linkState } = useScopedLedger(kind);
|
|
|
|
|
+ const [notice, setNotice] = useState("");
|
|
|
|
|
+ const exportBatch = useExportBatch(setNotice);
|
|
|
|
|
+ const config = data?.config;
|
|
|
|
|
+ const rule = data?.settle;
|
|
|
|
|
+ const prefix = kindPrefix(kind);
|
|
|
|
|
+
|
|
|
|
|
+ return <section className="ops-page reconcile-index page-fill page-fill-window">
|
|
|
|
|
+ <header className="ops-heading statement-heading"><div>
|
|
|
|
|
+ <h1>对账清单</h1>
|
|
|
|
|
+ <PageIntro>按账期核对本方分成金额,从对账批次查看对应的账单明细。</PageIntro>
|
|
|
|
|
+ </div></header>
|
|
|
|
|
+ {!state.fail && <div className="ops-list-shell" aria-busy={state.loading}>
|
|
|
|
|
+ <ReconOverview title="本方对账概况" month={month}
|
|
|
|
|
+ reconDay={!data ? "—" : !config ? BACKEND_NOT_WIRED : config.recon_day == null ? VIEW_CONFIG_UNSET : `每月 ${config.recon_day} 日`}
|
|
|
|
|
+ payCycle={!data ? "—" : config ? label(PAY_CYCLE, config.pay_cycle) || VIEW_DEFAULT_PAY_CYCLE : BACKEND_NOT_WIRED}
|
|
|
|
|
+ settlementRule={!data ? "—" : rule && (rule.mode != null || rule.value != null) ? settleTextFromSnapshot(rule.mode, rule.value) : WORD_UNCONFIGURED}>
|
|
|
|
|
+ <div><dt>当前筛选分成合计</dt><dd className={state.loading || data?.share_sum == null ? "is-unavailable" : undefined}>{state.loading ? "—" : moneyCell(data?.share_sum ?? null)}</dd></div>
|
|
|
|
|
+ <div><dt>本方全部分成合计</dt><dd className={data?.share_sum_all == null ? "is-unavailable" : undefined}>{!data ? "—" : moneyCell(data.share_sum_all)}</dd></div>
|
|
|
|
|
+ </ReconOverview>
|
|
|
|
|
+ </div>}
|
|
|
|
|
+ <PartyLedger title="对账清单" columns={scopedReconColumns} actionWidth={kind === "partner" ? 260 : 192} filters={filters} dataState={state}
|
|
|
|
|
+ total={data?.batch_shown ?? 0} page={page} setPage={setPage} unit="批" empty={month || batch ? "没有符合筛选条件的对账批次。" : "暂无对账批次。"}>
|
|
|
|
|
+ {data?.batches.map((row) => <tr key={row.batch_no}>
|
|
|
|
|
+ <td><span className="table-cell-title" title={row.batch_no}>{row.batch_no}</span><small>{row.period}</small></td>
|
|
|
|
|
+ <td><OpsStatus tone={row.reconcile_status === "settled" ? "success" : row.reconcile_status === "abnormal" ? "danger" : "neutral"}>{RECONCILE_STATUS_TEXT[row.reconcile_status]}</OpsStatus></td>
|
|
|
|
|
+ <td><OpsStatus tone={row.status === "executed" ? "success" : row.status === "failed" ? "danger" : "neutral"}>{BATCH_STATUS_TEXT[row.status]}</OpsStatus></td>
|
|
|
|
|
+ <td className="settlement-ledger-number"><span className="table-number">{row.detail_count}</span><span className="settlement-ledger-unit"> 条</span></td>
|
|
|
|
|
+ <td className="settlement-ledger-number"><span className="ops-money settlement-ledger-share">{moneyFromCents(row.share_cents)}</span></td>
|
|
|
|
|
+ <td className="settlement-ledger-action">
|
|
|
|
|
+ {row.has_detail && <button type="button" className="ops-table-action" onClick={() => exportBatch(row.batch_no)}><Download size={14} aria-hidden="true" />导出明细</button>}
|
|
|
|
|
+ <Link className="ops-table-action" to={`${prefix}/bill-detail?${new URLSearchParams({ batch: row.batch_no, month: row.period })}`} state={linkState}>查看明细<ArrowRight size={14} aria-hidden="true" /></Link>
|
|
|
|
|
+ {kind === "partner" && <Link className="ops-table-action" to={partnerReconDetailPath(row.batch_no)} state={linkState}>查看详情<ArrowRight size={14} aria-hidden="true" /></Link>}
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>)}
|
|
|
|
|
+ </PartyLedger>
|
|
|
|
|
+ {notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
|
|
|
+ </section>;
|
|
|
}
|
|
}
|
|
|
-export function TeamReconPage() {
|
|
|
|
|
- return <PartyReconMergedPage kind="team" />;
|
|
|
|
|
|
|
+
|
|
|
|
|
+const scopedBillColumns = [
|
|
|
|
|
+ { label: "客户 / 账单明细号", width: 205 },
|
|
|
|
|
+ { label: "应收单号", width: 160 },
|
|
|
|
|
+ { label: "自然月", width: 88 },
|
|
|
|
|
+ { label: "应结金额", width: 122, numeric: true },
|
|
|
|
|
+ { label: "对账单号", width: 170 },
|
|
|
|
|
+] as const;
|
|
|
|
|
+
|
|
|
|
|
+export function ScopedBillListPage({ kind }: { kind: ScopedReconKind }) {
|
|
|
|
|
+ const { data, state, filters, location, month, batch, page, setPage, linkState } = useScopedLedger(kind);
|
|
|
|
|
+ const prefix = kindPrefix(kind);
|
|
|
|
|
+ const listPath = `${prefix}/bill-detail`;
|
|
|
|
|
+ const back = detailBack(location.state, listPath, BACK_TO_BILL_DETAIL_LIST);
|
|
|
|
|
+ return <section className="ops-page reconcile-index page-fill page-fill-window">
|
|
|
|
|
+ {back.to !== listPath && <Link className="ops-back-link self-start" to={back.to} state={back.state}><ArrowLeft size={16} aria-hidden="true" />{back.label.replace(/^←\s*/, "")}</Link>}
|
|
|
|
|
+ <header className="ops-heading statement-heading"><div>
|
|
|
|
|
+ <h1>账单明细</h1>
|
|
|
|
|
+ <PageIntro>按账期查看本方已出账的应结金额,核对每笔明细对应的客户和对账单。</PageIntro>
|
|
|
|
|
+ </div></header>
|
|
|
|
|
+ <PartyLedger title="账单明细" columns={scopedBillColumns} filters={filters} dataState={state}
|
|
|
|
|
+ total={data?.detail_shown ?? 0} page={page} setPage={setPage} unit="条" empty={month || batch ? "没有符合筛选条件的账单明细。" : "暂无已出账的账单明细。"}>
|
|
|
|
|
+ {data?.details.map((row) => <tr key={row.bill_detail_id}>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ {kind === "partner" && row.customer_visible
|
|
|
|
|
+ ? <Link className="table-cell-title text-primary" to={`${prefix}/customer/${encodeURIComponent(row.customer_id)}`} state={linkState} title={row.customer_name}>{row.customer_name}</Link>
|
|
|
|
|
+ : <span className="table-cell-title" title={row.customer_name}>{row.customer_name}{!row.customer_visible && <OpsTag tone="neutral">{OWNERSHIP_CHANGED}</OpsTag>}</span>}
|
|
|
|
|
+ <small title={row.bill_detail_id}>{row.bill_detail_id}</small>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td className="ops-mono" title={row.receivable_no}>{row.receivable_no}</td>
|
|
|
|
|
+ <td>{row.period}</td>
|
|
|
|
|
+ <td className="settlement-ledger-number"><span className="ops-money settlement-ledger-share">{moneyFromCents(row.receivable_cents)}</span></td>
|
|
|
|
|
+ <td className="ops-mono" title={row.batch_no}>{row.batch_no}</td>
|
|
|
|
|
+ <td className="settlement-ledger-action"><Link className="ops-table-action" to={`${listPath}/${encodeURIComponent(row.bill_detail_id)}`} state={linkState}>详情<ArrowRight size={14} aria-hidden="true" /></Link></td>
|
|
|
|
|
+ </tr>)}
|
|
|
|
|
+ </PartyLedger>
|
|
|
|
|
+ </section>;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* ── V-P5 运营商「对账清单」 ── */
|
|
/* ── V-P5 运营商「对账清单」 ── */
|
|
@@ -601,21 +448,9 @@ const operatorBillColumns = [
|
|
|
] as const;
|
|
] as const;
|
|
|
|
|
|
|
|
export function OperatorBillDetailPage() {
|
|
export function OperatorBillDetailPage() {
|
|
|
- const location = useLocation();
|
|
|
|
|
- const [params, setParams] = useSearchParams();
|
|
|
|
|
- const month = params.get("month") ?? "";
|
|
|
|
|
- const batch = params.get("batch") ?? "";
|
|
|
|
|
|
|
+ const { location, params, month, batch, page, setFilter, setPage, reset, linkState } = useLedgerQuery();
|
|
|
const customer = params.get("customer") ?? "";
|
|
const customer = params.get("customer") ?? "";
|
|
|
- const page = Math.max(1, Number.parseInt(params.get("page") ?? "", 10) || 1);
|
|
|
|
|
const back = detailBack(location.state, "/bos/ov/bill-detail", BACK_TO_BILL_DETAIL_LIST);
|
|
const back = detailBack(location.state, "/bos/ov/bill-detail", BACK_TO_BILL_DETAIL_LIST);
|
|
|
- const linkState = detailLinkState(location.pathname + location.search + location.hash, location.state);
|
|
|
|
|
-
|
|
|
|
|
- function setFilter(key: "month" | "batch" | "customer" | "page", value: string) {
|
|
|
|
|
- const next = new URLSearchParams(params);
|
|
|
|
|
- if (value) next.set(key, value); else next.delete(key);
|
|
|
|
|
- if (key !== "page") next.delete("page");
|
|
|
|
|
- setParams(next, { replace: true, state: location.state });
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
const fetchState = useViewFetch(
|
|
const fetchState = useViewFetch(
|
|
|
() => billGetList({ page: page - 1, page_size: PARTY_PAGE_SIZE, period: month || undefined, keyword: batch.trim() || undefined, customer_kw: customer.trim() || undefined }),
|
|
() => billGetList({ page: page - 1, page_size: PARTY_PAGE_SIZE, period: month || undefined, keyword: batch.trim() || undefined, customer_kw: customer.trim() || undefined }),
|
|
@@ -626,7 +461,7 @@ export function OperatorBillDetailPage() {
|
|
|
<PartySearch label="搜索对账单号" placeholder="搜索对账单号" value={batch} onChange={(value) => setFilter("batch", value)} />
|
|
<PartySearch label="搜索对账单号" placeholder="搜索对账单号" value={batch} onChange={(value) => setFilter("batch", value)} />
|
|
|
<PartySearch label="搜索客户" placeholder="搜索客户名称" value={customer} onChange={(value) => setFilter("customer", value)} />
|
|
<PartySearch label="搜索客户" placeholder="搜索客户名称" value={customer} onChange={(value) => setFilter("customer", value)} />
|
|
|
<MonthFilter value={month} onChange={(value) => setFilter("month", value)} />
|
|
<MonthFilter value={month} onChange={(value) => setFilter("month", value)} />
|
|
|
- {filtered && <Button variant="ghost" size="sm" onClick={() => setParams({}, { replace: true, state: location.state })}>重置筛选</Button>}
|
|
|
|
|
|
|
+ {filtered && <Button variant="ghost" size="sm" onClick={reset}>重置筛选</Button>}
|
|
|
</>;
|
|
</>;
|
|
|
|
|
|
|
|
return <section className="ops-page reconcile-index page-fill page-fill-window">
|
|
return <section className="ops-page reconcile-index page-fill page-fill-window">
|
|
@@ -636,7 +471,7 @@ export function OperatorBillDetailPage() {
|
|
|
<PageIntro>按客户和订阅核对已出账的计费天数、分成基数及本方分成。</PageIntro>
|
|
<PageIntro>按客户和订阅核对已出账的计费天数、分成基数及本方分成。</PageIntro>
|
|
|
</div></header>
|
|
</div></header>
|
|
|
<PartyLedger title="账单明细" columns={operatorBillColumns} filters={filters} dataState={fetchState} total={fetchState.data?.total ?? 0}
|
|
<PartyLedger title="账单明细" columns={operatorBillColumns} filters={filters} dataState={fetchState} total={fetchState.data?.total ?? 0}
|
|
|
- page={page} setPage={(next) => setFilter("page", next > 1 ? String(next) : "")} unit="条" empty={filtered ? "没有符合筛选条件的账单明细。" : "暂无已出账的账单明细。"}>
|
|
|
|
|
|
|
+ page={page} setPage={setPage} unit="条" empty={filtered ? "没有符合筛选条件的账单明细。" : "暂无已出账的账单明细。"}>
|
|
|
{fetchState.data?.items.map((row) => <tr key={row.bill_detail_id}>
|
|
{fetchState.data?.items.map((row) => <tr key={row.bill_detail_id}>
|
|
|
<td><span className="table-cell-title" title={row.customer_name}>{row.customer_name}</span><small title={row.bill_detail_id}>{row.bill_detail_id}</small></td>
|
|
<td><span className="table-cell-title" title={row.customer_name}>{row.customer_name}</span><small title={row.bill_detail_id}>{row.bill_detail_id}</small></td>
|
|
|
<td title={row.subscription_label}>{row.subscription_label || <span className="table-placeholder">—</span>}</td>
|
|
<td title={row.subscription_label}>{row.subscription_label || <span className="table-placeholder">—</span>}</td>
|
|
@@ -874,11 +709,7 @@ function PartyContractDetail({ kind, id }: { kind: "partner" | "operator"; id: s
|
|
|
export function PartyBillDetailPage({ kind }: { kind: "operator" | "team" }) {
|
|
export function PartyBillDetailPage({ kind }: { kind: "operator" | "team" }) {
|
|
|
const { id = "" } = useParams();
|
|
const { id = "" } = useParams();
|
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
|
- const fallback =
|
|
|
|
|
- kind === "team"
|
|
|
|
|
- ? { to: "/bos/tv/recon", text: BACK_TO_SELF_RECON }
|
|
|
|
|
- : { to: "/bos/ov/bill-detail", text: BACK_TO_BILL_DETAIL_LIST };
|
|
|
|
|
- const back = detailBack(location.state, fallback.to, fallback.text);
|
|
|
|
|
|
|
+ const back = detailBack(location.state, `${kindPrefix(kind)}/bill-detail`, BACK_TO_BILL_DETAIL_LIST);
|
|
|
const fetchState = useViewFetch<BillDetailResult>(() => billGetDetail(id), [id]);
|
|
const fetchState = useViewFetch<BillDetailResult>(() => billGetDetail(id), [id]);
|
|
|
const { data, fail } = fetchState;
|
|
const { data, fail } = fetchState;
|
|
|
return (
|
|
return (
|