diff --git a/wwwroot/api/my_todos_popup.dspy b/wwwroot/api/my_todos_popup.dspy index ec2fc61..c9303b9 100644 --- a/wwwroot/api/my_todos_popup.dspy +++ b/wwwroot/api/my_todos_popup.dspy @@ -17,6 +17,7 @@ TYPE_LABEL = { 'bug_acceptance': 'Bug 验收', 'flow_plan_confirm': '流程裁剪确认', 'tech_template_confirm': '技术方案骨架确认', + 'bid_delivery_confirm': '交付确认', 'material_supply': '实体材料缺口', } TYPE_COLOR = { @@ -25,6 +26,7 @@ TYPE_COLOR = { 'bug_acceptance': '#f0a040', 'flow_plan_confirm': '#7c3aed', 'tech_template_confirm': '#0891b2', + 'bid_delivery_confirm': '#059669', 'material_supply': '#d97706', } diff --git a/wwwroot/api/todo_detail.dspy b/wwwroot/api/todo_detail.dspy index 5665692..a4337ee 100644 --- a/wwwroot/api/todo_detail.dspy +++ b/wwwroot/api/todo_detail.dspy @@ -24,6 +24,8 @@ TYPE_LABEL = { 'kb_ingest_confirm': '知识库入库建议', 'flow_plan_confirm': '流程裁剪确认', 'tech_template_confirm': '技术方案骨架确认', + 'material_supply': '实体材料缺口', + 'bid_delivery_confirm': '交付确认', } TYPE_COLOR = { 'requirement_confirmation': '#2563eb', @@ -32,6 +34,8 @@ TYPE_COLOR = { 'kb_ingest_confirm': '#10b981', 'flow_plan_confirm': '#7c3aed', 'tech_template_confirm': '#0891b2', + 'material_supply': '#d97706', + 'bid_delivery_confirm': '#059669', } @@ -560,25 +564,47 @@ async with DBPools().sqlorContext(dbname) as sor: md.append('') md.append('未找到该项目的标书文件记录。') md.append('') - # 确认交付按钮(2026-09-16 修复:此分支曾只渲染文件行,忘了 action 按钮, - # 通用兜底分支又被 elif 挡住 → 待办成死卡片无法确认)。 - # 通道 = human_task_complete(同机构+assignee 校验);置 done 后对账器 + # 确认交付/退回按钮(2026-09-16 修复:此分支曾只渲染文件行,忘了 action + # 按钮,通用兜底分支又被 elif 挡住 → 待办成死卡片无法确认。 + # 2026-09-17 用户报障补退回通道:原来只有「确认」单按钮,复核发现问题 + # 无法打回——对齐 tech_template_confirm 的确认/驳回双按钮模式)。 + # 确认通道 = human_task_complete(同机构+assignee 校验);置 done 后对账器 # G 段自动收尾:标书 delivered + 项目 completed。 - action_widgets.append(_input_box( - 'bid_confirm_note', '交付备注(可选:用印/密封/份数/递交方式核对说明)', '可选备注')) - _ok_script = (_read_input_js('bid_confirm_note') + - "var rd=JSON.stringify({content:(cv||'确认交付')});" + - _post_js(complete_url, [('human_task_id', _json.dumps(oid)), - ('result_data', 'rd')]) + _tail) - action_widgets.append({ - "widgettype": "HBox", - "options": {"width": "100%", "gap": "8px", "padding": "12px 14px", "halign": "right"}, - "subwidgets": [ - _btn('确认交付(项目完成)', 'primary', _ok_script, - conform={"title": "确认交付", "message": "确认标书已复核(用印/密封/份数/递交)?确认后标书置为已交付、项目完成。", - "conform": {"label": "确认交付"}, "discard": {"label": "再看看"}}) - ] - }) + # 退回通道 = /pipeline-bidding/api/bid_delivery_reject.dspy(用户专属, + # agent 无此工具):待办置 rejected + 标书 rejected + 派评分员按意见 + # 打回问题章节 → 既有链路自动重写→重审→重合成→重评分→重发交付确认。 + _bd_status = _s(getattr(h, 'status', '')) + if _bd_status != 'pending': + md.append('## 待办状态') + md.append('') + md.append('该确认已处理(当前状态:' + (_bd_status or '-') + '),无需再操作。') + md.append('') + else: + action_widgets.append(_input_box( + 'bid_confirm_note', '交付备注(确认可留空;退回重做必须写明哪里要修改)', + '备注/退回意见:如用印密封核对说明,或退回时指明问题章节与修改要求')) + _ok_script = (_read_input_js('bid_confirm_note') + + "var rd=JSON.stringify({content:(cv||'确认交付')});" + + _post_js(complete_url, [('human_task_id', _json.dumps(oid)), + ('result_data', 'rd')]) + _tail) + _bdj_url = entire_url("/pipeline-bidding/api/bid_delivery_reject.dspy") + _no_script = (_read_input_js('bid_confirm_note') + + "if(!cv){var mn=new bricks.Message({title:'请填写退回意见'," + "message:'退回前请说明标书哪里需要修改(评分员按意见打回章节重写)'});mn.open();return;}" + + _post_js(_bdj_url, [('human_task_id', _json.dumps(oid)), + ('comment', 'cv')]) + _tail) + action_widgets.append({ + "widgettype": "HBox", + "options": {"width": "100%", "gap": "8px", "padding": "12px 14px", "halign": "right"}, + "subwidgets": [ + _btn('确认交付(项目完成)', 'primary', _ok_script, + conform={"title": "确认交付", "message": "确认标书已复核(用印/密封/份数/递交)?确认后标书置为已交付、项目完成。", + "conform": {"label": "确认交付"}, "discard": {"label": "再看看"}}), + _btn('退回重做', 'small', _no_script, + conform={"title": "退回重做", "message": "退回后评分员将按你的意见打回问题章节重写,重新合成、评分后再次请你确认。确认退回?", + "conform": {"label": "退回重做"}, "discard": {"label": "取消"}}) + ] + }) elif task_type == 'flow_plan_confirm': # 产线流程裁剪确认:正文(description)已含裁剪方案对照表(propose 时渲染),