From c7e82fd1d76b9fb25497d5aba4372bbfe13a8468 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 28 三月 2024 20:00:21 +0800
Subject: [PATCH] 采购入库增加来源

---
 api/v1/test/product.go |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/api/v1/test/product.go b/api/v1/test/product.go
index aba8c67..a962d3f 100644
--- a/api/v1/test/product.go
+++ b/api/v1/test/product.go
@@ -175,27 +175,27 @@
 		return
 	}
 
-	productList := make([]testResp.Product, 0, len(list))
-
-	for _, item := range list {
-		productList = append(productList, testResp.Product{
-			Name:             item.Name,
-			Number:           item.Number,
-			SupplierId:       item.SupplierId,
-			Unit:             item.Unit,
-			PurchasePrice:    item.PurchasePrice,
-			DeliveryTime:     item.DeliveryTime,
-			ShippingDuration: item.ShippingDuration,
-			Specifications:   item.Specifications,
-			ModelNumber:      item.ModelNumber,
-			ProductType:      "",
-			MinimumStock:     item.MinimumStock,
-			MaximumStock:     item.MaximumStock,
-			Remark:           "",
-			SupplierName:     item.Supplier.Name,
-			CategoryName:     item.CategoryName,
-		})
-	}
+	//productList := make([]testResp.Product, 0, len(list))
+	//
+	//for _, item := range list {
+	//	productList = append(productList, testResp.Product{
+	//		Name:             item.Name,
+	//		Number:           item.Number,
+	//		SupplierId:       item.SupplierId,
+	//		Unit:             item.Unit,
+	//		PurchasePrice:    item.PurchasePrice,
+	//		DeliveryTime:     item.DeliveryTime,
+	//		ShippingDuration: item.ShippingDuration,
+	//		Specifications:   item.Specifications,
+	//		ModelNumber:      item.ModelNumber,
+	//		ProductType:      "",
+	//		MinimumStock:     item.MinimumStock,
+	//		MaximumStock:     item.MaximumStock,
+	//		Remark:           "",
+	//		SupplierName:     item.Supplier.Name,
+	//		CategoryName:     item.CategoryName,
+	//	})
+	//}
 
 	response.OkWithDetailed(response.PageResult{
 		List:     list,
@@ -248,7 +248,7 @@
 		return
 	}
 
-	productList := make([]testResp.Material, len(list))
+	productList := make([]testResp.Material, 0)
 
 	for _, item := range list {
 		productList = append(productList, testResp.Material{
@@ -256,7 +256,7 @@
 			Number:         item.ID,
 			Unit:           item.Unit,
 			Specifications: item.Specs,
-			ModelNumber:    string(item.Model),
+			ModelNumber:    item.Type,
 			MinimumStock:   item.MinInventory.IntPart(),
 			MaximumStock:   item.MaxInventory.IntPart(),
 			Remark:         "",

--
Gitblit v1.8.0