|
@@ -131,6 +131,21 @@ func (b *ProduceBillExcel) drawSubTitles() error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+ drawLall := func(rowIndex int, value string) error {
|
|
|
+ //左边1
|
|
|
+ left1Cell := fmt.Sprintf("A%d", rowIndex)
|
|
|
+ err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("K%d", rowIndex))
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ b.Excel.SetCellValue(b.SheetName, left1Cell, value)
|
|
|
+ return nil
|
|
|
+ }
|
|
|
+
|
|
|
if !b.Content.IsPrint {
|
|
|
drawLeft = func(rowIndex int, value string) error {
|
|
|
//左边1
|
|
@@ -160,6 +175,21 @@ func (b *ProduceBillExcel) drawSubTitles() error {
|
|
|
b.Excel.SetCellValue(b.SheetName, right1Cell, value)
|
|
|
return nil
|
|
|
}
|
|
|
+
|
|
|
+ drawLall = func(rowIndex int, value string) error {
|
|
|
+ //左边1
|
|
|
+ left1Cell := fmt.Sprintf("A%d", rowIndex)
|
|
|
+ err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("H%d", rowIndex))
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ b.Excel.SetCellValue(b.SheetName, left1Cell, value)
|
|
|
+ return nil
|
|
|
+ }
|
|
|
if b.Content.IsLam {
|
|
|
drawLeft = func(rowIndex int, value string) error {
|
|
|
//左边1
|
|
@@ -190,6 +220,21 @@ func (b *ProduceBillExcel) drawSubTitles() error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+ drawLall = func(rowIndex int, value string) error {
|
|
|
+ //左边1
|
|
|
+ left1Cell := fmt.Sprintf("A%d", rowIndex)
|
|
|
+ err = b.Excel.MergeCell(b.SheetName, left1Cell, fmt.Sprintf("I%d", rowIndex))
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ err = b.Excel.SetCellStyle(b.SheetName, left1Cell, left1Cell, styleLeft)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ b.Excel.SetCellValue(b.SheetName, left1Cell, value)
|
|
|
+ return nil
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -217,7 +262,7 @@ func (b *ProduceBillExcel) drawSubTitles() error {
|
|
|
b.Excel.SetRowHeight(b.SheetName, b.Row+2, 21)
|
|
|
|
|
|
// 第四行
|
|
|
- drawLeft(b.Row+3, "包含工序:"+b.Content.CompProduceName)
|
|
|
+ drawLall(b.Row+3, "包含工序:"+b.Content.CompProduceName)
|
|
|
|
|
|
return nil
|
|
|
}
|