修改美纹纸价格,修改烫画向下取并加上设计费,修改宣传单尺寸
このコミットが含まれているのは:
@@ -2503,7 +2503,7 @@ public class ProductService {
|
|||||||
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
|
if (dto.getCraft() != null && craft_list.size() > 0 && (craft_list.contains("冷转印") || craft_list.contains("烫画"))) {
|
||||||
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
|
int[] quantitySteps = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000};
|
||||||
double paperLength = 0, paperWidth = 0;
|
double paperLength = 0, paperWidth = 0;
|
||||||
|
double chu = 0.6;
|
||||||
|
|
||||||
if (craft_list.contains("冷转印")) {
|
if (craft_list.contains("冷转印")) {
|
||||||
paperLength = 20;
|
paperLength = 20;
|
||||||
@@ -2512,22 +2512,23 @@ public class ProductService {
|
|||||||
if (craft_list.contains("烫画")) {
|
if (craft_list.contains("烫画")) {
|
||||||
paperLength = 100;
|
paperLength = 100;
|
||||||
paperWidth = 57;
|
paperWidth = 57;
|
||||||
|
chu = 1;
|
||||||
}
|
}
|
||||||
if (length == paperLength || length == paperWidth) {
|
if (length == paperLength || length == paperWidth) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(0.6)).doubleValue();
|
length = BigDecimal.valueOf(length).add(BigDecimal.valueOf(chu)).doubleValue();
|
||||||
}
|
}
|
||||||
if (width == paperLength || width == paperWidth) {
|
if (width == paperLength || width == paperWidth) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(0.6)).doubleValue();
|
width = BigDecimal.valueOf(width).add(BigDecimal.valueOf(chu)).doubleValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
//一张大纸能放几个
|
//一张大纸能放几个
|
||||||
double num = Math.max(Math.min(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length)), 1);
|
double num = Math.max(Math.min(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length)), 1);
|
||||||
if (craft_list.contains("烫画")) {
|
if (craft_list.contains("烫画")) {
|
||||||
num = Math.max(Math.ceil(paperLength / length) * Math.ceil(paperWidth / width), Math.ceil(paperLength / width) * Math.ceil(paperWidth / length));
|
num = Math.max(Math.floor(paperLength / length) * Math.floor(paperWidth / width), Math.floor(paperLength / width) * Math.floor(paperWidth / length));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2562,9 +2563,9 @@ public class ProductService {
|
|||||||
priceList.add(pro);
|
priceList.add(pro);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
// product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
product.setPrice(Math.ceil(product.getPrice() + (number - 1) * 0.5));
|
||||||
// }
|
}
|
||||||
|
|
||||||
return priceList;
|
return priceList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,43 +387,39 @@ public class PriceUtils {
|
|||||||
|
|
||||||
// 不干胶常规数量美纹纸价格计算
|
// 不干胶常规数量美纹纸价格计算
|
||||||
public List<Product> getMeiWenZhiPrice(Double length, Double width, int count, Integer number, String craftMo) {
|
public List<Product> getMeiWenZhiPrice(Double length, Double width, int count, Integer number, String craftMo) {
|
||||||
double l = 420;
|
List<Product> priceList = new ArrayList<>();
|
||||||
double w = 285;
|
int[][] prices = new int[][]{
|
||||||
Product pro = new Product();
|
{79, 107, 134, 272, 343, 685, 1030, 1374, 1787, 2322, 2748, 3302, 4351},
|
||||||
List<Product> list = new ArrayList<Product>();
|
{84, 112, 139, 277, 348, 690, 1035, 1379, 1792, 2327, 2753, 3307, 4356},
|
||||||
// 成本价 元/张
|
{161, 222, 278, 553, 690, 1377, 2065, 2748, 3584, 4653, 5505, 6614, 8712},
|
||||||
double danjia = 1.8;
|
{318, 443, 552, 1101, 1377, 2753, 4119, 5475, 7128, 9108, 10613, 12435, 13068},
|
||||||
if ("模切".equals(craftMo)) {
|
{475, 661, 828, 1652, 2066, 4129, 6178, 8213, 10692, 13662, 15920, 18652, 19602},
|
||||||
danjia = 2.2;
|
{788, 1099, 1380, 2743, 3430, 6856, 10272, 13613, 17721, 22275, 25542, 29700, 32670},
|
||||||
}
|
{1575, 2188, 2747, 5485, 6859, 13712, 20543, 27225, 35442, 44550, 51084, 59400, 65340},
|
||||||
// 换成毫米每边+2
|
{3150, 4355, 5494, 10930, 13662, 27324, 40887, 54054, 69894, 87120, 99000, 114444, 121968},
|
||||||
length = length * 10 + 4;
|
};
|
||||||
width = width * 10 + 4;
|
int[] count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000, 20000};
|
||||||
if ((length > l || width > w) && (length > w || width > l))
|
double[] areas = new double[]{26, 37, 49.6, 82, 127, 171, 231, 295, 361, 451, 600.5, 902, 1199};
|
||||||
return null;
|
double area = length * width;
|
||||||
// 一张大纸能做多少个此类尺寸的不干胶
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
double max = Math.max(Math.floor(l / length) * Math.floor(w / width),
|
int count_item = count_list[i];
|
||||||
Math.floor(l / width) * Math.floor(w / length));
|
if (priceList.size() > 2) {
|
||||||
|
break;
|
||||||
for (int i = 0; i < countArr.length; i++) {
|
}
|
||||||
if (countArr[i] < count || list.size() > 3) {
|
if (count > count_item) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pro = new Product();
|
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||||
// 报的数量需要多少张大纸
|
double price = 0;
|
||||||
int num = (int) Math.ceil(countArr[i] / max);
|
if (count_index >= 0) {
|
||||||
pro.setCount(countArr[i]);
|
price = new PriceUtils().TablePrice(area, prices[count_index], areas);
|
||||||
pro.setPrice(Math.ceil(num * danjia * 2.5 > 83 ? num * danjia * 2.5 : 83));
|
}
|
||||||
list.add(pro);
|
Product product = new Product();
|
||||||
|
product.setCount(count_item);
|
||||||
|
product.setPrice(Math.ceil(price * number));
|
||||||
|
priceList.add(product);
|
||||||
}
|
}
|
||||||
|
return priceList;
|
||||||
/*if(number > 1) {
|
|
||||||
for (Product product : list) {
|
|
||||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3433,7 +3429,7 @@ public class PriceUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (startIndex == endIndex) {
|
if (startIndex == endIndex) {
|
||||||
price = (price_list[endIndex] / areas[endIndex]) * area;
|
price = price_list[endIndex];
|
||||||
} else {
|
} else {
|
||||||
price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * price_list[startIndex] + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * price_list[endIndex];
|
price = ((areas[endIndex] - area) / (areas[endIndex] - areas[startIndex])) * price_list[startIndex] + ((area - areas[startIndex]) / (areas[endIndex] - areas[startIndex])) * price_list[endIndex];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,8 +246,8 @@
|
|||||||
var kind2 = kind2Data[$("#kind2Value").val()];
|
var kind2 = kind2Data[$("#kind2Value").val()];
|
||||||
var number = $("#number").val();
|
var number = $("#number").val();
|
||||||
var size = $("#size").val();
|
var size = $("#size").val();
|
||||||
if ((size.split("*")[0] > 140 || size.split("*")[1] > 110) && (size.split("*")[0] > 110 || size.split("*")[1] > 140)) {
|
if ((size.split("*")[0] > 110 || size.split("*")[1] > 110) && (size.split("*")[0] > 110 || size.split("*")[1] > 110)) {
|
||||||
layer.msg("宣传单尺寸不能超过140*110 cm", {offset: ['300px', '300px']}, function () {
|
layer.msg("宣传单尺寸不能超过110*110 cm", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,10 +184,6 @@
|
|||||||
<option value="4">4</option>
|
<option value="4">4</option>
|
||||||
<option value="5">5</option>
|
<option value="5">5</option>
|
||||||
<option value="6">6</option>
|
<option value="6">6</option>
|
||||||
<option value="7">7</option>
|
|
||||||
<option value="8">8</option>
|
|
||||||
<option value="9">9</option>
|
|
||||||
<option value="10">10</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -471,11 +471,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($("#kindValue1").val() == "美纹纸" && (stickerKind == '' || stickerKind != '专版打印')) {
|
if ($("#kindValue1").val() == "美纹纸" && (stickerKind == '' || stickerKind != '专版打印')) {
|
||||||
if ((size.split("*")[0] > 9 || size.split("*")[1] > 5.4) && (size.split("*")[0] > 5.4 || size.split("*")[1] > 9)) {
|
// if ((size.split("*")[0] > 9 || size.split("*")[1] > 5.4) && (size.split("*")[0] > 5.4 || size.split("*")[1] > 9)) {
|
||||||
$(".meiwenzhiQie").show();
|
// $(".meiwenzhiQie").show();
|
||||||
} else {
|
// } else {
|
||||||
$(".meiwenzhiQie").hide();
|
// $(".meiwenzhiQie").hide();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#number").on("input", function (e) {
|
$("#number").on("input", function (e) {
|
||||||
@@ -868,6 +868,21 @@
|
|||||||
$(".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);
|
||||||
|
let count_html = `<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>
|
||||||
|
<option value="60000">60000</option>
|
||||||
|
<option value="70000">70000</option>
|
||||||
|
<option value="80000">80000</option>
|
||||||
|
<option value="90000">90000</option>
|
||||||
|
<option value="100000">100000</option>`;
|
||||||
// A级、PVC、透明
|
// A级、PVC、透明
|
||||||
if (data.value == 0 || data.value == 1 || data.value == 2) {
|
if (data.value == 0 || data.value == 1 || data.value == 2) {
|
||||||
$(".tj").show();
|
$(".tj").show();
|
||||||
@@ -989,9 +1004,17 @@
|
|||||||
$(".caiqie").show();
|
$(".caiqie").show();
|
||||||
}
|
}
|
||||||
if (data.value == "美纹纸") {
|
if (data.value == "美纹纸") {
|
||||||
$(".meiwenzhiQie").show();
|
// $(".meiwenzhiQie").show();
|
||||||
|
count_html = `<option value="200">200</option>
|
||||||
|
<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 {
|
||||||
$(".meiwenzhiQie").hide();
|
// $(".meiwenzhiQie").hide();
|
||||||
// 切换按钮工艺恢复
|
// 切换按钮工艺恢复
|
||||||
$("#craftForm")[0].reset();
|
$("#craftForm")[0].reset();
|
||||||
}
|
}
|
||||||
@@ -1024,6 +1047,7 @@
|
|||||||
$(".n_mq").hide();
|
$(".n_mq").hide();
|
||||||
$('.n_mq input').prop("disabled", true);
|
$('.n_mq input').prop("disabled", true);
|
||||||
}
|
}
|
||||||
|
$("#ui_normal #count").empty().append(count_html);
|
||||||
form.render();//必须写
|
form.render();//必须写
|
||||||
|
|
||||||
var content = getContent(kindvalue);
|
var content = getContent(kindvalue);
|
||||||
|
|||||||
新しいイシューから参照
ユーザーをブロックする