新增特种纸工艺

This commit is contained in:
2026-03-20 08:51:16 +08:00
parent 03c70c9598
commit 928a247c10
3 changed files with 84 additions and 145 deletions
@@ -1444,126 +1444,7 @@ public class ProductService {
if (!craft_list.isEmpty()) { if (!craft_list.isEmpty()) {
dto.setCraft(craft_list.toArray(new String[craft_list.size()])); dto.setCraft(craft_list.toArray(new String[craft_list.size()]));
} }
if (!"素芸".equals(kind) && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
int[] counts = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000};
Map<String, int[]> prices = null;
if (craft_list.contains("单面烫金") && !craft_list.contains("异形模切")) {
prices = new HashMap<>();
prices.put("萱姿", new int[]{257, 329, 500, 863, 1278, 1692, 2106, 2520, 2934, 3348, 3762, 4177});
prices.put("岚蝶", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
prices.put("皙贝", new int[]{226, 260, 349, 560, 840, 1100, 1349, 1600, 1890, 2100, 2400, 2663});
prices.put("琮纹", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
prices.put("睿狐", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
prices.put("溪雪", new int[]{229, 263, 354, 571, 846, 1121, 1491, 1782, 2073, 2364, 2655, 2949});
prices.put("玉蕊", new int[]{229, 263, 354, 571, 846, 1121, 1377, 1645, 1913, 2181, 2449, 2720});
prices.put("金绒", new int[]{365, 375, 557, 921, 1230, 1550, 1937, 2299, 2661, 3053, 3445, 3751});
prices.put("芳怡", new int[]{455, 495, 957, 1691, 2365, 3195, 3777, 4431, 5085, 5739, 6939, 7048});
}
if (craft_list.contains("双面烫金") && !craft_list.contains("异形模切")) {
prices = new HashMap<>();
prices.put("萱姿", new int[]{463, 592, 900, 1553, 2300, 3046, 3791, 4536, 5281, 6026, 6772, 7519});
prices.put("岚蝶", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("皙贝", new int[]{407, 468, 628, 1008, 1512, 1980, 2428, 2880, 3402, 3780, 4320, 4793});
prices.put("琮纹", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("睿狐", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("溪雪", new int[]{412, 473, 637, 1028, 1523, 2018, 2684, 3208, 3731, 4255, 4779, 5308});
prices.put("玉蕊", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("金绒", new int[]{665, 675, 979, 1597, 2110, 2650, 3269, 3885, 4501, 5117, 5733, 6347});
prices.put("芳怡", new int[]{755, 755, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
}
// if (craft_list.contains("单面烫金") && craft_list.contains("圆角") && !craft_list.contains("异形模切")) {
// prices = new HashMap<>();
// prices.put("萱姿", new int[]{368, 373, 647, 1187, 1560, 2010, 2385, 2731, 3078, 3425, 3771, 4117});
// prices.put("岚蝶", new int[]{355, 360, 484, 855, 1194, 1604, 1917, 2278, 2639, 3000, 3361, 3721});
// prices.put("皙贝", new int[]{355, 360, 484, 855, 1195, 1605, 1917, 2280, 2648, 3002, 3362, 3721});
// prices.put("琮纹", new int[]{355, 360, 484, 855, 1198, 1607, 1917, 2282, 2643, 3004, 3364, 3721});
// prices.put("睿狐", new int[]{355, 360, 484, 855, 1200, 1609, 1917, 2283, 2644, 3005, 3366, 3721});
// prices.put("溪雪", new int[]{368, 373, 547, 999, 1320, 1730, 2061, 2378, 2696, 3014, 3332, 3649});
// prices.put("玉蕊", new int[]{375, 380, 660, 1189, 1655, 2225, 2845, 3373, 3901, 4429, 4957, 5484});
// prices.put("金绒", new int[]{475, 480, 760, 1289, 1755, 2225, 2845, 3373, 3901, 4429, 4957, 5484});
// prices.put("芳怡", new int[]{546, 594, 1148, 2029, 2838, 3834, 4532, 5310, 6099, 6855, 7666, 8458});
//
// }
// if (craft_list.contains("双面烫金") && craft_list.contains("圆角") && !craft_list.contains("异形模切")) {
// prices = new HashMap<>();
// prices.put("萱姿", new int[]{662, 671, 1165, 2137, 2808, 3618, 4293, 4916, 5540, 6165, 6800, 8200});
// prices.put("岚蝶", new int[]{639, 648, 871, 1539, 2149, 2887, 3451, 4100, 4750, 5400, 6050, 6698});
// prices.put("皙贝", new int[]{639, 648, 871, 1539, 2151, 2889, 3451, 4104, 4766, 5404, 6052, 6698});
// prices.put("琮纹", new int[]{639, 648, 871, 1539, 2156, 2893, 3451, 4108, 4757, 5407, 6055, 6698});
// prices.put("睿狐", new int[]{639, 648, 871, 1539, 2160, 2896, 3451, 4109, 4759, 5409, 6059, 6698});
// prices.put("溪雪", new int[]{662, 671, 985, 1798, 2376, 3114, 3710, 4280, 4853, 5425, 5998, 6568});
// prices.put("玉蕊", new int[]{675, 684, 1188, 2140, 2979, 4005, 5121, 6071, 7022, 7972, 8923, 9871});
// prices.put("金绒", new int[]{546, 594, 1148, 2029, 2838, 3834, 4532, 5310, 6099, 6855, 7666, 8458});
// prices.put("芳怡", new int[]{755, 755, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
//
// }
if (craft_list.contains("单面烫金") && !craft_list.contains("圆角") && craft_list.contains("异形模切")) {
prices = new HashMap<>();
prices.put("萱姿", new int[]{463, 592, 900, 1553, 2300, 3046, 3791, 4536, 5281, 6026, 6772, 7519});
prices.put("岚蝶", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("皙贝", new int[]{407, 468, 628, 1008, 1512, 1980, 2428, 2880, 3402, 3780, 4320, 4793});
prices.put("琮纹", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("睿狐", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("溪雪", new int[]{412, 473, 637, 1028, 1523, 2018, 2684, 3208, 3731, 4255, 4779, 5308});
prices.put("玉蕊", new int[]{412, 473, 637, 1028, 1523, 2018, 2479, 2961, 3443, 3926, 4408, 4896});
prices.put("金绒", new int[]{657, 675, 1003, 1658, 2214, 2790, 3487, 4138, 4790, 5495, 6201, 6752});
prices.put("芳怡", new int[]{755, 800, 1379, 2367, 3245, 4425, 5109, 5935, 6771, 7597, 8433, 9269});
}
if (craft_list.contains("双面烫金") && !craft_list.contains("圆角") && craft_list.contains("异形模切")) {
prices = new HashMap<>();
prices.put("萱姿", new int[]{780, 795, 1169, 1916, 2480, 3040, 3636, 4052, 4630, 5208, 5786, 6362});
prices.put("岚蝶", new int[]{750, 765, 1078, 1724, 2312, 2872, 3444, 3940, 4566, 5192, 5818, 6442});
prices.put("皙贝", new int[]{750, 765, 1078, 1724, 2315, 2875, 3444, 3942, 4568, 5194, 5820, 6442});
prices.put("琮纹", new int[]{750, 765, 1078, 1724, 2317, 2877, 3444, 3944, 4570, 5196, 5822, 6442});
prices.put("睿狐", new int[]{750, 765, 1078, 1724, 2320, 2880, 3444, 3946, 4572, 5198, 5824, 6442});
prices.put("溪雪", new int[]{780, 795, 1169, 1916, 2480, 3040, 3636, 4052, 4630, 5208, 5786, 6362});
prices.put("玉蕊", new int[]{795, 825, 1195, 1940, 2600, 3280, 4116, 4600, 5326, 6052, 6778, 7502});
prices.put("金绒", new int[]{795, 825, 1195, 1940, 2600, 3280, 4116, 4600, 5326, 6052, 6778, 7502});
prices.put("芳怡", new int[]{1245, 1245, 2274, 3904, 5353, 7300, 8428, 9792, 11172, 12534, 13914, 15292});
}
double zhekou = 1;
int min = getNum(length, width);
if (min == 1) {
zhekou = 1;
} else if (min == 2) {
zhekou = 0.83;
} else if (min == 3) {
zhekou = 0.8;
} else {
zhekou = 0.75;
}
int[] base_price = prices.get(kind);
for (int i = 0; i < counts.length; i++) {
if (counts[i] < dto.getCount()) {
continue;
}
if (priceList.size() > 3) {
break;
}
Product pro = new Product();
pro.setCount(counts[i]);
pro.setPrice((double) base_price[i]);
priceList.add(pro);
}
getCraft(dto, priceList, null, null, 0);
// 根据位数重新算价格
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * min * zhekou));
}
// 根据款数重新算价格
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number));
product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.3 * 0.86));
}
return priceList;
}
if ("雅柔".equals(kind) || "萱姿".equals(kind)) { if ("雅柔".equals(kind) || "萱姿".equals(kind)) {
kind = "珠光"; kind = "珠光";
dto.setKindValue("珠光"); dto.setKindValue("珠光");
@@ -1703,6 +1584,9 @@ public class ProductService {
if (craft_list.contains("圆角")) { if (craft_list.contains("圆角")) {
craft_price += 4 * itemCount / 100; craft_price += 4 * itemCount / 100;
} }
if (craft_list.contains("印刷颜色") && dto.getCo_number() != null && dto.getCo_number() > 0) {
craft_price += 5 * (dto.getCo_number() - 1);
}
if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) { if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
double tangPrice = 45 + 0.1 * itemCount; double tangPrice = 45 + 0.1 * itemCount;
if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) { if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) {
@@ -1826,7 +1710,6 @@ public class ProductService {
for (Product product : priceList) { for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number)); product.setPrice(Math.ceil(product.getPrice() * number));
} }
return priceList;
} else { } else {
// 产品位数 // 产品位数
double zhekou = 1; double zhekou = 1;
@@ -1901,6 +1784,22 @@ public class ProductService {
} }
} }
} }
if (!"素芸".equals(kind)) {
double tang_price = 0;
double base_tang = 0;
if (craft_list.contains("单面烫金")) {
tang_price = 80;
base_tang = 0.15;
}
if (craft_list.contains("双面烫金")) {
tang_price = 160;
base_tang = 0.15;
}
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() + (tang_price + base_tang * product.getCount()) * number));
}
}
// int tzWei = Integer.parseInt(Pattern.compile("[^0-9]").matcher(kind).replaceAll("").trim());// 获取材质中的克数 // int tzWei = Integer.parseInt(Pattern.compile("[^0-9]").matcher(kind).replaceAll("").trim());// 获取材质中的克数
int tzWei = 300;// 获取材质中的克数 int tzWei = 300;// 获取材质中的克数
for (Product product : priceList) { for (Product product : priceList) {
@@ -2688,7 +2587,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * 4)); product.setPrice(Math.floor(product.getPrice() * 4));
} }
} }
} else if ("UV转印贴".equals(dto.getKind())) { } else if ("UV转印贴".equals(dto.getKind()) || "宠物转印贴".equals(dto.getKind())) {
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;
@@ -2798,6 +2697,11 @@ public class ProductService {
product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1)); product.setPrice(product.getPrice() + 2 * Math.max(dto.getPcount(), 1));
} }
} }
if ("宠物转印贴".equals(dto.getKind())) {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 1.3));
}
}
// double base = number < 6 && number > 1 ? 5 : 0; // double base = number < 6 && number > 1 ? 5 : 0;
double apprise = 0; double apprise = 0;
for (Product product : priceList) { for (Product product : priceList) {
@@ -5853,18 +5757,16 @@ public class ProductService {
double max_width = 290; double max_width = 290;
double max_length = 390; double max_length = 390;
double base_price = 21; double base_price = 21;
double min_price = 50; double min_price = 35;
if ("2".equals(dto.getKind())) { if ("2".equals(dto.getKind())) {
max_width = 420; max_width = 420;
max_length = 310; max_length = 310;
base_price = 35; base_price = 35;
min_price = 60;
} }
if ("3".equals(dto.getKind())) { if ("3".equals(dto.getKind())) {
max_width = 420; max_width = 420;
max_length = 310; max_length = 310;
base_price = 40; base_price = 40;
min_price = 60;
} }
width = width * 10 + 4; width = width * 10 + 4;
length = length * 10 + 4; length = length * 10 + 4;
+20 -1
View File
@@ -30,6 +30,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<input type="radio" lay-filter="kind" name="kind" value="金属标" title="金属标"> <input type="radio" lay-filter="kind" name="kind" value="金属标" title="金属标">
<input type="radio" lay-filter="kind" name="kind" value="UV转印贴" title="UV转印贴"> <input type="radio" lay-filter="kind" name="kind" value="UV转印贴" title="UV转印贴">
<input type="radio" lay-filter="kind" name="kind" value="宠物转印贴" title="宠物uv转印贴">
</div> </div>
<div class="metal"> <div class="metal">
<p> <p>
@@ -192,10 +193,13 @@
class="craftZhuan"> class="craftZhuan">
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="双面贴" title="双面贴" <input type="checkbox" name="craft" lay-filter="craftZhuan" value="双面贴" title="双面贴"
class="craftZhuan"> class="craftZhuan">
<span class="zhuanuv">
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫画" title="烫画" <input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫画" title="烫画"
class="craftZhuan"> class="craftZhuan">
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="冷转印" title="冷转印" <input type="checkbox" name="craft" lay-filter="craftZhuan" value="冷转印" title="冷转印"
class="craftZhuan"> class="craftZhuan">
</span>
<span id="sehu_number" style="display:none"> <span id="sehu_number" style="display:none">
<span>色数:</span> <span>色数:</span>
<div class="layui-inline" style="width:60px;"> <div class="layui-inline" style="width:60px;">
@@ -354,6 +358,21 @@
if ($("#number").val() > 1) { if ($("#number").val() > 1) {
// $("#ui_des").show(); // $("#ui_des").show();
} }
$(".zhuanuv").hide();
$(".zhuanuv").find(":input").attr("disabled", true);
let craftChecked = $(`input[name='craft'][value='烫画']`).is(":checked");
if (craftChecked) {
$(`input[name='craft'][value='烫画']+div`).click();
}
craftChecked = $(`input[name='craft'][value='冷转印']`).is(":checked");
if (craftChecked) {
$(`input[name='craft'][value='冷转印']+div`).click();
}
if (kindData.value == "UV转印贴") {
$(".zhuanuv").show();
$(".zhuanuv").find(":input").attr("disabled", false);
}
} }
form.render();//必须写 form.render();//必须写
}) })
@@ -407,7 +426,7 @@
if (craftZhuan > most) { if (craftZhuan > most) {
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false); $(data.elem).prop("checked", false);
layer.msg('其他工艺不能同时选择!', {offset: ['300px', '300px']}, {icon: 5}); layer.msg('烫金-其他工艺不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false; return false;
} }
if (craft_list.indexOf("烫金") > -1) { if (craft_list.indexOf("烫金") > -1) {
+19 -1
View File
@@ -182,7 +182,7 @@
<input type="checkbox" name="craft" lay-filter="switch" value="压痕" title="压痕"> <input type="checkbox" name="craft" lay-filter="switch" value="压痕" title="压痕">
</div> </div>
<div id="mianka" style="display: none"> <div id="mianka" style="display: none">
<div id="ccolor_type" class="layui-inline" style="width: 180px;display: flex;align-items: center"> <div id="ccolor_type" class="layui-inline" style="display: flex;align-items: center">
<div style="flex-shrink: 0">纸张颜色:</div> <div style="flex-shrink: 0">纸张颜色:</div>
<select name="craft" class="select"> <select name="craft" class="select">
<option value="黑色" selected>黑色</option> <option value="黑色" selected>黑色</option>
@@ -192,6 +192,10 @@
<option value="浅棕色">浅棕色</option> <option value="浅棕色">浅棕色</option>
<option value="白色">白色</option> <option value="白色">白色</option>
</select> </select>
<span class="printColor" style="display: none;align-items: center;">
<input type="checkbox" name="craft" lay-filter="mianka" value="印刷颜色" title="印刷颜色" checked>
<input type="text" name="co_number" class="layui-input" value="1">
</span>
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
裁切方式: 裁切方式:
@@ -526,8 +530,12 @@
$("input[name='craft'][value='压凹']").prop("checked", false); $("input[name='craft'][value='压凹']").prop("checked", false);
$("#color_type").hide(); $("#color_type").hide();
$("#color_type").find("select").attr("disabled", true); $("#color_type").find("select").attr("disabled", true);
$(".printColor").hide()
$(".printColor").find("input").attr("disabled", true);
if (data.value == "300克") { if (data.value == "300克") {
colorHtml = `<option value="白色">白色</option>`; colorHtml = `<option value="白色">白色</option>`;
$(".printColor").css("display", "flex")
$(".printColor").find("input").attr("disabled", false);
} }
$("#ccolor_type select[name='craft']").empty(); $("#ccolor_type select[name='craft']").empty();
@@ -599,6 +607,13 @@
return false; return false;
} }
} }
if (craft_list.indexOf("印刷颜色") == -1 && kindValueSelect == "素芸") {
$(data.elem).prop("checked", true);
layer.msg("印刷颜色无法取消", {offset: ['300px', '300px']}, function () {
});
form.render();
return false;
}
// if (kindValue == "300克" && craft_list.indexOf("压凹") > -1) { // if (kindValue == "300克" && craft_list.indexOf("压凹") > -1) {
// $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); // $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
// $(data.elem).prop("checked", false); // $(data.elem).prop("checked", false);
@@ -637,6 +652,7 @@
$("#leishe_type").hide(); $("#leishe_type").hide();
$("#leishe_type").find("select").attr("disabled", true); $("#leishe_type").find("select").attr("disabled", true);
} }
form.render(); form.render();
}) })
// 监听工艺 // 监听工艺
@@ -854,6 +870,8 @@
arrs.push($(this).val() + "印刷"); arrs.push($(this).val() + "印刷");
} else if ($(this).val() == "压凹" || $(this).val() == "击凸") { } else if ($(this).val() == "压凹" || $(this).val() == "击凸") {
arrs.push($("#color_type select option:selected").val() + $(this).val()); arrs.push($("#color_type select option:selected").val() + $(this).val());
} else if ($(this).val() == "印刷颜色") {
arrs.push($(this).val() + $(".printColor input[name='co_number']").val());
} else { } else {
arrs.push($(this).val()); arrs.push($(this).val());
} }