Compare commits

..

2 Commits

Author SHA1 Message Date
zyy 59119cab4c 新增抠图 2026-06-12 17:02:13 +08:00
zyy e795cbe1d9 修改特种纸名片模切加个 2026-06-12 14:52:10 +08:00
8 changed files with 262 additions and 133 deletions
@@ -180,4 +180,6 @@ public class Product {
private Double lengthVU;
private Double widthUV;
private Integer cropNumber;
}
@@ -307,10 +307,10 @@ public class ProductService {
kind = "3";
} else if ("封口贴铜版纸不干胶".equals(kind)) {
priceList = new PriceUtils().getFktPrice(number, priceList);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("双面印刷不干胶".equals(dto.getStickerKind())) {
priceList = StickersDoublePrice.getPrice(length, width, count, number);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("插旗".equals(dto.getStickerKind())) {
if ("铜版纸不干胶".equals(kind)) {
dto.setKindValue("0");
@@ -395,7 +395,7 @@ public class ProductService {
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
}
// return priceList;
@@ -406,7 +406,7 @@ public class ProductService {
product.setPrice(Math.ceil(product.getPrice() * number));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("13".equals(kind)) {
oldKind = "13";
dto.setKindValue("2");
@@ -426,7 +426,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
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)) {
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>();
@@ -485,7 +485,7 @@ public class ProductService {
}
stickersList = normalSticker(dto, kind, number, area, width, length, count, oldKind, stickersList);
if (stickersList == null) {
return chucklePrice(role, stickersList);
return chucklePrice(role, stickersList, dto);
}
}
// 把查出来的集合添加到priceList中
@@ -635,12 +635,12 @@ public class ProductService {
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "1":
dto.setWidth(width);
dto.setLength(length);
priceList = productMapper.getThanPrice(dto);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 卷装标签
case "2":
// 单个产品的面积
@@ -651,7 +651,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 插卡
case "3":
// 菱形单面直角插牌
@@ -717,7 +717,7 @@ public class ProductService {
priceList.add(product);
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
}
// 根据款数重新算价格/计算重量
for (Product product : priceList) {
@@ -730,7 +730,7 @@ public class ProductService {
}
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 优惠券
case "4":
if ("11".equals(dto.getKind())) {// 圣诞卡
@@ -921,7 +921,7 @@ public class ProductService {
priceList.add(product);
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
}
int min = getNum(length, width);
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克
case "吊牌":
// 自定义尺寸
@@ -1226,7 +1226,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 服装吊牌
case "服装吊牌":
// 自定义尺寸
@@ -1441,7 +1441,7 @@ public class ProductService {
for (Product product : priceList) {
product.setWeight(String.valueOf(weight * area * product.getCount() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 特价名片
case "特价名片":
// 选了自定义尺寸
@@ -1479,7 +1479,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 名片-特种纸名片
case "特种纸名片":
double addPrice = 5;
@@ -1689,7 +1689,7 @@ public class ProductService {
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)) {
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
// 出血一边2毫米
@@ -1881,7 +1881,7 @@ public class ProductService {
for (Product product : priceList) {
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":
double lengthSize = dto.getLengthSize();
@@ -1930,7 +1930,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 房卡套
case "7":
lengthSize = dto.getLengthSize();
@@ -1975,7 +1975,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 档案袋
case "8":
priceList = productMapper.getThanPrice(dto);
@@ -1991,11 +1991,11 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 彩色信封
case "9":
priceList = getXinFengPrice(dto, width, length, kind, kind2);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 杯套
case "10":
if ("5".equals(kind)) {
@@ -2017,7 +2017,7 @@ public class ProductService {
product.setWeight(df.format(number * 0.3 * product.getCount() / 10000 * length * width));
product.setPrice(Math.ceil(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("6".equals(kind)) {// 盲盒杯套价格
dto.setPrice(1800.0);
priceList.add(dto);
@@ -2025,7 +2025,7 @@ public class ProductService {
product.setWeight(df.format(number * 0.3 * product.getCount() * 0.29 * 0.07));
product.setPrice(Math.ceil(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("2".equals(kind)) {// 异形杯套价格计算
priceList = new PriceUtils().getCupSetPrice(count);
} else {
@@ -2060,7 +2060,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() + number * 50));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 牛皮纸手提袋
case "11":
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));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
}
double sizeLength = 0.0;
double sizeWidth = 0.0;
@@ -2268,7 +2268,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 250克白牛皮纸
case "12":
priceList = productMapper.getThanPrice(dto);
@@ -2309,7 +2309,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
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":
length = length * 10;
@@ -2362,7 +2362,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 宣传单
case "14":
length = length * 10;
@@ -2473,7 +2473,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * weight));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 腰封200克/157克
case "15":
// 腰封少数量走的是吊旗少数量的价格
@@ -2541,7 +2541,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "金属标":
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));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
}
if (length <= 2) {
length = 2.0;
@@ -2735,7 +2735,7 @@ public class ProductService {
* product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; }
*/
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "卡片少数量":
String crafts[] = dto.getCraft();
String craftShua = dto.getCraftShua();
@@ -3189,7 +3189,7 @@ public class ProductService {
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 便签本/联单
case "16":
length = length * 10;
@@ -3389,7 +3389,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 海报款数*个数=个数
case "17":
// 贡缎布
@@ -3404,7 +3404,7 @@ public class ProductService {
for (Product product : priceList) {
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
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)) {// 刻字
Product pro = new Product();
pro.setCount(count);
@@ -3473,7 +3473,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * 1.15));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
} else if ("11".equals(kind)) {
} else {
@@ -3676,7 +3676,7 @@ public class ProductService {
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 扇子
case "18":
if (dto.getKindValue().equals("5")) {
@@ -3762,7 +3762,7 @@ public class ProductService {
product.setWeight(df.format(Double.valueOf(product.getWeight()) * number));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 画册
case "19":
// 内页P数加上封面的4P
@@ -3812,7 +3812,7 @@ public class ProductService {
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 包装盒
case "20":
// 厘米转成毫米
@@ -3871,7 +3871,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 透明PVC名片
case "21":
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.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 桌贴
case "22":
/*
@@ -3912,7 +3912,7 @@ public class ProductService {
}
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.7 * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 0.38PVC亮光异型卡片
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); }
*/
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 滴塑
case "23":
priceList = PriceUtils.getDisuPrice(priceList, width, length, count, number, dto);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 透明PVC名片---会员卡
case "24":
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.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 卡片-门挂牌
case "25":
priceList = productMapper.getThanPrice(dto);
@@ -4017,7 +4017,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 毕业证书
case "26":
priceList = new PriceUtils().getDiploma(count);
@@ -4025,11 +4025,11 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 暖心贴
case "27":
priceList = getWarmStickerPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 彩色信纸
case "彩色信纸":
length = length * 10;
@@ -4066,7 +4066,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
// 复印纸
case "复印纸":
priceList = new PriceUtils().getCopyPaper(kind, kind2, kind3, count, size);
@@ -4074,10 +4074,10 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "婚礼卡":
priceList = new PriceUtils().getWeddingCardPrice(length, width, count, number, dto.getCraftMo(), dto.getCraftShua());
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "刮刮卡":
// 选了自定义尺寸
if (dto.isSwitchSize()) {
@@ -4140,7 +4140,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "66":
String craftTang = dto.getCraftTang().replace("双面烫银", "双面烫金");
if (!kind.equals("500克黑卡")) {
@@ -4169,7 +4169,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
product.setWeight(df.format(0.09 * 0.054 * product.getCount() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "餐垫纸":
priceList = new PriceUtils().getPlaceMatPrice(kind, length, width, count);
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));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "节目单":
priceList = productMapper.getThanPrice(dto);
if (StringUtils.isEmpty(dto.getCraft())) {
@@ -4200,7 +4200,7 @@ public class ProductService {
for (Product product : priceList) {
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "硫酸纸吊牌":
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.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "杯垫":
priceList = getBeiDianPrice(dto, width, length, role, kind2, kind);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "锦旗":
// 单价*产品数量*款数
priceList = new PriceUtils().getJQPrice(kind3, number, width, length, count, priceList);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "号码布":
// 单价*产品数量*款数
priceList = new PriceUtils().getHmbPrice(kind3, number, width, length, count, priceList);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "彩旗":
// 单价*产品数量*款数
priceList = new PriceUtils().getCQPrice(number, width, length, count, priceList);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "硫酸纸":
priceList = getLiuSuanzhiPrice(dto, width, length, role, proType);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "亚克力":
priceList = new PriceUtils().getYklPrice(dto, number, width, length, count, priceList);
for (Product product : priceList) {
@@ -4250,7 +4250,7 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "帆布":
priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList);
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"://慕斯垫
priceList = productMapper.getMsdPrice(dto);
@@ -4297,7 +4297,7 @@ public class ProductService {
product.setWeight(df.format(0.8 * area * product.getCount() / 10000 * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "串旗":
priceList = new PriceUtils().getCqPrice(width, length, count, number, priceList);
if (dto.getCraft() != null) {
@@ -4313,12 +4313,12 @@ public class ProductService {
}
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "桌布":
width = width / 100;
length = length / 100;
priceList = new PriceUtils().getTableClothPrice(length, width, count, number, priceList);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "仿古旗":
area = length * width * count / 10000;
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));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "手拉旗":
priceList = getShouLaQiPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "筷子套":
priceList = new KztPrice().getPrice(count, length, priceList);
for (Product product : priceList) {
product.setWeight(df.format(length * 3 * number * 0.157));
product.setPrice(Math.floor(product.getPrice() * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "一次性纸杯":
priceList = new PaperCupPrice().getPrice(count, priceList);
for (Product product : priceList) {
product.setPrice(Math.ceil(product.getPrice() * number * 1.2));
product.setWeight(df.format(6 * product.getCount() / 1000 * number));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "PVC证件":
// 价格按照大纸裁
priceList = new ZsPrice().getPrice(count, length, width, priceList, number, dto.getCraftSheng());
@@ -4361,10 +4361,10 @@ public class ProductService {
width = width / 10;
product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3));
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "数码PVC":
priceList = getsmPVCPrice(dto, width, length, role);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "班旗":
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<>();
@@ -4382,10 +4382,10 @@ public class ProductService {
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 "卡贴":
priceList = getkaTiePrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "会员卡卡套":
priceList = new FerruleUtil().getPrice(length, count, priceList);
if (number > 1) {
@@ -4393,103 +4393,103 @@ public class ProductService {
product.setPrice(Math.floor(product.getPrice() * number));
}
}
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "手提杯托":
priceList = getTuoBeiPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "天幕":
priceList = getTianMuPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "挂布":
priceList = getGuaBuPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "定制衫":
priceList = getClotherPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "手绘":
priceList = getShouhuiPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "奖牌":
priceList = getMedalPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "防伪标":
priceList = getantiLabelPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "透卡":
priceList = getPETPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "澜达海报":
priceList = getDalanPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "水标":
priceList = getShuibiaoPrice(dto, length, width);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "镭射吊牌":
priceList = getLeiseDiaoPrice(dto, length, width);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "刻字车贴":
priceList = getCheTiePrice(dto, length, width);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "胶带":
priceList = getJiadaoPrice(dto, length, width);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "特光不干胶":
priceList = getLightPrice(dto, length, width);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "淋膜纸":
priceList = getLingmoPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "香薰卡":
priceList = getaromatherapyPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "金属微章":
priceList = getbadgePrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "冰箱贴":
priceList = getfridgePrice(dto, width, length, role);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "帆布袋":
priceList = getCanvasBagPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "外卖盒":
priceList = getTakeoutBoxPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "方巾纸":
priceList = getHandkerPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "鼠标垫":
priceList = getMousePadPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "手环":
priceList = getWristBandPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "手提塑料袋":
priceList = getPlasticBagPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "纸碗":
priceList = getPaperBowlPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "挂画":
priceList = getWallPaintingPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "电线胶":
priceList = getWireTapePrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "包装纸":
priceList = getWrappingPaper(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "撕撕乐":
priceList = getTearingJoyPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "哑粉纸":
priceList = getYaFenPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "UV打印亚克力":
priceList = getUVDayinYKLPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
case "躺椅":
priceList = getDeckCharitPrice(dto, width, length);
return chucklePrice(role, priceList);
return chucklePrice(role, priceList, dto);
default:
break;
}
@@ -8502,26 +8502,25 @@ public class ProductService {
}
}
if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍
double[] prices = {140, 190, 260, 470, 690, 1110, 2190};
double[] prices = {112, 152, 208, 376, 552, 888, 1328};
int[] counts = {200, 500, 1000, 2000, 3000, 5000, 10000};
int num = getNum(width, length);
if (num == 1) {
} else if (num == 2) {
prices = new double[]{250, 350, 475, 860, 1250, 2025, 3990};
prices = new double[]{200, 280, 380, 688, 1000, 1620, 2420};
} else if (num == 3) {
prices = new double[]{340, 470, 625, 1140, 1650, 2675, 5250};
prices = new double[]{272, 376, 500, 912, 1320, 2140, 3100};
} else if (num == 5) {
prices = new double[]{475, 650, 870, 1575, 2290, 3425, 6750};
prices = new double[]{380, 520, 696, 1260, 1832, 2740, 4100};
} else if (num == 6) {
prices = new double[]{600, 800, 1100, 1900, 2550, 4000, 7900};
prices = new double[]{480, 640, 880, 1520, 2040, 3200, 4800};
} else {
prices = new double[]{750, 950, 1300, 2500, 3450, 4900, 9400};
prices = new double[]{600, 760, 1040, 2000, 2760, 3920, 5700};
}
for (Product product : priceList) {
for (int i = 0; i < counts.length; i++) {
if (counts[i] == product.getCount()) {
product.setPrice(prices[i] * dto.getNumber());
}
}
}
@@ -8560,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");
boolean isIn = false;
for (String s : roleList) {
@@ -42,7 +42,7 @@ public class PriceUtils {
area = Double.valueOf(df.format(area * count));
if (area <= 20) {
yinrPrice = 260;
lowerPrice = 550;
lowerPrice = 400;
} else if (area <= 150) {
yinrPrice = 300;
lowerPrice = 600;
+1 -1
View File
@@ -590,7 +590,7 @@
</script>
<script>
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}];
var system_isPdd = false;
var system_isGai = true;
+33 -2
View File
@@ -983,8 +983,16 @@
</div>
</form>
</div>
<hr>
</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">
<div class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
@@ -2811,7 +2819,26 @@
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) {
var kind = $('input[name="kind"]:checked').val();
@@ -3468,6 +3495,10 @@
arr.push(oppdai + oppSize);
return;
}
if ($(this).val() == "抠图") {
arr.push($(this).val() + $("input[name='cropNumber']").val());
return;
}
if ($(this).val() == "内部模切") {
return;
}
@@ -4117,7 +4148,7 @@
}
addLog(span_result);
$("#span_result").val(span_result);
$("#span_result").val(span_result);
var switchCount = [];
$("input:checkbox[name='switchCount']:checked").each(function (i) {
+20 -4
View File
@@ -77,6 +77,13 @@
工艺<span style="font-size: 14px; color: red">一套为一款</span>
</p>
<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">
印面工艺:
<input type="checkbox" name="craft" lay-filter="ui_craft" value="单面" title="单面" checked>
@@ -270,11 +277,10 @@
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 (!$(this).is(':disabled')) {
craft_list.push($(this).val());
}
);
});
if (!craft_list.includes("单面")) {
$(data.elem).prop("checked", true);
layer.msg("印面工艺不能取消", {offset: ['300px', '300px']}, function () {
@@ -352,6 +358,14 @@
$(".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();
})
@@ -394,6 +408,8 @@
if (!$(this).is(':disabled')) {
if ($(this).val() == "背卡直角裁切" || $(this).val() == "背卡异形模切") {
craft.push($(this).val().replace("背卡", ""));
} else if ($(this).val() == "抠图") {
craft.push($(this).val() + $("input[name='cropNumber']").val());
} else {
craft.push($(this).val());
}
+38 -3
View File
@@ -242,6 +242,14 @@
</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 class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
@@ -529,7 +537,26 @@
form.render();//必须写
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) {
var kind = $('input[name="kind"]:checked').val()
@@ -538,13 +565,13 @@
let n_moq_num = $('input[name="n_mq_num"]').val()
let n_moq_size = $("input[name='n_mq_size']").val()
let nmq = $("#nmq:checked").val();
var craftShua = [];
if (kind == '金属标') {
var size = $("#size").val();
var color = $("#color").val();
} else {
var size = $("#UVSize").val();
var craftMo = $('input[name="craftMo"]:checked').val();
var craftShua = [];
$("input:checkbox[name='craft']:checked").each(function (i) {
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) {
layer.msg("请选择产品种类!", {offset: ['300px', '300px']}, function () {
});
@@ -665,7 +700,7 @@
}
var data = result.data.proList;
if (kind == '金属标') {
var span_result = '金属标 - ' + color + ' - ' + size + '厘米 -' + craftMo + '-(同款内容)\n';
var span_result = '金属标 - ' + color + '- ' + craftShua.join(" - ") + '- ' + size + '厘米 -' + craftMo + '-(同款内容)\n';
if (number > 1) {
for (let i = 0; i < data.length; i++) {
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
@@ -683,7 +718,7 @@
craftShua.push(co_count + "色数");
}
craftShua = craftShua.filter(item => item !== null && item != "");
var span_result = 'UV转印贴 - ' + craftShua.join(" - ") + ' - ' + size + '厘米 -(同款内容) - ' + [data[0].msg] + '\n';
if (number > 1) {
// let numberType = $("#desType option:selected").text();
+43 -4
View File
@@ -322,6 +322,7 @@
<input type="checkbox" name="craftPai" value="半排废" title="半排废" lay-filter="craftPai">
<input type="checkbox" name="craftPai" value="全排废" title="全排废" lay-filter="craftPai">
</div>
<div class="layui-form-item n_mq" style="display: flex">
<input type="checkbox" value="内部模切" id="nmq" title="内部模切" lay-filter="nmq" name="craft">
<span class="n_mq_input" style="display: none">
@@ -429,7 +430,15 @@
<input type="checkbox" class="tang" name="craftTang" lay-filter="switch" value="烫金" title="烫金">
</div>
</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">
<div class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
@@ -1421,6 +1430,26 @@
$("#remark").append(remark);
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) {
let data = {proTypeValue: $("#proTypeValue").val(), kindValue: value}
@@ -1904,7 +1933,7 @@
craft_list.push("模切-覆哑膜")
}
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毫米";
craft_list.push(yinbai)
}
@@ -1920,7 +1949,7 @@
}
}
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毫米";
}
yaqian = $("select[name='toothpick_size'] option:selected").val() + '厘米';
@@ -1939,6 +1968,16 @@
if (nmq == '内部模切' && n_moq_num > 0) {
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';
if (number > 1) {
@@ -1959,8 +1998,8 @@
/*layer.msg("插旗(牙签)不是粘好出货哦!",{offset:['300px','300px']},function(){});*/
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
if(window.parent.system_isGai){
span_result +="\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
if (window.parent.system_isGai) {
span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
}
addLog(span_result);
$("#span_result").val(span_result);