edit
This commit is contained in:
@@ -168,4 +168,6 @@ public class Product {
|
|||||||
private Integer co_number;
|
private Integer co_number;
|
||||||
private Integer shen_type;
|
private Integer shen_type;
|
||||||
private String shen_color;
|
private String shen_color;
|
||||||
|
private String[] jtcolor;//击凸颜色
|
||||||
|
private String tcolor;//烫金颜色
|
||||||
}
|
}
|
||||||
@@ -112,11 +112,11 @@ public class ProductController {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (product.getNumber() != null && product.getNumber() > 1) {
|
if (product.getNumber() != null && product.getNumber() > 1) {
|
||||||
if ("专版打印".equals(product.getStickerKind()) || "少数量".equals(product.getCouponKind())) {
|
// if ("专版打印".equals(product.getStickerKind()) || "少数量".equals(product.getCouponKind())) {
|
||||||
if (request.getParameter("desType") != null && !"".equals(request.getParameter("desType"))) {
|
if (request.getParameter("desType") != null && !"".equals(request.getParameter("desType"))) {
|
||||||
product.setP(Integer.valueOf(request.getParameter("desType")));
|
product.setP(Integer.valueOf(request.getParameter("desType")));
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<Product> proList = productService.getThanPrice(product, user.getRole());
|
List<Product> proList = productService.getThanPrice(product, user.getRole());
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ public class ProductService {
|
|||||||
case "2":
|
case "2":
|
||||||
// 单个产品的面积
|
// 单个产品的面积
|
||||||
area = (length + 0.3) * (width + 0.3) / 10000;
|
area = (length + 0.3) * (width + 0.3) / 10000;
|
||||||
priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai());
|
priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai(), dto.getCraftTang(), getStickersTanBasePrice(area * 10000));
|
||||||
// 根据款数重新算价格/计算重量
|
// 根据款数重新算价格/计算重量
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
@@ -2822,7 +2822,7 @@ public class ProductService {
|
|||||||
if ("0".equals(kind)) {
|
if ("0".equals(kind)) {
|
||||||
priceList = new PosterPrice().acountPrice00(kind2, area, count, number);
|
priceList = new PosterPrice().acountPrice00(kind2, area, count, number);
|
||||||
} else if ("1".equals(kind)) {// 室内写真
|
} else if ("1".equals(kind)) {// 室内写真
|
||||||
priceList = new PosterPrice().acountPrice01(kind2, area, count, number);
|
priceList = new PosterPrice().acountPrice01(kind2, area, count, number, width * 100, length * 100);
|
||||||
} else if ("2".equals(kind)) {// 户外写真
|
} else if ("2".equals(kind)) {// 户外写真
|
||||||
if ("24".equals(kind2)) {
|
if ("24".equals(kind2)) {
|
||||||
double base_price = 0;
|
double base_price = 0;
|
||||||
@@ -2900,14 +2900,12 @@ public class ProductService {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
priceList = new PosterPrice().acountPrice02(kind2, area, count, number);
|
priceList = new PosterPrice().acountPrice02(kind2, area, count, number, width * 100, length * 100);
|
||||||
}
|
}
|
||||||
} else if ("3".equals(kind)) {// 布
|
} else if ("3".equals(kind)) {// 布
|
||||||
if (kind2.equals("11") || kind2.equals("12") || kind2.equals("13")) {
|
if (kind2.equals("11") || kind2.equals("12") || kind2.equals("13")) {
|
||||||
priceList = new PriceUtils().getDbPrice(kind2, width, length, count, priceList);
|
priceList = new PriceUtils().getDbPrice(kind2, width * 100, length * 100, count, priceList, number);
|
||||||
for (Product product : priceList) {
|
|
||||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
|
||||||
}
|
|
||||||
} else if (kind2.equals("10")) {
|
} else if (kind2.equals("10")) {
|
||||||
length *= 100;
|
length *= 100;
|
||||||
width *= 100;
|
width *= 100;
|
||||||
@@ -2927,12 +2925,13 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number));
|
product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
priceList = new PosterPrice().acountPrice03(kind2, length, width, area, count, number, dto.getCraftBu());
|
priceList = new PosterPrice().acountPrice03(kind2, length * 100, width * 100, area, count, number, dto.getCraftBu());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7.27 海报、合版封套 *1.15
|
// 7.27 海报、合版封套 *1.15
|
||||||
// 除550灯布/双喷布
|
// 除550灯布/双喷布
|
||||||
if (!"1".equals(kind2) && !"7".equals(kind2) && !"11".equals(kind2) && !"12".equals(kind2) && !"10".equals(kind2) && !"6".equals(kind2) && !"13".equals(kind2)) {
|
List<String> kind2_list = Arrays.asList("1", "2", "6", "7", "8", "10", "11", "12", "13");
|
||||||
|
if (!kind2_list.contains(kind2)) {
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.ceil(product.getPrice() * 1.15));
|
product.setPrice(Math.ceil(product.getPrice() * 1.15));
|
||||||
}
|
}
|
||||||
@@ -2956,9 +2955,6 @@ 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;
|
||||||
// 扇子
|
// 扇子
|
||||||
@@ -3509,6 +3505,50 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
||||||
}
|
}
|
||||||
|
} else if ("10".equals(kind) || "11".equals(kind)) {
|
||||||
|
int[] count_list = {50, 100, 200, 500, 1000};
|
||||||
|
double[] jitu = {};
|
||||||
|
double[] jitu_add = {};
|
||||||
|
double[] tang = {};
|
||||||
|
double[] yaao = {};
|
||||||
|
if ("10".equals(kind)) {
|
||||||
|
jitu = new double[]{267, 317, 450, 733, 1200};
|
||||||
|
jitu_add = new double[]{190, 210, 250, 320, 440};
|
||||||
|
tang = new double[]{250, 283, 383, 650, 980};
|
||||||
|
yaao = new double[]{250, 267, 383, 617, 950};
|
||||||
|
} else if ("11".equals(kind)) {
|
||||||
|
jitu = new double[]{267, 317, 417, 667, 1080};
|
||||||
|
jitu_add = new double[]{95, 105, 125, 160, 220};
|
||||||
|
tang = new double[]{250, 300, 350, 583, 930};
|
||||||
|
yaao = new double[]{250, 283, 317, 533, 900};
|
||||||
|
}
|
||||||
|
craft_list = Arrays.asList(dto.getCraft());
|
||||||
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
|
if (priceList.size() > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
int count_item = count_list[i];
|
||||||
|
if (count > count_item) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Product product = new Product();
|
||||||
|
product.setCount(count_item);
|
||||||
|
if (craft_list.contains("击凸")) {
|
||||||
|
product.setPrice(jitu[i]);
|
||||||
|
if (dto.getJtcolor() != null && dto.getJtcolor().length > 1) {
|
||||||
|
product.setPrice(jitu[i] + jitu_add[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (craft_list.contains("烫金")) {
|
||||||
|
product.setPrice(tang[i]);
|
||||||
|
}
|
||||||
|
if (craft_list.contains("无色压凹")) {
|
||||||
|
product.setPrice(yaao[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
priceList.add(product);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count);
|
priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count);
|
||||||
// 服装吊牌里面的900克吊牌把价格*1.3倍
|
// 服装吊牌里面的900克吊牌把价格*1.3倍
|
||||||
@@ -4105,6 +4145,39 @@ public class ProductService {
|
|||||||
pro.setWeight(df.format(Math.ceil(zhongliang * dto.getCount() * number)));
|
pro.setWeight(df.format(Math.ceil(zhongliang * dto.getCount() * number)));
|
||||||
priceList.add(pro);
|
priceList.add(pro);
|
||||||
return priceList;
|
return priceList;
|
||||||
|
case "防伪标":
|
||||||
|
int[][] prices = {
|
||||||
|
{176, 176, 176, 176, 176, 176, 176, 176, 180, 184, 192, 192, 202, 228, 228},
|
||||||
|
{180, 180, 182, 184, 186, 188, 196, 206, 240, 260, 274, 286, 306, 344, 360},
|
||||||
|
{184, 184, 184, 194, 214, 228, 264, 290, 358, 408, 434, 466, 506, 572, 650},
|
||||||
|
{190, 202, 210, 224, 256, 282, 332, 374, 478, 554, 590, 660, 716, 814, 942},
|
||||||
|
{200, 232, 254, 290, 338, 392, 468, 544, 728, 864, 920, 1046, 1138, 1298, 1520},
|
||||||
|
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
||||||
|
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
||||||
|
};
|
||||||
|
int[] count_list = {500, 1000, 2000, 3000, 5000, 10000, 20000};
|
||||||
|
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
||||||
|
|
||||||
|
area = length * width;
|
||||||
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
|
int count_item = count_list[i];
|
||||||
|
if (priceList.size() > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (count > count_item) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int count_index = Arrays.binarySearch(count_list, count_item);
|
||||||
|
price = 0;
|
||||||
|
if (count_index >= 0) {
|
||||||
|
price = new PriceUtils().TablePrice(area, prices[count_index], areas);
|
||||||
|
}
|
||||||
|
Product product = new Product();
|
||||||
|
product.setCount(count_item);
|
||||||
|
product.setPrice(Math.ceil(price * number));
|
||||||
|
priceList.add(product);
|
||||||
|
}
|
||||||
|
return priceList;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,238 +133,183 @@ public class PosterPrice {
|
|||||||
* @param number
|
* @param number
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<Product> acountPrice01(String kind2, Double area, int count, Integer number) {
|
public List<Product> acountPrice01(String kind2, Double area, int count, Integer number, double width, double length) {
|
||||||
// 最低收费
|
// 最低收费
|
||||||
double price = 0.0;
|
double price = 0.0;
|
||||||
// 单价
|
// 单价
|
||||||
double danjia = 0.0;
|
double danjia = 0.0;
|
||||||
String weight = "0";
|
String weight = "0";
|
||||||
DecimalFormat DecimalFormat = new DecimalFormat("#.#####");
|
DecimalFormat DecimalFormat = new DecimalFormat("#.#####");
|
||||||
|
double[] areas = {};
|
||||||
|
double[] prices = {};
|
||||||
|
double last_price = 0;
|
||||||
|
double min_price = 0;
|
||||||
switch (kind2) {
|
switch (kind2) {
|
||||||
// 高精室内写真
|
// 高精室内写真
|
||||||
case "2":
|
case "2":
|
||||||
|
areas = new double[]{2, 5, 10, 20, 50};
|
||||||
|
prices = new double[]{50, 45, 32, 28, 25};
|
||||||
|
last_price = 23;
|
||||||
|
min_price = 50;
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
|
||||||
danjia = 50;
|
|
||||||
} else if (area > 2 && area <= 5) {
|
|
||||||
danjia = 45;
|
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 32;
|
|
||||||
} else if (area > 10 && area <= 20) {
|
|
||||||
danjia = 28;
|
|
||||||
} else if (area > 20 && area <= 50) {
|
|
||||||
danjia = 25;
|
|
||||||
} else {
|
|
||||||
danjia = 23;
|
|
||||||
}
|
|
||||||
price = area * danjia > 50 ? area * danjia : 50;
|
|
||||||
break;
|
break;
|
||||||
// pp纸(室内)
|
// pp纸(室内)
|
||||||
case "3":
|
case "3":
|
||||||
// 根据面积得到单价
|
areas = new double[]{2, 5, 10};
|
||||||
if (area > 0 && area <= 2) {
|
prices = new double[]{62, 45, 35};
|
||||||
danjia = 62;
|
last_price = 28;
|
||||||
} else if (area > 2 && area <= 5) {
|
min_price = 70;
|
||||||
danjia = 45;
|
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 35;
|
|
||||||
} else {
|
|
||||||
danjia = 28;
|
|
||||||
}
|
|
||||||
price = area * danjia > 70 ? area * danjia : 70;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
||||||
break;
|
break;
|
||||||
// 直喷PVC
|
// 直喷PVC
|
||||||
case "5":
|
case "5":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10};
|
||||||
danjia = 70;
|
prices = new double[]{70, 55, 45};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 40;
|
||||||
danjia = 55;
|
min_price = 100;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 45;
|
|
||||||
} else {
|
|
||||||
danjia = 40;
|
|
||||||
}
|
|
||||||
price = area * danjia > 100 ? area * danjia : 100;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
||||||
break;
|
break;
|
||||||
// 高精室内相纸
|
// 高精室内相纸
|
||||||
case "6":
|
case "6":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10};
|
||||||
danjia = 70;
|
prices = new double[]{70, 60, 45};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 40;
|
||||||
danjia = 60;
|
min_price = 90;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 45;
|
|
||||||
} else {
|
|
||||||
danjia = 40;
|
|
||||||
}
|
|
||||||
price = area * danjia > 90 ? area * danjia : 90;
|
|
||||||
break;
|
break;
|
||||||
// 单透
|
// 单透
|
||||||
case "7":
|
case "7":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10};
|
||||||
danjia = 75;
|
prices = new double[]{75, 65, 55};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 45;
|
||||||
danjia = 65;
|
min_price = 100;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 55;
|
|
||||||
} else {
|
|
||||||
danjia = 45;
|
|
||||||
}
|
|
||||||
price = area * danjia > 100 ? area * danjia : 100;
|
|
||||||
break;
|
break;
|
||||||
// 静电贴
|
// 静电贴
|
||||||
case "8":
|
case "8":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 1) {
|
areas = new double[]{1, 2, 5, 10};
|
||||||
danjia = 70;
|
prices = new double[]{70, 68, 65, 63};
|
||||||
} else if (area > 1 && area <= 2) {
|
last_price = 60;
|
||||||
danjia = 68;
|
min_price = 50;
|
||||||
} else if (area > 2 && area <= 5) {
|
|
||||||
danjia = 65;
|
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 63;
|
|
||||||
} else {
|
|
||||||
danjia = 60;
|
|
||||||
}
|
|
||||||
price = area * danjia > 50 ? area * danjia : 50;
|
|
||||||
break;
|
break;
|
||||||
// 软膜
|
// 软膜
|
||||||
case "14":
|
case "14":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 70;
|
prices = new double[]{70, 65};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 60;
|
||||||
danjia = 65;
|
min_price = 100;
|
||||||
} else {
|
|
||||||
danjia = 60;
|
|
||||||
}
|
|
||||||
price = area * danjia > 100 ? area * danjia : 100;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
||||||
break;
|
break;
|
||||||
// 地贴(复防滑膜)
|
// 地贴(复防滑膜)
|
||||||
case "15":
|
case "15":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 75;
|
prices = new double[]{75, 65};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 55;
|
||||||
danjia = 65;
|
min_price = 100;
|
||||||
} else {
|
|
||||||
danjia = 55;
|
|
||||||
}
|
|
||||||
price = area * danjia > 100 ? area * danjia : 100;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.113 * number));
|
||||||
break;
|
break;
|
||||||
// UV高透车贴(含白墨)
|
// UV高透车贴(含白墨)
|
||||||
case "16":
|
case "16":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 160;
|
prices = new double[]{160, 150};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 140;
|
||||||
danjia = 150;
|
min_price = 160;
|
||||||
} else {
|
|
||||||
danjia = 140;
|
|
||||||
}
|
|
||||||
price = area * danjia > 160 ? area * danjia : 160;
|
|
||||||
break;
|
break;
|
||||||
// UV高透车贴(不含白墨)
|
// UV高透车贴(不含白墨)
|
||||||
case "17":
|
case "17":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 150;
|
prices = new double[]{150, 140};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 130;
|
||||||
danjia = 140;
|
min_price = 160;
|
||||||
} else {
|
|
||||||
danjia = 130;
|
|
||||||
}
|
|
||||||
price = area * danjia > 160 ? area * danjia : 160;
|
|
||||||
break;
|
break;
|
||||||
// 高透贴
|
// 高透贴
|
||||||
case "18":
|
case "18":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 110;
|
prices = new double[]{110, 100};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 90;
|
||||||
danjia = 100;
|
min_price = 130;
|
||||||
} else {
|
|
||||||
danjia = 90;
|
|
||||||
}
|
|
||||||
price = area * danjia > 130 ? area * danjia : 130;
|
|
||||||
break;
|
break;
|
||||||
// 防撞条腰线UV透明喷膜(含白墨)
|
// 防撞条腰线UV透明喷膜(含白墨)
|
||||||
case "19":
|
case "19":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 130;
|
prices = new double[]{130, 130};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 110;
|
||||||
danjia = 130;
|
min_price = 80;
|
||||||
} else {
|
|
||||||
danjia = 110;
|
|
||||||
}
|
|
||||||
price = area * danjia > 80 ? area * danjia : 80;
|
|
||||||
break;
|
break;
|
||||||
// 防撞条腰线UV磨砂贴(含白墨)
|
// 防撞条腰线UV磨砂贴(含白墨)
|
||||||
case "20":
|
case "20":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 140;
|
prices = new double[]{140, 130};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 120;
|
||||||
danjia = 130;
|
min_price = 80;
|
||||||
} else {
|
|
||||||
danjia = 120;
|
|
||||||
}
|
|
||||||
price = area * danjia > 80 ? area * danjia : 80;
|
|
||||||
break;
|
break;
|
||||||
// 防撞条腰线粗哑膜磨砂贴(不含白墨)
|
// 防撞条腰线粗哑膜磨砂贴(不含白墨)
|
||||||
case "21":
|
case "21":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 115;
|
prices = new double[]{115, 105};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 100;
|
||||||
danjia = 105;
|
min_price = 80;
|
||||||
} else {
|
|
||||||
danjia = 100;
|
|
||||||
}
|
|
||||||
price = area * danjia > 80 ? area * danjia : 80;
|
|
||||||
break;
|
break;
|
||||||
// 防撞条腰线磨砂镂空(粗哑膜刻字)
|
// 防撞条腰线磨砂镂空(粗哑膜刻字)
|
||||||
case "22":
|
case "22":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 150;
|
prices = new double[]{150, 140};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 130;
|
||||||
danjia = 140;
|
min_price = 100;
|
||||||
} else {
|
|
||||||
danjia = 130;
|
|
||||||
}
|
|
||||||
price = area * danjia > 100 ? area * danjia : 100;
|
|
||||||
break;
|
break;
|
||||||
// 防撞条腰线即时贴刻字
|
// 防撞条腰线即时贴刻字
|
||||||
case "23":
|
case "23":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10};
|
||||||
danjia = 120;
|
prices = new double[]{120, 110};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 100;
|
||||||
danjia = 110;
|
min_price = 70;
|
||||||
} else {
|
|
||||||
danjia = 100;
|
|
||||||
}
|
|
||||||
price = area * danjia > 70 ? area * danjia : 70;
|
|
||||||
break;
|
break;
|
||||||
case "24":
|
case "24":
|
||||||
price = area * 380 > 380 ? area * 380 : 380;
|
price = area * 380 > 380 ? area * 380 : 380;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!"24".equals(kind2)) {
|
||||||
|
if (width * length < 40 * 50) {
|
||||||
|
price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
||||||
|
} else {
|
||||||
|
danjia = last_price;
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (area <= areas[i]) {
|
||||||
|
danjia = prices[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
price = Math.max(area * danjia, min_price);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
List<Product> list = new ArrayList<Product>();
|
List<Product> list = new ArrayList<Product>();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
// 价格 = 面积 * 单价 + (款数-1) * 40
|
// 价格 = 面积 * 单价 + (款数-1) * 40
|
||||||
if (number > 1) {
|
if (number > 1 && width * length >= 40 * 50) {
|
||||||
pro.setPrice(Math.ceil(price * number));
|
pro.setPrice(Math.ceil(price * number));
|
||||||
} else {
|
} else {
|
||||||
pro.setPrice(Math.ceil(price));
|
pro.setPrice(Math.ceil(price));
|
||||||
@@ -383,115 +328,96 @@ public class PosterPrice {
|
|||||||
* @param number
|
* @param number
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<Product> acountPrice02(String kind2, Double area, int count, Integer number) {
|
public List<Product> acountPrice02(String kind2, Double area, int count, Integer number, double width, double length) {
|
||||||
double price = 0.0;
|
double price = 0.0;
|
||||||
double danjia = 0.0;
|
double danjia = 0.0;
|
||||||
String weight = "0";
|
String weight = "0";
|
||||||
DecimalFormat DecimalFormat = new DecimalFormat("#.#####");
|
DecimalFormat DecimalFormat = new DecimalFormat("#.#####");
|
||||||
|
double[] areas = {};
|
||||||
|
double[] prices = {};
|
||||||
|
double last_price = 0;
|
||||||
|
double min_price = 0;
|
||||||
|
|
||||||
switch (kind2) {
|
switch (kind2) {
|
||||||
// 户外写真白胶(国产)
|
// 户外写真白胶(国产)
|
||||||
case "0":
|
case "0":
|
||||||
|
areas = new double[]{2, 5, 7, 8, 10, 20, 50};
|
||||||
|
prices = new double[]{55, 45, 40, 37, 31, 29, 27};
|
||||||
|
last_price = 26;
|
||||||
|
min_price = 50;
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area <= 2) {
|
|
||||||
danjia = 55;
|
|
||||||
} else if (area <= 5) {
|
|
||||||
danjia = 45;
|
|
||||||
} else if (area <= 7) {
|
|
||||||
danjia = 40;
|
|
||||||
} else if (area <= 8) {
|
|
||||||
danjia = 37;
|
|
||||||
} else if (area <= 10) {
|
|
||||||
danjia = 31;
|
|
||||||
} else if (area <= 20) {
|
|
||||||
danjia = 29;
|
|
||||||
} else if (area <= 50) {
|
|
||||||
danjia = 27;
|
|
||||||
} else {
|
|
||||||
danjia = 26;
|
|
||||||
}
|
|
||||||
price = area * danjia > 50 ? area * danjia : 50;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
||||||
break;
|
break;
|
||||||
// 户外写真黑胶(国产)
|
// 户外写真黑胶(国产)
|
||||||
case "1":
|
case "1":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 7, 8, 10, 20, 50};
|
||||||
danjia = 56;
|
prices = new double[]{55, 45, 40, 37, 31, 29, 27};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 26;
|
||||||
danjia = 45;
|
min_price = 50;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 36;
|
|
||||||
} else {
|
|
||||||
danjia = 30;
|
|
||||||
}
|
|
||||||
price = area * danjia > 50 ? area * danjia : 50;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.25 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.25 * number));
|
||||||
break;
|
break;
|
||||||
// 户外写真可移白胶、黑胶
|
// 户外写真可移白胶、黑胶
|
||||||
case "2":
|
case "2":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 60;
|
prices = new double[]{60, 55, 50};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 35;
|
||||||
danjia = 55;
|
min_price = 50;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 50;
|
|
||||||
} else {
|
|
||||||
danjia = 35;
|
|
||||||
}
|
|
||||||
price = area * danjia > 85 ? area * danjia : 85;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.14 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.14 * number));
|
||||||
break;
|
break;
|
||||||
// 户外写真喷膜
|
// 户外写真喷膜
|
||||||
case "3":
|
case "3":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 65;
|
prices = new double[]{65, 50, 45};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 35;
|
||||||
danjia = 50;
|
min_price = 80;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 45;
|
|
||||||
} else {
|
|
||||||
danjia = 35;
|
|
||||||
}
|
|
||||||
price = area * danjia > 80 ? area * danjia : 80;
|
|
||||||
break;
|
break;
|
||||||
// 户外写真灯片
|
// 户外写真灯片
|
||||||
case "5":
|
case "5":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 68;
|
prices = new double[]{68, 50, 40};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 30;
|
||||||
danjia = 50;
|
min_price = 90;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 40;
|
|
||||||
} else {
|
|
||||||
danjia = 30;
|
|
||||||
}
|
|
||||||
price = area * danjia > 90 ? area * danjia : 90;
|
|
||||||
break;
|
break;
|
||||||
// 车贴(白胶)
|
// 车贴(白胶)
|
||||||
case "6":
|
case "6":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 50;
|
prices = new double[]{50, 40, 30};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 25;
|
||||||
danjia = 40;
|
min_price = 80;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 30;
|
|
||||||
} else {
|
|
||||||
danjia = 25;
|
|
||||||
}
|
|
||||||
price = area * danjia > 80 ? area * danjia : 80;
|
|
||||||
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
weight = String.valueOf(DecimalFormat.format(area * 0.24 * number));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (width * length < 40 * 50) {
|
||||||
|
price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
||||||
|
} else {
|
||||||
|
danjia = last_price;
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (area <= areas[i]) {
|
||||||
|
danjia = prices[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
price = Math.max(area * danjia, min_price);
|
||||||
|
}
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
List<Product> list = new ArrayList<Product>();
|
List<Product> list = new ArrayList<Product>();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
// 价格 = 面积 * 单价 + (款数-1) * 40
|
// 价格 = 面积 * 单价 + (款数-1) * 40
|
||||||
pro.setPrice(Math.ceil(price * number));
|
if (number > 1 && width * length >= 40 * 50) {
|
||||||
|
pro.setPrice(Math.ceil(price * number));
|
||||||
|
} else {
|
||||||
|
pro.setPrice(Math.ceil(price));
|
||||||
|
}
|
||||||
pro.setWeight(weight);
|
pro.setWeight(weight);
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
return list;
|
return list;
|
||||||
@@ -513,45 +439,38 @@ public class PosterPrice {
|
|||||||
Integer number, String craftBu) {
|
Integer number, String craftBu) {
|
||||||
double price = 0.0;
|
double price = 0.0;
|
||||||
double danjia = 0.0;
|
double danjia = 0.0;
|
||||||
|
double[] areas = {};
|
||||||
|
double[] prices = {};
|
||||||
|
double last_price = 0;
|
||||||
|
double min_price = 0;
|
||||||
switch (kind2) {
|
switch (kind2) {
|
||||||
// 550灯布
|
// 550灯布
|
||||||
case "1":
|
case "1":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10,};
|
||||||
danjia = 30;
|
prices = new double[]{30, 28};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 25;
|
||||||
danjia = 28;
|
min_price = 60;
|
||||||
} else {
|
|
||||||
danjia = 25;
|
|
||||||
}
|
|
||||||
price = area * danjia > 60 ? area * danjia : 60;
|
|
||||||
break;
|
break;
|
||||||
// 黑底布
|
// 黑底布
|
||||||
case "2":
|
case "2":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 5) {
|
areas = new double[]{5, 10,};
|
||||||
danjia = 40;
|
prices = new double[]{40, 34};
|
||||||
} else if (area > 5 && area <= 10) {
|
last_price = 30;
|
||||||
danjia = 34;
|
min_price = 70;
|
||||||
} else {
|
|
||||||
danjia = 30;
|
|
||||||
}
|
|
||||||
price = area * danjia > 70 ? area * danjia : 70;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// 写真布
|
// 写真布
|
||||||
case "6":
|
case "6":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 30;
|
prices = new double[]{30, 28, 25};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 23;
|
||||||
danjia = 28;
|
min_price = 50;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 25;
|
|
||||||
} else {
|
|
||||||
danjia = 23;
|
|
||||||
}
|
|
||||||
price = area * danjia > 50 ? area * danjia : 50;
|
|
||||||
break;
|
break;
|
||||||
// 双喷布
|
// 双喷布
|
||||||
case "7":
|
case "7":
|
||||||
@@ -588,30 +507,20 @@ public class PosterPrice {
|
|||||||
// 油画布
|
// 油画布
|
||||||
case "8":
|
case "8":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 80;
|
prices = new double[]{80, 75, 60};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 35;
|
||||||
danjia = 75;
|
min_price = 130;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 60;
|
|
||||||
} else {
|
|
||||||
danjia = 35;
|
|
||||||
}
|
|
||||||
price = area * danjia > 130 ? area * danjia : 130;
|
|
||||||
break;
|
break;
|
||||||
// 墙纸
|
// 墙纸
|
||||||
case "9":
|
case "9":
|
||||||
// 根据面积得到单价
|
// 根据面积得到单价
|
||||||
if (area > 0 && area <= 2) {
|
areas = new double[]{2, 5, 10,};
|
||||||
danjia = 70;
|
prices = new double[]{70, 60, 50};
|
||||||
} else if (area > 2 && area <= 5) {
|
last_price = 35;
|
||||||
danjia = 60;
|
min_price = 105;
|
||||||
} else if (area > 5 && area <= 10) {
|
|
||||||
danjia = 50;
|
|
||||||
} else {
|
|
||||||
danjia = 35;
|
|
||||||
}
|
|
||||||
price = area * danjia > 105 ? area * danjia : 105;
|
|
||||||
break;
|
break;
|
||||||
// 旗帜布
|
// 旗帜布
|
||||||
case "10":
|
case "10":
|
||||||
@@ -671,10 +580,35 @@ public class PosterPrice {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!"7".equals(kind2) && !"10".equals(kind2)) {
|
||||||
|
if (width * length < 40 * 50) {
|
||||||
|
price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
||||||
|
} else {
|
||||||
|
danjia = last_price;
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (area <= areas[i]) {
|
||||||
|
danjia = prices[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
price = Math.max(area * danjia, min_price);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
List<Product> list = new ArrayList<Product>();
|
List<Product> list = new ArrayList<Product>();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
pro.setPrice(Math.ceil(price * number));
|
if (!"7".equals(kind2) && !"10".equals(kind2)) {
|
||||||
|
if (number > 1 && width * length >= 40 * 50) {
|
||||||
|
pro.setPrice(Math.ceil(price * number));
|
||||||
|
} else {
|
||||||
|
pro.setPrice(Math.ceil(price));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pro.setPrice(Math.ceil(price * number));
|
||||||
|
}
|
||||||
|
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,11 @@ public class PriceUtils {
|
|||||||
* @param area
|
* @param area
|
||||||
* @param count
|
* @param count
|
||||||
* @param craft
|
* @param craft
|
||||||
|
* @param tang
|
||||||
* @param yinbai
|
* @param yinbai
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<Product> rollLabelPrice(String kind, Double area, int count, String[] craft, String yinbai) {
|
public List<Product> rollLabelPrice(String kind, Double area, int count, String[] craft, String yinbai, String tang, double[] tangPrices) {
|
||||||
List<Product> list = new ArrayList<Product>();
|
List<Product> list = new ArrayList<Product>();
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
// 最低收费
|
// 最低收费
|
||||||
@@ -151,19 +152,30 @@ public class PriceUtils {
|
|||||||
if (!StringUtils.isEmpty(craft)) {
|
if (!StringUtils.isEmpty(craft)) {
|
||||||
if ("大雪花镭射膜".equals(craft[0])) {
|
if ("大雪花镭射膜".equals(craft[0])) {
|
||||||
danjia = danjia + 1;
|
danjia = danjia + 1;
|
||||||
|
} else if ("覆哑膜".equals(craft[0])) {
|
||||||
|
danjia = danjia + 0.8;
|
||||||
} else {
|
} else {
|
||||||
danjia = danjia + 0.6;
|
danjia = danjia + 0.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
price = Math
|
price = Math.ceil(Math.max(area * danjia + yinrPrice + count * 0.01, lowerPrice));
|
||||||
.ceil(area * danjia + yinrPrice + count * 0.01 > lowerPrice ? area * danjia + yinrPrice + count * 0.01
|
|
||||||
: lowerPrice);
|
|
||||||
// 如果有印白工艺:2元一平方,最低收费200元
|
// 如果有印白工艺:2元一平方,最低收费200元
|
||||||
if (!StringUtils.isEmpty(yinbai)) {
|
if (!StringUtils.isEmpty(yinbai)) {
|
||||||
price = price + (area * 2 > 200 ? area * 2 : 200);
|
price = price + (area * 2 > 200 ? area * 2 : 200);
|
||||||
}
|
}
|
||||||
|
double tang_price = 0;
|
||||||
|
|
||||||
|
if (!StringUtils.isEmpty(tang) && "烫金".equals(tang)) {
|
||||||
|
int[] bigCountArr = {500, 1000, 2000, 3000, 5000, 10000};
|
||||||
|
|
||||||
|
for (int i = 0; i < bigCountArr.length; i++) {
|
||||||
|
if (count >= bigCountArr[i]) {
|
||||||
|
tang_price = price + tangPrices[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
pro.setPrice(price);
|
pro.setPrice(Math.max(tang_price, price));
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3008,6 +3020,60 @@ public class PriceUtils {
|
|||||||
return price;
|
return price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getTestPrice(double length, double width, int count, int number,
|
||||||
|
double[] areas, double[] prices, double minPrice, double lastPrice) {
|
||||||
|
final int total = count * number;
|
||||||
|
|
||||||
|
for (int i = 1; i <= total; i++) {
|
||||||
|
double currentPrice = new PriceUtils().getOptimizedPrice(
|
||||||
|
length,
|
||||||
|
width,
|
||||||
|
i, // 当前数量
|
||||||
|
1, // number 参数固定为1
|
||||||
|
areas,
|
||||||
|
prices,
|
||||||
|
minPrice,
|
||||||
|
lastPrice
|
||||||
|
);
|
||||||
|
|
||||||
|
if (currentPrice > minPrice) {
|
||||||
|
// 计算累加价格:基础价 + 剩余项*6
|
||||||
|
return minPrice + (total - i + 1) * 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 未触发条件时返回基础最低价
|
||||||
|
return minPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getOptimizedPrice(double length, double width, int count, int number,
|
||||||
|
double[] areas, double[] prices, double minPrice, double lastPrice) {
|
||||||
|
final double area = length * width * count / 10000;
|
||||||
|
final boolean isSmallArea = area <= 0.2;
|
||||||
|
|
||||||
|
// 计算调整后的面积值
|
||||||
|
final double adjustedArea = isSmallArea ? area * number : area;
|
||||||
|
|
||||||
|
// 确定单价基准
|
||||||
|
double unitPrice = isSmallArea ? minPrice : lastPrice;
|
||||||
|
if (!isSmallArea) {
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (adjustedArea <= areas[i]) {
|
||||||
|
unitPrice = prices[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算基础价格
|
||||||
|
double basePrice = isSmallArea ? minPrice : adjustedArea * unitPrice;
|
||||||
|
|
||||||
|
// 应用数量系数
|
||||||
|
double finalPrice = (area > 0.2) ? basePrice * number : basePrice;
|
||||||
|
|
||||||
|
// 确保最低价格并取整
|
||||||
|
return Math.ceil(Math.max(finalPrice, minPrice));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 亚克力计算
|
* 亚克力计算
|
||||||
*
|
*
|
||||||
@@ -3124,50 +3190,54 @@ public class PriceUtils {
|
|||||||
* @param list
|
* @param list
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<Product> getDbPrice(String kind, Double width, Double length, int count, List<Product> list) {
|
public List<Product> getDbPrice(String kind, Double width, Double length, int count, List<Product> list, int number) {
|
||||||
//11-550灯布 12-520灯布 13-550黑底灯布
|
//11-550灯布 12-520灯布 13-550黑底灯布
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
double price = 0, dj = 0;
|
double price = 0, dj = 0;
|
||||||
double area = length * width * count;
|
double area = length * width * count / 10000;
|
||||||
if (kind.equals("11")) {
|
double[] areas = {};
|
||||||
if (area <= 5) {
|
double[] prices = {};
|
||||||
dj = 20;
|
double last_price = 0;
|
||||||
} else if (area <= 10) {
|
double min_price = 0;
|
||||||
dj = 18;
|
|
||||||
} else if (area > 10) {
|
if ("11".equals(kind)) {
|
||||||
dj = 17;
|
areas = new double[]{5, 10,};
|
||||||
}
|
prices = new double[]{20, 18};
|
||||||
} else if (kind.equals("12")) {
|
last_price = 17;
|
||||||
if (area <= 5) {
|
min_price = 55;
|
||||||
dj = 16;
|
|
||||||
} else if (area <= 10) {
|
} else if ("12".equals(kind)) {
|
||||||
dj = 12;
|
areas = new double[]{5, 10,};
|
||||||
} else if (area > 10) {
|
prices = new double[]{16, 12};
|
||||||
dj = 10;
|
last_price = 10;
|
||||||
}
|
min_price = 50;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (area <= 5) {
|
areas = new double[]{5, 10,};
|
||||||
dj = 24;
|
prices = new double[]{24, 20};
|
||||||
} else if (area <= 10) {
|
last_price = 18;
|
||||||
dj = 20;
|
min_price = 60;
|
||||||
} else if (area > 10) {
|
|
||||||
dj = 18;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (width * length < 40 * 50) {
|
||||||
price = area * dj;
|
price = new PriceUtils().getTestPrice(length, width, count, number, areas, prices, min_price, last_price);
|
||||||
if (area >= 7 && area <= 10) {
|
|
||||||
price = price * 0.9;
|
|
||||||
}
|
|
||||||
if (kind.equals("11")) {
|
|
||||||
price = Math.ceil(price > 55 ? price : 55);
|
|
||||||
} else if (kind.equals("12")) {
|
|
||||||
price = Math.ceil(price > 50 ? price : 50);
|
|
||||||
} else {
|
} else {
|
||||||
price = Math.ceil(price > 60 ? price : 60);
|
dj = last_price;
|
||||||
|
for (int i = 0; i < areas.length; i++) {
|
||||||
|
if (area <= areas[i]) {
|
||||||
|
dj = prices[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
price = Math.max(area * dj, min_price);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (number > 1 && width * length >= 40 * 50) {
|
||||||
|
pro.setPrice(Math.ceil(price * number));
|
||||||
|
} else {
|
||||||
|
pro.setPrice(Math.ceil(price));
|
||||||
}
|
}
|
||||||
pro.setPrice(price);
|
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
list.add(pro);
|
list.add(pro);
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,19 @@ public class ZsPrice {
|
|||||||
price += num * 10;
|
price += num * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
price += 10 * number;
|
double desFee = 0;
|
||||||
|
if (dto.getP() == 1 || dto.getP() == 2 || dto.getP() == 3) {
|
||||||
|
desFee = 3;
|
||||||
|
} else if (dto.getP() == 4) {
|
||||||
|
desFee = 5;
|
||||||
|
} else if (dto.getP() == 5) {
|
||||||
|
desFee = 6;
|
||||||
|
} else {
|
||||||
|
desFee = 8;
|
||||||
|
}
|
||||||
|
price += desFee * (number - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
|
|||||||
@@ -0,0 +1,269 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8" %>
|
||||||
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
<%@include file="/views/common.jsp" %>
|
||||||
|
</head>
|
||||||
|
<!-- 防伪标 -->
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div class="big_box">
|
||||||
|
<div class="left_div">
|
||||||
|
<h1 class="h2">防伪标</h1> <span style="color:red;font-weight:700;"></span>
|
||||||
|
<hr>
|
||||||
|
<form class="layui-form">
|
||||||
|
<p>
|
||||||
|
材质
|
||||||
|
</p>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<select name="kindValue" id="kindValue" lay-filter="kindValue" class="select">
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="VOID哑银">VOID哑银</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="防伪标">
|
||||||
|
<p>
|
||||||
|
尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽 </span>
|
||||||
|
</p>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<input type="text" placeholder="格式:长*宽" name="size" id="size" class="layui-input"
|
||||||
|
autocomplete="off">
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
数量(个)
|
||||||
|
</p>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<select name="count" id="selectCount1" class="select">
|
||||||
|
<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>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
款数
|
||||||
|
</p>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1"
|
||||||
|
class="layui-input" lay-verify="number">
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
工艺
|
||||||
|
</p>
|
||||||
|
<div class="layui-input-block">裁切工艺:
|
||||||
|
<input type="checkbox" name="craft" lay-filter="switch" value="模切" title="模切" checked>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-block">覆膜工艺:
|
||||||
|
<input type="checkbox" name="craft" lay-filter="switch" value="亮膜" title="亮膜" checked>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
<h2>计算结果-
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult"
|
||||||
|
onclick="copyResult()">点击复制
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
||||||
|
<%@include file="../acountExpressFee.jsp" %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="right_div" style="margin-left:50px;">
|
||||||
|
<div class="layui-carousel" id="test1">
|
||||||
|
<div carousel-item id="carousel"></div>
|
||||||
|
<br>
|
||||||
|
<div id="remark" style="font-size:20px;color:red"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script src="../../js/carousel.js" charset="utf-8"></script>
|
||||||
|
<%@include file="/views/copyResult.jsp" %>
|
||||||
|
<script>
|
||||||
|
layui.use(['table', 'form', 'carousel'], function () {
|
||||||
|
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||||
|
var carousel = layui.carousel;
|
||||||
|
var table = layui.table;
|
||||||
|
|
||||||
|
//建造实例
|
||||||
|
ins = carousel.render({});
|
||||||
|
|
||||||
|
function getProductImage(craft) {
|
||||||
|
|
||||||
|
$("#carousel").empty();
|
||||||
|
$("#remark").empty();
|
||||||
|
let data = {proTypeValue: "防伪标"}
|
||||||
|
let remark = "";
|
||||||
|
let html = "";
|
||||||
|
let kindValue = $("select[name='kindValue'] option:selected").val();
|
||||||
|
if (!!kindValue) {
|
||||||
|
data.kindValue = kindValue;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: "${pageContext.request.contextPath}/getImgs",
|
||||||
|
type: "GET",
|
||||||
|
data,
|
||||||
|
//dataType : "json",
|
||||||
|
success: function (result) {
|
||||||
|
for (let i = 0; i < result.length; i++) {
|
||||||
|
// 只留一个remark
|
||||||
|
remark = "";
|
||||||
|
html += '<div><img style="width:' + result[0].imgWidth + 'px" src="' + result[i].imgUrl + '"></div>';
|
||||||
|
remark += '<div><span>' + result[0].remark + '<span/></div>';
|
||||||
|
}
|
||||||
|
$("#carousel").append(html);
|
||||||
|
// 如果没有说明,就不显示null
|
||||||
|
if (remark.indexOf("null") < 0) {
|
||||||
|
$("#remark").append(remark);
|
||||||
|
}
|
||||||
|
// 如果没有轮播图就隐藏
|
||||||
|
if (result.length == 0) {
|
||||||
|
document.getElementById("test1").style.display = "none"; //隐藏
|
||||||
|
} else {
|
||||||
|
document.getElementById("test1").style.display = "block"; //显示
|
||||||
|
ins.reload({
|
||||||
|
elem: '#test1',
|
||||||
|
width: result[0].imgWidth, //设置容器宽度
|
||||||
|
height: result[0].imgHeight
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
form.on("select(kindValue)", (data) => {
|
||||||
|
getProductImage();
|
||||||
|
})
|
||||||
|
form.on("checkbox(switch)", (data) => {
|
||||||
|
let arr = []
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is("disabled")) {
|
||||||
|
arr.push($(this).val())
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
getProductImage(data.elem.checked ? data.value : '');
|
||||||
|
})
|
||||||
|
|
||||||
|
// 点击计算,计算价格
|
||||||
|
form.on('submit(acount_btn)', function (data) {
|
||||||
|
|
||||||
|
let size = $("#size").val();
|
||||||
|
let count = $("#count").val();
|
||||||
|
|
||||||
|
if (!size) {
|
||||||
|
layer.msg('请输入尺寸!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size.split("*")[0] < 6 || size.split("*")[1] < 6) {
|
||||||
|
layer.msg('防伪标最小尺寸6*6cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) {
|
||||||
|
layer.msg('防伪标最大尺寸42*28.5cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: "${path}/getThanSum",
|
||||||
|
type: "GET",
|
||||||
|
data: $(".big_box form").serialize(),
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == 100) {
|
||||||
|
layer.msg(result.msg, {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let arr = [];
|
||||||
|
let data = result.data.proList;
|
||||||
|
let kind = $("select[name='kindValue'] option:selected").val();
|
||||||
|
let number = $("#number").val();
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is("disabled")) {
|
||||||
|
arr.push($(this).val())
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
let span_result = '防伪标' + kind + ' - ' + size + ' 厘米 -(同款内容)\n' + "工艺 :" + arr.join(",") + "\n";
|
||||||
|
|
||||||
|
if (number > 1) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
||||||
|
data[i].number = number;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
||||||
|
data[i].number = number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
||||||
|
$("#span_result").val(span_result);
|
||||||
|
|
||||||
|
getRemark($("#proTypeValue").val(), size, count, kind, number, arr, "");
|
||||||
|
//计算完自动复制文本
|
||||||
|
var e = document.getElementById("span_result");//对象是content
|
||||||
|
if (e.value != "") {
|
||||||
|
e.select();//选择对象
|
||||||
|
document.execCommand("Copy");//执行浏览器复制命令
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成表格
|
||||||
|
table.render({
|
||||||
|
elem: '#priceTable',
|
||||||
|
even: true, //隔行变色
|
||||||
|
data: data, // 赋值已知数据
|
||||||
|
width: 500,
|
||||||
|
cols: [[
|
||||||
|
{
|
||||||
|
field: 'number',
|
||||||
|
width: '12%',
|
||||||
|
align: "center",
|
||||||
|
title: '款数'
|
||||||
|
}, {
|
||||||
|
field: 'count',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '数量'
|
||||||
|
}, {
|
||||||
|
field: 'price',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '报价'
|
||||||
|
}, {
|
||||||
|
field: 'weight',
|
||||||
|
width: '21%',
|
||||||
|
align: "center",
|
||||||
|
title: '重量(kg)'
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
done: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -36,7 +36,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<!--<input type="radio" name="kindValue" lay-filter="kindValue" value="3" title="350克铜版纸" checked>-->
|
<!--<input type="radio" name="kindValue" lay-filter="kindValue" value="3" title="350克铜版纸" checked>-->
|
||||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="6" title="600克铜版纸" checked>
|
<input type="radio" name="kindValue" lay-filter="kindValue" value="6" title="600克铜版纸" checked>
|
||||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="4" title="900克双胶纸" checked>
|
<input type="radio" name="kindValue" lay-filter="kindValue" value="4" title="900克双胶纸">
|
||||||
|
<input type="radio" name="kindValue" lay-filter="kindValue" value="10" title="轻羽(1.5mm厚度)">
|
||||||
|
<input type="radio" name="kindValue" lay-filter="kindValue" value="11" title="简单(1.0mm厚度)">
|
||||||
</div>
|
</div>
|
||||||
<div class="tagOther">
|
<div class="tagOther">
|
||||||
<p>
|
<p>
|
||||||
@@ -49,7 +51,7 @@
|
|||||||
<p>
|
<p>
|
||||||
数量(张)
|
数量(张)
|
||||||
</p>
|
</p>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item diycount">
|
||||||
<select name="count" class="select">
|
<select name="count" class="select">
|
||||||
<option value="1000">1000</option>
|
<option value="1000">1000</option>
|
||||||
<option value="2000">2000</option>
|
<option value="2000">2000</option>
|
||||||
@@ -57,6 +59,15 @@
|
|||||||
<option value="10000">10000</option>
|
<option value="10000">10000</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item fixcount" style="display: none">
|
||||||
|
<select name="count" class="select">
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="200">200</option>
|
||||||
|
<option value="500">500</option>
|
||||||
|
<option value="1000">1000</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<p>款数</p>
|
<p>款数</p>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<input type="text" placeholder="请输入整数" autocomplete="off"
|
<input type="text" placeholder="请输入整数" autocomplete="off"
|
||||||
@@ -69,30 +80,67 @@
|
|||||||
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
||||||
class="layui-input">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<div class="layui-form-item diycount" id="diycount">
|
||||||
工艺
|
<p>
|
||||||
</p>
|
工艺
|
||||||
<div class="layui-input-block">
|
</p>
|
||||||
<input type="radio" name="craftQie" lay-filter="craftQie" value="异形模切" title="异形模切" checked>
|
<div class="layui-input-block">
|
||||||
|
|
<input type="radio" name="craftQie" lay-filter="craftQie" value="异形模切" title="异形模切" checked>
|
||||||
<span>
|
|
|
||||||
|
<span>
|
||||||
<input type="radio" id="non" name="craftMo" lay-filter="craftMo" la value="不覆膜" title="不覆膜"
|
<input type="radio" id="non" name="craftMo" lay-filter="craftMo" la value="不覆膜" title="不覆膜"
|
||||||
checked>
|
checked>
|
||||||
</span>
|
</span>
|
||||||
<span style="display: none">
|
<span style="display: none">
|
||||||
<input type="radio" id="double" name="craftMo" lay-filter="craftMo" la value="双面覆哑膜"
|
<input type="radio" id="double" name="craftMo" lay-filter="craftMo" la value="双面覆哑膜"
|
||||||
title="双面覆哑膜">
|
title="双面覆哑膜">
|
||||||
</span>
|
</span>
|
||||||
|
|
|
|
||||||
<!--<span class="ui_gy_1">
|
<input type="radio" name="kind2Value" value="无" title="无" checked>
|
||||||
<input type="radio" name="craftTang" lay-filter="switch" value="无" title="无">
|
<input type="radio" name="kind2Value" value="单面烫黄金" title="单面烫黄金">
|
||||||
<input type="radio" name="craftTang" lay-filter="switch" value="单面烫金" title="单面烫金">
|
<input type="radio" name="kind2Value" value="单面凹凸" title="单面凹凸">
|
||||||
<input type="radio" name="craftTang" lay-filter="switch" value="双面烫金" title="双面烫金">
|
<input type="radio" name="kind2Value" value="单面烫黄金+凹凸" title="单面烫黄金+凹凸">
|
||||||
</span>-->
|
</div>
|
||||||
<input type="radio" name="kind2Value" value="无" title="无" checked>
|
</div>
|
||||||
<input type="radio" name="kind2Value" value="单面烫黄金" title="单面烫黄金">
|
<div class="layui-form-item fixcount" id="fixcount" style="display: none">
|
||||||
<input type="radio" name="kind2Value" value="单面凹凸" title="单面凹凸">
|
<p>
|
||||||
<input type="radio" name="kind2Value" value="单面烫黄金+凹凸" title="单面烫黄金+凹凸">
|
工艺
|
||||||
|
</p>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<span style="float:left;margin-top:10px">形状 : </span>
|
||||||
|
<input type="radio" name="aotu" value="圆形" title="圆形" checked>
|
||||||
|
<input type="radio" name="aotu" value="方形" title="方形">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<span style="float:left;margin-top:10px">无色压凹 : </span>
|
||||||
|
<input type="radio" name="craft" id="yaao" lay-filter="switch" value="无色压凹" title="无色压凹"
|
||||||
|
checked>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<span style="float:left;margin-top:10px">击凸 : </span>
|
||||||
|
<input type="radio" name="craft" lay-filter="switch" value="击凸" title="击凸">
|
||||||
|
<div style="display: none" id="jtcolor">
|
||||||
|
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="红色" title="红色" checked>
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="绿色" title="绿色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="紫色" title="紫色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="红褐色" title="红褐色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="金色" title="金色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="黑色" title="黑色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="青色" title="青色">
|
||||||
|
<input type="checkbox" name="jtcolor" lay-filter="color" value="洋红色" title="洋红色">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<span style="float:left;margin-top:10px">烫金 : </span>
|
||||||
|
<input type="radio" name="craft" lay-filter="switch" value="烫金" title="烫金">
|
||||||
|
<div style="display: none" id="tangcolor">
|
||||||
|
<input type="radio" name="tcolor" value="黑色" title="黑色" checked>
|
||||||
|
<input type="radio" name="tcolor" value="金色" title="金色">
|
||||||
|
<input type="radio" name="tcolor" value="红色" title="红色">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -109,10 +157,6 @@
|
|||||||
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
||||||
<%@include file="../acountExpressFee.jsp" %>
|
<%@include file="../acountExpressFee.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
<!--<h2>下单备注-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyBz()">点击复制</button></h2>
|
|
||||||
<div>
|
|
||||||
<textarea rows="5" cols="75" id="bz_result" readonly="readonly"></textarea>
|
|
||||||
</div>-->
|
|
||||||
<div>
|
<div>
|
||||||
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
||||||
</div>
|
</div>
|
||||||
@@ -134,48 +178,78 @@
|
|||||||
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
|
|
||||||
/*form.on('checkbox(switch)', function(data) {
|
|
||||||
// 压痕压点线只能选一个
|
|
||||||
var tangLen = $(".tang:checked").length;
|
|
||||||
if (tangLen > 1) {
|
|
||||||
$(data.elem).next().attr("class","layui-unselect layui-form-checkbox");
|
|
||||||
$(data.elem).prop("checked", false);
|
|
||||||
layer.msg('[单面 - 双面]不能同时选择!', {offset : [ '300px', '300px' ]}, {icon : 5});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}) */
|
|
||||||
|
|
||||||
form.on('radio(kindValue)', function (kindValueData) {
|
form.on('radio(kindValue)', function (kindValueData) {
|
||||||
if (kindValueData.value == '3') {
|
$(".diycount").hide();
|
||||||
$(".ui_gy_1").show();
|
$(".diycount").find(":input").attr("disabled", true);
|
||||||
$(".ui_gy_2").hide();
|
$(".diycount").find("select").attr("disabled", true);
|
||||||
|
$(".fixcount").hide();
|
||||||
|
$(".fixcount").find(":input").attr("disabled", true);
|
||||||
|
$(".fixcount").find("select").attr("disabled", true);
|
||||||
|
$("#jtcolor").hide();
|
||||||
|
$("#tangcolor").hide();
|
||||||
|
$("#yaao").prop("checked", true);
|
||||||
|
$("#size").val("").prop("readonly", false);
|
||||||
|
if (kindValueData.value == 10 || kindValueData.value == 11) {
|
||||||
|
$(".fixcount").show();
|
||||||
|
$(".fixcount").find(":input").attr("disabled", false);
|
||||||
|
$(".fixcount").find("select").attr("disabled", false);
|
||||||
|
$("#size").val("9*9").prop("readonly", true);
|
||||||
} else {
|
} else {
|
||||||
$(".ui_gy_1").hide();
|
$(".diycount").show();
|
||||||
$(".ui_gy_2").show();
|
$(".diycount").find(":input").attr("disabled", false);
|
||||||
|
$(".diycount").find("select").attr("disabled", false);
|
||||||
|
if (kindValueData.value == '3') {
|
||||||
|
$(".ui_gy_1").show();
|
||||||
|
$(".ui_gy_2").hide();
|
||||||
|
} else {
|
||||||
|
$(".ui_gy_1").hide();
|
||||||
|
$(".ui_gy_2").show();
|
||||||
|
|
||||||
if (kindValueData.value == '4') {
|
if (kindValueData.value == '4') {
|
||||||
$('#double').prop('checked', false);
|
$('#double').prop('checked', false);
|
||||||
$('#non').prop('checked', true);
|
$('#non').prop('checked', true);
|
||||||
$("#double").parent('span').hide();
|
$("#double").parent('span').hide();
|
||||||
$('#non').parent('span').show();
|
$('#non').parent('span').show();
|
||||||
}
|
}
|
||||||
if (kindValueData.value == '6') {
|
if (kindValueData.value == '6') {
|
||||||
$('#double').prop('checked', true);
|
$('#double').prop('checked', true);
|
||||||
$('#non').prop('checked', false);
|
$('#non').prop('checked', false);
|
||||||
$('#non').parent('span').hide();
|
$('#non').parent('span').hide();
|
||||||
$("#double").parent('span').show();
|
$("#double").parent('span').show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
form.render();
|
form.render();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
form.on("radio(switch)", function (data) {
|
||||||
|
$("#jtcolor").hide();
|
||||||
|
$("#jtcolor").find(":input").attr("disabled", true);
|
||||||
|
$("#tangcolor").hide();
|
||||||
|
$("#tangcolor").find(":input").attr("disabled", true);
|
||||||
|
if ($(data.elem).is(":checked") && data.value == "击凸") {
|
||||||
|
$("#jtcolor").show();
|
||||||
|
$("#jtcolor").find(":input").attr("disabled", false);
|
||||||
|
}
|
||||||
|
if ($(data.elem).is(":checked") && data.value == "烫金") {
|
||||||
|
$("#tangcolor").show();
|
||||||
|
$("#tangcolor").find(":input").attr("disabled", false);
|
||||||
|
}
|
||||||
|
form.render();
|
||||||
|
});
|
||||||
|
form.on("checkbox(color)", function (data) {
|
||||||
|
if ($("input[name='jtcolor']:checked").length > 2) {
|
||||||
|
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
||||||
|
$(data.elem).prop("checked", false);
|
||||||
|
layer.msg('击凸颜色最多选择两个!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 点击计算,计算价格
|
// 点击计算,计算价格
|
||||||
form.on('submit(acount_btn)', function (data) {
|
form.on('submit(acount_btn)', function (data) {
|
||||||
/* var wangwang = $("#wangwang").val();
|
|
||||||
if(wangwang == ""){
|
|
||||||
layer.msg("请填写客户旺旺号!",{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
} */
|
|
||||||
// 选中‘自定义数量’
|
// 选中‘自定义数量’
|
||||||
var kindValue = $('input[name="kindValue"]:checked').val();
|
var kindValue = $('input[name="kindValue"]:checked').val();
|
||||||
var craftQie = $('input[name="craftQie"]:checked').val();
|
var craftQie = $('input[name="craftQie"]:checked').val();
|
||||||
@@ -222,12 +296,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let craft = $("input[name='craft']:checked").val();
|
||||||
|
if (craft == "击凸" && $("input[name='jtcolor']:checked").length == 0) {
|
||||||
|
layer.msg("【击凸】颜色必须选一个!", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var number = $("#number").val();
|
var number = $("#number").val();
|
||||||
kindValueData = {
|
kindValueData = {
|
||||||
3: "350克铜版纸",
|
3: "350克铜版纸",
|
||||||
6: "600克铜版纸",
|
6: "600克铜版纸",
|
||||||
4: "900克双胶纸"
|
4: "900克双胶纸",
|
||||||
|
10: "轻羽",
|
||||||
|
11: "简单"
|
||||||
};
|
};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "${path}/getThanSum",
|
url: "${path}/getThanSum",
|
||||||
@@ -241,7 +322,26 @@
|
|||||||
}
|
}
|
||||||
var data = result.data.proList;
|
var data = result.data.proList;
|
||||||
|
|
||||||
var span_result = '杯垫 - ' + kindValueData[kindValue] + ' - ' + size + '厘米\n' + "工艺: " + craftQie + ', ' + arr + "\n";
|
var span_result = '杯垫 - ' + kindValueData[kindValue] + ' - ' + size + '厘米\n'
|
||||||
|
if (kindValue == "3" || kindValue == "4" || kindValue == "6") {
|
||||||
|
span_result += "工艺: " + craftQie + ', ' + arr + "\n";
|
||||||
|
} else {
|
||||||
|
let aotu = $("input[name='aotu']:checked").val();
|
||||||
|
let craft = $("input[name='craft']:checked").val();
|
||||||
|
let craft_list = [aotu, craft];
|
||||||
|
|
||||||
|
if (craft == "击凸") {
|
||||||
|
let ys = $("input[name='jtcolor']:checked");
|
||||||
|
ys.each(item => {
|
||||||
|
craft_list.push($(ys[item]).val());
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (craft == "烫金") {
|
||||||
|
let ys = $("input[name='tcolor']:checked").val();
|
||||||
|
craft_list.push(ys);
|
||||||
|
}
|
||||||
|
span_result += "工艺: " + craft_list.join(",") + "\n";
|
||||||
|
}
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
||||||
|
|||||||
@@ -1,311 +1,334 @@
|
|||||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
pageEncoding="UTF-8"%>
|
pageEncoding="UTF-8" %>
|
||||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Insert title here</title>
|
<title>Insert title here</title>
|
||||||
<%@include file="/views/common.jsp"%>
|
<%@include file="/views/common.jsp" %>
|
||||||
</head>
|
</head>
|
||||||
<!--桌贴 -->
|
<!--桌贴 -->
|
||||||
<style>
|
<style>
|
||||||
.edge .layui-edge{
|
.edge .layui-edge {
|
||||||
right:10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
.layui-form-checkbox[lay-skin=primary] i{
|
|
||||||
border-radius: 50px;
|
.layui-form-checkbox[lay-skin=primary] i {
|
||||||
width: 18px;
|
border-radius: 50px;
|
||||||
height: 18px;
|
width: 18px;
|
||||||
line-height: 18px;
|
height: 18px;
|
||||||
margin-top:3px;
|
line-height: 18px;
|
||||||
}
|
margin-top: 3px;
|
||||||
.layui-form-checkbox[lay-skin=primary] span{
|
}
|
||||||
color:black;
|
|
||||||
margin-top:3px;
|
.layui-form-checkbox[lay-skin=primary] span {
|
||||||
font-size: 14px;
|
color: black;
|
||||||
}
|
margin-top: 3px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div class="big_box">
|
<div class="big_box">
|
||||||
<div class="left_div">
|
<div class="left_div">
|
||||||
<h1 class="h1">桌贴</h1> <span style="color:red;font-weight:700;"></span>
|
<h1 class="h1">桌贴</h1> <span style="color:red;font-weight:700;"></span>
|
||||||
<hr>
|
<hr>
|
||||||
<form class="layui-form">
|
<form class="layui-form">
|
||||||
<input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="22" >
|
<input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="22">
|
||||||
<p>
|
<p>
|
||||||
材质
|
材质
|
||||||
</p>
|
</p>
|
||||||
<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" class="kindValue" value="0" title="0.38磨砂背胶" lay-filter="kindValue" checked="checked">
|
<input type="radio" name="kindValue" class="kindValue" value="0" title="0.38磨砂背胶"
|
||||||
<input type="radio" name="kindValue" class="kindValue" value="10" title="0.38亮光" lay-filter="kindValue">
|
lay-filter="kindValue" checked="checked">
|
||||||
<input type="radio" name="kindValue" class="kindValue" value="1" title="0.84磨砂背胶" lay-filter="kindValue" class="thanHide">
|
<input type="radio" name="kindValue" class="kindValue" value="10" title="0.38亮光"
|
||||||
<!-- <input type="radio" name="kindValue" class="kindValue" value="2" title="0.38PVC亮光异型卡片" lay-filter="kindValue"> -->
|
lay-filter="kindValue">
|
||||||
</div>
|
<input type="radio" name="kindValue" class="kindValue" value="1" title="0.84磨砂背胶"
|
||||||
</div>
|
lay-filter="kindValue" class="thanHide">
|
||||||
<p>
|
<!-- <input type="radio" name="kindValue" class="kindValue" value="2" title="0.38PVC亮光异型卡片" lay-filter="kindValue"> -->
|
||||||
尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
<div class="layui-form-item">
|
<p>
|
||||||
<input type="text" placeholder="格式:长*宽" name="size" id="size" class="layui-input" autocomplete="off">
|
尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
|
||||||
</div>
|
</p>
|
||||||
<!-- <div class="other"> -->
|
<div class="layui-form-item">
|
||||||
<p>
|
<input type="text" placeholder="格式:长*宽" name="size" id="size" class="layui-input" autocomplete="off">
|
||||||
数量(张)
|
</div>
|
||||||
</p>
|
<!-- <div class="other"> -->
|
||||||
<div class="layui-form-item">
|
<p>
|
||||||
<input type="text" placeholder="请输入整数" autocomplete="off" name="count" id="count" class="layui-input">
|
数量(张)
|
||||||
</div>
|
</p>
|
||||||
<!-- </div> -->
|
<div class="layui-form-item">
|
||||||
<!-- <div class="kindValue2">
|
<input type="text" placeholder="请输入整数" autocomplete="off" name="count" id="count" class="layui-input">
|
||||||
<p>
|
</div>
|
||||||
数量(张)
|
<p>
|
||||||
</p>
|
款数
|
||||||
<div class="layui-form-item">
|
</p>
|
||||||
<select name="count" class="select">
|
<div class="layui-form-item">
|
||||||
<option value="500">500</option>
|
<input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1"
|
||||||
<option value="1000">1000</option>
|
class="layui-input" lay-verify="number">
|
||||||
<option value="2000">2000</option>
|
</div>
|
||||||
<option value="3000">3000</option>
|
<p>
|
||||||
<option value="5000">5000</option>
|
客户旺旺
|
||||||
<option value="10000">10000</option>
|
</p>
|
||||||
</select>
|
<div class="layui-form-item">
|
||||||
</div>
|
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
||||||
</div> -->
|
class="layui-input">
|
||||||
<p>
|
</div>
|
||||||
款数
|
<div class="layui-form-item" id="ui_des" style="display:none;">
|
||||||
</p>
|
<p>
|
||||||
<div class="layui-form-item">
|
设计内容
|
||||||
<input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1" class="layui-input" lay-verify="number">
|
</p>
|
||||||
</div>
|
<select name="desType" lay-filter="desType" id="desType" class="select" lay-search>
|
||||||
<p>
|
<option value=""></option>
|
||||||
客户旺旺
|
<option value="1">改序号</option>
|
||||||
</p>
|
<option value="2">改名字</option>
|
||||||
<div class="layui-form-item">
|
<option value="3">改二维码</option>
|
||||||
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang" class="layui-input">
|
<option value="4">改图片</option>
|
||||||
</div>
|
<option value="5">改内容模板相同</option>
|
||||||
<p>工艺</p>
|
<option value="6" selected>改内容模板完全不同</option>
|
||||||
<input type="radio" class="craftKkind" name="craftJiao" value="圆角矩形" title="圆角矩形" checked="checked">
|
</select>
|
||||||
<span id="craftKkind">
|
</div>
|
||||||
<input type="radio" name="craftJiao" value="直角矩形" title="直角矩形" >
|
<p>工艺</p>
|
||||||
|
<input type="radio" class="craftKkind" name="craftJiao" value="圆角矩形" title="圆角矩形" checked="checked">
|
||||||
|
<span id="craftKkind">
|
||||||
|
<input type="radio" name="craftJiao" value="直角矩形" title="直角矩形">
|
||||||
<input type="radio" name="craftJiao" value="异形" title="异形">
|
<input type="radio" name="craftJiao" value="异形" title="异形">
|
||||||
</span>
|
</span>
|
||||||
<div><!-- class="kindValue2" -->
|
<div><!-- class="kindValue2" -->
|
||||||
<input type="radio" name="craftShua" value="单面" title="单面" checked="checked">
|
<input type="radio" name="craftShua" value="单面" title="单面" checked="checked">
|
||||||
<input type="radio" name="craftShua" value="双面" title="双面">
|
<input type="radio" name="craftShua" value="双面" title="双面">
|
||||||
<!-- <input type="checkbox" name="craft" value="背胶" title="背胶"> -->
|
<!-- <input type="checkbox" name="craft" value="背胶" title="背胶"> -->
|
||||||
</div>
|
</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>
|
||||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
</div>
|
</div>
|
||||||
<h2>计算结果-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyResult()">点击复制</button></h2>
|
<h2>计算结果-
|
||||||
<div>
|
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult"
|
||||||
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
onclick="copyResult()">点击复制
|
||||||
<%@include file="../acountExpressFee.jsp"%>
|
</button>
|
||||||
</div>
|
</h2>
|
||||||
<!--<h2>下单备注-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyBz()">点击复制</button></h2>
|
<div>
|
||||||
<div>
|
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
||||||
<textarea rows="5" cols="75" id="bz_result" readonly="readonly"></textarea>
|
<%@include file="../acountExpressFee.jsp" %>
|
||||||
</div>-->
|
</div>
|
||||||
<div >
|
<div>
|
||||||
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="right_div">
|
<div class="right_div">
|
||||||
<div class="layui-carousel" id="test1" >
|
<div class="layui-carousel" id="test1">
|
||||||
<div carousel-item id="carousel"></div>
|
<div carousel-item id="carousel"></div>
|
||||||
<br>
|
<br>
|
||||||
<div id="remark" style="font-size:20px;color:red"></div>
|
<div id="remark" style="font-size:20px;color:red"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script src="../../js/carousel.js" charset="utf-8"></script>
|
<script src="../../js/carousel.js" charset="utf-8"></script>
|
||||||
<%@include file="/views/copyResult.jsp"%>
|
<%@include file="/views/copyResult.jsp" %>
|
||||||
<script>
|
<script>
|
||||||
layui.use(['table','form','carousel'], function(){
|
layui.use(['table', 'form', 'carousel'], function () {
|
||||||
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||||
var carousel = layui.carousel;
|
var carousel = layui.carousel;
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
//建造实例
|
//建造实例
|
||||||
ins = carousel.render({});
|
ins = carousel.render({});
|
||||||
// 监听count输入框
|
// 监听count输入框
|
||||||
$(function(){
|
$(function () {
|
||||||
//输入框的值改变时触发
|
//输入框的值改变时触发
|
||||||
$("#count").on("input",function(e){
|
$("#count").on("input", function (e) {
|
||||||
//获取input输入的值
|
//获取input输入的值
|
||||||
if(e.delegateTarget.value > 100 && $('input[name="kindValue"]:checked').val() == "1"){
|
if (e.delegateTarget.value > 100 && $('input[name="kindValue"]:checked').val() == "1") {
|
||||||
layer.msg('超过100张请选择0.38磨砂背胶!',{offset:['300px','300px']},function(){});
|
layer.msg('超过100张请选择0.38磨砂背胶!', {offset: ['300px', '300px']}, function () {
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
//输入框的值改变时触发
|
});
|
||||||
$("#size").on("input",function(e){
|
//输入框的值改变时触发
|
||||||
//获取input输入的值
|
$("#size").on("input", function (e) {
|
||||||
if($('input[name="kindValue"]:checked').val() == "2"){
|
//获取input输入的值
|
||||||
if(e.delegateTarget.value.indexOf(".") != -1){
|
if ($('input[name="kindValue"]:checked').val() == "2") {
|
||||||
layer.msg('0.38PVC亮光异型卡片请输入整数尺寸!',{offset:['300px','300px']},function(){});
|
if (e.delegateTarget.value.indexOf(".") != -1) {
|
||||||
}
|
layer.msg('0.38PVC亮光异型卡片请输入整数尺寸!', {offset: ['300px', '300px']}, function () {
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 默认隐藏0.38PVC异形卡工艺
|
// 默认隐藏0.38PVC异形卡工艺
|
||||||
$(".kindValue2").hide();
|
$(".kindValue2").hide();
|
||||||
$(".kindValue2").find(":input").attr("disabled", true);
|
$(".kindValue2").find(":input").attr("disabled", true);
|
||||||
document.getElementById("craftKkind").style.display = "none"; //隐藏
|
document.getElementById("craftKkind").style.display = "none"; //隐藏
|
||||||
form.on('radio(kindValue)', function (data){
|
form.on('radio(kindValue)', function (data) {
|
||||||
if($("#count").val() > 100 && data.value == "1"){
|
if ($("#count").val() > 100 && data.value == "1") {
|
||||||
layer.msg('超过100张请选择0.38磨砂背胶!',{offset:['300px','300px']},function(){});
|
layer.msg('超过100张请选择0.38磨砂背胶!', {offset: ['300px', '300px']}, function () {
|
||||||
}else if($("#size").val().indexOf(".") != -1 && data.value == "2"){
|
});
|
||||||
layer.msg('0.38PVC亮光异型卡片请输入整数尺寸!',{offset:['300px','300px']},function(){});
|
} else if ($("#size").val().indexOf(".") != -1 && data.value == "2") {
|
||||||
}
|
layer.msg('0.38PVC亮光异型卡片请输入整数尺寸!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(data.value == "2"){
|
if (data.value == "2") {
|
||||||
$(".kindValue2").show();
|
$(".kindValue2").show();
|
||||||
$(".other").hide();
|
$(".other").hide();
|
||||||
$(".other").find(":input").attr("disabled", true);
|
$(".other").find(":input").attr("disabled", true);
|
||||||
$(".kindValue2").find(":input").attr("disabled", false);
|
$(".kindValue2").find(":input").attr("disabled", false);
|
||||||
document.getElementById("craftKkind").style.display = "inline-block"; //显示
|
document.getElementById("craftKkind").style.display = "inline-block"; //显示
|
||||||
}else{
|
} else {
|
||||||
$(".other").show();
|
$(".other").show();
|
||||||
$(".kindValue2").hide();
|
$(".kindValue2").hide();
|
||||||
$(".kindValue2").find(":input").attr("disabled", true);
|
$(".kindValue2").find(":input").attr("disabled", true);
|
||||||
$(".other").find(":input").attr("disabled", false);
|
$(".other").find(":input").attr("disabled", false);
|
||||||
document.getElementById("craftKkind").style.display = "none"; //隐藏
|
document.getElementById("craftKkind").style.display = "none"; //隐藏
|
||||||
}
|
}
|
||||||
// 切换的时候,选中【圆角矩形】
|
// 切换的时候,选中【圆角矩形】
|
||||||
$('input[class = craftKkind]').prop('checked', true);
|
$('input[class = craftKkind]').prop('checked', true);
|
||||||
form.render('radio');
|
form.render('radio');
|
||||||
})
|
})
|
||||||
|
});
|
||||||
|
$("#number").on("input", function (e) {
|
||||||
|
var number = e.delegateTarget.value;
|
||||||
|
if (number > 1) {
|
||||||
|
$("#ui_des").show();
|
||||||
|
} else {
|
||||||
|
$("#ui_des").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 点击计算,计算价格
|
||||||
|
form.on('submit(acount_btn)', function (data) {
|
||||||
|
var kindData = {
|
||||||
|
0: "0.38磨砂背胶",
|
||||||
|
10: "0.38亮光",
|
||||||
|
1: "0.84磨砂背胶",
|
||||||
|
2: "0.38PVC亮光异型卡片"
|
||||||
|
};
|
||||||
|
/* 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 number = $("#number").val();
|
||||||
|
var size = $("#size").val();
|
||||||
|
var count = $("#count").val();
|
||||||
|
var length = size.split("*")[0];
|
||||||
|
var width = size.split("*")[1];
|
||||||
|
if (!size) {
|
||||||
|
layer.msg('请填写尺寸!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if ((length > 43.5 || width > 43.5 && length > 30.1 || width > 30.1)) {
|
||||||
|
layer.msg("尺寸不能大于43.5*30.1 cm", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (kind == '0.84磨砂背胶' && count > 100) {
|
||||||
|
layer.msg('超过 100 张请选择0.38磨砂背胶!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
} else if (kind == '0.38PVC亮光异型卡片') {
|
||||||
|
if (size.split("*")[0] < 3 || size.split("*")[1] < 3) {
|
||||||
|
layer.msg("【0.38PVC亮光异型卡片】尺寸不能小于3*3 cm", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (size.indexOf(".") != -1) {
|
||||||
|
layer.msg('【0.38PVC亮光异型卡片】请输入整数尺寸!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((size.split("*")[0] > 40 || size.split("*")[1] > 45) && (size.split("*")[0] > 45 || size.split("*")[1] > 40)) {
|
||||||
|
layer.msg("【桌贴】尺寸不能超过43.5*38.5 cm", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
url: "${path}/getThanSum",
|
||||||
|
type: "GET",
|
||||||
|
data: $(".big_box form").serialize(),
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == 100) {
|
||||||
|
layer.msg(result.msg, {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var data = result.data.proList;
|
||||||
|
|
||||||
|
var span_result = '桌贴 - ' + kind + ' - ' + size + ' CM' + ' - ' + craftShua + ' - ' + craftJiao + '\n';
|
||||||
|
if (number > 1) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
||||||
|
data[i].number = number;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
span_result += number + '款 ' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
||||||
|
data[i].number = number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
||||||
|
$("#span_result").val(span_result);
|
||||||
|
|
||||||
|
craftShua += craftJiao;
|
||||||
|
getRemark("桌贴", size, count + "张", kind, number, craftShua, "");
|
||||||
|
//计算完自动复制文本
|
||||||
|
var e = document.getElementById("span_result");//对象是content
|
||||||
|
if (e.value != "") {
|
||||||
|
e.select();//选择对象
|
||||||
|
document.execCommand("Copy");//执行浏览器复制命令
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成表格
|
||||||
|
table.render({
|
||||||
|
elem: '#priceTable',
|
||||||
|
even: true, //隔行变色
|
||||||
|
data: data, // 赋值已知数据
|
||||||
|
width: 500,
|
||||||
|
cols: [[
|
||||||
|
{
|
||||||
|
field: 'number',
|
||||||
|
width: '12%',
|
||||||
|
align: "center",
|
||||||
|
title: '款数'
|
||||||
|
}, {
|
||||||
|
field: 'count',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '数量'
|
||||||
|
}, {
|
||||||
|
field: 'price',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '报价'
|
||||||
|
}, {
|
||||||
|
field: 'wangwang',
|
||||||
|
align: "center",
|
||||||
|
width: '16%',
|
||||||
|
title: '折扣价'
|
||||||
|
}, {
|
||||||
|
field: 'wangwang',
|
||||||
|
align: "center",
|
||||||
|
width: '19%',
|
||||||
|
title: '跳楼价'
|
||||||
|
}, {
|
||||||
|
field: 'weight',
|
||||||
|
width: '21%',
|
||||||
|
align: "center",
|
||||||
|
title: '重量(kg)'
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
done: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 点击计算,计算价格
|
|
||||||
form.on('submit(acount_btn)', function(data) {
|
|
||||||
var kindData={
|
|
||||||
0 :"0.38磨砂背胶",
|
|
||||||
10 :"0.38亮光",
|
|
||||||
1 :"0.84磨砂背胶",
|
|
||||||
2 :"0.38PVC亮光异型卡片"
|
|
||||||
};
|
|
||||||
/* 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 number= $("#number").val();
|
|
||||||
var size = $("#size").val();
|
|
||||||
var count = $("#count").val();
|
|
||||||
var length = size.split("*")[0];
|
|
||||||
var width = size.split("*")[1];
|
|
||||||
if(!size){
|
|
||||||
layer.msg('请填写尺寸!',{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}else{
|
|
||||||
if ((length > 43.5 || width > 43.5 && length > 30.1 || width > 30.1)) {
|
|
||||||
layer.msg("尺寸不能大于43.5*30.1 cm",{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(kind == '0.84磨砂背胶' && count >100){
|
|
||||||
layer.msg('超过 100 张请选择0.38磨砂背胶!',{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}else if(kind == '0.38PVC亮光异型卡片'){
|
|
||||||
if (size.split("*")[0] < 3 || size.split("*")[1] < 3) {
|
|
||||||
layer.msg("【0.38PVC亮光异型卡片】尺寸不能小于3*3 cm",{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(size.indexOf(".") != -1){
|
|
||||||
layer.msg('【0.38PVC亮光异型卡片】请输入整数尺寸!',{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((size.split("*")[0] > 40 || size.split("*")[1] > 45) && (size.split("*")[0] > 45 || size.split("*")[1] > 40)) {
|
|
||||||
layer.msg("【桌贴】尺寸不能超过43.5*38.5 cm",{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
url : "${path}/getThanSum",
|
|
||||||
type : "GET",
|
|
||||||
data : $(".big_box form").serialize(),
|
|
||||||
success : function(result) {
|
|
||||||
if(result.code == 100){
|
|
||||||
layer.msg(result.msg,{offset:['300px','300px']},function(){});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var data = result.data.proList;
|
|
||||||
|
|
||||||
var span_result = '桌贴 - ' + kind +' - '+ size +' CM' + ' - ' + craftShua + ' - ' + craftJiao +'\n';
|
|
||||||
if(number > 1){
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
|
||||||
data[i].number = number;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
span_result += number + '款 ' + data[i].count + "张,共" + data[i].price + "元" + '\n'
|
|
||||||
data[i].number = number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
|
||||||
$("#span_result").val(span_result);
|
|
||||||
|
|
||||||
craftShua += craftJiao;
|
|
||||||
getRemark("桌贴", size, count+"张", kind, number, craftShua, "");
|
|
||||||
//计算完自动复制文本
|
|
||||||
var e=document.getElementById("span_result");//对象是content
|
|
||||||
if (e.value != "") {
|
|
||||||
e.select();//选择对象
|
|
||||||
document.execCommand("Copy");//执行浏览器复制命令
|
|
||||||
}
|
|
||||||
|
|
||||||
//生成表格
|
|
||||||
table.render({
|
|
||||||
elem : '#priceTable',
|
|
||||||
even : true, //隔行变色
|
|
||||||
data : data, // 赋值已知数据
|
|
||||||
width : 500,
|
|
||||||
cols : [ [
|
|
||||||
{
|
|
||||||
field : 'number',
|
|
||||||
width : '12%',
|
|
||||||
align : "center",
|
|
||||||
title : '款数'
|
|
||||||
},{
|
|
||||||
field : 'count',
|
|
||||||
width : '16%',
|
|
||||||
align : "center",
|
|
||||||
title : '数量'
|
|
||||||
},{
|
|
||||||
field : 'price',
|
|
||||||
width : '16%',
|
|
||||||
align : "center",
|
|
||||||
title : '报价'
|
|
||||||
},{
|
|
||||||
field : 'wangwang',
|
|
||||||
align : "center",
|
|
||||||
width : '16%',
|
|
||||||
title : '折扣价'
|
|
||||||
},{
|
|
||||||
field : 'wangwang',
|
|
||||||
align : "center",
|
|
||||||
width : '19%',
|
|
||||||
title : '跳楼价'
|
|
||||||
},{
|
|
||||||
field : 'weight',
|
|
||||||
width : '21%',
|
|
||||||
align : "center",
|
|
||||||
title : '重量(kg)'
|
|
||||||
}
|
|
||||||
] ],
|
|
||||||
done: function () {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
@@ -1256,12 +1256,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (value == 1 && $("#kind2Value option:checked").val() == 8) {
|
|
||||||
if ($("#size").val().split("*")[0] < 1.5 || $("#size").val().split("*")[1] < 1.5) {
|
|
||||||
layer.msg('静电贴最小尺寸1.5*1.5cm!', {offset: ['300px', '300px']}, function () {
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value == 5) {
|
if (value == 5) {
|
||||||
@@ -1334,9 +1328,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value == 1) {
|
if (value == 1) {
|
||||||
if ($("select[name='kind2Value'] option:selected").val() != 24) {
|
if ($("select[name='kind2Value'] option:selected").val() == 8) {
|
||||||
|
if ($("#size").val().split("*")[0] < 4 || $("#size").val().split("*")[1] < 4) {
|
||||||
|
layer.msg('静电贴最小尺寸4*4cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (($("#size").val().split("*")[0] > 500 || $("#size").val().split("*")[1] > 58) && $("#size").val().split("*")[0] > 58 || $("#size").val().split("*")[1] > 500) {
|
||||||
|
layer.msg('静电贴最大尺寸500*58cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else if ($("select[name='kind2Value'] option:selected").val() != 24) {
|
||||||
if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
|
if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
|
||||||
layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸10*10CM!", {offset: ['300px', '300px']}, function () {
|
layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM!", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1347,8 +1352,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value == 2) {
|
if (value == 2) {
|
||||||
if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
|
if (size.split("*")[1] < 20 || size.split("*")[0] < 20) {
|
||||||
layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸10*10CM!", {offset: ['300px', '300px']}, function () {
|
layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM!", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,20 @@
|
|||||||
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
||||||
class="layui-input">
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item" id="ui_des" style="display:none;">
|
||||||
|
<p>
|
||||||
|
设计内容
|
||||||
|
</p>
|
||||||
|
<select name="desType" lay-filter="desType" id="desType" class="select" lay-search>
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="1">改序号</option>
|
||||||
|
<option value="2">改名字</option>
|
||||||
|
<option value="3">改二维码</option>
|
||||||
|
<option value="4">改图片</option>
|
||||||
|
<option value="5">改内容模板相同</option>
|
||||||
|
<option value="6" selected>改内容模板完全不同</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="craftDiv">
|
<div class="craftDiv">
|
||||||
<p>工艺</p>
|
<p>工艺</p>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@@ -199,7 +213,14 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
$("#number").on("input", function (e) {
|
||||||
|
var number = e.delegateTarget.value;
|
||||||
|
if (number > 1) {
|
||||||
|
$("#ui_des").show();
|
||||||
|
} else {
|
||||||
|
$("#ui_des").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
// 点击计算,计算价格
|
// 点击计算,计算价格
|
||||||
form.on('submit(acount_btn)', function (data) {
|
form.on('submit(acount_btn)', function (data) {
|
||||||
var kindValue = $("#kindValue option:checked").text();
|
var kindValue = $("#kindValue option:checked").text();
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<div class="layui-input-block check">
|
<div class="layui-input-block check">
|
||||||
<span style="float:left;margin-top:10px">覆膜 : </span>
|
<span style="float:left;margin-top:10px">覆膜 : </span>
|
||||||
<input type="checkbox" name="craft" class="fm" lay-filter="switch" value="覆膜" title="覆膜">
|
<input type="checkbox" name="craft" class="fm" lay-filter="switch" value="覆膜" title="覆膜">
|
||||||
<!-- <input type="checkbox" name="craft" class="fm" lay-filter="switch" value="覆哑膜" title="覆哑膜" > -->
|
<input type="checkbox" name="craft" class="fm" lay-filter="switch" value="覆哑膜" title="覆哑膜">
|
||||||
<input type="checkbox" name="craft" class="fm" lay-filter="switch" value="大雪花镭射膜" title="大雪花镭射膜">
|
<input type="checkbox" name="craft" class="fm" lay-filter="switch" value="大雪花镭射膜" title="大雪花镭射膜">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,6 +84,10 @@
|
|||||||
<span style="float:left;margin-top:10px">白墨 : </span>
|
<span style="float:left;margin-top:10px">白墨 : </span>
|
||||||
<input type="checkbox" class="yb" name="yinbai" lay-filter="switch" value="印白" title="印白">
|
<input type="checkbox" class="yb" name="yinbai" lay-filter="switch" value="印白" title="印白">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<span style="float:left;margin-top:10px">烫金 : </span>
|
||||||
|
<input type="checkbox" class="tang" name="craftTang" lay-filter="switch" value="烫金" title="烫金">
|
||||||
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<span style="float:left;margin-top:10px">卷芯 : </span>
|
<span style="float:left;margin-top:10px">卷芯 : </span>
|
||||||
<input type="radio" class="jc" name="jx" lay-filter="switch" value="7.5cm" title="7.5cm"
|
<input type="radio" class="jc" name="jx" lay-filter="switch" value="7.5cm" title="7.5cm"
|
||||||
@@ -233,13 +237,28 @@
|
|||||||
}
|
}
|
||||||
var data = result.data.proList;
|
var data = result.data.proList;
|
||||||
var span_result = "";
|
var span_result = "";
|
||||||
|
let craft_list = [];
|
||||||
if ($("#kindValue").val() == 0) {
|
if ($("#kindValue").val() == 0) {
|
||||||
jx = $("input[name='jx']:checked").val();
|
jx = $("input[name='jx']:checked").val();
|
||||||
span_result = kind + ' - ' + size + ' 厘米 -卷芯直径' + $("input[name='jx']:checked").val() + '出标方向' + $("input[name='cb']:checked").val() + '(同款内容)\n' + '款数 : ' + number + '\n';
|
span_result = kind + ' - ' + size + ' 厘米 -卷芯直径' + $("input[name='jx']:checked").val() + '出标方向' + $("input[name='cb']:checked").val() + '(同款内容)\n' + '款数 : ' + number + '\n';
|
||||||
} else {
|
} else {
|
||||||
span_result = kind + ' - ' + size + ' 厘米 -(同款内容)\n' + '款数 : ' + number + '\n';
|
span_result = kind + ' - ' + size + ' 厘米 -(同款内容)\n' + '款数 : ' + number + '\n';
|
||||||
}
|
}
|
||||||
|
let fm = $("input[name='craft']:checked").val();
|
||||||
|
if (!!fm) {
|
||||||
|
craft_list.push(fm);
|
||||||
|
}
|
||||||
|
let yb = $("input[name='yinbai']:checked").val();
|
||||||
|
if (!!yb) {
|
||||||
|
craft_list.push(yb);
|
||||||
|
}
|
||||||
|
let craftTang = $("input[name='craftTang']:checked").val();
|
||||||
|
if (!!craftTang) {
|
||||||
|
craft_list.push(craftTang);
|
||||||
|
}
|
||||||
|
if(craft_list.length > 0){
|
||||||
|
span_result += "工艺:" + craft_list.join(",") + '\n';
|
||||||
|
}
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user