edit
This commit is contained in:
@@ -601,12 +601,18 @@ public class ProductService {
|
|||||||
priceList = priceList.subList(0, 4);
|
priceList = priceList.subList(0, 4);
|
||||||
}
|
}
|
||||||
List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
List<String> crafts_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||||
|
int[] shengzi = {1, 2, 4, 8, 12, 16, 20, 40};
|
||||||
|
int[] count_list = {200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
||||||
// 根据款数重新算价格/计算重量
|
// 根据款数重新算价格/计算重量
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.floor(product.getPrice() * number));
|
product.setPrice(Math.floor(product.getPrice() * number));
|
||||||
if (crafts_list.contains("弹力绳")) {
|
if (crafts_list.contains("弹力绳")) {
|
||||||
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
||||||
}
|
}
|
||||||
|
if (crafts_list.contains("弹力绳捆")) {
|
||||||
|
int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
||||||
|
product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
||||||
|
}
|
||||||
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
product.setWeight(df.format(number * length * width * product.getCount() * 0.00003));
|
||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
@@ -691,7 +697,8 @@ public class ProductService {
|
|||||||
};
|
};
|
||||||
double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400};
|
double[] areas = {16, 25, 30, 35, 36, 40, 45, 48.60, 49, 54, 64, 81, 97.20, 100, 145.80, 172.8, 194.4, 224, 288, 294, 400};
|
||||||
double[] tang_areas = {50, 100, 150, 250, 350, 450};
|
double[] tang_areas = {50, 100, 150, 250, 350, 450};
|
||||||
int[] count_list = {200, 500, 1000, 2000, 3000, 5000, 10000};
|
count_list = new int[]{200, 500, 1000, 2000, 3000, 5000, 10000};
|
||||||
|
int[] shenzi_list = {1, 2, 4, 8, 12, 20, 40};
|
||||||
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<>();
|
||||||
for (int i = 0; i < count_list.length; i++) {
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
int item_count = count_list[i];
|
int item_count = count_list[i];
|
||||||
@@ -742,6 +749,10 @@ public class ProductService {
|
|||||||
if (craft_list.contains("配弹力绳")) {
|
if (craft_list.contains("配弹力绳")) {
|
||||||
carft_price += Math.max(0.1 * item_count, 10);
|
carft_price += Math.max(0.1 * item_count, 10);
|
||||||
}
|
}
|
||||||
|
if (craft_list.contains("配弹力绳捆")) {
|
||||||
|
carft_price += 10 * shenzi_list[count_index];
|
||||||
|
|
||||||
|
}
|
||||||
double tang_price = 0;
|
double tang_price = 0;
|
||||||
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
if (craft_list.contains("单面烫金") || craft_list.contains("双面烫金")) {
|
||||||
tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas);
|
tang_price = new PriceUtils().TablePrice(area, tang_prices[count_index], tang_areas);
|
||||||
@@ -894,6 +905,8 @@ public class ProductService {
|
|||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
priceList = getHekaPrice(min, product1, priceList, count);
|
priceList = getHekaPrice(min, product1, priceList, count);
|
||||||
getCraft(product1, priceList, length * 10, width * 10, min);
|
getCraft(product1, priceList, length * 10, width * 10, min);
|
||||||
|
shengzi = new int[]{1, 2, 4, 8, 12, 16, 20, 40};
|
||||||
|
count_list = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
if ("凹凸".equals(dto.getAotu())) {
|
if ("凹凸".equals(dto.getAotu())) {
|
||||||
product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153)));
|
product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153)));
|
||||||
@@ -901,6 +914,10 @@ public class ProductService {
|
|||||||
if (craft.contains("弹力绳")) {
|
if (craft.contains("弹力绳")) {
|
||||||
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
product.setPrice(Math.floor(product.getPrice() + Math.max(10, product.getCount() * 0.1)));
|
||||||
}
|
}
|
||||||
|
if (craft.contains("弹力绳捆")) {
|
||||||
|
int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
||||||
|
product.setPrice(Math.floor(product.getPrice() + shengzi[currentIndex] * 10));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 根据款数重新算价格/计算重量
|
// 根据款数重新算价格/计算重量
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -972,6 +989,8 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
shengzi = new int[]{1, 2, 4, 8, 12, 16, 20, 40};
|
||||||
|
count_list = new int[]{200, 500, 1000, 2000, 3000, 4000, 5000, 10000};
|
||||||
// +棉绳钱 1分5一条
|
// +棉绳钱 1分5一条
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("棉绳")) {
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("棉绳")) {
|
||||||
@@ -980,6 +999,10 @@ public class ProductService {
|
|||||||
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳")) {
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳")) {
|
||||||
product.setPrice(product.getPrice() + Math.max(product.getCount() * 0.1, 10));
|
product.setPrice(product.getPrice() + Math.max(product.getCount() * 0.1, 10));
|
||||||
}
|
}
|
||||||
|
if (!StringUtils.isEmpty(dto.getCraftSheng()) && dto.getCraftSheng().contains("弹力绳捆")) {
|
||||||
|
int currentIndex = Arrays.binarySearch(count_list, product.getCount());
|
||||||
|
product.setPrice(product.getPrice() + 10 * shengzi[currentIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6));
|
product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6));
|
||||||
@@ -1105,7 +1128,7 @@ public class ProductService {
|
|||||||
priceList.add(dto2);
|
priceList.add(dto2);
|
||||||
getCraft(dto, priceList, null, null, 0);
|
getCraft(dto, priceList, null, null, 0);
|
||||||
} else if ("素芸".equals(kind)) {
|
} else if ("素芸".equals(kind)) {
|
||||||
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
count_list = new int[]{100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
||||||
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<>();
|
||||||
double[] prices = {};
|
double[] prices = {};
|
||||||
if (craft_list.size() == 0 || craft_list.contains("异形模切")) {
|
if (craft_list.size() == 0 || craft_list.contains("异形模切")) {
|
||||||
@@ -1149,7 +1172,7 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
} else if ("草香".equals(kind) || "芳怡".equals(kind)) {
|
||||||
int[] count_list = {200, 500, 1000, 2000, 5000, 10000};
|
count_list = new int[]{200, 500, 1000, 2000, 5000, 10000};
|
||||||
// 出血(一边2毫米)
|
// 出血(一边2毫米)
|
||||||
length = length * 10 + 4;
|
length = length * 10 + 4;
|
||||||
width = width * 10 + 4;
|
width = width * 10 + 4;
|
||||||
@@ -3541,7 +3564,7 @@ public class ProductService {
|
|||||||
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
product.setPrice(Math.floor(product.getPrice() * 1.3));
|
||||||
}
|
}
|
||||||
} else if ("10".equals(kind) || "11".equals(kind)) {
|
} else if ("10".equals(kind) || "11".equals(kind)) {
|
||||||
int[] count_list = {50, 100, 200, 500, 1000};
|
count_list = new int[]{50, 100, 200, 500, 1000};
|
||||||
double[] jitu = {};
|
double[] jitu = {};
|
||||||
double[] jitu_add = {};
|
double[] jitu_add = {};
|
||||||
double[] tang = {};
|
double[] tang = {};
|
||||||
@@ -4190,7 +4213,7 @@ public class ProductService {
|
|||||||
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
{226, 312, 368, 452, 550, 672, 814, 980, 1358, 1636, 1746, 2008, 2190, 2502, 2970},
|
||||||
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
{274, 470, 594, 784, 988, 1250, 1518, 1854, 2614, 3184, 3398, 3936, 4298, 4916, 5872},
|
||||||
};
|
};
|
||||||
int[] count_list = {500, 1000, 2000, 3000, 5000, 10000, 20000};
|
count_list = new int[]{500, 1000, 2000, 3000, 5000, 10000, 20000};
|
||||||
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81};
|
||||||
|
|
||||||
area = length * width;
|
area = length * width;
|
||||||
|
|||||||
@@ -670,7 +670,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳"
|
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳"
|
||||||
title="配弹力绳(20cm)">
|
title="配弹力绳(15cm)">
|
||||||
|
<input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳捆"
|
||||||
|
title="配弹力绳(捆)">
|
||||||
<div class="layui-inline shengz tscolor" style="width: 110px;display: none">
|
<div class="layui-inline shengz tscolor" style="width: 110px;display: none">
|
||||||
<select class="select">
|
<select class="select">
|
||||||
<option value="金色绳子">金色绳子</option>
|
<option value="金色绳子">金色绳子</option>
|
||||||
@@ -1017,7 +1019,7 @@
|
|||||||
$("#z4_craft .shengz").prop("disabled", true);
|
$("#z4_craft .shengz").prop("disabled", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.value == "配弹力绳" ) {
|
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
|
||||||
if ($(data.elem).is(":checked")) {
|
if ($(data.elem).is(":checked")) {
|
||||||
$("#z4_craft .tscolor").show();
|
$("#z4_craft .tscolor").show();
|
||||||
$("#z4_craft .tscolor").prop("disabled", false);
|
$("#z4_craft .tscolor").prop("disabled", false);
|
||||||
@@ -2688,6 +2690,14 @@
|
|||||||
arr.push($(this).val() + "-" + $("select[name='shen_color'] option:selected").val())
|
arr.push($(this).val() + "-" + $("select[name='shen_color'] option:selected").val())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($(this).val() == "配弹力绳捆") {
|
||||||
|
arr.push("配弹力绳(捆)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ($(this).val() == "配弹力绳") {
|
||||||
|
arr.push("配弹力绳(15CM)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arr.push($(this).val());
|
arr.push($(this).val());
|
||||||
@@ -3135,9 +3145,15 @@
|
|||||||
$("input:checkbox[name='craft']:checked").each(function (i) {
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
if ($(this).val() != "双面覆哑膜") {
|
if ($(this).val() != "双面覆哑膜") {
|
||||||
|
if ($(this).val() == "配弹力绳捆") {
|
||||||
|
arr.push("配弹力绳(捆)");
|
||||||
|
} else if ($(this).val() == "配弹力绳") {
|
||||||
|
arr.push("配弹力绳(15CM)");
|
||||||
|
} else {
|
||||||
arr.push($(this).val());
|
arr.push($(this).val());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
kindValueSelect = $(".kindValueSelect option:checked").text();
|
kindValueSelect = $(".kindValueSelect option:checked").text();
|
||||||
} else if (kind == 8) {
|
} else if (kind == 8) {
|
||||||
@@ -3240,6 +3256,7 @@
|
|||||||
+ "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
|
+ "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let count_price = {200: 1, 500: 2, 1000: 4, 2000: 8, 3000: 12, 4000: 16, 5000: 20, 10000: 40};
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
if (couponKind == "少数量") {
|
if (couponKind == "少数量") {
|
||||||
let numberType = $("#desType option:selected").text();
|
let numberType = $("#desType option:selected").text();
|
||||||
@@ -3247,12 +3264,28 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
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'
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
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'
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ class="layui-input" value="吊牌"> -->
|
|||||||
<span class="craftSheng">
|
<span class="craftSheng">
|
||||||
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="棉绳" title="棉绳"
|
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="棉绳" title="棉绳"
|
||||||
lay-skin="primary">
|
lay-skin="primary">
|
||||||
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳(20cm)"
|
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳(15cm)"
|
||||||
|
lay-skin="primary">
|
||||||
|
<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳捆" title="配弹力绳(捆)"
|
||||||
lay-skin="primary">
|
lay-skin="primary">
|
||||||
<div class="shengz tscolor" style="width: 150px;display: none">
|
<div class="shengz tscolor" style="width: 150px;display: none">
|
||||||
<select class="select">
|
<select class="select">
|
||||||
|
|||||||
@@ -160,7 +160,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳"
|
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳"
|
||||||
title="弹力绳(20cm)">
|
title="弹力绳(15cm)">
|
||||||
|
<input type="checkbox" class="tshengz" name="craft" lay-filter="ui_lius" value="弹力绳捆"
|
||||||
|
title="弹力绳(捆)">
|
||||||
<div class="shengz tscolor" style="width: 150px;display: none">
|
<div class="shengz tscolor" style="width: 150px;display: none">
|
||||||
<select class="select">
|
<select class="select">
|
||||||
<option value="金色绳子">金色绳子</option>
|
<option value="金色绳子">金色绳子</option>
|
||||||
@@ -385,12 +387,18 @@
|
|||||||
getProductImage()
|
getProductImage()
|
||||||
let shengz = $(".shengz:checked").length;
|
let shengz = $(".shengz:checked").length;
|
||||||
let tshengz = $(".tshengz:checked").length;
|
let tshengz = $(".tshengz:checked").length;
|
||||||
if(shengz == 1 && tshengz == 1){
|
if (shengz == 1 && tshengz == 1) {
|
||||||
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
||||||
$(data.elem).prop("checked", false);
|
$(data.elem).prop("checked", false);
|
||||||
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (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) {
|
if (shengz == 1) {
|
||||||
$(".scolor").css("display", "inline-block")
|
$(".scolor").css("display", "inline-block")
|
||||||
} else {
|
} else {
|
||||||
@@ -446,7 +454,7 @@
|
|||||||
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
layer.msg('棉绳和弹力绳不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data.value == "配弹力绳") {
|
if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
|
||||||
if ($(data.elem).is(":checked")) {
|
if ($(data.elem).is(":checked")) {
|
||||||
$(".craftSheng .tscolor").show();
|
$(".craftSheng .tscolor").show();
|
||||||
$(".craftSheng .tscolor").prop("disabled", false);
|
$(".craftSheng .tscolor").prop("disabled", false);
|
||||||
@@ -711,6 +719,12 @@
|
|||||||
arr = []
|
arr = []
|
||||||
//arr = $('input[name="kind2Value"]:checked').val();
|
//arr = $('input[name="kind2Value"]:checked').val();
|
||||||
// arr.push("双面哑膜");
|
// arr.push("双面哑膜");
|
||||||
|
let shengcraft = $("input[name='craftSheng']:checked").val();
|
||||||
|
if (shengcraft == "配弹力绳") {
|
||||||
|
arr.push("配弹力绳(15CM)")
|
||||||
|
} else if (shengcraft == "配弹力绳捆") {
|
||||||
|
arr.push("配弹力绳(捆)")
|
||||||
|
}
|
||||||
arr.push($('input[name="kind2Value"]:checked').val());
|
arr.push($('input[name="kind2Value"]:checked').val());
|
||||||
} else if ($('input[name="kindValue"]:checked').val() == "6") {
|
} else if ($('input[name="kindValue"]:checked').val() == "6") {
|
||||||
craftQie = ""
|
craftQie = ""
|
||||||
@@ -733,6 +747,12 @@
|
|||||||
arr = []
|
arr = []
|
||||||
//arr = $('input[name="kind2Value"]:checked').val();
|
//arr = $('input[name="kind2Value"]:checked').val();
|
||||||
// arr.push("双面哑膜");
|
// arr.push("双面哑膜");
|
||||||
|
let shengcraft = $("input[name='craftSheng']:checked").val();
|
||||||
|
if (shengcraft == "配弹力绳") {
|
||||||
|
arr.push("配弹力绳(15CM)")
|
||||||
|
} else if (shengcraft == "配弹力绳捆") {
|
||||||
|
arr.push("配弹力绳(捆)")
|
||||||
|
}
|
||||||
arr.push($('input[name="kind2Value"]:checked').val());
|
arr.push($('input[name="kind2Value"]:checked').val());
|
||||||
} else if ($('input[name="kindValue"]:checked').val() == "3") { // && craftQie == "异形模切"
|
} else if ($('input[name="kindValue"]:checked').val() == "3") { // && craftQie == "异形模切"
|
||||||
var size2 = $(".size2").val();
|
var size2 = $(".size2").val();
|
||||||
@@ -743,8 +763,16 @@
|
|||||||
$("input:checkbox[name='craft']:checked").each(function (i) {
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
if ($(this).val() != "双面覆哑膜") {
|
if ($(this).val() != "双面覆哑膜") {
|
||||||
|
if ($(this).val() == "弹力绳") {
|
||||||
|
arr.push("配弹力绳(15cm)");
|
||||||
|
} else if ($(this).val() == "弹力绳捆") {
|
||||||
|
arr.push("配弹力绳(捆)");
|
||||||
|
} else {
|
||||||
arr.push($(this).val());
|
arr.push($(this).val());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -770,16 +798,33 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let count_price = {200: 1, 500: 2, 1000: 4, 2000: 8, 3000: 12, 4000: 16, 5000: 20, 10000: 40};
|
||||||
if (kindValue == 3) {
|
if (kindValue == 3) {
|
||||||
|
|
||||||
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'
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
span_result += data[i].count + "张" + data[i].price + "元" + '\n'
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += data[i].count + "张" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -791,13 +836,32 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
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'
|
|
||||||
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += number + '款 各' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
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'
|
let price_text = "";
|
||||||
|
|
||||||
|
if (arr.indexOf("配弹力绳(捆)") > -1) {
|
||||||
|
let price_count = count_price[data[i].count];
|
||||||
|
if (price_count) {
|
||||||
|
price_text = "," + price_count + "捆";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span_result += number + '款 ' + data[i].count + "张,共" + data[i].price + "元" + price_text + '\n'
|
||||||
data[i].number = number;
|
data[i].number = number;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user