|
|
@@ -1,24 +1,24 @@
|
|
|
import { useEffect, useMemo, useRef, useState, type KeyboardEvent } from "react";
|
|
|
import { ArrowLeft, Plus, Trash2, Upload, X } from "lucide-react";
|
|
|
import { FetchError } from "../components/fetchError";
|
|
|
-import { useNavigate, useParams } from "react-router";
|
|
|
+import { useNavigate, useParams, useSearchParams } from "react-router";
|
|
|
import { Button } from "../components/ui/button";
|
|
|
import { Input } from "../components/ui/input";
|
|
|
import { TreeSelect } from "../components/ui/tree-select";
|
|
|
import { CustomerTeamSelect } from "../components/CustomerTeamSelect";
|
|
|
import { contractRawByParam } from "../lib/contract-demo";
|
|
|
-import { contractAttachmentDiscard, contractCreate, contractCustomerLookup, contractUpdate, rowsOf, subscriptionReplacementCandidates } from "../lib/api/bos";
|
|
|
+import { contractAttachmentDiscard, contractCreate, contractCustomerLookup, contractGet, contractGetList, contractUpdate, rowsOf, subscriptionReplacementCandidates } from "../lib/api/bos";
|
|
|
import { ApiError } from "../lib/api/http";
|
|
|
import { OPTIONS, label, PAY_CYCLE, SUBJECT_TYPE, USE_CATEGORY } from "../lib/api/labels";
|
|
|
import { WORD_UNCONFIGURED } from "../lib/api/lockedCopy";
|
|
|
import { Tri } from "../components/triState";
|
|
|
-import { useCatalogPlans, useIpBandwidthTiers, useLineExits } from "../lib/package-catalog";
|
|
|
-import { centsToYuanText, IP_BANDWIDTH_TIERS, IP_COUNT_MAX, IP_TIER_UNCOMMITTED, LINE_EXIT_MAX } from "../domain/contract-items";
|
|
|
-import type { ContractMissing, ContractRequiredKey, IpRowDraft } from "../domain/contract-items";
|
|
|
-import { REQUIRED_KEY_BY_DRAFT, buildContractWrite, draftFromRow, emptyDraft, emptyItem, emptyIpRow, firstItemExit, resolveReplacementSelection, type ContractDraft as Draft, type ItemDraft } from "../domain/contract-draft";
|
|
|
+import { useCatalogPlans, useLineExits } from "../lib/package-catalog";
|
|
|
+import { centsToYuanText, LINE_EXIT_MAX } from "../domain/contract-items";
|
|
|
+import type { ContractMissing, ContractRequiredKey } from "../domain/contract-items";
|
|
|
+import { REQUIRED_KEY_BY_DRAFT, buildContractWrite, businessToday, contractEndFromCycle, draftFromRow, emptyDraft, emptyItem, renewalPrefill, resolveReplacementSelection, type ContractDraft as Draft, type ItemDraft } from "../domain/contract-draft";
|
|
|
import { regionTreeNodes } from "../lib/region-tree";
|
|
|
import { useOrganizationData } from "../lib/organization-demo";
|
|
|
-import type { ContractCreateResult, ContractReplacementResult, ReplacementCandidate } from "../lib/api/types";
|
|
|
+import type { ContractCreateResult, ContractReplacementResult, ReplacementCandidate, ReplacementSkipped } from "../lib/api/types";
|
|
|
import { uploadContractAttachment, uploadCustomerLicense, type UploadedObject } from "../lib/api/oss-upload";
|
|
|
import { contractAttachmentLabel } from "../lib/contract-attachments";
|
|
|
import { useLoad } from "../lib/useLoad";
|
|
|
@@ -32,9 +32,18 @@ import "../styles/operations.css";
|
|
|
* 检索词去空白后才作为依赖 ⇒ 尾部空格/前后空白变动不触发重取。
|
|
|
*/
|
|
|
/** 单条条目的替换候选探测状态(`loading` 时⛔ 允许提交,避免用到没比对完的结论)。 */
|
|
|
-type ReplacementProbe = { loading: boolean; error: string; candidates: ReplacementCandidate[] };
|
|
|
+type ReplacementProbe = { loading: boolean; error: string; candidates: ReplacementCandidate[]; skipped: ReplacementSkipped[] };
|
|
|
|
|
|
-const CUSTOMER_LOOKUP_DEBOUNCE_MS = 300;function useCustomerCandidates(term: string) {
|
|
|
+const CUSTOMER_LOOKUP_DEBOUNCE_MS = 300;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 续签源下拉的选项文案(合同号 · 期间 · 金额)。深链续签(`?renew=`)也要用同一句,
|
|
|
+ * 否则列表没回这份合同时下拉会空着、看不出带了哪一份。
|
|
|
+ */
|
|
|
+const renewalOptionLabel = (row: { contract_no: string; start_date?: string | null; end_date?: string | null; contract_amount_cents?: number | null }) =>
|
|
|
+ [row.contract_no, row.start_date && row.end_date ? `${row.start_date} 至 ${row.end_date}` : null, `¥${centsToYuanText(row.contract_amount_cents ?? 0)}`].filter(Boolean).join(" · ");
|
|
|
+
|
|
|
+function useCustomerCandidates(term: string) {
|
|
|
const [debounced, setDebounced] = useState(term);
|
|
|
useEffect(() => {
|
|
|
const timer = window.setTimeout(() => setDebounced(term), CUSTOMER_LOOKUP_DEBOUNCE_MS);
|
|
|
@@ -54,33 +63,32 @@ const CUSTOMER_LOOKUP_DEBOUNCE_MS = 300;function useCustomerCandidates(term: str
|
|
|
export function ContractEditorPage() {
|
|
|
const { no } = useParams();
|
|
|
const navigate = useNavigate();
|
|
|
+ const [searchParams] = useSearchParams();
|
|
|
const identity = useDemoIdentity();
|
|
|
const editing = Boolean(no);
|
|
|
const catalog = useCatalogPlans();
|
|
|
const plans = useMemo(() => rowsOf(catalog.data?.items), [catalog.data]);
|
|
|
- /** 线路出口目录(套餐配置统一维护):合同条目与 IP 条目只从这里选(2026-11-15 裁定)。 */
|
|
|
+ /** 线路出口目录(套餐配置统一维护):合同条目只从这里选(2026-11-15 裁定)。 */
|
|
|
const exitCatalog = useLineExits();
|
|
|
- /** 带宽档位目录(2026-11-16 起可配置):IP 条目的档位只从这里选。 */
|
|
|
- const tierCatalog = useIpBandwidthTiers();
|
|
|
- const tierOptions = useMemo(() => {
|
|
|
- const items = tierCatalog.data?.items ?? [];
|
|
|
- if (items.length) {
|
|
|
- return items.map((item) => ({
|
|
|
- value: item.bandwidth_tier_mbps === null ? IP_TIER_UNCOMMITTED : String(item.bandwidth_tier_mbps),
|
|
|
- label: item.tier_name,
|
|
|
- }));
|
|
|
- }
|
|
|
- return [
|
|
|
- ...IP_BANDWIDTH_TIERS.map((tier) => ({ value: String(tier), label: `${tier} 兆` })),
|
|
|
- { value: IP_TIER_UNCOMMITTED, label: "不承诺带宽" },
|
|
|
- ];
|
|
|
- }, [tierCatalog.data]);
|
|
|
- const tierValues = useMemo(() => tierOptions.map((option) => option.value), [tierOptions]);
|
|
|
const record = useLoad(() => contractRawByParam(no), [no]);
|
|
|
- const [draft, setDraft] = useState<Draft>(emptyDraft);
|
|
|
+ /**
|
|
|
+ * 新建态草稿:**交接单日期默认录入当日**(2026-11-17 定案;`Asia/Shanghai` 业务日,
|
|
|
+ * 编辑态恒以库里的值为准,⛔ 拿今天覆盖已记录的历史交接单)。
|
|
|
+ */
|
|
|
+ const [draft, setDraft] = useState<Draft>(() => ({ ...emptyDraft(), handoverOn: businessToday() }));
|
|
|
const [customerId, setCustomerId] = useState<string | null>(null);
|
|
|
/** 逐条替换候选(0 基条目下标 → 探测结果):仅新建态、已选客户、条目档位/分类与出口齐全时请求。 */
|
|
|
const [replacementProbes, setReplacementProbes] = useState<Record<number, ReplacementProbe>>({});
|
|
|
+ /**
|
|
|
+ * 续签自哪份旧合同(2026-11-17 定案):选中即把旧合同的金额/账期/服务条目/经办人
|
|
|
+ * 带进本表单,并把本合同标记为「续签」——提交时带 `renew_from_contract_id`,后端为每个条目
|
|
|
+ * 各生成一份**不带替换边**的新订阅(期间不重叠 ⇒ ⛔ 截原、⛔ 第七类工单)。
|
|
|
+ */
|
|
|
+ const [renewFrom, setRenewFrom] = useState("");
|
|
|
+ const [renewLoading, setRenewLoading] = useState(false);
|
|
|
+ const [renewError, setRenewError] = useState("");
|
|
|
+ /** 深链续签源的展示文案:客户合同列表没返回这份合同时,下拉仍显示成已选而不是空着。 */
|
|
|
+ const [renewSourceLabel, setRenewSourceLabel] = useState("");
|
|
|
/** 手动重试探测(请求失败时给一个「重新比对」入口)。 */
|
|
|
const [replacementTick, setReplacementTick] = useState(0);
|
|
|
const [customerTerm, setCustomerTerm] = useState("");
|
|
|
@@ -97,7 +105,7 @@ export function ContractEditorPage() {
|
|
|
* `index` 与 `service_items` 0 基下标对齐。
|
|
|
*/
|
|
|
const replacementSpecs = useMemo(() => {
|
|
|
- if (editing || !customerId) return [];
|
|
|
+ if (editing || !customerId || renewFrom) return [];
|
|
|
return draft.items.flatMap((item, index) => {
|
|
|
if (item.exits.length !== 1) return [];
|
|
|
const ready = item.kind === "plan_based" ? Boolean(item.planId) : Boolean(item.useCategory);
|
|
|
@@ -109,13 +117,17 @@ export function ContractEditorPage() {
|
|
|
line_exits: item.exits,
|
|
|
}];
|
|
|
});
|
|
|
- }, [editing, customerId, draft.items]);
|
|
|
- const replacementKey = JSON.stringify(replacementSpecs);
|
|
|
+ }, [editing, customerId, renewFrom, draft.items]);
|
|
|
+ /**
|
|
|
+ * 探测口的缓存键:条目规格 + **新合同期间**(2026-11-17)。期间是「替换 vs 到期续签」的
|
|
|
+ * 唯一判据 ⇒ 改了生效日/结束日必须重探,否则前端还挂着按旧期间选中的替换关系。
|
|
|
+ */
|
|
|
+ const replacementKey = JSON.stringify({ specs: replacementSpecs, start: draft.start, end: draft.end });
|
|
|
const replacementSpecsRef = useRef(replacementSpecs);
|
|
|
replacementSpecsRef.current = replacementSpecs;
|
|
|
useEffect(() => {
|
|
|
const specs = replacementSpecsRef.current;
|
|
|
- if (!replacementKey || !customerId) {
|
|
|
+ if (!replacementKey || !customerId || !specs.length) {
|
|
|
setReplacementProbes((current) => (Object.keys(current).length ? {} : current));
|
|
|
return;
|
|
|
}
|
|
|
@@ -123,16 +135,21 @@ export function ContractEditorPage() {
|
|
|
setReplacementProbes((current) => {
|
|
|
const next: Record<number, ReplacementProbe> = {};
|
|
|
for (const spec of specs) {
|
|
|
- next[spec.index] = { loading: true, error: "", candidates: current[spec.index]?.candidates ?? [] };
|
|
|
+ next[spec.index] = { loading: true, error: "", candidates: current[spec.index]?.candidates ?? [], skipped: current[spec.index]?.skipped ?? [] };
|
|
|
}
|
|
|
return next;
|
|
|
});
|
|
|
- void subscriptionReplacementCandidates({ customer_id: customerId, probes: specs })
|
|
|
+ void subscriptionReplacementCandidates({
|
|
|
+ customer_id: customerId,
|
|
|
+ ...(draft.start ? { start_date: draft.start } : {}),
|
|
|
+ ...(draft.end ? { end_date: draft.end } : {}),
|
|
|
+ probes: specs,
|
|
|
+ })
|
|
|
.then((res) => {
|
|
|
if (!alive) return;
|
|
|
const next: Record<number, ReplacementProbe> = {};
|
|
|
for (const probe of res.probes ?? []) {
|
|
|
- next[probe.index] = { loading: false, error: "", candidates: probe.candidates ?? [] };
|
|
|
+ next[probe.index] = { loading: false, error: "", candidates: probe.candidates ?? [], skipped: probe.skipped ?? [] };
|
|
|
}
|
|
|
setReplacementProbes(next);
|
|
|
})
|
|
|
@@ -140,12 +157,14 @@ export function ContractEditorPage() {
|
|
|
if (!alive) return;
|
|
|
const message = e instanceof ApiError ? e.message : "替换候选查询失败,可点「重新比对」重试。";
|
|
|
const failed: Record<number, ReplacementProbe> = {};
|
|
|
- for (const spec of specs) failed[spec.index] = { loading: false, error: message, candidates: [] };
|
|
|
+ for (const spec of specs) failed[spec.index] = { loading: false, error: message, candidates: [], skipped: [] };
|
|
|
setReplacementProbes(failed);
|
|
|
});
|
|
|
return () => {
|
|
|
alive = false;
|
|
|
};
|
|
|
+ // `draft.start`/`draft.end` 已经进 `replacementKey`,此处不重复列依赖。
|
|
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
}, [replacementKey, customerId, replacementTick]);
|
|
|
/**
|
|
|
* 候选 → 草稿:0 个=不替换;1 个=自动选中(用户可「改为按新订阅开通」);
|
|
|
@@ -176,6 +195,110 @@ export function ContractEditorPage() {
|
|
|
});
|
|
|
}, [replacementProbes, editing]);
|
|
|
const replacementBusy = Object.values(replacementProbes).some((probe) => probe.loading);
|
|
|
+ /**
|
|
|
+ * 续签候选=该客户名下已有的合同(2026-11-17 定案):只在新签态、且已选客户(含新建客户
|
|
|
+ * 的 inline 分支不给客户号 ⇒ 无续签源)时取;口径是「同客户的合同」,⛔ 跨客户。
|
|
|
+ *
|
|
|
+ * ⚠️ `page` 是 **0 基**(总则「前后端统一 0 基索引」,后端 `PageQuery::offset = page × size`):
|
|
|
+ * 传 `1` 会直接跳过前 50 条 ⇒ 客户合同不足 51 份时下拉恒空(2026-11-17 实测缺陷)。
|
|
|
+ */
|
|
|
+ const renewalList = useLoad(
|
|
|
+ () =>
|
|
|
+ editing || !customerId
|
|
|
+ ? Promise.resolve(null)
|
|
|
+ : contractGetList({ customer_id: customerId, page: 0, page_size: 200 }),
|
|
|
+ [editing, customerId],
|
|
|
+ );
|
|
|
+ const renewalOptions = useMemo(
|
|
|
+ () => rowsOf(renewalList.data?.items).filter((row) => Boolean(row.contract_id)),
|
|
|
+ [renewalList.data],
|
|
|
+ );
|
|
|
+ /**
|
|
|
+ * 选中续签源 ⇒ 读旧合同全文,把金额/账期/服务条目/经办人带进草稿,
|
|
|
+ * 并**推算新的合同生效日**(旧止期次日,不早于业务当天;见 `renewalStartOf`)。
|
|
|
+ *
|
|
|
+ * ⛔ 照抄旧合同的起止日与编号:续签是**新合同**(新号、新期间),照抄起止日会让新旧期间
|
|
|
+ * 重叠,后端按「替换」截原并出第七类工单,与续签语义相反。**不带替换关系**;条目
|
|
|
+ * `item_id` 由 `renewalPrefill` 清空。
|
|
|
+ */
|
|
|
+ const pickRenewal = async (contractId: string) => {
|
|
|
+ setRenewFrom(contractId);
|
|
|
+ setRenewError("");
|
|
|
+ setRenewSourceLabel("");
|
|
|
+ if (!contractId) return;
|
|
|
+ setRenewLoading(true);
|
|
|
+ try {
|
|
|
+ const row = await contractGet({ contract_id: contractId });
|
|
|
+ const prefill = renewalPrefill(row);
|
|
|
+ if (!prefill) {
|
|
|
+ setRenewError("旧合同读不到服务条目,无法续签带入;请改用手工录入。");
|
|
|
+ setRenewFrom("");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ setRenewSourceLabel(renewalOptionLabel(row));
|
|
|
+ setDraft((current) => {
|
|
|
+ const next = { ...current, ...prefill };
|
|
|
+ /** 账期被带出后结束日跟着重算(结束日恒由生效日+付款周期推算)。 */
|
|
|
+ next.end = contractEndFromCycle(next.start, next.payCycle);
|
|
|
+ return next;
|
|
|
+ });
|
|
|
+ /** 续签=按新订阅开通:清掉可能残留的替换选择与探测结果。 */
|
|
|
+ setReplacementProbes({});
|
|
|
+ setError("");
|
|
|
+ } catch (e) {
|
|
|
+ setRenewError(e instanceof ApiError ? e.message : "读取旧合同失败,请重试。");
|
|
|
+ setRenewFrom("");
|
|
|
+ } finally {
|
|
|
+ setRenewLoading(false);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ /**
|
|
|
+ * 快到期合同「一键续签」的落地口(2026-11-17 四轮):合同管理列表的行内「续签」带
|
|
|
+ * `?renew=<contract_id>` 跳进来 ⇒ 这里把客户、金额/账期/服务条目/经办人与**新的合同
|
|
|
+ * 生效日**一次带齐(数据来源与下拉续签同一枚 `renewalPrefill`,⛔ 第二套带入逻辑)。
|
|
|
+ *
|
|
|
+ * 带完即把 URL 上的参数换成 `?renew=` 的清理版本,刷新不会再带一次(否则用户改过表单后
|
|
|
+ * 一刷新就被旧合同覆盖)。⚠️ 只在**新建态**生效:编辑合同不受理续签(`KLT-L222`)。
|
|
|
+ */
|
|
|
+ const renewParam = editing ? "" : (searchParams.get("renew") ?? "").trim();
|
|
|
+ const renewSeeded = useRef("");
|
|
|
+ useEffect(() => {
|
|
|
+ if (!renewParam || renewSeeded.current === renewParam) return;
|
|
|
+ renewSeeded.current = renewParam;
|
|
|
+ void (async () => {
|
|
|
+ setRenewLoading(true);
|
|
|
+ try {
|
|
|
+ const row = await contractGet({ contract_id: renewParam });
|
|
|
+ const prefill = renewalPrefill(row);
|
|
|
+ if (!prefill) {
|
|
|
+ setRenewError("旧合同读不到服务条目,无法续签带入;请改用手工录入。");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const cid = row?.customer_id ?? "";
|
|
|
+ if (cid) {
|
|
|
+ setCustomerId(cid);
|
|
|
+ setCustomerTerm(row?.customer_name || cid);
|
|
|
+ }
|
|
|
+ setRenewFrom(renewParam);
|
|
|
+ setRenewSourceLabel(renewalOptionLabel(row));
|
|
|
+ setDraft((current) => {
|
|
|
+ const next = { ...current, ...prefill };
|
|
|
+ next.end = contractEndFromCycle(next.start, next.payCycle);
|
|
|
+ return next;
|
|
|
+ });
|
|
|
+ setReplacementProbes({});
|
|
|
+ setError("");
|
|
|
+ setRenewError("");
|
|
|
+ navigate("/contracts/new", { replace: true });
|
|
|
+ } catch (e) {
|
|
|
+ setRenewError(e instanceof ApiError ? e.message : "读取旧合同失败,请重试。");
|
|
|
+ } finally {
|
|
|
+ setRenewLoading(false);
|
|
|
+ }
|
|
|
+ })();
|
|
|
+ // `navigate`/setters 都是稳定引用,只在带进来的合同号变化时重跑。
|
|
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
+ }, [renewParam]);
|
|
|
/**
|
|
|
* 合同附件(单份,2026-11-16 定案):选中即直传平台对象存储,成功后只把**对象键**挂进
|
|
|
* `draft.attachmentUrl`(字面量须与后端 `CONTRACT_ATTACHMENT_KEY_PREFIX` 同前缀)。
|
|
|
@@ -250,6 +373,10 @@ export function ContractEditorPage() {
|
|
|
setCustomerOpen(false);
|
|
|
setCustomerActive(0);
|
|
|
setError("");
|
|
|
+ // 换客户 ⇒ 续签源作废(旧合同属于上一个客户)。
|
|
|
+ setRenewFrom("");
|
|
|
+ setRenewSourceLabel("");
|
|
|
+ setRenewError("");
|
|
|
};
|
|
|
const clearCustomer = () => {
|
|
|
setCustomerId(null);
|
|
|
@@ -257,6 +384,9 @@ export function ContractEditorPage() {
|
|
|
setCustomerOpen(false);
|
|
|
setCustomerActive(0);
|
|
|
setError("");
|
|
|
+ setRenewFrom("");
|
|
|
+ setRenewSourceLabel("");
|
|
|
+ setRenewError("");
|
|
|
customerInput.current?.focus();
|
|
|
};
|
|
|
const onCustomerKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
|
|
|
@@ -331,7 +461,18 @@ export function ContractEditorPage() {
|
|
|
const inlineSubjectOptions = (["enterprise", "individual", "sole_proprietor"] as const).map((code) => ({ code, name: SUBJECT_TYPE[code] ?? code }));
|
|
|
|
|
|
const set = <K extends keyof Draft>(key: K, value: Draft[K]) => {
|
|
|
- setDraft((current) => ({ ...current, [key]: value }));
|
|
|
+ setDraft((current) => {
|
|
|
+ const next = { ...current, [key]: value };
|
|
|
+ /**
|
|
|
+ * 合同结束日=生效日+付款周期推算(2026-11-17 定案,**锁定手填**):
|
|
|
+ * 两个输入项任一变化即重算,⛔ 只改其一留下一个与期间对不上的旧结束日。
|
|
|
+ * 任一为空 ⇒ 结束日一并清空,由页面提示先补齐两项。
|
|
|
+ */
|
|
|
+ if (key === "start" || key === "payCycle") {
|
|
|
+ next.end = contractEndFromCycle(next.start, next.payCycle);
|
|
|
+ }
|
|
|
+ return next;
|
|
|
+ });
|
|
|
setError("");
|
|
|
setFieldError((current) => (current && REQUIRED_KEY_BY_DRAFT[key] === current.key ? null : current));
|
|
|
};
|
|
|
@@ -360,7 +501,13 @@ export function ContractEditorPage() {
|
|
|
};
|
|
|
const removeItem = (index: number) => setDraft((current) => ({ ...current, items: current.items.filter((_, i) => i !== index) }));
|
|
|
/** 换档位只换档位带出的口径(数量/带宽/价格),⛔ 清空已选出口——出口是独立于档位的目录配置。 */
|
|
|
- const pickPlan = (index: number, planId: string) => patchItem(index, { planId, planName: plans.find((plan) => plan.plan_id === planId)?.plan_name ?? "" });
|
|
|
+ const pickPlan = (index: number, planId: string) => {
|
|
|
+ const plan = plans.find((row) => row.plan_id === planId);
|
|
|
+ // 不可叠加档(用途分类 ≠ 叠加增值)份数恒 1:切档时归 1,界面也不显示数量输入框。
|
|
|
+ patchItem(index, { planId, planName: plan?.plan_name ?? "", ...(plan && plan.use_category !== "value_add" ? { quantity: 1 } : {}) });
|
|
|
+ };
|
|
|
+ /** 可叠加档(叠加增值,例如「单独境外 IP」按个)才允许填份数;其余档份数恒 1。 */
|
|
|
+ const stackablePlan = (planId: string) => plans.find((row) => row.plan_id === planId)?.use_category === "value_add";
|
|
|
/** 线路出口**单选**(2026-11-17):点未选项=替换当前选择;再点已选项=清空重选(提交前须补 1 个)。 */
|
|
|
const toggleExit = (index: number, exit: string) => {
|
|
|
const item = draft.items[index];
|
|
|
@@ -392,34 +539,12 @@ export function ContractEditorPage() {
|
|
|
...(optOut || draft.items[index]?.kind !== "plan_based" ? {} : { quantity: 1 }),
|
|
|
});
|
|
|
};
|
|
|
- /** 合同级 IP 条目(04 册 §4.4):未勾选「有固定 IP 需求」⇒ 本表零行,勾选才给一条空行。 */
|
|
|
- const setNeedIp = (on: boolean) => {
|
|
|
- setDraft((current) => ({ ...current, needIp: on, ipRows: on ? (current.ipRows.length ? current.ipRows : [emptyIpRow(firstItemExit(current.items))]) : [] }));
|
|
|
- setError("");
|
|
|
- };
|
|
|
- const patchIpRow = (index: number, patch: Partial<IpRowDraft>) => {
|
|
|
- setDraft((current) => ({ ...current, ipRows: current.ipRows.map((row, i) => (i === index ? { ...row, ...patch } : row)) }));
|
|
|
- setError("");
|
|
|
- };
|
|
|
- const addIpRow = () => {
|
|
|
- setDraft((current) => ({ ...current, ipRows: [...current.ipRows, emptyIpRow(firstItemExit(current.items))] }));
|
|
|
- setError("");
|
|
|
- };
|
|
|
- const removeIpRow = (index: number) => {
|
|
|
- setDraft((current) => ({ ...current, ipRows: current.ipRows.filter((_, i) => i !== index) }));
|
|
|
- setError("");
|
|
|
- };
|
|
|
/** 出口候选=套餐配置清单;历史数据里已出现的值也保留,避免旧合同编辑时选项凭空消失。 */
|
|
|
const exitOptions = useMemo(() => {
|
|
|
const names = (exitCatalog.data?.items ?? []).map((item) => item.exit_name);
|
|
|
- const legacy = [...draft.items.flatMap((item) => item.exits), ...draft.ipRows.map((row) => row.line_exit.trim()).filter(Boolean)];
|
|
|
+ const legacy = [...draft.items.flatMap((item) => item.exits)];
|
|
|
return [...new Set([...names, ...legacy])];
|
|
|
- }, [exitCatalog.data, draft.items, draft.ipRows]);
|
|
|
- /** 固定 IP 条目的出口候选=**上方服务构成条目已选出口**(2026-11-16 裁定,⛔ 全量目录)。 */
|
|
|
- const itemExitOptions = useMemo(
|
|
|
- () => [...new Set(draft.items.flatMap((item) => item.exits))],
|
|
|
- [draft.items],
|
|
|
- );
|
|
|
+ }, [exitCatalog.data, draft.items]);
|
|
|
|
|
|
async function save() {
|
|
|
if (!identity) { setError("请先登录后再提交合同;写入权限由服务端判定。"); return; }
|
|
|
@@ -439,7 +564,7 @@ export function ContractEditorPage() {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- const built = buildContractWrite(draft, tierValues);
|
|
|
+ const built = buildContractWrite(draft);
|
|
|
if (!built.ok) {
|
|
|
setFieldError(built.fieldError ?? null);
|
|
|
setError(built.error);
|
|
|
@@ -454,7 +579,6 @@ export function ContractEditorPage() {
|
|
|
* 经办人姓名 → 经办人联系电话 → 交接单日期;提示语照抄后端原话并红显命中的那个字段,
|
|
|
* `agent_org` 选填(不送也 `10000`)⇒ ⛔ 参与校验。校验同源 `domain/contract-draft`。
|
|
|
*/
|
|
|
- /** IP 条目随合同整表替换(04 册 §4.3);未勾选=送空数组=清空。⛔ 另送 `has_fixed_ip`:后端按 `ip_entries` 非空推导该触发位,`false` 却不带空表反而回 11103。 */
|
|
|
const shared = {
|
|
|
...(w.externalNo ? { external_no: w.externalNo } : {}),
|
|
|
contract_amount_cents: w.contractAmountCents,
|
|
|
@@ -469,7 +593,6 @@ export function ContractEditorPage() {
|
|
|
/** 附件单值:空串=清空(后端 `text_param` 置 `NULL`)⇒ ⛔ 省略键,否则「移除附件」永远存不下去。 */
|
|
|
attachment_url: w.attachmentUrl.trim(),
|
|
|
service_items: w.serviceItems,
|
|
|
- ...(w.ipCarried ? { ip_entries: w.ipEntries } : {}),
|
|
|
};
|
|
|
setSubmitting(true);
|
|
|
setError("");
|
|
|
@@ -491,6 +614,8 @@ export function ContractEditorPage() {
|
|
|
const res = await contractCreate({
|
|
|
...shared,
|
|
|
...(draft.contractNo.trim() ? { contract_no: draft.contractNo.trim() } : {}),
|
|
|
+ /** 续签来源(2026-11-17):后端据此为每个条目生成不带替换边的新订阅。 */
|
|
|
+ ...(renewFrom ? { renew_from_contract_id: renewFrom } : {}),
|
|
|
...(customerId
|
|
|
? { customer_id: customerId }
|
|
|
: {
|
|
|
@@ -612,11 +737,14 @@ export function ContractEditorPage() {
|
|
|
: c.license_pending ? "本次留空 ⇒ 请到客户档案「登记材料」格补传" : "已登记"}</dd>
|
|
|
</dl>
|
|
|
{created.replacements.length > 0 && <div className="contract-form-summary">
|
|
|
- <p>已创建 {created.replacements.length} 条替换(升降配):</p>
|
|
|
+ <p>已按本合同生成 {created.replacements.length} 条订阅:</p>
|
|
|
<ul>
|
|
|
{created.replacements.map((row) => <li key={row.subscription_id}>
|
|
|
- 原订阅 {row.replaces_subscription_id} → 新订阅 {row.subscription_id}
|
|
|
- {row.ticket_type ? `;工单 ${row.ticket_type}${row.ticket_no ? `(${row.ticket_no})` : ""}` : ";本次未生成工单"}
|
|
|
+ {row.mode === "renewed"
|
|
|
+ ? `续签新开 → 新订阅 ${row.subscription_id}(原订阅不动)`
|
|
|
+ : `替换:原订阅 ${row.replaces_subscription_id} → 新订阅 ${row.subscription_id}`}
|
|
|
+ {row.ticket_type ? `;工单 ${row.ticket_type}${row.ticket_no ? `(${row.ticket_no})` : ""}` : row.note ? `;未生成工单(${row.note.replace(/。$/, "")})` : ";本次未生成工单"}
|
|
|
+ {row.actual_opened_at ? `;视为已交付(实际开通日 ${row.actual_opened_at})` : ""}
|
|
|
</li>)}
|
|
|
</ul>
|
|
|
</div>}
|
|
|
@@ -754,13 +882,30 @@ export function ContractEditorPage() {
|
|
|
|
|
|
<section className="ops-record-card">
|
|
|
<h2>二、合同基本要素 <span>必填</span></h2>
|
|
|
+ {!editing && customerId && (
|
|
|
+ <div className="contract-renew-block">
|
|
|
+ <label htmlFor="renew-from"><span className="ops-field-title">续签自旧合同 <small>可选</small></span>
|
|
|
+ <select id="renew-from" value={renewFrom} disabled={renewLoading || submitting} onChange={(event) => void pickRenewal(event.target.value)}>
|
|
|
+ <option value="">不续签(手工录入)</option>
|
|
|
+ {/* 深链续签源若不在客户合同列表里(已归档等),补一个同文案的选项,⛔ 让下拉空着。 */}
|
|
|
+ {renewFrom && renewSourceLabel && !renewalOptions.some((row) => row.contract_id === renewFrom) && <option value={renewFrom}>{renewSourceLabel}</option>}
|
|
|
+ {renewalOptions.map((row) => <option key={row.contract_id} value={row.contract_id}>{renewalOptionLabel(row)}</option>)}
|
|
|
+ </select>
|
|
|
+ </label>
|
|
|
+ <p className="contract-form-summary">选中即带出旧合同的合同金额、付款周期、服务条目与运营商经办人三件套,并把<b>合同生效日自动推为旧合同结束日的次日</b>(该日已早于今天时取今天,结束日再按付款周期推算);合同编号/外部单号/附件/交接单日期仍按本合同填写(交接单日期默认录入当日)。续签按「新订阅开通」落库:不截原、不挂替换边、不出第七类工单;<b>服务条目与旧合同逐条一致(形式/档位/份数/席位/带宽/出口,价格不算)时视为无需施工,不出开通工单</b>,新订阅按续签开始日记为已交付。</p>
|
|
|
+ {renewalList.loading && <p className="contract-form-summary">正在读取该客户的合同…</p>}
|
|
|
+ {renewalList.error && <p className="ops-form-error" role="alert">{renewalList.error.message}</p>}
|
|
|
+ {renewLoading && <p className="contract-form-summary">正在读取旧合同条目…</p>}
|
|
|
+ {renewError && <p className="ops-form-error" role="alert">{renewError}</p>}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
<div className="ops-form-grid ops-form-grid--business">
|
|
|
<label htmlFor="contract-no"><span className="ops-field-title">合同编号 <small>{editing ? "服务端生成" : "可选"}</small></span><Input id="contract-no" placeholder={editing ? "" : "不填由服务端生成"} value={draft.contractNo} disabled={editing} onChange={(event) => set("contractNo", event.target.value)} /></label>
|
|
|
<label htmlFor="external-no"><span className="ops-field-title">外部单号</span><Input id="external-no" placeholder="外部单号" value={draft.externalNo} onChange={(event) => set("externalNo", event.target.value)} /></label>
|
|
|
<label htmlFor="contract-amount"><span className="ops-field-title">合同金额(元) <b title="必填">*</b></span><Input id="contract-amount" inputMode="decimal" placeholder="0.00" aria-invalid={invalidOf("amount")} value={draft.amount} onChange={(event) => set("amount", event.target.value)} />{requiredErrorOf("amount")}</label>
|
|
|
<label htmlFor="pay-cycle"><span className="ops-field-title">付款周期 <b title="必填">*</b></span><select id="pay-cycle" aria-invalid={invalidOf("payCycle")} value={draft.payCycle} onChange={(event) => set("payCycle", event.target.value)}><option value="">未配置</option>{OPTIONS.pay_cycle.map((item) => <option key={item.value} value={item.value}>{item.label}</option>)}</select>{requiredErrorOf("payCycle")}</label>
|
|
|
- <label htmlFor="start-date"><span className="ops-field-title">合同生效日</span><Input id="start-date" type="date" value={draft.start} onChange={(event) => set("start", event.target.value)} /></label>
|
|
|
- <label htmlFor="end-date"><span className="ops-field-title">合同结束日</span><Input id="end-date" type="date" value={draft.end} onChange={(event) => set("end", event.target.value)} /></label>
|
|
|
+ <label htmlFor="start-date"><span className="ops-field-title">合同生效日 <b title="必填">*</b></span><Input id="start-date" type="date" aria-invalid={invalidOf("start")} value={draft.start} onChange={(event) => set("start", event.target.value)} />{requiredErrorOf("start")}</label>
|
|
|
+ <label htmlFor="end-date"><span className="ops-field-title">合同结束日 <small>自动推算</small></span><Input id="end-date" type="date" value={draft.end} readOnly aria-readonly="true" className="cursor-not-allowed bg-muted/40" /><span className="ops-field-note">{draft.start && draft.payCycle ? <>=生效日+付款周期(年付 12/季付 3/月付 1 个月)再减一天,该月无对应日先取月末;<b>不可手改</b>,改生效日或付款周期即自动重算。</> : <>先填「合同生效日」与「付款周期」,结束日自动算出,<b>不可手改</b>。</>}</span></label>
|
|
|
{/* 运营商经办人=交接单口径的三段,独占一行(机构/姓名/联系方式),⛔ 与上面六个商务格混排。 */}
|
|
|
<div className="ops-form-span-full contract-agent-block">
|
|
|
<span className="ops-field-title">运营商经办人</span>
|
|
|
@@ -804,7 +949,7 @@ export function ContractEditorPage() {
|
|
|
<label><span className="ops-field-title">条目形态</span><select value={item.kind} onChange={(event) => patchItem(index, { kind: event.target.value as ItemDraft["kind"] })}><option value="plan_based">固定套餐式</option><option value="custom_spec">自定义规格式</option></select></label>
|
|
|
{item.kind === "plan_based" ? <>
|
|
|
<label><span className="ops-field-title">套餐档位</span><select value={item.planId} onChange={(event) => pickPlan(index, event.target.value)}><option value="">{catalog.loading ? "载入中…" : WORD_UNCONFIGURED}</option>{plans.map((plan) => <option key={plan.plan_id} value={plan.plan_id}>{plan.plan_name}</option>)}</select></label>
|
|
|
- <label><span className="ops-field-title">档位数量</span><Input type="number" min={1} disabled={Boolean(item.replacesSubscriptionId)} value={item.quantity} onChange={(event) => patchItem(index, { quantity: Number(event.target.value) })} /><span className="ops-field-note">{item.replacesSubscriptionId ? "替换时一条条目只生一份订阅,数量固定为 1。" : "按条计价:一份条目生多份订阅。"}</span></label>
|
|
|
+ {(item.replacesSubscriptionId || stackablePlan(item.planId)) && <label><span className="ops-field-title">档位数量</span><Input type="number" min={1} disabled={Boolean(item.replacesSubscriptionId)} value={item.quantity} onChange={(event) => patchItem(index, { quantity: Number(event.target.value) })} /><span className="ops-field-note">{item.replacesSubscriptionId ? "替换时一条条目只生一份订阅,数量固定为 1。" : "可叠加档按份计价,例如「单独境外 IP」按个叠加;保存后带入订阅。"}</span></label>}
|
|
|
</> : <>
|
|
|
<label><span className="ops-field-title">账号数</span><Input type="number" min={1} value={item.accountCount} onChange={(event) => patchItem(index, { accountCount: Number(event.target.value) })} /></label>
|
|
|
<label><span className="ops-field-title">下行带宽(Mbps)</span><Input type="number" min={0} max={1000} value={item.bwDown} onChange={(event) => patchItem(index, { bwDown: Number(event.target.value) })} /></label>
|
|
|
@@ -840,7 +985,7 @@ export function ContractEditorPage() {
|
|
|
* 0 个=按新订阅开通;1 个=自动选中(可改为按新订阅开通);多个=必须显式选择;
|
|
|
* 定制档须勾选确认。判据全在后端,前端只负责呈现与回填 `succession`。
|
|
|
*/}
|
|
|
- {!editing && customerId && item.exits.length === 1 && (item.kind === "plan_based" ? Boolean(item.planId) : Boolean(item.useCategory)) ? (
|
|
|
+ {!editing && !renewFrom && customerId && item.exits.length === 1 && (item.kind === "plan_based" ? Boolean(item.planId) : Boolean(item.useCategory)) ? (
|
|
|
<ReplacementBlock
|
|
|
index={index}
|
|
|
item={item}
|
|
|
@@ -863,22 +1008,9 @@ export function ContractEditorPage() {
|
|
|
|
|
|
<div className="ops-record-pair">
|
|
|
<section className="ops-record-card">
|
|
|
- <h2>四、固定 IP 条目 <span>每条=线路出口+带宽档位+IP 数量</span></h2>
|
|
|
- <label className="ops-form-check"><input type="checkbox" checked={draft.needIp} onChange={(event) => setNeedIp(event.target.checked)} /><span>有固定 IP 需求(默认无固定 IP;勾上才核定 IP)</span></label>
|
|
|
- {!draft.ipCarried && <p className="contract-form-summary">读口没回 `ip_entries` 这个键=读不到已备案条目,本次提交不带 IP(拿空表覆盖会清掉库里已有的条目)。</p>}
|
|
|
- {draft.needIp ? <>
|
|
|
- <div className="ops-contract-ip-rows">{draft.ipRows.map((row, index) => (
|
|
|
- <div key={row.key} className="ops-contract-ip-row">
|
|
|
- <label><span className="ops-field-title">线路出口</span><select aria-label={`IP 条目 ${index + 1} 线路出口`} value={row.line_exit} onChange={(event) => patchIpRow(index, { line_exit: event.target.value })}><option value="">请选择服务构成出口</option>{[...new Set([...itemExitOptions, row.line_exit.trim()].filter(Boolean))].map((exit) => <option key={exit} value={exit}>{itemExitOptions.includes(exit) ? exit : `${exit}(不在服务构成已选出口中)`}</option>)}</select></label>
|
|
|
- <label><span className="ops-field-title">带宽档位</span><select aria-label={`IP 条目 ${index + 1} 带宽档位`} value={row.bandwidth_tier_mbps} onChange={(event) => patchIpRow(index, { bandwidth_tier_mbps: event.target.value })}><option value="">{WORD_UNCONFIGURED}</option>{[...tierOptions, ...(row.bandwidth_tier_mbps && !tierValues.includes(row.bandwidth_tier_mbps) ? [{ value: row.bandwidth_tier_mbps, label: `${row.bandwidth_tier_mbps}(目录外,需重新配置)` }] : [])].map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}</select></label>
|
|
|
- <label><span className="ops-field-title">IP 数量</span><Input type="number" min={1} max={IP_COUNT_MAX} aria-label={`IP 条目 ${index + 1} IP 数量`} value={row.ip_count} onChange={(event) => patchIpRow(index, { ip_count: event.target.value })} /></label>
|
|
|
- <Button variant="ghost" size="sm" onClick={() => removeIpRow(index)}><Trash2 size={15} />删除</Button>
|
|
|
- </div>
|
|
|
- ))}</div>
|
|
|
- {!itemExitOptions.length && <p className="contract-form-summary">上方服务构成条目尚未选择线路出口 ⇒ IP 条目没有可选项;请先在条目上勾选线路出口。</p>}
|
|
|
- <div className="ops-contract-item-actions"><Button variant="outline" size="sm" onClick={addIpRow}><Plus size={15} />添加 IP 条目</Button></div>
|
|
|
- <p className="contract-form-summary">每条=线路出口+带宽档位+IP 数量,三元组缺一项后端回 `KLT-L217`;带宽档位从「套餐配置 → 线路出口」的档位清单里选(可含「不承诺带宽」=该条 IP 不带带宽承诺,对应 `bandwidth_committed=false`)。出口<strong>只能从上方服务构成条目已选出口中选</strong>,初始默认带出第一个已选出口。</p>
|
|
|
- </> : <p className="contract-form-summary">未勾选=本表零行(提交时随合同送 `ip_entries: []`=清空旧条目)。</p>}
|
|
|
+ <h2>四、境外 IP <span>随服务构成核定</span></h2>
|
|
|
+ <p className="contract-form-summary">固定 IP 条目已下线(2026-11-17):境外 IP 不再在合同上单独登记「线路出口+带宽档位+IP 数量」三元组,改由<strong>上方服务构成里选「叠加增值」档位并填份数</strong>表达(例:单独境外 IP 选 2 份=2 个 IP;不可叠加档份数恒 1)。</p>
|
|
|
+ <p className="contract-form-summary">存量 IP 条目保留在库里仅供追溯,本页不再展示、也不再随合同提交;后端读口同样不再下发 `ip_entries`。</p>
|
|
|
</section>
|
|
|
<section className="ops-record-card">
|
|
|
<h2>五、合同附件 <span>可选 · 单份</span></h2>
|
|
|
@@ -918,14 +1050,13 @@ export function ContractEditorPage() {
|
|
|
<section className="ops-record-card">
|
|
|
<h2>提交校验</h2>
|
|
|
<div className="ops-contract-summary">
|
|
|
- <div><span>客户</span><strong>{editing ? customerLabel : (customerId ? candidates.find((item) => item.customer_id === customerId)?.customer_name ?? "" : freeText ? `${customerTerm.trim()}(自由录入)` : "待检索")}</strong></div>
|
|
|
+ <div><span>客户</span><strong>{editing ? customerLabel : (customerId ? (candidates.find((item) => item.customer_id === customerId)?.customer_name || customerTerm.trim() || WORD_UNCONFIGURED) : freeText ? `${customerTerm.trim()}(自由录入)` : "待检索")}</strong></div>
|
|
|
<div><span>合同编号</span><strong>{draft.contractNo || "服务端生成"}</strong></div>
|
|
|
<div><span>合同金额</span><strong>{/^\d+(?:\.\d{1,2})?$/.test(draft.amount.trim()) ? `¥${Number(draft.amount).toLocaleString("zh-CN")}` : "待填写"}</strong></div>
|
|
|
<div><span>付款周期</span><strong>{draft.payCycle ? label(PAY_CYCLE, draft.payCycle) : WORD_UNCONFIGURED}</strong></div>
|
|
|
<div><span>合同期间</span><strong>{draft.start && draft.end ? `${draft.start} 至 ${draft.end}` : "待填写"}</strong></div>
|
|
|
<div><span>构成条目</span><strong>{draft.items.length} 个</strong></div>
|
|
|
- <div><span>替换原订阅</span><strong>{(() => { const picked = draft.items.filter((item) => item.replacesSubscriptionId); return picked.length ? `${picked.length} 条(升降配)` : "无(按新订阅开通)"; })()}</strong></div>
|
|
|
- <div><span>固定 IP 条目</span><strong>{draft.needIp ? `${draft.ipRows.length} 条/${draft.ipRows.reduce((sum, row) => sum + (Number(row.ip_count) || 0), 0)} 个 IP` : "无固定 IP 需求"}</strong></div>
|
|
|
+ <div><span>替换原订阅</span><strong>{renewFrom ? "续签(按新订阅开通,不替换原订阅)" : (() => { const picked = draft.items.filter((item) => item.replacesSubscriptionId); return picked.length ? `${picked.length} 条(升降配)` : "无(按新订阅开通)"; })()}</strong></div>
|
|
|
<div><span>附件</span><strong>{draft.attachmentUrl.trim() ? (attachmentBusy ? "上传中…" : attachmentLabelText) : "无附件"}</strong></div>
|
|
|
</div>
|
|
|
{error && <p className="ops-form-error" role="alert">{error}</p>}
|
|
|
@@ -965,6 +1096,7 @@ function ReplacementBlock({
|
|
|
onRetry: () => void;
|
|
|
}) {
|
|
|
const candidates = probe?.candidates ?? [];
|
|
|
+ const skipped = probe?.skipped ?? [];
|
|
|
const selected = candidates.find((candidate) => candidate.subscription_id === item.replacesSubscriptionId);
|
|
|
const detailOf = (candidate: ReplacementCandidate) => [
|
|
|
candidate.plan_name || WORD_UNCONFIGURED,
|
|
|
@@ -984,7 +1116,11 @@ function ReplacementBlock({
|
|
|
<Button variant="ghost" size="sm" onClick={onRetry}>重新比对</Button>
|
|
|
</p>
|
|
|
) : !candidates.length ? (
|
|
|
- <p className="contract-form-summary">同客户、同用途分类、同线路出口下没有可替换的在用订阅(未交付/增值/已被替换过的不参与)⇒ 本条目按新订阅开通(open/service_open)。</p>
|
|
|
+ skipped.length
|
|
|
+ ? <p className="contract-form-summary">
|
|
|
+ 同客户、同用途分类、同线路出口的订阅期间与本次合同<b>不相交</b>(见下方说明)⇒ 本条目按新订阅开通:到期续签不产生替换关系,原订阅原样到期、⛔ 截原。
|
|
|
+ </p>
|
|
|
+ : <p className="contract-form-summary">同客户、同用途分类、同线路出口下没有可替换的在用订阅(未交付/增值/已被替换过的不参与)⇒ 本条目按新订阅开通(open/service_open)。</p>
|
|
|
) : candidates.length === 1 ? <>
|
|
|
<p className="contract-form-summary">找到 1 份可替换的原订阅,已自动选中:<strong>{selected?.subscription_id ?? candidates[0].subscription_id}</strong> · {detailOf(candidates[0])}</p>
|
|
|
<label className="ops-form-check">
|
|
|
@@ -1016,5 +1152,14 @@ function ReplacementBlock({
|
|
|
<span>确认为该定制档替换(定制档不在目录里,须人工确认后再随合同提交)</span>
|
|
|
</label>}
|
|
|
</>}
|
|
|
+ {skipped.length > 0 && <div className="contract-form-summary">
|
|
|
+ <p>以下同客户、同用途分类、同线路出口的订阅<b>期间与本次合同不相交</b>,不参与替换:</p>
|
|
|
+ <ul>
|
|
|
+ {skipped.map((row) => <li key={row.subscription_id}>
|
|
|
+ {row.subscription_id} · {row.plan_name || WORD_UNCONFIGURED} · {row.start_date || "?"} 至 {row.end_date || "?"}
|
|
|
+ {`;${row.reason === "ended_before_start" ? "在本合同生效前已到期 ⇒ 到期续签,原订阅不动" : "要等本合同结束后才生效 ⇒ 本次不替换"}`}
|
|
|
+ </li>)}
|
|
|
+ </ul>
|
|
|
+ </div>}
|
|
|
</div>;
|
|
|
}
|