修改香薰卡价格

此提交包含在:
2025-12-13 16:36:35 +08:00
父節點 cb734e7d8f
當前提交 1c7a3def12
共有 2 個檔案被更改,包括 15 行新增8 行删除
+7 -6
查看文件
@@ -1663,12 +1663,12 @@ public class ProductService {
if ("1".equals(dto.getKindValue())) { if ("1".equals(dto.getKindValue())) {
// 给产品加上重量 扣除出血的4毫米 // 给产品加上重量 扣除出血的4毫米
for (Product product : priceList) { for (Product product : priceList) {
product.setWeight(df.format(number * (length - 4) / 100 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86)); product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86));
} }
} else { } else {
// 给产品加上重量 // 给产品加上重量
for (Product product : priceList) { for (Product product : priceList) {
product.setWeight(df.format(number * (length - 4) / 100 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86)); product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86));
} }
} }
@@ -5277,13 +5277,14 @@ public class ProductService {
max = Math.max(max, 1); max = Math.max(max, 1);
// 报的数量需要多少张大纸 // 报的数量需要多少张大纸
// 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个
double num = Math.ceil(dto.getCount() * dto.getNumber() / max); double num = Math.ceil(dto.getCount() / max);
double craft_price = 0; double craft_price = 0;
double bao_price = 0;
if (carftList.contains("单独包装")) { if (carftList.contains("单独包装")) {
craft_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber()); bao_price += Math.ceil(0.2 * dto.getCount() * dto.getNumber());
} }
if (carftList.contains("真空包装")) { if (carftList.contains("真空包装")) {
craft_price += Math.ceil(0.35 * dto.getCount() * dto.getNumber()); bao_price += Math.ceil(0.35 * dto.getCount() * dto.getNumber());
} }
if (carftList.contains("配涤纶丝带")) { if (carftList.contains("配涤纶丝带")) {
craft_price += Math.ceil(0.1 * dto.getCount() * dto.getNumber()); craft_price += Math.ceil(0.1 * dto.getCount() * dto.getNumber());
@@ -5311,7 +5312,7 @@ public class ProductService {
cardDesignFee = 20.5; cardDesignFee = 20.5;
} }
Product pro = new Product(); Product pro = new Product();
pro.setPrice(Math.ceil(Math.max(base_price * num + designFee + cardDesignFee, min_price) + craft_price)); pro.setPrice(Math.ceil(Math.max((base_price * num + cardDesignFee) * number, min_price) + designFee + bao_price + (craft_price == 0 ? craft_price : Math.max(craft_price, 5))));
pro.setCount(dto.getCount()); pro.setCount(dto.getCount());
pro.setNumber(dto.getNumber()); pro.setNumber(dto.getNumber());
pro.setWeight(df.format(dto.getNumber() * (length - 4) / 1000 * (width - 4) / 1000 * dto.getCount() * 0.2 * 0.86)); pro.setWeight(df.format(dto.getNumber() * (length - 4) / 1000 * (width - 4) / 1000 * dto.getCount() * 0.2 * 0.86));
+7 -1
查看文件
@@ -994,6 +994,7 @@
remark_html = remark; remark_html = remark;
$("#remark").append(remark); $("#remark").append(remark);
} }
$("#test1 .layui-carousel-ind").empty();
// 如果没有轮播图就隐藏 // 如果没有轮播图就隐藏
if (result.length == 0) { if (result.length == 0) {
document.getElementById("test1").style.display = "none"; //隐藏 document.getElementById("test1").style.display = "none"; //隐藏
@@ -1002,7 +1003,8 @@
ins.reload({ ins.reload({
elem: '#test1', elem: '#test1',
width: result[0].imgWidth, //设置容器宽度 width: result[0].imgWidth, //设置容器宽度
height: result[0].imgHeight height: result[0].imgHeight,
indicator: 'outside',
}); });
} }
} }
@@ -1249,9 +1251,11 @@
if ($(data.elem).is(":checked")) { if ($(data.elem).is(":checked")) {
$("#peijian_ui .tscolor").show(); $("#peijian_ui .tscolor").show();
$("#peijian_ui .tscolor select").prop("disabled", false); $("#peijian_ui .tscolor select").prop("disabled", false);
getProductImage('弹力绳');
} else { } else {
$("#peijian_ui .tscolor").hide(); $("#peijian_ui .tscolor").hide();
$("#peijian_ui .tscolor select").prop("disabled", true); $("#peijian_ui .tscolor select").prop("disabled", true);
getProductImage('');
} }
} }
if (data.value == "opp袋") { if (data.value == "opp袋") {
@@ -2005,6 +2009,7 @@
remark_html = remark; remark_html = remark;
$("#remark").append(remark); $("#remark").append(remark);
} }
$("#test1 .layui-carousel-ind").empty();
// 如果没有轮播图就隐藏 // 如果没有轮播图就隐藏
if (result.length == 0) { if (result.length == 0) {
document.getElementById("test1").style.display = "none"; //隐藏 document.getElementById("test1").style.display = "none"; //隐藏
@@ -2400,6 +2405,7 @@
remark_html = remark; remark_html = remark;
$("#remark").append(remark); $("#remark").append(remark);
} }
$("#test1 .layui-carousel-ind").empty();
// 如果没有轮播图就隐藏 // 如果没有轮播图就隐藏
if (result.length == 0) { if (result.length == 0) {
document.getElementById("test1").style.display = "none"; //隐藏 document.getElementById("test1").style.display = "none"; //隐藏