From da621f474d28ab041dcf258142eddb506100a8ce Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 31 七月 2024 16:28:37 +0800
Subject: [PATCH] 出入库明细支持动态多单位

---
 response/report_forms_response.go |   43 +++++++++++++++++++++++--------------------
 1 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/response/report_forms_response.go b/response/report_forms_response.go
index aee3590..3df17ff 100644
--- a/response/report_forms_response.go
+++ b/response/report_forms_response.go
@@ -2,7 +2,6 @@
 
 import (
 	"github.com/shopspring/decimal"
-	"time"
 	"wms/constvar"
 	"wms/models"
 )
@@ -11,6 +10,8 @@
 	ProduceId                string             `json:"produceId"`                //浜у搧id
 	ProductName              string             `json:"productName"`              //浜у搧鍚嶇О
 	ProductType              string             `json:"productType"`              //浜у搧绫诲瀷
+	ProductCategory          string             `json:"productCategory"`          //浜у搧绫诲埆
+	ProductSpecs             string             `json:"productSpecs"`             //浜у搧瑙勬牸
 	Cost                     decimal.Decimal    `json:"cost"`                     //鎴愭湰
 	Value                    decimal.Decimal    `json:"value"`                    //鎬讳环鍊�
 	Amount                   decimal.Decimal    `json:"amount"`                   //鍦ㄥ簱鏁伴噺
@@ -25,17 +26,18 @@
 }
 
 type InventoryHistory struct {
-	Number            string                     `json:"number"`            //鍗曞彿
-	Date              time.Time                  `json:"date"`              //鏃ユ湡
-	ProductName       string                     `json:"productName"`       //浜у搧鍚嶇О
-	FromLocation      string                     `json:"fromLocation"`      //婧愪綅缃�
-	ToLocation        string                     `json:"toLocation"`        //鐩爣浣嶇疆
-	Amount            decimal.Decimal            `json:"amount"`            //鏁伴噺
-	Unit              string                     `json:"unit"`              //鍗曚綅
-	ContactedName     string                     `json:"contactedName"`     //瀹屾垚鑰�
-	Status            string                     `json:"status"`            //鐘舵��
-	BaseOperationType constvar.BaseOperationType `json:"baseOperationType"` //鍩虹浣滀笟绫诲瀷
-	Weight            decimal.Decimal            `json:"weight"`            //閲嶉噺
+	Number            string                     `json:"number"`                   //鍗曞彿
+	Date              string                     `json:"date"`                     //鏃ユ湡
+	ProductName       string                     `json:"productName"`              //浜у搧鍚嶇О
+	FromLocation      string                     `json:"fromLocation"`             //婧愪綅缃�
+	ToLocation        string                     `json:"toLocation"`               //鐩爣浣嶇疆
+	Amount            decimal.Decimal            `json:"amount"`                   //鏁伴噺
+	AmountMoreUnits   []models.UnitItems         `json:"amountMoreUnits" gorm:"-"` //鏁伴噺澶氬崟浣�
+	Unit              string                     `json:"unit"`                     //鍗曚綅
+	ContactedName     string                     `json:"contactedName"`            //瀹屾垚鑰�
+	Status            string                     `json:"status"`                   //鐘舵��
+	BaseOperationType constvar.BaseOperationType `json:"baseOperationType"`        //鍩虹浣滀笟绫诲瀷
+	Weight            decimal.Decimal            `json:"weight"`                   //閲嶉噺
 	ProductId         string                     `json:"productId"`
 	FromLocationId    int                        `json:"fromLocationId"`
 	ToLocationId      int                        `json:"toLocationId"`
@@ -44,12 +46,13 @@
 }
 
 type LocationForms struct {
-	ProduceId       string          `json:"produceId"`       //浜у搧id
-	LocationId      int             `json:"locationId"`      //浣嶇疆id
-	LocationName    string          `json:"locationName"`    //浣嶇疆鍚嶇О
-	ProductName     string          `json:"productName"`     //浜у搧鍚嶇О
-	ProductTypeName string          `json:"productTypeName"` //浜у搧绫诲埆
-	Amount          decimal.Decimal `json:"amount"`          //鏁伴噺
-	Unit            string          `json:"unit"`            //鍗曚綅
-	Value           decimal.Decimal `json:"value"`           //鎬讳环鍊�
+	ProduceId       string             `json:"produceId"`       //浜у搧id
+	LocationId      int                `json:"locationId"`      //浣嶇疆id
+	LocationName    string             `json:"locationName"`    //浣嶇疆鍚嶇О
+	ProductName     string             `json:"productName"`     //浜у搧鍚嶇О
+	ProductTypeName string             `json:"productTypeName"` //浜у搧绫诲埆
+	Amount          decimal.Decimal    `json:"amount"`          //鏁伴噺
+	AmountMoreUnits []models.UnitItems `json:"amountMoreUnits"` //鍦ㄥ簱鏁伴噺澶氬崟浣�
+	Unit            string             `json:"unit"`            //鍗曚綅
+	Value           decimal.Decimal    `json:"value"`           //鎬讳环鍊�
 }

--
Gitblit v1.8.0