feat: 页面功能完善
3.1 供货商管理页面 - 移除了右侧面板的"供货清单"Tab - 报价历史板块新增搜索功能(物料名称/报价单号/状态/日期范围) - 后端 Mapper 改造支持动态 SQL 过滤 3.2 报价请求与供应商报价关联 - 新增"供应商报价汇总"弹窗,展示 RFQ 下所有供应商的报价对比 - 报价单号改为可点击链接,跳转到供应商报价列表并按单号搜索 3.3 智慧比价详情页 - 修复了比价详情页路由(在 router/index.js 中补充) - 移除了评分维度展示(价格/交期/质量/服务评分条、综合分标签) - 精简为纯粹的供应商价格对比视图 3.4 其他修复 - 首页快捷操作路径修正(/bid/xxx → /xxx) - 停用 bid 目录后受影响的 router.push 路径全部修复 - biz_tenant 表缺失修复(创建建表 SQL 并执行) - 比价详情页路由注册补充 - goCompare 跳转路径修正
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="dashboard">
|
||||
<el-row :gutter="20" class="stat-row">
|
||||
<el-col :xs="12" :sm="6" v-for="item in statCards" :key="item.key">
|
||||
<el-col :xs="12" :sm="6" v-for="item in (isSupplier ? statCards.filter(c => c.key==='rfqs') : statCards)" :key="item.key">
|
||||
<div class="stat-card" :style="{ borderTopColor: item.color }">
|
||||
<div class="stat-icon" :style="{ background: item.color + '18', color: item.color }">
|
||||
<i :class="item.icon" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<el-card class="panel-card">
|
||||
<div slot="header" class="panel-header">
|
||||
<span><i class="el-icon-document" /> 最近询价单</span>
|
||||
<router-link to="/bid/rfq" class="panel-more">查看全部</router-link>
|
||||
<router-link to="/rfq" class="panel-more">查看全部</router-link>
|
||||
</div>
|
||||
<el-table :data="recentRfqs" size="small" style="width:100%">
|
||||
<el-table-column prop="rfqNo" label="单号" width="160" />
|
||||
@@ -33,11 +33,11 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xs="24" :lg="10">
|
||||
<el-col :xs="24" :lg="10" v-if="!isSupplier">
|
||||
<el-card class="panel-card">
|
||||
<div slot="header" class="panel-header">
|
||||
<span><i class="el-icon-shopping-cart-full" /> 最近采购单</span>
|
||||
<router-link to="/bid/purchaseorder" class="panel-more">查看全部</router-link>
|
||||
<router-link to="/purchaseorder" class="panel-more">查看全部</router-link>
|
||||
</div>
|
||||
<el-table :data="recentPos" size="small" style="width:100%">
|
||||
<el-table-column prop="poNo" label="单号" width="140" />
|
||||
@@ -53,11 +53,11 @@
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" style="margin-top:20px">
|
||||
<el-col :xs="24" :lg="10">
|
||||
<el-col :xs="24" :lg="10" v-if="!isSupplier">
|
||||
<el-card class="panel-card">
|
||||
<div slot="header" class="panel-header">
|
||||
<span><i class="el-icon-s-custom" /> 供应商列表</span>
|
||||
<router-link to="/bid/supplier" class="panel-more">查看全部</router-link>
|
||||
<router-link to="/supplier" class="panel-more">查看全部</router-link>
|
||||
</div>
|
||||
<el-table :data="suppliers" size="small" style="width:100%">
|
||||
<el-table-column prop="supplierName" label="供应商名称" show-overflow-tooltip />
|
||||
@@ -76,7 +76,7 @@
|
||||
<span><i class="el-icon-magic-stick" /> 快捷操作</span>
|
||||
</div>
|
||||
<div class="quick-actions">
|
||||
<router-link v-for="action in quickActions" :key="action.path" :to="action.path" class="quick-btn">
|
||||
<router-link v-for="action in (isSupplier ? supplierQuickActions : quickActions)" :key="action.path" :to="action.path" class="quick-btn">
|
||||
<div class="quick-icon" :style="{ background: action.color + '18', color: action.color }">
|
||||
<i :class="action.icon" />
|
||||
</div>
|
||||
@@ -97,6 +97,17 @@ import { listPurchaseorder } from "@/api/bid/purchaseorder"
|
||||
|
||||
export default {
|
||||
name: "Dashboard",
|
||||
computed: {
|
||||
isSupplier() {
|
||||
return this.$store.getters.roles && this.$store.getters.roles.includes('supplier');
|
||||
},
|
||||
supplierQuickActions() {
|
||||
return [
|
||||
{ label: "报价请求", icon: "el-icon-document", color: "#1171c4", path: "/rfq" },
|
||||
{ label: "我的报价", icon: "el-icon-money", color: "#67c23a", path: "/quotation" }
|
||||
];
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stats: { suppliers: 0, materials: 0, rfqs: 0, pos: 0 },
|
||||
@@ -110,12 +121,12 @@ export default {
|
||||
{ key: "pos", label: "采购单", icon: "el-icon-shopping-cart-full", color: "#f56c6c" }
|
||||
],
|
||||
quickActions: [
|
||||
{ label: "新建询价单", icon: "el-icon-edit", color: "#1171c4", path: "/bid/rfq" },
|
||||
{ label: "物料管理", icon: "el-icon-goods", color: "#67c23a", path: "/bid/material" },
|
||||
{ label: "智慧比价", icon: "el-icon-data-analysis", color: "#e6a23c", path: "/bid/comparison" },
|
||||
{ label: "采购单", icon: "el-icon-shopping-cart-full", color: "#f56c6c", path: "/bid/purchaseorder" },
|
||||
{ label: "供应商", icon: "el-icon-s-cooperation", color: "#9b59b6", path: "/bid/supplier" },
|
||||
{ label: "供应商评价", icon: "el-icon-star-off", color: "#e67e22", path: "/bid/evaluation" }
|
||||
{ label: "新建询价单", icon: "el-icon-edit", color: "#1171c4", path: "/rfq" },
|
||||
{ label: "物料管理", icon: "el-icon-goods", color: "#67c23a", path: "/material" },
|
||||
{ label: "智慧比价", icon: "el-icon-data-analysis", color: "#e6a23c", path: "/comparison" },
|
||||
{ label: "采购单", icon: "el-icon-shopping-cart-full", color: "#f56c6c", path: "/purchaseorder" },
|
||||
{ label: "供应商", icon: "el-icon-s-cooperation", color: "#9b59b6", path: "/supplier" },
|
||||
{ label: "供应商评价", icon: "el-icon-star-off", color: "#e67e22", path: "/evaluation" }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -124,6 +135,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadDashboard() {
|
||||
// 供应商只加载自己有权限的RFQ数据
|
||||
if (this.isSupplier) {
|
||||
listRfq({ pageNum: 1, pageSize: 5 }).then(r => {
|
||||
this.recentRfqs = r.rows || []
|
||||
this.stats.rfqs = r.total || 0
|
||||
}).catch(() => {})
|
||||
return
|
||||
}
|
||||
listSupplier({ pageNum: 1, pageSize: 5 }).then(r => {
|
||||
this.suppliers = r.rows || []
|
||||
this.stats.suppliers = r.total || 0
|
||||
|
||||
Reference in New Issue
Block a user