|
@@ -209,9 +209,13 @@ func (b *PlanCostExcel) drawSupplierContent() error {
|
|
|
if stage.Unit == "吨" || stage.Unit == "平方米" {
|
|
|
stage.Unit = "张"
|
|
|
}
|
|
|
+ supplierName := ""
|
|
|
+ if stage.SupplierInfo != nil {
|
|
|
+ supplierName = stage.SupplierInfo.Name
|
|
|
+ }
|
|
|
|
|
|
- b.drawRow(b.Row, "", stage.Name, "", "", stage.Norm, matHeigth, matWidth, stage.Unit, orderCount, realCount, price, budgetPrice, realPrice)
|
|
|
- cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
+ b.drawRow(b.Row, "", stage.Name, "", supplierName, stage.Norm, matHeigth, matWidth, stage.Unit, orderCount, realCount, price, budgetPrice, realPrice)
|
|
|
+ cates[stage.Group] = append(cates[stage.Group], b.Row)
|
|
|
b.Row++
|
|
|
}
|
|
|
|
|
@@ -273,6 +277,8 @@ func (b *PlanCostExcel) drawSupplierContent() error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+// type merge
|
|
|
+
|
|
|
func (b *PlanCostExcel) drawAllContent() error {
|
|
|
b.Row += 2
|
|
|
comps := b.Content.Pack.Components
|
|
@@ -312,8 +318,12 @@ func (b *PlanCostExcel) drawAllContent() error {
|
|
|
if stage.Unit == "吨" || stage.Unit == "平方米" {
|
|
|
stage.Unit = "张"
|
|
|
}
|
|
|
- b.drawRow(b.Row, "", stage.Name, "", "", stage.Norm, matHeigth, matWidth, stage.Unit, orderCount, realCount, price, budgetPrice, realPrice)
|
|
|
- cates[stage.SupplierInfo.Name] = append(cates[stage.SupplierInfo.Name], b.Row)
|
|
|
+ supplierName := ""
|
|
|
+ if stage.SupplierInfo != nil {
|
|
|
+ supplierName = stage.SupplierInfo.Name
|
|
|
+ }
|
|
|
+ b.drawRow(b.Row, "", stage.Name, "", supplierName, stage.Norm, matHeigth, matWidth, stage.Unit, orderCount, realCount, price, budgetPrice, realPrice)
|
|
|
+ cates[stage.Group] = append(cates[stage.Group], b.Row)
|
|
|
b.Row++
|
|
|
|
|
|
}
|