From 502a67429e9ff30be1226f8702918928450045bd Mon Sep 17 00:00:00 2001 From: chenlin Date: Fri, 6 Sep 2024 09:57:30 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E8=B0=83=E6=8B=A8=E7=BC=96=E8=BE=91=E8=AE=A2=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E6=8A=A5=E9=94=99=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=EF=BC=9B=202=E3=80=81=E4=BF=AE=E6=94=B9=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E8=AE=A2=E5=8D=95=E5=8F=8D=E5=AE=A1=E6=A0=B8=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E7=BC=BA=E9=99=B7=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/models/inventory_allot.go | 12 ++++++------ app/admin/models/purchase.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/admin/models/inventory_allot.go b/app/admin/models/inventory_allot.go index 3dd3f49..7c7641d 100644 --- a/app/admin/models/inventory_allot.go +++ b/app/admin/models/inventory_allot.go @@ -142,12 +142,12 @@ func checkAllotInventoryParam(req *InventoryAllotAddReq, editFlag bool) error { } } - // 校验编辑订单时是否有传商品ID - if editFlag { - if item.ID == 0 { - return fmt.Errorf("商品[%s]ID为空", item.CommodityName) - } - } + //// 校验编辑订单时是否有传商品ID + //if editFlag { + // if item.ID == 0 { + // return fmt.Errorf("商品[%s]ID为空", item.CommodityName) + // } + //} // 校验串码类型 switch item.IMEIType { diff --git a/app/admin/models/purchase.go b/app/admin/models/purchase.go index ec966ac..6b3e07f 100644 --- a/app/admin/models/purchase.go +++ b/app/admin/models/purchase.go @@ -1379,7 +1379,7 @@ func combineStocks(waitCreateStockList []ErpStock) []ErpStock { func InventoryErpPurchaseUpdateRejectStock(gdb *gorm.DB, list []ErpPurchaseInventory, purchaseOrder ErpPurchaseOrder) error { usedStockCommodityIdList := make(map[uint32]bool) for i, _ := range list { - if list[i].IMEIType == 2 { // 串码商品 + if list[i].IMEIType == 2 || list[i].IMEIType == 3 { // 串码商品 if list[i].IMEI == "" { return errors.New("串码为空") }