edit
This commit is contained in:
@@ -3179,7 +3179,7 @@ public class ProductService {
|
|||||||
if (dto.getP() == 1) {
|
if (dto.getP() == 1) {
|
||||||
desFee = 0.6 * (number - 1);
|
desFee = 0.6 * (number - 1);
|
||||||
} else {
|
} else {
|
||||||
desFee = 11 * (number - 1);
|
desFee = 25 * (number - 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -3193,7 +3193,7 @@ public class ProductService {
|
|||||||
} else if (dto.getP() == 5) {
|
} else if (dto.getP() == 5) {
|
||||||
desFee = 6;
|
desFee = 6;
|
||||||
} else {
|
} else {
|
||||||
desFee = 11;
|
desFee = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -3218,6 +3218,24 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dto.setKindValue("5");
|
dto.setKindValue("5");
|
||||||
|
} else if (dto.getKindValue().equals("6")) {
|
||||||
|
int[] counts = new int[]{10, 100, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000};
|
||||||
|
double[] prices = new double[]{100, 734, 3500, 6666, 11000, 15000, 18000, 22000, 26000, 30000, 34000, 38000, 41000};
|
||||||
|
Product pro = null;
|
||||||
|
for (int i = 0; i < counts.length; i++) {
|
||||||
|
if (dto.getCount() > counts[i]) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (priceList.size() > 4) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pro = new Product();
|
||||||
|
pro.setCount(counts[i]);
|
||||||
|
pro.setPrice(prices[i]);
|
||||||
|
pro.setPriceMultiple(1d);
|
||||||
|
priceList.add(pro);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (!dto.getKindValue().equals("4")) {
|
} else if (!dto.getKindValue().equals("4")) {
|
||||||
if (count <= 10000) {
|
if (count <= 10000) {
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
@@ -3248,7 +3266,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 异形工艺
|
// 异形工艺
|
||||||
getCraft(dto, priceList, null, null, 0);
|
//getCraft(dto, priceList, null, null, 0);
|
||||||
|
|
||||||
if (dto.getKindValue().equals("5")) {
|
if (dto.getKindValue().equals("5")) {
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
|
|||||||
@@ -25,12 +25,13 @@
|
|||||||
<p>
|
<p>
|
||||||
款式
|
款式
|
||||||
</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="竹柄扇">
|
||||||
<p>
|
<p>
|
||||||
规格
|
规格
|
||||||
</p>
|
</p>
|
||||||
@@ -62,6 +63,20 @@
|
|||||||
<option value="2">21.5*34</option>
|
<option value="2">21.5*34</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item kind4" style="display:none">
|
||||||
|
<select name="kind2Value" id="kind5Value" lay-filter="kind2Value" class="select">
|
||||||
|
<option value="0">花瓶竹柄扇(190*207)</option>
|
||||||
|
<option value="1">四瓣竹柄扇(204*204)</option>
|
||||||
|
<option value="2">皇冠竹柄扇(183*207)</option>
|
||||||
|
<option value="3">芭蕉竹柄扇(280*212)</option>
|
||||||
|
<option value="4">正圆竹柄扇(205*205)</option>
|
||||||
|
<option value="5">千叶竹柄扇(171*222)</option>
|
||||||
|
<option value="6">海棠竹柄扇(207*203)</option>
|
||||||
|
<option value="7">苹果竹柄扇(204*204)</option>
|
||||||
|
<option value="8">宝相花竹柄扇(212*212)</option>
|
||||||
|
<option value="9">蝴蝶竹柄扇(212*167)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<p>
|
<p>
|
||||||
数量(个)
|
数量(个)
|
||||||
</p>
|
</p>
|
||||||
@@ -101,10 +116,11 @@
|
|||||||
class="layui-input">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
<p>工艺</p>
|
<p>工艺</p>
|
||||||
<div class="normalCraft"><input type="checkbox" name="craft" lay-filter="switch" value="异形" title="异形">
|
<div class="normalCraft">
|
||||||
|
<input type="checkbox" name="craft" id="mq" lay-filter="switch" value="异形" title="异形" checked/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tsCraft" style="display: none;"><input type="checkbox" name="craft" lay-filter="switch"
|
<div class="tsCraft" style="display: none;">
|
||||||
value="双面一样" title="双面一样"></div>
|
<input type="checkbox" name="craft" lay-filter="switch" value="双面一样" title="双面一样"></div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
|
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
|
||||||
@@ -147,46 +163,79 @@
|
|||||||
//建造实例
|
//建造实例
|
||||||
ins = carousel.render({});
|
ins = carousel.render({});
|
||||||
|
|
||||||
|
form.on('checkbox(switch)', function (data) {
|
||||||
|
if (!data.elem.checked && data.value == "异形") {
|
||||||
|
layer.msg('不能取消 [异形] 工艺!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
$('#mq').prop('checked', true);
|
||||||
|
form.render('checkbox');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
$(".kind2").find(":input").attr("disabled", true);
|
$(".kind2").find(":input").attr("disabled", true);
|
||||||
$(".kind3").find(":input").attr("disabled", true);
|
$(".kind3").find(":input").attr("disabled", true);
|
||||||
// 没切换款式的时候默认禁用其它的下拉框,(防止提交表单)
|
// 没切换款式的时候默认禁用其它的下拉框,(防止提交表单)
|
||||||
$(".kind2").find(":input").attr("disabled", true);
|
$(".kind2").find(":input").attr("disabled", true);
|
||||||
form.on('radio(kindValue)', function (data) {
|
form.on('radio(kindValue)', function (data) {
|
||||||
|
$(".kind2").hide();
|
||||||
|
$(".kind2").find(":input").attr("disabled", true);
|
||||||
|
$(".kind1").hide();
|
||||||
|
$(".kind1").find(":input").attr("disabled", true);
|
||||||
|
$(".kind3").hide();
|
||||||
|
$(".kind3").find(":input").attr("disabled", true);
|
||||||
|
$(".kind4").hide();
|
||||||
|
$(".kind4").find(":input").attr("disabled", true);
|
||||||
|
$("#tsCount").hide();
|
||||||
|
$("#normal").hide();
|
||||||
|
$(".tsCraft").hide();
|
||||||
|
$(".tsCraft").find(":input").attr("disabled", true);
|
||||||
|
$(".normalCraft").hide();
|
||||||
|
$(".normalCraft").find(":input").attr("disabled", true);
|
||||||
|
let countHtml = ` <option value="500">500</option>
|
||||||
|
<option value="1000">1000</option>
|
||||||
|
<option value="2000">2000</option>
|
||||||
|
<option value="3000">3000</option>
|
||||||
|
<option value="5000">5000</option>
|
||||||
|
<option value="10000">10000</option>`;
|
||||||
if (data.value == '3') {
|
if (data.value == '3') {
|
||||||
$(".kind2").show();
|
$(".kind2").show();
|
||||||
$(".kind2").find(":input").attr("disabled", false);
|
$(".kind2").find(":input").attr("disabled", false);
|
||||||
$(".kind1").hide();
|
|
||||||
$(".kind1").find(":input").attr("disabled", true);
|
|
||||||
$(".kind3").hide();
|
|
||||||
$(".kind3").find(":input").attr("disabled", true);
|
|
||||||
$("#tsCount").hide();
|
|
||||||
$("#normal").show();
|
$("#normal").show();
|
||||||
$(".tsCraft").hide();
|
|
||||||
$(".normalCraft").show();
|
$(".normalCraft").show();
|
||||||
|
$(".normalCraft").find(":input").attr("disabled", false);
|
||||||
} else if (data.value == '4') {
|
} else if (data.value == '4') {
|
||||||
$("#tsCount").show();
|
$("#tsCount").show();
|
||||||
$("#normal").hide();
|
|
||||||
//20240727隐藏
|
|
||||||
$(".tsCraft").hide();
|
|
||||||
$(".normalCraft").hide();
|
|
||||||
$(".kind3").show();
|
$(".kind3").show();
|
||||||
$(".kind3").find(":input").attr("disabled", false);
|
$(".kind3").find(":input").attr("disabled", false);
|
||||||
$(".kind1").hide();
|
|
||||||
$(".kind1").find(":input").attr("disabled", true);
|
} else if (data.value == '6') {
|
||||||
$(".kind2").hide();
|
$(".kind4").show();
|
||||||
$(".kind2").find(":input").attr("disabled", true);
|
$(".kind4").find(":input").attr("disabled", false);
|
||||||
|
$("#normal").show();
|
||||||
|
$(".normalCraft").show();
|
||||||
|
$(".normalCraft").find(":input").attr("disabled", false);
|
||||||
|
countHtml = `<option value="10">10</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="500">500</option>
|
||||||
|
<option value="1000">1000</option>
|
||||||
|
<option value="2000">2000</option>
|
||||||
|
<option value="3000">3000</option>
|
||||||
|
<option value="4000">4000</option>
|
||||||
|
<option value="5000">5000</option>
|
||||||
|
<option value="6000">6000</option>
|
||||||
|
<option value="7000">7000</option>
|
||||||
|
<option value="8000">8000</option>
|
||||||
|
<option value="9000">9000</option>
|
||||||
|
<option value="10000">10000</option>`
|
||||||
} else {
|
} else {
|
||||||
$(".kind1").show();
|
$(".kind1").show();
|
||||||
$(".kind1").find(":input").attr("disabled", false);
|
$(".kind1").find(":input").attr("disabled", false);
|
||||||
$(".kind2").hide();
|
|
||||||
$(".kind2").find(":input").attr("disabled", true);
|
|
||||||
$(".kind3").hide();
|
|
||||||
$(".kind3").find(":input").attr("disabled", true);
|
|
||||||
$("#tsCount").hide();
|
|
||||||
$("#normal").show();
|
$("#normal").show();
|
||||||
$(".tsCraft").hide();
|
|
||||||
$(".normalCraft").show();
|
$(".normalCraft").show();
|
||||||
|
$(".normalCraft").find(":input").attr("disabled", false);
|
||||||
}
|
}
|
||||||
|
$("#count").empty().append(countHtml);
|
||||||
|
form.render();
|
||||||
getProductImage()
|
getProductImage()
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -212,7 +261,7 @@
|
|||||||
$("#carousel").append(html);
|
$("#carousel").append(html);
|
||||||
// 如果没有说明,就不显示null
|
// 如果没有说明,就不显示null
|
||||||
if (remark.indexOf("null") < 0) {
|
if (remark.indexOf("null") < 0) {
|
||||||
$("#remark").append(remark);
|
$("#remark").empty().append(remark);
|
||||||
}
|
}
|
||||||
// 如果没有轮播图就隐藏
|
// 如果没有轮播图就隐藏
|
||||||
if (result.length == 0) {
|
if (result.length == 0) {
|
||||||
@@ -238,7 +287,8 @@
|
|||||||
2: "普通中柄(卡扣)",
|
2: "普通中柄(卡扣)",
|
||||||
3: "筷子柄",
|
3: "筷子柄",
|
||||||
4: "团扇",
|
4: "团扇",
|
||||||
5: "o柄"
|
5: "o柄",
|
||||||
|
6: "竹柄扇"
|
||||||
};
|
};
|
||||||
if (fanKind == 3) {
|
if (fanKind == 3) {
|
||||||
var kind2Data = {
|
var kind2Data = {
|
||||||
@@ -255,6 +305,19 @@
|
|||||||
1: "24*33",
|
1: "24*33",
|
||||||
2: "21.5*34"
|
2: "21.5*34"
|
||||||
}
|
}
|
||||||
|
} else if (fanKind == 6) {
|
||||||
|
var kind2Data = {
|
||||||
|
0: "花瓶竹柄扇(190*207)",
|
||||||
|
1: "四瓣竹柄扇(204*204)",
|
||||||
|
2: "皇冠竹柄扇(183*207)",
|
||||||
|
3: "芭蕉竹柄扇(280*212)",
|
||||||
|
4: "正圆竹柄扇(205*205)",
|
||||||
|
5: "千叶竹柄扇(171*222)",
|
||||||
|
6: "海棠竹柄扇(207*203)",
|
||||||
|
7: "苹果竹柄扇(204*204)",
|
||||||
|
8: "宝相花竹柄扇(212*212)",
|
||||||
|
9: "蝴蝶竹柄扇(212*167)"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
var kind2Data = {
|
var kind2Data = {
|
||||||
0: "15*16",
|
0: "15*16",
|
||||||
|
|||||||
@@ -573,7 +573,7 @@
|
|||||||
var number = $("#number").val();
|
var number = $("#number").val();
|
||||||
let number_kindValue = $("input[name='kindValue']:checked").val();
|
let number_kindValue = $("input[name='kindValue']:checked").val();
|
||||||
let number_kind2Value = $("select[name='kind2Value'] option:selected").val();
|
let number_kind2Value = $("select[name='kind2Value'] option:selected").val();
|
||||||
if (window.parent.system_isPdd && number > 1 && ((number_kindValue == 0 && number_kind2Value == 0) || (number_kindValue == 1 && (number_kind2Value == 3 || number_kind2Value == 8 || number_kind2Value == 15)) || number_kindValue == 2)) {
|
if (number > 1 && ((number_kindValue == 0 && number_kind2Value == 0) || (number_kindValue == 1 && (number_kind2Value == 3 || number_kind2Value == 8 || number_kind2Value == 15)) || number_kindValue == 2)) {
|
||||||
$("#ui_des").show();
|
$("#ui_des").show();
|
||||||
} else {
|
} else {
|
||||||
$("#ui_des").hide();
|
$("#ui_des").hide();
|
||||||
@@ -1663,7 +1663,7 @@
|
|||||||
|
|
||||||
|
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
if (window.parent.system_isPdd && $("#ui_des").css("display") != "none") {
|
if ($("#ui_des").css("display") != "none") {
|
||||||
let numberType = $("#desType option:selected").text();
|
let numberType = $("#desType option:selected").text();
|
||||||
span_result += "款数:" + number + "-" + numberType + "\n";
|
span_result += "款数:" + number + "-" + numberType + "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user