| | |
| | | productList[k].Amount = decimal.NewFromFloat(1) |
| | | productList[k].Total = productList[k].Price.Mul(productList[k].Amount).Round(2) |
| | | productList[k].Unit = v.Unit |
| | | productList[k].Type = v.Type |
| | | productList[k].Specs = v.Specs |
| | | } |
| | | |
| | | ctx.OkWithDetailed(response.ListResponse{ |
| | |
| | | Cost string `json:"cost" gorm:"column:cost;type:varchar(255);comment:产品成本"` |
| | | Profit string `json:"profit" gorm:"column:profit;type:varchar(255);comment:毛利"` |
| | | Margin string `json:"margin" gorm:"column:margin;type:varchar(255);comment:毛利率"` |
| | | Specs string `gorm:"type:varchar(191);comment:物料规格" json:"specs"` |
| | | Type string `gorm:"type:varchar(191);comment:物料型号" json:"type"` |
| | | gorm.Model `json:"-"` |
| | | } |
| | | |