|
@@ -96,7 +96,7 @@ func (b *PurchaseBillExcel) drawSubTitles() error {
|
|
|
|
|
|
//第二行
|
|
|
drawLeft(row+1, "供应商名称:"+b.Content.Supplier)
|
|
|
- timeformat := b.Content.CreateTime.Format("2006年01月02号 15:04:05")
|
|
|
+ timeformat := b.Content.CreateTime.Local().Format("2006年01月02号 15:04:05")
|
|
|
drawRight(row+1, "下单时间:"+timeformat)
|
|
|
b.Excel.SetRowHeight(b.SheetName, row+1, 21)
|
|
|
|
|
@@ -170,7 +170,18 @@ func (b *PurchaseBillExcel) drawTableTitle() error {
|
|
|
|
|
|
drawCol2("C", "D", "尺寸(mm)", "长", "宽")
|
|
|
drawCol2("C", "D", "尺寸(mm)", "长", "宽")
|
|
|
- drawCol2("F", "G", "单价", "元/张", "元/吨")
|
|
|
+ unit1 := "元/张"
|
|
|
+ unit2 := "元/吨"
|
|
|
+ if len(b.Content.Paper) > 0 {
|
|
|
+ if b.Content.Paper[0].PriceUnit != "" {
|
|
|
+ unit1 = b.Content.Paper[0].PriceUnit
|
|
|
+ }
|
|
|
+ if b.Content.Paper[0].Price2Unit != "" {
|
|
|
+ unit2 = b.Content.Paper[0].Price2Unit
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ drawCol2("F", "G", "单价", unit1, unit2)
|
|
|
|
|
|
return nil
|
|
|
}
|