yinbentan
2024-07-06 30acb46c5dd8f752b5a209978419b4770a322934
controllers/operation.go
@@ -994,11 +994,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)]) //颜色
@@ -1058,7 +1060,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) // 保管
@@ -1106,11 +1109,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)    // 单位
@@ -1174,7 +1179,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)    // 主管