From d533225faddf7b77497b479e8c3fe6458ffe7c40 Mon Sep 17 00:00:00 2001
From: lishihai <dslsh@dscom>
Date: 星期四, 20 六月 2024 19:52:31 +0800
Subject: [PATCH] 成本单价-销售单价业务修正

---
 controllers/operation.go    |    8 ++++----
 models/operation_details.go |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/controllers/operation.go b/controllers/operation.go
index 98f633a..b9053f9 100644
--- a/controllers/operation.go
+++ b/controllers/operation.go
@@ -95,7 +95,7 @@
 		if err := models.NewOperationSearch().Create(&params); err != nil {
 			return err
 		}
-		od := params.Details
+		/*od := params.Details
 		for _, v := range od {
 			//material, err := models.NewMaterialSearch().SetID(v.ProductId).First()
 			//if err != nil {return err}
@@ -106,7 +106,7 @@
 			if err := models.NewMaterialSearch().SetOrm(db).Update(material); err != nil {
 				return err
 			}
-		}
+		}*/
 		return nil
 	})
 
@@ -352,7 +352,7 @@
 		if err := models.NewOperationSearch().SetOrm(tx).SetID(params.Id).Save(&params); err != nil {
 			return err
 		}
-		od := params.Details
+		/*od := params.Details
 		for _, v := range od {
 			//material, err := models.NewMaterialSearch().SetID(v.ProductId).First()
 			//if err != nil {return err}
@@ -363,7 +363,7 @@
 			if err := models.NewMaterialSearch().SetOrm(tx).Update(material); err != nil {
 				return err
 			}
-		}
+		}*/
 		return nil
 	}); err != nil {
 		util.ResponseFormat(c, code.RequestParamError, "淇敼澶辫触锛�"+err.Error())
diff --git a/models/operation_details.go b/models/operation_details.go
index eff3996..16f65f4 100644
--- a/models/operation_details.go
+++ b/models/operation_details.go
@@ -30,8 +30,8 @@
 		Remark           string          `gorm:"type:varchar(1024);comment:澶囨敞" json:"remark"`
 		IsInternalOutput bool            `json:"isInternalOutput"` //鏄惁璋冩嫧浜х敓鐨勫嚭搴�
 
-		Cost      decimal.Decimal `json:"cost" gorm:"-"`      //鎴愭湰鍗曚环
-		SalePrice decimal.Decimal `json:"salePrice" gorm:"-"` //閿�鍞崟浠�
+		Cost      decimal.Decimal `json:"cost" `      //鎴愭湰鍗曚环
+		SalePrice decimal.Decimal `json:"salePrice" ` //閿�鍞崟浠�
 	}
 
 	OperationDetailsSearch struct {

--
Gitblit v1.8.0