diff --git a/src/views/purchase/purchasingrequisition/index.vue b/src/views/purchase/purchasingrequisition/index.vue index b146ca0..60f8307 100644 --- a/src/views/purchase/purchasingrequisition/index.vue +++ b/src/views/purchase/purchasingrequisition/index.vue @@ -35,16 +35,12 @@ - - + - - - - + @@ -149,12 +145,25 @@ - + - 采购项目名称 + 项目名称 + + + + + + {{ getSpecialBadgeText(scope.row.isSpecial) }} + + + + 政 + + {{ scope.row.projectName }} + @@ -205,34 +214,7 @@ {{ scope.row.budget ? Number(scope.row.budget).toLocaleString() : '-' }} - - - - - - 特殊 - - - 紧急 - 单一 - 进口 - 否 - - - - - - - - - - 集采 - - - 是 - 否 - - - - + @@ -841,6 +823,26 @@ const getSupplementTooltip = (row: any) => { return '未补充材料,点击查看'; }; +/** 获取特殊情况标记文字 */ +const getSpecialBadgeText = (isSpecial: string): string => { + const map: Record = { + '1': '紧', + '2': '单', + '3': '进', + }; + return map[String(isSpecial)] || ''; +}; + +/** 获取特殊情况完整提示文字 */ +const getSpecialTooltip = (isSpecial: string): string => { + const map: Record = { + '1': '紧急采购', + '2': '单一来源采购', + '3': '进口产品采购', + }; + return map[String(isSpecial)] || ''; +}; + const handleShowSupplement = (row: any) => { const id = row?.id ?? row?.purchaseId; if (!id) { @@ -1497,4 +1499,64 @@ onMounted(() => { color: #c75b5b; } } + +/* 项目名称单元格样式 */ +.project-name-cell { + display: flex; + align-items: center; + gap: 6px; + + .project-name-text { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +/* 特殊情况圆形标记 */ +.special-badge { + display: inline-flex; + align-items: center; + justify-content: center; + width: 20px; + height: 20px; + border-radius: 50%; + font-size: 12px; + font-weight: 600; + color: #fff; + flex-shrink: 0; + cursor: default; + + /* 紧急 - 橙色 */ + &.special-1 { + background-color: #f59e0b; + } + + /* 单一 - 红色 */ + &.special-2 { + background-color: #ef4444; + } + + /* 进口 - 蓝色 */ + &.special-3 { + background-color: #3b82f6; + } +} + +/* 集采圆形标记 */ +.centralized-badge { + display: inline-flex; + align-items: center; + justify-content: center; + width: 20px; + height: 20px; + border-radius: 50%; + font-size: 12px; + font-weight: 600; + color: #fff; + background-color: #10b981; + flex-shrink: 0; + cursor: default; +}