|
@@ -104,6 +104,21 @@ func (b *ProductBillExcel) drawSubTitles() error {
|
|
return nil
|
|
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
|
|
|
|
+ }
|
|
|
|
+
|
|
//第一行
|
|
//第一行
|
|
drawLeft(b.Row, "类别:"+b.Content.Type)
|
|
drawLeft(b.Row, "类别:"+b.Content.Type)
|
|
drawRight(b.Row, "单号:"+b.Content.SerialNumber)
|
|
drawRight(b.Row, "单号:"+b.Content.SerialNumber)
|
|
@@ -127,7 +142,7 @@ func (b *ProductBillExcel) drawSubTitles() error {
|
|
drawRight(b.Row+2, "状态:"+status)
|
|
drawRight(b.Row+2, "状态:"+status)
|
|
b.Excel.SetRowHeight(b.SheetName, b.Row+2, 21)
|
|
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
|
|
return nil
|
|
}
|
|
}
|
|
@@ -237,18 +252,10 @@ func (b *ProductBillExcel) drawTableFooter() error {
|
|
})
|
|
})
|
|
|
|
|
|
sendToStartCell := fmt.Sprintf("A%d", b.Row)
|
|
sendToStartCell := fmt.Sprintf("A%d", b.Row)
|
|
- // sendToEndCell := fmt.Sprintf("G%d", b.Row)
|
|
|
|
- // supplierStartCell := fmt.Sprintf("H%d", b.Row)
|
|
|
|
- // supplierEndCell := fmt.Sprintf("J%d", b.Row)
|
|
|
|
-
|
|
|
|
- // !!isPdf
|
|
|
|
- // if b.IsPdf == "true" {
|
|
|
|
sendToEndCell := fmt.Sprintf("E%d", b.Row)
|
|
sendToEndCell := fmt.Sprintf("E%d", b.Row)
|
|
supplierStartCell := fmt.Sprintf("F%d", b.Row)
|
|
supplierStartCell := fmt.Sprintf("F%d", b.Row)
|
|
supplierEndCell := fmt.Sprintf("H%d", b.Row)
|
|
supplierEndCell := fmt.Sprintf("H%d", b.Row)
|
|
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
b.Excel.MergeCell(b.SheetName, sendToStartCell, sendToEndCell)
|
|
b.Excel.MergeCell(b.SheetName, sendToStartCell, sendToEndCell)
|
|
b.Excel.SetCellStyle(b.SheetName, sendToStartCell, sendToEndCell, styleLeft)
|
|
b.Excel.SetCellStyle(b.SheetName, sendToStartCell, sendToEndCell, styleLeft)
|
|
b.Excel.SetCellValue(b.SheetName, sendToStartCell, "送货地址:"+b.Content.SendTo)
|
|
b.Excel.SetCellValue(b.SheetName, sendToStartCell, "送货地址:"+b.Content.SendTo)
|