修改bbug

This commit is contained in:
2026-06-16 16:07:23 +08:00
parent c1a382c255
commit 7efc03570d
3 changed files with 55 additions and 8 deletions

View File

@@ -138,7 +138,28 @@ export default {
},
methods: {
getRowTitle (row) {
return row.title || row.remark || '-'
const t = (row.title || row.remark || '').trim()
if (t) return t
return this.summarizeBiz(row) || '-'
},
summarizeBiz (row) {
const b = row.bizData || {}
switch (row.bizType) {
case 'leave': {
const dur = b.hours ? `${b.hours}h` : ''
return [b.leaveType || '请假', dur, b.reason].filter(Boolean).join(' · ')
}
case 'travel':
return [b.travelType || '出差', b.destination, b.reason].filter(Boolean).join(' · ')
case 'seal':
return [b.sealType || '用印', b.purpose].filter(Boolean).join(' · ')
case 'reimburse':
return [b.reimburseType || '报销', b.totalAmount != null ? '¥' + b.totalAmount : null, b.reason].filter(Boolean).join(' · ')
case 'appropriation':
return [b.appropriationType || '拨款', b.amount != null ? '¥' + b.amount : null, b.reason].filter(Boolean).join(' · ')
default:
return ''
}
},
isTravelCompleted (row) {
if (!row || row.bizType !== 'travel') return false