1
0

少数量卡片加工艺

Este cometimento está contido em:
2025-06-09 16:56:16 +08:00
ascendente 2aa81bb41a
cometimento 42b699f29b
5 ficheiros modificados com 104 adições e 13 eliminações
+27 -3
Ver ficheiro
@@ -15,6 +15,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.*; import java.util.*;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -2379,8 +2380,8 @@ public class ProductService {
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) { if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
double paperLength = 0, paperWidth = 0; double paperLength = 0, paperWidth = 0;
length += 0.6; length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
width += 0.6; width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
if (craft_list.contains("冷转印")) { if (craft_list.contains("冷转印")) {
paperLength = 20; paperLength = 20;
paperWidth = 27; paperWidth = 27;
@@ -2390,7 +2391,7 @@ public class ProductService {
paperWidth = 57; paperWidth = 57;
} }
//一张大纸能放几个 //一张大纸能放几个
double num = Math.max(Math.ceil(paperLength / length) * Math.ceil(paperWidth / width), Math.ceil(paperLength / width) * Math.ceil(paperWidth / length)); double num = Math.min(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length));
double baseCount = Math.max(Math.ceil(dto.getCount() * dto.getNumber() / num), 1); double baseCount = Math.max(Math.ceil(dto.getCount() * dto.getNumber() / num), 1);
@@ -2777,6 +2778,29 @@ public class ProductService {
} }
} }
} }
if (dto.getCraft() != null && ("异形卡片".equals(dto.getKind()) || "直角卡片".equals(dto.getKind()) || "贺卡".equals(dto.getKind()) || "特种纸名片".equals(dto.getKind()))) {
double peijianPrice = 0;
if (Arrays.binarySearch(dto.getCraft(), "配葫芦针") > -1) {
peijianPrice = 0.03;
}
if (Arrays.binarySearch(dto.getCraft(), "配棉绳") > -1) {
peijianPrice = 0.05;
}
if (Arrays.binarySearch(dto.getCraft(), "配尼龙绳") > -1) {
peijianPrice = 0.01;
if ("红色绳子".equals(dto.getShen_color())) {
peijianPrice = 0.02;
}
}
if (Arrays.binarySearch(dto.getCraft(), "配弹力绳") > -1) {
peijianPrice = 0.05;
}
for (Product product : priceList) {
if (peijianPrice > 0) {
product.setPrice(Math.ceil(product.getPrice() + peijianPrice * dto.getCount() * dto.getNumber() + 5));
}
}
}
if (!role.contains("1045") && !role.contains("1054") && !role.contains("1029")) { if (!role.contains("1045") && !role.contains("1054") && !role.contains("1029")) {
if (number > 1) { if (number > 1) {
double designFee = 0; double designFee = 0;
+2 -2
Ver ficheiro
@@ -3449,9 +3449,9 @@ public class PriceUtils {
if (count <= 5) { if (count <= 5) {
price = 260; price = 260;
} else if (count < 100) { } else if (count < 100) {
price = 12 * count + 200; price = 14 * count + 200;
} else { } else {
price = 14 * count; price = 12 * count;
} }
price = price + (coNumber - 1) * 100; price = price + (coNumber - 1) * 100;
} }
+71 -4
Ver ficheiro
@@ -43,6 +43,9 @@
right: 40px; right: 40px;
} }
#lesspeijian .layui-form-select .layui-edge {
right: 40px;
}
</style> </style>
<body> <body>
<div class="big_box"> <div class="big_box">
@@ -733,6 +736,34 @@
</div> </div>
</form> </form>
</div> </div>
<div id="lesspeijian" style="display:none">
<form class="layui-form">
<div class="layui-input-block">
配件:
<input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配葫芦针"
title="配葫芦针">
<input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配棉绳"
title="配棉绳">
<input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配尼龙绳"
title="配尼龙绳">
<div class="layui-inline shengz scolor" style="width: 110px;display: none">
<select class="select" name="shen_color">
<option value="白色绳子">白色绳子</option>
<option value="黑色绳子">黑色绳子</option>
<option value="红色绳子">红色绳子</option>
</select>
</div>
<input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配弹力绳"
title="配弹力绳(15cm">
<div class="layui-inline shengz tscolor" style="width: 110px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
<option value="银色绳子">银色绳子</option>
</select>
</div>
</div>
</form>
</div>
<hr> <hr>
</div> </div>
<form class="layui-form"> <form class="layui-form">
@@ -1039,11 +1070,11 @@
if (data.value == "配尼龙绳" || data.value == "穿尼龙绳") { if (data.value == "配尼龙绳" || data.value == "穿尼龙绳") {
if ($(data.elem).is(":checked")) { if ($(data.elem).is(":checked")) {
$("#peijian_ui .shengz").show(); $("#peijian_ui .scolor").show();
$("#peijian_ui .shengz").prop("disabled", false); $("#peijian_ui .scolor").prop("disabled", false);
} else { } else {
$("#peijian_ui .shengz").hide(); $("#peijian_ui .scolor").hide();
$("#peijian_ui .shengz").prop("disabled", true); $("#peijian_ui .scolor").prop("disabled", true);
} }
} }
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") { if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
@@ -1055,7 +1086,34 @@
$("#peijian_ui .tscolor").prop("disabled", true); $("#peijian_ui .tscolor").prop("disabled", true);
} }
} }
});
form.on("checkbox(lessz4PeiJian)", function (data) {
let peijiansize = $(".lesspeijian:checked").length;
if (peijiansize > 1) {
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg('配件只能选择一种!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (data.value == "配尼龙绳") {
if ($(data.elem).is(":checked")) {
$("#lesspeijian .scolor").show();
$("#lesspeijian .scolor").prop("disabled", false);
} else {
$("#lesspeijian .scolor").hide();
$("#lesspeijian .scolor").prop("disabled", true);
}
}
if (data.value == "配弹力绳") {
if ($(data.elem).is(":checked")) {
$("#lesspeijian .tscolor").show();
$("#lesspeijian .tscolor").prop("disabled", false);
} else {
$("#lesspeijian .tscolor").hide();
$("#lesspeijian .tscolor").prop("disabled", true);
}
}
}); });
form.on("radio(kindValue2)", function (data) { form.on("radio(kindValue2)", function (data) {
$("#peijian_ui .tscolor").hide(); $("#peijian_ui .tscolor").hide();
@@ -1235,6 +1293,15 @@
$("#craftForm").find(":input").attr("disabled", false); $("#craftForm").find(":input").attr("disabled", false);
$("#z4_craft").hide(); $("#z4_craft").hide();
$("#z4_craft").find(":input").attr("disabled", true); $("#z4_craft").find(":input").attr("disabled", true);
$(".lesspeijian").prop("checked", false);
$("#lesspeijian").hide();
$("#lesspeijian").find(":input").attr("disabled", true);
if (data.value == '直角卡片' || data.value == '异形卡片' || data.value == '贺卡' || data.value == '特种纸名片') {
if (data.elem.checked) {
$("#lesspeijian").show();
$("#lesspeijian").find(":input").attr("disabled", false);
}
}
if (data.value == 8) { if (data.value == 8) {
+3 -3
Ver ficheiro
@@ -74,7 +74,7 @@
<div class="layui-form-item npzd count"> <div class="layui-form-item npzd count">
<select name="count" class="select countCG" id="npzd_count"> <select name="count" class="select countCG" id="npzd_count">
<option value=""></option> <option value=""></option>
<option value="100">100</option> <%-- <option value="100">100</option>--%>
<option value="500">500</option> <option value="500">500</option>
<option value="1000">1000</option> <option value="1000">1000</option>
<option value="2000">2000</option> <option value="2000">2000</option>
@@ -353,8 +353,8 @@
let kindValue = $(".npzd select[name='kindValue']").val(); let kindValue = $(".npzd select[name='kindValue']").val();
let count_html = `<option value=""></option>`; let count_html = `<option value=""></option>`;
if (spec <= 10 && kindValue == 0) { if (spec <= 10 && kindValue == 0) {
count_html += // count_html +=
`<option value="100">100</option>`; // `<option value="100">100</option>`;
} }
count_html += ` count_html += `
<option value="500">500</option> <option value="500">500</option>
+1 -1
Ver ficheiro
@@ -391,7 +391,7 @@
return false; return false;
} }
} else { } else {
if (craftShua != "" && craftShua != "烫画" && (size.split("*")[0] > 500 || size.split("*")[1] > 58) && (size.split("*")[0] > 58 || size.split("*")[1] > 500)) { if ((size.split("*")[0] > 500 || size.split("*")[1] > 58) && (size.split("*")[0] > 58 || size.split("*")[1] > 500)) {
layer.msg("【UV转印贴】尺寸不能超过500*58 cm", {offset: ['300px', '300px']}, function () { layer.msg("【UV转印贴】尺寸不能超过500*58 cm", {offset: ['300px', '300px']}, function () {
}); });
return false; return false;