新增素云材质

This commit is contained in:
2026-03-05 10:31:41 +08:00
parent b66c025cf8
commit 6352b8eab0
2 changed files with 194 additions and 82 deletions
@@ -1601,79 +1601,135 @@ public class ProductService {
} else if ("素芸".equals(kind)) { } else if ("素芸".equals(kind)) {
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000}; int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
double[] prices = {}; double[] prices = {};
prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800}; if ("500克".equals(dto.getKind())) {
if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) { prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
if (craft_list.contains("圆角")) {
prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
}
if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
}
if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
}
if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
priceList = new ArrayList<>(); if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
Product dto2 = null; prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
for (int i = 0; i < count_list.length; i++) {
double rate = 1.0;
if (count_list[i] < count) {
continue;
} }
if (priceList.size() > 2) { if (craft_list.contains("圆角")) {
break; prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
} }
if (count_list[i] >= 400) { if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
rate = 0.8; prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
} }
if (craft_list.contains("双面烫金")) { if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
rate = rate * 1.8; prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
} }
if (craft_list.contains("双面烫镭射银")) { if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
rate = rate * 1.8; prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
}
if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
} }
dto2 = new Product(); priceList = new ArrayList<>();
dto2.setCount(count_list[i]); Product dto2 = null;
dto2.setPrice(Math.ceil(prices[i] * rate));
priceList.add(dto2); for (int i = 0; i < count_list.length; i++) {
} double rate = 1.0;
if (craft_list.contains("打码")) { if (count_list[i] < count) {
double danjia = 0.0; continue;
if (dto.getMaxian() == 1) { }
danjia = 0.8; if (priceList.size() > 2) {
} break;
if (dto.getMaxian() == 2) { }
danjia = 1.6; if (count_list[i] >= 400) {
} rate = 0.8;
if (dto.getMaxian() == 3) { }
danjia = 2.4; if (craft_list.contains("双面烫金")) {
rate = rate * 1.8;
}
if (craft_list.contains("双面烫镭射银")) {
rate = rate * 1.8;
}
dto2 = new Product();
dto2.setCount(count_list[i]);
dto2.setPrice(Math.ceil(prices[i] * rate));
priceList.add(dto2);
} }
int min = getNum(length, width);
for (Product product : priceList) { for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() + product.getCount() * danjia)); double mqPrice = 0;
if (craft_list.contains("异形模切") && !(craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银")))) {
mqPrice = Math.ceil(15 * 0.01 * product.getCount() + 50);
}
product.setPrice(Math.floor(product.getPrice() * number * min + mqPrice));
product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5));
} }
} }
int min = getNum(length, width); if ("300克".equals(dto.getKind())) {
for (Product product : priceList) {
double mqPrice = 0; prices = new double[]{70, 140, 280, 350, 700, 1400, 2100, 3500, 7000};
if ((width <= 9 && length <= 5.4) || (length <= 9 && width <= 5.4)) {
} else if (width < 10 && length < 10) {
prices = new double[]{128, 256, 512, 640, 1280, 2560, 3840, 6400, 12800};
} else {
prices = new double[]{185, 370, 740, 925, 1850, 3700, 5550, 9250, 18500};
if (craft_list.contains("异形模切") && !(craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银")))) {
mqPrice = Math.ceil(15 * 0.01 * product.getCount() + 50);
} }
product.setPrice(Math.floor(product.getPrice() * number * min + mqPrice));
product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5)); priceList = new ArrayList<>();
Product dto2 = null;
for (int i = 0; i < count_list.length; i++) {
int itemCount = count_list[i];
if (count_list[i] < count) {
continue;
}
if (priceList.size() > 2) {
break;
}
double craft_price = 0;
if (craft_list.contains("圆角")) {
craft_price += 4 * itemCount;
}
if ((craft_list.contains("单面烫金") || craft_list.contains("双面烫金") || craft_list.contains("烫镭射银"))) {
double tangPrice = 45 + 0.1 * itemCount;
if (craft_list.contains("双面烫金") || craft_list.contains("双面烫镭射银")) {
tangPrice = 45 * 2;
}
craft_price += tangPrice;
}
if (craft_list.contains("异形模切")) {
craft_price += 60 + 0.1 * itemCount;
}
if (craft_list.contains("击凸") || craft_list.contains("压凹")) {
craft_price += 52 + 0.1 * itemCount;
}
if (craft_list.contains("打码")) {
double danjia = 0.0;
if (dto.getMaxian() == 1) {
danjia = 0.8;
}
if (dto.getMaxian() == 2) {
danjia = 1.6;
}
if (dto.getMaxian() == 3) {
danjia = 2.4;
}
craft_price += danjia * itemCount;
}
dto2 = new Product();
dto2.setCount(count_list[i]);
dto2.setPrice(Math.ceil(prices[i] + craft_price));
priceList.add(dto2);
}
} }
return priceList; return priceList;
} else if ("草香".equals(kind) || "芳怡".equals(kind)) { } else if ("草香".equals(kind) || "芳怡".equals(kind)) {
int[] count_list = {200, 500, 1000, 2000, 5000, 10000}; int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
@@ -3841,7 +3897,7 @@ public class ProductService {
} }
// 根据款数重新算价格 // 根据款数重新算价格
for (Product product : priceList) { for (Product product : priceList) {
product.setWeight(df.format(0.38 * 0.0855 * 1.3 * 0.054 * product.getCount() * number)); product.setWeight(df.format(0.38 * 0.0855 * 1.7 * 0.054 * product.getCount() * number));
product.setPrice(Math.floor(product.getPrice() * number)); product.setPrice(Math.floor(product.getPrice() * number));
} }
return priceList; return priceList;
@@ -3862,7 +3918,7 @@ public class ProductService {
} else { } else {
wei = 0.84; wei = 0.84;
} }
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.3 * number)); product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number));
} }
return priceList; return priceList;
// 0.38PVC亮光异型卡片 // 0.38PVC亮光异型卡片
@@ -3895,7 +3951,7 @@ public class ProductService {
} }
product.setPrice(Math.floor(product.getPrice() * base * number)); product.setPrice(Math.floor(product.getPrice() * base * number));
product.setWeight(df.format(wei * length * width * 1.3 * product.getCount() / 10000 * number)); product.setWeight(df.format(wei * length * width * 1.7 * product.getCount() / 10000 * number));
} }
if (priceList.size() >= 4) { if (priceList.size() >= 4) {
priceList = priceList.subList(0, 4); priceList = priceList.subList(0, 4);
@@ -5583,22 +5639,27 @@ public class ProductService {
if (carft_list.contains("UV印刷")) { if (carft_list.contains("UV印刷")) {
int pre_count = 0; int pre_count = 0;
double miniprice = 400; double miniprice = 400;
double mo_price = 250; double mo_price = 300;
double base_price = 4.5; double base_price = 3.5;
if (width <= 4 && length <= 4) { if (width <= 3 && length <= 3) {
base_price = 4;
} } else if (width <= 4 && length <= 4) {
if (width > 6 || length > 6) {
base_price = 5.5;
mo_price = 300; mo_price = 300;
base_price = 4;
} else if (width <= 5 && length <= 5) {
mo_price = 320;
base_price = 5;
} else if (width <= 6 && length <= 6) {
mo_price = 340;
base_price = 6;
} else if (width <= 7 && length <= 7) {
mo_price = 380;
base_price = 6.5;
} else if (width <= 8 && length <= 8) {
mo_price = 420;
base_price = 7;
} }
if (base_price < 4.5) {
if (count > 100 && count <= 500) {
base_price = 3.5;
} else if (count > 500) {
base_price = 3;
}
}
Product pro = new Product(); Product pro = new Product();
pro.setCount(count); pro.setCount(count);
pro.setWeight(df.format(0.005 * count * dto.getNumber())); pro.setWeight(df.format(0.005 * count * dto.getNumber()));
+59 -8
View File
@@ -59,6 +59,13 @@
<option value="素芸">素芸</option> <option value="素芸">素芸</option>
</select> </select>
</div> </div>
<div class="suyun" style="display: none">
<p>材质</p>
<div class="layui-form-item">
<input type="radio" name="kind" lay-filter="kindSelect" title="500克" value="500克" checked/>
<input type="radio" name="kind" lay-filter="kindSelect" title="300克" value="300克"/>
</div>
</div>
<p> <p>
尺寸(CM/厘米) <span style="font-size: 14px; color: red">输入格式: 长 * 宽</span> 尺寸(CM/厘米) <span style="font-size: 14px; color: red">输入格式: 长 * 宽</span>
</p> </p>
@@ -369,6 +376,8 @@
$("#mianka input").attr("disabled", true); $("#mianka input").attr("disabled", true);
$("#craft_layout").show() $("#craft_layout").show()
$("#craft_layout input").attr("disabled", false); $("#craft_layout input").attr("disabled", false);
$(".suyun").hide();
$(".suyun").find(":input").attr("disabled", true);
if (data.value.length <= 4) { if (data.value.length <= 4) {
$("#noCraft").show(); $("#noCraft").show();
$("#hasCraft").hide(); $("#hasCraft").hide();
@@ -495,6 +504,8 @@
$("#hasCraft").find(":input").attr("disabled", true); $("#hasCraft").find(":input").attr("disabled", true);
$("#ui_ls_count").hide() $("#ui_ls_count").hide()
$("#ui_ls_count").find(":input").attr("disabled", true); $("#ui_ls_count").find(":input").attr("disabled", true);
$(".suyun").show();
$(".suyun").find(":input").attr("disabled", false);
} }
$("#baimo").find(":input").attr("disabled", true); $("#baimo").find(":input").attr("disabled", true);
$("#baimo").hide(); $("#baimo").hide();
@@ -504,10 +515,31 @@
} }
form.render(); form.render();
}) })
form.on("radio(kindSelect)", function (data) {
let colorHtml = `<option value="黑色" selected>黑色</option>
<option value="军绿色">军绿色</option>
<option value="砖红色">砖红色</option>
<option value="深咖">深咖</option>
<option value="浅棕色">浅棕色</option>
<option value="白色">白色</option>`;
$("input[name='craft'][value='压凹']").prop("checked", false);
$("#color_type").hide();
$("#color_type").find("select").attr("disabled", true);
if (data.value == "300克") {
colorHtml = `<option value="白色">白色</option>`;
}
$("#ccolor_type select[name='craft']").empty();
$("#ccolor_type select[name='craft']").append(colorHtml);
form.render();
})
form.on("checkbox(mianka)", function (data) { form.on("checkbox(mianka)", function (data) {
let craft_list = []; let craft_list = [];
let size = $(".sizeSpecialCard").val(); let size = $(".sizeSpecialCard").val();
let kindValueSelect = $(".kindValueSelect option:checked").text(); let kindValueSelect = $(".kindValueSelect option:checked").text();
let kindValue = $("input[name='kind']:checked").val();
if (kindValueSelect != "500克拉丝闪银卡" && kindValueSelect != "500克拉丝闪金卡" && kindValueSelect != '素芸') { if (kindValueSelect != "500克拉丝闪银卡" && kindValueSelect != "500克拉丝闪金卡" && kindValueSelect != '素芸') {
} else { } else {
@@ -567,7 +599,13 @@
return false; return false;
} }
} }
// if (kindValue == "300克" && craft_list.indexOf("压凹") > -1) {
// $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
// $(data.elem).prop("checked", false);
// layer.msg("素芸300克无法选择压凹工艺", {offset: ['300px', '300px']}, function () {
// });
// return false;
// }
if (craft_list.indexOf("击凸") > -1 || craft_list.indexOf("压凹") > -1) { if (craft_list.indexOf("击凸") > -1 || craft_list.indexOf("压凹") > -1) {
if (craft_list.indexOf("击凸") > -1) { if (craft_list.indexOf("击凸") > -1) {
$("#color_type select").empty().append(` <option value="无色" selected>无色</option> $("#color_type select").empty().append(` <option value="无色" selected>无色</option>
@@ -599,7 +637,6 @@
$("#leishe_type").hide(); $("#leishe_type").hide();
$("#leishe_type").find("select").attr("disabled", true); $("#leishe_type").find("select").attr("disabled", true);
} }
console.log(craft_list)
form.render(); form.render();
}) })
// 监听工艺 // 监听工艺
@@ -755,6 +792,7 @@
} }
// 特种纸名片材料 // 特种纸名片材料
var kindValueSelect = $(".kindValueSelect option:checked").text(); var kindValueSelect = $(".kindValueSelect option:checked").text();
let kindValue = $("input[name='kind']:checked").val();
var size = $(".sizeSpecialCard").val(); var size = $(".sizeSpecialCard").val();
var number = $("#number").val(); var number = $("#number").val();
if (kindValueSelect != "500克拉丝闪银卡" && kindValueSelect != "500克拉丝闪金卡" && kindValueSelect != '素芸') { if (kindValueSelect != "500克拉丝闪银卡" && kindValueSelect != "500克拉丝闪金卡" && kindValueSelect != '素芸') {
@@ -770,7 +808,7 @@
size = $("input[name='size']").val(); size = $("input[name='size']").val();
} }
if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) { if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) {
layer.msg("【特种纸名片-素芸】尺寸不能大于42*28.5 cm", {offset: ['300px', '300px']}, function () { layer.msg("【特种纸名片】尺寸不能大于42*28.5 cm", {offset: ['300px', '300px']}, function () {
}); });
return false; return false;
} }
@@ -780,10 +818,19 @@
}); });
return false; return false;
} }
if ((size.split("*")[0] > 21 || size.split("*")[1] > 15) && (size.split("*")[0] > 15 || size.split("*")[1] > 21)) { if (kindValue == '500克') {
layer.msg("【特种纸名片-素芸】尺寸不能大于21*15 cm", {offset: ['300px', '300px']}, function () { if ((size.split("*")[0] > 21 || size.split("*")[1] > 15) && (size.split("*")[0] > 15 || size.split("*")[1] > 21)) {
}); layer.msg("【特种纸名片-500克素芸】尺寸不能大于21*15 cm", {offset: ['300px', '300px']}, function () {
return false; });
return false;
}
}
if (kindValue == '300克') {
if ((size.split("*")[0] > 10 || size.split("*")[1] > 15) && (size.split("*")[0] > 15 || size.split("*")[1] > 10)) {
layer.msg("【特种纸名片-300克素芸】尺寸不能大于10*15 cm", {offset: ['300px', '300px']}, function () {
});
return false;
}
} }
} }
var arr = [] var arr = []
@@ -859,7 +906,11 @@
} }
var data = result.data.proList; var data = result.data.proList;
arr = arrs; arr = arrs;
var span_result = '特种纸名片(不配绳子)' + "-不覆膜-" + kindValueSelect + "-" + size let kindValueSelectText = kindValueSelect;
if (kindValueSelectText == "素芸") {
kindValueSelectText = kindValue + kindValueSelectText;
}
var span_result = '特种纸名片' + "-" + kindValueSelectText + "-" + size
+ "厘米-(同款内容) \n" + "工艺 :" + arr + "\n" + "厘米-(同款内容) \n" + "工艺 :" + arr + "\n"
if (number > 1) { if (number > 1) {
if (window.parent.system_isPdd) { if (window.parent.system_isPdd) {