muzexing
2024-07-06 c1389eedfaf1c044b48b94c7a8d9d9bb4cca1064
出库/入库打印 修改bug
1个文件已修改
10 ■■■■ 已修改文件
controllers/operation.go 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)    // 主管