|
@@ -168,7 +168,7 @@ func (b *PlanSummaryExcel) drawAllContent() error {
|
|
|
var perRealPrice float64 = 0.00
|
|
|
if len(comp.Stages) > 0 {
|
|
|
startRow := b.Row
|
|
|
- cates := map[string][]int{}
|
|
|
+ // cates := map[string][]int{}
|
|
|
for _, stage := range comp.Stages {
|
|
|
matHeigth := fmt.Sprintf("%d", stage.BatchSizeHeight)
|
|
|
b.FormatToEmpty(&matHeigth)
|
|
@@ -249,19 +249,19 @@ func (b *PlanSummaryExcel) drawAllContent() error {
|
|
|
}
|
|
|
|
|
|
b.drawRow(b.Row, "", "", stageType, stage.Name, orderCount, realCount, stageStatus, supplierName, fmt.Sprintf("%.3f元/%s", stage.Price, stage.Unit), stage.Norm, matHeigth, matWidth, unit, price, budgetPrice, realPrice)
|
|
|
- if stage.SupplierInfo != nil {
|
|
|
- cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
+ // if stage.SupplierInfo != nil {
|
|
|
+ // cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
|
|
|
- }
|
|
|
+ // }
|
|
|
b.Row++
|
|
|
}
|
|
|
|
|
|
- for supplierName, cate := range cates {
|
|
|
- mergeStartRow := cate[0]
|
|
|
- mergeEndRow := cate[len(cate)-1]
|
|
|
- b.Excel.MergeCell(b.SheetName, fmt.Sprintf("H%d", mergeStartRow), fmt.Sprintf("H%d", mergeEndRow))
|
|
|
- b.Excel.SetCellValue(b.SheetName, fmt.Sprintf("H%d", mergeEndRow), supplierName)
|
|
|
- }
|
|
|
+ // for supplierName, cate := range cates {
|
|
|
+ // mergeStartRow := cate[0]
|
|
|
+ // mergeEndRow := cate[len(cate)-1]
|
|
|
+ // b.Excel.MergeCell(b.SheetName, fmt.Sprintf("H%d", mergeStartRow), fmt.Sprintf("H%d", mergeEndRow))
|
|
|
+ // b.Excel.SetCellValue(b.SheetName, fmt.Sprintf("H%d", mergeEndRow), supplierName)
|
|
|
+ // }
|
|
|
|
|
|
endRow := b.Row - 1
|
|
|
// 组件名字
|
|
@@ -345,7 +345,7 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
var perRealPrice float64 = 0.00
|
|
|
if len(comp.Stages) > 0 {
|
|
|
startRow := 0
|
|
|
- cates := map[string][]int{}
|
|
|
+ // cates := map[string][]int{}
|
|
|
for _, stage := range comp.Stages {
|
|
|
if stage.SupplierInfo != nil {
|
|
|
if b.Content.SupplierId == stage.SupplierInfo.Id {
|
|
@@ -435,10 +435,10 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
}
|
|
|
|
|
|
b.drawRow(b.Row, "", "", stageType, stage.Name, orderCount, realCount, stageStatus, supplierName, fmt.Sprintf("%.3f元/%s", stage.Price, stage.Unit), stage.Norm, matHeigth, matWidth, unit, price, budgetPrice, realPrice)
|
|
|
- if stage.SupplierInfo != nil {
|
|
|
- cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
+ // if stage.SupplierInfo != nil {
|
|
|
+ // cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
|
|
|
- }
|
|
|
+ // }
|
|
|
b.Row++
|
|
|
}
|
|
|
|
|
@@ -446,12 +446,12 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
}
|
|
|
|
|
|
// 合并同一供应商名
|
|
|
- for supplierName, cate := range cates {
|
|
|
- mergeStartRow := cate[0]
|
|
|
- mergeEndRow := cate[len(cate)-1]
|
|
|
- b.Excel.MergeCell(b.SheetName, fmt.Sprintf("H%d", mergeStartRow), fmt.Sprintf("H%d", mergeEndRow))
|
|
|
- b.Excel.SetCellValue(b.SheetName, fmt.Sprintf("H%d", mergeEndRow), supplierName)
|
|
|
- }
|
|
|
+ // for supplierName, cate := range cates {
|
|
|
+ // mergeStartRow := cate[0]
|
|
|
+ // mergeEndRow := cate[len(cate)-1]
|
|
|
+ // b.Excel.MergeCell(b.SheetName, fmt.Sprintf("H%d", mergeStartRow), fmt.Sprintf("H%d", mergeEndRow))
|
|
|
+ // b.Excel.SetCellValue(b.SheetName, fmt.Sprintf("H%d", mergeEndRow), supplierName)
|
|
|
+ // }
|
|
|
if startRow != 0 {
|
|
|
endRow := b.Row - 1
|
|
|
// 组件名字
|