|
@@ -20,14 +20,14 @@
|
|
|
*/
|
|
*/
|
|
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
|
import { PageIntro } from "../components/PageIntro";
|
|
import { PageIntro } from "../components/PageIntro";
|
|
|
-import { Download, Search, X } from "lucide-react";
|
|
|
|
|
|
|
+import { ArrowDown, ArrowRight, Download, Info, Search, X } from "lucide-react";
|
|
|
import { Link, useLocation, useParams } from "react-router";
|
|
import { Link, useLocation, useParams } from "react-router";
|
|
|
import { detailBack, detailLinkState } from "../lib/detail-navigation";
|
|
import { detailBack, detailLinkState } from "../lib/detail-navigation";
|
|
|
import { ServerListPager } from "../components/ListPager";
|
|
import { ServerListPager } from "../components/ListPager";
|
|
|
import { Button } from "../components/ui/button";
|
|
import { Button } from "../components/ui/button";
|
|
|
import { Input } from "../components/ui/input";
|
|
import { Input } from "../components/ui/input";
|
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
import { FilterSelect } from "../components/ui/filter-select";
|
|
|
-import { OpsNotice, OpsStatus, OpsTableEmpty, OpsTag } from "../components/OperationsKit";
|
|
|
|
|
|
|
+import { OpsNotice, OpsStatus, OpsTableColumns, OpsTableEmpty, OpsTag } from "../components/OperationsKit";
|
|
|
import { Tri } from "../components/triState";
|
|
import { Tri } from "../components/triState";
|
|
|
import { CONTRACT_TYPE_LABEL } from "../domain/contract-draft";
|
|
import { CONTRACT_TYPE_LABEL } from "../domain/contract-draft";
|
|
|
import { hasBizCode } from "../lib/api/http";
|
|
import { hasBizCode } from "../lib/api/http";
|
|
@@ -188,6 +188,7 @@ function usePartyListReturn() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
|
|
+ const teamView = kind === "team";
|
|
|
const title = kind === "partner" ? "本运营区域对账" : "本方对账";
|
|
const title = kind === "partner" ? "本运营区域对账" : "本方对账";
|
|
|
const prefix = kindPrefix(kind);
|
|
const prefix = kindPrefix(kind);
|
|
|
const { saved, stateFor } = usePartyListReturn();
|
|
const { saved, stateFor } = usePartyListReturn();
|
|
@@ -227,6 +228,7 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
function drillBatch(batchNo: string) {
|
|
function drillBatch(batchNo: string) {
|
|
|
setKeyword(batchNo);
|
|
setKeyword(batchNo);
|
|
|
setPage(1);
|
|
setPage(1);
|
|
|
|
|
+ if (teamView) detailRef.current?.focus({ preventScroll: true });
|
|
|
detailRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
detailRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -234,52 +236,88 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
const settle = data?.settle ?? null;
|
|
const settle = data?.settle ?? null;
|
|
|
const batches = data?.batches ?? [];
|
|
const batches = data?.batches ?? [];
|
|
|
const details = data?.details ?? [];
|
|
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 allShares = wiring ? "—" : `本方全部合计 ${moneyCell(data?.share_sum_all ?? null)}`;
|
|
|
|
|
+ const showLedger = wiring || (data && !snapshotNotReady);
|
|
|
|
|
|
|
|
const pageSize = 20;
|
|
const pageSize = 20;
|
|
|
|
|
|
|
|
|
|
+ const filters = <>
|
|
|
|
|
+ <div className={teamView ? "ops-toolbar team-recon-toolbar" : "reconcile-filters"}>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ {/* 月份选项取接口返回的两表并集。 */}
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <Button variant="ghost" size="sm" onClick={resetFilter}>重置筛选</Button>
|
|
|
|
|
+ {teamView && <span className="team-recon-filter-hint" role={fetchState.loading && data ? "status" : "note"}>
|
|
|
|
|
+ <Info size={14} aria-hidden="true" />{fetchState.loading && data ? "正在更新筛选结果…" : VIEW_KEYWORD_FILTER_NOTE}
|
|
|
|
|
+ </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>}
|
|
|
|
|
+ {data?.month_options_truncated && <p className="ops-import-note" role="status">{viewMonthTruncated(monthOptions?.length ?? 0)}</p>}
|
|
|
|
|
+ {monthOptionsFailed && <p className="ops-import-note" role="status">{WORD_FETCH_FAILED}:月份选项暂不可用。</p>}
|
|
|
|
|
+ </>;
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
- <section className="ops-page reconcile-index page-fill">
|
|
|
|
|
- <header className="reconcile-page-heading">
|
|
|
|
|
|
|
+ <section className={`ops-page reconcile-index ${teamView ? "team-recon-view" : "page-fill"}`}>
|
|
|
|
|
+ <header className={teamView ? "ops-heading statement-heading" : "reconcile-page-heading"}>
|
|
|
<div>
|
|
<div>
|
|
|
- <p className="ops-eyebrow"><span /> READONLY / 只读视图</p>
|
|
|
|
|
|
|
+ {!teamView && <p className="ops-eyebrow"><span /> READONLY / 只读视图</p>}
|
|
|
<h1>{title}</h1>
|
|
<h1>{title}</h1>
|
|
|
- <PageIntro>从每个账期的对账批次查到本方参与的结算和分成。</PageIntro>
|
|
|
|
|
|
|
+ <PageIntro>{teamView ? "按账期查看团队的对账批次、已出账明细和分成金额。" : "从每个账期的对账批次查到本方参与的结算和分成。"}</PageIntro>
|
|
|
</div>
|
|
</div>
|
|
|
</header>
|
|
</header>
|
|
|
{notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
{notice && <OpsNotice message={notice} onClose={() => setNotice("")} />}
|
|
|
{wiring && <p className="ops-import-note" role="status">{VIEW_WIRING_NOTE}</p>}
|
|
{wiring && <p className="ops-import-note" role="status">{VIEW_WIRING_NOTE}</p>}
|
|
|
|
|
|
|
|
- {/* 一份筛选条,两表共用(视图§4.2 条 5);重置=清关键字+回默认预选 lastClosedMonth()。 */}
|
|
|
|
|
- <div className="reconcile-filters">
|
|
|
|
|
- <label className="ops-search">
|
|
|
|
|
- <Search size={17} />
|
|
|
|
|
- <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} /></button>}
|
|
|
|
|
- </label>
|
|
|
|
|
- {/* 月份选项=两表 distinct 并集(A52);failed/未接线 ⇒ 禁用下拉,⛔ 回落「近 12 个月」。 */}
|
|
|
|
|
- <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, has_batch: false, has_detail: false }] : [])).map((o) => (
|
|
|
|
|
- <option key={o.period} value={o.period}>{o.period}</option>
|
|
|
|
|
- ))}
|
|
|
|
|
- </FilterSelect>
|
|
|
|
|
- <Button variant="ghost" size="sm" onClick={resetFilter}>重置筛选</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <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>}
|
|
|
|
|
- {data?.month_options_truncated && <p className="ops-import-note" role="status">{viewMonthTruncated(monthOptions?.length ?? 0)}</p>}
|
|
|
|
|
- {monthOptionsFailed && <p className="ops-import-note" role="status">{WORD_FETCH_FAILED}:月份选项暂不可用。</p>}
|
|
|
|
|
|
|
+ {teamView && showLedger && <>
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <section className="team-recon-snapshot" aria-labelledby="team-recon-snapshot-title">
|
|
|
|
|
+ <header>
|
|
|
|
|
+ <h2 id="team-recon-snapshot-title">{CARD_SNAPSHOT_TITLE}</h2>
|
|
|
|
|
+ <span>账期 {month || ALL_PERIODS_LABEL}</span>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <div className="statement-totals">
|
|
|
|
|
+ <div data-total="share">
|
|
|
|
|
+ <span>本方分成合计</span>
|
|
|
|
|
+ <strong className={wiring || data?.share_sum == null ? "statement-total-empty" : undefined}>{shareTotal}</strong>
|
|
|
|
|
+ <small>{allShares}</small>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div><span>本方对账清单</span><strong>{batchTotal}</strong>{!wiring && <small>当前显示 {data?.batch_shown ?? 0} 批</small>}</div>
|
|
|
|
|
+ <div><span>本方账单明细</span><strong>{detailTotal}</strong>{!wiring && <small>当前显示 {data?.detail_shown ?? 0} 条</small>}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </>}
|
|
|
|
|
+ {teamView ? <div className="ops-list-shell team-recon-filters">{filters}</div> : filters}
|
|
|
|
|
+ {teamView && fetchState.loading && !data && !fail && <p className="ops-list-shell team-recon-loading" role="status">正在读取本方对账…</p>}
|
|
|
|
|
|
|
|
{/* 整页态:KLT-O20701(⛔ 重试)/KLT-O20703(筛选条保留,①—⑥ 全替换,⛔ 渲染空表)/KLT-P301。 */}
|
|
{/* 整页态:KLT-O20701(⛔ 重试)/KLT-O20703(筛选条保留,①—⑥ 全替换,⛔ 渲染空表)/KLT-P301。 */}
|
|
|
{fail?.kind === "binding" && <FullPageState text={VIEW_BINDING_FAILED} />}
|
|
{fail?.kind === "binding" && <FullPageState text={VIEW_BINDING_FAILED} />}
|
|
@@ -289,19 +327,20 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
{fail?.kind === "param" && <FullPageState text={VIEW_FILTER_INCOMPLETE} />}
|
|
{fail?.kind === "param" && <FullPageState text={VIEW_FILTER_INCOMPLETE} />}
|
|
|
{fail?.kind === "fail" && <FullPageState text={fail.message} retry={fetchState.reload} />}
|
|
{fail?.kind === "fail" && <FullPageState text={fail.message} retry={fetchState.reload} />}
|
|
|
|
|
|
|
|
- {(wiring || (data && !snapshotNotReady)) && (
|
|
|
|
|
|
|
+ {showLedger && (
|
|
|
<>
|
|
<>
|
|
|
|
|
+ {!teamView && <>
|
|
|
{/* ① 页顶配置卡(V6,当前):两格都给**生效的具体取值**(✅ 2026-11-18:
|
|
{/* ① 页顶配置卡(V6,当前):两格都给**生效的具体取值**(✅ 2026-11-18:
|
|
|
付款周期不再渲染「留空=跟随默认」——那不是取值),对账日缺失才回落原标题。 */}
|
|
付款周期不再渲染「留空=跟随默认」——那不是取值),对账日缺失才回落原标题。 */}
|
|
|
<div className="reconcile-totals" aria-label="本方对账配置">
|
|
<div className="reconcile-totals" aria-label="本方对账配置">
|
|
|
<div>
|
|
<div>
|
|
|
<span>本方对账日</span>
|
|
<span>本方对账日</span>
|
|
|
- <strong>{wiring ? BACKEND_NOT_WIRED : config ? (config.recon_day == null ? VIEW_CONFIG_UNSET : `每月 ${config.recon_day} 日`) : BACKEND_NOT_WIRED}</strong>
|
|
|
|
|
|
|
+ <strong>{reconDay}</strong>
|
|
|
<small>当前生效配置</small>
|
|
<small>当前生效配置</small>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span>付款周期</span>
|
|
<span>付款周期</span>
|
|
|
- <strong>{wiring ? BACKEND_NOT_WIRED : config ? (config.pay_cycle ?? VIEW_DEFAULT_PAY_CYCLE) : BACKEND_NOT_WIRED}</strong>
|
|
|
|
|
|
|
+ <strong>{payCycle}</strong>
|
|
|
<small>当前生效配置</small>
|
|
<small>当前生效配置</small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -310,12 +349,7 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
<div className="reconcile-totals" aria-label={CARD1_TITLE}>
|
|
<div className="reconcile-totals" aria-label={CARD1_TITLE}>
|
|
|
<div>
|
|
<div>
|
|
|
<span>{CARD1_TITLE}</span>
|
|
<span>{CARD1_TITLE}</span>
|
|
|
- <strong>
|
|
|
|
|
- {wiring ? <Tri tone="missing" text={BACKEND_NOT_WIRED} />
|
|
|
|
|
- : settle && (settle.mode != null || settle.value != null)
|
|
|
|
|
- ? settleTextFromSnapshot(settle.mode, settle.value)
|
|
|
|
|
- : WORD_UNCONFIGURED}
|
|
|
|
|
- </strong>
|
|
|
|
|
|
|
+ <strong>{settlementRule}</strong>
|
|
|
<small>档案现值,不按客户配</small>
|
|
<small>档案现值,不按客户配</small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -327,47 +361,50 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
<div className="reconcile-totals" aria-label={CARD_SNAPSHOT_TITLE}>
|
|
<div className="reconcile-totals" aria-label={CARD_SNAPSHOT_TITLE}>
|
|
|
<div>
|
|
<div>
|
|
|
<span>本方对账清单</span>
|
|
<span>本方对账清单</span>
|
|
|
- <strong>{wiring ? BACKEND_NOT_WIRED : `${data?.batch_total ?? 0} 批`}</strong>
|
|
|
|
|
|
|
+ <strong>{batchTotal}</strong>
|
|
|
<small>{wiring ? "—" : `当前显示 ${data?.batch_shown ?? 0} 批`}</small>
|
|
<small>{wiring ? "—" : `当前显示 ${data?.batch_shown ?? 0} 批`}</small>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span>本方账单明细</span>
|
|
<span>本方账单明细</span>
|
|
|
- <strong>{wiring ? BACKEND_NOT_WIRED : `${data?.detail_total ?? 0} 条`}</strong>
|
|
|
|
|
|
|
+ <strong>{detailTotal}</strong>
|
|
|
<small>{wiring ? "—" : `当前显示 ${data?.detail_shown ?? 0} 条`}</small>
|
|
<small>{wiring ? "—" : `当前显示 ${data?.detail_shown ?? 0} 条`}</small>
|
|
|
</div>
|
|
</div>
|
|
|
{/* ④ 卡 4:当前筛选合计+本方全部合计双值常驻(视图§4.2 条 7);null ⇒ 取数失败 ⛔ 显 ¥0。 */}
|
|
{/* ④ 卡 4:当前筛选合计+本方全部合计双值常驻(视图§4.2 条 7);null ⇒ 取数失败 ⛔ 显 ¥0。 */}
|
|
|
<div>
|
|
<div>
|
|
|
<span>本方分成合计</span>
|
|
<span>本方分成合计</span>
|
|
|
- <strong>{wiring ? BACKEND_NOT_WIRED : moneyCell(data?.share_sum ?? null)}</strong>
|
|
|
|
|
- <small>{wiring ? "—" : `本方全部合计 ${moneyCell(data?.share_sum_all ?? null)}`}</small>
|
|
|
|
|
|
|
+ <strong>{shareTotal}</strong>
|
|
|
|
|
+ <small>{allShares}</small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </>}
|
|
|
|
|
|
|
|
{/* ⑤ 表 1 本方对账清单(出账状态与批次状态两维度两列并排)。 */}
|
|
{/* ⑤ 表 1 本方对账清单(出账状态与批次状态两维度两列并排)。 */}
|
|
|
- <div className="reconcile-ledger list-shell-fill">
|
|
|
|
|
- <div className="ops-table-wrap">
|
|
|
|
|
- <table className="ops-table">
|
|
|
|
|
- <thead><tr><th>对账单号</th><th>自然月</th><th>出账状态</th><th>批次状态</th><th>明细条数</th><th>本方分成金额</th><th>操作</th></tr></thead>
|
|
|
|
|
|
|
+ <div className={teamView ? "ops-list-shell team-recon-ledger" : "reconcile-ledger list-shell-fill"}>
|
|
|
|
|
+ {teamView && <header className="team-recon-ledger-heading"><h2 id="team-recon-batches">对账清单</h2></header>}
|
|
|
|
|
+ <div className="ops-table-wrap" role={teamView ? "region" : undefined} aria-labelledby={teamView ? "team-recon-batches" : undefined} tabIndex={teamView ? 0 : undefined}>
|
|
|
|
|
+ <table className="ops-table" aria-labelledby={teamView ? "team-recon-batches" : undefined} aria-busy={teamView ? fetchState.loading : undefined}>
|
|
|
|
|
+ {teamView && <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>
|
|
<tbody>
|
|
|
{wiring ? (
|
|
{wiring ? (
|
|
|
<tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
<tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
|
) : (
|
|
) : (
|
|
|
batches.map((row: ViewReconBatchRow) => (
|
|
batches.map((row: ViewReconBatchRow) => (
|
|
|
<tr key={row.batch_no}>
|
|
<tr key={row.batch_no}>
|
|
|
- <td className="ops-mono">{row.batch_no}</td>
|
|
|
|
|
|
|
+ <td className="ops-mono" title={teamView ? row.batch_no : undefined}>{row.batch_no}</td>
|
|
|
<td>{row.period}</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.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><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 className="table-number">{row.detail_count}</td>
|
|
|
- <td><strong className="table-number">{moneyFromCents(row.share_cents)}</strong></td>
|
|
|
|
|
|
|
+ <td><strong className={teamView ? "reconcile-money table-number" : "table-number"}>{moneyFromCents(row.share_cents)}</strong></td>
|
|
|
<td>
|
|
<td>
|
|
|
{/* 无明细 ⇒ 导出按钮整块不渲染(⚠️ 不是禁用,总则§16.9;KLT-H205xx 仅直调防护)。 */}
|
|
{/* 无明细 ⇒ 导出按钮整块不渲染(⚠️ 不是禁用,总则§16.9;KLT-H205xx 仅直调防护)。 */}
|
|
|
{row.has_detail && (
|
|
{row.has_detail && (
|
|
|
<button type="button" className="ops-table-action" onClick={() => exportBatch(row.batch_no)}>
|
|
<button type="button" className="ops-table-action" onClick={() => exportBatch(row.batch_no)}>
|
|
|
- <Download size={13} /> 导出本批账单明细
|
|
|
|
|
|
|
+ <Download size={14} aria-hidden="true" /> 导出本批账单明细
|
|
|
</button>
|
|
</button>
|
|
|
)}{" "}
|
|
)}{" "}
|
|
|
- <button type="button" className="ops-table-action" onClick={() => drillBatch(row.batch_no)}>查看明细</button>
|
|
|
|
|
|
|
+ <button type="button" className="ops-table-action" onClick={() => drillBatch(row.batch_no)}>查看明细{teamView && <ArrowDown size={14} aria-hidden="true" />}</button>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
))
|
|
))
|
|
@@ -392,32 +429,38 @@ function PartyReconMergedPage({ kind }: { kind: "partner" | "team" }) {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{/* ⑥ 表 2 本方账单明细(A18:只列已出账明细;灰底提示必显)。 */}
|
|
{/* ⑥ 表 2 本方账单明细(A18:只列已出账明细;灰底提示必显)。 */}
|
|
|
- <div className="reconcile-ledger list-shell-fill" ref={detailRef}>
|
|
|
|
|
- <p className="ops-import-note" role="note">{VIEW_DETAIL_ONLY_SETTLED}</p>
|
|
|
|
|
- <div className="ops-table-wrap">
|
|
|
|
|
- <table className="ops-table">
|
|
|
|
|
- <thead><tr><th>账单明细号</th><th>客户名称</th><th>应收单号</th><th>自然月</th><th>应结金额</th><th>对账单号</th><th>操作</th></tr></thead>
|
|
|
|
|
|
|
+ <div className={teamView ? "ops-list-shell team-recon-ledger team-recon-details" : "reconcile-ledger list-shell-fill"} ref={detailRef} tabIndex={teamView ? -1 : undefined}>
|
|
|
|
|
+ {teamView ? <header className="team-recon-ledger-heading">
|
|
|
|
|
+ <h2 id="team-recon-bills">账单明细</h2>
|
|
|
|
|
+ <p className="team-recon-detail-note" role="note"><Info size={14} aria-hidden="true" />{VIEW_DETAIL_ONLY_SETTLED}</p>
|
|
|
|
|
+ </header> : <p className="ops-import-note" role="note">{VIEW_DETAIL_ONLY_SETTLED}</p>}
|
|
|
|
|
+ <div className="ops-table-wrap" role={teamView ? "region" : undefined} aria-labelledby={teamView ? "team-recon-bills" : undefined} tabIndex={teamView ? 0 : undefined}>
|
|
|
|
|
+ <table className="ops-table" aria-labelledby={teamView ? "team-recon-bills" : undefined} aria-busy={teamView ? fetchState.loading : undefined}>
|
|
|
|
|
+ {teamView && <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>
|
|
<tbody>
|
|
|
{wiring ? (
|
|
{wiring ? (
|
|
|
<tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
<tr><td colSpan={7}><Tri tone="missing" text={BACKEND_NOT_WIRED} /></td></tr>
|
|
|
) : (
|
|
) : (
|
|
|
details.map((row: ViewBillDetailRow) => (
|
|
details.map((row: ViewBillDetailRow) => (
|
|
|
<tr key={row.bill_detail_id}>
|
|
<tr key={row.bill_detail_id}>
|
|
|
- <td className="ops-mono">{row.bill_detail_id}</td>
|
|
|
|
|
|
|
+ <td className="ops-mono" title={teamView ? row.bill_detail_id : undefined}>{row.bill_detail_id}</td>
|
|
|
<td>
|
|
<td>
|
|
|
{/* C76:当前归属≠我 ⇒ 纯文本无链接+「归属已变更」;teamLead 无客户详情页 ⇒ 恒纯文本。 */}
|
|
{/* C76:当前归属≠我 ⇒ 纯文本无链接+「归属已变更」;teamLead 无客户详情页 ⇒ 恒纯文本。 */}
|
|
|
{kind === "partner" && row.customer_visible ? (
|
|
{kind === "partner" && row.customer_visible ? (
|
|
|
<Link className="workspace-link" to={`${prefix}/customer/${encodeURIComponent(row.customer_id)}`} state={linkState}>{row.customer_name}</Link>
|
|
<Link className="workspace-link" to={`${prefix}/customer/${encodeURIComponent(row.customer_id)}`} state={linkState}>{row.customer_name}</Link>
|
|
|
) : (
|
|
) : (
|
|
|
- <span>{row.customer_name}{!row.customer_visible && <OpsTag tone="neutral">{OWNERSHIP_CHANGED}</OpsTag>}</span>
|
|
|
|
|
|
|
+ <span className={teamView ? "table-cell-title" : undefined} title={teamView ? row.customer_name : undefined}>
|
|
|
|
|
+ {row.customer_name}{!row.customer_visible && <OpsTag tone="neutral">{OWNERSHIP_CHANGED}</OpsTag>}
|
|
|
|
|
+ </span>
|
|
|
)}
|
|
)}
|
|
|
</td>
|
|
</td>
|
|
|
- <td className="ops-mono">{row.receivable_no}</td>
|
|
|
|
|
|
|
+ <td className="ops-mono" title={teamView ? row.receivable_no : undefined}>{row.receivable_no}</td>
|
|
|
<td>{row.period}</td>
|
|
<td>{row.period}</td>
|
|
|
- <td><strong className="table-number">{moneyFromCents(row.receivable_cents)}</strong></td>
|
|
|
|
|
|
|
+ <td><strong className={teamView ? "reconcile-money table-number" : "table-number"}>{moneyFromCents(row.receivable_cents)}</strong></td>
|
|
|
{/* 批次详情宿主路由未在 14.1 路由表声明(仅 14.6 返回链路提及)⇒ 纯文本,缺口已登记。 */}
|
|
{/* 批次详情宿主路由未在 14.1 路由表声明(仅 14.6 返回链路提及)⇒ 纯文本,缺口已登记。 */}
|
|
|
- <td className="ops-mono">{row.batch_no}</td>
|
|
|
|
|
- <td><Link className="workspace-link" to={`${prefix}/bill-detail/${encodeURIComponent(row.bill_detail_id)}`} state={linkState}>查看详情</Link></td>
|
|
|
|
|
|
|
+ <td className="ops-mono" title={teamView ? row.batch_no : undefined}>{row.batch_no}</td>
|
|
|
|
|
+ <td><Link className={teamView ? "ops-table-action" : "workspace-link"} to={`${prefix}/bill-detail/${encodeURIComponent(row.bill_detail_id)}`} state={linkState}>查看详情{teamView && <ArrowRight size={14} aria-hidden="true" />}</Link></td>
|
|
|
</tr>
|
|
</tr>
|
|
|
))
|
|
))
|
|
|
)}
|
|
)}
|