diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java index ef98959..2d5620b 100644 --- a/src/main/java/lingtao/net/util/PriceUtils.java +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -3542,11 +3542,14 @@ public class PriceUtils { } } if (startIndex == endIndex && startIndex == 0) { - price = price_list[endIndex]; + price = price_list[endIndex] * area; } else if (startIndex == endIndex) { price = (price_list[endIndex] * areas[endIndex] / areas[endIndex]) * area; } else { - price = (price_list[startIndex] * areas[startIndex] + price_list[endIndex] * areas[endIndex]) / (areas[startIndex] + areas[endIndex]) * area; + double end_price = price_list[endIndex]*areas[endIndex]; + double start_price = price_list[startIndex]*areas[startIndex]; + price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * start_price + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * end_price; + } price = islast ? last_price * area : price; return Math.ceil(price); diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 86b113a..6c16618 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -532,8 +532,7 @@ 工艺

- - + diff --git a/src/main/webapp/views/product/waterGauge.jsp b/src/main/webapp/views/product/waterGauge.jsp index e961654..f6a086d 100644 --- a/src/main/webapp/views/product/waterGauge.jsp +++ b/src/main/webapp/views/product/waterGauge.jsp @@ -74,8 +74,8 @@
裁切工艺: - - + +

@@ -206,16 +206,16 @@ }); return false; } - /*if ((size.split("*")[0] < 5 || size.split("*")[1] < 4.5) && (size.split("*")[0] < 4.5 || size.split("*")[1] < 5)) { - layer.msg("【PET透卡】尺寸不能小于5*4.5 cm", {offset: ['300px', '300px']}, function () { + if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) { + layer.msg("【水标】尺寸不能小于4*4 cm", {offset: ['300px', '300px']}, function () { }); return false; } - if ((size.split("*")[0] > 58.7 || size.split("*")[1] > 42.4) && (size.split("*")[0] > 42.4 || size.split("*")[1] > 58.7)) { - layer.msg("【PET透卡】尺寸不能大于58.7*42.4 cm", {offset: ['300px', '300px']}, function () { + if ((size.split("*")[0] > 30 || size.split("*")[1] > 30)) { + layer.msg("【水标】尺寸不能大于30*30 cm", {offset: ['300px', '300px']}, function () { }); return false; - }*/ + } $("input:checkbox[name='craft']:checked").each(function (i) { // 没有被禁用的工艺加到arr中 if (!$(this).is(':disabled')) {