Šī revīzija ir iekļauta:
2025-03-28 14:38:59 +08:00
vecāks 90d885845f
revīzija 4269f8e0ff
17 mainīti faili ar 131 papildinājumiem un 129 dzēšanām
@@ -0,0 +1,2 @@
package lingtao.net.Factory;public class CardPricingStrategy {
}
@@ -0,0 +1,2 @@
package lingtao.net.Factory;public class MetalTargetStrategy {
}
@@ -0,0 +1,2 @@
package lingtao.net.Factory;public interface PricingStrategy {
}
@@ -0,0 +1,2 @@
package lingtao.net.Factory;public class PricingStrategyFactory {
}
@@ -235,8 +235,8 @@ public class ProductService {
// 款数
Integer number = dto.getNumber();
String size = dto.getSize();
Double width = null;
Double length = null;
Double width = dto.getWidth();
Double length = dto.getLength();
Double height = null;
Double area = null;
String oldKind = "";
@@ -734,6 +734,9 @@ public class ProductService {
if (craft_list.contains("穿尼龙绳")) {
carft_price += Math.max(0.2 * item_count, 40);
}
if (craft_list.contains("配弹力绳")) {
carft_price += Math.max(0.1 * item_count, 10);
}
double tang_price = 0;
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas);
@@ -886,10 +889,13 @@ public class ProductService {
int min = getNum(length, width);
priceList = getHekaPrice(min, product1, priceList, count);
getCraft(product1, priceList, length * 10, width * 10, min);
if ("凹凸".equals(dto.getAotu())) {
for (Product product : priceList) {
for (Product product : priceList) {
if ("凹凸".equals(dto.getAotu())) {
product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153)));
}
if (craft.contains("弹力绳")) {
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
}
}
// 根据款数重新算价格/计算重量
for (Product product : priceList) {
@@ -962,10 +968,13 @@ public class ProductService {
}
}
// +棉绳钱 1分5一条
if (!StringUtils.isEmpty(dto.getCraftSheng())) {
for (Product product : priceList) {
for (Product product : priceList) {
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("棉绳")) {
product.setPrice(product.getPrice() + product.getCount() * 0.015);
}
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳")) {
product.setPrice(product.getPrice() + Math.max(product.getCount() * 0.1, 10));
}
}
for (Product product : priceList) {
product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6));
@@ -1,6 +0,0 @@
package lingtao.net.service.price;
public interface ClothingTagService {
void inster();
}
@@ -1,14 +0,0 @@
package lingtao.net.service.price;
import lingtao.net.enums.ProductEnum;
import org.apache.poi.ss.formula.functions.T;
public interface ProductService<T> {
/**
* 计算价格
*/
void getProduct(T t);
ProductEnum getEnum();
}
@@ -1,4 +0,0 @@
package lingtao.net.service.price;
public interface SelfAdhesiveStickerService {
}
@@ -1,27 +0,0 @@
package lingtao.net.service.price.impl;
import lingtao.net.entity.ClothingTag;
import lingtao.net.enums.ProductEnum;
import lingtao.net.service.price.ClothingTagService;
import lingtao.net.service.price.ProductService;
import org.springframework.stereotype.Service;
@Service
public class ClothingTagServiceImpl implements ProductService<ClothingTag>, ClothingTagService {
@Override
public void getProduct(ClothingTag clothingTag) {
System.out.println("===========clothingTag");
}
@Override
public ProductEnum getEnum() {
return ProductEnum.clothing_Tag;
}
@Override
public void inster() {
}
}
@@ -1,32 +0,0 @@
package lingtao.net.service.price.impl;
import lingtao.net.enums.ProductEnum;
import lingtao.net.service.price.ProductService;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
@Service
public class ProductContent implements ApplicationContextAware {
@Autowired(required = false)
Map<ProductEnum, ProductService> productServiceMap;
public ProductService getService(ProductEnum productEnum) {
return productServiceMap.get(productEnum);
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
Map<String, ProductService> map = applicationContext.getBeansOfType(ProductService.class);
productServiceMap = new HashMap<>();
map.forEach((key, value) -> {
productServiceMap.put(value.getEnum(), value);
});
}
}
@@ -1,20 +0,0 @@
package lingtao.net.service.price.impl;
import lingtao.net.entity.SelfAdhesiveSticker;
import lingtao.net.enums.ProductEnum;
import lingtao.net.service.price.ProductService;
import lingtao.net.service.price.SelfAdhesiveStickerService;
import org.springframework.stereotype.Service;
@Service
public class SelfAdhesiveStickerServiceImpl implements ProductService<SelfAdhesiveSticker>, SelfAdhesiveStickerService {
@Override
public void getProduct(SelfAdhesiveSticker selfAdhesiveSticker) {
System.out.println("===========SelfAdhesiveSticker");
}
@Override
public ProductEnum getEnum() {
return ProductEnum.self_adhesive_sticker;
}
}
@@ -121,13 +121,13 @@
<input type="radio" name="craft" lay-filter="switch" value="击凸" title="击凸">
<div style="display: none" id="jtcolor">
<input type="checkbox" name="jtcolor" lay-filter="color" value="红色" title="红色" checked>
<input type="checkbox" name="jtcolor" lay-filter="color" value="绿色" title="绿色">
<input type="checkbox" name="jtcolor" lay-filter="color" value="紫色" title="紫色">
<input type="checkbox" name="jtcolor" lay-filter="color" value="红褐色" title="红褐色">
<input type="checkbox" name="jtcolor" lay-filter="color" value="金色" title="金色">
<%-- <input type="checkbox" name="jtcolor" lay-filter="color" value="红色" title="红色" checked>--%>
<%-- <input type="checkbox" name="jtcolor" lay-filter="color" value="绿色" title="绿色">--%>
<%-- <input type="checkbox" name="jtcolor" lay-filter="color" value="紫色" title="紫色">--%>
<%-- <input type="checkbox" name="jtcolor" lay-filter="color" value="红褐色" title="红褐色">--%>
<input type="checkbox" name="jtcolor" lay-filter="color" value="金色" title="金色" checked>
<input type="checkbox" name="jtcolor" lay-filter="color" value="黑色" title="黑色">
<input type="checkbox" name="jtcolor" lay-filter="color" value="青色" title="青色">
<%-- <input type="checkbox" name="jtcolor" lay-filter="color" value="青色" title="青色">--%>
<input type="checkbox" name="jtcolor" lay-filter="color" value="洋红色" title="洋红色">
</div>
</div>
@@ -669,6 +669,14 @@
<option value="红色绳子">红色绳子</option>
</select>
</div>
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳"
title="配弹力绳(20cm">
<div class="layui-inline shengz tscolor" style="width: 110px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
<option value="银色绳子">银色绳子</option>
</select>
</div>
</div>
</form>
</div>
@@ -1009,6 +1017,16 @@
$("#z4_craft .shengz").prop("disabled", true);
}
}
if (data.value == "配弹力绳" ) {
if ($(data.elem).is(":checked")) {
$("#z4_craft .tscolor").show();
$("#z4_craft .tscolor").prop("disabled", false);
} else {
$("#z4_craft .tscolor").hide();
$("#z4_craft .tscolor").prop("disabled", true);
}
}
});
form.on("radio(kindValue2)", function (data) {
if (data.value == 10) {
+25 -5
Parādīt failu
@@ -97,11 +97,21 @@
</div>
</div>
<div id="ui_kind5">
<p>
宽幅
</p>
<div class="layui-form-item fixedSizeCoupon">
<select name="width" id="width" class="select">
<option value="26.4">264mm宽幅(套常规500或700毫升98口径奶茶杯)</option>
<option value="24.7">247mm宽幅(套常规500或700毫升90口径奶茶杯)</option>
<option value="26.1">261mm宽幅(套常规500或700毫升95口径奶茶杯)</option>
</select>
</div>
<p>
尺寸(cm<span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
</p>
<div class="layui-form-item">
<input type="text" name="size" id="ui_size" placeholder="格式:长*宽" class="layui-input">
<input type="text" name="length" id="ui_size" placeholder="" class="layui-input">
</div>
<p>
数量(个)
@@ -119,9 +129,9 @@
工艺
</p>
<div class="layui-form-item">
<input type="checkbox" name="craft" value="异形模切" title="异形模切" checked/>
<input type="checkbox" name="craft" value="单面覆膜" title="双面覆哑膜"/>
<%-- <input type="checkbox" name="craftTang" value="粘成品" title="粘成品" checked/>--%>
<input type="checkbox" name="craft" value="异形模切" title="异形模切" lay-filter="craft_btn" checked/>
<input type="checkbox" name="craft" value="单面覆膜" title="双面覆哑膜" lay-filter="craft_btn"/>
<input type="checkbox" name="craftTang" value="粘成品" title="粘成品"/>
</div>
</div>
<div id="alien">
@@ -295,6 +305,16 @@
form.render();
}
}); */
form.on("checkbox(craft_btn)", function (data) {
if ($("input[name='craft']:checked").length < 2) {
layer.msg("300克铜版纸模切覆膜工艺必选", {offset: ['300px', '300px']}, function () {
});
$("input[name='craft']").prop('checked', true);
form.render('checkbox');
return false;
}
})
form.on('radio(kindValue)', function (data) {
if (data.value == 0 || data.value == 2) {
$("#normal").show()
@@ -458,7 +478,7 @@
if ($("input[name='craftTang']:checked").val() != null) {
arr.push($("input[name='craftTang']:checked").val());
}
var span_result = '杯套 - ' + kind + '-' + arr + ' - ' + $("#ui_size").val() + 'cm\n';
var span_result = '杯套 - ' + kind + '-' + arr + ' - ' + $("select[name='width'] option:selected").val() + '*' + $("#ui_size").val() + 'cm\n';
} else {
var span_result = '杯套 - ' + kind + ' - ' + [size] + '\n';
//var span_result ='杯套 - ' + kind +'\n';
@@ -28,7 +28,7 @@
<!-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="少数量" title="少数量(100个以内)"> -->
<input type="radio" lay-filter="stickerKind" name="stickerKind" value="专版打印" title="专版打印">
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="封口贴" title="封口贴">--%>
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="插旗" title="插旗">--%>
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="插旗" title="插旗">--%>
<%-- <input type="radio" lay-filter="stickerKind" name="stickerKind" value="双面印刷不干胶" title="双面印刷不干胶">--%>
</div>
</form>
@@ -294,6 +294,8 @@
checked="checked">
<span class="yamo"><input type="radio" name="craftMo" lay-filter="craftMo" value="覆哑膜"
title="覆哑膜"></span>
<span class="nofm"><input type="radio" name="craftMo" lay-filter="craftMo" value="不覆膜"
title="不覆膜"></span>
</span>
<span class="yb">
|&nbsp;&nbsp;&nbsp;&nbsp;
@@ -711,7 +713,7 @@
} else if (TJValue == "彩色印刷+烫金/银") {
html += "广东:(5-6天发货) 中通 圆通 顺丰"
} else {
html += "广东:覆亮膜 (15点前上传系统的当天发货,15点后上传系统的隔天发货);<br>广东:覆哑膜 (2-3天发货);"
html += "广东:覆亮膜 (15点前上传系统的当天发货,15点后上传系统的隔天发货);<br>广东:覆哑膜 (2-3天发货);<br>广东:不覆膜 (48小时发货);"
}
} else if (kindvalue == "2") {
if (TJValue == "纯烫金") {
@@ -859,12 +861,12 @@
$(".fm").find(":input").attr("disabled", true);
}
// PVC、透明没有覆哑膜
/* if(data.value == 1 || data.value == 2){
$(".yamo").find(":input").attr("disabled", true);
if (data.value == 1 && $("input[name='stickerKind']:checked").val() == "常用种类") {
$(".nofm").find(":input").attr("disabled", false);
} else {
$(".nofm").find(":input").attr("disabled", true);
$('input[class = liangmo]').prop('checked', true);
}else{
$(".yamo").find(":input").attr("disabled", false);
} */
}
// 哑金哑银
if (data.value == 5 || data.value == 6) {
// 常规种类凹凸不禁用
@@ -1053,6 +1055,8 @@
// $(this).prop("disabled", false);
// }
// })
} else if (data.value == 1) {
$(".tj").hide();
$(".tj").find(":input").attr("disabled", true);
@@ -1062,6 +1066,8 @@
$(".fm").hide();
$(".fm").find(":input").attr("disabled", true);
}
$(".nofm").find(":input").attr("disabled", true);
$('input[class = liangmo]').prop('checked', true);
if (data.value == 5 || data.value == 6) {
$(".at").show();
$('.at').removeAttr('disabled');
@@ -46,6 +46,14 @@ class="layui-input" value="吊牌"> -->
<span class="craftSheng">
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="棉绳" title="棉绳"
lay-skin="primary">
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳(20cm"
lay-skin="primary">
<div class="shengz tscolor" style="width: 150px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
<option value="银色绳子">银色绳子</option>
</select>
</div>
</span>
<script>
@@ -159,6 +159,14 @@
<option value="红色绳子">红色绳子</option>
</select>
</div>
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳"
title="弹力绳(20cm">
<div class="shengz tscolor" style="width: 150px;display: none">
<select class="select">
<option value="金色绳子">金色绳子</option>
<option value="银色绳子">银色绳子</option>
</select>
</div>
</div>
</div>
</div>
@@ -373,14 +381,26 @@
form.on('radio(craftMo)', function () {
getProductImage()
})
form.on('checkbox(ui_lius)', function (option) {
form.on('checkbox(ui_lius)', function (data) {
getProductImage()
let shengz = $(".shengz:checked").length;
let tshengz = $(".tshengz:checked").length;
if(shengz == 1 && tshengz == 1){
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (shengz == 1) {
$(".scolor").css("display", "inline-block")
} else {
$(".scolor").hide()
}
if (tshengz == 1) {
$(".tscolor").css("display", "inline-block")
} else {
$(".tscolor").hide()
}
})
form.on('radio(stickerKind)', function (stickerKindData) {
if (stickerKindData.value == "常规") {
@@ -419,6 +439,22 @@
layer.msg('烫金和凹凸不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
var craftSheng = $(".craftSheng2:checked").length;
if (craftSheng == 2) {
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
$(data.elem).prop("checked", false);
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
return false;
}
if (data.value == "配弹力绳") {
if ($(data.elem).is(":checked")) {
$(".craftSheng .tscolor").show();
$(".craftSheng .tscolor").prop("disabled", false);
} else {
$(".craftSheng .tscolor").hide();
$(".craftSheng .tscolor").prop("disabled", true);
}
}
getRemoker()
})
@@ -751,7 +787,7 @@
if (!craftSheng) {
span_result += '送通用吊绳'
} else {
span_result += '配棉绳'
span_result += '配' + craftSheng;
}
} else {
if (number > 1) {