|
@@ -356,6 +356,7 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
|
|
|
for _, splan := range b.Content.Plans {
|
|
|
planStartRow := b.Row
|
|
|
+ isContainSupplier := false
|
|
|
plan := splan.Plan
|
|
|
comps := plan.Pack.Components
|
|
|
// 预算金额汇总
|
|
@@ -373,6 +374,7 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
if stage.SupplierInfo != nil {
|
|
|
if b.Content.SupplierId == stage.SupplierInfo.Id {
|
|
|
supplier = stage.SupplierInfo.Name
|
|
|
+ isContainSupplier = true
|
|
|
// 材料
|
|
|
if startRow == 0 {
|
|
|
startRow = b.Row
|
|
@@ -516,11 +518,13 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if !isContainSupplier {
|
|
|
+ continue
|
|
|
+ }
|
|
|
totalBudgetPrice += planBudgetPrice
|
|
|
totalRealPrice += planRealPrice
|
|
|
|
|
|
- // plan
|
|
|
- // b.row +2 分割每个计划
|
|
|
+ // 产品名称
|
|
|
planEndRow := b.Row
|
|
|
planStartACell := fmt.Sprintf("%s%d", "A", planStartRow)
|
|
|
planEndACell := fmt.Sprintf("%s%d", "A", planEndRow-1)
|
|
@@ -530,6 +534,7 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
|
|
|
return err
|
|
|
}
|
|
|
b.Excel.SetCellValue(b.SheetName, planStartACell, fmt.Sprintf("%s(%d)", plan.Name, plan.Total))
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// summaryEndRow := b.Row
|