修改特种纸价格
Bu işleme şunda yer alıyor:
@@ -1460,25 +1460,27 @@ public class ProductService {
|
|||||||
} else if ("素芸".equals(kind)) {
|
} else if ("素芸".equals(kind)) {
|
||||||
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000};
|
||||||
double[] prices = {};
|
double[] prices = {};
|
||||||
|
prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
|
||||||
|
|
||||||
if (craft_list.contains("圆角") && !craft_list.contains("击凸") && !craft_list.contains("压凹") && !craft_list.contains("单面烫金") && !craft_list.contains("双面烫金")) {
|
if (craft_list.contains("击凸") || craft_list.contains("压凹") || (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
||||||
|
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
||||||
|
}
|
||||||
|
if (craft_list.contains("圆角")) {
|
||||||
prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
|
prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000};
|
||||||
}
|
}
|
||||||
if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
|
if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
|
||||||
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
|
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
|
||||||
}
|
}
|
||||||
if (!craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
|
|
||||||
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
|
||||||
}
|
|
||||||
if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
if (craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
||||||
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
|
prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500};
|
||||||
}
|
}
|
||||||
if (!craft_list.contains("圆角") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
if (craft_list.contains("异形模切") && (craft_list.contains("单面烫金") || craft_list.contains("双面烫金"))) {
|
||||||
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
||||||
}
|
}
|
||||||
if (prices.length == 0 || craft_list.size() == 0 || craft_list.contains("异形模切")) {
|
if (craft_list.contains("异形模切") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) {
|
||||||
prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800};
|
prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300};
|
||||||
}
|
}
|
||||||
|
|
||||||
priceList = new ArrayList<>();
|
priceList = new ArrayList<>();
|
||||||
Product dto2 = null;
|
Product dto2 = null;
|
||||||
|
|
||||||
@@ -1519,11 +1521,7 @@ public class ProductService {
|
|||||||
|
|
||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
if (craft_list.contains("异形模切")) {
|
|
||||||
product.setPrice(Math.floor(product.getPrice() * number * min * 2));
|
|
||||||
} else {
|
|
||||||
product.setPrice(Math.floor(product.getPrice() * number * min));
|
product.setPrice(Math.floor(product.getPrice() * number * min));
|
||||||
}
|
|
||||||
product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5));
|
product.setWeight(df.format(number * (length) / 100 * (width) / 100 * product.getCount() * 0.5));
|
||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
|
|||||||
@@ -1925,7 +1925,14 @@
|
|||||||
$(".tj").hide();
|
$(".tj").hide();
|
||||||
$(".tj").find(":input").attr("disabled", true);
|
$(".tj").find(":input").attr("disabled", true);
|
||||||
}
|
}
|
||||||
|
form.on('checkbox(switchMQ)', function (switchData) {
|
||||||
|
if ($(".mq:checked").length > 1) {
|
||||||
|
$(switchData.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
||||||
|
$(switchData.elem).prop("checked", false);
|
||||||
|
layer.msg('[裁切- 模切]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
})
|
||||||
form.render('checkbox');
|
form.render('checkbox');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -167,10 +167,8 @@
|
|||||||
class="noCraft">
|
class="noCraft">
|
||||||
<input type="checkbox" name="craft" lay-filter="switch" id="craft_dianxian" value="打点线" title="打点线"
|
<input type="checkbox" name="craft" lay-filter="switch" id="craft_dianxian" value="打点线" title="打点线"
|
||||||
class="">
|
class="">
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<input type="checkbox" name="craft" lay-filter="switch" value="压痕" title="压痕">
|
<input type="checkbox" name="craft" lay-filter="switch" value="压痕" title="压痕">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="mianka" style="display: none">
|
<div id="mianka" style="display: none">
|
||||||
<div id="ccolor_type" class="layui-inline" style="width: 180px;display: flex;align-items: center">
|
<div id="ccolor_type" class="layui-inline" style="width: 180px;display: flex;align-items: center">
|
||||||
@@ -184,10 +182,22 @@
|
|||||||
<option value="白色">白色</option>
|
<option value="白色">白色</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
裁切方式:
|
||||||
|
<input type="checkbox" name="craft" lay-filter="mianka" value="直角裁切" title="直角裁切" checked disabled>
|
||||||
<input type="checkbox" name="craft" lay-filter="mianka" value="圆角" title="圆角" disabled>
|
<input type="checkbox" name="craft" lay-filter="mianka" value="圆角" title="圆角" disabled>
|
||||||
<input type="checkbox" name="craft" lay-filter="mianka" value="异形模切" title="异形模切" disabled>
|
<input type="checkbox" name="craft" lay-filter="mianka" value="异形模切" title="异形模切" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline-block">
|
||||||
|
印面:
|
||||||
|
<input type="checkbox" name="craft" lay-filter="mianka" value="单面" title="单面" checked disabled>
|
||||||
|
<input type="checkbox" name="craft" lay-filter="mianka" value="双面" title="双面" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
特殊工艺:
|
||||||
<input type="checkbox" name="craft" lay-filter="mianka" value="击凸" title="击凸" disabled>
|
<input type="checkbox" name="craft" lay-filter="mianka" value="击凸" title="击凸" disabled>
|
||||||
<input type="checkbox" name="craft" lay-filter="mianka" value="压凹" title="压凹" disabled>
|
<input type="checkbox" name="craft" lay-filter="mianka" value="压凹" title="压凹" disabled>
|
||||||
|
</div>
|
||||||
<div id="color_type" class="layui-inline" style="display: none;width: 200px">
|
<div id="color_type" class="layui-inline" style="display: none;width: 200px">
|
||||||
<select name="craft" class="select" disabled>
|
<select name="craft" class="select" disabled>
|
||||||
<option value="无色" selected>无色</option>
|
<option value="无色" selected>无色</option>
|
||||||
@@ -195,8 +205,6 @@
|
|||||||
<option value="有色加凹凸">有色加激凸/有色加压凹</option>
|
<option value="有色加凹凸">有色加激凸/有色加压凹</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<input type="checkbox" name="craft" lay-filter="mianka" value="单面烫金" title="单面烫金">
|
<input type="checkbox" name="craft" lay-filter="mianka" value="单面烫金" title="单面烫金">
|
||||||
@@ -211,6 +219,8 @@
|
|||||||
<option value="烫玫瑰">烫玫瑰</option>
|
<option value="烫玫瑰">烫玫瑰</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-inline-block">
|
||||||
|
常见工艺:
|
||||||
<input type="checkbox" name="craft" lay-filter="switch" value="打码" title="打码">
|
<input type="checkbox" name="craft" lay-filter="switch" value="打码" title="打码">
|
||||||
<div id="dama" class="layui-inline" style="display: none;width: 90px">
|
<div id="dama" class="layui-inline" style="display: none;width: 90px">
|
||||||
<select name="maxian" class="select">
|
<select name="maxian" class="select">
|
||||||
@@ -218,6 +228,7 @@
|
|||||||
<option value="2">2</option>
|
<option value="2">2</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!--<input type="checkbox" name="craft" lay-filter="switch" value="烫金/" title="烫金" class="hasCraft ui_ls_craft">
|
<!--<input type="checkbox" name="craft" lay-filter="switch" value="烫金/" title="烫金" class="hasCraft ui_ls_craft">
|
||||||
<input type="checkbox" name="craft" lay-filter="switch" value="击凸" title="击凸" class="hasCraft">
|
<input type="checkbox" name="craft" lay-filter="switch" value="击凸" title="击凸" class="hasCraft">
|
||||||
<input type="checkbox" name="craft" lay-filter="switch" value="凹凸" title="凹凸" class="ui_ls_craft" disabled="disabled">
|
<input type="checkbox" name="craft" lay-filter="switch" value="凹凸" title="凹凸" class="ui_ls_craft" disabled="disabled">
|
||||||
@@ -488,10 +499,21 @@
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (craft_list.indexOf("圆角") > -1 && craft_list.indexOf("异形模切") > -1) {
|
const caiqie = ["圆角", "异形模切", "直角裁切"];
|
||||||
|
const caiqieExist = caiqie.filter(craft => craft_list.includes(craft));
|
||||||
|
if (caiqieExist.length > 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']}, function () {
|
layer.msg("裁切方式不能同时选择", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const yinmian = ["单面", "双面"];
|
||||||
|
const yinmianExist = yinmian.filter(craft => craft_list.includes(craft));
|
||||||
|
if (yinmianExist.length > 1) {
|
||||||
|
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
||||||
|
$(data.elem).prop("checked", false);
|
||||||
|
layer.msg("印面工艺不能同时选择", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -547,6 +569,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
let kindValue = $("select[name='kindValue'] option:selected").val();
|
||||||
if (craft_list.indexOf("打码") > -1 && craft_list.indexOf("异形模切") > -1) {
|
if (craft_list.indexOf("打码") > -1 && craft_list.indexOf("异形模切") > -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);
|
||||||
@@ -561,9 +584,11 @@
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (kindValue != "素芸") {
|
||||||
$("#dakong").removeAttr('disabled');
|
$("#dakong").removeAttr('disabled');
|
||||||
$("#craft_mo").removeAttr('disabled');
|
$("#craft_mo").removeAttr('disabled');
|
||||||
$(".newCraft").children().removeAttr('disabled');
|
$(".newCraft").children().removeAttr('disabled');
|
||||||
|
}
|
||||||
if ($("#dakong")[0].checked || $("#craft_yuanjiao")[0].checked) {
|
if ($("#dakong")[0].checked || $("#craft_yuanjiao")[0].checked) {
|
||||||
$("#craft_dianxian").prop('disabled', 'disabled');
|
$("#craft_dianxian").prop('disabled', 'disabled');
|
||||||
$("#craft_mo").prop('disabled', 'disabled');
|
$("#craft_mo").prop('disabled', 'disabled');
|
||||||
@@ -701,17 +726,23 @@
|
|||||||
var arr = []
|
var arr = []
|
||||||
let ma_num = $("select[name='maxian'] option:selected").val();
|
let ma_num = $("select[name='maxian'] option:selected").val();
|
||||||
let is_dama = false;
|
let is_dama = false;
|
||||||
|
let arrs = [];
|
||||||
$("input:checkbox[name='craft']:checked").each(function (i) {
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
if (!$(this).is(':disabled')) {
|
if (!$(this).is(':disabled')) {
|
||||||
|
arr.push($(this).val());
|
||||||
if ($(this).val() != "双面覆哑膜") {
|
if ($(this).val() != "双面覆哑膜") {
|
||||||
if ($(this).val() == "单面烫金" || $(this).val() == "双面烫金") {
|
if ($(this).val() == "单面烫金" || $(this).val() == "双面烫金") {
|
||||||
let tangColor = $("#tang_type select[name='craft'] option:selected").val();
|
let tangColor = $("#tang_type select[name='craft'] option:selected").val();
|
||||||
arr.push($(this).val() + tangColor);
|
arrs.push($(this).val().replace("烫金", "") + tangColor);
|
||||||
} else if ($(this).val() == "打码") {
|
} else if ($(this).val() == "打码") {
|
||||||
is_dama = true;
|
is_dama = true;
|
||||||
arr.push($(this).val() + ma_num + "个");
|
arrs.push($(this).val() + ma_num + "个");
|
||||||
|
} else if ($(this).val() == "单面" || $(this).val() == "双面") {
|
||||||
|
arrs.push($(this).val() + "印刷");
|
||||||
|
} else if ($(this).val() == "压凹" || $(this).val() == "击凸") {
|
||||||
|
arrs.push($("#color_type select option:selected").val() + $(this).val());
|
||||||
} else {
|
} else {
|
||||||
arr.push($(this).val());
|
arrs.push($(this).val());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -731,6 +762,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (kindValueSelect == '素芸') {
|
if (kindValueSelect == '素芸') {
|
||||||
|
const caiqie = ["圆角", "异形模切", "直角裁切"];
|
||||||
|
const caiqieExist = caiqie.filter(craft => arr.includes(craft));
|
||||||
|
if (caiqieExist.length == 0) {
|
||||||
|
layer.msg("素芸-请选择裁切工艺", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const yinmian = ["单面", "双面"];
|
||||||
|
const yinmianExist = yinmian.filter(craft => arr.includes(craft));
|
||||||
|
if (yinmianExist.length == 0) {
|
||||||
|
layer.msg("素芸-请选择印面工艺", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let color = $("select[name='craft']:not(:disabled) option:selected").val()
|
let color = $("select[name='craft']:not(:disabled) option:selected").val()
|
||||||
if (color) {
|
if (color) {
|
||||||
arr.push(color);
|
arr.push(color);
|
||||||
@@ -747,7 +792,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var data = result.data.proList;
|
var data = result.data.proList;
|
||||||
|
arr = arrs;
|
||||||
var span_result = '特种纸名片(不配绳子)' + "-不覆膜-" + kindValueSelect + "-" + size
|
var span_result = '特种纸名片(不配绳子)' + "-不覆膜-" + kindValueSelect + "-" + size
|
||||||
+ "厘米-(同款内容) \n" + "工艺 :" + arr + "\n"
|
+ "厘米-(同款内容) \n" + "工艺 :" + arr + "\n"
|
||||||
if (number > 1) {
|
if (number > 1) {
|
||||||
|
|||||||
Yeni konuda referans
Bir kullanıcı engelle