浏览代码

修改uv重量

zhuyiyi 2 天之前
父节点
当前提交
c6a6c2c682

+ 4 - 5
src/main/java/lingtao/net/service/ProductService.java

@@ -2637,7 +2637,7 @@ public class ProductService {
 
                             product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
 
-                            product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5));
+                            product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5 + 0.5));
                             if (product.getPrice() < apprise) {
                                 product.setPrice(apprise);
                             }
@@ -2708,7 +2708,7 @@ public class ProductService {
 //                    double base = number < 6 && number > 1 ? 5 : 0;
                     double apprise = 0;
                     for (Product product : priceList) {
-                        product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5));
+                        product.setWeight(df.format((width + 0.6) * (length + 0.6) * product.getCount() * number / 10000 * 0.5 + 0.5));
                         if (apprise > product.getPrice()) {
                             product.setPrice(apprise);
                         }
@@ -5821,7 +5821,7 @@ public class ProductService {
             }
             Product pro = new Product();
             pro.setCount(itemCount);
-            pro.setPrice(Math.ceil(prices[sizeIndex][i] * number));
+            pro.setPrice(Math.ceil(prices[sizeIndex][i] * number * 1.2));
             pro.setNumber(number);
             priceList.add(pro);
         }
@@ -7173,8 +7173,7 @@ public class ProductService {
         return priceList;
     }
 
-    private List<Product> getAreaCenterPrice(int[] count_list, int count, double area, int[][] prices,
-                                             double[] areas, int number) {
+    private List<Product> getAreaCenterPrice(int[] count_list, int count, double area, int[][] prices, double[] areas, int number) {
         List<Product> priceList = new ArrayList<>();
         for (int i = 0; i < count_list.length; i++) {
             int count_item = count_list[i];

+ 3 - 2
src/main/webapp/views/product/wrappingPaper.jsp

@@ -76,15 +76,16 @@
                     <input type="checkbox" name="craft" lay-filter="ui_craft" value="哑膜" title="哑膜">
                     <input type="checkbox" name="craft" lay-filter="ui_craft" value="亮膜" title="亮膜">
                 </div>
+                <span style="font-size: 14px; color: red">双面胶宽度10mm,长度9米、丝带宽度15毫米,长度22米,颜色随机!</span>
                 <div class="layui-input-block">
                     配件:
                     <input type="checkbox" name="craft" lay-filter="ui_craft" value="双面胶" title="双面胶">
                     <div class="layui-inline shuang" style="width: 100px;display: none">
-                        <input class="layui-input" name="maxian"/>
+                        <input class="layui-input" name="maxian" placeholder="卷数" />
                     </div>
                     <input type="checkbox" name="craft" lay-filter="ui_craft" value="丝带" title="丝带">
                     <div class="layui-inline sidai" style="width: 100px;display: none">
-                        <input class="layui-input" name="pcount"/>
+                        <input class="layui-input" name="pcount" placeholder="卷数" />
                     </div>
                 </div>
             </div>