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

---
 model/purchase/request/purchase.go |   42 ++++++++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/model/purchase/request/purchase.go b/model/purchase/request/purchase.go
index c21910a..1612ce1 100644
--- a/model/purchase/request/purchase.go
+++ b/model/purchase/request/purchase.go
@@ -4,13 +4,11 @@
 	"github.com/shopspring/decimal"
 	"srm/model/common/request"
 	"srm/model/purchase"
-	"time"
 )
 
 type PurchaseSearch struct {
-	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
-	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
 	request.PageInfo
+	SupplierId int `json:"supplierId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:渚涘簲鍟唅d"` // 渚涘簲鍟唅d
 }
 
 type AddPurchase struct {
@@ -29,9 +27,10 @@
 }
 
 type Purchase struct {
-	ID                  uint                         `gorm:"primarykey"`                                                                                                 // 涓婚敭ID
-	PurchaseTypeId      int                          `json:"purchaseTypeId" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:閲囪喘绫诲瀷id"`                   // 閲囪喘绫诲瀷id
-	SupplierId          int                          `json:"supplierId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:渚涘簲鍟唅d"`                          // 渚涘簲鍟唅d
+	ID                  uint                         `json:"id,string" gorm:"primarykey"`                                                                                // 涓婚敭ID
+	PurchaseTypeId      int                          `json:"purchaseTypeId,string" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:閲囪喘绫诲瀷id"`            // 閲囪喘绫诲瀷id
+	SupplierId          int                          `json:"supplierId,string" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:渚涘簲鍟唅d"`                   // 渚涘簲鍟唅d
+	OrderSource         string                       `json:"orderSource" gorm:"type:varchar(255);not null;default '';comment:鍗曟嵁鏉ユ簮"`                                      // 鍗曟嵁鏉ユ簮
 	Number              string                       `json:"number" form:"number" gorm:"unique;type:varchar(255);not null;default '';comment:閲囪喘缂栧彿"`                      // 閲囪喘缂栧彿
 	Name                string                       `json:"name" form:"name" gorm:"type:varchar(255);not null;default '';comment:閲囪喘鍚嶇О"`                                 // 閲囪喘鍚嶇О
 	Contact             string                       `json:"contact" form:"contact" gorm:"type:varchar(255);not null;default '';comment:鑱旂郴浜�"`                            // 鑱旂郴浜�
@@ -47,4 +46,35 @@
 	PriceAdjustmentType purchase.PriceAdjustmentType `json:"priceAdjustmentType" form:"priceAdjustmentType" gorm:"type:decimal(12,2);not null;default 0;comment:浠锋牸璋冩暣绫诲瀷"` //浠锋牸璋冩暣绫诲瀷
 	PriceAdjustment     decimal.Decimal              `json:"priceAdjustment" form:"priceAdjustment" gorm:"type:decimal(12,2);not null;default 0.00;comment:浠锋牸璋冩暣"`        //浠锋牸璋冩暣鍊�
 	RealTotalPrice      decimal.Decimal              `json:"realTotalPrice" form:"realTotalPrice" gorm:"type:decimal(12,2);not null;default 0.00;comment:鏈�缁堜环鏍�"`          //鏈�缁堜环鏍�
+	Warehouse           string                       `json:"warehouse" form:"warehouse" gorm:"type:varchar(255);not null;default '';comment:鏀惰揣浠撳簱"`                       //鏀惰揣浠撳簱
+	WarehouseAddress    string                       `json:"warehouseAddress" form:"warehouseAddress" gorm:"type:varchar(512);default '';comment:鏀惰揣浠撳簱鍦板潃"`                //鏀惰揣浠撳簱鍦板潃
+	Principal           string                       `json:"principal" form:"principal" gorm:"type:varchar(255);not null;default '';comment:浠撳簱璐熻矗浜�"`                      //浠撳簱璐熻矗浜�
+	SourceOrder         string                       `json:"sourceOrder" gorm:"type:varchar(255);comment:鏉ユ簮鍗曟嵁"`                                                          //鏉ユ簮鍗曟嵁
+}
+
+type PurchaseProductConfirmInfo struct {
+	PurchaseNumber       string          `json:"purchaseNumber" gorm:"type:varchar(255);comment:閲囪喘鍗曠紪鍙�"`
+	ProductId            string          `json:"productId"  gorm:"type:varchar(255);comment:浜у搧缂栫爜"`
+	ProductName          string          `json:"productName"  gorm:"type:varchar(255);comment:浜у搧鍚�"`
+	Principal            string          `json:"principal" gorm:"type:varchar(255);comment:鏀惰揣浜�"`
+	Unit                 string          `json:"unit" gorm:"type:varchar(255);comment:璁¢噺鍗曚綅"`
+	Specs                string          `json:"specs" gorm:"type:varchar(255);comment:瑙勬牸"`
+	Type                 string          `json:"type" gorm:"type:varchar(255);comment:鍨嬪彿"`
+	Amount               decimal.Decimal `json:"amount" gorm:"type:decimal(12,4);not null;comment:閲囪喘鏁伴噺"`
+	OverReceiveAmount    decimal.Decimal `json:"overReceiveAmount" gorm:"type:decimal(12,4);comment:宸叉敹璐ф暟閲�"`
+	NotReceiveAmount     decimal.Decimal `json:"notReceiveAmount" gorm:"type:decimal(12,4);comment:鏈敹璐ф暟閲�"`
+	NowReceiveAmount     decimal.Decimal `json:"nowReceiveAmount" gorm:"type:decimal(12,4);comment:鏈鏀惰揣鏁伴噺"`
+	SurplusReceiveAmount decimal.Decimal `json:"surplusReceiveAmount" gorm:"type:decimal(12,4);comment:鍓╀綑鏀惰揣鏁伴噺"`
+}
+
+type GetQualityInspectionInfo struct {
+	PurchaseNumber string   `json:"purchaseNumber"`
+	Status         []int    `json:"status"`
+	Times          []string `json:"times"`
+}
+
+type SaveQualityInspectionInfo struct {
+	PurchaseId uint  `json:"purchaseId"`
+	Ids        []int `json:"ids"`
+	Status     int   `json:"status"`
 }

--
Gitblit v1.8.0