新增pvc卡片材质

This commit is contained in:
2026-04-13 16:22:19 +08:00
parent 2012ad0a80
commit 1d4cea0b9a
4 changed files with 75 additions and 17 deletions
@@ -1771,6 +1771,14 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number * min * zhekou));
}
for (Product product : priceList) {
if (craft_list.contains("配流苏")) {
product.setPrice(Math.ceil(product.getPrice() + 0.15 * dto.getCount() * number));
}
if (craft_list.contains("穿流苏")) {
product.setPrice(Math.ceil(product.getPrice() + 0.5 * dto.getCount() * number));
}
}
if ("500克拉丝闪银".equals(kind)) {
String[] craft = dto.getCraft();
if (!StringUtils.isEmpty(craft)) {
@@ -3917,10 +3925,15 @@ public class ProductService {
area = length * width / 10000;
priceList = new CardPrice().getPrice(count, area, dto.getKindValue());
// 根据款数重新算价格
if (dto.getKindValue().equals("3")) {// 0.76价格翻倍
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * 1.8));
for (Product product : priceList) {
if (dto.getKindValue().equals("3")) {// 0.76价格翻倍
product.setPrice(Math.ceil(product.getPrice() * 1.8));
}
if (dto.getKindValue().equals("4") || dto.getKindValue().equals("5")) {// 0.76价格翻倍
product.setPrice(Math.ceil(product.getPrice() * 1.8 * 1.2));
}
}
if ((length == 8 && width == 4) || (length == 4 && width == 8)) {
@@ -4596,8 +4609,10 @@ public class ProductService {
for (Product product : priceList) {
if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) {
wei = 0.38;
} else if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) {
} else if (dto.getKindValue().equals("4") || dto.getKindValue().equals("5") || dto.getKindValue().equals("6")) {
wei = 0.84;
} else if (dto.getKindValue().equals("11") || dto.getKindValue().equals("12") || dto.getKindValue().equals("13")) {
wei = 0.76;
} else {
wei = 1;
}
+20 -11
View File
@@ -40,12 +40,13 @@
</p>
<div class="layui-form-item">
<div class="layui-input-block">
<input type="radio" name="kindValue" class="kindValue" lay-filter="kindValue" value="1"
title="0.38PVC哑光异型卡片" checked="checked">
<input type="radio" name="kindValue" class="kindValue" lay-filter="kindValue" value="2"
title="0.38PVC亮光异型卡片">
<input type="radio" name="kindValue" class="kindValue" lay-filter="kindValue" value="3"
title="0.76PVC亮光异型卡片">
<select name="kindValue" class="kindValue" lay-filter="kindValue">
<option value="1" title="0.38PVC哑光异型卡片">0.38PVC哑光异型卡片</option>
<option value="2" title="0.38PVC亮光异型卡片">0.38PVC亮光异型卡片</option>
<option value="3" title="0.76PVC亮光异型卡片">0.76PVC亮光异型卡片</option>
<option value="4" title="0.84PVC哑光异型卡片">0.84PVC哑光异型卡片</option>
<option value="5" title="0.84PVC亮光异型卡片">0.84PVC亮光异型卡片</option>
</select>
</div>
</div>
<p>
@@ -176,9 +177,15 @@
form.render();
}
})
form.on('radio(kindValue)', (data) => {
form.on('select(kindValue)', (data) => {
var html = " ";
let kindValue = data.value;
if (kindValue == 4) {
kindValue = 1;
}
if (kindValue == 5) {
kindValue = 2;
}
// 清空轮播图
$("#carousel").empty();
$.ajax({
@@ -186,7 +193,7 @@
type: "GET",
data: {
proTypeValue: $("#proTypeValue").val(),
kindValue: data.value
kindValue: kindValue
},
success: function (result) {
for (let i = 0; i < result.length; i++) {
@@ -250,12 +257,14 @@
var kindData = {
1: "0.38PVC哑光异形卡片",
2: "0.38PVC亮光异型卡片",
3: "0.76PVC亮光异性卡片"
3: "0.76PVC亮光异性卡片",
4: "0.84PVC哑光异形卡片",
5: "0.84PVC亮光异性卡片"
};
var craft = $('input[name="craft"]:checked').val()
var craftShua = $('input[name="craftShua"]:checked').val()
var craftJiao = [$('input[name="craftJiao"]:checked').val()]
var kind = kindData[$('input[name="kindValue"]:checked').val()];
var kind = kindData[$('select[name="kindValue"] option:selected').val()];
var number = $("#number").val();
var switchSize = [$('input[name="switchSize"]:checked').val()];
var size = "";
+15 -1
View File
@@ -35,6 +35,9 @@
<option value="7">1mm亮光</option>
<option value="8">1mm磨砂</option>
<option value="9">1mm哑光</option>
<option value="11">0.76mm亮光</option>
<option value="12">0.76mm磨砂</option>
<option value="13">0.76mm哑光</option>
</select>
</div>
<p>
@@ -211,13 +214,24 @@
if (data.value == 10) {
$("#shuangmian").hide();
}
let val = data.value;
if (val == 11) {
val = 1;
}
if (val == 12) {
val = 2;
}
if (val == 13) {
val = 3;
}
form.render();
$.ajax({
url: "${pageContext.request.contextPath}/getImgs",
type: "GET",
data: {
proTypeValue: $('#proTypeValue').val(),
kindValue: data.value
kindValue: val
},
//dataType : "json",
success: function (result) {
+21 -1
View File
@@ -44,6 +44,7 @@
<option value="溪雪">溪雪(珠光)</option>
<%-- <option value="300克布纹纸">300克布纹纸</option>--%>
<option value="玉蕊">玉蕊</option>
<option value="萱姿">萱姿(雅柔)</option>
<option value="金绒">金绒</option>
<%-- <option value="300克灵感纸">300克灵感纸</option>--%>
<option value="芳怡">芳怡(草香)</option>
@@ -53,7 +54,6 @@
<%-- <option value="触感咖啡330克印金/银">触感咖啡330克印金/银</option>--%>
<%-- <option value="采石白色600克彩色印刷">采石白色600克彩色印刷</option>--%>
<!--<option value="优质绵米色600克">优质绵米色600克</option>-->
<option value="萱姿">萱姿(雅柔)</option>
<%-- <option value="500克拉丝闪银">500克拉丝闪银卡</option>--%>
<%-- <option value="500克拉丝闪金">500克拉丝闪金卡</option>--%>
<option value="素芸">素芸</option>
@@ -180,6 +180,12 @@
class="">
</span>
<input type="checkbox" name="craft" lay-filter="switch" value="压痕" title="压痕">
<span class="craft_liusu">
<input type="checkbox" name="craft" lay-filter="switch" value="配流苏" title="配流苏"
class="noCraft">
<input type="checkbox" name="craft" lay-filter="switch" value="穿流苏" title="穿流苏"
class="">
</span>
</div>
<div id="mianka" style="display: none">
<div id="ccolor_type" class="layui-inline" style="display: flex;align-items: center">
@@ -386,6 +392,8 @@
$("#mianka input").attr("disabled", true);
$("#craft_layout").show()
$("#craft_layout input").attr("disabled", false);
$(".craft_liusu").hide()
$(".craft_liusu input").attr("disabled", true);
$(".suyun").hide();
$(".suyun").find(":input").attr("disabled", true);
if (data.value.length <= 4) {
@@ -500,6 +508,11 @@
$(".newCraft input[name='craft']").prop('checked', false);
}
}
let liusuList = ['岚蝶', '皙贝', '琮纹', '睿狐', '溪雪', '玉蕊', '萱姿']
if (liusuList.includes(data.value)) {
$(".craft_liusu").show()
$(".craft_liusu input").attr("disabled", false);
}
if (data.value == "素芸") {
$("#craft_layout").hide()
@@ -711,6 +724,13 @@
});
return false;
}
if(craft_list.includes("配流苏") && craft_list.includes("穿流苏")){
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg("配流苏 - 穿流苏不能同时选择", {offset: ['300px', '300px']}, function () {
});
return false;
}
if (kindValue != "素芸") {
$("#dakong").removeAttr('disabled');
$("#craft_mo").removeAttr('disabled');