修改卡片腰封工艺,新增栏目
This commit is contained in:
@@ -176,4 +176,6 @@ public class Product {
|
|||||||
private String plantName;
|
private String plantName;
|
||||||
private String ui_menu_size;
|
private String ui_menu_size;
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -806,24 +806,36 @@ public class ProductService {
|
|||||||
int min = getNum(length, width);
|
int min = getNum(length, width);
|
||||||
String[] kind_list = {"3", "4", "5", "7"};
|
String[] kind_list = {"3", "4", "5", "7"};
|
||||||
priceList = getHekaPrice(min, dto, priceList, count);
|
priceList = getHekaPrice(min, dto, priceList, count);
|
||||||
|
boolean isyaofeng = false;
|
||||||
|
|
||||||
if (Arrays.asList(kind_list).contains(dto.getKind()) && "2".equals(dto.getKindValue2())) {
|
|
||||||
if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) {
|
|
||||||
priceList = getOtherHekaPrice(dto, width, length);
|
|
||||||
for (int i = 0; i < dto.getCraft().length; i++) {
|
|
||||||
if ("模切".equals(dto.getCraft()[i])) {
|
|
||||||
dto.getCraft()[i] = "";
|
|
||||||
}
|
|
||||||
if ("双面覆哑膜".equals(dto.getCraft()[i])) {
|
|
||||||
dto.getCraft()[i] = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
double moqiePrice = 0;
|
double moqiePrice = 0;
|
||||||
|
if ("1".equals(dto.getKind()) && !craft_list.contains("模切") && (craft_list.contains("压痕") || craft_list.contains("压点线"))) {
|
||||||
//腰封价格加上模板费
|
//压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM按照贺卡模切价格算
|
||||||
if ("1".equals(dto.getKind())) {
|
boolean is_moqie = false;
|
||||||
|
if ((craft_list.contains("压痕") && dto.getYaheng() == 1) || (craft_list.contains("压点线") && dto.getDadianxian() == 1)) {
|
||||||
|
if ((length < 10.8 && width < 5.4) || (length < 5.4 && width < 10.8)) {
|
||||||
|
is_moqie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (craft_list.contains("压痕") && dto.getYaheng() == 2 || (craft_list.contains("压点线") && dto.getDadianxian() == 2)) {
|
||||||
|
if ((length < 13.5 && width < 5.4) || (length < 5.4 && width < 13.5)) {
|
||||||
|
is_moqie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_moqie) {
|
||||||
|
isyaofeng = true;
|
||||||
|
for (int i = 0; i < dto.getCraft().length; i++) {
|
||||||
|
if ("压痕".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "模切";
|
||||||
|
}
|
||||||
|
if ("压点线".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "模切";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//300克铜版纸 腰封价格加上模板费--腰封的模切费
|
||||||
|
if ("1".equals(dto.getKind()) && craft_list.contains("模切") && !isyaofeng) {
|
||||||
double[][] CATEGORIES = {
|
double[][] CATEGORIES = {
|
||||||
{105, 140}, // 第一档
|
{105, 140}, // 第一档
|
||||||
{140, 210}, // 第二档
|
{140, 210}, // 第二档
|
||||||
@@ -850,11 +862,17 @@ public class ProductService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) {
|
if (dto.getCraft() != null && craft_list.contains("模切")) {
|
||||||
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] = "";
|
||||||
}
|
}
|
||||||
|
if ("压痕".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
|
if ("压点线".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
moqiePrice = 0.06;
|
moqiePrice = 0.06;
|
||||||
}
|
}
|
||||||
@@ -862,6 +880,26 @@ public class ProductService {
|
|||||||
product.setPrice(product.getPrice() + mu_price);
|
product.setPrice(product.getPrice() + mu_price);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//300克铜版纸 贺卡 优惠券 抽奖券 存酒卡价格重新计算
|
||||||
|
if ((Arrays.asList(kind_list).contains(dto.getKind()) && "2".equals(dto.getKindValue2())) || isyaofeng) {
|
||||||
|
if (dto.getCraft() != null && Arrays.asList(dto.getCraft()).contains("模切")) {
|
||||||
|
priceList = getOtherHekaPrice(dto, width, length);
|
||||||
|
for (int i = 0; i < dto.getCraft().length; i++) {
|
||||||
|
if ("模切".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
|
if ("双面覆哑膜".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
|
if ("压痕".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
|
if ("压点线".equals(dto.getCraft()[i])) {
|
||||||
|
dto.getCraft()[i] = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
//四个位拼多多价格调整
|
//四个位拼多多价格调整
|
||||||
if (role.indexOf("1045") > -1 && min == 4) {
|
if (role.indexOf("1045") > -1 && min == 4) {
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
@@ -2495,11 +2533,14 @@ public class ProductService {
|
|||||||
//if(role.indexOf("1000") > -1 || role.indexOf("1006") > -1) {//菇凉&卓胜uv单独报价 priceList = new PriceUtils().UVStickerLessPrice(length, width, count,number, dto.getCraft()); }else {
|
//if(role.indexOf("1000") > -1 || role.indexOf("1006") > -1) {//菇凉&卓胜uv单独报价 priceList = new PriceUtils().UVStickerLessPrice(length, width, count,number, dto.getCraft()); }else {
|
||||||
|
|
||||||
// 1006 1003 1005 1037 1058 1002 1033 1045 卓盛 航和 米笛儿 竹范 领淘文具 榆家 涛莱 拼多多uv单独报价
|
// 1006 1003 1005 1037 1058 1002 1033 1045 卓盛 航和 米笛儿 竹范 领淘文具 榆家 涛莱 拼多多uv单独报价
|
||||||
priceList = new PriceUtils().UVStickerSmallPriceV2(length, width, count, number, dto.getCraftMo(), dto.getCraft(), role.indexOf("1045") > -1);
|
List<String> crafts = new ArrayList<>(dto.getCraft() == null ? new ArrayList<>() : Arrays.asList(dto.getCraft()));
|
||||||
|
crafts.remove("刮板");
|
||||||
|
String[] newCrafts = crafts.size() == 0 ? null : crafts.stream().toArray(String[]::new);
|
||||||
|
priceList = new PriceUtils().UVStickerSmallPriceV2(length, width, count, number, dto.getCraftMo(), newCrafts, role.indexOf("1045") > -1);
|
||||||
if (priceList.get(0).getCount() != count) {
|
if (priceList.get(0).getCount() != count) {
|
||||||
priceList.get(0).setCount(count);
|
priceList.get(0).setCount(count);
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(dto.getCraft())) {
|
if (!StringUtils.isEmpty(newCrafts)) {
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(product.getPrice() * number);
|
product.setPrice(product.getPrice() * number);
|
||||||
}
|
}
|
||||||
@@ -2733,12 +2774,17 @@ public class ProductService {
|
|||||||
zhang9 = 5;
|
zhang9 = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cutFee = 50;
|
||||||
|
if (!StringUtils.isEmpty(dto.getCraft()))
|
||||||
|
cutFee = 100;
|
||||||
} else if ((length - 4 <= 570 && width - 4 <= 420) || (length - 4 <= 420 && width - 4 <= 570)) {
|
} else if ((length - 4 <= 570 && width - 4 <= 420) || (length - 4 <= 420 && width - 4 <= 570)) {
|
||||||
if ("特种纸名片".equals(dto.getKind())) {
|
if ("特种纸名片".equals(dto.getKind())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
fixPrice = 60.0;
|
fixPrice = 60.0;
|
||||||
zhang = 5;
|
zhang = 5;
|
||||||
|
cutFee = 50;
|
||||||
|
if (!StringUtils.isEmpty(dto.getCraft()))
|
||||||
cutFee = 150;
|
cutFee = 150;
|
||||||
l = 570;
|
l = 570;
|
||||||
w = 420;
|
w = 420;
|
||||||
@@ -2755,6 +2801,7 @@ public class ProductService {
|
|||||||
} else {
|
} else {
|
||||||
zhang = 6;
|
zhang = 6;
|
||||||
}
|
}
|
||||||
|
cutFee = 50;
|
||||||
if (!StringUtils.isEmpty(dto.getCraft()))
|
if (!StringUtils.isEmpty(dto.getCraft()))
|
||||||
cutFee = 150;
|
cutFee = 150;
|
||||||
l = 730;
|
l = 730;
|
||||||
|
|||||||
@@ -46,6 +46,10 @@
|
|||||||
#lesspeijian .layui-form-select .layui-edge {
|
#lesspeijian .layui-form-select .layui-edge {
|
||||||
right: 40px;
|
right: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.value7 .layui-form-select .layui-edge {
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div class="big_box">
|
<div class="big_box">
|
||||||
@@ -78,7 +82,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="lessCount" style="display:none">
|
<span class="lessCount" style="display:none">
|
||||||
<input type="radio" lay-filter="kind" name="kind" value="直角卡片" title="直角卡片">
|
<input type="radio" lay-filter="kind" name="kind" value="直角卡片" title="直角卡片">
|
||||||
<input type="radio" lay-filter="kind" name="kind" value="异形卡片" title="异形卡片">
|
<%-- <input type="radio" lay-filter="kind" name="kind" value="异形卡片" title="异形卡片">--%>
|
||||||
<input type="radio" lay-filter="kind" name="kind" value="腰封" title="腰封">
|
<input type="radio" lay-filter="kind" name="kind" value="腰封" title="腰封">
|
||||||
<input type="radio" lay-filter="kind" name="kind" value="贺卡" title="贺卡">
|
<input type="radio" lay-filter="kind" name="kind" value="贺卡" title="贺卡">
|
||||||
<input type="radio" lay-filter="kind" name="kind" value="积分卡" title="积分卡">
|
<input type="radio" lay-filter="kind" name="kind" value="积分卡" title="积分卡">
|
||||||
@@ -527,11 +531,31 @@
|
|||||||
<div class="layui-input-block value7">
|
<div class="layui-input-block value7">
|
||||||
<input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="模切"
|
<input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="模切"
|
||||||
title="异形模切">
|
title="异形模切">
|
||||||
<%-- <input type="checkbox" name="craft" class="fm" lay-filter="ui_yf_fm" value="单面覆膜"--%>
|
|
||||||
<%-- title="单面覆膜">--%>
|
|
||||||
<span class="ui_fm_l">
|
<span class="ui_fm_l">
|
||||||
<input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面覆膜"
|
<input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面覆膜"
|
||||||
title="双面覆膜">
|
title="双面覆膜"/>
|
||||||
|
</span>
|
||||||
|
<span class="yhydx">
|
||||||
|
<input type="checkbox" name="craft" class="layui-input" lay-filter="ui_yf_fm" value="压痕"
|
||||||
|
title="压痕">
|
||||||
|
<div class="layui-inline yhselect" style="width:60px; display:none">
|
||||||
|
<select name="yaheng" class="layui-select ">
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input type="checkbox" name="craft" class="layui-input" lay-filter="ui_yf_fm"
|
||||||
|
value="压点线" title="压点线">
|
||||||
|
<div class="layui-inline ydxselect" style="width:60px;display:none">
|
||||||
|
<select name="dadianxian" class="layui-select ">
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<div id="craftHu" style="display:none;margin-top: 5px;">
|
<div id="craftHu" style="display:none;margin-top: 5px;">
|
||||||
<input type="checkbox" name="craft" class="ui_hu" lay-filter="switch" value="糊成品"
|
<input type="checkbox" name="craft" class="ui_hu" lay-filter="switch" value="糊成品"
|
||||||
@@ -1139,8 +1163,19 @@
|
|||||||
$(".disab").attr("disabled", false);
|
$(".disab").attr("disabled", false);
|
||||||
$('input[class = mq]').prop('checked', false);
|
$('input[class = mq]').prop('checked', false);
|
||||||
}
|
}
|
||||||
form.render('checkbox');
|
|
||||||
}
|
}
|
||||||
|
if (type == "少数量") {
|
||||||
|
$("#lesspeijian").show();
|
||||||
|
$("#lesspeijian").find(":input").attr("disabled", false);
|
||||||
|
}
|
||||||
|
if (type == "少数量" && (s.split("*")[0] > 42 || s.split("*")[1] > 28.5) && (s.split("*")[0] > 28.5 || s.split("*")[1] > 42)) {
|
||||||
|
$("#lesspeijian input").prop("checked", false);
|
||||||
|
$("#lesspeijian").hide();
|
||||||
|
$("#lesspeijian").find(":input").attr("disabled", true);
|
||||||
|
$(".scolor").hide();
|
||||||
|
$(".tscolor").hide();
|
||||||
|
}
|
||||||
|
form.render();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
form.on("select(oppSelect)", function (data) {
|
form.on("select(oppSelect)", function (data) {
|
||||||
@@ -1421,6 +1456,7 @@
|
|||||||
$(".ui_yh").show();
|
$(".ui_yh").show();
|
||||||
$(".ui_yf").hide();
|
$(".ui_yf").hide();
|
||||||
}
|
}
|
||||||
|
$("#size").val("");
|
||||||
$("#craftForm").show();
|
$("#craftForm").show();
|
||||||
$("#craftForm").find(":input").attr("disabled", false);
|
$("#craftForm").find(":input").attr("disabled", false);
|
||||||
$("#z4_craft").hide();
|
$("#z4_craft").hide();
|
||||||
@@ -1480,6 +1516,8 @@
|
|||||||
$("#kindValueForm")[0].reset();
|
$("#kindValueForm")[0].reset();
|
||||||
}
|
}
|
||||||
$("#craftForm")[0].reset();
|
$("#craftForm")[0].reset();
|
||||||
|
$(".yhselect").hide();
|
||||||
|
$(".ydxselect").hide();
|
||||||
if (data.value == 0 || data.value == 1) {
|
if (data.value == 0 || data.value == 1) {
|
||||||
$("#kindValueForm")[0].reset();
|
$("#kindValueForm")[0].reset();
|
||||||
$(".kindValue").show();
|
$(".kindValue").show();
|
||||||
@@ -1515,6 +1553,8 @@
|
|||||||
kindValue = kindValueData.value
|
kindValue = kindValueData.value
|
||||||
$(".ui_fm_l").show();
|
$(".ui_fm_l").show();
|
||||||
$('.ui_fm_l').find(":input").attr("disabled", false);
|
$('.ui_fm_l').find(":input").attr("disabled", false);
|
||||||
|
$(".yhydx").hide();
|
||||||
|
$('.yhydx').find(":input").attr("disabled", true);
|
||||||
// 腰封的时候,157克没有【覆膜】工艺
|
// 腰封的时候,157克没有【覆膜】工艺
|
||||||
if (data.value == 1) {
|
if (data.value == 1) {
|
||||||
// 腰封的时候,默认选择【单面覆膜】
|
// 腰封的时候,默认选择【单面覆膜】
|
||||||
@@ -1525,6 +1565,8 @@
|
|||||||
$("#craftHu").show();
|
$("#craftHu").show();
|
||||||
$('.ui_fm_l').find(":input").prop('checked', true);
|
$('.ui_fm_l').find(":input").prop('checked', true);
|
||||||
$(".ui_fm").prop('disabled', false);
|
$(".ui_fm").prop('disabled', false);
|
||||||
|
$(".yhydx").show();
|
||||||
|
$('.yhydx').find(":input").attr("disabled", false);
|
||||||
} else if (kindValueData.value == 0) {
|
} else if (kindValueData.value == 0) {
|
||||||
$("#craftHu").show();
|
$("#craftHu").show();
|
||||||
// $(".ui_fm").prop('disabled', true);
|
// $(".ui_fm").prop('disabled', true);
|
||||||
@@ -1573,15 +1615,15 @@
|
|||||||
}
|
}
|
||||||
if (data.value == 1) {
|
if (data.value == 1) {
|
||||||
if (kindValueData.value == 2) {
|
if (kindValueData.value == 2) {
|
||||||
$('input[class = mq]').prop('checked', true);
|
//$('input[class = mq]').prop('checked', true);
|
||||||
form.on('checkbox(switchMQ)', function (switchData) {
|
form.on('checkbox(switchMQ)', function (switchData) {
|
||||||
if (kindValueData.value == 2) {
|
if (kindValueData.value == 2) {
|
||||||
// 吊旗/吊牌的模切
|
// 吊旗/吊牌的模切
|
||||||
if (!switchData.elem.checked) {
|
if (!switchData.elem.checked) {
|
||||||
layer.msg('[ 腰封 - 300克铜版纸 ] 不能取消 [ 模切 ] 工艺!', {offset: ['300px', '300px']}, function () {
|
// layer.msg('[ 腰封 - 300克铜版纸 ] 不能取消 [ 模切 ] 工艺!', {offset: ['300px', '300px']}, function () {
|
||||||
});
|
// });
|
||||||
$('input[class = mq]').prop('checked', true);
|
// $('input[class = mq]').prop('checked', true);
|
||||||
form.render('checkbox');
|
// form.render('checkbox');
|
||||||
} else {
|
} else {
|
||||||
kindValueData.value = 1;
|
kindValueData.value = 1;
|
||||||
}
|
}
|
||||||
@@ -1591,7 +1633,7 @@
|
|||||||
$('input[class = mq]').prop('checked', false);
|
$('input[class = mq]').prop('checked', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
form.render('checkbox');
|
form.render();
|
||||||
setRemark()
|
setRemark()
|
||||||
})
|
})
|
||||||
}/* else if (data.value == 2) {
|
}/* else if (data.value == 2) {
|
||||||
@@ -1853,7 +1895,7 @@
|
|||||||
|
|
||||||
// 5.11:选中少数量的时候隐藏所有的【烫金】工艺
|
// 5.11:选中少数量的时候隐藏所有的【烫金】工艺
|
||||||
// 12.31恢复少数量 【烫金】工艺
|
// 12.31恢复少数量 【烫金】工艺
|
||||||
if (couponKind == '少数量' && (data.value == '积分卡' || data.value == '抽奖卡' || data.value == '刮刮卡' || data.value == '异形卡片')) {
|
if (couponKind == '少数量') {
|
||||||
$(".tj").hide();
|
$(".tj").hide();
|
||||||
// 禁用没用,下面有放开
|
// 禁用没用,下面有放开
|
||||||
//$(".tj").find(":input").attr("disabled", true);
|
//$(".tj").find(":input").attr("disabled", true);
|
||||||
@@ -1935,6 +1977,7 @@
|
|||||||
// 少数量展示kindValue2,隐藏kindValue、kindValue3、kindValue4
|
// 少数量展示kindValue2,隐藏kindValue、kindValue3、kindValue4
|
||||||
// 上面的else 已经有这个效果了
|
// 上面的else 已经有这个效果了
|
||||||
$(".scolor").hide()
|
$(".scolor").hide()
|
||||||
|
$(".tscolor").hide()
|
||||||
$("#kindValueForm").show();
|
$("#kindValueForm").show();
|
||||||
if (couponKind == "少数量") {
|
if (couponKind == "少数量") {
|
||||||
$(".ui_shk_size").hide();
|
$(".ui_shk_size").hide();
|
||||||
@@ -2410,6 +2453,35 @@
|
|||||||
layer.msg('单面覆膜和双面覆膜只能选一种!', {offset: ['300px', '300px']}, {icon: 5});
|
layer.msg('单面覆膜和双面覆膜只能选一种!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
let craft_list = [];
|
||||||
|
$("input:checkbox[name='craft']:checked").each(function (i) {
|
||||||
|
if (!$(this).is(':disabled')) {
|
||||||
|
craft_list.push($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const carft_list1 = ["压痕", "压点线"];
|
||||||
|
const carft1 = carft_list1.filter(craft => craft_list.includes(craft));
|
||||||
|
if (carft1.length > 1) {
|
||||||
|
$(data.elem).prop("checked", false);
|
||||||
|
layer.msg("压痕-压点线不能同时选择", {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
form.render();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (data.value == "压痕") {
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".yhselect").show();
|
||||||
|
} else {
|
||||||
|
$(".yhselect").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.value == "压点线") {
|
||||||
|
if (data.elem.checked) {
|
||||||
|
$(".ydxselect").show();
|
||||||
|
} else {
|
||||||
|
$(".ydxselect").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
form.render();
|
form.render();
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -3243,9 +3315,9 @@
|
|||||||
$("#proTypeValue").val("卡片少数量")
|
$("#proTypeValue").val("卡片少数量")
|
||||||
$("#proTypeLabel").val(kindData[kind])
|
$("#proTypeLabel").val(kindData[kind])
|
||||||
if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) {
|
if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) {
|
||||||
layer.msg("尺寸超过 42.0*28.5cm 无法报价", {offset: ['300px', '300px']}, function () {
|
// layer.msg("尺寸超过 42.0*28.5cm 无法报价", {offset: ['300px', '300px']}, function () {
|
||||||
});
|
// });
|
||||||
return false;
|
// return false;
|
||||||
}
|
}
|
||||||
if (kind == "种子纸") {
|
if (kind == "种子纸") {
|
||||||
let type = $('input[name="z3type"]:checked').val();
|
let type = $('input[name="z3type"]:checked').val();
|
||||||
@@ -3552,6 +3624,16 @@
|
|||||||
|
|
||||||
arr += ",覆膜"
|
arr += ",覆膜"
|
||||||
}
|
}
|
||||||
|
if (couponKind != "少数量" && kind == 1 && kindValue == 2) {
|
||||||
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
if (arr[i] == "压痕") {
|
||||||
|
arr[i] = "压痕" + $(".value7 .yhselect select option:selected").val();
|
||||||
|
}
|
||||||
|
if (arr[i] == "压点线") {
|
||||||
|
arr[i] = "压点线" + $(".value7 .ydxselect select option:selected").val();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
var span_result = kindData[kind] + " -" + kindValueData[kindValue] + "-" + kindValueSelect + "-" + size
|
var span_result = kindData[kind] + " -" + kindValueData[kindValue] + "-" + kindValueSelect + "-" + size
|
||||||
+ "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
|
+ "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,6 +222,16 @@
|
|||||||
var size = $("input[name='size']").val();
|
var size = $("input[name='size']").val();
|
||||||
var count = $("select[name='count'] option:selected").text();
|
var count = $("select[name='count'] option:selected").text();
|
||||||
var arr = []
|
var arr = []
|
||||||
|
if ((size.split("*")[0] > 20 || size.split("*")[1] > 20)) {
|
||||||
|
layer.msg('最大尺寸20*20cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((size.split("*")[0] < 1.5 || size.split("*")[1] < 1.5)) {
|
||||||
|
layer.msg('最小尺寸1.5*1.5cm!', {offset: ['300px', '300px']}, function () {
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$("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());
|
arr.push($(this).val());
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
#sehu_number .layui-form-select .layui-edge {
|
#sehu_number .layui-form-select .layui-edge {
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tjselect .layui-form-select .layui-edge {
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div class="big_box">
|
<div class="big_box">
|
||||||
@@ -141,33 +145,24 @@
|
|||||||
<input type="radio" name="craftQie" calss="moqie" value="模切" lay-skin="primary" title="模切"
|
<input type="radio" name="craftQie" calss="moqie" value="模切" lay-skin="primary" title="模切"
|
||||||
checked="checked">
|
checked="checked">
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-input-block">
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="专金" title="专金"
|
烫金工艺:
|
||||||
class="craftZhuan">
|
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="专银" title="专银"
|
|
||||||
class="craftZhuan">
|
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫金" title="烫金"
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫金" title="烫金"
|
||||||
class="craftZhuan">
|
class="craftZhuan">
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫银" title="烫银"
|
<div class="layui-inline tjselect" style="width:60px; display:none">
|
||||||
class="craftZhuan">
|
<select name="craft" class="layui-select " disabled>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫蓝" title="烫蓝"
|
<option value="烫金">烫金</option>
|
||||||
class="craftZhuan">
|
<option value="烫银">烫银</option>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫红" title="烫红"
|
<option value="烫蓝">烫蓝</option>
|
||||||
class="craftZhuan">
|
<option value="烫红">烫红</option>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫黑" title="烫黑"
|
<option value="烫黑">烫黑</option>
|
||||||
class="craftZhuan">
|
<option value="镭射银">镭射银</option>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="镭射银" title="镭射银"
|
<option value="镭射金">镭射金</option>
|
||||||
class="craftZhuan">
|
<option value="玫瑰金">玫瑰金</option>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="镭射金" title="镭射金"
|
</select>
|
||||||
class="craftZhuan">
|
</div>
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="玫瑰金" title="玫瑰金"
|
<div class="layui-input-block">
|
||||||
class="craftZhuan">
|
配件:
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="印刷+烫金" title="印刷+烫金"
|
|
||||||
class="craftZhuan">
|
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="印刷+烫银" title="印刷+烫银"
|
|
||||||
class="craftZhuan">
|
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="双面贴" title="双面贴"
|
|
||||||
class="craftZhuan">
|
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="刮板" title="刮板"
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="刮板" title="刮板"
|
||||||
class="craftZhuan">
|
class="craftZhuan">
|
||||||
<div class="layui-inline" id="guaban" style="width: 80px;display: none">
|
<div class="layui-inline" id="guaban" style="width: 80px;display: none">
|
||||||
@@ -177,7 +172,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-input-block">
|
||||||
|
其他工艺:
|
||||||
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="专金" title="专金"
|
||||||
|
class="craftZhuan">
|
||||||
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="专银" title="专银"
|
||||||
|
class="craftZhuan">
|
||||||
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="印刷+烫金" title="印刷+烫金"
|
||||||
|
class="craftZhuan">
|
||||||
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="印刷+烫银" title="印刷+烫银"
|
||||||
|
class="craftZhuan">
|
||||||
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="双面贴" title="双面贴"
|
||||||
|
class="craftZhuan">
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫画" title="烫画"
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="烫画" title="烫画"
|
||||||
class="craftZhuan">
|
class="craftZhuan">
|
||||||
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="冷转印" title="冷转印"
|
<input type="checkbox" name="craft" lay-filter="craftZhuan" value="冷转印" title="冷转印"
|
||||||
@@ -302,6 +308,9 @@
|
|||||||
form.on('radio(kind)', function (kindData) {
|
form.on('radio(kind)', function (kindData) {
|
||||||
getProductImage()
|
getProductImage()
|
||||||
$("#ui_des").hide();
|
$("#ui_des").hide();
|
||||||
|
$("input[name='craft'][value='烫金']").prop("checked", false);
|
||||||
|
$(".tjselect").hide();
|
||||||
|
$(".tjselect select").prop("disabled", true);
|
||||||
if (kindData.value == "金属标") {
|
if (kindData.value == "金属标") {
|
||||||
// 切换为品种单选框
|
// 切换为品种单选框
|
||||||
$(".metal").show();
|
$(".metal").show();
|
||||||
@@ -315,7 +324,7 @@
|
|||||||
} else {
|
} else {
|
||||||
// 少数量、专版打印的时候,切换为品种下拉框
|
// 少数量、专版打印的时候,切换为品种下拉框
|
||||||
$(".UVSticker").show();
|
$(".UVSticker").show();
|
||||||
$(".UVSticker").find(":input").attr("disabled", false);
|
$(".UVSticker input").attr("disabled", false);
|
||||||
$(".count").show();
|
$(".count").show();
|
||||||
$(".count").find(":input").attr("disabled", false);
|
$(".count").find(":input").attr("disabled", false);
|
||||||
$(".metal").hide();
|
$(".metal").hide();
|
||||||
@@ -366,7 +375,6 @@
|
|||||||
} else {
|
} else {
|
||||||
$("#guaban").hide();
|
$("#guaban").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
var craftZhuan = $(".craftZhuan:checked").length;
|
var craftZhuan = $(".craftZhuan:checked").length;
|
||||||
if (craftZhuan > most) {
|
if (craftZhuan > most) {
|
||||||
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
$(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
|
||||||
@@ -374,6 +382,15 @@
|
|||||||
layer.msg('[专金 - 专银]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
layer.msg('[专金 - 专银]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (craft_list.indexOf("烫金") > -1) {
|
||||||
|
$(".tjselect").show();
|
||||||
|
$(".tjselect select").prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
$(".tjselect").hide();
|
||||||
|
$(".tjselect select").prop("disabled", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (data.value == "冷转印") {
|
if (data.value == "冷转印") {
|
||||||
if ($(data.elem).is(":checked")) {
|
if ($(data.elem).is(":checked")) {
|
||||||
@@ -382,6 +399,7 @@
|
|||||||
$("#sehu_number").hide();
|
$("#sehu_number").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
form.render();//必须写
|
||||||
getProductImage()
|
getProductImage()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -400,7 +418,9 @@
|
|||||||
|
|
||||||
$("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() == "烫金") {
|
||||||
|
craftShua.push($(".tjselect select option:selected").val());
|
||||||
|
} else if ($(this).val() == "刮板") {
|
||||||
let co_count = $("input[name='pcount']").val();
|
let co_count = $("input[name='pcount']").val();
|
||||||
craftShua.push($(this).val() + co_count + "个");
|
craftShua.push($(this).val() + co_count + "个");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8" %>
|
||||||
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>添加产品须知</title>
|
||||||
|
<%@include file="/views/common.jsp" %>
|
||||||
|
<style>
|
||||||
|
.layui-input, .layui-input-inline {
|
||||||
|
width: 350px
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||||
|
<form class="layui-form " action="">
|
||||||
|
<input type="hidden" name="id" id="id">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">产品名称</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="title" placeholder="请输入产品名称" class="layui-input" lay-verify="required"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">备注</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="memo" placeholder="请输入备注" class="layui-input"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">内容</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<textarea type="text" name="content" placeholder="请输入内容" class="layui-textarea" lay-verify="required" style="width: 300px;"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="type" class="layui-input" value="2">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
layui.use(['form', 'layer'], function () {
|
||||||
|
var $ = layui.$,
|
||||||
|
form = layui.form,
|
||||||
|
layer = layui.layer;
|
||||||
|
|
||||||
|
//监听提交
|
||||||
|
form.on('submit(enadd)', function (data) {
|
||||||
|
let id = document.getElementsByName("id")[0].value;
|
||||||
|
|
||||||
|
let url = id == "" ? '${path}/addStandard' : '${path}/updateStandard';
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
dataType: 'json',
|
||||||
|
data: $(data.form).serialize(),
|
||||||
|
type: 'post',
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 200) {
|
||||||
|
layer.msg('录入成功!', {
|
||||||
|
icon: 6,
|
||||||
|
offset: "auto",
|
||||||
|
time: 2000
|
||||||
|
});//提示框
|
||||||
|
} else {
|
||||||
|
layer.msg('录入失败!', {
|
||||||
|
icon: 5,
|
||||||
|
offset: "auto",
|
||||||
|
time: 2000
|
||||||
|
});//提示框
|
||||||
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||||
|
parent.layer.close(index);//关闭弹出层
|
||||||
|
parent.layui.table.reload("informationTableAll"); //重新加载页面表格
|
||||||
|
}, 2100);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,182 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8" %>
|
||||||
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>产品知识列表</title>
|
||||||
|
<%@include file="/views/common.jsp" %>
|
||||||
|
<style type="text/css">
|
||||||
|
.layui-table-cell {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table td, .layui-table th, .layui-table-header, .layui-table-page, .layui-table-tool, .layui-table-total, .layui-table-view {
|
||||||
|
border-color: #6666;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ztree * {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edge .layui-edge {
|
||||||
|
right: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script type="text/html" id="toolbarDemo">
|
||||||
|
<div class="layui-btn-container demoTable">
|
||||||
|
<button class="layui-btn layui-btn-sm" lay-event="add">
|
||||||
|
<i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增内容
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<a class="layui-btn layui-btn-xs" lay-event="view">
|
||||||
|
<i class="layui-icon layui-icon-view" style="color:white;font-size:20px"></i>复制
|
||||||
|
</a>
|
||||||
|
<a class="layui-btn layui-btn-xs" lay-event="edit">
|
||||||
|
<i class="layui-icon layui-icon-edit" style="color:white;font-size:20px"></i>修改
|
||||||
|
</a>
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<br>
|
||||||
|
<form class="layui-form" action="">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">内容</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" id="content" name="content" placeholder="请输入内容" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<button class="layui-btn" id="searchBtn" lay-submit lay-filter="formDemo" style="margin-left: 15px">
|
||||||
|
<i class="layui-icon layui-icon-search"></i> 查询
|
||||||
|
</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<table class="layui-hide" id="informationTable" lay-filter="informationTable"></table>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
layui.use(['element', 'table', 'laydate', 'form'], function () {
|
||||||
|
var $ = layui.jquery;
|
||||||
|
var table = layui.table;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var element = layui.element;
|
||||||
|
var form = layui.form;
|
||||||
|
|
||||||
|
// 生成表格
|
||||||
|
table.render({
|
||||||
|
elem: '#informationTable',
|
||||||
|
url: '../../../../getStandard',
|
||||||
|
toolbar: '#toolbarDemo',
|
||||||
|
title: '用户表',// 导出文件名
|
||||||
|
id: 'informationTableAll',
|
||||||
|
// 开启分页
|
||||||
|
// page : true,
|
||||||
|
page: {
|
||||||
|
layout: ['count', 'prev', 'page', 'next', 'skip', 'limit']
|
||||||
|
},
|
||||||
|
limits: [10, 30, 50, 80, 100, 999],
|
||||||
|
/*request : {
|
||||||
|
'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize
|
||||||
|
},*/
|
||||||
|
where: {
|
||||||
|
content: '', type: 2
|
||||||
|
},
|
||||||
|
cellMinWidth: 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
|
cols: [[{
|
||||||
|
field: 'title',
|
||||||
|
title: '产品',
|
||||||
|
}, {
|
||||||
|
field: 'content',
|
||||||
|
title: '内容',
|
||||||
|
}, {
|
||||||
|
field: 'memo',
|
||||||
|
title: '备注',
|
||||||
|
}, {
|
||||||
|
fixed: 'right',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: 150,
|
||||||
|
toolbar: '#barDemo'
|
||||||
|
}]],
|
||||||
|
parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
|
||||||
|
return {
|
||||||
|
"code": 0, //解析接口状态
|
||||||
|
"msg": "", //解析提示文本
|
||||||
|
"count": res.data.list.total,//解析数据长度
|
||||||
|
"data": res.data.list.list//解析数据列表
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//点击查询按钮,重载表格
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
table.reload('informationTableAll', {
|
||||||
|
method: 'get',
|
||||||
|
where: {
|
||||||
|
content: $("#content").val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
table.on('toolbar(informationTable)', function (obj) {
|
||||||
|
switch (obj.event) {
|
||||||
|
case 'add':
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: "添加文件名",
|
||||||
|
fix: false, //不固定
|
||||||
|
maxmin: true,
|
||||||
|
skin: 'layui-layer-molv',
|
||||||
|
area: ['45%', '70%'],
|
||||||
|
content: './addQuality.jsp',
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
});
|
||||||
|
table.on('tool(informationTable)', function (obj) {
|
||||||
|
let data1 = obj.data;
|
||||||
|
if (obj.event === 'edit') {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: "修改文件名",
|
||||||
|
area: ['45%', '70%'],
|
||||||
|
skin: 'layui-layer-molv',
|
||||||
|
content: './addQuality.jsp',
|
||||||
|
success: function (layero, index) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
body.find('#id').val(data1.id);
|
||||||
|
body.find('input[name="title"]').val(data1.title);
|
||||||
|
body.find('input[name="memo"]').val(data1.memo);
|
||||||
|
body.find('textarea[name="content"]').val(data1.content);
|
||||||
|
|
||||||
|
layui.form.render();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (obj.event === 'view') {
|
||||||
|
// 在此处输入 layer 的任意代码
|
||||||
|
navigator.clipboard.writeText(data.content);
|
||||||
|
layer.msg('复制成功!', {icon: 6, offset: 'auto', time: 1000});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8" %>
|
||||||
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>产品知识列表</title>
|
||||||
|
<%@include file="/views/common.jsp" %>
|
||||||
|
<style type="text/css">
|
||||||
|
.layui-table-cell {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table td, .layui-table th, .layui-table-header, .layui-table-page, .layui-table-tool, .layui-table-total, .layui-table-view {
|
||||||
|
border-color: #6666;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ztree * {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edge .layui-edge {
|
||||||
|
right: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script type="text/html" id="toolbarDemo">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<a class="layui-btn layui-btn-xs" lay-event="view">
|
||||||
|
<i class="layui-icon layui-icon-view" style="color:white;font-size:20px"></i>复制
|
||||||
|
</a>
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<br>
|
||||||
|
<form class="layui-form" action="">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">内容</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" id="content" name="content" placeholder="请输入内容" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<button class="layui-btn" id="searchBtn" lay-submit lay-filter="formDemo" style="margin-left: 15px">
|
||||||
|
<i class="layui-icon layui-icon-search"></i> 查询
|
||||||
|
</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<table class="layui-hide" id="informationTable" lay-filter="informationTable"></table>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
layui.use(['element', 'table', 'laydate', 'form'], function () {
|
||||||
|
var $ = layui.jquery;
|
||||||
|
var table = layui.table;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var element = layui.element;
|
||||||
|
var form = layui.form;
|
||||||
|
|
||||||
|
// 生成表格
|
||||||
|
table.render({
|
||||||
|
elem: '#informationTable',
|
||||||
|
url: '../../../../getStandard',
|
||||||
|
toolbar: '#toolbarDemo',
|
||||||
|
title: '用户表',// 导出文件名
|
||||||
|
id: 'informationTableAll',
|
||||||
|
// 开启分页
|
||||||
|
// page : true,
|
||||||
|
page: {
|
||||||
|
layout: ['count', 'prev', 'page', 'next', 'skip', 'limit']
|
||||||
|
},
|
||||||
|
limits: [10, 30, 50, 80, 100, 999],
|
||||||
|
/*request : {
|
||||||
|
'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize
|
||||||
|
},*/
|
||||||
|
where: {
|
||||||
|
content: '', type: 2
|
||||||
|
},
|
||||||
|
cellMinWidth: 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
|
cols: [[{
|
||||||
|
field: 'title',
|
||||||
|
title: '产品',
|
||||||
|
}, {
|
||||||
|
field: 'content',
|
||||||
|
title: '内容',
|
||||||
|
}, {
|
||||||
|
field: 'memo',
|
||||||
|
title: '备注',
|
||||||
|
}, {
|
||||||
|
fixed: 'right',
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
width: 150,
|
||||||
|
toolbar: '#barDemo'
|
||||||
|
}]],
|
||||||
|
parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
|
||||||
|
return {
|
||||||
|
"code": 0, //解析接口状态
|
||||||
|
"msg": "", //解析提示文本
|
||||||
|
"count": res.data.list.total,//解析数据长度
|
||||||
|
"data": res.data.list.list//解析数据列表
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//点击查询按钮,重载表格
|
||||||
|
$('#searchBtn').on('click', function () {
|
||||||
|
table.reload('informationTableAll', {
|
||||||
|
method: 'get',
|
||||||
|
where: {
|
||||||
|
content: $("#content").val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
table.on('toolbar(informationTable)', function (obj) {
|
||||||
|
switch (obj.event) {
|
||||||
|
case 'add':
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: "添加文件名",
|
||||||
|
fix: false, //不固定
|
||||||
|
maxmin: true,
|
||||||
|
skin: 'layui-layer-molv',
|
||||||
|
area: ['45%', '70%'],
|
||||||
|
content: './addQuality.jsp',
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
});
|
||||||
|
table.on('tool(informationTable)', function (obj) {
|
||||||
|
let data1 = obj.data;
|
||||||
|
if (obj.event === 'edit') {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: "修改文件名",
|
||||||
|
area: ['45%', '70%'],
|
||||||
|
skin: 'layui-layer-molv',
|
||||||
|
content: './addQuality.jsp',
|
||||||
|
success: function (layero, index) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
body.find('#id').val(data1.id);
|
||||||
|
body.find('input[name="title"]').val(data1.title);
|
||||||
|
body.find('input[name="memo"]').val(data1.memo);
|
||||||
|
body.find('textarea[name="content"]').val(data1.content);
|
||||||
|
|
||||||
|
layui.form.render();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (obj.event === 'view') {
|
||||||
|
// 在此处输入 layer 的任意代码
|
||||||
|
navigator.clipboard.writeText(data.content);
|
||||||
|
layer.msg('复制成功!', {icon: 6, offset: 'auto', time: 1000});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Fai riferimento in un nuovo problema
Block a user