cmvr-wms/ruoyi-ui-vue3/src/components/BusinessAssistant/AssistantReferencePricePreview.vue
lixiaolong 966df3ed57 feat(app): 添加消息中心功能并优化AI助手体验
- 集成消息中心屏幕和未读消息徽章显示
- 实现消息中心后台轮询和应用状态监听
- 添加应用启动时的消息刷新逻辑
- 更新导航标题配置增加消息中心选项
- 在助手界面改进报价更正说明显示
- 增强AI助手报价单处理和文档识别功能
- 添加管理员消息发送权限控制和验证
- 优化采购参考价格操作的业务规则说明
- 修复AI助手权限验证中的通知操作检查
2026-10-20 13:39:44 +08:00

35 lines
3.6 KiB
Vue

<template>
<section class="assistant-reference-preview" aria-label="实际金额逐项核对">
<header><strong>{{ combined ? '实际金额与报价核对' : '实际金额核对' }} · {{ rows.length }} 项</strong><span>{{ combined ? '按所选方式更正报价(清空不是 0 元);同步核对费用及下游成本,整批确认后提交。' : '仅作内部参考,不修改报价及成本。未报价保留原值,零报价可设为 0。' }}</span></header>
<el-table :data="pageRows" border max-height="380">
<el-table-column prop="name" label="物品名称" min-width="160"/>
<el-table-column prop="spec" label="规格型号" min-width="150"/>
<el-table-column prop="quantity" label="采购数量" width="100"/>
<el-table-column label="原实际单价" width="110"><template #default="{ row }">{{ row.oldActualPrice ?? '未填写' }}</template></el-table-column>
<el-table-column label="新实际单价" width="110"><template #default="{ row }"><strong :class="{ changed: row.changed }">{{ row.newActualPrice ?? '未填写' }}</strong></template></el-table-column>
<el-table-column label="原实际金额" width="120"><template #default="{ row }">{{ row.oldActualAmount ?? '未填写' }}</template></el-table-column>
<el-table-column label="新实际金额" width="120"><template #default="{ row }"><strong :class="{ changed: row.changed }">{{ row.newActualAmount ?? '未填写' }}</strong></template></el-table-column>
<el-table-column :label="combined ? '原报价单价' : '当前报价'" width="110"><template #default="{ row }"><span :class="{ removed: row.clearQuote && row.changed }">{{ row.quotePrice ?? '未报价' }}</span></template></el-table-column>
<el-table-column v-if="combined" label="新报价单价" width="130"><template #default="{ row }"><strong :class="{ changed: row.clearQuote && row.changed }">{{ row.newQuotePrice ?? (row.clearQuote && row.changed ? '清空(未报价)' : '未报价') }}</strong></template></el-table-column>
<el-table-column v-if="combined" label="原报价金额" width="120"><template #default="{ row }">{{ row.oldQuoteAmount ?? '未报价' }}</template></el-table-column>
<el-table-column v-if="combined" label="新报价金额" width="130"><template #default="{ row }">{{ row.newQuoteAmount ?? (row.clearQuote && row.changed ? '清空(未报价)' : '未报价') }}</template></el-table-column>
<el-table-column label="核对说明" min-width="240"><template #default="{ row }"><span :class="{ blocked: row.blocked }">{{ row.notice }}</span></template></el-table-column>
</el-table>
<el-pagination v-if="rows.length > 20" v-model:current-page="page" :page-size="20" :total="rows.length" layout="total, prev, pager, next" small/>
</section>
</template>
<script setup>
import { computed, ref, watch } from 'vue'
const props = defineProps({ rows: { type: Array, default: () => [] } })
const combined = computed(() => props.rows.some(row => row.clearQuote))
const page = ref(1), pageRows = computed(() => props.rows.slice((page.value - 1) * 20, page.value * 20))
watch(() => props.rows, () => { page.value = 1 })
</script>
<style scoped>
.assistant-reference-preview { margin-top:16px; min-width:0; }
header { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; font-size:13px; } header span { color:var(--el-text-color-secondary); }
.changed { color:var(--el-color-success); } :deep(.cell) { white-space:normal; overflow-wrap:anywhere; } .el-pagination { margin-top:10px; }
.removed { color:var(--el-text-color-secondary); text-decoration:line-through; }
.blocked { color:var(--el-color-danger); }
</style>