|
|
@@ -8,9 +8,9 @@ import { TreeSelect } from "../components/ui/tree-select";
|
|
|
import { FieldHint } from "../components/ui/field-hint";
|
|
|
import { CustomerTeamSelect } from "../components/CustomerTeamSelect";
|
|
|
import { contractRawByParam } from "../lib/contract-demo";
|
|
|
-import { contractAttachmentDiscard, contractCreate, contractCustomerLookup, contractGet, contractGetList, contractUpdate, orderGetList, rowsOf, subscriptionReplacementCandidates } from "../lib/api/bos";
|
|
|
+import { contractAttachmentDiscard, contractCreate, contractCustomerLookup, contractGet, contractGetList, contractUpdate, customerGet, orderGetList, rowsOf, subscriptionReplacementCandidates } from "../lib/api/bos";
|
|
|
import { ApiError } from "../lib/api/http";
|
|
|
-import { OPTIONS, label, PAY_CYCLE, PLAN_FAMILY, SUBJECT_TYPE } from "../lib/api/labels";
|
|
|
+import { OPTIONS, label, PAY_CYCLE, PLAN_FAMILY } from "../lib/api/labels";
|
|
|
import { WORD_UNCONFIGURED } from "../lib/api/lockedCopy";
|
|
|
import { Tri } from "../components/triState";
|
|
|
import { useCatalogPlans, useIpBandwidthTiers, useLineExits } from "../lib/package-catalog";
|
|
|
@@ -63,6 +63,38 @@ function useCustomerCandidates(term: string) {
|
|
|
return { ...load, term: query };
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 客户主体类型枚举(与 `customer/create@v1` 同一组值);页面显示文案走 `inlineSubjectOptions`。
|
|
|
+ */
|
|
|
+const CUSTOMER_SUBJECT_CODES = ["enterprise", "individual", "sole_proprietor"] as const;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 客户资料编辑项初值(新建客户录入)。
|
|
|
+ * 命中已有客户时同一组字段由 `/customer/get@v1` 回填(只读展示,⛔ 重名另写一份);
|
|
|
+ * 点 × 清除客户时整体复位到本初值,避免残留上一个客户的识别号/联系人。
|
|
|
+ */
|
|
|
+function emptyInlineCustomer() {
|
|
|
+ return {
|
|
|
+ subject: "enterprise",
|
|
|
+ idNo: "",
|
|
|
+ businessName: "",
|
|
|
+ businessPhone: "",
|
|
|
+ techName: "",
|
|
|
+ techPhone: "",
|
|
|
+ financeName: "",
|
|
|
+ financePhone: "",
|
|
|
+ remark: "",
|
|
|
+ address: "",
|
|
|
+ regionId: "",
|
|
|
+ operatorId: "",
|
|
|
+ partnerId: "",
|
|
|
+ operationsTeamId: "",
|
|
|
+ teamId: "",
|
|
|
+ login: "",
|
|
|
+ mobile: "",
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
export function ContractEditorPage() {
|
|
|
const { no } = useParams();
|
|
|
const navigate = useNavigate();
|
|
|
@@ -94,6 +126,15 @@ export function ContractEditorPage() {
|
|
|
(row) => row.plan_family === "link" && row.status === "active" && (!row.end_date || row.end_date >= today),
|
|
|
);
|
|
|
}, [linkSubscriptions.data]);
|
|
|
+ /**
|
|
|
+ * 命中已有客户 ⇒ 读客户档案把「客户资料」编辑项回填成**真实值**(业主 2026-11-19 定案):
|
|
|
+ * 只读仍然只读,但⛔ 再让输入框停在「沿用已有客户档案」的空占位——识别号取脱敏值,其余逐项取档案值。
|
|
|
+ * 读口与客户档案页同一个 `/customer/get@v1`(客户侧自读;⛔ 用名录接口)。
|
|
|
+ */
|
|
|
+ const archived = useLoad(
|
|
|
+ () => (editing || !customerId ? Promise.resolve(null) : customerGet({ customer_id: customerId })),
|
|
|
+ [editing, customerId],
|
|
|
+ );
|
|
|
/** 删除父条目时把「一并移除的子行数」显式告诉人(D-7 第 2 条:⛔ 静默级联)。 */
|
|
|
const [itemNotice, setItemNotice] = useState("");
|
|
|
/** D-16:合同录入页就地新建本客户自定义档(打开同一份档位编辑器,归属客户锁定)。 */
|
|
|
@@ -381,6 +422,8 @@ export function ContractEditorPage() {
|
|
|
const searching = trimmedTerm.length >= 2 && (lookupStale || lookup.loading);
|
|
|
const candidates = lookup.data?.customers ?? [];
|
|
|
const freeText = !lookup.data?.matched && trimmedTerm.length >= 2;
|
|
|
+ /** 命中已有客户 ⇒ 客户资料编辑项沿用客户档案、整体只读;点「×」清除后转新建客户录入。 */
|
|
|
+ const lockedCustomerFields = Boolean(customerId);
|
|
|
const customerLabel = record.data?.customer_name || (record.data?.customer_id ? record.data.customer_id : WORD_UNCONFIGURED);
|
|
|
/**
|
|
|
* 客户检索=**输入框内下拉**(业主 2026-11-16 定案):命中项直接挂在输入框下方的候选列表,
|
|
|
@@ -436,15 +479,19 @@ export function ContractEditorPage() {
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * 客户内联建档段(需求 §5.3 CU-13;业主 2026-11-16 定案):
|
|
|
- * **命中已有客户 ⇒ 本段整段不出现**(命中项直接选在上方输入框内的候选下拉,选中后输入框锁定并带 × 清除);
|
|
|
- * 未命中 ⇒ 在客户名称下方展开建档必填项,含运营商与运维团队两个下拉。
|
|
|
+ * 客户资料编辑项(需求 §5.3 CU-13;业主 2026-11-19 定案):
|
|
|
+ * **常显**——客户名称本身就是检索框,命中项直接选在输入框内的候选下拉;
|
|
|
+ * 命中已有客户 ⇒ 其余编辑项整体只读、沿用客户档案(点 × 清除后转新建);未命中 ⇒ 全部可填。
|
|
|
* ⚠️ 本段只收集 CU-13 第 1 步字段,逐项与 `/customer/create@v1` 同源;
|
|
|
- * 企业营业执照影像**可留空**(本通道例外),建档后到客户档案「登记材料」格补传。
|
|
|
+ * 企业营业执照影像**选填**(业主 2026-11-19 定案,⛔ 强制登记),建档后到客户档案「登记材料」格补传。
|
|
|
*/
|
|
|
- const org = useOrganizationData(["regions", "operators", "maintenanceTeams"]);
|
|
|
- const regionTree = useMemo(() => regionTreeNodes(org.regions, org.regions.map((item) => item.id)), [org.regions]);
|
|
|
- const [inline, setInline] = useState({ subject: "enterprise", idNo: "", contact: "", phone: "", address: "", regionId: "", operatorId: "", teamId: "", login: "", mobile: "" });
|
|
|
+ const org = useOrganizationData(["regions", "operators", "partners", "operationsTeams", "maintenanceTeams"]);
|
|
|
+ /** 区域树:保留「全网」为层级上下文但不能选中(业主 2026-11-19 定案)。 */
|
|
|
+ const regionTree = useMemo(() => {
|
|
|
+ const blocked = new Set(org.regions.filter((item) => item.name.trim() === "全网" || (item.pathName ?? "").trim() === "全网").map((item) => item.id));
|
|
|
+ return regionTreeNodes(org.regions, org.regions.filter((item) => !blocked.has(item.id)).map((item) => item.id));
|
|
|
+ }, [org.regions]);
|
|
|
+ const [inline, setInline] = useState(emptyInlineCustomer);
|
|
|
const [licenseObj, setLicenseObj] = useState<UploadedObject | null>(null);
|
|
|
const [licenseBusy, setLicenseBusy] = useState(false);
|
|
|
const [licenseError, setLicenseError] = useState("");
|
|
|
@@ -454,6 +501,37 @@ export function ContractEditorPage() {
|
|
|
setInline((current) => ({ ...current, [key]: value }));
|
|
|
setError("");
|
|
|
};
|
|
|
+ /**
|
|
|
+ * 客户切换/清除 ⇒ 先把「客户资料」段复位(⛔ 留上一个客户或自由录入的识别号/联系人),
|
|
|
+ * 命中客户时再由 [`archived`] 回填档案真值;字段只读与否统一由 `lockedCustomerFields` 决定。
|
|
|
+ */
|
|
|
+ useEffect(() => {
|
|
|
+ setInline(emptyInlineCustomer());
|
|
|
+ }, [customerId, editing]);
|
|
|
+ useEffect(() => {
|
|
|
+ const detail = archived.data;
|
|
|
+ if (!detail || detail.customer.customer_id !== customerId) return;
|
|
|
+ const c = detail.customer;
|
|
|
+ const mount = detail.region_mounts?.[0];
|
|
|
+ setInline({
|
|
|
+ ...emptyInlineCustomer(),
|
|
|
+ /** 识别号只有脱敏值(后端 keybox 解密后掩码下发)——照它显示,⛔ 前端还原明文。 */
|
|
|
+ subject: (CUSTOMER_SUBJECT_CODES as readonly string[]).includes(c.subject_type) ? c.subject_type : "enterprise",
|
|
|
+ idNo: (c.identity_no_masked ?? "").trim(),
|
|
|
+ address: c.address ?? "",
|
|
|
+ businessName: c.contact_name ?? "",
|
|
|
+ businessPhone: c.contact_mobile ?? "",
|
|
|
+ techName: c.tech_contact_name ?? "",
|
|
|
+ techPhone: c.tech_contact_mobile ?? "",
|
|
|
+ financeName: c.finance_contact_name ?? "",
|
|
|
+ financePhone: c.finance_contact_mobile ?? "",
|
|
|
+ remark: c.remark ?? "",
|
|
|
+ regionId: mount?.parent_node_id ?? "",
|
|
|
+ operatorId: c.operator_id ?? "",
|
|
|
+ partnerId: c.partner_id ?? "",
|
|
|
+ teamId: detail.team_ids?.[0] ?? "",
|
|
|
+ });
|
|
|
+ }, [archived.data, customerId]);
|
|
|
/** 所挂区域沿父链找到最近的「省」节点(与后端 `province_of` 同口径:⛔ 按名字前缀猜)。 */
|
|
|
const provinceId = useMemo(() => {
|
|
|
if (!inline.regionId) return "";
|
|
|
@@ -463,26 +541,117 @@ export function ContractEditorPage() {
|
|
|
while (node && node.level !== 0 && node.parent) node = byId.get(node.parent);
|
|
|
return node && node.level === 0 ? node.id : "";
|
|
|
}, [org.regions, inline.regionId]);
|
|
|
- /** 运营商候选=所挂区域省份下可见的档案(省份一致性是后端硬校验 KLT-C008);为空则退回全量,由后端判定。 */
|
|
|
- const operatorOptions = useMemo(() => {
|
|
|
- const sameProvince = provinceId ? org.operators.filter((item) => item.region === provinceId) : [];
|
|
|
- return (sameProvince.length ? sameProvince : org.operators).map((item) => ({ id: item.id, name: item.name }));
|
|
|
- }, [org.operators, provinceId]);
|
|
|
- useEffect(() => {
|
|
|
- setInline((current) => (current.operatorId || !operatorOptions.length ? current : { ...current, operatorId: operatorOptions[0].id }));
|
|
|
- }, [operatorOptions]);
|
|
|
- useEffect(() => {
|
|
|
- setInline((current) => (current.teamId || !org.maintenanceTeams.length ? current : { ...current, teamId: org.maintenanceTeams[0].id }));
|
|
|
- }, [org.maintenanceTeams]);
|
|
|
- /** 区域换了 ⇒ 原运营商可能跨省,重新预选第一个(⛔ 留着让后端回 C008)。 */
|
|
|
+ /** 所挂区域自身+全部祖先:运营商/合伙人/运营团队/运维团队都靠它做「负责范围是否覆盖」的反查。 */
|
|
|
+ const regionChainIds = useMemo(() => {
|
|
|
+ const byId = new Map(org.regions.map((item) => [item.id, item]));
|
|
|
+ const chain: string[] = [];
|
|
|
+ const seen = new Set<string>();
|
|
|
+ let node = inline.regionId ? byId.get(inline.regionId) : undefined;
|
|
|
+ while (node && !seen.has(node.id)) {
|
|
|
+ seen.add(node.id);
|
|
|
+ chain.push(node.id);
|
|
|
+ node = node.parent ? byId.get(node.parent) : undefined;
|
|
|
+ }
|
|
|
+ return chain;
|
|
|
+ }, [org.regions, inline.regionId]);
|
|
|
+ /**
|
|
|
+ * 选定所属区域后才给候选(业主 2026-11-19 定案):
|
|
|
+ * * 运营商=与该区域同省的档案(后端硬校验省份一致);
|
|
|
+ * * 合伙人/运营团队/运维团队=负责范围(或建档区域,范围为空时)覆盖当前区域或其上级的档案。
|
|
|
+ */
|
|
|
+ const regionOptions = useMemo(() => {
|
|
|
+ if (!inline.regionId) return { operators: [], partners: [], operationsTeams: [], teams: [] };
|
|
|
+ const chain = new Set(regionChainIds);
|
|
|
+ const covered = (scopeRegions: string[], ownRegion: string) => scopeRegions.length
|
|
|
+ ? scopeRegions.some((id) => chain.has(id))
|
|
|
+ : chain.has(ownRegion);
|
|
|
+ return {
|
|
|
+ operators: org.operators.filter((item) => !provinceId || item.region === provinceId),
|
|
|
+ partners: org.partners.filter((item) => covered(item.scope.regions, item.region)),
|
|
|
+ operationsTeams: org.operationsTeams.filter((item) => covered(item.scope.regions, item.region)),
|
|
|
+ teams: org.maintenanceTeams.filter((item) => covered(item.scope.regions, item.region)),
|
|
|
+ };
|
|
|
+ }, [inline.regionId, provinceId, regionChainIds, org.operators, org.partners, org.operationsTeams, org.maintenanceTeams]);
|
|
|
+ /** 录入人身份本身就是某项档案时,直接选中并只读(业主 2026-11-19 定案)。 */
|
|
|
+ const lockIfCandidate = (value: string | undefined, candidates: { id: string }[]) => value && candidates.some((item) => item.id === value) ? value : "";
|
|
|
+ const lockedOperatorId = lockIfCandidate(identity?.operatorId, regionOptions.operators);
|
|
|
+ const lockedPartnerId = lockIfCandidate(identity?.partnerId, regionOptions.partners);
|
|
|
+ const lockedOperationsTeamId = lockIfCandidate(identity?.operationsTeamId, regionOptions.operationsTeams);
|
|
|
+ const lockedTeamId = lockIfCandidate(identity?.maintenanceTeamId, regionOptions.teams);
|
|
|
+ /**
|
|
|
+ * 区域一换就重算四项归属:唯一候选自动选中、身份命中项锁定;
|
|
|
+ * 原选择已不在新区域候选内 ⇒ 清空(⛔ 留跨区域的旧值让后端回省份/范围错误)。
|
|
|
+ * 命中已有客户时(`lockedCustomerFields`)运营商/合伙人/运维团队取档案值,⛔ 被候选反查改掉;
|
|
|
+ * 运营团队档案里不存快照 ⇒ 仍按所挂区域实时反查(业主 2026-11-19 定案)。
|
|
|
+ */
|
|
|
useEffect(() => {
|
|
|
setInline((current) => {
|
|
|
- if (!provinceId || operatorOptions.some((item) => item.id === current.operatorId)) return current;
|
|
|
- return { ...current, operatorId: operatorOptions[0]?.id ?? "" };
|
|
|
+ if (lockedCustomerFields) {
|
|
|
+ const derived = regionOptions.operationsTeams.length === 1 ? regionOptions.operationsTeams[0].id : "";
|
|
|
+ return current.operationsTeamId === derived ? current : { ...current, operationsTeamId: derived };
|
|
|
+ }
|
|
|
+ if (!current.regionId) {
|
|
|
+ return current.operatorId || current.partnerId || current.operationsTeamId || current.teamId
|
|
|
+ ? { ...current, operatorId: "", partnerId: "", operationsTeamId: "", teamId: "" }
|
|
|
+ : current;
|
|
|
+ }
|
|
|
+ const pick = (value: string, candidates: { id: string }[], locked: string) => {
|
|
|
+ if (locked) return locked;
|
|
|
+ if (candidates.some((item) => item.id === value)) return value;
|
|
|
+ return candidates.length === 1 ? candidates[0].id : "";
|
|
|
+ };
|
|
|
+ const next = {
|
|
|
+ operatorId: pick(current.operatorId, regionOptions.operators, lockedOperatorId),
|
|
|
+ partnerId: pick(current.partnerId, regionOptions.partners, lockedPartnerId),
|
|
|
+ operationsTeamId: pick(current.operationsTeamId, regionOptions.operationsTeams, lockedOperationsTeamId),
|
|
|
+ teamId: pick(current.teamId, regionOptions.teams, lockedTeamId),
|
|
|
+ };
|
|
|
+ return next.operatorId === current.operatorId && next.partnerId === current.partnerId
|
|
|
+ && next.operationsTeamId === current.operationsTeamId && next.teamId === current.teamId
|
|
|
+ ? current
|
|
|
+ : { ...current, ...next };
|
|
|
});
|
|
|
- // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
- }, [provinceId]);
|
|
|
- const inlineSubjectOptions = (["enterprise", "individual", "sole_proprietor"] as const).map((code) => ({ code, name: SUBJECT_TYPE[code] ?? code }));
|
|
|
+ }, [inline.regionId, regionOptions, lockedOperatorId, lockedPartnerId, lockedOperationsTeamId, lockedTeamId, lockedCustomerFields]);
|
|
|
+ /** 客户类型下拉按业主定案显示「企业/个体户/个人」(全站枚举仍用 `sole_proprietor` 原值)。 */
|
|
|
+ const inlineSubjectOptions = [
|
|
|
+ { code: "enterprise", name: "企业" },
|
|
|
+ { code: "sole_proprietor", name: "个体户" },
|
|
|
+ { code: "individual", name: "个人" },
|
|
|
+ ];
|
|
|
+ /**
|
|
|
+ * 命中已有客户时,四项归属要显示**档案里的值**:值若不在当前候选范围(授权子树/省份过滤),
|
|
|
+ * 补一条同值选项,否则下拉只好显示成「未匹配」——读者会误判客户档案没有归属。
|
|
|
+ */
|
|
|
+ const archivedCustomer = archived.data?.customer ?? null;
|
|
|
+ const withSavedOption = (items: { id: string; name: string }[], id: string, name: string) =>
|
|
|
+ !id || items.some((item) => item.id === id) ? items : [...items, { id, name: name || id }];
|
|
|
+ const operatorChoices = withSavedOption(regionOptions.operators, inline.operatorId,
|
|
|
+ archivedCustomer?.operator_name || org.operators.find((item) => item.id === inline.operatorId)?.name || "");
|
|
|
+ const partnerChoices = withSavedOption(regionOptions.partners, inline.partnerId,
|
|
|
+ archivedCustomer?.partner_name || org.partners.find((item) => item.id === inline.partnerId)?.name || "");
|
|
|
+ const teamChoices = withSavedOption(regionOptions.teams, inline.teamId,
|
|
|
+ org.maintenanceTeams.find((item) => item.id === inline.teamId)?.name || "");
|
|
|
+ /**
|
|
|
+ * 档案挂载点可能不在授权子树里(客户挂在市/区县,而区域树只下发省两级):
|
|
|
+ * 补一个叶子把 `path_name` 末段显示出来,⛔ 让只读的「所属区域」停在「请选择区域节点」。
|
|
|
+ */
|
|
|
+ const regionTreeShown = useMemo(() => {
|
|
|
+ const mount = archived.data?.region_mounts?.[0];
|
|
|
+ const id = mount?.parent_node_id;
|
|
|
+ if (!id) return regionTree;
|
|
|
+ const has = (nodes: typeof regionTree): boolean =>
|
|
|
+ nodes.some((node) => node.value === id || (node.children ? has(node.children) : false));
|
|
|
+ if (has(regionTree)) return regionTree;
|
|
|
+ const label = (mount?.path_name ?? "").split("/").map((part) => part.trim()).filter(Boolean).pop() || id;
|
|
|
+ return [{ value: id, label, hint: "档案挂载点", disabled: true }, ...regionTree];
|
|
|
+ }, [regionTree, archived.data]);
|
|
|
+ /** 命中客户时营业执照格的说明:直接报档案里的登记状态(⛔ 再写「沿用已有客户档案」这种没有信息量的话)。 */
|
|
|
+ const archivedLicenseText = (() => {
|
|
|
+ const license = archived.data?.license;
|
|
|
+ if (!license || license.status === "none") return "客户档案未登记营业执照影像";
|
|
|
+ if (license.status === "expired") return "客户档案的营业执照影像已超期";
|
|
|
+ return `客户档案已登记:${license.file_name || "营业执照影像"}`;
|
|
|
+ })();
|
|
|
|
|
|
const set = <K extends keyof Draft>(key: K, value: Draft[K]) => {
|
|
|
setDraft((current) => {
|
|
|
@@ -647,13 +816,13 @@ export function ContractEditorPage() {
|
|
|
async function save() {
|
|
|
if (!identity) { setError("请先登录后再提交合同;写入权限由服务端判定。"); return; }
|
|
|
if (submitting) return;
|
|
|
- if (!editing && !customerId && !freeText) { setError("请输入客户名称或信用码检索签约主体。"); return; }
|
|
|
+ if (!editing && !customerId && !freeText) { setError("请输入客户名称(至少 2 个字);未命中客户档案时按新客户建档。"); return; }
|
|
|
/** 未命中客户 ⇒ 内联建档段的必填集(CU-13 第 1 步;识别号同时是重试幂等键,⛔ 省)。 */
|
|
|
if (!editing && !customerId) {
|
|
|
const idNo = inline.idNo.trim().replace(/[\s-]/g, "").toUpperCase();
|
|
|
const missing: string[] = [];
|
|
|
if (!idNo) missing.push("客户识别号");
|
|
|
- if (!inline.regionId) missing.push("挂载区域");
|
|
|
+ if (!inline.regionId) missing.push("所属区域");
|
|
|
if (!inline.operatorId) missing.push("运营商");
|
|
|
if (!inline.teamId) missing.push("运维团队");
|
|
|
if (missing.length) { setError(`新建客户缺少:${missing.join("、")}(需求 §5.3 CU-13 第 1 步必填)`); return; }
|
|
|
@@ -661,6 +830,14 @@ export function ContractEditorPage() {
|
|
|
setError("客户识别号格式不符:应为 18 位统一社会信用代码/组织代码,或 15 位旧营业执照号。");
|
|
|
return;
|
|
|
}
|
|
|
+ /** 三组联系人各含姓名+电话(业主 2026-11-19 定案):组内两项要么都填、要么都留空。 */
|
|
|
+ const pairs: [string, string, string][] = [
|
|
|
+ ["商务联系人", inline.businessName, inline.businessPhone],
|
|
|
+ ["技术联系人", inline.techName, inline.techPhone],
|
|
|
+ ["财务联系人", inline.financeName, inline.financePhone],
|
|
|
+ ];
|
|
|
+ const half = pairs.find(([, name, phone]) => Boolean(name.trim()) !== Boolean(phone.trim()));
|
|
|
+ if (half) { setError(`${half[0]}需同时填写姓名与电话(只填一项会留下残缺的联系人)。`); return; }
|
|
|
}
|
|
|
const built = buildContractWrite(draft);
|
|
|
if (!built.ok) {
|
|
|
@@ -721,13 +898,19 @@ export function ContractEditorPage() {
|
|
|
customer_name: customerTerm.trim(),
|
|
|
subject_type: inline.subject,
|
|
|
id_code: inline.idNo.trim().replace(/[\s-]/g, "").toUpperCase(),
|
|
|
- ...(inline.contact.trim() ? { contact_name: inline.contact.trim() } : {}),
|
|
|
- ...(inline.phone.trim() ? { contact_mobile: inline.phone.trim() } : {}),
|
|
|
+ ...(inline.businessName.trim() ? { contact_name: inline.businessName.trim() } : {}),
|
|
|
+ ...(inline.businessPhone.trim() ? { contact_mobile: inline.businessPhone.trim() } : {}),
|
|
|
+ ...(inline.techName.trim() ? { tech_contact_name: inline.techName.trim() } : {}),
|
|
|
+ ...(inline.techPhone.trim() ? { tech_contact_mobile: inline.techPhone.trim() } : {}),
|
|
|
+ ...(inline.financeName.trim() ? { finance_contact_name: inline.financeName.trim() } : {}),
|
|
|
+ ...(inline.financePhone.trim() ? { finance_contact_mobile: inline.financePhone.trim() } : {}),
|
|
|
+ ...(inline.remark.trim() ? { remark: inline.remark.trim() } : {}),
|
|
|
+ ...(inline.partnerId ? { partner_id: inline.partnerId } : {}),
|
|
|
...(inline.address.trim() ? { address: inline.address.trim() } : {}),
|
|
|
parent_node_id: inline.regionId,
|
|
|
operator_id: inline.operatorId,
|
|
|
ops_team_ids: [inline.teamId],
|
|
|
- // 影像本通道可留空;非企业⛔ 送(与 `/customer/create@v1` 同一条判据)。
|
|
|
+ // 影像选填(业主 2026-11-19 定案);非企业⛔ 送(与 `/customer/create@v1` 同一条判据)。
|
|
|
...(inline.subject === "enterprise" && licenseObj ? { license: { object_key: licenseObj.object_key, file_name: licenseObj.file_name } } : {}),
|
|
|
...(inline.login.trim() ? { primary_username: inline.login.trim() } : {}),
|
|
|
...(inline.mobile.trim() ? { primary_mobile: inline.mobile.trim() } : {}),
|
|
|
@@ -758,7 +941,7 @@ export function ContractEditorPage() {
|
|
|
|
|
|
/**
|
|
|
* 营业执照影像:选中即直传平台对象存储(与客户建档同一通路、同一前缀),成功后才把对象键挂进载荷。
|
|
|
- * 本通道**可留空**(业主 2026-11-16 定案);留空时回执会带 `license_pending`,
|
|
|
+ * 营业执照影像**选填**(业主 2026-11-19 定案);留空时回执会带 `license_pending`,
|
|
|
* 由客户档案「登记材料」格补传。
|
|
|
*/
|
|
|
async function pickLicense(file: File | null) {
|
|
|
@@ -872,16 +1055,21 @@ export function ContractEditorPage() {
|
|
|
{(!editing || record.data) && <div className="ops-record-layout">
|
|
|
<div className="ops-record-stack">
|
|
|
<section className="ops-record-card">
|
|
|
- <div className="customer-form-section-title"><span>01</span><div><h2>客户资料</h2><p>必填。未命中客户档案时先建客户,再签本合同。</p></div></div>
|
|
|
+ <div className="customer-form-section-title"><span>01</span><div><h2>客户资料</h2><p>必填。客户名称输入文字检索已有客户;未命中时完善客户资料,随合同先建档再签约。</p></div></div>
|
|
|
{editing ? (
|
|
|
<div className="ops-form-grid ops-form-grid--business">
|
|
|
<label htmlFor="contract-customer"><span className="ops-field-title">所属客户</span><Input id="contract-customer" value={customerLabel} readOnly disabled /></label>
|
|
|
</div>
|
|
|
) : (
|
|
|
- <div className="ops-form-grid ops-form-grid--business">
|
|
|
- {/* 客户检索=输入框内下拉(业主 2026-11-16 定案):命中项直接挂在输入框下方,⛔ 另起「命中的客户档案」下拉框。 */}
|
|
|
- <div className="contract-customer-combobox ops-form-span-2" onBlur={(event) => { if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setCustomerOpen(false); }}>
|
|
|
- <label htmlFor="contract-customer" className="ops-field-title">客户名称或信用码 <b title="必填">*</b></label>
|
|
|
+ <div className="ops-form-grid ops-form-grid--business contract-customer-head">
|
|
|
+ {/* 客户资料编辑项常显(业主 2026-11-19 定案):客户名称本身就是检索框,直接在名称里输入文字联想已有客户;
|
|
|
+ 命中项直接挂在输入框下方(⛔ 另起「客户名称或信用码」搜索框),未命中即按新客户建档。 */}
|
|
|
+ <div className="contract-customer-combobox" onBlur={(event) => { if (!event.currentTarget.contains(event.relatedTarget as Node | null)) setCustomerOpen(false); }}>
|
|
|
+ <label htmlFor="contract-customer" className="ops-field-title">客户名称 <b title="必填">*</b>
|
|
|
+ <FieldHint label="客户名称检索说明">
|
|
|
+ {customerId ? `已匹配已有客户「${customerTerm}」:下方客户资料按客户档案只读展示真实值(识别号脱敏),无需填写;点名称右侧 × 可清除重选。` : freeText ? CONTRACT_FREE_TEXT_HINT : CONTRACT_CUSTOMER_LOOKUP_HINT}
|
|
|
+ </FieldHint>
|
|
|
+ </label>
|
|
|
<div className="contract-customer-combobox-control">
|
|
|
<Input
|
|
|
ref={customerInput}
|
|
|
@@ -892,14 +1080,14 @@ export function ContractEditorPage() {
|
|
|
aria-controls="contract-customer-options"
|
|
|
aria-autocomplete="list"
|
|
|
aria-activedescendant={showCustomerOptions && activeCustomer >= 0 ? `contract-customer-option-${activeCustomer}` : undefined}
|
|
|
- placeholder="客户名称至少 2 个字,或输入统一社会信用代码"
|
|
|
+ placeholder="输入客户名称(至少 2 个字)检索已有客户"
|
|
|
value={customerTerm}
|
|
|
readOnly={Boolean(customerId)}
|
|
|
onFocus={() => { if (!customerId) setCustomerOpen(true); }}
|
|
|
onKeyDown={onCustomerKeyDown}
|
|
|
onChange={(event) => { setCustomerTerm(event.target.value); setCustomerId(null); setCustomerOpen(true); setCustomerActive(0); setError(""); }}
|
|
|
/>
|
|
|
- {customerId && <button type="button" className="contract-customer-combobox-clear" aria-label="清除已选客户" title="清除已选客户" onClick={clearCustomer}><X size={14} /></button>}
|
|
|
+ {customerId && <button type="button" className="contract-customer-combobox-clear" aria-label="清除已选客户,重新检索" title="清除已选客户,重新检索" onClick={clearCustomer}><X size={14} /></button>}
|
|
|
{showCustomerOptions && (
|
|
|
<ul id="contract-customer-options" role="listbox" aria-label="命中的客户档案" className="contract-customer-combobox-options">
|
|
|
{candidates.map((item, index) => <li
|
|
|
@@ -922,54 +1110,90 @@ export function ContractEditorPage() {
|
|
|
)}
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <label htmlFor="inline-id"><span className="ops-field-title">客户识别号 <b title="必填">*</b><FieldHint label="客户识别号说明">18 位统一社会信用代码 / 15 位旧执照号。同时是查重与重试幂等键:合同保存失败后重新保存会按它命中已建客户。命中已有客户时显示档案里的脱敏号。</FieldHint></span>
|
|
|
+ <Input id="inline-id" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "客户档案未登记识别号" : "18 位统一社会信用代码 / 15 位旧执照号"} value={inline.idNo} onChange={(event) => setInlineField("idNo", event.target.value)} />
|
|
|
+ </label>
|
|
|
+ <label htmlFor="inline-subject"><span className="ops-field-title">客户类型 <b title="必填">*</b><FieldHint label="客户类型说明">企业=企业法人;个体户=个体工商户;个人=自然人客户。识别号格式随类型校验(企业 18 位统一社会信用代码,个人 18 位身份证号)。</FieldHint></span>
|
|
|
+ <select id="inline-subject" disabled={lockedCustomerFields} value={inline.subject} onChange={(event) => setInlineField("subject", event.target.value)}>
|
|
|
+ {inlineSubjectOptions.map((item) => <option key={item.code} value={item.code}>{item.name}</option>)}
|
|
|
+ </select>
|
|
|
+ </label>
|
|
|
</div>
|
|
|
)}
|
|
|
{lookup.error && !editing && <FetchError message={lookup.error.message} onRetry={lookup.reload} />}
|
|
|
- {/* 提示行常驻(⛔ 随请求起落显隐):检索状态只在候选列表内以一行「正在检索…」呈现,避免整块内容上下跳。 */}
|
|
|
- {!editing && !customerId && !lookup.error && <p className="contract-form-summary">{freeText ? CONTRACT_FREE_TEXT_HINT : CONTRACT_CUSTOMER_LOOKUP_HINT}</p>}
|
|
|
{/**
|
|
|
- * 未命中 ⇒ 展开客户建档必填段(CU-13 第 1 步;业主 2026-11-16 定案):
|
|
|
- * 客户名称沿用上方检索框(保存时按它建档);命中已有客户时本段整段不出现。
|
|
|
+ * 客户资料编辑项**常显**(业主 2026-11-19 定案,替代原「未命中才展开」):
|
|
|
+ * 客户名称沿用上方检索框(保存时按它建档);命中已有客户时其余字段整体只读、沿用客户档案。
|
|
|
*/}
|
|
|
- {!editing && !customerId && freeText && (
|
|
|
- <div className="ops-form-grid ops-form-grid--business">
|
|
|
- <label htmlFor="inline-subject"><span className="ops-field-title">主体类型 <b title="必填">*</b></span>
|
|
|
- <select id="inline-subject" value={inline.subject} onChange={(event) => setInlineField("subject", event.target.value)}>
|
|
|
- {inlineSubjectOptions.map((item) => <option key={item.code} value={item.code}>{item.name}</option>)}
|
|
|
- </select>
|
|
|
+ {!editing && (
|
|
|
+ <div className="ops-form-grid ops-form-grid--business contract-customer-fields">
|
|
|
+ <label htmlFor="inline-region"><span className="ops-field-title">所属区域 <b title="必填">*</b><FieldHint label="所属区域说明">客户挂载的区域节点;「全网」是平台虚根,不允许选中。选定后才反查运营商、合伙人、运营团队与运维团队。</FieldHint></span>
|
|
|
+ <TreeSelect treeData={regionTreeShown} value={inline.regionId} onChange={(value) => setInlineField("regionId", value)} ariaLabel="所属区域" placeholder={lockedCustomerFields ? "客户档案未挂载区域" : "请选择区域节点"} name="inline-region" disabled={lockedCustomerFields} />
|
|
|
</label>
|
|
|
- <label htmlFor="inline-id"><span className="ops-field-title">客户识别号 <b title="必填">*</b><FieldHint label="客户识别号说明">18 位统一社会信用代码 / 15 位旧执照号。同时是查重与重试幂等键:合同保存失败后重新保存会按它命中已建客户。</FieldHint></span>
|
|
|
- <Input id="inline-id" placeholder="18 位统一社会信用代码 / 15 位旧执照号" value={inline.idNo} onChange={(event) => setInlineField("idNo", event.target.value)} />
|
|
|
+ <label htmlFor="inline-operator"><span className="ops-field-title">运营商 <b title="必填">*</b><FieldHint label="运营商说明">{provinceId ? "候选=所挂区域省份下可见的运营商档案;唯一候选自动选中,录入人身份命中时自动选中并只读。" : "先选所属区域:运营商档案须与该区域同省,否则建档会被省份一致性校验拦下。"}</FieldHint></span>
|
|
|
+ <select id="inline-operator" disabled={lockedCustomerFields || Boolean(lockedOperatorId) || !inline.regionId} value={inline.operatorId} onChange={(event) => setInlineField("operatorId", event.target.value)}>
|
|
|
+ <option value="">{inline.regionId ? "请选择运营商" : "请先选择所属区域"}</option>
|
|
|
+ {operatorChoices.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}
|
|
|
+ </select>
|
|
|
</label>
|
|
|
- <label htmlFor="inline-contact"><span className="ops-field-title">经办联系人</span><Input id="inline-contact" placeholder="客户方经办人" value={inline.contact} onChange={(event) => setInlineField("contact", event.target.value)} /></label>
|
|
|
- <label htmlFor="inline-phone"><span className="ops-field-title">联系电话</span><Input id="inline-phone" placeholder="支持固定电话或手机号" value={inline.phone} onChange={(event) => setInlineField("phone", event.target.value)} /></label>
|
|
|
- <label htmlFor="inline-address" className="ops-form-span-2"><span className="ops-field-title">地址</span><Input id="inline-address" placeholder="客户地址(含楼栋与房间号)" value={inline.address} onChange={(event) => setInlineField("address", event.target.value)} /></label>
|
|
|
- <label htmlFor="inline-region" className="ops-form-span-2"><span className="ops-field-title">挂载区域 <b title="必填">*</b></span>
|
|
|
- <TreeSelect treeData={regionTree} value={inline.regionId} onChange={(value) => setInlineField("regionId", value)} ariaLabel="挂载区域" placeholder="请选择区域节点" name="inline-region" />
|
|
|
+ <label htmlFor="inline-address"><span className="ops-field-title">客户地址</span><Input id="inline-address" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "客户档案未登记地址" : "客户地址(含楼栋与房间号)"} value={inline.address} onChange={(event) => setInlineField("address", event.target.value)} /></label>
|
|
|
+ <div className="contract-contact-field">
|
|
|
+ <span className="ops-field-title">商务联系人 <FieldHint label="商务联系人说明">客户方商务对接人:姓名与手机号成对填写,如 张伟 13800000000;可留空。</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="商务联系人姓名" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "姓名"} value={inline.businessName} onChange={(event) => setInlineField("businessName", event.target.value)} />
|
|
|
+ <Input aria-label="商务联系人电话" inputMode="tel" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "手机号"} value={inline.businessPhone} onChange={(event) => setInlineField("businessPhone", event.target.value)} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className="contract-contact-field">
|
|
|
+ <span className="ops-field-title">技术联系人 <FieldHint label="技术联系人说明">客户方技术对接人:姓名与手机号成对填写,如 张伟 13800000000;可留空。</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="技术联系人姓名" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "姓名"} value={inline.techName} onChange={(event) => setInlineField("techName", event.target.value)} />
|
|
|
+ <Input aria-label="技术联系人电话" inputMode="tel" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "手机号"} value={inline.techPhone} onChange={(event) => setInlineField("techPhone", event.target.value)} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className="contract-contact-field">
|
|
|
+ <span className="ops-field-title">财务联系人 <FieldHint label="财务联系人说明">客户方财务对接人:姓名与手机号成对填写,如 张伟 13800000000;可留空。</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="财务联系人姓名" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "姓名"} value={inline.financeName} onChange={(event) => setInlineField("financeName", event.target.value)} />
|
|
|
+ <Input aria-label="财务联系人电话" inputMode="tel" disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "未登记" : "手机号"} value={inline.financePhone} onChange={(event) => setInlineField("financePhone", event.target.value)} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <label htmlFor="inline-partner"><span className="ops-field-title">合伙人 <FieldHint label="合伙人说明">候选=负责范围覆盖所挂区域的合伙人;唯一候选自动选中,录入人身份命中时自动选中并只读,多个候选需手选。</FieldHint></span>
|
|
|
+ <select id="inline-partner" disabled={lockedCustomerFields || Boolean(lockedPartnerId) || !inline.regionId} value={inline.partnerId} onChange={(event) => setInlineField("partnerId", event.target.value)}>
|
|
|
+ <option value="">{inline.regionId ? "未匹配合伙人" : "请先选择所属区域"}</option>
|
|
|
+ {partnerChoices.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}
|
|
|
+ </select>
|
|
|
</label>
|
|
|
- <label htmlFor="inline-operator"><span className="ops-field-title">运营商 <b title="必填">*</b><FieldHint label="运营商说明">{provinceId ? "候选=所挂区域省份下可见的运营商档案(按需预选第一个,可改)。" : "先选挂载区域:运营商档案须与该区域同省,否则建档会被省份一致性校验拦下。"}</FieldHint></span>
|
|
|
- <select id="inline-operator" value={inline.operatorId} onChange={(event) => setInlineField("operatorId", event.target.value)}>
|
|
|
- <option value="">请选择运营商</option>
|
|
|
- {operatorOptions.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}
|
|
|
+ <label htmlFor="inline-operations-team"><span className="ops-field-title">运营团队 <FieldHint label="运营团队说明">按所挂区域实时反查,仅用于展示、不写入客户档案;唯一候选自动选中,录入人身份命中时自动选中并只读,多个候选需手选。</FieldHint></span>
|
|
|
+ <select id="inline-operations-team" disabled={lockedCustomerFields || Boolean(lockedOperationsTeamId) || !inline.regionId} value={inline.operationsTeamId} onChange={(event) => setInlineField("operationsTeamId", event.target.value)}>
|
|
|
+ <option value="">{!inline.regionId ? "请先选择所属区域" : lockedCustomerFields ? (regionOptions.operationsTeams.length ? "按区域反查有多个候选" : "所挂区域未匹配运营团队") : "未匹配运营团队"}</option>
|
|
|
+ {regionOptions.operationsTeams.map((item) => <option key={item.id} value={item.id}>{item.name}</option>)}
|
|
|
</select>
|
|
|
</label>
|
|
|
- <div className="customer-team-field"><span className="ops-field-title">运维团队 <b title="必填">*</b><FieldHint label="运维团队说明">单支定案:一个客户同一时刻恰好挂 1 支运维团队;默认预选范围内的第一支,可改。</FieldHint></span>
|
|
|
- <CustomerTeamSelect options={org.maintenanceTeams.map((item) => ({ id: item.id, name: item.name, hint: (item.ticketTypes ?? []).join("、") }))} value={inline.teamId} onChange={(id) => setInlineField("teamId", id)} />
|
|
|
+ <div className="customer-team-field"><span className="ops-field-title">运维团队 <b title="必填">*</b><FieldHint label="运维团队说明">单支定案:一个客户同一时刻恰好挂 1 支运维团队;候选=负责范围覆盖所挂区域的团队,唯一候选自动选中,录入人身份命中时自动选中并只读。</FieldHint></span>
|
|
|
+ <CustomerTeamSelect disabled={lockedCustomerFields || Boolean(lockedTeamId) || !inline.regionId} options={teamChoices.map((item) => ({ id: item.id, name: item.name, hint: (org.maintenanceTeams.find((team) => team.id === item.id)?.ticketTypes ?? []).join("、") }))} value={inline.teamId} onChange={(id) => setInlineField("teamId", id)} />
|
|
|
</div>
|
|
|
- <label htmlFor="inline-login"><span className="ops-field-title">主账号登录名 <small>选填</small></span><Input id="inline-login" placeholder="留空按客户号派生" value={inline.login} onChange={(event) => setInlineField("login", event.target.value)} /></label>
|
|
|
- <label htmlFor="inline-mobile"><span className="ops-field-title">主账号绑定手机号 <small>选填</small></span><Input id="inline-mobile" inputMode="numeric" maxLength={11} placeholder="11 位手机号" value={inline.mobile} onChange={(event) => setInlineField("mobile", event.target.value)} /></label>
|
|
|
+ <label htmlFor="inline-remark" className="ops-form-span-full"><span className="ops-field-title">客户备注 <small>选填</small><FieldHint label="客户备注说明">多行文本,≤512 字;随客户建档写入客户档案的备注列。命中已有客户时显示档案里的备注(只读)。</FieldHint></span>
|
|
|
+ <textarea id="inline-remark" rows={3} maxLength={512} disabled={lockedCustomerFields} placeholder={lockedCustomerFields ? "客户档案未登记备注" : "补充说明(≤512 字)"} value={inline.remark} onChange={(event) => setInlineField("remark", event.target.value)} />
|
|
|
+ </label>
|
|
|
{inline.subject === "enterprise" ? (
|
|
|
<div className="ops-form-span-2 customer-document-picker">
|
|
|
- <div><strong>营业执照影像(本通道可留空)</strong>
|
|
|
+ <div><strong>营业执照影像(选填)</strong>
|
|
|
<label className="customer-upload-button" title="选择后立即直传平台对象存储(字节流不经过本系统)">
|
|
|
<Upload size={15} />{licenseBusy ? "正在上传…" : licenseObj ? "重新选择" : "选择文件"}
|
|
|
- <input aria-label="上传营业执照影像" type="file" disabled={licenseBusy || submitting} onChange={(event) => { const file = event.target.files?.[0] ?? null; event.target.value = ""; void pickLicense(file); }} />
|
|
|
+ <input aria-label="上传营业执照影像" type="file" disabled={licenseBusy || submitting || lockedCustomerFields} onChange={(event) => { const file = event.target.files?.[0] ?? null; event.target.value = ""; void pickLicense(file); }} />
|
|
|
</label>
|
|
|
</div>
|
|
|
- <p>{licenseObj ? `已上传:${licenseObj.file_name}` : "留空=建档后到客户档案「登记材料」格补传;企业建档要求影像,本通道是唯一例外。"}</p>
|
|
|
+ <p>{licenseObj ? `已上传:${licenseObj.file_name}` : lockedCustomerFields ? archivedLicenseText : "留空=建档后到客户档案「登记材料」格补传;营业执照影像选填。"}</p>
|
|
|
{licenseError && <small className="customer-field-error">{licenseError}</small>}
|
|
|
</div>
|
|
|
) : null}
|
|
|
+ {/* 客户主账号只在建档时录入:命中已有客户时它已经存在,⛔ 显示成「沿用已有客户档案」的空输入框。 */}
|
|
|
+ {!lockedCustomerFields && <>
|
|
|
+ <div className="ops-form-span-full contract-inline-account-head"><strong>客户主账号 <small>选填</small></strong><span>建档即开通;登录名留空按客户号派生,手机号选填。</span></div>
|
|
|
+ <label htmlFor="inline-login"><span className="ops-field-title">主账号登录名 <small>选填</small></span><Input id="inline-login" placeholder="留空按客户号派生" value={inline.login} onChange={(event) => setInlineField("login", event.target.value)} /></label>
|
|
|
+ <label htmlFor="inline-mobile"><span className="ops-field-title">主账号绑定手机号 <small>选填</small></span><Input id="inline-mobile" inputMode="numeric" maxLength={11} placeholder="11 位手机号" value={inline.mobile} onChange={(event) => setInlineField("mobile", event.target.value)} /></label>
|
|
|
+ </>}
|
|
|
</div>
|
|
|
)}
|
|
|
{editing && <p className="contract-form-summary">修改合同的客户归属需要后端提供迁移接口,此处不提供换客户。</p>}
|
|
|
@@ -1217,7 +1441,7 @@ 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 || customerTerm.trim() || WORD_UNCONFIGURED) : 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>
|
|
|
@@ -1235,9 +1459,9 @@ export function ContractEditorPage() {
|
|
|
</section>;
|
|
|
}
|
|
|
|
|
|
-const CONTRACT_FREE_TEXT_HINT = "未命中客户档案:继续填下方建档必填项,保存时先建客户档案(含客户主账号)再签本合同;命中后本段自动收起。";
|
|
|
+const CONTRACT_FREE_TEXT_HINT = "未命中客户档案:请完善下方客户资料(识别号、挂载区域、运营商、运维团队必填),保存时先建客户档案(含客户主账号)再签本合同。";
|
|
|
/** 检索进行中/尚无候选时的常驻提示(⛔ 用「正在检索」替换本行,那句话改成候选列表里的一行)。 */
|
|
|
-const CONTRACT_CUSTOMER_LOOKUP_HINT = "输入客户名称(至少 2 个字)或统一社会信用代码检索:命中项直接列在输入框下方,选中后可用 × 清除重选;未命中则继续填下方建档必填项。";
|
|
|
+const CONTRACT_CUSTOMER_LOOKUP_HINT = "在客户名称中输入文字(至少 2 个字)检索已有客户:命中项直接列在输入框下方,选中即挂到该客户;未命中则完善下方客户资料,保存时先建档再签合同。";
|
|
|
|
|
|
/**
|
|
|
* 条目的「替换原订阅」块(升降配,2026-11-17)。
|