|
@@ -2556,23 +2556,11 @@ func ExportNotPaymentCensusList(c *gin.Context, results *fms.NotInvoicePaymentCe
|
|
|
rowTitle := []string{"序号", "客户名称", "是否新客户", "合同有效期", "开票日", "开票金额", "到款日", "到款金额", "付款方式", "销售",
|
|
|
"销售组别", "销售类型"}
|
|
|
|
|
|
- hi := 0
|
|
|
- insertHi := 0
|
|
|
titleRow := sheet.AddRow()
|
|
|
for i := range rowTitle {
|
|
|
v := titleRow.AddCell()
|
|
|
v.SetString(rowTitle[i])
|
|
|
v.SetStyle(style)
|
|
|
- if rowTitle[i] != "权益大套餐" && rowTitle[i] != "医药" && rowTitle[i] != "消费" && rowTitle[i] != "科技" && rowTitle[i] != "智造" {
|
|
|
- v.VMerge = 1
|
|
|
- hi++
|
|
|
- } else {
|
|
|
- if insertHi == 0 {
|
|
|
- insertHi = hi
|
|
|
- }
|
|
|
- v.HMerge = 1
|
|
|
- titleRow.AddCell().SetString("")
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
newCompanyMap := map[int]string{0: "否", 1: "是"}
|
|
@@ -2600,7 +2588,7 @@ func ExportNotPaymentCensusList(c *gin.Context, results *fms.NotInvoicePaymentCe
|
|
|
colD.VMerge = mergeRowNum
|
|
|
colD.SetString(fmt.Sprint(v.StartDate, "至", v.EndDate))
|
|
|
// 开票到款信息
|
|
|
- for k2, v2 := range v.InvoicePaymentList {
|
|
|
+ for _, v2 := range v.InvoicePaymentList {
|
|
|
rowData := []string{
|
|
|
v2.InvoiceDate, // 开票日
|
|
|
fmt.Sprint(v2.InvoiceAmount), // 开票金额
|
|
@@ -2611,20 +2599,8 @@ func ExportNotPaymentCensusList(c *gin.Context, results *fms.NotInvoicePaymentCe
|
|
|
v2.SellerGroupName, // 组别
|
|
|
sellerTypeMap[v2.SellerType], // 销售类型
|
|
|
}
|
|
|
- // 首行开票到款
|
|
|
- if k2 == 0 {
|
|
|
- for i := range rowData {
|
|
|
- dataRow.AddCell().SetString(rowData[i])
|
|
|
- }
|
|
|
- continue
|
|
|
- }
|
|
|
- // 其他行开票到款, 加四列空的单元格用于合并
|
|
|
- dataRowExtra := sheet.AddRow()
|
|
|
- for i := 0; i < 4; i++ {
|
|
|
- dataRowExtra.AddCell()
|
|
|
- }
|
|
|
for i := range rowData {
|
|
|
- dataRowExtra.AddCell().SetString(rowData[i])
|
|
|
+ dataRow.AddCell().SetString(rowData[i])
|
|
|
}
|
|
|
}
|
|
|
}
|