feat(todos): 技术方案骨架确认待办分支(tech_template_confirm,投标批2)——todo_detail渲染确认/驳回按钮(端点走pipeline-bidding自持api,驳回必填意见),my_todos_popup补标签色

This commit is contained in:
ymq 2026-09-15 14:59:52 +08:00
parent 6a10e80794
commit 9d49ccdc14
2 changed files with 37 additions and 0 deletions

View File

@ -16,12 +16,14 @@ TYPE_LABEL = {
'design_confirmation': '设计确认',
'bug_acceptance': 'Bug 验收',
'flow_plan_confirm': '流程裁剪确认',
'tech_template_confirm': '技术方案骨架确认',
}
TYPE_COLOR = {
'requirement_confirmation': '#2563eb',
'design_confirmation': '#2563eb',
'bug_acceptance': '#f0a040',
'flow_plan_confirm': '#7c3aed',
'tech_template_confirm': '#0891b2',
}
detail_url = entire_url("/pipeline-sdlc/api/todo_detail.dspy")

View File

@ -23,6 +23,7 @@ TYPE_LABEL = {
'bug_acceptance': 'Bug 验收',
'kb_ingest_confirm': '知识库入库建议',
'flow_plan_confirm': '流程裁剪确认',
'tech_template_confirm': '技术方案骨架确认',
}
TYPE_COLOR = {
'requirement_confirmation': '#2563eb',
@ -30,6 +31,7 @@ TYPE_COLOR = {
'bug_acceptance': '#f0a040',
'kb_ingest_confirm': '#10b981',
'flow_plan_confirm': '#7c3aed',
'tech_template_confirm': '#0891b2',
}
@ -574,6 +576,39 @@ async with DBPools().sqlorContext(dbname) as sor:
md.append('未找到对应的流程裁剪计划记录。')
md.append('')
elif task_type == 'tech_template_confirm':
# 技术方案书章节骨架确认(投标产线纯技术方案流程 bid_tech_proposal2026-09-15
# description 已含骨架预览表propose_tech_template 渲染),这里只补确认/驳回按钮。
# 端点在投标模块自持(/pipeline-bidding/api/tech_template_confirm.dspy
tt_url = entire_url("/pipeline-bidding/api/tech_template_confirm.dspy")
_tt_status = _s(getattr(h, 'status', ''))
if _tt_status != 'pending':
md.append('## 骨架状态')
md.append('')
md.append('该确认已处理(当前状态:' + (_tt_status or '-') + '),无需再确认。')
md.append('')
else:
action_widgets.append(_input_box(
'tt_comment', '驳回意见(驳回时必填,助手按意见修订骨架后重新提案)',
'请填写驳回意见:换模版/调章节/补覆盖…'))
tt_ok = (_post_js(tt_url, [('human_task_id', _json.dumps(oid)),
('decision', "'confirm'"), ('comment', "''")]) + _tail)
tt_no = (_read_input_js('tt_comment') +
"if(!cv){var mn=new bricks.Message({title:'请填写驳回意见',"
"message:'驳回前请说明骨架要怎么改(助手按意见修订重提)'});mn.open();return;}" +
_post_js(tt_url, [('human_task_id', _json.dumps(oid)),
('decision', "'reject'"), ('comment', 'cv')]) + _tail)
action_widgets.append({
"widgettype": "HBox",
"options": {"width": "100%", "gap": "8px", "padding": "12px 14px", "halign": "right"},
"subwidgets": [
_btn('确认骨架,开始编写', 'primary', tt_ok,
conform={"title": "确认章节骨架", "message": "确认后骨架落库并开始分章编写,确认?",
"conform": {"label": "确认开写"}, "discard": {"label": "再看看"}}),
_btn('驳回(按意见修订)', 'small', tt_no)
]
})
elif task_type == 'kb_ingest_confirm':
# PM 建议文件入知识库:展示建议详情 + 文件(打开/下载)+ 批准/驳回
_sg = None