少数量卡片加工艺

这个提交包含在:
2025-06-09 16:56:16 +08:00
父节点 2aa81bb41a
当前提交 42b699f29b
修改 5 个文件,包含 104 行新增13 行删除
@@ -15,6 +15,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
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("烫画"))) {
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;
length += 0.6;
width += 0.6;
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
if (craft_list.contains("冷转印")) {
paperLength = 20;
paperWidth = 27;
@@ -2390,7 +2391,7 @@ public class ProductService {
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);
@@ -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 (number > 1) {
double designFee = 0;
@@ -3449,9 +3449,9 @@ public class PriceUtils {
if (count <= 5) {
price = 260;
} else if (count < 100) {
price = 12 * count + 200;
price = 14 * count + 200;
} else {
price = 14 * count;
price = 12 * count;
}
price = price + (coNumber - 1) * 100;
}
+71 -4
查看文件
@@ -43,6 +43,9 @@
right: 40px;
}
#lesspeijian .layui-form-select .layui-edge {
right: 40px;
}
</style>
<body>
<div class="big_box">
@@ -733,6 +736,34 @@
</div>
</form>
</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>
</div>
<form class="layui-form">
@@ -1039,11 +1070,11 @@
if (data.value == "配尼龙绳" || data.value == "穿尼龙绳") {
if ($(data.elem).is(":checked")) {
$("#peijian_ui .shengz").show();
$("#peijian_ui .shengz").prop("disabled", false);
$("#peijian_ui .scolor").show();
$("#peijian_ui .scolor").prop("disabled", false);
} else {
$("#peijian_ui .shengz").hide();
$("#peijian_ui .shengz").prop("disabled", true);
$("#peijian_ui .scolor").hide();
$("#peijian_ui .scolor").prop("disabled", true);
}
}
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
@@ -1055,7 +1086,34 @@
$("#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) {
$("#peijian_ui .tscolor").hide();
@@ -1235,6 +1293,15 @@
$("#craftForm").find(":input").attr("disabled", false);
$("#z4_craft").hide();
$("#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) {
+3 -3
查看文件
@@ -74,7 +74,7 @@
<div class="layui-form-item npzd count">
<select name="count" class="select countCG" id="npzd_count">
<option value=""></option>
<option value="100">100</option>
<%-- <option value="100">100</option>--%>
<option value="500">500</option>
<option value="1000">1000</option>
<option value="2000">2000</option>
@@ -353,8 +353,8 @@
let kindValue = $(".npzd select[name='kindValue']").val();
let count_html = `<option value=""></option>`;
if (spec <= 10 && kindValue == 0) {
count_html +=
`<option value="100">100</option>`;
// count_html +=
// `<option value="100">100</option>`;
}
count_html += `
<option value="500">500</option>
+1 -1
查看文件
@@ -391,7 +391,7 @@
return false;
}
} 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 () {
});
return false;