修改插旗价格
This commit is contained in:
@@ -306,22 +306,79 @@ public class ProductService {
|
|||||||
priceList = StickersDoublePrice.getPrice(length, width, count, number);
|
priceList = StickersDoublePrice.getPrice(length, width, count, number);
|
||||||
return priceList;
|
return priceList;
|
||||||
} else if ("插旗".equals(dto.getStickerKind())) {
|
} else if ("插旗".equals(dto.getStickerKind())) {
|
||||||
dto.setKindValue("0");
|
if (!"250克白卡纸对裱".equals(kind)) {
|
||||||
dto.setLength(length);
|
dto.setKindValue("0");
|
||||||
dto.setWidth(width);
|
dto.setLength(length);
|
||||||
area = length * width / 10000;
|
dto.setWidth(width);
|
||||||
if (length > 20 && length < 21) {
|
|
||||||
length = Math.ceil(length);
|
|
||||||
area = length * width / 10000;
|
area = length * width / 10000;
|
||||||
}
|
if (length > 20 && length < 21) {
|
||||||
if (width > 20 && width < 21) {
|
length = Math.ceil(length);
|
||||||
width = Math.ceil(width);
|
area = length * width / 10000;
|
||||||
area = length * width / 10000;
|
}
|
||||||
}
|
if (width > 20 && width < 21) {
|
||||||
priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList);
|
width = Math.ceil(width);
|
||||||
|
area = length * width / 10000;
|
||||||
|
}
|
||||||
|
priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList);
|
||||||
|
|
||||||
if (priceList.size() >= 3) {
|
if (priceList.size() >= 3) {
|
||||||
priceList = priceList.subList(0, 3);
|
priceList = priceList.subList(0, 3);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
area = length * width;
|
||||||
|
int[] count_list = {500, 1000, 2000, 3000, 5000, 10000, 20000};
|
||||||
|
int[][] prices = {
|
||||||
|
{172, 209, 209, 209, 209, 209, 209, 209, 313, 365, 382, 400, 435},
|
||||||
|
{192, 209, 209, 209, 209, 209, 261, 278, 400, 504, 522, 556, 609},
|
||||||
|
{382, 418, 418, 418, 418, 418, 418, 418, 678, 800, 835, 922, 1009},
|
||||||
|
{470, 504, 504, 539, 556, 556, 591, 626, 887, 1078, 1130, 1252, 1373},
|
||||||
|
{556, 591, 591, 696, 747, 922, 973, 1078, 1443, 1721, 1843, 2017, 2208},
|
||||||
|
{783, 817, 817, 1009, 1199, 1495, 1582, 1947, 2625, 3199, 3477, 3703, 4085},
|
||||||
|
{1217, 1287, 1287, 1599, 1982, 2486, 2921, 3651, 5007, 6119, 6259, 7197, 7910},
|
||||||
|
};
|
||||||
|
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60};
|
||||||
|
for (int j = 0; j < count_list.length; j++) {
|
||||||
|
if (priceList.size() > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
int item_count = count_list[j];
|
||||||
|
if (count > item_count) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int count_index = Arrays.binarySearch(count_list, item_count);
|
||||||
|
int startIndex = 0;
|
||||||
|
int endIndex = 0;
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (area > areas[i]) {
|
||||||
|
startIndex = endIndex;
|
||||||
|
endIndex = Math.min(i + 1, areas.length - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count_index >= 0) {
|
||||||
|
Product pro = new Product();
|
||||||
|
double price = 0;
|
||||||
|
int[] price_list = prices[count_index];
|
||||||
|
if (startIndex == endIndex) {
|
||||||
|
price = (price_list[endIndex] / areas[endIndex]) * area;
|
||||||
|
} else {
|
||||||
|
price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * price_list[startIndex] + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * price_list[endIndex];
|
||||||
|
}
|
||||||
|
if ("6.5".equals(dto.getToothpick_size())) {
|
||||||
|
price = price + (item_count * 0.1);
|
||||||
|
}
|
||||||
|
if ("10".equals(dto.getToothpick_size())) {
|
||||||
|
price = price + (item_count * 0.1);
|
||||||
|
}
|
||||||
|
if ("12".equals(dto.getToothpick_size())) {
|
||||||
|
price = price + (item_count * 0.14);
|
||||||
|
}
|
||||||
|
pro.setCount(item_count);
|
||||||
|
pro.setPrice(Math.ceil(price * number));
|
||||||
|
priceList.add(pro);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return priceList;
|
||||||
}
|
}
|
||||||
// return priceList;
|
// return priceList;
|
||||||
|
|
||||||
@@ -571,10 +628,10 @@ public class ProductService {
|
|||||||
} else if ("10".equals(dto.getKind())) {// 吸管套
|
} else if ("10".equals(dto.getKind())) {// 吸管套
|
||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
// if (min > 1) {
|
// if (min > 1) {
|
||||||
String[] xgtCraft = {"模切"};
|
String[] xgtCraft = {"模切"};
|
||||||
dto.setCraft(xgtCraft);
|
dto.setCraft(xgtCraft);
|
||||||
priceList = getHekaPrice(min, dto, priceList, count);
|
priceList = getHekaPrice(min, dto, priceList, count);
|
||||||
getCraft(dto, priceList, length * 10, width * 10, min);
|
getCraft(dto, priceList, length * 10, width * 10, min);
|
||||||
/*} else {
|
/*} else {
|
||||||
if ("6.5*5.4".equals(dto.getSize())) {
|
if ("6.5*5.4".equals(dto.getSize())) {
|
||||||
dto.setKindValue("0");
|
dto.setKindValue("0");
|
||||||
@@ -2822,23 +2879,28 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(wei * product.getCount() * number));
|
product.setWeight(df.format(wei * product.getCount() * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ("1".equals(kind) || "2".equals(kind) || "3".equals(kind)) {
|
||||||
|
//priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
// 扇子
|
// 扇子
|
||||||
case "18":
|
case "18":
|
||||||
if (dto.getKindValue().equals("5")) {
|
if (dto.getKindValue().equals("5")) {
|
||||||
dto.setKindValue("0");
|
dto.setKindValue("0");
|
||||||
if (count <= 10000)
|
if (count <= 10000) {
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
else
|
} else {
|
||||||
priceList = productMapper.thanThousandPrice(dto);
|
priceList = productMapper.thanThousandPrice(dto);
|
||||||
|
}
|
||||||
|
|
||||||
dto.setKindValue("5");
|
dto.setKindValue("5");
|
||||||
} 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);
|
||||||
else
|
} else {
|
||||||
priceList = productMapper.thanThousandPrice(dto);
|
priceList = productMapper.thanThousandPrice(dto);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
String[] list = dto.getCraft();
|
String[] list = dto.getCraft();
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@
|
|||||||
<!-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="少数量" title="少数量(100个以内)"> -->
|
<!-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="少数量" title="少数量(100个以内)"> -->
|
||||||
<input type="radio" lay-filter="stickerKind" name="stickerKind" value="专版打印" title="专版打印">
|
<input type="radio" lay-filter="stickerKind" name="stickerKind" value="专版打印" title="专版打印">
|
||||||
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="封口贴" title="封口贴">--%>
|
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="封口贴" title="封口贴">--%>
|
||||||
<input type="radio" lay-filter="stickerKind" name="stickerKind" value="插旗" title="插旗">
|
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="插旗" title="插旗">--%>
|
||||||
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="双面印刷不干胶" title="双面印刷不干胶">--%>
|
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="双面印刷不干胶" title="双面印刷不干胶">--%>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -117,6 +117,7 @@
|
|||||||
<select name="kindValue" lay-filter="kindValue1" id="kindValue3" class="select" lay-search>
|
<select name="kindValue" lay-filter="kindValue1" id="kindValue3" class="select" lay-search>
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="铜版纸不干胶">铜纸板不干胶</option>
|
<option value="铜版纸不干胶">铜纸板不干胶</option>
|
||||||
|
<option value="250克白卡纸对裱">250克白卡纸对裱</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -276,17 +277,24 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<input type="radio" name="craftQie" calss="moqie" value="模切" lay-skin="primary" title="模切"
|
<input type="radio" name="craftQie" calss="moqie" value="模切" lay-skin="primary" title="模切"
|
||||||
checked="checked">
|
checked="checked"/>
|
||||||
|
<span class="caiqie">
|
||||||
|
<input type="radio" name="craftQie" calss="moqie" value="裁切" lay-skin="primary" title="裁切"/>
|
||||||
|
</span>
|
||||||
<span class="meiwenzhiQie" style="display:none"><input type="radio" name="craftQie" class="bumoqie"
|
<span class="meiwenzhiQie" style="display:none"><input type="radio" name="craftQie" class="bumoqie"
|
||||||
value="不模切" lay-skin="primary"
|
value="不模切" lay-skin="primary"
|
||||||
title="不模切"></span>
|
title="不模切"></span>
|
||||||
|
<span class="cha_fm">
|
||||||
|
|
|
||||||
|
<input type="radio" name="craftMo" lay-filter="craftMo" value="覆哑膜" title="覆哑膜" checked="checked">
|
||||||
|
</span>
|
||||||
<span class="fm">
|
<span class="fm">
|
||||||
|
|
|
|
||||||
<input type="radio" name="craftMo" lay-filter="craftMo" value="覆亮膜" title="覆亮膜" class="liangmo"
|
<input type="radio" name="craftMo" lay-filter="craftMo" value="覆亮膜" title="覆亮膜" class="liangmo"
|
||||||
checked="checked">
|
checked="checked">
|
||||||
<span class="yamo"><input type="radio" name="craftMo" lay-filter="craftMo" value="覆哑膜"
|
<span class="yamo"><input type="radio" name="craftMo" lay-filter="craftMo" value="覆哑膜"
|
||||||
title="覆哑膜"></span>
|
title="覆哑膜"></span>
|
||||||
</span>
|
</span>
|
||||||
<span class="yb">
|
<span class="yb">
|
||||||
|
|
|
|
||||||
<input type="radio" name="yinbai" class="yinbai_un" value="不印白" title="不印白" checked
|
<input type="radio" name="yinbai" class="yinbai_un" value="不印白" title="不印白" checked
|
||||||
@@ -343,8 +351,10 @@
|
|||||||
<div class="layui-form-item yq">
|
<div class="layui-form-item yq">
|
||||||
<span class="ui_craftShua">
|
<span class="ui_craftShua">
|
||||||
|
|
|
|
||||||
<input type="radio" name="craftShua" value="配牙签" title="配牙签" checked>
|
<span class="peishua">
|
||||||
<input type="radio" name="craftShua" value="粘牙签" title="粘牙签">
|
<input type="radio" name="craftShua" value="配牙签" title="配牙签">
|
||||||
|
</span>
|
||||||
|
<input type="radio" name="craftShua" value="粘牙签" title="粘牙签" checked>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="ui_guagua2">
|
<span class="ui_guagua2">
|
||||||
@@ -485,6 +495,18 @@
|
|||||||
$(".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);
|
||||||
|
$(".caiqie").hide();
|
||||||
|
$(".fm input[value='覆亮膜']").attr("checked", "checked");
|
||||||
|
$(".ui_cq select[name='count']").empty().append(` <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>
|
||||||
|
<option value="20000">20000</option>
|
||||||
|
<option value="30000">30000</option>
|
||||||
|
<option value="40000">40000</option>
|
||||||
|
<option value="50000">50000</option>`)
|
||||||
if (stickerKind == "常用种类") {
|
if (stickerKind == "常用种类") {
|
||||||
// 切换为品种单选框
|
// 切换为品种单选框
|
||||||
$(".kindValueRadio").show();
|
$(".kindValueRadio").show();
|
||||||
@@ -765,6 +787,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else if (kindvalue == "250克白卡纸对裱") {
|
||||||
|
html += "广东:(3-4天发货) 中通 圆通 顺丰;"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
@@ -881,9 +905,44 @@
|
|||||||
$(".ui_guagua").prop('disabled', 'disabled');
|
$(".ui_guagua").prop('disabled', 'disabled');
|
||||||
$(".ui_guaguasize").hide();
|
$(".ui_guaguasize").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(".peishua").show();
|
||||||
|
$(".peishua").find(":input").attr("disabled", false);
|
||||||
|
$(".cha_fm").hide();
|
||||||
|
$(".cha_fm").find(":input").attr("disabled", true);
|
||||||
|
$(".caiqie").hide();
|
||||||
|
$(".ui_cq select[name='count']").empty().append(` <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>
|
||||||
|
<option value="20000">20000</option>
|
||||||
|
<option value="30000">30000</option>
|
||||||
|
<option value="40000">40000</option>
|
||||||
|
<option value="50000">50000</option>`)
|
||||||
if (data.value == "铜版纸不干胶") {
|
if (data.value == "铜版纸不干胶") {
|
||||||
$(".ui_guagua2").show();
|
$(".ui_guagua2").show();
|
||||||
$(".ui_guagua2").removeAttr('disabled');
|
$(".ui_guagua2").removeAttr('disabled');
|
||||||
|
|
||||||
|
} else if (data.value == "250克白卡纸对裱") {
|
||||||
|
$(".fm input").removeAttr('checked');
|
||||||
|
$(".ui_guagua2").hide();
|
||||||
|
$(".caiqie").show();
|
||||||
|
$(".cha_fm").show();
|
||||||
|
$(".cha_fm").find(":input").attr("disabled", false);
|
||||||
|
$(".peishua").hide();
|
||||||
|
$(".peishua").find(":input").attr("disabled", true);
|
||||||
|
$("input[name='craft']").prop('checked', false);
|
||||||
|
$(".cha_fm input").prop('checked', true);
|
||||||
|
$(".ui_guagua2").prop('disabled', 'disabled');
|
||||||
|
$(".ui_cq select[name='count']").empty().append(` <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>
|
||||||
|
<option value="20000">20000</option>`)
|
||||||
} else {
|
} else {
|
||||||
$(".ui_guagua2").hide();
|
$(".ui_guagua2").hide();
|
||||||
$("input[name='craft']").prop('checked', false);
|
$("input[name='craft']").prop('checked', false);
|
||||||
@@ -977,7 +1036,8 @@
|
|||||||
$("#remark").append(remark);
|
$("#remark").append(remark);
|
||||||
kValue = $("#kindValue").val()
|
kValue = $("#kindValue").val()
|
||||||
getProductImage(kValue)
|
getProductImage(kValue)
|
||||||
|
$(".cha_fm").hide();
|
||||||
|
$(".cha_fm").find(":input").attr("disabled", true);
|
||||||
if (data.value == 0 || data.value == 2) {
|
if (data.value == 0 || data.value == 2) {
|
||||||
// 5.11:专版打印没有烫金工艺了,全部禁用、隐藏
|
// 5.11:专版打印没有烫金工艺了,全部禁用、隐藏
|
||||||
// 5.18:专版打印恢复烫金工艺
|
// 5.18:专版打印恢复烫金工艺
|
||||||
@@ -1315,6 +1375,8 @@
|
|||||||
var kindValue = $("#kindValue1").val()
|
var kindValue = $("#kindValue1").val()
|
||||||
} else if (stickerKind == '专版打印') {
|
} else if (stickerKind == '专版打印') {
|
||||||
var kindValue = $("#kindValue").val()
|
var kindValue = $("#kindValue").val()
|
||||||
|
} else if (stickerKind[0] == '插旗') {
|
||||||
|
var kindValue = $("#kindValue3").val()
|
||||||
} else {
|
} else {
|
||||||
var kindValue = $("#kindValue2").val()
|
var kindValue = $("#kindValue2").val()
|
||||||
}
|
}
|
||||||
@@ -1447,6 +1509,18 @@
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (stickerKind[0] == "插旗" && kindValue == "250克白卡纸对裱") {
|
||||||
|
if ((size.split("*")[0] < 1 || size.split("*")[1] < 1)) {
|
||||||
|
layer.msg("插卡-250克白卡纸对裱不能小于10*10MM", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((size.split("*")[0] > 9 || size.split("*")[1] > 9)) {
|
||||||
|
layer.msg("插卡-250克白卡纸对裱不能大于90*90MM", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (kindValue != 0 && kindValue != 1 && kindValue != 2 && kindValue != "拉丝金"
|
if (kindValue != 0 && kindValue != 1 && kindValue != 2 && kindValue != "拉丝金"
|
||||||
&& kindValue != "拉丝银" && kindValue != "格底珠光膜" && kindValue != "PP合成纸") {
|
&& kindValue != "拉丝银" && kindValue != "格底珠光膜" && kindValue != "PP合成纸") {
|
||||||
|
|||||||
Reference in New Issue
Block a user