From be3212cbdbdaa6c84379c4b2e056b28fcf2ff58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E6=98=8A?= Date: Fri, 29 May 2026 19:53:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(bid):=20=E4=BC=98=E5=8C=96=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E6=8A=A5=E4=BB=B7=E5=92=8C=E7=94=B2=E6=96=B9?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 重构SupplierQuoteTab移除冗余空状态样式 2. 为CompareSection添加交期最快标识样式和逻辑 3. 全新重构ClientQuoteTab页面,优化表格布局与样式 --- .../material/components/ClientQuoteTab.vue | 192 ++++++++++++++++-- .../material/components/CompareSection.vue | 58 ++++-- .../material/components/SupplierQuoteTab.vue | 13 -- 3 files changed, 216 insertions(+), 47 deletions(-) diff --git a/ruoyi-ui/src/views/bid/material/components/ClientQuoteTab.vue b/ruoyi-ui/src/views/bid/material/components/ClientQuoteTab.vue index 5aab7181..02048919 100644 --- a/ruoyi-ui/src/views/bid/material/components/ClientQuoteTab.vue +++ b/ruoyi-ui/src/views/bid/material/components/ClientQuoteTab.vue @@ -1,30 +1,69 @@ @@ -45,9 +84,124 @@ export default { this.loading = false; }).catch(() => { this.loading = false; }); }, + formatDate(dateStr) { + if (!dateStr) return '-'; + const date = new Date(dateStr); + return date.toLocaleDateString('zh-CN', { month: '2-digit', day: '2-digit' }); + }, + formatPrice(price) { + if (!price && price !== 0) return '-'; + return Number(price).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }); + }, + getStatusType(status) { + const map = { 'accepted': 'success', 'rejected': 'danger', 'pending': 'warning', 'draft': 'info' }; + return map[status] || 'info'; + }, + getStatusText(status) { + const map = { 'accepted': '已接受', 'rejected': '已拒绝', 'pending': '待处理', 'draft': '草稿' }; + return map[status] || status; + }, + headerStyle() { + return { + background: '#f5f7fa', + color: '#606266', + fontWeight: 600, + fontSize: '13px' + }; + }, exportExcel() { this.$message.info('导出功能开发中'); } } }; + + diff --git a/ruoyi-ui/src/views/bid/material/components/CompareSection.vue b/ruoyi-ui/src/views/bid/material/components/CompareSection.vue index 74df39ea..0bd9a8f5 100644 --- a/ruoyi-ui/src/views/bid/material/components/CompareSection.vue +++ b/ruoyi-ui/src/views/bid/material/components/CompareSection.vue @@ -107,7 +107,10 @@ v-for="(quote, qIdx) in quoteMap[mat.materialId]" :key="qIdx" class="quote-row" - :class="{ 'is-lowest': isLowestPrice(mat.materialId, qIdx) }"> + :class="{ + 'is-lowest': isLowestPrice(mat.materialId, qIdx), + 'is-fastest': isFastestDelivery(mat.materialId, qIdx) + }">
{{ quote.supplier_name }} @@ -115,10 +118,11 @@
- ¥{{ formatPrice(quote.unit_price) }} - 最低 + ¥{{ formatPrice(quote.unit_price) }} +
+
+ {{ quote.delivery_days || '—' }}
-
{{ quote.delivery_days || '—' }}
{{ quote.quote_no }}
{{ formatDate(quote.submit_time) }}
@@ -320,6 +324,17 @@ export default { const quotes = this.quoteMap[materialId]; if (!quotes || !quotes.length) return false; return quoteIndex === 0; + }, + + isFastestDelivery(materialId, quoteIndex) { + const quotes = this.quoteMap[materialId]; + if (!quotes || !quotes.length) return false; + // 找出最小交期 + const minDays = Math.min(...quotes.map(q => Number(q.delivery_days) || Infinity)); + if (minDays === Infinity) return false; + // 检查当前报价的交期是否等于最小交期 + const currentDays = Number(quotes[quoteIndex].delivery_days); + return currentDays === minDays; } } }; @@ -569,6 +584,14 @@ export default { background: linear-gradient(90deg, #f0f9eb 0%, #e8f5e0 100%); border-left: 3px solid #67c23a; } +.quote-row.is-fastest { + background: linear-gradient(90deg, #ecf5ff 0%, #d9ecff 100%); + border-left: 3px solid #409eff; +} +.quote-row.is-lowest.is-fastest { + background: linear-gradient(90deg, #f0f9eb 0%, #e8f5e0 50%, #ecf5ff 100%); + border-left: 3px solid #67c23a; +} .qr-col { text-align: center; @@ -597,19 +620,24 @@ export default { .price-value { font-weight: 700; - color: #f56c6c; + color: #606266; font-size: 14px; } -.lowest-tag { - display: inline-block; - background: #67c23a; - color: #fff; - font-size: 10px; - padding: 1px 5px; - border-radius: 3px; - margin-left: 4px; - vertical-align: middle; - font-weight: 500; +.price-value.is-lowest-price { + color: #67c23a; + border-bottom: 2px solid #67c23a; + padding-bottom: 2px; +} + +.delivery-value { + font-weight: 600; + color: #606266; + font-size: 14px; +} +.delivery-value.is-fastest-delivery { + color: #e6a23c; + border-bottom: 2px solid #e6a23c; + padding-bottom: 2px; } .qr-col.delivery-col, diff --git a/ruoyi-ui/src/views/bid/material/components/SupplierQuoteTab.vue b/ruoyi-ui/src/views/bid/material/components/SupplierQuoteTab.vue index 1909f12c..31dff717 100644 --- a/ruoyi-ui/src/views/bid/material/components/SupplierQuoteTab.vue +++ b/ruoyi-ui/src/views/bid/material/components/SupplierQuoteTab.vue @@ -69,13 +69,6 @@ - - - - - @@ -222,12 +215,6 @@ export default { font-weight: 500; } -/* 空状态 */ -.empty-text { - color: #909399; - font-size: 14px; -} - /* 行悬停效果 */ >>> .el-table__row:hover { background-color: #f5f7fa !important;