cmvr-wms/ruoyi-ui-vue3/src/views/archive/archive-reference.js
lixiaolong ebac97185e feat(assistant): 新增用户核对功能并优化对话流程
- 新增 user.check 功能用于核对人员是否已有系统账号
- 在 assistant-table-layout.js 中为用户表格添加 checkedIdentity 和 matchResult 字段
- 优化 AssistantConversationService 中的任务记忆和澄清流程
- 支持对草稿特定行进行修改,无需重新填写整张表
- 限制 user.check 操作最大查询数量为 100 条记录
- 实现中断任务恢复机制,保持原始请求上下文
- 添加针对多行数据选择性修改的目标行标识支持
2026-10-23 17:00:47 +08:00

36 lines
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Read-only labels from 项目归档核对清单-20261008(1).xlsx, 归档核对清单!A5:B34.
// Keep stable business keys; changing presentation never renames stored projects or files.
const groups=[
['① 项目前期沟通交流资料',[
['technical','技术方案'],['preQuote','预报价']]],
['② 招投标/采购资料',[
['tender','招标文件/或采购需求SOR'],['bid','投标文件(签章扫描版)/如无,则提供投标文件最终word版']]],
['③ 项目前期设计资料',[
['design','项目机械设计图/软件架构图/控制逻辑图'],['software','软件版本'],['machining','机械加工图'],['electrical','电气原理图'],['materials','关键原材料清单'],['technicalReview','技术方案评审报告']]],
['④ 合同及款项资料(上游客户)',[
['award','中标通知书'],['customerContract','合同(含技术协议)'],['guarantee','款项支付流程资料(保函、保证金底单等)'],['customerInvoice','发票(跟上游客户)'],['collection','对账单、催款函等款项支付资料']]],
['⑤项目采购资料(下游供应商)',[
['purchasePlan','采购需求文件及计划'],['supplierContract','采购合同(含技术协议)'],['supplierInvoice','发票(跟下游供应商)等款项支付资料']]],
['⑥ 项目执行过程及交付材料',[
['costAnalysis','项目成本分析表'],['implementation','项目实施计划表'],['stageAcceptance','阶段验收单'],['changes','变更或终止材料等过程材料'],['factoryCheck','出厂验证报告/预验收报告'],['warehouseDocs','出入库单'],['shipping','发货单/物流单'],['photos','货物照片'],['deliverySignature','到货签收单'],['arrivalAcceptance','到货验收单'],['finalAcceptance','终验收单'],['archiveChecklist','项目归档清单']]]
]
export const archiveReference=groups.flatMap(([category,items])=>items.map(([key,title])=>({key,category,title})))
const labels=new Map(archiveReference.map(item=>[item.key,item]))
const legacyCategories=new Map(['前期沟通交流','招投标/采购','前期设计','上游客户合同及款项','下游供应商采购','执行及交付'].map((name,index)=>[name,groups[index][0]]))
const legacyTitles={tender:'招标文件或采购需求 SOR',bid:'投标文件(签章扫描版;无签章版可提供最终 Word)',design:'机械设计图/软件架构图/控制逻辑图',customerInvoice:'发票(上游客户)',supplierInvoice:'发票(下游供应商)等款项支付资料',changes:'变更或终止等过程材料',factoryCheck:'出厂验证报告/预验收报告',shipping:'发货单/物流单'}
export function comparisonRows(items=[],preserveLabels=false,projects=[]){
const normalize=item=>{const reference=labels.get(item.key);return {...item,category:!preserveLabels&&legacyCategories.has(item.category)?legacyCategories.get(item.category):item.category,title:!preserveLabels&&reference&&item.title===legacyTitles[item.key]?reference.title:item.title}}
const rows=items.map(normalize),seen=new Set(rows.map(item=>item.key))
for(const items of projects)for(const item of items||[]){if(!seen.has(item.item_key)){seen.add(item.item_key);rows.push(normalize({...item,key:item.item_key,historical:true}))}}
return rows
}
// Only merge adjacent categories in column two; sequence and material cells remain independent.
export function comparisonSpan(items,rowIndex,columnIndex){
if(columnIndex!==1)return [1,1]
const category=items[rowIndex]?.category
if(rowIndex>0&&items[rowIndex-1].category===category)return [0,0]
let end=rowIndex+1
while(end<items.length&&items[end].category===category)end++
return [end-rowIndex,1]
}