Archived
chore(w05): 在途改动落下 —— 启动表单收到三格、humanWrites 那一版清单
上一轮的工作树遗留(packageVersion 1.6.5 → 1.7.3):客户编码与客户名称从启动表单撤下, 三格全选填;活动内部仍认客户,运营端起的单缺这两个键的账已记在注释里。 本轮机制改造不碰活动包,先把它落下,免得混进后面的 diff。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LKMZDwMbyKzjw6Hembwvet
This commit is contained in:
@@ -56,8 +56,11 @@ describe('清单本身合规', () => {
|
||||
expect(manifest.contract.resources.budget.humanCalls).toBeGreaterThan(12);
|
||||
});
|
||||
|
||||
it('起单只必填 4 项(客户 / 需求 / 原 PN / 候选数组);datasheet 是选填文件', () => {
|
||||
expect(manifest.contract.input.data['required']).toEqual(['customerCode', 'requestDescription', 'originalInternalPn', 'candidateInternalPns']);
|
||||
it('起单一格必填都不设(2026-08-28 用户定);客户两格同日从启动表单撤下;datasheet 是选填文件', () => {
|
||||
expect(manifest.contract.input.data['required']).toEqual([]);
|
||||
const launchProps = Object.keys(manifest.contract.input.data['properties'] as Record<string, unknown>);
|
||||
expect(launchProps).not.toContain('customerCode');
|
||||
expect(launchProps).not.toContain('customerName');
|
||||
const properties = manifest.contract.input.data['properties'] as Record<string, { type?: string; format?: string }>;
|
||||
expect(properties['candidateInternalPns']?.type).toBe('array');
|
||||
expect(properties['datasheets']?.format).toBe('file');
|
||||
|
||||
@@ -90,7 +90,7 @@ export const manifest: ActivityManifest = {
|
||||
identity: {
|
||||
activityId: ACTIVITY_ID,
|
||||
name: 'ACT-WORK-05 · 差异评估',
|
||||
packageVersion: '1.6.5',
|
||||
packageVersion: '1.7.3',
|
||||
category: '需求分析与方案匹配',
|
||||
sdkVersion: '0.1.0-m5',
|
||||
checksum: 'dev-checksum-part-substitution-assessment',
|
||||
@@ -102,14 +102,19 @@ export const manifest: ActivityManifest = {
|
||||
version: '1.0.0',
|
||||
input: {
|
||||
/*
|
||||
* 一键启动只收 4 项(文档《一键启动入参说明》极简原则):客户 / 客户需求 / 原 PN / 候选 PN 数组。
|
||||
* 一键启动的表单只摆 3 格(2026-08-28 用户定):需求 / 原 PN / 候选 PN 数组 ——
|
||||
* 客户编码、客户名称两格从**启动表单**撤下,上下文都写进「需求」那一格。
|
||||
* 应用场景、BOM 位、替代类型、规则版本、负责人期限**不是入参** —— 启动后在执行工单 01 里补。
|
||||
* datasheet 选填文件:传了 AI 在数据工单件上预填,没传人全填(文档 0c:同为合法路径)。
|
||||
* `customerName` 只在客户不在库(分支 0a)时用:S0 发数据录入卡建档,名字先摆上去让人核。
|
||||
*
|
||||
* ⚠️ **活动内部仍认客户**:说明书与 S0 剧本按 `customerCode` 查客户档案、P-01 的 `customer_code`
|
||||
* 是必填且引用 `customer.profile` —— 测试台 / 样例仍带着这两个键,那条路照旧;
|
||||
* 而**运营端启动的单没有这两个键**,S0 到客户那一步会缺料。要让运营端也跑通,得另定客户从哪儿来。
|
||||
*/
|
||||
data: {
|
||||
type: 'object',
|
||||
required: ['customerCode', 'requestDescription', 'originalInternalPn', 'candidateInternalPns'],
|
||||
/* 2026-08-28 用户定:启动表单**一格必填都不设**(三格全选填) */
|
||||
required: [],
|
||||
/*
|
||||
* 运营端「启动活动」表单照这几个字段渲染(2026-08-27,`docs/API文档-活动模块.md` §4):
|
||||
* `x-control` 定控件(combo = 选择 + 新增,textarea = 多行),`x-options` 指候选从哪张正式台账现读,`x-order` 定表单次序
|
||||
@@ -118,29 +123,13 @@ export const manifest: ActivityManifest = {
|
||||
* datasheets 是文件,本期不上启动表单(在数据工单里传)。
|
||||
*/
|
||||
properties: {
|
||||
customerCode: {
|
||||
type: 'string',
|
||||
title: '客户',
|
||||
description: '台账里有就直接选;是新客户就自己填客户编码,启动后派数据录入卡建档。',
|
||||
examples: ['CU-0142'],
|
||||
'x-control': 'combo',
|
||||
'x-options': { ledger: 'customer.profile', value: 'customer_code', label: 'name' },
|
||||
'x-order': 1,
|
||||
},
|
||||
customerName: {
|
||||
type: 'string',
|
||||
title: '客户名称(仅客户不在库时填)',
|
||||
description: '新客户先把名字摆上,启动后建档时让人核。',
|
||||
examples: ['深圳恒星电源有限公司'],
|
||||
'x-order': 2,
|
||||
},
|
||||
requestDescription: {
|
||||
type: 'string',
|
||||
title: '客户需求',
|
||||
description: '保留原始需求语义,据此新建 P-01 需求主记录(版本 V1)。',
|
||||
examples: ['工业电源项目在用 LM2596S-5.0(TI,12V→5V),原厂 PCN 转 NRND,客户要求验证替代料'],
|
||||
title: '需求',
|
||||
description: '这一单要评估什么、什么应用、什么约束,原话照写(客户、场景、温域、上限都写在这一格里);据此新建 P-01 需求主记录(版本 V1)。',
|
||||
examples: ['工业电源项目在用 LM2596S-5.0(TI,12V→5V),原厂 PCN 转 NRND,要求验证替代料;应用 12V→5V、工业温域、输入上限 40V'],
|
||||
'x-control': 'textarea',
|
||||
'x-order': 3,
|
||||
'x-order': 1,
|
||||
},
|
||||
originalInternalPn: {
|
||||
type: 'string',
|
||||
@@ -149,7 +138,7 @@ export const manifest: ActivityManifest = {
|
||||
examples: ['LM2596S-5.0'],
|
||||
'x-control': 'combo',
|
||||
'x-options': { ledger: 'parts.profile', value: 'internal_pn', label: 'internal_pn' },
|
||||
'x-order': 4,
|
||||
'x-order': 2,
|
||||
},
|
||||
candidateInternalPns: {
|
||||
type: 'array',
|
||||
@@ -160,7 +149,7 @@ export const manifest: ActivityManifest = {
|
||||
/* 运营端启动表单只选一颗(2026-08-27 用户定):摆成与原料号同款的下拉;提交的单个料号由后端包成一元数组,活动契约不变 */
|
||||
'x-control': 'combo',
|
||||
'x-options': { ledger: 'parts.profile', value: 'internal_pn', label: 'internal_pn' },
|
||||
'x-order': 5,
|
||||
'x-order': 3,
|
||||
},
|
||||
datasheets: {
|
||||
type: 'array',
|
||||
|
||||
Reference in New Issue
Block a user