|
@@ -191,6 +191,30 @@ function usePartyListReturn() {
|
|
|
return { location, saved, stateFor };
|
|
return { location, saved, stateFor };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function ReconOverview({ title, month, reconDay, payCycle, settlementRule, children }: {
|
|
|
|
|
+ title: string;
|
|
|
|
|
+ month: string;
|
|
|
|
|
+ reconDay: string;
|
|
|
|
|
+ payCycle: string;
|
|
|
|
|
+ settlementRule?: ReactNode;
|
|
|
|
|
+ children: ReactNode;
|
|
|
|
|
+}) {
|
|
|
|
|
+ return <div className="team-recon-overview">
|
|
|
|
|
+ <section className="team-recon-snapshot" aria-label={title}>
|
|
|
|
|
+ <header>
|
|
|
|
|
+ <h2>{title}</h2>
|
|
|
|
|
+ <span><CalendarDays size={13} aria-hidden="true" />{month || ALL_PERIODS_LABEL}</span>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <dl className="team-recon-amounts">{children}</dl>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <dl className="team-recon-config" aria-label="本方对账配置">
|
|
|
|
|
+ <div><dt>本方对账日</dt><dd>{reconDay}</dd></div>
|
|
|
|
|
+ <div><dt>付款周期</dt><dd>{payCycle}</dd></div>
|
|
|
|
|
+ {settlementRule != null && <div><dt>{CARD1_TITLE}</dt><dd>{settlementRule}</dd></div>}
|
|
|
|
|
+ </dl>
|
|
|
|
|
+ </div>;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
const teamView = kind === "team";
|
|
const teamView = kind === "team";
|
|
|
const title = kind === "partner" ? "本运营区域对账" : "本方对账";
|
|
const title = kind === "partner" ? "本运营区域对账" : "本方对账";
|
|
@@ -301,23 +325,10 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
{wiring && <p className="ops-import-note" role="status">{VIEW_WIRING_NOTE}</p>}
|
|
{wiring && <p className="ops-import-note" role="status">{VIEW_WIRING_NOTE}</p>}
|
|
|
|
|
|
|
|
<div className="ops-list-shell team-recon-filters">
|
|
<div className="ops-list-shell team-recon-filters">
|
|
|
- {showLedger && <div className="team-recon-overview">
|
|
|
|
|
- <section className="team-recon-snapshot" aria-labelledby="team-recon-snapshot-title">
|
|
|
|
|
- <header>
|
|
|
|
|
- <h2 id="team-recon-snapshot-title">{CARD_SNAPSHOT_TITLE}</h2>
|
|
|
|
|
- <span><CalendarDays size={13} aria-hidden="true" />{month || ALL_PERIODS_LABEL}</span>
|
|
|
|
|
- </header>
|
|
|
|
|
- <dl className="team-recon-amounts">
|
|
|
|
|
- <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>
|
|
|
|
|
- </dl>
|
|
|
|
|
- </section>
|
|
|
|
|
- <dl className="team-recon-config" aria-label="本方对账配置">
|
|
|
|
|
- <div><dt>本方对账日</dt><dd>{reconDay}</dd></div>
|
|
|
|
|
- <div><dt>付款周期</dt><dd>{payCycle}</dd></div>
|
|
|
|
|
- <div><dt>{CARD1_TITLE}</dt><dd>{settlementRule}</dd></div>
|
|
|
|
|
- </dl>
|
|
|
|
|
- </div>}
|
|
|
|
|
|
|
+ {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}
|
|
{filters}
|
|
|
</div>
|
|
</div>
|
|
|
{fetchState.loading && !data && !fail && <p className="ops-list-shell team-recon-loading" role="status">正在读取对账数据…</p>}
|
|
{fetchState.loading && !data && !fail && <p className="ops-list-shell team-recon-loading" role="status">正在读取对账数据…</p>}
|
|
@@ -545,26 +556,14 @@ export function OperatorReconPage() {
|
|
|
<h1>对账清单</h1>
|
|
<h1>对账清单</h1>
|
|
|
<PageIntro>按账期核对本方出账进度、分成金额和批次明细。</PageIntro>
|
|
<PageIntro>按账期核对本方出账进度、分成金额和批次明细。</PageIntro>
|
|
|
</div></header>
|
|
</div></header>
|
|
|
- {!fetchState.fail && <section className="ops-list-shell operator-recon-overview" aria-label="本方对账概况" aria-busy={fetchState.loading}>
|
|
|
|
|
- <dl className="operator-recon-metrics">
|
|
|
|
|
- <div className="operator-recon-share">
|
|
|
|
|
- <dt>本方分成合计 <span className="operator-recon-period"><CalendarDays size={13} aria-hidden="true" />{month || ALL_PERIODS_LABEL}</span></dt>
|
|
|
|
|
- <dd className={share == null || fetchState.loading ? "is-unavailable" : undefined}>{fetchState.loading ? "—" : moneyCell(share)}</dd>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <dt>对账批次</dt>
|
|
|
|
|
- <dd>{fetchState.loading ? "—" : data?.total.toLocaleString("zh-CN")}{!fetchState.loading && data && <small>批</small>}</dd>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <dt>本方对账日</dt>
|
|
|
|
|
- <dd>{!data ? "—" : config?.recon_day != null ? `每月 ${config.recon_day} 日` : VIEW_CONFIG_UNSET}</dd>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <dt>付款周期</dt>
|
|
|
|
|
- <dd>{!data ? "—" : config?.pay_cycle ? label(PAY_CYCLE, config.pay_cycle) : VIEW_DEFAULT_PAY_CYCLE}</dd>
|
|
|
|
|
- </div>
|
|
|
|
|
- </dl>
|
|
|
|
|
- </section>}
|
|
|
|
|
|
|
+ {!fetchState.fail && <div className="ops-list-shell" aria-busy={fetchState.loading}>
|
|
|
|
|
+ <ReconOverview title="本方对账概况" month={month}
|
|
|
|
|
+ reconDay={!data ? "—" : config?.recon_day != null ? `每月 ${config.recon_day} 日` : VIEW_CONFIG_UNSET}
|
|
|
|
|
+ payCycle={!data ? "—" : config?.pay_cycle ? label(PAY_CYCLE, config.pay_cycle) : VIEW_DEFAULT_PAY_CYCLE}>
|
|
|
|
|
+ <div><dt>当前筛选分成合计</dt><dd className={share == null || fetchState.loading ? "is-unavailable" : undefined}>{fetchState.loading ? "—" : moneyCell(share)}</dd></div>
|
|
|
|
|
+ <div><dt>对账批次</dt><dd>{fetchState.loading || !data ? "—" : `${data.total.toLocaleString("zh-CN")} 批`}</dd></div>
|
|
|
|
|
+ </ReconOverview>
|
|
|
|
|
+ </div>}
|
|
|
<PartyLedger title="对账清单" columns={operatorReconColumns} actionWidth={192} filters={filters} dataState={fetchState}
|
|
<PartyLedger title="对账清单" columns={operatorReconColumns} actionWidth={192} filters={filters} dataState={fetchState}
|
|
|
total={data?.total ?? 0} page={page} setPage={setPage} unit="批" empty={filtered ? "没有符合筛选条件的对账批次。" : "暂无对账批次。"}>
|
|
total={data?.total ?? 0} page={page} setPage={setPage} unit="批" empty={filtered ? "没有符合筛选条件的对账批次。" : "暂无对账批次。"}>
|
|
|
{data?.items.map((row) => {
|
|
{data?.items.map((row) => {
|