修改信封
Esse commit está contido em:
@@ -1735,9 +1735,18 @@ public class ProductService {
|
|||||||
if (priceList.size() >= 4) {
|
if (priceList.size() >= 4) {
|
||||||
priceList = priceList.subList(0, 4);
|
priceList = priceList.subList(0, 4);
|
||||||
}
|
}
|
||||||
|
List<String> carft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>();
|
||||||
// 产品价格倍数
|
// 产品价格倍数
|
||||||
for (Product product : priceList) {
|
for (Product product : priceList) {
|
||||||
product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple()));
|
product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple()));
|
||||||
|
if (carft_list.contains("烫金")) {
|
||||||
|
if (carft_list.contains("2处")) {
|
||||||
|
product.setPrice(product.getPrice() + 100);
|
||||||
|
}
|
||||||
|
if (carft_list.contains("3处")) {
|
||||||
|
product.setPrice(product.getPrice() + 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 根据款数重新算重量(重量在数据库中)
|
// 根据款数重新算重量(重量在数据库中)
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,466 +1,516 @@
|
|||||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
pageEncoding="UTF-8"%>
|
pageEncoding="UTF-8" %>
|
||||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Insert title here</title>
|
<title>Insert title here</title>
|
||||||
<%@include file="/views/common.jsp"%>
|
<%@include file="/views/common.jsp" %>
|
||||||
</head>
|
</head>
|
||||||
<!-- 彩色信封 -->
|
<!-- 彩色信封 -->
|
||||||
<style>
|
<style>
|
||||||
|
#craft_layout .layui-form-select .layui-edge {
|
||||||
|
right: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div class="big_box">
|
<div class="big_box">
|
||||||
<div class="left_div">
|
<div class="left_div">
|
||||||
<h1 class="h1">彩色信封</h1>
|
<h1 class="h1">彩色信封</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<form class="layui-form">
|
<form class="layui-form">
|
||||||
<input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="9" >
|
<input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="9">
|
||||||
<p>
|
<p>
|
||||||
材质
|
材质
|
||||||
</p>
|
</p>
|
||||||
<div class="layui-form-item" style="display:none;">
|
<div class="layui-form-item" style="display:none;">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="0" title="120克双胶纸">
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="0" title="120克双胶纸">
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="10" title="120克牛皮纸">
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="10" title="120克牛皮纸">
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="1" title="100克双胶纸">
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="1" title="100克双胶纸">
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="11" title="100克牛皮纸">
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="11" title="100克牛皮纸">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="display:none;">
|
<div class="layui-form-item" style="display:none;">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="2" title="140克珠光冰白彩色信封">
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="2"
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="3" title="200克珠光冰白彩色信封">
|
title="140克珠光冰白彩色信封">
|
||||||
</div>
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="3"
|
||||||
</div>
|
title="200克珠光冰白彩色信封">
|
||||||
<div class="layui-form-item">
|
</div>
|
||||||
<div class="layui-input-block">
|
</div>
|
||||||
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="4" title="250克高端珠光冰白烫金信封">
|
<div class="layui-form-item">
|
||||||
</div>
|
<div class="layui-input-block">
|
||||||
</div>
|
<input type="radio" name="kindValue" lay-filter="k" class="kindValue" value="4"
|
||||||
<p>
|
title="250克高端珠光冰白烫金信封">
|
||||||
规格
|
</div>
|
||||||
</p>
|
</div>
|
||||||
<div class="layui-form-item first">
|
<p>
|
||||||
<select name="kind2Value" class="select kind2Value firstKind2Value">
|
规格
|
||||||
<option value="0">3号(中/西封)--成品17.6*12.5CM</option>
|
</p>
|
||||||
<option value="1">5号(中/西封)--成品22*11CM</option>
|
<div class="layui-form-item first">
|
||||||
<option value="2">6号(中/西封)--成品23*12CM</option>
|
<select name="kind2Value" class="select kind2Value firstKind2Value">
|
||||||
<option value="3">7号(中/西封)--成品22.9*16.2CM</option>
|
<option value="0">3号(中/西封)--成品17.6*12.5CM</option>
|
||||||
<option value="4">8号(中/西封)--成品25*16.2CM</option>
|
<option value="1">5号(中/西封)--成品22*11CM</option>
|
||||||
<option value="5">9号(中式) --成品32.4*22.9CM</option>
|
<option value="2">6号(中/西封)--成品23*12CM</option>
|
||||||
<option value="6">9号(西式) --成品32.4*22.9CM</option>
|
<option value="3">7号(中/西封)--成品22.9*16.2CM</option>
|
||||||
</select>
|
<option value="4">8号(中/西封)--成品25*16.2CM</option>
|
||||||
</div>
|
<option value="5">9号(中式) --成品32.4*22.9CM</option>
|
||||||
<div class="layui-form-item second" style="display:none;">
|
<option value="6">9号(西式) --成品32.4*22.9CM</option>
|
||||||
<select name="kind2Value" class="select kind2Value secondKind2Value">
|
</select>
|
||||||
<option value="0">1号信封 (16.5*10cm)</option>
|
</div>
|
||||||
<option value="1">2号信封 (17.5*11cm)</option>
|
<div class="layui-form-item second" style="display:none;">
|
||||||
<option value="2">3号信封 (B6号 17.6*12.5cm)</option>
|
<select name="kind2Value" class="select kind2Value secondKind2Value">
|
||||||
<option value="3">5号信封 (DL号 22*11cm)</option>
|
<option value="0">1号信封 (16.5*10cm)</option>
|
||||||
<option value="4">6号信封 (ZL号 23*12cm)</option>
|
<option value="1">2号信封 (17.5*11cm)</option>
|
||||||
<option value="5">7号信封 (C5号 22.9*16.2cm)</option>
|
<option value="2">3号信封 (B6号 17.6*12.5cm)</option>
|
||||||
<option value="6">8号信封 (增值税票专用 25*16.2cm)</option>
|
<option value="3">5号信封 (DL号 22*11cm)</option>
|
||||||
<option value="7">9号信封 (C4号 32.4*22.9cm)</option>
|
<option value="4">6号信封 (ZL号 23*12cm)</option>
|
||||||
</select>
|
<option value="5">7号信封 (C5号 22.9*16.2cm)</option>
|
||||||
</div>
|
<option value="6">8号信封 (增值税票专用 25*16.2cm)</option>
|
||||||
<div class="layui-form-item third" style="display:none;">
|
<option value="7">9号信封 (C4号 32.4*22.9cm)</option>
|
||||||
<select name="kind2Value" class="select kind2Value thirdKind2Value" lay-filter="testId" >
|
</select>
|
||||||
<option value="0">9*6cm</option>
|
</div>
|
||||||
<option value="1">10*7cm</option>
|
<div class="layui-form-item third" style="display:none;">
|
||||||
<option value="2">12*8cm</option>
|
<select name="kind2Value" class="select kind2Value thirdKind2Value" lay-filter="testId">
|
||||||
<option value="3">15*8cm</option>
|
<option value="0">9*6cm</option>
|
||||||
<option value="4">17*9cm</option>
|
<option value="1">10*7cm</option>
|
||||||
<option value="5">19*9cm</option>
|
<option value="2">12*8cm</option>
|
||||||
<option value="6">21*11cm</option>
|
<option value="3">15*8cm</option>
|
||||||
<option value="7">22*12cm</option>
|
<option value="4">17*9cm</option>
|
||||||
</select>
|
<option value="5">19*9cm</option>
|
||||||
</div>
|
<option value="6">21*11cm</option>
|
||||||
<div class="pageColor" style="display:none;">
|
<option value="7">22*12cm</option>
|
||||||
<p>
|
</select>
|
||||||
纸张颜色
|
</div>
|
||||||
</p>
|
<div class="pageColor" style="display:none;">
|
||||||
<div class="layui-form-item color1">
|
<p>
|
||||||
<select class="select color11">
|
纸张颜色
|
||||||
<option value="白金">白金</option>
|
</p>
|
||||||
<option value="米金">米金</option>
|
<div class="layui-form-item color1">
|
||||||
<option value="湖蓝">湖蓝</option>
|
<select class="select color11">
|
||||||
<option value="紫红">紫红</option>
|
<option value="白金">白金</option>
|
||||||
<option value="金黄">金黄</option>
|
<option value="米金">米金</option>
|
||||||
<option value="金铜">金铜</option>
|
<option value="湖蓝">湖蓝</option>
|
||||||
<option value="炭黑">炭黑</option>
|
<option value="紫红">紫红</option>
|
||||||
<option value="墨绿">墨绿</option>
|
<option value="金黄">金黄</option>
|
||||||
</select>
|
<option value="金铜">金铜</option>
|
||||||
</div>
|
<option value="炭黑">炭黑</option>
|
||||||
<div class="layui-form-item color2">
|
<option value="墨绿">墨绿</option>
|
||||||
<select class="select color22">
|
</select>
|
||||||
<option value="红色">红色</option>
|
</div>
|
||||||
<option value="宝蓝">宝蓝</option>
|
<div class="layui-form-item color2">
|
||||||
<option value="金色">金色</option>
|
<select class="select color22">
|
||||||
<option value="黑卡">黑卡</option>
|
<option value="红色">红色</option>
|
||||||
</select>
|
<option value="宝蓝">宝蓝</option>
|
||||||
</div>
|
<option value="金色">金色</option>
|
||||||
</div>
|
<option value="黑卡">黑卡</option>
|
||||||
<p>
|
</select>
|
||||||
数量(个)
|
</div>
|
||||||
</p>
|
</div>
|
||||||
<div class="layui-form-item" id="otherCount" style="display:none;">
|
<p>
|
||||||
<select name="count" class="select" id="count">
|
数量(个)
|
||||||
<option value="200">200</option>
|
</p>
|
||||||
<option value="500">500</option>
|
<div class="layui-form-item" id="otherCount" style="display:none;">
|
||||||
<option value="1000">1000</option>
|
<select name="count" class="select" id="count">
|
||||||
<option value="3000">3000</option>
|
<option value="200">200</option>
|
||||||
<option value="5000">5000</option>
|
<option value="500">500</option>
|
||||||
</select>
|
<option value="1000">1000</option>
|
||||||
</div>
|
<option value="3000">3000</option>
|
||||||
<div class="layui-form-item" id="thirdCount">
|
<option value="5000">5000</option>
|
||||||
<select name="count" class="select" id="count1">
|
</select>
|
||||||
<option value="100">100</option>
|
</div>
|
||||||
<option value="200">200</option>
|
<div class="layui-form-item" id="thirdCount">
|
||||||
<option value="300">300</option>
|
<select name="count" class="select" id="count1">
|
||||||
<option value="500">500</option>
|
<option value="100">100</option>
|
||||||
<option value="1000">1000</option>
|
<option value="200">200</option>
|
||||||
<option value="2000">2000</option>
|
<option value="300">300</option>
|
||||||
<option value="3000">3000</option>
|
<option value="500">500</option>
|
||||||
<option value="5000">5000</option>
|
<option value="1000">1000</option>
|
||||||
<option value="10000">10000</option>
|
<option value="2000">2000</option>
|
||||||
</select>
|
<option value="3000">3000</option>
|
||||||
</div>
|
<option value="5000">5000</option>
|
||||||
<p>
|
<option value="10000">10000</option>
|
||||||
款数
|
</select>
|
||||||
</p>
|
</div>
|
||||||
<div class="layui-form-item">
|
<p>
|
||||||
<input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1" class="layui-input" lay-verify="number">
|
款数
|
||||||
</div>
|
</p>
|
||||||
<p>
|
<div class="layui-form-item">
|
||||||
客户旺旺
|
<input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1"
|
||||||
</p>
|
class="layui-input" lay-verify="number">
|
||||||
<div class="layui-form-item">
|
</div>
|
||||||
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang" class="layui-input">
|
<p>
|
||||||
</div>
|
客户旺旺
|
||||||
<hr>
|
</p>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
<input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
|
||||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
<h2>计算结果-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyResult()">点击复制</button></h2>
|
<p>工艺</p>
|
||||||
<div>
|
<div id="craft_layout">
|
||||||
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
<input type="checkbox" name="craft" lay-filter="switch" value="烫金" title="烫金">
|
||||||
<%@include file="../acountExpressFee.jsp"%>
|
<div class="layui-inline" style="width: 100px">
|
||||||
</div>
|
<select name="craft" class="select">
|
||||||
<!--<h2>下单备注-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyBz()">点击复制</button></h2>
|
<option value="1处">1处</option>
|
||||||
<div>
|
<option value="2处">2处</option>
|
||||||
<textarea rows="5" cols="75" id="bz_result" readonly="readonly"></textarea>
|
<option value="3处">3处</option>
|
||||||
</div>-->
|
</select></div>
|
||||||
<div >
|
<div class="layui-inline" style="width: 100px">
|
||||||
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
<select name="craft" class="select">
|
||||||
</div>
|
<option value="金色">金色</option>
|
||||||
</form>
|
<option value="黑色">黑色</option>
|
||||||
</div>
|
<option value="红色">红色</option>
|
||||||
<div class="right_div" style="margin-left:50px;">
|
<option value="蓝色">蓝色</option>
|
||||||
<div class="layui-carousel" id="test1" >
|
<option value="银色">银色</option>
|
||||||
<div carousel-item id="carousel"></div>
|
</select></div>
|
||||||
<br>
|
</div>
|
||||||
<div id="remark" style="font-size:20px;color:red"></div>
|
<hr>
|
||||||
</div>
|
<div class="layui-form-item">
|
||||||
</div>
|
<button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
|
||||||
</div>
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
<h2>计算结果-
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult"
|
||||||
|
onclick="copyResult()">点击复制
|
||||||
|
</button>
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
<textarea rows="11" cols="75" id="span_result" readonly="readonly"></textarea>
|
||||||
|
<%@include file="../acountExpressFee.jsp" %>
|
||||||
|
</div>
|
||||||
|
<!--<h2>下单备注-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyBz()">点击复制</button></h2>
|
||||||
|
<div>
|
||||||
|
<textarea rows="5" cols="75" id="bz_result" readonly="readonly"></textarea>
|
||||||
|
</div>-->
|
||||||
|
<div>
|
||||||
|
<table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="right_div" style="margin-left:50px;">
|
||||||
|
<div class="layui-carousel" id="test1">
|
||||||
|
<div carousel-item id="carousel"></div>
|
||||||
|
<br>
|
||||||
|
<div id="remark" style="font-size:20px;color:red"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<%@include file="/views/copyResult.jsp"%>
|
<%@include file="/views/copyResult.jsp" %>
|
||||||
<script>
|
<script>
|
||||||
layui.use(['table','form','carousel'], function(){
|
layui.use(['table', 'form', 'carousel'], function () {
|
||||||
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
|
||||||
var carousel = layui.carousel;
|
var carousel = layui.carousel;
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
//建造实例
|
//建造实例
|
||||||
ins = carousel.render({});
|
ins = carousel.render({});
|
||||||
|
|
||||||
// 监听回车键,如果敲了回车,调用点击‘计算’
|
// 监听回车键,如果敲了回车,调用点击‘计算’
|
||||||
$(document).keydown(function (e) {
|
$(document).keydown(function (e) {
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
$("#queryCondBtn").trigger("click");
|
$("#queryCondBtn").trigger("click");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 隐藏的默认禁用
|
// 隐藏的默认禁用
|
||||||
$(".color2").hide();
|
$(".color2").hide();
|
||||||
$(".second").find(":input").attr("disabled", true);
|
$(".second").find(":input").attr("disabled", true);
|
||||||
form.on('radio(k)', function(data){
|
form.on('radio(k)', function (data) {
|
||||||
var level = data.value;//被点击的radio的value值
|
var level = data.value;//被点击的radio的value值
|
||||||
|
|
||||||
var html = " ";
|
var html = " ";
|
||||||
var remark = " ";
|
var remark = " ";
|
||||||
// 清空轮播图
|
// 清空轮播图
|
||||||
$("#carousel").empty();
|
$("#carousel").empty();
|
||||||
$("#remark").empty();
|
$("#remark").empty();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"${pageContext.request.contextPath}/getImgs",
|
url: "${pageContext.request.contextPath}/getImgs",
|
||||||
type:"GET",
|
type: "GET",
|
||||||
data:{
|
data: {
|
||||||
proTypeValue : $("#proTypeValue").val(),
|
proTypeValue: $("#proTypeValue").val(),
|
||||||
kindValue : level
|
kindValue: level
|
||||||
},
|
},
|
||||||
success : function(result) {
|
success: function (result) {
|
||||||
for (let i = 0; i < result.length; i++) {
|
for (let i = 0; i < result.length; i++) {
|
||||||
// 只留一个remark
|
// 只留一个remark
|
||||||
remark = "";
|
remark = "";
|
||||||
html += '<div><img style="width:'+result[0].imgWidth+'px" src="' +result[i].imgUrl+ '"></div>';
|
html += '<div><img style="width:' + result[0].imgWidth + 'px" src="' + result[i].imgUrl + '"></div>';
|
||||||
remark += '<div><span>' +result[i].remark+ '<span/></div>';
|
remark += '<div><span>' + result[i].remark + '<span/></div>';
|
||||||
}
|
}
|
||||||
$("#carousel").append(html);
|
$("#carousel").append(html);
|
||||||
// 如果没有说明,就不显示null
|
// 如果没有说明,就不显示null
|
||||||
if(remark.indexOf("null") < 0){
|
if (remark.indexOf("null") < 0) {
|
||||||
$("#remark").append(remark);
|
$("#remark").append(remark);
|
||||||
}
|
}
|
||||||
if(result.length == 0){
|
if (result.length == 0) {
|
||||||
document.getElementById("test1").style.display = "none"; //隐藏
|
document.getElementById("test1").style.display = "none"; //隐藏
|
||||||
}else{
|
} else {
|
||||||
document.getElementById("test1").style.display = "block"; //显示
|
document.getElementById("test1").style.display = "block"; //显示
|
||||||
ins.reload({
|
ins.reload({
|
||||||
elem: '#test1',
|
elem: '#test1',
|
||||||
width: result[0].imgWidth, //设置容器宽度
|
width: result[0].imgWidth, //设置容器宽度
|
||||||
height: result[0].imgHeight
|
height: result[0].imgHeight
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if(level == 2 || level == 3){
|
if (level == 2 || level == 3) {
|
||||||
$(".first").hide();
|
$(".first").hide();
|
||||||
$(".first").find(":input").attr("disabled", true);
|
$(".first").find(":input").attr("disabled", true);
|
||||||
$(".third").hide();
|
$(".third").hide();
|
||||||
$(".third").find(":input").attr("disabled", true);
|
$(".third").find(":input").attr("disabled", true);
|
||||||
$(".second").show();
|
$(".second").show();
|
||||||
$(".second").find(":input").attr("disabled", false);
|
$(".second").find(":input").attr("disabled", false);
|
||||||
$("#otherCount").show();
|
$("#otherCount").show();
|
||||||
$("#thirdCount").find(":input").attr("disabled", false);
|
$("#thirdCount").find(":input").attr("disabled", false);
|
||||||
}else if(level == 4){
|
} else if (level == 4) {
|
||||||
$(".first").hide();
|
$(".first").hide();
|
||||||
$(".first").find(":input").attr("disabled", true);
|
$(".first").find(":input").attr("disabled", true);
|
||||||
$(".second").hide();
|
$(".second").hide();
|
||||||
$(".second").find(":input").attr("disabled", true);
|
$(".second").find(":input").attr("disabled", true);
|
||||||
$(".third").show();
|
$(".third").show();
|
||||||
$(".third").find(":input").attr("disabled", false);
|
$(".third").find(":input").attr("disabled", false);
|
||||||
}else{
|
} else {
|
||||||
$(".second").hide();
|
$(".second").hide();
|
||||||
$(".second").find(":input").attr("disabled", true);
|
$(".second").find(":input").attr("disabled", true);
|
||||||
$(".third").hide();
|
$(".third").hide();
|
||||||
$(".third").find(":input").attr("disabled", true);
|
$(".third").find(":input").attr("disabled", true);
|
||||||
$(".first").show();
|
$(".first").show();
|
||||||
$(".first").find(":input").attr("disabled", false);
|
$(".first").find(":input").attr("disabled", false);
|
||||||
}
|
}
|
||||||
// 高端珠白冰白烫金信封
|
// 高端珠白冰白烫金信封
|
||||||
if(level == 4){
|
if (level == 4) {
|
||||||
// 数量
|
// 数量
|
||||||
$("#thirdCount").show();
|
$("#thirdCount").show();
|
||||||
$("#thirdCount").find(":input").attr("disabled", false);
|
$("#thirdCount").find(":input").attr("disabled", false);
|
||||||
$("#otherCount").hide();
|
$("#otherCount").hide();
|
||||||
$("#otherCount").find(":input").attr("disabled", true);
|
$("#otherCount").find(":input").attr("disabled", true);
|
||||||
$(".pageColor").show();
|
$(".pageColor").show();
|
||||||
$(".pageColor").find(":input").attr("disabled", false);
|
$(".pageColor").find(":input").attr("disabled", false);
|
||||||
$(".color2").find(":input").attr("disabled", true);
|
$(".color2").find(":input").attr("disabled", true);
|
||||||
form.on('select(testId)', function(data){
|
form.on('select(testId)', function (data) {
|
||||||
if(data.value == 0){
|
if (data.value == 0) {
|
||||||
$(".color1").show();
|
$(".color1").show();
|
||||||
$(".color1").find(":input").attr("disabled", false);
|
$(".color1").find(":input").attr("disabled", false);
|
||||||
$(".color2").hide();
|
$(".color2").hide();
|
||||||
$(".color2").find(":input").attr("disabled", true);
|
$(".color2").find(":input").attr("disabled", true);
|
||||||
}else{
|
} else {
|
||||||
// $(".color2").show();
|
// $(".color2").show();
|
||||||
// $(".color2").find(":input").attr("disabled", false);
|
// $(".color2").find(":input").attr("disabled", false);
|
||||||
// $(".color1").hide();
|
// $(".color1").hide();
|
||||||
// $(".color1").find(":input").attr("disabled", true);
|
// $(".color1").find(":input").attr("disabled", true);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
// 数量
|
// 数量
|
||||||
$("#otherCount").show();
|
$("#otherCount").show();
|
||||||
$("#otherCount").find(":input").attr("disabled", false);
|
$("#otherCount").find(":input").attr("disabled", false);
|
||||||
$("#thirdCount").hide();
|
$("#thirdCount").hide();
|
||||||
$("#thirdCount").find(":input").attr("disabled", true);
|
$("#thirdCount").find(":input").attr("disabled", true);
|
||||||
$(".pageColor").hide();
|
$(".pageColor").hide();
|
||||||
$(".pageColor").find(":input").attr("disabled", true);
|
$(".pageColor").find(":input").attr("disabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击计算,计算价格
|
// 点击计算,计算价格
|
||||||
form.on('submit(acount_btn)', function(data) {
|
form.on('submit(acount_btn)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "${path}/getThanSum",
|
url: "${path}/getThanSum",
|
||||||
type : "GET",
|
type: "GET",
|
||||||
data : $(".big_box form").serialize(),
|
data: $(".big_box form").serialize(),
|
||||||
success : function(result) {
|
success: function (result) {
|
||||||
if(result.code == 100){
|
if (result.code == 100) {
|
||||||
layer.msg(result.msg,{offset:['300px','300px']},function(){});
|
layer.msg(result.msg, {offset: ['300px', '300px']}, function () {
|
||||||
return false;
|
});
|
||||||
}
|
return false;
|
||||||
var data = result.data.proList;
|
}
|
||||||
var kindData={
|
var data = result.data.proList;
|
||||||
0 : "120克双胶纸",
|
var kindData = {
|
||||||
10 : "120克牛皮纸",
|
0: "120克双胶纸",
|
||||||
1 : "100克双胶纸",
|
10: "120克牛皮纸",
|
||||||
11 : "100克牛皮纸",
|
1: "100克双胶纸",
|
||||||
2 : "140克珠光冰白彩色信封",
|
11: "100克牛皮纸",
|
||||||
3 : "200克珠光冰白彩色信封",
|
2: "140克珠光冰白彩色信封",
|
||||||
4 : "250克高端珠光冰白烫金信封"
|
3: "200克珠光冰白彩色信封",
|
||||||
};
|
4: "250克高端珠光冰白烫金信封"
|
||||||
// 第二排
|
};
|
||||||
if(level == 2 || level == 3){
|
// 第二排
|
||||||
var kind2Data={
|
if (level == 2 || level == 3) {
|
||||||
0 :"1号封",
|
var kind2Data = {
|
||||||
1 :"2号封",
|
0: "1号封",
|
||||||
2 :"3号封",
|
1: "2号封",
|
||||||
3 :"5号封",
|
2: "3号封",
|
||||||
4 :"6号封",
|
3: "5号封",
|
||||||
5 :"7号封",
|
4: "6号封",
|
||||||
6 :"8号(增票专用)",
|
5: "7号封",
|
||||||
7 :"9号封"
|
6: "8号(增票专用)",
|
||||||
};
|
7: "9号封"
|
||||||
var kind2 = kind2Data[$(".secondKind2Value").val()];
|
};
|
||||||
}
|
var kind2 = kind2Data[$(".secondKind2Value").val()];
|
||||||
// 第三排
|
}
|
||||||
else if(level == 4){
|
// 第三排
|
||||||
var kind2Data={
|
else if (level == 4) {
|
||||||
0 :"5号西式信封22*11cm",
|
var kind2Data = {
|
||||||
1 :"卡套定制款 9.4*6.4cm"
|
0: "5号西式信封22*11cm",
|
||||||
};
|
1: "卡套定制款 9.4*6.4cm"
|
||||||
var kind2 = $(".thirdKind2Value").val();
|
};
|
||||||
// 判断规格选颜色
|
var kind2 = $(".thirdKind2Value").val();
|
||||||
if(kind2 == 0){
|
// 判断规格选颜色
|
||||||
var color = $(".color11").val()
|
if (kind2 == 0) {
|
||||||
}else{
|
var color = $(".color11").val()
|
||||||
var color = $(".color22").val()
|
} else {
|
||||||
}
|
var color = $(".color22").val()
|
||||||
kind2 = $(".thirdKind2Value option:selected").text();
|
}
|
||||||
}
|
kind2 = $(".thirdKind2Value option:selected").text();
|
||||||
// 第一排
|
}
|
||||||
else{
|
// 第一排
|
||||||
var kind2Data={
|
else {
|
||||||
0 :"3号(中/西封)成品17.6*12.5CM",
|
var kind2Data = {
|
||||||
1 :"5号(中/西封)成品22*11CM",
|
0: "3号(中/西封)成品17.6*12.5CM",
|
||||||
2 :"6号(中/西封)成品23*12CM",
|
1: "5号(中/西封)成品22*11CM",
|
||||||
3 :"7号(中/西封)成品22.9*16.2CM",
|
2: "6号(中/西封)成品23*12CM",
|
||||||
4 :"8号(中/西封)成品25*16.2CM",
|
3: "7号(中/西封)成品22.9*16.2CM",
|
||||||
5 :"9号(中式)成品32.4*22.9CM",
|
4: "8号(中/西封)成品25*16.2CM",
|
||||||
6 :"9号(西式)成品32.4*22.9CM"
|
5: "9号(中式)成品32.4*22.9CM",
|
||||||
};
|
6: "9号(西式)成品32.4*22.9CM"
|
||||||
var kind2 = kind2Data[$(".firstKind2Value").val()];
|
};
|
||||||
}
|
var kind2 = kind2Data[$(".firstKind2Value").val()];
|
||||||
var kind = kindData[$('input[name="kindValue"]:checked').val()];
|
}
|
||||||
var number= $("#number").val();
|
var kind = kindData[$('input[name="kindValue"]:checked').val()];
|
||||||
if(color == null) color = ""
|
var number = $("#number").val();
|
||||||
var span_result = kind +'\n'+ kind2 + ' - ' + color +' (同款内容)\n';
|
let craft_list = [];
|
||||||
if(number > 1){
|
$("input[name='craft']:checked").each(function () {
|
||||||
for (let i = 0; i < data.length; i++) {
|
if (!$(this).is(':disabled')) {
|
||||||
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
craft_list.push($(this).val());
|
||||||
data[i].number = number;
|
}
|
||||||
}
|
}
|
||||||
}else{
|
);
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
if (craft_list.findIndex(x => x == "烫金") > -1) {
|
||||||
data[i].number = number;
|
$("select[name='craft'] option:selected").each(function () {
|
||||||
}
|
if (!$(this).is(':disabled')) {
|
||||||
}
|
craft_list.push($(this).val());
|
||||||
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
}
|
||||||
$("#span_result").val(span_result);
|
}
|
||||||
|
);
|
||||||
var count = "";
|
}
|
||||||
if($("#otherCount").css("display") == "none"){
|
if (color == null) color = ""
|
||||||
count = $("#count1 option:selected").val();
|
var span_result = kind + '\n' + kind2 + ' - ' + color + ' (同款内容)\n';
|
||||||
}else{
|
if (craft_list.length > 0) {
|
||||||
count = $("#count option:selected").val();
|
span_result += "工艺:" + craft_list.join(",") + '\n'
|
||||||
}
|
}
|
||||||
var size = "";
|
if (number > 1) {
|
||||||
if(level == 2 || level == 3){
|
for (let i = 0; i < data.length; i++) {
|
||||||
var secondKind2Value = $(".secondKind2Value option:selected").val();
|
span_result += number + '款 各' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
||||||
console.log(secondKind2Value);
|
data[i].number = number;
|
||||||
if(secondKind2Value == "0"){
|
}
|
||||||
size = "16.5*10";
|
} else {
|
||||||
}else if(secondKind2Value == "1"){
|
for (let i = 0; i < data.length; i++) {
|
||||||
size = "17.5*11";
|
span_result += number + '款 ' + data[i].count + "个,共" + data[i].price + "元" + '\n'
|
||||||
}else if(secondKind2Value == "2"){
|
data[i].number = number;
|
||||||
size = "17.6*12.5";
|
}
|
||||||
}else if(secondKind2Value == "3"){
|
}
|
||||||
size = "22*11";
|
span_result += '包邮,免费设计呢~(偏远地区需补邮费)'
|
||||||
}else if(secondKind2Value == "4"){
|
$("#span_result").val(span_result);
|
||||||
size = "23*12";
|
|
||||||
}else if(secondKind2Value == "5"){
|
var count = "";
|
||||||
size = "22.9*16.2";
|
if ($("#otherCount").css("display") == "none") {
|
||||||
}else if(secondKind2Value == "6"){
|
count = $("#count1 option:selected").val();
|
||||||
size = "25*16.2";
|
} else {
|
||||||
}else{
|
count = $("#count option:selected").val();
|
||||||
size = "32.4*22.9";
|
}
|
||||||
}
|
var size = "";
|
||||||
kind += "-" + kind2;
|
if (level == 2 || level == 3) {
|
||||||
}else if(level == 4){
|
var secondKind2Value = $(".secondKind2Value option:selected").val();
|
||||||
var thirdKind2Value = $(".thirdKind2Value option:selected").val();
|
console.log(secondKind2Value);
|
||||||
size = $(".thirdKind2Value option:selected").text()
|
if (secondKind2Value == "0") {
|
||||||
|
size = "16.5*10";
|
||||||
|
} else if (secondKind2Value == "1") {
|
||||||
|
size = "17.5*11";
|
||||||
|
} else if (secondKind2Value == "2") {
|
||||||
|
size = "17.6*12.5";
|
||||||
|
} else if (secondKind2Value == "3") {
|
||||||
|
size = "22*11";
|
||||||
|
} else if (secondKind2Value == "4") {
|
||||||
|
size = "23*12";
|
||||||
|
} else if (secondKind2Value == "5") {
|
||||||
|
size = "22.9*16.2";
|
||||||
|
} else if (secondKind2Value == "6") {
|
||||||
|
size = "25*16.2";
|
||||||
|
} else {
|
||||||
|
size = "32.4*22.9";
|
||||||
|
}
|
||||||
|
kind += "-" + kind2;
|
||||||
|
} else if (level == 4) {
|
||||||
|
var thirdKind2Value = $(".thirdKind2Value option:selected").val();
|
||||||
|
size = $(".thirdKind2Value option:selected").text()
|
||||||
|
|
||||||
|
} else {
|
||||||
|
var sizeIndex = kind2.indexOf("品");
|
||||||
|
size = kind2.substring(sizeIndex + 1, kind2.length);
|
||||||
|
size = size.replace("CM", "");
|
||||||
|
kind += "-" + kind2.substring(0, sizeIndex - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
getRemark("彩色信封", size, count + "个", kind, number, "", "");
|
||||||
|
//计算完自动复制文本
|
||||||
|
var e = document.getElementById("span_result");//对象是content
|
||||||
|
if (e.value != "") {
|
||||||
|
e.select();//选择对象
|
||||||
|
document.execCommand("Copy");//执行浏览器复制命令
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成表格
|
||||||
|
table.render({
|
||||||
|
elem: '#priceTable',
|
||||||
|
even: true, //隔行变色
|
||||||
|
data: data, // 赋值已知数据
|
||||||
|
width: 500,
|
||||||
|
cols: [[
|
||||||
|
{
|
||||||
|
field: 'number',
|
||||||
|
width: '12%',
|
||||||
|
align: "center",
|
||||||
|
title: '款数'
|
||||||
|
}, {
|
||||||
|
field: 'count',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '数量'
|
||||||
|
}, {
|
||||||
|
field: 'price',
|
||||||
|
width: '16%',
|
||||||
|
align: "center",
|
||||||
|
title: '报价'
|
||||||
|
}, {
|
||||||
|
field: 'wangwang',
|
||||||
|
align: "center",
|
||||||
|
width: '16%',
|
||||||
|
title: '折扣价'
|
||||||
|
}, {
|
||||||
|
field: 'wangwang',
|
||||||
|
align: "center",
|
||||||
|
width: '19%',
|
||||||
|
title: '跳楼价'
|
||||||
|
}, {
|
||||||
|
field: 'weight',
|
||||||
|
width: '21%',
|
||||||
|
align: "center",
|
||||||
|
title: '重量(kg)'
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
done: function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}else{
|
|
||||||
var sizeIndex = kind2.indexOf("品");
|
|
||||||
size = kind2.substring(sizeIndex+1, kind2.length);
|
|
||||||
size = size.replace("CM","");
|
|
||||||
kind += "-" + kind2.substring(0, sizeIndex-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
getRemark("彩色信封", size, count+"个", kind, number, "", "");
|
|
||||||
//计算完自动复制文本
|
|
||||||
var e=document.getElementById("span_result");//对象是content
|
|
||||||
if (e.value != "") {
|
|
||||||
e.select();//选择对象
|
|
||||||
document.execCommand("Copy");//执行浏览器复制命令
|
|
||||||
}
|
|
||||||
|
|
||||||
//生成表格
|
|
||||||
table.render({
|
|
||||||
elem : '#priceTable',
|
|
||||||
even : true, //隔行变色
|
|
||||||
data : data, // 赋值已知数据
|
|
||||||
width : 500,
|
|
||||||
cols : [ [
|
|
||||||
{
|
|
||||||
field : 'number',
|
|
||||||
width : '12%',
|
|
||||||
align : "center",
|
|
||||||
title : '款数'
|
|
||||||
},{
|
|
||||||
field : 'count',
|
|
||||||
width : '16%',
|
|
||||||
align : "center",
|
|
||||||
title : '数量'
|
|
||||||
},{
|
|
||||||
field : 'price',
|
|
||||||
width : '16%',
|
|
||||||
align : "center",
|
|
||||||
title : '报价'
|
|
||||||
},{
|
|
||||||
field : 'wangwang',
|
|
||||||
align : "center",
|
|
||||||
width : '16%',
|
|
||||||
title : '折扣价'
|
|
||||||
},{
|
|
||||||
field : 'wangwang',
|
|
||||||
align : "center",
|
|
||||||
width : '19%',
|
|
||||||
title : '跳楼价'
|
|
||||||
},{
|
|
||||||
field : 'weight',
|
|
||||||
width : '21%',
|
|
||||||
align : "center",
|
|
||||||
title : '重量(kg)'
|
|
||||||
}
|
|
||||||
] ],
|
|
||||||
done: function () {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
Referência em uma Nova Issue
Bloquear um usuário