From 81201d441d7c23a5cf27544a2c59de6446c70865 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 30 三月 2024 16:32:33 +0800
Subject: [PATCH] 入库传递销售明细编号
---
model/test/material.go | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/model/test/material.go b/model/test/material.go
index 31d322d..257a277 100644
--- a/model/test/material.go
+++ b/model/test/material.go
@@ -10,8 +10,6 @@
Name string `gorm:"type:varchar(191);not null;comment:鐗╂枡鍚嶇О" json:"name"`
MaterialType MaterialType `gorm:"index;type:int(11);comment:鐗╂枡绫诲瀷(鏁板瓧)" json:"materialType"`
Model MaterialMode `gorm:"type:varchar(191);not null;comment:鐗╂枡绫诲瀷(瀛楃涓�)" json:"model"`
- Explain string `gorm:"type:varchar(512);comment:缂栧彿璇存槑" json:"explain"`
- CodeStandardID string `gorm:"type:varchar(191);comment:缂栫爜瑙勮寖ID" json:"codeStandardID"`
Specs string `gorm:"type:varchar(191);comment:鐗╂枡瑙勬牸" json:"specs"`
Type string `gorm:"type:varchar(191);comment:鐗╂枡鍨嬪彿" json:"type"`
MinInventory decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忓簱瀛�" json:"minInventory"`
@@ -19,9 +17,7 @@
Amount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"`
LockAmount decimal.Decimal `gorm:"type:decimal(35,18);default:0;comment:閿佸畾鏁伴噺" json:"lockAmount"`
Unit string `gorm:"type:varchar(100);comment:鍗曚綅" json:"unit"`
- Note string `gorm:"type:varchar(1024);comment:澶囨敞" json:"note"`
TemplateID string `gorm:"type:varchar(191);comment:妯℃澘ID" json:"-"`
- FSource string `gorm:"type:varchar(191);comment:鐢熶骇杞﹂棿" json:"-"`
Status MaterialStatus `gorm:"type:int(11);comment:鐘舵��" json:"status"`
Supplier string `gorm:"type:varchar(191);comment:渚涘簲鍟�" json:"supplier"`
PurchasePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閲囪喘浠锋牸" json:"purchasePrice"`
@@ -29,10 +25,10 @@
ProduceAheadDay int `gorm:"type:int(11);comment:鍒堕�犳彁鍓嶆湡(澶�)" json:"produceAheadDay"`
MinPurchaseAmount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏈�灏忛噰璐噺" json:"minPurchaseAmount"`
PurchaseType PurchaseType `gorm:"type:int(11);comment:閲囪喘绫诲瀷" json:"purchaseType"`
- IsSale *bool `gorm:"type:tinyint(1);comment:鏄惁閿�鍞�" json:"isSale"`
SalePrice decimal.Decimal `gorm:"type:decimal(35,18);comment:閿�鍞崟浠�" json:"salePrice"`
- AutoIncr uint `gorm:"type:int(11);comment:鑷ID;default:0;" json:"autoIncr"`
- AttachmentList []*Attachment `json:"attachmentList" gorm:"many2many:material_attachment"`
+ CategoryName string `gorm:"type:varchar(255);comment:浜у搧绫诲埆鍚嶇О" json:"categoryName"` //浜у搧绫诲埆鍚嶇О
+ IsStorage int `gorm:"type:tinyint(1);default:1;comment:鏄惁瀛樺簱(1鏄�2鍚�)" json:"isStorage"` //鏃犲簱瀛樼殑鍦╳ms浠ュ強srm涓渶瑕佽繃婊ゆ帀
+ IsVirtual int `json:"isVirtual" gorm:"type:tinyint(1);default:2;comment:鏄惁铏氭嫙鐗╂枡(1鏄�2鍚�)"` //铏氭嫙鐗╂枡鍦∕RP璁$畻鏃惰烦杩囪灞傜骇鐩存帴棰嗙敤涓嬬骇鐗╂枡锛岃櫄鎷熺墿鏂欎笉鐢熸垚宸ュ崟
}
// PurchaseType 閲囪喘绫诲瀷
@@ -59,9 +55,10 @@
MaterialModeRaw MaterialMode = "鍘熸潗鏂�"
MaterialModeSemi MaterialMode = "鍗婃垚鍝�"
MaterialModeFinished MaterialMode = "鎴愬搧"
- MaterialModeAuxiliary MaterialMode = "杈呮枡" //杈呮枡
- MaterialModeConsumables MaterialMode = "鑰楁潗" //鑰楁潗
- MaterialModeOther MaterialMode = "鍏朵粬" //鍏朵粬
+ MaterialModeAuxiliary MaterialMode = "杈呮枡" //杈呮枡
+ MaterialModeConsumables MaterialMode = "鑰楁潗" //鑰楁潗
+ MaterialModeOther MaterialMode = "鍏朵粬" //鍏朵粬
+ MaterialModeVirtual MaterialMode = "铏氭嫙浠�" //铏氭嫙浠�, 涓嶈兘閿�鍞紝涓嶈兘鍑哄叆搴擄紝涓嶈兘閲囪喘
)
func (t MaterialMode) Valid() bool {
@@ -70,7 +67,8 @@
t != MaterialModeAuxiliary &&
t != MaterialModeConsumables &&
t != MaterialModeOther &&
- t != MaterialModeFinished {
+ t != MaterialModeFinished &&
+ t != MaterialModeVirtual {
return false
}
return true
@@ -84,6 +82,14 @@
return MaterialTypeSemi
case MaterialModeFinished:
return MaterialTypeFinished
+ case MaterialModeAuxiliary:
+ return MaterialTypeAuxiliary
+ case MaterialModeConsumables:
+ return MaterialTypeConsumables
+ case MaterialModeOther:
+ return MaterialTypeOther
+ case MaterialModeVirtual:
+ return MaterialTypeVirtual
}
return MaterialType(0)
}
@@ -98,11 +104,12 @@
MaterialTypeAuxiliary //杈呮枡
MaterialTypeConsumables //鑰楁潗
MaterialTypeOther //鍏朵粬
+ MaterialTypeVirtual //铏氭嫙浠�
)
func (t MaterialType) Valid() bool {
if t < MaterialTypeRaw ||
- t > MaterialTypeFinished {
+ t > MaterialTypeVirtual {
return false
}
return true
--
Gitblit v1.8.0