feat: export excel file

This commit is contained in:
zchengo
2022-12-27 19:18:58 +08:00
parent f11313797b
commit 2235516232
18 changed files with 418 additions and 46 deletions
+12
View File
@@ -91,6 +91,18 @@ type Products struct {
Total float64 `json:"total"`
}
type ContractExcelRow struct {
Name string `json:"name"`
Cname string `json:"cname"`
Amount float64 `json:"amount"`
BeginTime string `json:"beginTime"`
OverTime string `json:"overTime"`
Remarks string `json:"remarks"`
Status string `json:"status"`
Created string `json:"created"`
Updated string `json:"updated"`
}
type Productlist []*Products
func (p *Productlist) Value() (driver.Value, error) {
+16
View File
@@ -91,3 +91,19 @@ type CustomerOption struct {
Id int64 `json:"id"`
Name string `json:"name"`
}
type CustomerExcelRow struct {
Name string `json:"name"`
Source string `json:"source"`
Phone string `json:"phone"`
Email string `json:"email"`
Industry string `json:"industry"`
Level string `json:"level"`
Remarks string `json:"remarks"`
Region string `json:"region"`
Address string `json:"address"`
Status string `json:"status"`
Creator int64 `json:"creator"`
Created string `json:"created"`
Updated string `json:"updated"`
}
+12
View File
@@ -73,3 +73,15 @@ type ProductInfo struct {
Description string `json:"description"`
Status int `json:"status"`
}
type ProductExcelRow struct {
Name string `json:"name"`
Type string `json:"type"`
Unit string `json:"unit"`
Code string `json:"code"`
Price float64 `json:"price"`
Description string `json:"description"`
Status string `json:"status"`
Created string `json:"created"`
Updated string `json:"updated"`
}