修改卡片价格
This commit is contained in:
@@ -818,6 +818,16 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!"7".equals(dto.getKind()) && !"8".equals(dto.getKind()) && !"1".equals(dto.getKind())) {
|
||||||
|
if ((length < 4 || width < 4)) {
|
||||||
|
for (int i = 0; i < dto.getCraft().length; i++) {
|
||||||
|
if ("直角裁切".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "模切";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
String[] kind_list = {"3", "4", "5", "7"};
|
String[] kind_list = {"3", "4", "5", "7"};
|
||||||
dto.setD("");
|
dto.setD("");
|
||||||
@@ -825,7 +835,7 @@ public class ProductService {
|
|||||||
boolean isyaofeng = false;
|
boolean isyaofeng = false;
|
||||||
|
|
||||||
double moqiePrice = 0;
|
double moqiePrice = 0;
|
||||||
if ("1".equals(dto.getKind()) && !craft_list.contains("模切") && (craft_list.contains("压痕") || craft_list.contains("压点线"))) {
|
if (!craft_list.contains("模切") && (craft_list.contains("压痕") || craft_list.contains("压点线"))) {
|
||||||
//压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM按照贺卡模切价格算
|
//压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM按照贺卡模切价格算
|
||||||
boolean is_moqie = false;
|
boolean is_moqie = false;
|
||||||
if ((craft_list.contains("压痕") && dto.getYaheng() == 1) || (craft_list.contains("压点线") && dto.getDadianxian() == 1)) {
|
if ((craft_list.contains("压痕") && dto.getYaheng() == 1) || (craft_list.contains("压点线") && dto.getDadianxian() == 1)) {
|
||||||
@@ -898,8 +908,14 @@ public class ProductService {
|
|||||||
}
|
}
|
||||||
//300克铜版纸 贺卡 优惠券 抽奖券 存酒卡价格重新计算
|
//300克铜版纸 贺卡 优惠券 抽奖券 存酒卡价格重新计算
|
||||||
if ((Arrays.asList(kind_list).contains(dto.getKind()) && "2".equals(dto.getKindValue2())) || isyaofeng) {
|
if ((Arrays.asList(kind_list).contains(dto.getKind()) && "2".equals(dto.getKindValue2())) || isyaofeng) {
|
||||||
|
boolean is_moqie = false;
|
||||||
if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) {
|
if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) {
|
||||||
|
is_moqie = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_moqie) {
|
||||||
priceList = getOtherHekaPrice(dto, width, length);
|
priceList = getOtherHekaPrice(dto, width, length);
|
||||||
|
moqiePrice = 0;
|
||||||
for (int i = 0; i < dto.getCraft().length; i++) {
|
for (int i = 0; i < dto.getCraft().length; i++) {
|
||||||
if ("模切".equals(dto.getCraft()[i])) {
|
if ("模切".equals(dto.getCraft()[i])) {
|
||||||
dto.getCraft()[i] = "";
|
dto.getCraft()[i] = "";
|
||||||
@@ -4957,7 +4973,7 @@ public class ProductService {
|
|||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setWeight(df.format(width / 100 * length / 100 * product.getCount() * 0.48 * 1.4));
|
product.setWeight(df.format(width / 100 * length / 100 * product.getCount() * 0.48 * 1.4));
|
||||||
if (carftList.contains("装opp袋")) {
|
if (carftList.contains("装opp袋")) {
|
||||||
product.setPrice(Math.ceil(product.getPrice() + product.getCount() * dto.getNumber() * 0.33));
|
product.setPrice(Math.ceil(product.getPrice() + Math.max(product.getCount() * dto.getNumber() * 0.33, 100)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return priceList;
|
return priceList;
|
||||||
@@ -5114,7 +5130,8 @@ public class ProductService {
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Product> getAreaNextPrice(int[] count_list, int count, double area, double[][] prices, double[] areas, int number) {
|
private List<Product> getAreaNextPrice(int[] count_list, int count, double area, double[][] prices,
|
||||||
|
double[] areas, int number) {
|
||||||
List<Product> priceList = new ArrayList<>();
|
List<Product> priceList = new ArrayList<>();
|
||||||
for (int i = 0; i < count_list.length; i++) {
|
for (int i = 0; i < count_list.length; i++) {
|
||||||
int count_item = count_list[i];
|
int count_item = count_list[i];
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="3z_yuan_size" style="display: none">
|
<div id="3z_yuan_size" style="display: none">
|
||||||
<select name="z3size1" lay-filter="z3size1" class="select">
|
<select name="z3size1" lay-filter="z3size1" class="select">
|
||||||
<%-- <option value="8.5*8.5">8.5*8.5 cm</option>--%>
|
<%-- <option value="8.5*8.5">8.5*8.5 cm</option>--%>
|
||||||
<option value="9*9">9*9 cm</option>
|
<option value="9*9">9*9 cm</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -456,10 +456,10 @@
|
|||||||
<p>
|
<p>
|
||||||
工艺 <span style="font-size:12px;color:red">优惠券异形模切+打码限于简单刀版(无法做圆形 椭圆机)最小9*5.4 300克腰封压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价</span>
|
工艺 <span style="font-size:12px;color:red">优惠券异形模切+打码限于简单刀版(无法做圆形 椭圆机)最小9*5.4 300克腰封压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价</span>
|
||||||
</p>
|
</p>
|
||||||
<%-- <div class="layui-input-block doublefumo" style="display:inline-block;">--%>
|
<%-- <div class="layui-input-block doublefumo" style="display:inline-block;">--%>
|
||||||
<%-- <input type="checkbox" class="ui_double_fm" name="craft" lay-filter="ui_fm" value="双面覆哑膜"--%>
|
<%-- <input type="checkbox" class="ui_double_fm" name="craft" lay-filter="ui_fm" value="双面覆哑膜"--%>
|
||||||
<%-- title="双面覆哑膜">--%>
|
<%-- title="双面覆哑膜">--%>
|
||||||
<%-- </div>--%>
|
<%-- </div>--%>
|
||||||
|
|
||||||
<div class="layui-input-block craft tj" style="display:inline-block;">
|
<div class="layui-input-block craft tj" style="display:inline-block;">
|
||||||
<input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="单面烫金"
|
<input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="单面烫金"
|
||||||
@@ -481,7 +481,7 @@
|
|||||||
<input type="checkbox" name="craft" class="yh disab max ya cjkDisab" lay-filter="switch"
|
<input type="checkbox" name="craft" class="yh disab max ya cjkDisab" lay-filter="switch"
|
||||||
value="压痕" title="压痕">
|
value="压痕" title="压痕">
|
||||||
<div class="layui-inline edge yahenHide" style="width:60px; display:none">
|
<div class="layui-inline edge yahenHide" style="width:60px; display:none">
|
||||||
<select name="yahen" class="select yahen" lay-filter="yahen">
|
<select name="yaheng" class="select yahen" lay-filter="yahen">
|
||||||
<option value="1" selected>1</option>
|
<option value="1" selected>1</option>
|
||||||
<option value="2">2</option>
|
<option value="2">2</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
lay-filter="switch" value="压点线" title="压点线">
|
lay-filter="switch" value="压点线" title="压点线">
|
||||||
</span>
|
</span>
|
||||||
<div class="layui-inline edge yadianxianHide" style="width:60px;display:none">
|
<div class="layui-inline edge yadianxianHide" style="width:60px;display:none">
|
||||||
<select name="yadianxian" class="select yadianxian" lay-filter="yadianxian">
|
<select name="dadianxian" class="select yadianxian" lay-filter="yadianxian">
|
||||||
<option value="1" selected>1</option>
|
<option value="1" selected>1</option>
|
||||||
<option value="2">2</option>
|
<option value="2">2</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -1528,6 +1528,8 @@
|
|||||||
$('input[class = mq]').prop('checked', false);
|
$('input[class = mq]').prop('checked', false);
|
||||||
$('input[class = mq][value=直角裁切]').prop('checked', true);
|
$('input[class = mq][value=直角裁切]').prop('checked', true);
|
||||||
if (data.value == 0 || data.value == 1) {
|
if (data.value == 0 || data.value == 1) {
|
||||||
|
$(".count").show();
|
||||||
|
$(".count").find(":input").attr("disabled", false);
|
||||||
$("#kindValueForm")[0].reset();
|
$("#kindValueForm")[0].reset();
|
||||||
$(".kindValue").show();
|
$(".kindValue").show();
|
||||||
$(".kindValue").attr("disabled", false);
|
$(".kindValue").attr("disabled", false);
|
||||||
@@ -2664,17 +2666,9 @@
|
|||||||
var length = size.split("*")[0];
|
var length = size.split("*")[0];
|
||||||
var width = size.split("*")[1];
|
var width = size.split("*")[1];
|
||||||
if ($(".yahen").val() == 1) {
|
if ($(".yahen").val() == 1) {
|
||||||
if ((length < 10.8 || width < 6) && (length < 6 || width < 10.8)) {
|
|
||||||
$('input[class = disab]').prop('checked', false);
|
|
||||||
$(".disab").attr("disabled", true);
|
|
||||||
$('input[class = mq]').prop('checked', true);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ((length < 13.5 || width < 5.4) && (length < 5.4 || width < 13.5)) {
|
|
||||||
$('input[class = disab]').prop('checked', false);
|
|
||||||
$(".disab").attr("disabled", true);
|
|
||||||
$('input[class = mq]').prop('checked', true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(".yahenHide").hide();
|
$(".yahenHide").hide();
|
||||||
@@ -3292,7 +3286,7 @@
|
|||||||
var w2 = Math.ceil(size.split("*")[0] / 5.4);
|
var w2 = Math.ceil(size.split("*")[0] / 5.4);
|
||||||
var min = Math.min(l1 * w1, l2 * w2);
|
var min = Math.min(l1 * w1, l2 * w2);
|
||||||
if (couponKind == '常用种类') {
|
if (couponKind == '常用种类') {
|
||||||
if (kind != 7 && kind != 8) {
|
if (kind ==1) {
|
||||||
if ((size.split("*")[0] <= 9 && size.split("*")[1] <= 5.4) || (size.split("*")[0] <= 5.4 && size.split("*")[1] <= 9)) {
|
if ((size.split("*")[0] <= 9 && size.split("*")[1] <= 5.4) || (size.split("*")[0] <= 5.4 && size.split("*")[1] <= 9)) {
|
||||||
if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
|
if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
|
||||||
layer.msg("[ 卡片 ]9*5.4 cm以内,尺寸小于4 cm请以 [ 插卡 - 异形插牌 ] 报价!", {offset: ['300px', '300px']}, function () {
|
layer.msg("[ 卡片 ]9*5.4 cm以内,尺寸小于4 cm请以 [ 插卡 - 异形插牌 ] 报价!", {offset: ['300px', '300px']}, function () {
|
||||||
|
|||||||
Viittaa uudesa ongelmassa
Block a user