|
|
@@ -1278,9 +1278,9 @@ export function ContractEditorPage() {
|
|
|
return <section className="ops-page ops-record-page contract-editor">
|
|
|
<header className="ops-page-head">
|
|
|
<div>
|
|
|
- <p className="contract-editor-eyebrow">CONTRACT / {editing ? "EDIT" : "CREATE"}</p>
|
|
|
- <h1>{editing ? "编辑合同" : "新增合同"}</h1>
|
|
|
- <p>{editing ? `合同 ${no}` : "完善签约客户与商务约定,配置本次订购的链路和服务。"}</p>
|
|
|
+ <p className="ops-eyebrow"><span /> 合同管理 · {editing ? "编辑" : "签订"}</p>
|
|
|
+ <h1>{editing ? "编辑合同" : "合同签订表单"}</h1>
|
|
|
+ <p>{editing ? `合同 ${no}` : "采集客户、商务、订购额度与合规信息,用于生成合同快照、资源额度和后续工单的授权依据。"}</p>
|
|
|
</div>
|
|
|
<div className="ops-head-actions">
|
|
|
<Button variant="outline" size="sm" onClick={() => navigate("/contracts")}><ArrowLeft size={15} />返回合同台账</Button>
|
|
|
@@ -1291,15 +1291,8 @@ export function ContractEditorPage() {
|
|
|
{!record.loading && !record.error && editing && !record.data && <div className="ops-record-layout"><section className="ops-record-card ops-record-card-full"><h2>合同资料</h2><p className="contract-form-summary">未找到合同 {no},可能已被删除。请从合同台账重新进入,或返回台账检索。</p><div className="ops-form-actions"><Button variant="outline" size="sm" onClick={() => navigate("/contracts")}>返回合同台账</Button></div></section></div>}
|
|
|
{(!editing || record.data) && <div className="ops-record-layout">
|
|
|
<div className="ops-record-stack">
|
|
|
- <nav className="contract-editor-nav" aria-label="合同表单分区">
|
|
|
- {[['customer', '客户资料', '确认签约主体'], ['business', '商务信息', '约定价格与期间'], ['services', '服务构成', '配置链路与服务']].map(([id, title, description], index) => (
|
|
|
- <button key={id} type="button" onClick={() => { const section = document.getElementById(`contract-editor-${id}`); section?.focus({ preventScroll: true }); section?.scrollIntoView({ block: 'start' }); }}>
|
|
|
- <span>0{index + 1}</span><div><strong>{title}</strong><small>{description}</small></div>
|
|
|
- </button>
|
|
|
- ))}
|
|
|
- </nav>
|
|
|
- <section id="contract-editor-customer" tabIndex={-1} aria-labelledby="contract-editor-customer-title" className="ops-record-card">
|
|
|
- <div className="customer-form-section-title"><span>01</span><div><h2 id="contract-editor-customer-title">客户资料</h2><p>搜索已有客户,或直接填写资料建立新档案。</p></div></div>
|
|
|
+ <section className="ops-record-card">
|
|
|
+ <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>
|
|
|
@@ -1371,7 +1364,6 @@ export function ContractEditorPage() {
|
|
|
*/}
|
|
|
{!editing && (
|
|
|
<div className="ops-form-grid ops-form-grid--business contract-customer-fields">
|
|
|
- <h3 className="contract-editor-group ops-form-span-full">归属与服务团队</h3>
|
|
|
<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={lockedIdentityFields ? "客户档案未挂载区域" : "请选择区域节点"} name="inline-region" disabled={lockedIdentityFields} />
|
|
|
</label>
|
|
|
@@ -1384,6 +1376,28 @@ export function ContractEditorPage() {
|
|
|
</select>
|
|
|
</RegionGate>
|
|
|
</label>
|
|
|
+ <label htmlFor="inline-address"><span className="ops-field-title">客户地址 <FieldHint label="客户地址说明">{matchedCustomer ? "可改;随合同保存写回客户档案。" : "客户地址(含楼栋与房间号);随客户建档写入。"}</FieldHint></span><Input id="inline-address" placeholder="客户地址(含楼栋与房间号)" value={inline.address} onChange={(event) => setInlineField("address", event.target.value)} /></label>
|
|
|
+ <div className="contract-contact-field">
|
|
|
+ <span className="ops-field-title">商务联系人 <FieldHint label="商务联系人说明">客户方商务对接人:姓名与手机号成对填写,如 张伟 13800000000;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="商务联系人姓名" placeholder="姓名" value={inline.businessName} onChange={(event) => setInlineField("businessName", event.target.value)} />
|
|
|
+ <Input aria-label="商务联系人电话" inputMode="tel" placeholder="手机号" 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;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="技术联系人姓名" placeholder="姓名" value={inline.techName} onChange={(event) => setInlineField("techName", event.target.value)} />
|
|
|
+ <Input aria-label="技术联系人电话" inputMode="tel" placeholder="手机号" 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;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
+ <div className="contract-contact-pair">
|
|
|
+ <Input aria-label="财务联系人姓名" placeholder="姓名" value={inline.financeName} onChange={(event) => setInlineField("financeName", event.target.value)} />
|
|
|
+ <Input aria-label="财务联系人电话" inputMode="tel" placeholder="手机号" value={inline.financePhone} onChange={(event) => setInlineField("financePhone", event.target.value)} />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<label htmlFor="inline-partner">
|
|
|
<RegionGate gated={!inline.regionId}>
|
|
|
<span className="ops-field-title">合伙人 <FieldHint label="合伙人说明">{matchedCustomer ? "按所挂区域负责范围自动算出(唯一候选自动选中,0/多个留空),只读;不随本合同改写客户归属。" : "候选=负责范围覆盖所挂区域的合伙人;唯一候选自动选中,录入人身份命中时自动选中并只读,多个候选需手选。"}</FieldHint></span>
|
|
|
@@ -1414,30 +1428,7 @@ export function ContractEditorPage() {
|
|
|
/>
|
|
|
</RegionGate>
|
|
|
</div>
|
|
|
- <h3 className="contract-editor-group ops-form-span-full">联系信息</h3>
|
|
|
- <label htmlFor="inline-address" className="ops-form-span-full"><span className="ops-field-title">客户地址 <FieldHint label="客户地址说明">{matchedCustomer ? "可改;随合同保存写回客户档案。" : "客户地址(含楼栋与房间号);随客户建档写入。"}</FieldHint></span><Input id="inline-address" placeholder="客户地址(含楼栋与房间号)" value={inline.address} onChange={(event) => setInlineField("address", event.target.value)} /></label>
|
|
|
- <div className="contract-contact-field">
|
|
|
- <span className="ops-field-title">商务联系人 <FieldHint label="商务联系人说明">客户方商务对接人:姓名与手机号成对填写,如 张伟 13800000000;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
- <div className="contract-contact-pair">
|
|
|
- <Input aria-label="商务联系人姓名" placeholder="姓名" value={inline.businessName} onChange={(event) => setInlineField("businessName", event.target.value)} />
|
|
|
- <Input aria-label="商务联系人电话" inputMode="tel" placeholder="手机号" 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;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
- <div className="contract-contact-pair">
|
|
|
- <Input aria-label="技术联系人姓名" placeholder="姓名" value={inline.techName} onChange={(event) => setInlineField("techName", event.target.value)} />
|
|
|
- <Input aria-label="技术联系人电话" inputMode="tel" placeholder="手机号" 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;可留空。{matchedCustomer ? "可改,随合同保存写回客户档案。" : ""}</FieldHint></span>
|
|
|
- <div className="contract-contact-pair">
|
|
|
- <Input aria-label="财务联系人姓名" placeholder="姓名" value={inline.financeName} onChange={(event) => setInlineField("financeName", event.target.value)} />
|
|
|
- <Input aria-label="财务联系人电话" inputMode="tel" placeholder="手机号" value={inline.financePhone} onChange={(event) => setInlineField("financePhone", event.target.value)} />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <label htmlFor="inline-remark" className="ops-form-span-full"><span className="ops-field-title">客户备注 <small>选填</small><FieldHint label="客户备注说明">多行文本,≤512 字。{matchedCustomer ? "可改;随合同保存写回客户档案。" : "随客户建档写入客户档案的备注列。"}</FieldHint></span>
|
|
|
+ <label htmlFor="inline-remark" className="ops-form-span-full"><span className="ops-field-title">客户备注</span>
|
|
|
<textarea id="inline-remark" rows={3} maxLength={512} placeholder="补充说明(≤512 字)" value={inline.remark} onChange={(event) => setInlineField("remark", event.target.value)} />
|
|
|
</label>
|
|
|
{inline.subject === "enterprise" ? (
|
|
|
@@ -1463,7 +1454,7 @@ export function ContractEditorPage() {
|
|
|
>
|
|
|
<span className="contract-license-drop-body">
|
|
|
<Upload size={22} />
|
|
|
- <strong>营业执照影像(选填)</strong>
|
|
|
+ <strong>营业执照影像</strong>
|
|
|
<span>{licenseObj
|
|
|
? `已上传:${licenseObj.file_name}${matchedCustomer ? "(随合同保存写回客户档案)" : ""}`
|
|
|
: licenseBusy
|
|
|
@@ -1487,19 +1478,19 @@ export function ContractEditorPage() {
|
|
|
) : null}
|
|
|
{/* 客户主账号只在建档时录入:命中已有客户时它已经存在,⛔ 显示成「沿用已有客户档案」的空输入框。 */}
|
|
|
{!matchedCustomer && <>
|
|
|
- <h3 className="contract-editor-group ops-form-span-full">客户主账号 <small>选填 · 登录名留空将自动生成</small></h3>
|
|
|
- <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 className="ops-form-span-full contract-inline-account-head"><strong>客户主账号</strong></div>
|
|
|
+ <label htmlFor="inline-login"><span className="ops-field-title">主账号登录名</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">主账号绑定手机号</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>}
|
|
|
</section>
|
|
|
|
|
|
- <section id="contract-editor-business" tabIndex={-1} aria-labelledby="contract-editor-business-title" className="ops-record-card">
|
|
|
+ <section className="ops-record-card">
|
|
|
<div className="customer-form-section-title">
|
|
|
<span>02</span>
|
|
|
- <div><h2 id="contract-editor-business-title">商务信息</h2><p>确认合同类型、经办人及服务期间。</p></div>
|
|
|
+ <div><h2>合同基本信息</h2><p>记录签约信息与服务期间。</p></div>
|
|
|
{/**
|
|
|
* 合同金额=自动汇总、不可手改:去掉输入框形态,挂在分区标题行右侧(与侧栏「最终合同金额」同口径)。
|
|
|
* `id="contract-amount"` 保留给必填红显/断言锚点;`aria-invalid` 仍走 `invalidOf("amount")`。
|
|
|
@@ -1516,8 +1507,8 @@ export function ContractEditorPage() {
|
|
|
* 变更=沿用旧期间+全量带出(期间可改)。
|
|
|
*/}
|
|
|
{!editing && draft.contractType !== "new" && (
|
|
|
- <div className="ops-form-grid contract-renew-block">
|
|
|
- <label htmlFor="renew-from"><span className="ops-field-title">{carryLabel}{draft.contractType === "renew" ? <b title="必填">*</b> : <small>可选</small>}<FieldHint label={`${carryLabel}说明`}>{carryHint}</FieldHint></span>
|
|
|
+ <div className="contract-renew-block">
|
|
|
+ <label htmlFor="renew-from"><span className="ops-field-title">{carryLabel}{draft.contractType === "renew" ? <b title="必填">*</b> : null}<FieldHint label={`${carryLabel}说明`}>{carryHint}</FieldHint></span>
|
|
|
<select id="renew-from" data-placeholder={!renewFrom} value={renewFrom} disabled={renewLoading || submitting || !customerId} onChange={(event) => void pickRenewal(event.target.value)}>
|
|
|
<option value="">{customerId ? "请选择旧合同" : "先在上方 01 选定客户,再选旧合同"}</option>
|
|
|
{/* 深链续签源若不在客户合同列表里(已归档等),补一个同文案的选项,⛔ 让下拉空着。 */}
|
|
|
@@ -1537,7 +1528,7 @@ export function ContractEditorPage() {
|
|
|
{CONTRACT_TYPES.map((item) => <option key={item.value} value={item.value}>{item.label}</option>)}
|
|
|
</select>
|
|
|
</label>
|
|
|
- <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="contract-no"><span className="ops-field-title">合同编号</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>
|
|
|
|
|
|
{/*
|
|
|
@@ -1556,20 +1547,20 @@ export function ContractEditorPage() {
|
|
|
<label htmlFor="sign-date"><span className="ops-field-title">签署日期 <b title="必填">*</b><FieldHint label="签署日期说明">交接日期即签署日期(2026-11-19 定案),表单只留这一格;提交时同值写入合同的签署日期与交接日期两列。新建默认录入当日。</FieldHint></span><Input id="sign-date" type="date" aria-invalid={invalidOf("signDate")} value={draft.signDate} onChange={(event) => set("signDate", event.target.value)} />{requiredErrorOf("signDate")}</label>
|
|
|
<label htmlFor="contract-discount"><span className="ops-field-title">折扣率(%) <b title="必填">*</b><FieldHint label="折扣率说明">默认 100,取值 1~100(最多两位小数)。最终合同金额=套餐总金额×折扣率/100;套餐总=Σ(档位年价×份数×计费系数)。折扣只改合同总额,不进订阅冻结价。折后金额见本卡片标题行右侧。</FieldHint></span><Input id="contract-discount" type="number" min={1} max={100} step={0.01} inputMode="decimal" placeholder="100" aria-invalid={parseDiscountRate(draft.discountRate) === null ? true : undefined} value={draft.discountRate} onChange={(event) => set("discountRate", event.target.value)} /></label>
|
|
|
|
|
|
- {/* 服务期(月):替代原「付款周期」,输入框下方提供月/季/年/3 年快捷档(点一下直接填月数)。 */}
|
|
|
+ {/* 服务期(月):替代原「付款周期」,标题右侧挂月/季/年/3 年快捷档(点一下直接填月数)。 */}
|
|
|
<div className="contract-months-cell">
|
|
|
- <span className="ops-field-title">服务期(月) <b title="必填">*</b>
|
|
|
- <FieldHint label="服务期说明">{monthsLocked
|
|
|
- ? "扩容补充协议:到期日锁在原合同止期 ⇒ 服务期=所选生效日撑到止期的月数,随生效日自动换算,不可手填。"
|
|
|
- : "可填 1~600 的整数月;也可使用下方快捷档(月 1/季 3/年 12/3 年 36)。到期日期=生效日+服务期(月)−1 天,该月无对应日先取月末,不可手改。"}</FieldHint>
|
|
|
- </span>
|
|
|
- <Input id="service-months" aria-label="服务期(月)" type="number" min={1} max={600} step={1} inputMode="numeric" placeholder="1~600" readOnly={monthsLocked} aria-readonly={monthsLocked || undefined} aria-invalid={invalidOf("serviceMonths")} value={draft.serviceMonths} onChange={(event) => set("serviceMonths", event.target.value)} />
|
|
|
- {!monthsLocked && <div className="contract-editor-presets" role="group" aria-label="服务期快捷档">
|
|
|
+ <span className="ops-field-title"><label htmlFor="service-months">服务期(月)</label> <b title="必填">*</b>
|
|
|
+ {!monthsLocked && <span className="contract-months-presets" role="group" aria-label="服务期快捷档">
|
|
|
{SERVICE_MONTH_PRESETS.map((preset) => {
|
|
|
const active = draft.serviceMonths.trim() === String(preset.months);
|
|
|
- return <Button key={preset.months} type="button" size="sm" variant={active ? "secondary" : "outline"} aria-pressed={active} onClick={() => set("serviceMonths", String(preset.months))}>{preset.label}</Button>;
|
|
|
+ return <button key={preset.months} type="button" className={active ? "is-active" : ""} aria-pressed={active} onClick={() => set("serviceMonths", String(preset.months))}>{preset.label}</button>;
|
|
|
})}
|
|
|
- </div>}
|
|
|
+ </span>}
|
|
|
+ <FieldHint label="服务期说明">{monthsLocked
|
|
|
+ ? "扩容补充协议:到期日锁在原合同止期 ⇒ 服务期=所选生效日撑到止期的月数,随生效日自动换算,不可手填。"
|
|
|
+ : "可填 1~600 的整数月;也可点标题右侧的快捷档(月 1/季 3/年 12/3 年 36)。到期日期=生效日+服务期(月)−1 天,该月无对应日先取月末,不可手改。"}</FieldHint>
|
|
|
+ </span>
|
|
|
+ <Input id="service-months" type="number" min={1} max={600} step={1} inputMode="numeric" placeholder="1~600" readOnly={monthsLocked} aria-readonly={monthsLocked || undefined} aria-invalid={invalidOf("serviceMonths")} value={draft.serviceMonths} onChange={(event) => set("serviceMonths", event.target.value)} />
|
|
|
{requiredErrorOf("serviceMonths")}
|
|
|
</div>
|
|
|
<label htmlFor="start-date"><span className="ops-field-title">生效日期 <b title="必填">*</b>{startLocked && <FieldHint label="生效日期说明">{draft.contractType === "change" ? "变更协议:生效日锁定在原合同生效日(期间沿用原合同)。" : "续签:生效日期=旧合同结束日的次日(该日早于今天时取今天),锁定不可改;改服务期只会重算到期日期。"}</FieldHint>}{monthsLocked && <FieldHint label="生效日期说明">扩容补充协议:默认业务当天,可调整;到期日锁在原合同止期,服务期随生效日自动换算。</FieldHint>}</span><Input id="start-date" type="date" readOnly={startLocked} aria-readonly={startLocked || undefined} aria-invalid={invalidOf("start")} value={draft.start} onChange={(event) => set("start", event.target.value)} />{requiredErrorOf("start")}</label>
|
|
|
@@ -1585,7 +1576,6 @@ export function ContractEditorPage() {
|
|
|
return <Input id="end-date" type="date" value={draft.end} readOnly={!editable} aria-readonly={!editable} onChange={(event) => set("end", event.target.value)} />;
|
|
|
})()}</label>
|
|
|
</div>
|
|
|
- {draft.contractType === "expand" && <p className="ops-field-note contract-type-hint">合同类型为「扩容补充协议」:03 服务构成须全部为增量叠加服务(引用本客户既有跨境链路订阅,不新开链路)。</p>}
|
|
|
{/*
|
|
|
* 「录入经办人」块已下线(业主 2026-11-19):录入账号由服务端从鉴权上下文写入
|
|
|
* (`created_by*` 三列、建后恒只读 KLT-L221),合同表单不必再回显一遍——
|
|
|
@@ -1610,7 +1600,7 @@ export function ContractEditorPage() {
|
|
|
>
|
|
|
<span className="contract-license-drop-body">
|
|
|
<Upload size={22} />
|
|
|
- <strong>合同附件(选填)</strong>
|
|
|
+ <strong>合同附件</strong>
|
|
|
<span>{attachmentObj
|
|
|
? `已上传:${attachmentObj.file_name}`
|
|
|
: attachmentBusy
|
|
|
@@ -1632,8 +1622,8 @@ export function ContractEditorPage() {
|
|
|
{attachmentError && <small className="customer-field-error">{attachmentError}</small>}
|
|
|
</section>
|
|
|
|
|
|
- <section id="contract-editor-services" tabIndex={-1} aria-labelledby="contract-editor-services-title" className="ops-record-card">
|
|
|
- <div className="customer-form-section-title"><span>03</span><div><h2 id="contract-editor-services-title">服务构成</h2><p>选择套餐与线路出口,在链路下添加所需的叠加服务。</p></div></div>
|
|
|
+ <section className="ops-record-card">
|
|
|
+ <div className="customer-form-section-title"><span>03</span><div><h2>服务构成</h2><p>按目录档位选择(跨境链路 × 1/叠加服务 × 份数)。</p></div></div>
|
|
|
{!plans.length && <p className="contract-form-summary">{catalog.error ? <>套餐配置取数失败:{catalog.error.message}</> : catalog.loading ? "正在载入套餐配置…" : "套餐配置暂无可选档位。"}</p>}
|
|
|
{exitCatalog.error && <FetchError message={exitCatalog.error.message} onRetry={exitCatalog.reload} />}
|
|
|
{!exitCatalog.loading && !exitCatalog.error && !exitOptions.length && <p className="contract-form-summary">套餐配置尚未配置线路出口;请先到「套餐配置 → 线路出口」维护。</p>}
|
|
|
@@ -1643,9 +1633,9 @@ export function ContractEditorPage() {
|
|
|
* 整行只读(灰底+锁标),本合同的叠加服务只能挂在这条引用下面。
|
|
|
*/}
|
|
|
{/* 合同类型已上移到 02 合同基本信息(2026-11-19):此处只按类型呈现录入模式,⛔ 再给一套并行的类型开关。 */}
|
|
|
- {draft.increment && !editing && <p className="ops-form-span-full contract-form-summary">合同类型为「扩容补充协议」:不新建链路,只引用本客户一条在期跨境链路订阅并叠加叠加服务(D-9)。</p>}
|
|
|
+ {draft.increment && !editing && <p className="ops-form-span-full contract-form-summary">选择一条在期链路,为它添加叠加服务。</p>}
|
|
|
{draft.increment && !editing && (
|
|
|
- <div className="ops-form-grid contract-reference-picker ops-form-span-full">
|
|
|
+ <div className="ops-form-span-full">
|
|
|
<label htmlFor="increment-link"><span className="ops-field-title">引用既有跨境链路订阅 <b title="必填">*</b><FieldHint label="引用既有跨境链路订阅说明">只列本客户 status=active、未到期、plan_family=link 的订阅;引用后该节点只读,要换链路请另开一份增量合同,⛔ 在原合同上改引。</FieldHint></span></label>
|
|
|
<select id="increment-link" aria-label="引用既有跨境链路订阅" data-placeholder value="" onChange={(event) => { addIncrementItem(event.target.value); event.target.value = ""; }} disabled={!customerId || linkSubscriptions.loading}>
|
|
|
<option value="">{!customerId ? "请先选定签约客户" : linkSubscriptions.loading ? "正在读取该客户在期链路订阅…" : linkOptions.length ? "选择本客户在期链路订阅(可跨合同)" : "该客户没有在期的跨境链路订阅"}</option>
|
|
|
@@ -1696,7 +1686,7 @@ export function ContractEditorPage() {
|
|
|
<span className="ops-contract-index">{roleMark}</span>
|
|
|
<Button variant="ghost" size="sm" className="ops-contract-item-remove" aria-label={`删除${roleMark}`} title={child ? "删除该叠加服务(父行保留)" : "删除该条目(其下叠加服务一并删除)"} onClick={() => removeItem(index)}><Trash2 size={15} /></Button>
|
|
|
</header>
|
|
|
- <div className={`ops-form-grid ops-contract-item-grid${stackable ? " has-qty" : ""}`}>
|
|
|
+ <div className={`ops-contract-item-grid${stackable ? " has-qty" : ""}`}>
|
|
|
<div className="ops-contract-plan-cell">
|
|
|
<div className="ops-contract-plan-title">
|
|
|
<span className="ops-field-title">套餐档位 <b title="必填">*</b></span>
|
|
|
@@ -1727,7 +1717,7 @@ export function ContractEditorPage() {
|
|
|
{inheritsExit ? (
|
|
|
<div className="ops-contract-exit-cell">
|
|
|
<span className="ops-field-title">线路出口 <small>{item.itemMode === "increment" ? "依从引用" : "依从父行"}</small></span>
|
|
|
- <Input aria-label="继承的线路出口" readOnly value={inheritedExits.join("、")} placeholder={item.itemMode === "increment" ? "引用链路未登记出口" : "父条目尚未选择"} title="叠加服务沿用所挂链路的线路出口" />
|
|
|
+ <span className="ops-contract-exit-inherited" data-placeholder={!inheritedExits.length} title="叠加服务不单独选线路出口:恒依从所挂跨境链路的出口">{inheritedExits.join("、") || (item.itemMode === "increment" ? "引用链路未登记出口" : "父条目尚未选择")}</span>
|
|
|
</div>
|
|
|
) : legacyMultiExit ? (
|
|
|
/* 2026-11-17 出口改单选后的历史多出口条目:只读呈现,⛔ 可改。 */
|
|
|
@@ -1787,25 +1777,34 @@ export function ContractEditorPage() {
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <aside className="ops-record-side" aria-label="合同确认">
|
|
|
- <section className="ops-record-card contract-editor-review">
|
|
|
- <div className="contract-editor-review-head"><span>签约预览</span><h2>{editing ? customerLabel : customerTerm || "待选择客户"}</h2><p>{CONTRACT_TYPES.find((item) => item.value === draft.contractType)?.label}</p></div>
|
|
|
- <div className="contract-editor-total"><span>合同金额</span><strong aria-live="polite">{sideMetrics.finalAmount}</strong></div>
|
|
|
+ <aside className="ops-record-side">
|
|
|
+ {/* 业务口径摘要(原型同款):随所选档位×份数实时汇总,⛔ 手填。 */}
|
|
|
+ <section className="ops-record-card">
|
|
|
+ <h2>业务口径摘要</h2>
|
|
|
<div className="ops-contract-summary contract-side-kv">
|
|
|
<div><span>订购项</span><strong>{sideMetrics.items} 条</strong></div>
|
|
|
<div><span>服务期</span><strong>{sideMetrics.serviceMonths}</strong></div>
|
|
|
<div><span>月度费用合计</span><strong>{sideMetrics.fee}</strong></div>
|
|
|
<div><span>套餐总金额</span><strong>{sideMetrics.packageTotal}</strong></div>
|
|
|
<div><span>折扣率</span><strong>{sideMetrics.discountRate}</strong></div>
|
|
|
+ <div><span>最终合同金额</span><strong>{sideMetrics.finalAmount}</strong></div>
|
|
|
</div>
|
|
|
- <div className="contract-editor-completion">
|
|
|
- <div><span>必填完成度</span><strong>{requiredProgress.done} / {requiredProgress.total}</strong></div>
|
|
|
- <div className="contract-progress" role="progressbar" aria-valuemin={0} aria-valuemax={100} aria-valuenow={requiredProgress.pct} aria-label="必填完成度"><i style={{ width: `${requiredProgress.pct}%` }} /></div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section className="ops-record-card">
|
|
|
+ <h2>必填完成度</h2>
|
|
|
+ <div className="contract-progress" role="progressbar" aria-valuemin={0} aria-valuemax={100} aria-valuenow={requiredProgress.pct} aria-label="必填完成度"><i style={{ width: `${requiredProgress.pct}%` }} /></div>
|
|
|
+ <div className="ops-contract-summary contract-side-kv">
|
|
|
+ <div><span>已填 / 必填</span><strong>{requiredProgress.done} / {requiredProgress.total}</strong></div>
|
|
|
</div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ {/* 动作区(2026-11-19):不再列「提交后系统生成」说明,只留提交与取消。 */}
|
|
|
+ <section className="ops-record-card">
|
|
|
{error && <p className="ops-form-error" role="alert">{error}</p>}
|
|
|
- <div className="contract-editor-submit">
|
|
|
- <Button disabled={submitting || replacementBusy || (editing && record.loading)} onClick={save}>{submitting ? "正在提交…" : replacementBusy ? "正在比对替换候选…" : editing ? "保存修改" : "创建合同"}</Button>
|
|
|
- <Button variant="outline" onClick={() => navigate(-1)}>取消</Button>
|
|
|
+ <div className="ops-form-actions">
|
|
|
+ <Button size="sm" disabled={submitting || replacementBusy || (editing && record.loading)} onClick={save}>{submitting ? "正在提交…" : replacementBusy ? "正在比对替换候选…" : editing ? "保存修改" : "校验并提交"}</Button>
|
|
|
+ <Button size="sm" variant="outline" onClick={() => navigate(-1)}>取消</Button>
|
|
|
</div>
|
|
|
</section>
|
|
|
</aside>
|