fix
wangpengfei
2023-08-23 3450a34e91757a603ce822fd9299135b14752bfe
model/receipt.go
@@ -14,6 +14,7 @@
   Receipt struct {
      Id            int                        `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      ClientId      int                        `gorm:"column:client_id;type:int;not null;default 0;comment:客户id" json:"clientId"`                                // 客户id
      Client        Client                     `gorm:"foreignKey:ClientId" json:"client"`                                                                        // 客户id
      SourceType    constvar.ReceiptSourceType `gorm:"column:source_type;type:int;not null;default 0;comment:来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)" json:"sourceType"` // 来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)
      SourceId      int                        `gorm:"column:source_id;type:int;not null;default 0;comment:源单id " json:"sourceId"`                               // 源单id
      PrincipalId   int                        `gorm:"column:principal_id;type:int;not null;default 0;comment:负责人id" json:"principalId"`                         // 负责人id
@@ -134,7 +135,7 @@
      db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
   }
   err := db.Find(&records).Error
   err := db.Preload("Principal").Preload("Client").Find(&records).Error
   return records, total, err
}