Browse Source

fix 对裱

sun-pc-linux 7 months ago
parent
commit
9dd2b66265
1 changed files with 11 additions and 5 deletions
  1. 11 5
      boxcost/api/report.go

+ 11 - 5
boxcost/api/report.go

@@ -134,8 +134,8 @@ func ReportBillsDownload1(c *gin.Context, apictx *ApiSession) (interface{}, erro
 	f := excelize.NewFile()
 	f.SetDefaultFont("宋体")
 	flagIndex := -1
-	// 采购 加工 加工-印刷 加工-覆膜 成品采购
-	typeRows := []int{0, 0, 0, 0, 0}
+	// 采购 加工 加工-印刷 加工-覆膜 加工-对裱 成品采购
+	typeRows := []int{0, 0, 0, 0, 0, 0}
 	for _, tId := range reports {
 		var billExcel IExcel
 		// 采购
@@ -189,6 +189,8 @@ func ReportBillsDownload1(c *gin.Context, apictx *ApiSession) (interface{}, erro
 				sheetName = "加工单-印刷"
 			} else if produce.IsLam {
 				sheetName = "加工单-覆膜"
+			} else if produce.IsPaper {
+				sheetName = "加工单-对裱"
 			}
 			index := f.NewSheet(sheetName)
 			if flagIndex < 0 {
@@ -229,11 +231,15 @@ func ReportBillsDownload1(c *gin.Context, apictx *ApiSession) (interface{}, erro
 				billExcel.SetRow(typeRows[3])
 				billExcel.Draws()
 				typeRows[3] = billExcel.GetRow() + 5
+			} else if produce.IsPaper {
+				billExcel.SetRow(typeRows[4])
+				billExcel.Draws()
+				typeRows[4] = billExcel.GetRow() + 5
+
 			} else {
 				billExcel.SetRow(typeRows[1])
 				billExcel.Draws()
 				typeRows[1] = billExcel.GetRow() + 5
-
 			}
 		}
 
@@ -271,9 +277,9 @@ func ReportBillsDownload1(c *gin.Context, apictx *ApiSession) (interface{}, erro
 			// }, plan)
 			billExcel.SetContent(product)
 			billExcel.SetTitle(companyName)
-			billExcel.SetRow(typeRows[4])
+			billExcel.SetRow(typeRows[5])
 			billExcel.Draws()
-			typeRows[4] = billExcel.GetRow() + 5
+			typeRows[5] = billExcel.GetRow() + 5
 		}
 	}