This commit is contained in:
zlwu committed 2026-08-09 21:07:28 +08:00
1 parent b45ce2c32c
commit a5210a6a9e
30 files changed
+11989 -5917

No files matched your search

@@ -358,6 +358,7 @@
v-for="pick in selectedInvoicePicks"
:key="pick.key"
class="invoice-selected-card"
:style="{ '--invoice-group-color': invoiceGroupColor(pick.invoiceId) }"
>
<button
type="button"
@@ -388,7 +389,7 @@
</span>
<div class="invoice-selected-card__footer">
<span class="invoice-selected-card__amount">
{{ formatMoneyYuan(pick.amount) }} 元
整票 {{ formatMoneyYuan(pick.amount) }} 元
</span>
<el-icon
class="invoice-selected-card__download"
@@ -761,6 +762,25 @@ const walletBalance = ref(0)
const editingId = ref<number | null>(null)
const titleAutoLinked = ref(true)
/** 同一发票共用边框色(与 BxInvoiceSelectDialog / bx-mobile 一致) */
const INVOICE_GROUP_COLORS = [
'#0891b2',
'#7c3aed',
'#d97706',
'#db2777',
'#2563eb',
'#059669',
'#ea580c',
'#4f46e5'
]
function invoiceGroupColor(invoiceId: string | number) {
const s = String(invoiceId || '')
let hash = 0
for (let i = 0; i < s.length; i++) hash = (hash * 31 + s.charCodeAt(i)) >>> 0
return INVOICE_GROUP_COLORS[hash % INVOICE_GROUP_COLORS.length]
}
/** 关联发票固定展示顺序:上传/创建时间从新到旧,同时间按附件 ID */
function sortInvoicePicksByFixedOrder<T extends { createTime?: string; attachmentId?: string | number; id?: string | number; key?: string }>(
items: T[]
@@ -1384,7 +1404,7 @@ function viewDetailSummary({ columns, data }: { columns: any[]; data: any[] }) {
.invoice-selected-card {
position: relative;
width: 96px;
border: 1px solid var(--border, #d9e8e2);
border: 2px solid var(--invoice-group-color, var(--border, #d9e8e2));
border-radius: 6px;
background: var(--surface, #fff);
overflow: hidden;