caipin 4 år sedan
förälder
incheckning
b83672008f
2 ändrade filer med 10 tillägg och 8 borttagningar
  1. 1 0
      services/contract_return_service.go
  2. 9 8
      web/viewmodels/contracts_return.go

+ 1 - 0
services/contract_return_service.go

@@ -36,6 +36,7 @@ func (s *contractService) makeContractRetrunVM(data *models.CmContractsReturn) *
 	viewContractsReturn.Time = data.Time.Format(conf.SysTimeform)
 
 	price, _ := strconv.ParseFloat(data.Price, 64)
+	viewContractsReturn.PriceFloat = price
 	viewContractsReturn.Price = utils.PriceToStringFormat(price)
 
 	viewContractsReturn.Way = data.Way

+ 9 - 8
web/viewmodels/contracts_return.go

@@ -14,14 +14,15 @@ type ContractsReturn struct {
 	ProjectId    string `form:"projectId" json:"projectId" `
 	BidsectionId string `form:"bidsectionId" json:"bidsectionId" `
 	// TreeId       string `form:"treeId" json:"treeId" `
-	Time       string `form:"time" json:"time" `
-	Price      string `form:"price" json:"price" `
-	Way        string `form:"way" json:"way" `
-	CreateUser string `form:"createUser" json:"createUser" `
-	AccountId  string `form:"accountId" json:"accountId" `
-	Remarks    string `form:"remarks" json:"remarks" `
-	CreateTime string `form:"createTime" json:"createTime" `
-	FileCounts int64  `from:"fileCounts" json:"fileCounts"`
+	Time       string  `form:"time" json:"time" `
+	PriceFloat float64 `form:"priceFloat" json:"priceFloat" `
+	Price      string  `form:"price" json:"price" `
+	Way        string  `form:"way" json:"way" `
+	CreateUser string  `form:"createUser" json:"createUser" `
+	AccountId  string  `form:"accountId" json:"accountId" `
+	Remarks    string  `form:"remarks" json:"remarks" `
+	CreateTime string  `form:"createTime" json:"createTime" `
+	FileCounts int64   `from:"fileCounts" json:"fileCounts"`
 
 	Page int `form:"page" json:"page" `
 }