fix
fix preload products of quotation
| | |
| | | quotationModel.ContactId = quotation.ContactId |
| | | quotationModel.Conditions = quotation.Conditions |
| | | quotationModel.File = quotation.File |
| | | quotationModel.Products = quotation.Products |
| | | |
| | | return ecode.OK, quotationModel |
| | | |
| | |
| | | db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) |
| | | } |
| | | |
| | | err := db.Preload("Member").Preload("QuotationStatus").Preload("Client").Preload("Contact").Order("id desc").Find(&records).Error |
| | | err := db.Preload("Products").Preload("Member").Preload("QuotationStatus").Preload("Client").Preload("Contact").Order("id desc").Find(&records).Error |
| | | return records, total, err |
| | | } |
| | | |
| | |
| | | SaleChanceId int `json:"sale_chance_id"` |
| | | Conditions string `json:"conditions"` |
| | | File string `json:"file"` |
| | | Products []*model.Product `json:"products"` |
| | | Products []model.Product `json:"products"` |
| | | } |
| | | |
| | | type UpdateQuotation struct { |