From 2a04ec3790ddae1b76b151fafaba3a8a0b8a0c53 Mon Sep 17 00:00:00 2001 From: yinbentan <yinbentan@live.com> Date: 星期五, 28 六月 2024 16:30:28 +0800 Subject: [PATCH] 库存操作添加:调拨、入库、出库按类型配置字典类(1 调拨 2 入库 3 出库) --- models/operation.go | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/models/operation.go b/models/operation.go index fb9a0c7..9caeb40 100644 --- a/models/operation.go +++ b/models/operation.go @@ -61,8 +61,10 @@ CheckedBy string `json:"checkedBy" gorm:"type:varchar(255);comment:楠岃瘉鑰匲serId"` Remark string `json:"remark"` - WarehouseId int `json:"warehouseId" gorm:"type:int;not null;comment:浠撳簱id"` - IsInternalOutput bool `json:"isInternalOutput"` //鏄惁璋冩嫧浜х敓鐨勫嚭搴� + WarehouseId int `json:"warehouseId" gorm:"type:int;not null;comment:浠撳簱id"` + IsInternalOutput bool `json:"isInternalOutput"` //鏄惁璋冩嫧浜х敓鐨勫嚭搴� + InventoryDealerType int `json:"inventoryDealerType" gorm:"type:varchar(255);comment:浼氳鍚嶇О"` + InventoryDealer MiniDict `json:"inventoryDealer" gorm:"foreignKey:InventoryDealerType;"` } OperationSearch struct { @@ -218,7 +220,7 @@ } if slf.Preload { - db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("LogisticCompany").Preload("Location").Preload("ToLocation").Preload("Details.FromLocation").Preload("Details.ToLocation") + db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("LogisticCompany").Preload("Location").Preload("ToLocation").Preload("Details.FromLocation").Preload("Details.ToLocation").Preload("InventoryDealer") } if slf.Disuse { -- Gitblit v1.8.0