From 2ec42065712b96ac32ea706869949bf88f04770f Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 14 六月 2024 09:52:58 +0800
Subject: [PATCH] 修复报错

---
 service/history_forms.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/service/history_forms.go b/service/history_forms.go
index 02b27bf..afed856 100644
--- a/service/history_forms.go
+++ b/service/history_forms.go
@@ -33,7 +33,7 @@
 	for _, v := range list {
 		data := &response.InventoryHistory{
 			Number:            v.Number,
-			Date:              v.UpdatedAt,
+			Date:              v.UpdatedAt.Format("2006-01-02"),
 			ProductName:       v.ProductName,
 			FromLocation:      v.FromLocation,
 			ToLocation:        v.ToLocation,
@@ -143,7 +143,7 @@
 
 	for i, v := range dataList {
 		column := strconv.Itoa(i + 3)
-		f.SetCellValue("Sheet1", "A"+column, v.Date.Format("2006-01-02"))
+		f.SetCellValue("Sheet1", "A"+column, v.Date)
 		f.SetCellValue("Sheet1", "B"+column, v.Number)
 		f.SetCellValue("Sheet1", "C"+column, v.ProductName)
 		f.SetCellValue("Sheet1", "D"+column, v.ProductId)

--
Gitblit v1.8.0