zhangqian
2024-06-05 b327b91db1c7015845ad293e8ccc48c4611819c6
service/inventory_report_forms.go
@@ -174,7 +174,7 @@
      return nil, err
   }
   list = make([]*response.InventoryForms, 0, total)
   params.PageSize = 1000
   params.PageSize = 500
   page := 1
   for {
      params.Page = page
@@ -205,15 +205,16 @@
   }
   for i, v := range dataList {
      f.SetCellValue("Sheet1", "A"+strconv.Itoa(i+2), v.ProductName)
      f.SetCellValue("Sheet1", "B"+strconv.Itoa(i+2), v.ProductType)
      f.SetCellValue("Sheet1", "C"+strconv.Itoa(i+2), v.Cost)
      f.SetCellValue("Sheet1", "D"+strconv.Itoa(i+2), v.Value)
      f.SetCellValue("Sheet1", "E"+strconv.Itoa(i+2), v.Amount)
      f.SetCellValue("Sheet1", "F"+strconv.Itoa(i+2), v.AvailableNumber)
      f.SetCellValue("Sheet1", "G"+strconv.Itoa(i+2), v.In)
      f.SetCellValue("Sheet1", "H"+strconv.Itoa(i+2), v.Out)
      f.SetCellValue("Sheet1", "I"+strconv.Itoa(i+2), v.Unit)
      column := strconv.Itoa(i + 2)
      f.SetCellValue("Sheet1", "A"+column, v.ProductName)
      f.SetCellValue("Sheet1", "B"+column, v.ProductType)
      f.SetCellValue("Sheet1", "C"+column, v.Cost)
      f.SetCellValue("Sheet1", "D"+column, v.Value)
      f.SetCellValue("Sheet1", "E"+column, v.Amount)
      f.SetCellValue("Sheet1", "F"+column, v.AvailableNumber)
      f.SetCellValue("Sheet1", "G"+column, v.In)
      f.SetCellValue("Sheet1", "H"+column, v.Out)
      f.SetCellValue("Sheet1", "I"+column, v.Unit)
   }
   fileName = fmt.Sprintf("库存报表%s.xlsx", time.Now().Format("2006-01-02-1504"))