Updata:调整导出样式

This commit is contained in:
jiaji.H 2025-12-15 16:03:16 +08:00
parent 7fe45642a7
commit e3b4dd4b85

View File

@ -532,7 +532,7 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
Pattern: 1, // 实心填充
},
Alignment: &excelize.Alignment{
Horizontal: "center",
Horizontal: "left",
Vertical: "center",
},
})
@ -588,7 +588,7 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, exp
if !endTimeParsed.After(payTimeParsed) && flag == 0 {
flag = 1
// 格式化截止时间显示
endTimeFormatted := endTimeParsed.Format("2006年01月02日15点")
endTimeFormatted := endTimeParsed.Format("2006年01月02日15点04分")
// 在当前行写入"截止xxxx年xx月xx点"
cell, _ := excelize.CoordinatesToCellName(1, actualRowIdx+2)
f.SetCellValue(sheet, cell, fmt.Sprintf("截止%s", endTimeFormatted))