animeic 2 years ago
parent
commit
2f4e2c8b4d
3 changed files with 18 additions and 14 deletions
  1. BIN
      boxcost/__debug_bin
  2. 6 4
      boxcost/api/plan-cost-excel.go
  3. 12 10
      boxcost/api/plan-summary-excel.go

BIN
boxcost/__debug_bin


+ 6 - 4
boxcost/api/plan-cost-excel.go

@@ -419,10 +419,12 @@ func (b *PlanCostExcel) drawSupplierContent() error {
 								}
 
 								// 完成状态
-								if splan.State[stage.BillId] == "complete" {
-									stageStatus = "已完成"
-								} else if splan.State[stage.BillId] == "created" {
-									stageStatus = "进行中"
+								if !stop {
+									if splan.State[stage.BillId] == "complete" {
+										stageStatus = "已完成"
+									} else if splan.State[stage.BillId] == "created" {
+										stageStatus = "进行中"
+									}
 								}
 
 								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)

+ 12 - 10
boxcost/api/plan-summary-excel.go

@@ -244,10 +244,12 @@ func (b *PlanSummaryExcel) drawAllContent() error {
 						}
 
 						// 完成状态
-						if splan.State[stage.BillId] == "complete" {
-							stageStatus = "已完成"
-						} else if splan.State[stage.BillId] == "created" {
-							stageStatus = "进行中"
+						if !stop {
+							if splan.State[stage.BillId] == "complete" {
+								stageStatus = "已完成"
+							} else if splan.State[stage.BillId] == "created" {
+								stageStatus = "进行中"
+							}
 						}
 
 						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)
@@ -287,7 +289,6 @@ func (b *PlanSummaryExcel) drawAllContent() error {
 		totalRealPrice += planRealPrice
 
 		// plan
-		// b.row +2 分割每个计划
 		planEndRow := b.Row
 		planStartACell := fmt.Sprintf("%s%d", "A", planStartRow)
 		planEndACell := fmt.Sprintf("%s%d", "A", planEndRow-1)
@@ -297,7 +298,6 @@ func (b *PlanSummaryExcel) drawAllContent() error {
 			return err
 		}
 		b.Excel.SetCellValue(b.SheetName, planStartACell, plan.Name)
-		// b.Row += 2
 
 	}
 
@@ -434,10 +434,12 @@ func (b *PlanSummaryExcel) drawSupplierContent() error {
 								}
 
 								// 完成状态
-								if splan.State[stage.BillId] == "complete" {
-									stageStatus = "已完成"
-								} else if splan.State[stage.BillId] == "created" {
-									stageStatus = "进行中"
+								if !stop {
+									if splan.State[stage.BillId] == "complete" {
+										stageStatus = "已完成"
+									} else if splan.State[stage.BillId] == "created" {
+										stageStatus = "进行中"
+									}
 								}
 
 								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)