新增激凸工艺价格

Tento commit je obsažen v:
2025-10-27 14:35:28 +08:00
rodič ed43cff130
revize 842638ac67
3 změnil soubory, kde provedl 40 přidání a 10 odebrání
+10 -4
Zobrazit soubor
@@ -385,11 +385,14 @@ public class ProductService {
dto.setKindValue("2"); dto.setKindValue("2");
kind = "2"; kind = "2";
} else if ("15".equals(kind) || "16".equals(kind)) { } else if ("15".equals(kind) || "16".equals(kind)) {
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
priceList = new SwzStickersPrice().getPrice(count, length, width, number, dto.getCraftTang()); priceList = new SwzStickersPrice().getPrice(count, length, width, number, dto.getCraftTang());
if (number > 1) {
for (Product product : priceList) { for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number)); double rate = 1;
if (craft_list.contains("有色激凸")) {
rate = 1.8;
} }
product.setPrice(Math.ceil(product.getPrice() * number * rate));
} }
return priceList; return priceList;
} }
@@ -4904,8 +4907,11 @@ public class ProductService {
int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000}; int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000};
double[] areas = new double[]{9, 12.25, 16, 20.25, 25, 30.25, 36, 42.25, 49, 56.25, 64, 72.25, 81, 90.25, 100, 110.25, 121}; double[] areas = new double[]{9, 12.25, 16, 20.25, 25, 30.25, 36, 42.25, 49, 56.25, 64, 72.25, 81, 90.25, 100, 110.25, 121};
double area = (length + 0.4) * (width + 0.4);//加上4毫出血 double area = (length + 0.4) * (width + 0.4);//加上4毫出血
List<Product> priceList = getAreaNextPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber());
return getAreaNextPrice(count_list, dto.getCount(), area, prices, areas, dto.getNumber()); priceList.forEach(product -> {
product.setPrice(Math.ceil(product.getPrice() * 0.8));
});
return priceList;
} }
private List<Product> getDalanPrice(Product dto, Double width, Double length) { private List<Product> getDalanPrice(Product dto, Double width, Double length) {
+1 -1
Zobrazit soubor
@@ -149,7 +149,7 @@
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
// 只留一个remark // 只留一个remark
remark = ""; remark = "";
html += '<div><img style="width:' + result[0].imgWidth + 'px" src="' + result[i].imgUrl + '"></div>'; html += '<div><img style="width:100%;height: 100%;object-fit: contain" src="' + result[i].imgUrl + '"></div>';
remark += '<div><span>' + result[i].remark + '<span/></div>'; remark += '<div><span>' + result[i].remark + '<span/></div>';
} }
$("#carousel").append(html); $("#carousel").append(html);
+26 -2
Zobrazit soubor
@@ -13,6 +13,10 @@
.layui-carousel-ind ul { .layui-carousel-ind ul {
display: none display: none
} }
.sjitu .layui-form-select .layui-edge {
right: 20px;
}
</style> </style>
<body> <body>
<div class="big_box"> <div class="big_box">
@@ -375,6 +379,12 @@
</p> </p>
<div class="layui-form-item"> <div class="layui-form-item">
<input type="radio" name="craftTang" value="激凸" title="激凸" checked lay-filter="radio_craftTang"> <input type="radio" name="craftTang" value="激凸" title="激凸" checked lay-filter="radio_craftTang">
<div class="layui-inline sjitu" style="width: 100px">
<select name="craft">
<option value="无色激凸">无色激凸</option>
<option value="有色激凸">有色激凸</option>
</select>
</div>
<input type="radio" name="craftTang" value="烫金" title="烫金" lay-filter="radio_craftTang"> <input type="radio" name="craftTang" value="烫金" title="烫金" lay-filter="radio_craftTang">
<input type="radio" name="craftTang" value="浮雕烫金" title="浮雕烫金" lay-filter="radio_craftTang"> <input type="radio" name="craftTang" value="浮雕烫金" title="浮雕烫金" lay-filter="radio_craftTang">
<input type="radio" name="craftTang" value="彩色印刷" title="彩色印刷" lay-filter="radio_craftTang"> <input type="radio" name="craftTang" value="彩色印刷" title="彩色印刷" lay-filter="radio_craftTang">
@@ -821,7 +831,13 @@
return html; return html;
} }
form.on('radio(radio_craftTang)', () => { form.on('radio(radio_craftTang)', (data) => {
$(".sjitu").hide();
$(".sjitu select").attr("disabled", true);
if (data.value == "激凸") {
$(".sjitu").show();
$(".sjitu select").attr("disabled", false);
}
var content = getContent(kindvalue); var content = getContent(kindvalue);
$("#remark").empty(); $("#remark").empty();
@@ -868,7 +884,8 @@
$(".n_mq").hide(); $(".n_mq").hide();
$('.pf input').prop("checked", false); $('.pf input').prop("checked", false);
$('.n_mq input').prop("disabled", true); $('.n_mq input').prop("disabled", true);
$(".sjitu").hide();
$(".sjitu select").attr("disabled", true);
let count_html = `<option value="500">500</option> let count_html = `<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>
@@ -1029,9 +1046,12 @@
} }
if (data.value == "15" || data.value == "16") { if (data.value == "15" || data.value == "16") {
$(".normal input[name='craftTang'][value='激凸']").prop("checked", true);
$(".normal").show(); $(".normal").show();
$("#craftForm").hide(); $("#craftForm").hide();
$(".normal").find(":input").attr("disabled", false); $(".normal").find(":input").attr("disabled", false);
$(".sjitu").show();
$(".sjitu select").attr("disabled", false);
} else { } else {
$(".normal").hide(); $(".normal").hide();
$("#craftForm").show(); $("#craftForm").show();
@@ -1730,8 +1750,12 @@
} else if (kindValue == "15" || kindValue == "16") { } else if (kindValue == "15" || kindValue == "16") {
span_result = ""; span_result = "";
if ($("input[name='craftTang']:checked").val() != "") { if ($("input[name='craftTang']:checked").val() != "") {
if ($("input[name='craftTang']:checked").val() == "激凸") {
craft_list.push($(".sjitu select option:selected").val());
} else {
craft_list.push($("input[name='craftTang']:checked").val()); craft_list.push($("input[name='craftTang']:checked").val());
} }
}
} else if (stickerKind == "双面印刷不干胶") { } else if (stickerKind == "双面印刷不干胶") {
span_result = ""; span_result = "";
if ($(".ui_sm input[name='craftQie']:checked").val() != "") { if ($(".ui_sm input[name='craftQie']:checked").val() != "") {