From 5f7f65f00d4d1c280f8b09b73ef7dcfa2af0fd54 Mon Sep 17 00:00:00 2001
From: dsmzx <dsmzx@123.com>
Date: 星期三, 26 六月 2024 09:14:21 +0800
Subject: [PATCH] 出库/入库 打印

---
 models/warehouse.go |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/models/warehouse.go b/models/warehouse.go
index df467d2..d6756af 100644
--- a/models/warehouse.go
+++ b/models/warehouse.go
@@ -4,6 +4,7 @@
 	"fmt"
 	"gorm.io/gorm"
 	"strings"
+	"wms/constvar"
 	"wms/pkg/mysqlx"
 )
 
@@ -11,23 +12,25 @@
 	// Warehouse 浠撳簱
 	Warehouse struct {
 		WmsModel
-		Id                     int          `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
-		Name                   string       `json:"name" gorm:"index;type:varchar(255);not null;comment:浠撳簱鍚嶇О"`                   //浠撳簱鍚嶇О
-		Active                 bool         `json:"active" gorm:"type:tinyint(1);not null;comment:鏄惁婵�娲�"`                         //鏄惁鍚敤锛屼紶true灏辫
-		Code                   string       `json:"code" gorm:"index;type:varchar(255);not null;comment:浠撳簱缂栫爜"`                   //浠撳簱缂栫爜
-		PartnerID              int          `json:"partnerId"  gorm:"type:int;not null;comment:鍚堜綔浼欎即id"`                          //鍚堜綔浼欎即id
-		BuyToResupply          bool         `json:"buyToResupply" gorm:"type:tinyint(1);not null;comment:鏄惁璐拱琛ョ粰"`                //鏄惁璐拱琛ョ粰锛屽凡璐拱浜у搧鑳藉鍙戦�佸埌姝や粨搴�
-		ResupplyWhIdsStr       string       `json:"-" gorm:"column:resupply_wh_ids;type:varchar(255);not null;comment:琛ョ粰鏉ユ簮浠撳簱ID"` //琛ョ粰鏉ユ簮浠撳簱ID
-		ResupplyWhIds          []string     `json:"resupplyWhIds" gorm:"-"`                                                      //琛ョ粰鏉ユ簮浠撳簱ID
-		ResupplyWh             []*Warehouse `json:"resupplyWh" gorm:"-"`                                                         //琛ョ粰鏉ユ簮浠撳簱
-		CompanyId              int          `json:"companyId" gorm:"type:int;not null;comment:鍏徃id"`
-		Company                Company      `json:"company" gorm:"foreignKey:CompanyId"`
-		Address                string       `json:"address" gorm:"type:varchar(512);comment:鍦板潃"`         //鍦板潃
-		InboundTransportation  int          `json:"inboundTransportation" gorm:"type:int;comment:鍏ュ悜杩愯緭"`  //鍏ュ悜杩愯緭
-		OutboundTransportation int          `json:"outboundTransportation" gorm:"type:int;comment:鍑哄簱杩愯緭"` //鍑哄簱杩愯緭
-		LocationId             int          `json:"locationId" gorm:"type:int;comment:浣嶇疆id"`             //榛樿浣嶇疆id
-		WarehouseLocation      string       `json:"warehouseLocation" gorm:"-"`                          //搴撳瓨浣嶇疆
-		Contacts               string       `json:"contacts" gorm:"type:varchar(255);comment:鑱旂郴浜�"`       //鑱旂郴浜�
+		Id                      int                           `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
+		Name                    string                        `json:"name" gorm:"index;type:varchar(255);not null;comment:浠撳簱鍚嶇О"`                   //浠撳簱鍚嶇О
+		Active                  bool                          `json:"active" gorm:"type:tinyint(1);not null;comment:鏄惁婵�娲�"`                         //鏄惁鍚敤锛屼紶true灏辫
+		Code                    string                        `json:"code" gorm:"index;type:varchar(255);not null;comment:浠撳簱缂栫爜"`                   //浠撳簱缂栫爜
+		PartnerID               int                           `json:"partnerId"  gorm:"type:int;not null;comment:鍚堜綔浼欎即id"`                          //鍚堜綔浼欎即id
+		BuyToResupply           bool                          `json:"buyToResupply" gorm:"type:tinyint(1);not null;comment:鏄惁璐拱琛ョ粰"`                //鏄惁璐拱琛ョ粰锛屽凡璐拱浜у搧鑳藉鍙戦�佸埌姝や粨搴�
+		ResupplyWhIdsStr        string                        `json:"-" gorm:"column:resupply_wh_ids;type:varchar(255);not null;comment:琛ョ粰鏉ユ簮浠撳簱ID"` //琛ョ粰鏉ユ簮浠撳簱ID
+		ResupplyWhIds           []string                      `json:"resupplyWhIds" gorm:"-"`                                                      //琛ョ粰鏉ユ簮浠撳簱ID
+		ResupplyWh              []*Warehouse                  `json:"resupplyWh" gorm:"-"`                                                         //琛ョ粰鏉ユ簮浠撳簱
+		CompanyId               int                           `json:"companyId" gorm:"type:int;not null;comment:鍏徃id"`
+		Company                 Company                       `json:"company" gorm:"foreignKey:CompanyId"`
+		Address                 string                        `json:"address" gorm:"type:varchar(512);comment:鍦板潃"`         //鍦板潃
+		InboundTransportation   int                           `json:"inboundTransportation" gorm:"type:int;comment:鍏ュ悜杩愯緭"`  //鍏ュ悜杩愯緭
+		OutboundTransportation  int                           `json:"outboundTransportation" gorm:"type:int;comment:鍑哄簱杩愯緭"` //鍑哄簱杩愯緭
+		LocationId              int                           `json:"locationId" gorm:"type:int;comment:浣嶇疆id"`             //榛樿浣嶇疆id
+		WarehouseLocation       string                        `json:"warehouseLocation" gorm:"-"`                          //搴撳瓨浣嶇疆
+		Contacts                string                        `json:"contacts" gorm:"type:varchar(255);comment:鑱旂郴浜�"`       //鑱旂郴浜�
+		FileTemplateCategoryIn  constvar.FileTemplateCategory `json:"fileTemplateCategoryIn" gorm:"type:int(11);comment:鍏ュ簱妯$増绉嶇被"`
+		FileTemplateCategoryOut constvar.FileTemplateCategory `json:"fileTemplateCategoryOut" gorm:"type:int(11);comment:鍑哄簱妯$増绉嶇被"`
 	}
 
 	WarehouseSearch struct {

--
Gitblit v1.8.0