xuzhiheng 5 years ago
parent
commit
740d0ed7c4
4 changed files with 12 additions and 4 deletions
  1. 4 0
      src/history/util_history.go
  2. BIN
      src/util/.DS_Store
  3. 8 4
      src/util/parsxlsx.go
  4. BIN
      src/web/res/fields.xlsx

+ 4 - 0
src/history/util_history.go

@@ -833,6 +833,10 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string, isfile bool)
 			style.Font.Bold = true
 			style.Alignment.Vertical = "center"
 			style.Alignment.Horizontal = "center"
+			styleleft := xlsx.NewStyle()
+			styleleft.Alignment.Horizontal = "left"
+			styleright := xlsx.NewStyle()
+			styleright.Alignment.Horizontal = "right"
 			if dataType == 1 {
 				sh := xf.Sheets[0]
 				if isfile {

BIN
src/util/.DS_Store


+ 8 - 4
src/util/parsxlsx.go

@@ -25,6 +25,8 @@ const (
 	Tagname = "s_name" //标签的关键词规则名称
 )
 
+var SES = util.SimpleEncrypt{Key: "topJYBX2019"}
+
 //通用标签相关字段
 var export_fields = []string{"s_userid", "s_name", "", "s_area", "s_city", "s_district", "s_toptype", "s_subtype", "i_starttime", "i_endtime", "s_budgetlimit", "s_bidamountlimit", "s_globaltopscopeclass", "s_globalsubscopeclass", "s_globalbuyerclass", "s_globaladdkey", "s_globaladdkeymatch", "s_globalnotkey", "s_globalnotkeymatch", "s_globalclearkey", "s_globalclearkeymatch", "s_existfields", "i_extfieldstype"}
 
@@ -273,7 +275,7 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["buyer"])
 					row.AddCell().SetValue(v["winner"])
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["bidamount"]) / 10000)
+						row.AddCell().SetFloat(util.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
@@ -312,12 +314,12 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["projectname"])
 					row.AddCell().SetValue(v["projectscope"])
 					if v["budget"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["budget"]) / 10000)
+						row.AddCell().SetFloat(util.Float64All(v["budget"]))
 					} else {
 						row.AddCell()
 					}
 					if v["bidamount"] != nil {
-						row.AddCell().SetFloat(util.Float64All(v["bidamount"]) / 10000)
+						row.AddCell().SetFloat(util.Float64All(v["bidamount"]))
 					} else {
 						row.AddCell()
 					}
@@ -336,8 +338,10 @@ func ResponseXlsx_Data(id string) string {
 					row.AddCell().SetValue(v["legal_person"])
 					row.AddCell().SetValue(v["company_phone"])
 					row.AddCell().SetValue(v["company_email"])
+					ids := SES.EncodeString(util.ObjToString(v["info_id"]))
+					row.AddCell().SetValue(ids)
 				}
-				xf.Sheets = xf.Sheets[1:]
+				xf.Sheets = xf.Sheets[1:2]
 
 				fname := fmt.Sprintf(gjpath, time.Now().Unix())
 				err := xf.Save(fname)

BIN
src/web/res/fields.xlsx