新增信封材质

This commit is contained in:
2026-04-02 15:42:06 +08:00
parent 64e2c7062d
commit b1d63d3087
4 changed files with 140 additions and 60 deletions
@@ -1949,6 +1949,7 @@ public class ProductService {
// 彩色信封 // 彩色信封
case "9": case "9":
// 120克双胶牛皮 // 120克双胶牛皮
String kindValue9 = "";
if ("10".equals(kind)) { if ("10".equals(kind)) {
dto.setKindValue("0"); dto.setKindValue("0");
priceList = productMapper.getThanPrice(dto); priceList = productMapper.getThanPrice(dto);
@@ -1973,6 +1974,10 @@ public class ProductService {
} }
} }
} else {// 120/100克牛皮纸/ 140克珠光冰白彩色信封/高端珠光冰白烫金信封 } else {// 120/100克牛皮纸/ 140克珠光冰白彩色信封/高端珠光冰白烫金信封
kindValue9 = dto.getKindValue();
if ("12".equals(dto.getKindValue())) {
dto.setKindValue("4");
}
priceList = productMapper.getThanPrice(dto); priceList = productMapper.getThanPrice(dto);
} }
// 保留4个价格 // 保留4个价格
@@ -1983,14 +1988,30 @@ public class ProductService {
// 产品价格倍数 // 产品价格倍数
for (Product product : priceList) { for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple()));
if (carft_list.contains("烫金")) { if ("4".equals(kindValue9)) {
if (carft_list.contains("2处")) { if (carft_list.contains("烫金")) {
product.setPrice(product.getPrice() + 100); if (carft_list.contains("2处")) {
} product.setPrice(product.getPrice() + 100);
if (carft_list.contains("3处")) { }
product.setPrice(product.getPrice() + 200); if (carft_list.contains("3处")) {
product.setPrice(product.getPrice() + 200);
}
} }
} }
if ("12".equals(kindValue9)) {
if (carft_list.contains("烫金")) {
if (carft_list.contains("1处")) {
product.setPrice(product.getPrice() + 150);
}
if (carft_list.contains("2处")) {
product.setPrice(product.getPrice() + 300);
}
if (carft_list.contains("3处")) {
product.setPrice(product.getPrice() + 450);
}
}
}
} }
// 根据款数重新算重量重量在数据库中 // 根据款数重新算重量重量在数据库中
/* /*
@@ -5905,6 +5926,40 @@ public class ProductService {
// 报的数量需要多少张大纸 // 报的数量需要多少张大纸
// 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个
double num = Math.ceil(dto.getCount() / max); double num = Math.ceil(dto.getCount() / max);
if (num > 3 && num <= 30) {
base_price = 19;
if ("2".equals(dto.getKind())) {
base_price = 33;
}
if ("3".equals(dto.getKind())) {
base_price = 38;
}
} else if (num > 31 && num <= 60) {
base_price = 17;
if ("2".equals(dto.getKind())) {
base_price = 31;
}
if ("3".equals(dto.getKind())) {
base_price = 36;
}
} else if (num > 61 && num <= 150) {
base_price = 15;
if ("2".equals(dto.getKind())) {
base_price = 29;
}
if ("3".equals(dto.getKind())) {
base_price = 34;
}
} else {
base_price = 14;
if ("2".equals(dto.getKind())) {
base_price = 28;
}
if ("3".equals(dto.getKind())) {
base_price = 33;
}
}
double craft_price = 0; double craft_price = 0;
double bao_price = 0; double bao_price = 0;
if (carftList.contains("打码")) { if (carftList.contains("打码")) {
@@ -6916,7 +6971,7 @@ public class ProductService {
case "6": case "6":
dto.setKindValue("1"); dto.setKindValue("1");
stickersList = productMapper.getThanPrice(dto); stickersList = productMapper.getThanPrice(dto);
if ("加凹凸".equals(dto.getAotu())) { if ("加凹凸".equals(dto.getAotu()) || ("纯烫金".equals(dto.getAotu()))) {
for (Product product : stickersList) { for (Product product : stickersList) {
product.setPrice(Math.ceil(product.getPrice() * 2.3)); product.setPrice(Math.ceil(product.getPrice() * 2.3));
} }
+74 -49
View File
@@ -34,16 +34,14 @@
</div> </div>
<div class="layui-form-item" style="display:none;"> <div class="layui-form-item" style="display:none;">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="2" <input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="2" title="140克珠光冰白彩色信封">
title="140克珠光冰白彩色信封"> <input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="3" title="200克珠光冰白彩色信封">
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="3"
title="200克珠光冰白彩色信封">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-input-block"> <div class="layui-input-block">
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="4" <input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="4" title="250克高端珠光冰白烫金信封">
title="250克高端珠光冰白烫金信封"> <input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="12" title="300克铜版纸信封">
</div> </div>
</div> </div>
<p> <p>
@@ -150,21 +148,28 @@
</div> </div>
<p>工艺</p> <p>工艺</p>
<div id="craft_layout"> <div id="craft_layout">
烫金工艺:
<input type="checkbox" name="craft" lay-filter="switch" value="烫金" title="烫金"> <input type="checkbox" name="craft" lay-filter="switch" value="烫金" title="烫金">
<div class="layui-inline" style="width: 100px"> <div class="layui-inline" style="width: 100px">
<select name="craft" class="select"> <select name="craft" class="select" id="craftNum">
<option value="1处">1处</option> <option value="1处">1处</option>
<option value="2处">2处</option> <option value="2处">2处</option>
<option value="3处">3处</option> <option value="3处">3处</option>
</select></div> </select>
<div class="layui-inline" style="width: 100px"> </div>
<div class="layui-inline" style="width: 100px" id="craftColor">
<select name="craft" class="select"> <select name="craft" class="select">
<option value="金色">金色</option> <option value="金色">金色</option>
<option value="黑色">黑色</option> <option value="黑色">黑色</option>
<option value="红色">红色</option> <option value="红色">红色</option>
<option value="蓝色">蓝色</option> <option value="蓝色">蓝色</option>
<option value="银色">银色</option> <option value="银色">银色</option>
</select></div> </select>
</div>
</div>
<div class="layui-form-item" id="craft_mo">
覆膜工艺:
<input type="checkbox" name="craft" lay-filter="switch" value="覆哑膜" title="覆哑膜" checked>
</div> </div>
<hr> <hr>
<div class="layui-form-item"> <div class="layui-form-item">
@@ -214,6 +219,26 @@
} }
}); });
form.on('checkbox(switch)', function (data) {
let craft_list = [];
let kindV = $("input[name='kindValue']:checked").val();
$("input[name='craft']:checked").each(function () {
if (!$(this).is(':disabled')) {
craft_list.push($(this).val());
}
});
if (kindV == 12 && !craft_list.includes("覆哑膜")) {
$(data.elem).prop("checked", true);
layer.msg("覆膜工艺无法取消", {offset: ['300px', '300px']}, function () {
});
form.render();
return false;
}
})
// 隐藏的默认禁用 // 隐藏的默认禁用
$(".color2").hide(); $(".color2").hide();
$(".second").find(":input").attr("disabled", true); $(".second").find(":input").attr("disabled", true);
@@ -256,29 +281,29 @@
} }
} }
}); });
$(".first").hide();
$(".first").find(":input").attr("disabled", true);
$(".second").hide();
$(".second").find(":input").attr("disabled", true);
$(".third").hide();
$(".third").find(":input").attr("disabled", true);
$("#otherCount").hide();
$("#otherCount").find(":input").attr("disabled", true);
$("#craft_mo").hide();
$("#craft_mo").find(":input").attr("disabled", true);
$("#thirdCount").hide();
$("#thirdCount").find(":input").attr("disabled", true);
$(".pageColor").hide();
$(".pageColor").find(":input").attr("disabled", true);
if (level == 2 || level == 3) { if (level == 2 || level == 3) {
$(".first").hide();
$(".first").find(":input").attr("disabled", true);
$(".third").hide();
$(".third").find(":input").attr("disabled", true);
$(".second").show(); $(".second").show();
$(".second").find(":input").attr("disabled", false); $(".second").find(":input").attr("disabled", false);
$("#otherCount").show(); $("#otherCount").show();
$("#thirdCount").find(":input").attr("disabled", false); $("#thirdCount").find(":input").attr("disabled", false);
} else if (level == 4) { } else if (level == 4 || level == 12) {
$(".first").hide();
$(".first").find(":input").attr("disabled", true);
$(".second").hide();
$(".second").find(":input").attr("disabled", true);
$(".third").show(); $(".third").show();
$(".third").find(":input").attr("disabled", false); $(".third").find(":input").attr("disabled", false);
} else { } else {
$(".second").hide();
$(".second").find(":input").attr("disabled", true);
$(".third").hide();
$(".third").find(":input").attr("disabled", true);
$(".first").show(); $(".first").show();
$(".first").find(":input").attr("disabled", false); $(".first").find(":input").attr("disabled", false);
} }
@@ -287,8 +312,7 @@
// 数量 // 数量
$("#thirdCount").show(); $("#thirdCount").show();
$("#thirdCount").find(":input").attr("disabled", false); $("#thirdCount").find(":input").attr("disabled", false);
$("#otherCount").hide();
$("#otherCount").find(":input").attr("disabled", true);
$(".pageColor").show(); $(".pageColor").show();
$(".pageColor").find(":input").attr("disabled", false); $(".pageColor").find(":input").attr("disabled", false);
$(".color2").find(":input").attr("disabled", true); $(".color2").find(":input").attr("disabled", true);
@@ -305,14 +329,16 @@
// $(".color1").find(":input").attr("disabled", true); // $(".color1").find(":input").attr("disabled", true);
} }
}) })
} else if (level == 12) {
$("#craft_mo").show();
$("#craft_mo").find(":input").attr("disabled", false);
$("#otherCount").show();
$("#otherCount").find(":input").attr("disabled", false);
} else { } else {
// 数量 // 数量
$("#otherCount").show(); $("#otherCount").show();
$("#otherCount").find(":input").attr("disabled", false); $("#otherCount").find(":input").attr("disabled", false);
$("#thirdCount").hide();
$("#thirdCount").find(":input").attr("disabled", true);
$(".pageColor").hide();
$(".pageColor").find(":input").attr("disabled", true);
} }
// 点击计算,计算价格 // 点击计算,计算价格
@@ -335,7 +361,8 @@
11: "100克牛皮纸", 11: "100克牛皮纸",
2: "140克珠光冰白彩色信封", 2: "140克珠光冰白彩色信封",
3: "200克珠光冰白彩色信封", 3: "200克珠光冰白彩色信封",
4: "250克高端珠光冰白烫金信封" 4: "250克高端珠光冰白烫金信封",
12: "300克铜版纸信封"
}; };
// 第二排 // 第二排
if (level == 2 || level == 3) { if (level == 2 || level == 3) {
@@ -352,17 +379,19 @@
var kind2 = kind2Data[$(".secondKind2Value").val()]; var kind2 = kind2Data[$(".secondKind2Value").val()];
} }
// 第三排 // 第三排
else if (level == 4) { else if (level == 4 || level == 12) {
var kind2Data = { var kind2Data = {
0: "5号西式信封22*11cm", 0: "5号西式信封22*11cm",
1: "卡套定制款 9.4*6.4cm" 1: "卡套定制款 9.4*6.4cm"
}; };
var kind2 = $(".thirdKind2Value").val(); var kind2 = $(".thirdKind2Value").val();
// 判断规格选颜色 // 判断规格选颜色
if (kind2 == 0) { if (level == 4) {
var color = $(".color11").val() if (kind2 == 0) {
} else { var color = $(".color11").val()
var color = $(".color22").val() } else {
var color = $(".color22").val()
}
} }
kind2 = $(".thirdKind2Value option:selected").text(); kind2 = $(".thirdKind2Value option:selected").text();
} }
@@ -382,22 +411,19 @@
var kind = kindData[$('input[name="kindValue"]:checked').val()]; var kind = kindData[$('input[name="kindValue"]:checked').val()];
var number = $("#number").val(); var number = $("#number").val();
let craft_list = []; let craft_list = [];
if (color == null) color = ""
$("input[name='craft']:checked").each(function () { $("input[name='craft']:checked").each(function () {
if (!$(this).is(':disabled')) { if (!$(this).is(':disabled')) {
craft_list.push($(this).val()); if ($(this).val() == "烫金") {
craft_list.push($(this).val() + $("#craftNum option:selected").val() + $("#craftColor option:selected").val());
} else {
craft_list.push($(this).val());
}
} }
} }
); );
if (craft_list.findIndex(x => x == "烫金") > -1) {
$("select[name='craft'] option:selected").each(function () {
if (!$(this).is(':disabled')) {
craft_list.push($(this).val());
}
}
);
}
if (color == null) color = ""
var span_result = kind + '\n' + kind2 + ' - ' + color + ' (同款内容)\n'; var span_result = kind + '\n' + kind2 + ' - ' + color + ' (同款内容)\n';
if (craft_list.length > 0) { if (craft_list.length > 0) {
span_result += "工艺:" + craft_list.join(",") + '\n' span_result += "工艺:" + craft_list.join(",") + '\n'
@@ -425,7 +451,6 @@
var size = ""; var size = "";
if (level == 2 || level == 3) { if (level == 2 || level == 3) {
var secondKind2Value = $(".secondKind2Value option:selected").val(); var secondKind2Value = $(".secondKind2Value option:selected").val();
console.log(secondKind2Value);
if (secondKind2Value == "0") { if (secondKind2Value == "0") {
size = "16.5*10"; size = "16.5*10";
} else if (secondKind2Value == "1") { } else if (secondKind2Value == "1") {
@@ -444,7 +469,7 @@
size = "32.4*22.9"; size = "32.4*22.9";
} }
kind += "-" + kind2; kind += "-" + kind2;
} else if (level == 4) { } else if (level == 4 || level == 12) {
var thirdKind2Value = $(".thirdKind2Value option:selected").val(); var thirdKind2Value = $(".thirdKind2Value option:selected").val();
size = $(".thirdKind2Value option:selected").text() size = $(".thirdKind2Value option:selected").text()
+2 -2
View File
@@ -26,11 +26,11 @@
款式 款式
</p> </p>
<%-- <input type="radio" name="kindValue" lay-filter="kindValue" value="0" title="短铆钉">--%> <%-- <input type="radio" name="kindValue" lay-filter="kindValue" value="0" title="短铆钉">--%>
<%--<input type="radio" name="kindValue" lay-filter="kindValue" value="1" title="长铆钉" checked="checked"> <input type="radio" name="kindValue" lay-filter="kindValue" value="1" title="长铆钉" checked="checked">
<input type="radio" name="kindValue" lay-filter="kindValue" value="2" title="普通中柄(卡扣)"> <input type="radio" name="kindValue" lay-filter="kindValue" value="2" title="普通中柄(卡扣)">
<input type="radio" name="kindValue" lay-filter="kindValue" value="3" title="筷子柄"> <input type="radio" name="kindValue" lay-filter="kindValue" value="3" title="筷子柄">
<input type="radio" name="kindValue" lay-filter="kindValue" value="4" title="团扇"> <input type="radio" name="kindValue" lay-filter="kindValue" value="4" title="团扇">
<input type="radio" name="kindValue" lay-filter="kindValue" value="5" title="o柄">--%> <input type="radio" name="kindValue" lay-filter="kindValue" value="5" title="o柄">
<input type="radio" name="kindValue" lay-filter="kindValue" value="6" title="竹柄扇"> <input type="radio" name="kindValue" lay-filter="kindValue" value="6" title="竹柄扇">
<p> <p>
规格 规格
+2 -2
View File
@@ -141,7 +141,7 @@
var table = layui.table; var table = layui.table;
$(".shensuo").hide(); $(".shensuo").hide();
$(".shensuo select").attr("display", true); $(".shensuo").find("select").attr("disabled", true);
form.render(); form.render();
//建造实例 //建造实例
@@ -219,7 +219,7 @@
form.render(); form.render();
}) })
form.on("checkbox(ui_craft)",function(data){ form.on("checkbox(ui_craft)", function (data) {
$(data.elem).prop("checked", true); $(data.elem).prop("checked", true);
layer.msg("工艺无法取消", {offset: ['300px', '300px']}, function () { layer.msg("工艺无法取消", {offset: ['300px', '300px']}, function () {
}); });