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

11 lines
2.5 KiB
HTML
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.

<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>采购粘贴 · 隔离验证</title><div id="app"></div>
<script type="module">
if(location.port!=='8092'){document.querySelector('#app').textContent='通过隔离测试服务 8092 打开,不使用业务数据。'}else{
const [{createApp,h,ref},{default:ElementPlus},{default:Preview},{pasteRectangle}]=await Promise.all([import('vue'),import('element-plus'),import('@/components/PurchaseSheet/PastePreview.vue'),import('@/utils/purchase-sheet.js')]);await import('element-plus/dist/index.css');
const columns=[{field:'materialName',label:'物品名称'},{field:'materialParams',label:'规格型号'},{field:'quantity',label:'数量'},{field:'unit',label:'单位'}],items=Array.from({length:45},(_,i)=>({id:i+1,productName:'演示电机'+(i+1),spec:'S'+(i+1),unit:'台',category:'设备'})),text='物品名称\t规格型号\t数量\t单位\n'+items.map((item,i)=>[item.productName,item.spec,1,i===11||i===42?'件':'台'].join('\t')).join('\n');
createApp({setup(){const visible=ref(true),issues=ref([]),message=ref('隔离验证 · 仅虚构数据,不连接业务库'),rows=ref(items.map((item,i)=>({_key:'r'+i,materialName:item.productName,materialParams:item.spec,quantity:1,unit:'台'})));const before=JSON.stringify(rows.value);
const apply=payload=>{try{rows.value=pasteRectangle(rows.value,payload.text,0,0,payload.fields,{readonly:()=>false,canEditField:()=>true,items,units:['台','件'],sourceStartLine:payload.sourceStartLine,emptyRow:()=>({})});issues.value=[];visible.value=false;message.value='已校验并应用全部45行;仅改变本页虚构数据'}catch(error){issues.value=error.pasteIssues||[];message.value=JSON.stringify(rows.value)===before?'校验失败,原清单未改变': '异常:原清单变化'}};
return()=>h('main',[h('aside',message.value),h('button',{onClick:()=>visible.value=true},'打开粘贴预览'),h(Preview,{visible:visible.value,text,columns,units:['台','件'],issues:issues.value,'onUpdate:visible':value=>visible.value=value,onClearIssues:()=>issues.value=[],onApply:apply})])}}).use(ElementPlus).mount('#app');
}
</script><style>html,body{margin:0;font:14px/1.6 'Microsoft YaHei',sans-serif;color:#303846;background:#f6f8fb}aside{padding:10px 16px;background:#fff5d6;color:#775a16}.batch-dialog-footer{display:flex;justify-content:space-between;gap:12px;align-items:center}.batch-dialog-footer>div{display:flex;gap:10px}</style></html>