新增抠图
This commit is contained in:
@@ -180,4 +180,6 @@ public class Product {
|
|||||||
private Double lengthVU;
|
private Double lengthVU;
|
||||||
private Double widthUV;
|
private Double widthUV;
|
||||||
|
|
||||||
|
private Integer cropNumber;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -307,10 +307,10 @@ public class ProductService {
|
|||||||
kind = "3";
|
kind = "3";
|
||||||
} else if ("封口贴铜版纸不干胶".equals(kind)) {
|
} else if ("封口贴铜版纸不干胶".equals(kind)) {
|
||||||
priceList = new PriceUtils().getFktPrice(number, priceList);
|
priceList = new PriceUtils().getFktPrice(number, priceList);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("双面印刷不干胶".equals(dto.getStickerKind())) {
|
} else if ("双面印刷不干胶".equals(dto.getStickerKind())) {
|
||||||
priceList = StickersDoublePrice.getPrice(length, width, count, number);
|
priceList = StickersDoublePrice.getPrice(length, width, count, number);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("插旗".equals(dto.getStickerKind())) {
|
} else if ("插旗".equals(dto.getStickerKind())) {
|
||||||
if ("铜版纸不干胶".equals(kind)) {
|
if ("铜版纸不干胶".equals(kind)) {
|
||||||
dto.setKindValue("0");
|
dto.setKindValue("0");
|
||||||
@@ -395,7 +395,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
// return priceList;
|
// return priceList;
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
product.setPrice(Math.ceil(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("13".equals(kind)) {
|
} else if ("13".equals(kind)) {
|
||||||
oldKind = "13";
|
oldKind = "13";
|
||||||
dto.setKindValue("2");
|
dto.setKindValue("2");
|
||||||
@@ -426,7 +426,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
|
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("15".equals(kind) || "16".equals(kind)) {
|
} else if ("15".equals(kind) || "16".equals(kind)) {
|
||||||
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
List<String> craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||||
|
|
||||||
@@ -459,7 +459,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
// 查询出来的价格集合
|
// 查询出来的价格集合
|
||||||
List<Product> stickersList = new ArrayList<Product>();
|
List<Product> stickersList = new ArrayList<Product>();
|
||||||
@@ -485,7 +485,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
stickersList = normalSticker(dto, kind, number, area, width, length, count, oldKind, stickersList);
|
stickersList = normalSticker(dto, kind, number, area, width, length, count, oldKind, stickersList);
|
||||||
if (stickersList == null) {
|
if (stickersList == null) {
|
||||||
return chucklePrice(role, stickersList);
|
return chucklePrice(role, stickersList, dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 把查出来的集合添加到priceList中
|
// 把查出来的集合添加到priceList中
|
||||||
@@ -635,12 +635,12 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "1":
|
case "1":
|
||||||
dto.setWidth(width);
|
dto.setWidth(width);
|
||||||
dto.setLength(length);
|
dto.setLength(length);
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 卷装标签
|
// 卷装标签
|
||||||
case "2":
|
case "2":
|
||||||
// 单个产品的面积
|
// 单个产品的面积
|
||||||
@@ -651,7 +651,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
|
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 插卡
|
// 插卡
|
||||||
case "3":
|
case "3":
|
||||||
// 菱形单面直角插牌
|
// 菱形单面直角插牌
|
||||||
@@ -717,7 +717,7 @@ public class ProductService {
|
|||||||
priceList.add(product);
|
priceList.add(product);
|
||||||
|
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
// 根据款数重新算价格/计算重量
|
// 根据款数重新算价格/计算重量
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -730,7 +730,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 优惠券
|
// 优惠券
|
||||||
case "4":
|
case "4":
|
||||||
if ("11".equals(dto.getKind())) {// 圣诞卡
|
if ("11".equals(dto.getKind())) {// 圣诞卡
|
||||||
@@ -921,7 +921,7 @@ public class ProductService {
|
|||||||
priceList.add(product);
|
priceList.add(product);
|
||||||
|
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
String[] kind_list = {"3", "4", "5", "7"};
|
String[] kind_list = {"3", "4", "5", "7"};
|
||||||
@@ -1173,7 +1173,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 吊牌300/600/800克
|
// 吊牌300/600/800克
|
||||||
case "吊牌":
|
case "吊牌":
|
||||||
// 自定义尺寸
|
// 自定义尺寸
|
||||||
@@ -1226,7 +1226,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 服装吊牌
|
// 服装吊牌
|
||||||
case "服装吊牌":
|
case "服装吊牌":
|
||||||
// 自定义尺寸
|
// 自定义尺寸
|
||||||
@@ -1441,7 +1441,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(String.valueOf(weight * area * product.getCount() * number));
|
product.setWeight(String.valueOf(weight * area * product.getCount() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 特价名片
|
// 特价名片
|
||||||
case "特价名片":
|
case "特价名片":
|
||||||
// 选了【自定义尺寸】
|
// 选了【自定义尺寸】
|
||||||
@@ -1479,7 +1479,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 名片-特种纸名片
|
// 名片-特种纸名片
|
||||||
case "特种纸名片":
|
case "特种纸名片":
|
||||||
double addPrice = 5;
|
double addPrice = 5;
|
||||||
@@ -1689,7 +1689,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.ceil(product.getPrice() + 0.2 * product.getCount() * number));
|
product.setPrice(Math.ceil(product.getPrice() + 0.2 * product.getCount() * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
||||||
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
||||||
// 出血(一边2毫米)
|
// 出血(一边2毫米)
|
||||||
@@ -1881,7 +1881,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(df.format(tzWei / 1000.0 * length * width * product.getCount() / 10000.0 * number));
|
product.setWeight(df.format(tzWei / 1000.0 * length * width * product.getCount() / 10000.0 * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 合版封套
|
// 合版封套
|
||||||
case "6":
|
case "6":
|
||||||
double lengthSize = dto.getLengthSize();
|
double lengthSize = dto.getLengthSize();
|
||||||
@@ -1930,7 +1930,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 房卡套
|
// 房卡套
|
||||||
case "7":
|
case "7":
|
||||||
lengthSize = dto.getLengthSize();
|
lengthSize = dto.getLengthSize();
|
||||||
@@ -1975,7 +1975,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 档案袋
|
// 档案袋
|
||||||
case "8":
|
case "8":
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
@@ -1991,11 +1991,11 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 彩色信封
|
// 彩色信封
|
||||||
case "9":
|
case "9":
|
||||||
priceList = getXinFengPrice(dto, width, length, kind, kind2);
|
priceList = getXinFengPrice(dto, width, length, kind, kind2);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 杯套
|
// 杯套
|
||||||
case "10":
|
case "10":
|
||||||
if ("5".equals(kind)) {
|
if ("5".equals(kind)) {
|
||||||
@@ -2017,7 +2017,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(number * 0.3 * product.getCount() / 10000 * length * width));
|
product.setWeight(df.format(number * 0.3 * product.getCount() / 10000 * length * width));
|
||||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
product.setPrice(Math.ceil(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("6".equals(kind)) {// 盲盒杯套价格
|
} else if ("6".equals(kind)) {// 盲盒杯套价格
|
||||||
dto.setPrice(1800.0);
|
dto.setPrice(1800.0);
|
||||||
priceList.add(dto);
|
priceList.add(dto);
|
||||||
@@ -2025,7 +2025,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(number * 0.3 * product.getCount() * 0.29 * 0.07));
|
product.setWeight(df.format(number * 0.3 * product.getCount() * 0.29 * 0.07));
|
||||||
product.setPrice(Math.ceil(product.getPrice() * number));
|
product.setPrice(Math.ceil(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("2".equals(kind)) {// 异形杯套价格计算
|
} else if ("2".equals(kind)) {// 异形杯套价格计算
|
||||||
priceList = new PriceUtils().getCupSetPrice(count);
|
priceList = new PriceUtils().getCupSetPrice(count);
|
||||||
} else {
|
} else {
|
||||||
@@ -2060,7 +2060,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() + number * 50));
|
product.setPrice(Math.floor(product.getPrice() + number * 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 牛皮纸手提袋
|
// 牛皮纸手提袋
|
||||||
case "11":
|
case "11":
|
||||||
List<Product> hanbagList = new ArrayList<Product>();
|
List<Product> hanbagList = new ArrayList<Product>();
|
||||||
@@ -2177,7 +2177,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format((width + height) * length * 2 * 0.25 * 1.5 * product.getCount() / 10000));
|
product.setWeight(df.format((width + height) * length * 2 * 0.25 * 1.5 * product.getCount() / 10000));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
double sizeLength = 0.0;
|
double sizeLength = 0.0;
|
||||||
double sizeWidth = 0.0;
|
double sizeWidth = 0.0;
|
||||||
@@ -2268,7 +2268,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 250克白牛皮纸
|
// 250克白牛皮纸
|
||||||
case "12":
|
case "12":
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
@@ -2309,7 +2309,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
product.setWeight(df.format(length / 1000 * height / 1000 * product.getCount() * 0.25 * 1.25));
|
product.setWeight(df.format(length / 1000 * height / 1000 * product.getCount() * 0.25 * 1.25));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 吊旗
|
// 吊旗
|
||||||
case "13":
|
case "13":
|
||||||
length = length * 10;
|
length = length * 10;
|
||||||
@@ -2362,7 +2362,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 宣传单
|
// 宣传单
|
||||||
case "14":
|
case "14":
|
||||||
length = length * 10;
|
length = length * 10;
|
||||||
@@ -2473,7 +2473,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight));
|
product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 腰封200克/157克
|
// 腰封200克/157克
|
||||||
case "15":
|
case "15":
|
||||||
// 腰封少数量走的是吊旗少数量的价格
|
// 腰封少数量走的是吊旗少数量的价格
|
||||||
@@ -2541,7 +2541,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "金属标":
|
case "金属标":
|
||||||
craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||||
|
|
||||||
@@ -2656,7 +2656,7 @@ public class ProductService {
|
|||||||
product.setPrice(product.getPrice() + 40 * Math.max(dto.getPo_number(), 1));
|
product.setPrice(product.getPrice() + 40 * Math.max(dto.getPo_number(), 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
}
|
}
|
||||||
if (length <= 2) {
|
if (length <= 2) {
|
||||||
length = 2.0;
|
length = 2.0;
|
||||||
@@ -2735,7 +2735,7 @@ public class ProductService {
|
|||||||
* product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; }
|
* product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; }
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "卡片少数量":
|
case "卡片少数量":
|
||||||
String crafts[] = dto.getCraft();
|
String crafts[] = dto.getCraft();
|
||||||
String craftShua = dto.getCraftShua();
|
String craftShua = dto.getCraftShua();
|
||||||
@@ -3189,7 +3189,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 便签本/联单
|
// 便签本/联单
|
||||||
case "16":
|
case "16":
|
||||||
length = length * 10;
|
length = length * 10;
|
||||||
@@ -3389,7 +3389,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 海报(款数*个数=个数)
|
// 海报(款数*个数=个数)
|
||||||
case "17":
|
case "17":
|
||||||
// 贡缎布
|
// 贡缎布
|
||||||
@@ -3404,7 +3404,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(df.format(0.165 * length * width * product.getCount() / 10000 * number));
|
product.setWeight(df.format(0.165 * length * width * product.getCount() / 10000 * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("6".equals(kind)) {// 条幅craftTiao
|
} else if ("6".equals(kind)) {// 条幅craftTiao
|
||||||
|
|
||||||
priceList = PriceUtils.bannerPrice(kind2, length, width, count, number, role);
|
priceList = PriceUtils.bannerPrice(kind2, length, width, count, number, role);
|
||||||
@@ -3458,7 +3458,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("5".equals(kind)) {// 刻字
|
} else if ("5".equals(kind)) {// 刻字
|
||||||
Product pro = new Product();
|
Product pro = new Product();
|
||||||
pro.setCount(count);
|
pro.setCount(count);
|
||||||
@@ -3473,7 +3473,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.ceil(product.getPrice() * 1.15));
|
product.setPrice(Math.ceil(product.getPrice() * 1.15));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
} else if ("11".equals(kind)) {
|
} else if ("11".equals(kind)) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -3676,7 +3676,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 扇子
|
// 扇子
|
||||||
case "18":
|
case "18":
|
||||||
if (dto.getKindValue().equals("5")) {
|
if (dto.getKindValue().equals("5")) {
|
||||||
@@ -3762,7 +3762,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(Double.valueOf(product.getWeight()) * number));
|
product.setWeight(df.format(Double.valueOf(product.getWeight()) * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 画册
|
// 画册
|
||||||
case "19":
|
case "19":
|
||||||
// 内页P数加上封面的4P
|
// 内页P数加上封面的4P
|
||||||
@@ -3812,7 +3812,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 包装盒
|
// 包装盒
|
||||||
case "20":
|
case "20":
|
||||||
// 厘米转成毫米
|
// 厘米转成毫米
|
||||||
@@ -3871,7 +3871,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 透明PVC名片
|
// 透明PVC名片
|
||||||
case "21":
|
case "21":
|
||||||
if (count <= 10000) {
|
if (count <= 10000) {
|
||||||
@@ -3892,7 +3892,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(0.38 * 0.0855 * 1.7 * 0.054 * product.getCount() * number));
|
product.setWeight(df.format(0.38 * 0.0855 * 1.7 * 0.054 * product.getCount() * number));
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 桌贴
|
// 桌贴
|
||||||
case "22":
|
case "22":
|
||||||
/*
|
/*
|
||||||
@@ -3912,7 +3912,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number));
|
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 0.38PVC亮光异型卡片
|
// 0.38PVC亮光异型卡片
|
||||||
case "PVC异型卡片":
|
case "PVC异型卡片":
|
||||||
// 印刷价格
|
// 印刷价格
|
||||||
@@ -3962,11 +3962,11 @@ public class ProductService {
|
|||||||
/*
|
/*
|
||||||
* if (priceList.get(0).getPrice() > priceList2.get(0).getPrice()) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList<Product>(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice()); priceList.add(product); }
|
* if (priceList.get(0).getPrice() > priceList2.get(0).getPrice()) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList<Product>(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice()); priceList.add(product); }
|
||||||
*/
|
*/
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 滴塑
|
// 滴塑
|
||||||
case "23":
|
case "23":
|
||||||
priceList = PriceUtils.getDisuPrice(priceList, width, length, count, number, dto);
|
priceList = PriceUtils.getDisuPrice(priceList, width, length, count, number, dto);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 透明PVC名片---会员卡
|
// 透明PVC名片---会员卡
|
||||||
case "24":
|
case "24":
|
||||||
if (count <= 10000) {
|
if (count <= 10000) {
|
||||||
@@ -3988,7 +3988,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(0.76 * 1.3 * 0.0855 * 0.054 * product.getCount() * number));
|
product.setWeight(df.format(0.76 * 1.3 * 0.0855 * 0.054 * product.getCount() * number));
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 卡片-门挂牌
|
// 卡片-门挂牌
|
||||||
case "25":
|
case "25":
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
@@ -4017,7 +4017,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 毕业证书
|
// 毕业证书
|
||||||
case "26":
|
case "26":
|
||||||
priceList = new PriceUtils().getDiploma(count);
|
priceList = new PriceUtils().getDiploma(count);
|
||||||
@@ -4025,11 +4025,11 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 暖心贴
|
// 暖心贴
|
||||||
case "27":
|
case "27":
|
||||||
priceList = getWarmStickerPrice(dto, width, length);
|
priceList = getWarmStickerPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 彩色信纸
|
// 彩色信纸
|
||||||
case "彩色信纸":
|
case "彩色信纸":
|
||||||
length = length * 10;
|
length = length * 10;
|
||||||
@@ -4066,7 +4066,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
// 复印纸
|
// 复印纸
|
||||||
case "复印纸":
|
case "复印纸":
|
||||||
priceList = new PriceUtils().getCopyPaper(kind, kind2, kind3, count, size);
|
priceList = new PriceUtils().getCopyPaper(kind, kind2, kind3, count, size);
|
||||||
@@ -4074,10 +4074,10 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "婚礼卡":
|
case "婚礼卡":
|
||||||
priceList = new PriceUtils().getWeddingCardPrice(length, width, count, number, dto.getCraftMo(), dto.getCraftShua());
|
priceList = new PriceUtils().getWeddingCardPrice(length, width, count, number, dto.getCraftMo(), dto.getCraftShua());
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "刮刮卡":
|
case "刮刮卡":
|
||||||
// 选了【自定义尺寸】
|
// 选了【自定义尺寸】
|
||||||
if (dto.isSwitchSize()) {
|
if (dto.isSwitchSize()) {
|
||||||
@@ -4140,7 +4140,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "66":
|
case "66":
|
||||||
String craftTang = dto.getCraftTang().replace("双面烫银", "双面烫金");
|
String craftTang = dto.getCraftTang().replace("双面烫银", "双面烫金");
|
||||||
if (!kind.equals("500克黑卡")) {
|
if (!kind.equals("500克黑卡")) {
|
||||||
@@ -4169,7 +4169,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
product.setWeight(df.format(0.09 * 0.054 * product.getCount() * number));
|
product.setWeight(df.format(0.09 * 0.054 * product.getCount() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "餐垫纸":
|
case "餐垫纸":
|
||||||
priceList = new PriceUtils().getPlaceMatPrice(kind, length, width, count);
|
priceList = new PriceUtils().getPlaceMatPrice(kind, length, width, count);
|
||||||
craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||||
@@ -4187,7 +4187,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.ceil(product.getPrice() * 1.9));
|
product.setPrice(Math.ceil(product.getPrice() * 1.9));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "节目单":
|
case "节目单":
|
||||||
priceList = productMapper.getThanPrice(dto);
|
priceList = productMapper.getThanPrice(dto);
|
||||||
if (StringUtils.isEmpty(dto.getCraft())) {
|
if (StringUtils.isEmpty(dto.getCraft())) {
|
||||||
@@ -4200,7 +4200,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "硫酸纸吊牌":
|
case "硫酸纸吊牌":
|
||||||
priceList = new PriceUtils().getAcidTagsPrice(length, width, dto.getSize1(), count);
|
priceList = new PriceUtils().getAcidTagsPrice(length, width, dto.getSize1(), count);
|
||||||
// 根据款数重新算价格
|
// 根据款数重新算价格
|
||||||
@@ -4218,25 +4218,25 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(product.getCount() * number * (0.135 * area + area1 * 0.3)));
|
product.setWeight(df.format(product.getCount() * number * (0.135 * area + area1 * 0.3)));
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "杯垫":
|
case "杯垫":
|
||||||
priceList = getBeiDianPrice(dto, width, length, role, kind2, kind);
|
priceList = getBeiDianPrice(dto, width, length, role, kind2, kind);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "锦旗":
|
case "锦旗":
|
||||||
// 单价*产品数量*款数
|
// 单价*产品数量*款数
|
||||||
priceList = new PriceUtils().getJQPrice(kind3, number, width, length, count, priceList);
|
priceList = new PriceUtils().getJQPrice(kind3, number, width, length, count, priceList);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "号码布":
|
case "号码布":
|
||||||
// 单价*产品数量*款数
|
// 单价*产品数量*款数
|
||||||
priceList = new PriceUtils().getHmbPrice(kind3, number, width, length, count, priceList);
|
priceList = new PriceUtils().getHmbPrice(kind3, number, width, length, count, priceList);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "彩旗":
|
case "彩旗":
|
||||||
// 单价*产品数量*款数
|
// 单价*产品数量*款数
|
||||||
priceList = new PriceUtils().getCQPrice(number, width, length, count, priceList);
|
priceList = new PriceUtils().getCQPrice(number, width, length, count, priceList);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "硫酸纸":
|
case "硫酸纸":
|
||||||
priceList = getLiuSuanzhiPrice(dto, width, length, role, proType);
|
priceList = getLiuSuanzhiPrice(dto, width, length, role, proType);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "亚克力":
|
case "亚克力":
|
||||||
priceList = new PriceUtils().getYklPrice(dto, number, width, length, count, priceList);
|
priceList = new PriceUtils().getYklPrice(dto, number, width, length, count, priceList);
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -4250,7 +4250,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "帆布":
|
case "帆布":
|
||||||
priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList);
|
priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList);
|
||||||
List<String> carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
List<String> carftList = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||||
@@ -4267,7 +4267,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "29"://慕斯垫
|
case "29"://慕斯垫
|
||||||
priceList = productMapper.getMsdPrice(dto);
|
priceList = productMapper.getMsdPrice(dto);
|
||||||
|
|
||||||
@@ -4297,7 +4297,7 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(0.8 * area * product.getCount() / 10000 * number));
|
product.setWeight(df.format(0.8 * area * product.getCount() / 10000 * number));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "串旗":
|
case "串旗":
|
||||||
priceList = new PriceUtils().getCqPrice(width, length, count, number, priceList);
|
priceList = new PriceUtils().getCqPrice(width, length, count, number, priceList);
|
||||||
if (dto.getCraft() != null) {
|
if (dto.getCraft() != null) {
|
||||||
@@ -4313,12 +4313,12 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "桌布":
|
case "桌布":
|
||||||
width = width / 100;
|
width = width / 100;
|
||||||
length = length / 100;
|
length = length / 100;
|
||||||
priceList = new PriceUtils().getTableClothPrice(length, width, count, number, priceList);
|
priceList = new PriceUtils().getTableClothPrice(length, width, count, number, priceList);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "仿古旗":
|
case "仿古旗":
|
||||||
area = length * width * count / 10000;
|
area = length * width * count / 10000;
|
||||||
priceList = new FgqPrice().getPrice(count, area, priceList, dto.getCraft(), dto.getKindValue(), number);
|
priceList = new FgqPrice().getPrice(count, area, priceList, dto.getCraft(), dto.getKindValue(), number);
|
||||||
@@ -4330,24 +4330,24 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "手拉旗":
|
case "手拉旗":
|
||||||
priceList = getShouLaQiPrice(dto, width, length);
|
priceList = getShouLaQiPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "筷子套":
|
case "筷子套":
|
||||||
priceList = new KztPrice().getPrice(count, length, priceList);
|
priceList = new KztPrice().getPrice(count, length, priceList);
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(df.format(length * 3 * number * 0.157));
|
product.setWeight(df.format(length * 3 * number * 0.157));
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "一次性纸杯":
|
case "一次性纸杯":
|
||||||
priceList = new PaperCupPrice().getPrice(count, priceList);
|
priceList = new PaperCupPrice().getPrice(count, priceList);
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.ceil(product.getPrice() * number * 1.2));
|
product.setPrice(Math.ceil(product.getPrice() * number * 1.2));
|
||||||
product.setWeight(df.format(6 * product.getCount() / 1000 * number));
|
product.setWeight(df.format(6 * product.getCount() / 1000 * number));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "PVC证件":
|
case "PVC证件":
|
||||||
// 价格按照大纸裁
|
// 价格按照大纸裁
|
||||||
priceList = new ZsPrice().getPrice(count, length, width, priceList, number, dto.getCraftSheng());
|
priceList = new ZsPrice().getPrice(count, length, width, priceList, number, dto.getCraftSheng());
|
||||||
@@ -4361,10 +4361,10 @@ public class ProductService {
|
|||||||
width = width / 10;
|
width = width / 10;
|
||||||
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3));
|
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "数码PVC":
|
case "数码PVC":
|
||||||
priceList = getsmPVCPrice(dto, width, length, role);
|
priceList = getsmPVCPrice(dto, width, length, role);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "班旗":
|
case "班旗":
|
||||||
priceList = new BqPrice().getPrice(count, length, priceList, number, dto.getCraftShua(), dto.getCraft());
|
priceList = new BqPrice().getPrice(count, length, priceList, number, dto.getCraftShua(), dto.getCraft());
|
||||||
List<String> craLists = !StringUtils.isEmpty(dto.getCraft()) ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
List<String> craLists = !StringUtils.isEmpty(dto.getCraft()) ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||||
@@ -4382,10 +4382,10 @@ public class ProductService {
|
|||||||
product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number + product.getCount() * wei * number
|
product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number + product.getCount() * wei * number
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "卡贴":
|
case "卡贴":
|
||||||
priceList = getkaTiePrice(dto, width, length);
|
priceList = getkaTiePrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "会员卡卡套":
|
case "会员卡卡套":
|
||||||
priceList = new FerruleUtil().getPrice(length, count, priceList);
|
priceList = new FerruleUtil().getPrice(length, count, priceList);
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
@@ -4393,103 +4393,103 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "手提杯托":
|
case "手提杯托":
|
||||||
priceList = getTuoBeiPrice(dto, width, length);
|
priceList = getTuoBeiPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "天幕":
|
case "天幕":
|
||||||
priceList = getTianMuPrice(dto, width, length);
|
priceList = getTianMuPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "挂布":
|
case "挂布":
|
||||||
priceList = getGuaBuPrice(dto, width, length);
|
priceList = getGuaBuPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "定制衫":
|
case "定制衫":
|
||||||
priceList = getClotherPrice(dto, width, length);
|
priceList = getClotherPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "手绘":
|
case "手绘":
|
||||||
priceList = getShouhuiPrice(dto, width, length);
|
priceList = getShouhuiPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "奖牌":
|
case "奖牌":
|
||||||
priceList = getMedalPrice(dto, width, length);
|
priceList = getMedalPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "防伪标":
|
case "防伪标":
|
||||||
priceList = getantiLabelPrice(dto, width, length);
|
priceList = getantiLabelPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "透卡":
|
case "透卡":
|
||||||
priceList = getPETPrice(dto, width, length);
|
priceList = getPETPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "澜达海报":
|
case "澜达海报":
|
||||||
priceList = getDalanPrice(dto, width, length);
|
priceList = getDalanPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "水标":
|
case "水标":
|
||||||
priceList = getShuibiaoPrice(dto, length, width);
|
priceList = getShuibiaoPrice(dto, length, width);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "镭射吊牌":
|
case "镭射吊牌":
|
||||||
priceList = getLeiseDiaoPrice(dto, length, width);
|
priceList = getLeiseDiaoPrice(dto, length, width);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "刻字车贴":
|
case "刻字车贴":
|
||||||
priceList = getCheTiePrice(dto, length, width);
|
priceList = getCheTiePrice(dto, length, width);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "胶带":
|
case "胶带":
|
||||||
priceList = getJiadaoPrice(dto, length, width);
|
priceList = getJiadaoPrice(dto, length, width);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "特光不干胶":
|
case "特光不干胶":
|
||||||
priceList = getLightPrice(dto, length, width);
|
priceList = getLightPrice(dto, length, width);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "淋膜纸":
|
case "淋膜纸":
|
||||||
priceList = getLingmoPrice(dto, width, length);
|
priceList = getLingmoPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "香薰卡":
|
case "香薰卡":
|
||||||
priceList = getaromatherapyPrice(dto, width, length);
|
priceList = getaromatherapyPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "金属微章":
|
case "金属微章":
|
||||||
priceList = getbadgePrice(dto, width, length);
|
priceList = getbadgePrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "冰箱贴":
|
case "冰箱贴":
|
||||||
priceList = getfridgePrice(dto, width, length, role);
|
priceList = getfridgePrice(dto, width, length, role);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "帆布袋":
|
case "帆布袋":
|
||||||
priceList = getCanvasBagPrice(dto, width, length);
|
priceList = getCanvasBagPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "外卖盒":
|
case "外卖盒":
|
||||||
priceList = getTakeoutBoxPrice(dto, width, length);
|
priceList = getTakeoutBoxPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "方巾纸":
|
case "方巾纸":
|
||||||
priceList = getHandkerPrice(dto, width, length);
|
priceList = getHandkerPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "鼠标垫":
|
case "鼠标垫":
|
||||||
priceList = getMousePadPrice(dto, width, length);
|
priceList = getMousePadPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "手环":
|
case "手环":
|
||||||
priceList = getWristBandPrice(dto, width, length);
|
priceList = getWristBandPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "手提塑料袋":
|
case "手提塑料袋":
|
||||||
priceList = getPlasticBagPrice(dto, width, length);
|
priceList = getPlasticBagPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "纸碗":
|
case "纸碗":
|
||||||
priceList = getPaperBowlPrice(dto, width, length);
|
priceList = getPaperBowlPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "挂画":
|
case "挂画":
|
||||||
priceList = getWallPaintingPrice(dto, width, length);
|
priceList = getWallPaintingPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "电线胶":
|
case "电线胶":
|
||||||
priceList = getWireTapePrice(dto, width, length);
|
priceList = getWireTapePrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "包装纸":
|
case "包装纸":
|
||||||
priceList = getWrappingPaper(dto, width, length);
|
priceList = getWrappingPaper(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "撕撕乐":
|
case "撕撕乐":
|
||||||
priceList = getTearingJoyPrice(dto, width, length);
|
priceList = getTearingJoyPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "哑粉纸":
|
case "哑粉纸":
|
||||||
priceList = getYaFenPrice(dto, width, length);
|
priceList = getYaFenPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "UV打印亚克力":
|
case "UV打印亚克力":
|
||||||
priceList = getUVDayinYKLPrice(dto, width, length);
|
priceList = getUVDayinYKLPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
case "躺椅":
|
case "躺椅":
|
||||||
priceList = getDeckCharitPrice(dto, width, length);
|
priceList = getDeckCharitPrice(dto, width, length);
|
||||||
return chucklePrice(role, priceList);
|
return chucklePrice(role, priceList, dto);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -8559,8 +8559,15 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Product> chucklePrice(String role, List<Product> list) {
|
public List<Product> chucklePrice(String role, List<Product> list, Product dto) {
|
||||||
//
|
//
|
||||||
|
List<String> craft_list = dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft());
|
||||||
|
|
||||||
|
if (craft_list.contains("抠图")) {
|
||||||
|
for (Product product : list) {
|
||||||
|
product.setPrice(Math.ceil(product.getPrice() + 5 * dto.getCropNumber()));
|
||||||
|
}
|
||||||
|
}
|
||||||
List<String> roleList = Arrays.asList("1045", "1061", "1029", "1054", "1053", "1055");
|
List<String> roleList = Arrays.asList("1045", "1061", "1029", "1054", "1053", "1055");
|
||||||
boolean isIn = false;
|
boolean isIn = false;
|
||||||
for (String s : roleList) {
|
for (String s : roleList) {
|
||||||
|
|||||||
@@ -590,7 +590,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
let shop_list = [1045, 1054, 1029];
|
let shop_list = [1045, 1054, 1029];
|
||||||
let shop_list_gai = [1045, 1061, 1029, 1054, 1053];
|
let shop_list_gai = [1045, 1061, 1029, 1054, 1053, 1055];
|
||||||
let role_list = [${sessionScope.USER_SESSION.role}];
|
let role_list = [${sessionScope.USER_SESSION.role}];
|
||||||
var system_isPdd = false;
|
var system_isPdd = false;
|
||||||
var system_isGai = true;
|
var system_isGai = true;
|
||||||
|
|||||||
@@ -983,8 +983,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form class="layui-form">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
|
||||||
|
<input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
|
||||||
|
<div class="layui-inline crop" style="display:none;width: 80px">
|
||||||
|
<input class="layui-input" type="text" name="cropNumber">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<form class="layui-form">
|
<form class="layui-form">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
||||||
@@ -2811,7 +2819,26 @@
|
|||||||
form.render();
|
form.render();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
form.on('checkbox(ui_craft)', function (data) {
|
||||||
|
let craft_list = [];
|
||||||
|
let kindValue = $('input[name="kindValue"]:checked').val();
|
||||||
|
craft_list.push($("select[name='craft'] option:selected").val());
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
craft_list.push($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.value == '抠图') {
|
||||||
|
$(".crop").hide();
|
||||||
|
$(".crop").find("input").prop("disabled", true)
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".crop").show();
|
||||||
|
$(".crop").find("input").prop("disabled", false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.render();
|
||||||
|
})
|
||||||
// 监听工艺多选框
|
// 监听工艺多选框
|
||||||
form.on('checkbox(switchMQ)', function (data) {
|
form.on('checkbox(switchMQ)', function (data) {
|
||||||
var kind = $('input[name="kind"]:checked').val();
|
var kind = $('input[name="kind"]:checked').val();
|
||||||
@@ -3468,6 +3495,10 @@
|
|||||||
arr.push(oppdai + oppSize);
|
arr.push(oppdai + oppSize);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($(this).val() == "抠图") {
|
||||||
|
arr.push($(this).val() + $("input[name='cropNumber']").val());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($(this).val() == "内部模切") {
|
if ($(this).val() == "内部模切") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4117,7 +4148,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
addLog(span_result);
|
addLog(span_result);
|
||||||
$("#span_result").val(span_result);
|
$("#span_result").val(span_result);
|
||||||
|
|
||||||
var switchCount = [];
|
var switchCount = [];
|
||||||
$("input:checkbox[name='switchCount']:checked").each(function (i) {
|
$("input:checkbox[name='switchCount']:checked").each(function (i) {
|
||||||
|
|||||||
@@ -77,6 +77,13 @@
|
|||||||
工艺<span style="font-size: 14px; color: red">一套为一款</span>
|
工艺<span style="font-size: 14px; color: red">一套为一款</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="layui-form-item" id='z4_craft'>
|
<div class="layui-form-item" id='z4_craft'>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
|
||||||
|
<input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
|
||||||
|
<div class="layui-inline crop" style="display:none;width: 80px">
|
||||||
|
<input class="layui-input" type="text" name="cropNumber">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
印面工艺:
|
印面工艺:
|
||||||
<input type="checkbox" name="craft" lay-filter="ui_craft" value="单面" title="单面" checked>
|
<input type="checkbox" name="craft" lay-filter="ui_craft" value="单面" title="单面" checked>
|
||||||
@@ -270,11 +277,10 @@
|
|||||||
let kindValue = $('input[name="kindValue"]:checked').val();
|
let kindValue = $('input[name="kindValue"]:checked').val();
|
||||||
craft_list.push($("select[name='craft'] option:selected").val());
|
craft_list.push($("select[name='craft'] option:selected").val());
|
||||||
$("input[name='craft']:checked").each(function () {
|
$("input[name='craft']:checked").each(function () {
|
||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
craft_list.push($(this).val());
|
craft_list.push($(this).val());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
if (!craft_list.includes("单面")) {
|
if (!craft_list.includes("单面")) {
|
||||||
$(data.elem).prop("checked", true);
|
$(data.elem).prop("checked", true);
|
||||||
layer.msg("印面工艺不能取消", {offset: ['300px', '300px']}, function () {
|
layer.msg("印面工艺不能取消", {offset: ['300px', '300px']}, function () {
|
||||||
@@ -352,6 +358,14 @@
|
|||||||
$(".jiguang_select").find("select").prop("disabled", false)
|
$(".jiguang_select").find("select").prop("disabled", false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (data.value == '抠图') {
|
||||||
|
$(".crop").hide();
|
||||||
|
$(".crop").find("input").prop("disabled", true)
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".crop").show();
|
||||||
|
$(".crop").find("input").prop("disabled", false)
|
||||||
|
}
|
||||||
|
}
|
||||||
form.render();
|
form.render();
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -394,6 +408,8 @@
|
|||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
if ($(this).val() == "背卡直角裁切" || $(this).val() == "背卡异形模切") {
|
if ($(this).val() == "背卡直角裁切" || $(this).val() == "背卡异形模切") {
|
||||||
craft.push($(this).val().replace("背卡", ""));
|
craft.push($(this).val().replace("背卡", ""));
|
||||||
|
} else if ($(this).val() == "抠图") {
|
||||||
|
craft.push($(this).val() + $("input[name='cropNumber']").val());
|
||||||
} else {
|
} else {
|
||||||
craft.push($(this).val());
|
craft.push($(this).val());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,6 +242,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
|
||||||
|
<input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
|
||||||
|
<div class="layui-inline crop" style="display:none;width: 80px">
|
||||||
|
<input class="layui-input" type="text" name="cropNumber">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
@@ -529,7 +537,26 @@
|
|||||||
form.render();//必须写
|
form.render();//必须写
|
||||||
getProductImage()
|
getProductImage()
|
||||||
})
|
})
|
||||||
|
form.on('checkbox(ui_craft)', function (data) {
|
||||||
|
let craft_list = [];
|
||||||
|
let kindValue = $('input[name="kindValue"]:checked').val();
|
||||||
|
craft_list.push($("select[name='craft'] option:selected").val());
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
craft_list.push($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.value == '抠图') {
|
||||||
|
$(".crop").hide();
|
||||||
|
$(".crop").find("input").prop("disabled", true)
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".crop").show();
|
||||||
|
$(".crop").find("input").prop("disabled", false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.render();
|
||||||
|
})
|
||||||
// 点击计算,计算价格
|
// 点击计算,计算价格
|
||||||
form.on('submit(acount_btn)', function (data) {
|
form.on('submit(acount_btn)', function (data) {
|
||||||
var kind = $('input[name="kind"]:checked').val()
|
var kind = $('input[name="kind"]:checked').val()
|
||||||
@@ -538,13 +565,13 @@
|
|||||||
let n_moq_num = $('input[name="n_mq_num"]').val()
|
let n_moq_num = $('input[name="n_mq_num"]').val()
|
||||||
let n_moq_size = $("input[name='n_mq_size']").val()
|
let n_moq_size = $("input[name='n_mq_size']").val()
|
||||||
let nmq = $("#nmq:checked").val();
|
let nmq = $("#nmq:checked").val();
|
||||||
|
var craftShua = [];
|
||||||
if (kind == '金属标') {
|
if (kind == '金属标') {
|
||||||
var size = $("#size").val();
|
var size = $("#size").val();
|
||||||
var color = $("#color").val();
|
var color = $("#color").val();
|
||||||
} else {
|
} else {
|
||||||
var size = $("#UVSize").val();
|
var size = $("#UVSize").val();
|
||||||
var craftMo = $('input[name="craftMo"]:checked').val();
|
var craftMo = $('input[name="craftMo"]:checked').val();
|
||||||
var craftShua = [];
|
|
||||||
|
|
||||||
$("input:checkbox[name='craft']:checked").each(function (i) {
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
@@ -566,6 +593,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
if ($(this).val() == "抠图") {
|
||||||
|
craftShua.push($(this).val() + $("input[name='cropNumber']").val());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
if (!kind) {
|
if (!kind) {
|
||||||
layer.msg("请选择产品种类!", {offset: ['300px', '300px']}, function () {
|
layer.msg("请选择产品种类!", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
});
|
||||||
@@ -665,7 +700,7 @@
|
|||||||
}
|
}
|
||||||
var data = result.data.proList;
|
var data = result.data.proList;
|
||||||
if (kind == '金属标') {
|
if (kind == '金属标') {
|
||||||
var span_result = '金属标 - ' + color + ' - ' + size + '厘米 -' + craftMo + '-(同款内容)\n';
|
var span_result = '金属标 - ' + color + '- ' + craftShua.join(" - ") + '- ' + size + '厘米 -' + craftMo + '-(同款内容)\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'
|
||||||
@@ -683,7 +718,7 @@
|
|||||||
craftShua.push(co_count + "色数");
|
craftShua.push(co_count + "色数");
|
||||||
}
|
}
|
||||||
|
|
||||||
craftShua = craftShua.filter(item => item !== null && item != "");
|
|
||||||
var span_result = 'UV转印贴 - ' + craftShua.join(" - ") + ' - ' + size + '厘米 -(同款内容) - ' + [data[0].msg] + '\n';
|
var span_result = 'UV转印贴 - ' + craftShua.join(" - ") + ' - ' + size + '厘米 -(同款内容) - ' + [data[0].msg] + '\n';
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
// let numberType = $("#desType option:selected").text();
|
// let numberType = $("#desType option:selected").text();
|
||||||
|
|||||||
@@ -322,6 +322,7 @@
|
|||||||
<input type="checkbox" name="craftPai" value="半排废" title="半排废" lay-filter="craftPai">
|
<input type="checkbox" name="craftPai" value="半排废" title="半排废" lay-filter="craftPai">
|
||||||
<input type="checkbox" name="craftPai" value="全排废" title="全排废" lay-filter="craftPai">
|
<input type="checkbox" name="craftPai" value="全排废" title="全排废" lay-filter="craftPai">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item n_mq" style="display: flex">
|
<div class="layui-form-item n_mq" style="display: flex">
|
||||||
<input type="checkbox" value="内部模切" id="nmq" title="内部模切" lay-filter="nmq" name="craft">
|
<input type="checkbox" value="内部模切" id="nmq" title="内部模切" lay-filter="nmq" name="craft">
|
||||||
<span class="n_mq_input" style="display: none">
|
<span class="n_mq_input" style="display: none">
|
||||||
@@ -429,7 +430,15 @@
|
|||||||
<input type="checkbox" class="tang" name="craftTang" lay-filter="switch" value="烫金" title="烫金">
|
<input type="checkbox" class="tang" name="craftTang" lay-filter="switch" value="烫金" title="烫金">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<form class="layui-form">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
|
||||||
|
<input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
|
||||||
|
<div class="layui-inline crop" style="display:none;width: 80px">
|
||||||
|
<input class="layui-input" type="text" name="cropNumber">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<form class="layui-form">
|
<form class="layui-form">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
||||||
@@ -1421,6 +1430,26 @@
|
|||||||
$("#remark").append(remark);
|
$("#remark").append(remark);
|
||||||
getProductImage(kValue);
|
getProductImage(kValue);
|
||||||
})
|
})
|
||||||
|
form.on('checkbox(ui_craft)', function (data) {
|
||||||
|
let craft_list = [];
|
||||||
|
let kindValue = $('input[name="kindValue"]:checked').val();
|
||||||
|
craft_list.push($("select[name='craft'] option:selected").val());
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
craft_list.push($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.value == '抠图') {
|
||||||
|
$(".crop").hide();
|
||||||
|
$(".crop").find("input").prop("disabled", true)
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".crop").show();
|
||||||
|
$(".crop").find("input").prop("disabled", false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
form.render();
|
||||||
|
})
|
||||||
|
|
||||||
function getProductImage(value) {
|
function getProductImage(value) {
|
||||||
let data = {proTypeValue: $("#proTypeValue").val(), kindValue: value}
|
let data = {proTypeValue: $("#proTypeValue").val(), kindValue: value}
|
||||||
@@ -1904,7 +1933,7 @@
|
|||||||
craft_list.push("模切-覆哑膜")
|
craft_list.push("模切-覆哑膜")
|
||||||
}
|
}
|
||||||
if (kindValue == "0") {
|
if (kindValue == "0") {
|
||||||
if ($("input[name='craft']:checked").val() != null) {
|
if ($("input[name='craft']:checked").val() != null && $("input[name='craft']:checked").val() != "抠图") {
|
||||||
yinbai = $("input[name='craft']:checked").val() + ":6*18毫米";
|
yinbai = $("input[name='craft']:checked").val() + ":6*18毫米";
|
||||||
craft_list.push(yinbai)
|
craft_list.push(yinbai)
|
||||||
}
|
}
|
||||||
@@ -1920,7 +1949,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stickerKind == "插旗") {
|
if (stickerKind == "插旗") {
|
||||||
if ($("input[name='craft']:checked").val() != null) {
|
if ($("input[name='craft']:checked").val() != null && $("input[name='craft']:checked").val() != "抠图") {
|
||||||
yinbai = $("input[name='craft']:checked").val() + ":6*18毫米";
|
yinbai = $("input[name='craft']:checked").val() + ":6*18毫米";
|
||||||
}
|
}
|
||||||
yaqian = $("select[name='toothpick_size'] option:selected").val() + '厘米';
|
yaqian = $("select[name='toothpick_size'] option:selected").val() + '厘米';
|
||||||
@@ -1939,6 +1968,16 @@
|
|||||||
if (nmq == '内部模切' && n_moq_num > 0) {
|
if (nmq == '内部模切' && n_moq_num > 0) {
|
||||||
craft_list.push("内部模切:" + n_moq_num + "/" + n_moq_size)
|
craft_list.push("内部模切:" + n_moq_num + "/" + n_moq_size)
|
||||||
}
|
}
|
||||||
|
$("input[name='craft']:checked").each(function () {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
if ($("input[name='craft']:checked").val() == "抠图") {
|
||||||
|
craft_list.push($(this).val() + $("input[name='cropNumber']").val());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
craft_list = craft_list.filter(i => {
|
||||||
|
return i != ""
|
||||||
|
});
|
||||||
span_result += kind + ' - ' + size + "厘米 - " + craft_list.join("-") + '\n';
|
span_result += kind + ' - ' + size + "厘米 - " + craft_list.join("-") + '\n';
|
||||||
|
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
@@ -1959,8 +1998,8 @@
|
|||||||
/*layer.msg("插旗(牙签)不是粘好出货哦!",{offset:['300px','300px']},function(){});*/
|
/*layer.msg("插旗(牙签)不是粘好出货哦!",{offset:['300px','300px']},function(){});*/
|
||||||
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
||||||
|
|
||||||
if(window.parent.system_isGai){
|
if (window.parent.system_isGai) {
|
||||||
span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
|
span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
|
||||||
}
|
}
|
||||||
addLog(span_result);
|
addLog(span_result);
|
||||||
$("#span_result").val(span_result);
|
$("#span_result").val(span_result);
|
||||||
|
|||||||
Reference in New Issue
Block a user