|
@@ -486,6 +486,10 @@ public class ProductNewController extends BaseController {
|
|
|
if (null != product.getSkuList()) {
|
|
|
for (CmSku s : product.getSkuList()) {
|
|
|
if (null != s.getCostCheckFlag() && s.getCostCheckFlag() == 2) {
|
|
|
+ if (s.getShopPercent()==0) {
|
|
|
+ addMessage(redirectAttributes, "保存商品失败,供应商比例必须大于0");
|
|
|
+ return "redirect:" + Global.getAdminPath() + "/product/new/productEdit?id="+product.getId();
|
|
|
+ }
|
|
|
double v = MathUtil.add(MathUtil.add(s.getShopPercent(), s.getOrganizePercent()), s.getCmPercent()).doubleValue();
|
|
|
if (v != 100) {
|
|
|
addMessage(redirectAttributes, "保存商品失败,佣金比例和必须为100");
|