From c1389eedfaf1c044b48b94c7a8d9d9bb4cca1064 Mon Sep 17 00:00:00 2001
From: muzexing <muzexing@qq.com>
Date: 星期六, 06 七月 2024 15:22:43 +0800
Subject: [PATCH] 出库/入库打印 修改bug

---
 controllers/operation.go |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/controllers/operation.go b/controllers/operation.go
index 41e3932..5de6cb4 100644
--- a/controllers/operation.go
+++ b/controllers/operation.go
@@ -991,11 +991,13 @@
 	totalAmount := decimal.NewFromInt(0) // 鎬婚噾棰�
 	totalPrice := decimal.NewFromInt(0)  // 鎬讳环
 	rowIndex := 6
+	str := ""
 	for i, v := range operation.Details {
 		//璁剧疆琛ㄥ崟鏈�澶�6鏉℃暟鎹�
 		if i > 6 {
 			break
 		}
+		str += v.Remark
 		f.SetCellValue(sheet, "B"+strconv.Itoa(rowIndex), v.Product.Name)                                                          // 浜у搧鍚嶇О
 		f.SetCellValue(sheet, "C"+strconv.Itoa(rowIndex), v.Product.Specs)                                                         //瑙勬牸
 		f.SetCellValue(sheet, "D"+strconv.Itoa(rowIndex), attributeValueMap[fmt.Sprintf("%d%s", attributeMap["棰滆壊"], v.ProductId)]) //棰滆壊
@@ -1055,7 +1057,8 @@
 	}
 
 	// 澶囨敞 绗�13琛�
-	f.SetCellValue(sheet, "B13", "澶囨敞锛�"+operation.Remark)
+	//f.SetCellValue(sheet, "B13", "澶囨敞锛�"+operation.Comment)
+	f.SetCellValue(sheet, "B13", "澶囨敞锛�"+str)
 	// 绗�14琛�
 	f.SetCellValue(sheet, "C14", operation.Manager)    // 瀹℃牳
 	f.SetCellValue(sheet, "F14", operation.Accountant) // 淇濈
@@ -1103,11 +1106,13 @@
 	totalAmount := decimal.NewFromInt(0) // 鎬婚噾棰�
 	totalPrice := decimal.NewFromInt(0)  // 鎬讳环
 	rowIndex := 5
+	str := ""
 	for i, v := range operation.Details {
 		//璁剧疆琛ㄥ崟鏈�澶�9鏉℃暟鎹�
 		if i > 9 {
 			break
 		}
+		str += v.Remark
 		f.SetCellValue(sheet, "A"+strconv.Itoa(rowIndex), v.Product.Name)    // 鍝佸悕
 		f.SetCellValue(sheet, "B"+strconv.Itoa(rowIndex), v.Product.Type)    // 鍨嬪彿
 		f.SetCellValue(sheet, "C"+strconv.Itoa(rowIndex), v.Product.Unit)    // 鍗曚綅
@@ -1171,7 +1176,8 @@
 		}
 	}
 
-	f.SetCellValue(sheet, "Q5", operation.Remark) // 澶囨敞
+	//f.SetCellValue(sheet, "Q5", operation.Comment) // 澶囨敞
+	f.SetCellValue(sheet, "Q5", str) // 澶囨敞
 
 	// 绗�14琛�
 	f.SetCellValue(sheet, "B15", operation.Manager)    // 涓荤

--
Gitblit v1.8.0