<%@ 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>Insert title here</title>
    <%@include file="/views/common.jsp" %>
</head>
<style>
    .edge .layui-edge {
        right: 10px;
    }

    .layui-form-checkbox[lay-skin=primary] i {
        /* border-radius: 50px; */
        width: 18px;
        height: 18px;
        line-height: 18px;
        margin-top: 3px;
    }

    .layui-form-checkbox[lay-skin=primary] span {
        color: black;
        margin-top: 3px;
        font-size: 14px;
    }

    #awards::-webkit-outer-spin-button, #awards::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
    }

    #awards {
        -moz-appearance: textfield;
    }

    #z4_craft .layui-form-select .layui-edge {
        right: 20px;
    }

    #peijian_ui .layui-form-select .layui-edge {
        right: 40px;
    }

    #lesspeijian .layui-form-select .layui-edge {
        right: 40px;
    }

    .huafangCraft .layui-form-select .layui-edge {
        right: 40px;
    }

    .value7 .layui-form-select .layui-edge {
        right: 20px;
    }
</style>
<body>
<div class="big_box">
    <div class="left_div">
        <h1 class="h1">卡片</h1>
        <hr>
        <form class="layui-form">
            <div class="layui-form-item">
                <input type="radio" lay-filter="couponKind" name="couponKind" value="常用种类" title="常规" checked="checked">
                <input type="radio" lay-filter="couponKind" name="couponKind" value="少数量" title="少数量">
            </div>
        </form>
        <form class="layui-form" id="kindForm">
            <p>品种</p>
            <div>
					<span class="normal">
						<!-- <input type="radio" lay-filter="kind" name="kind" value="0" title="吊旗"> -->
						<input type="radio" lay-filter="kind" name="kind" value="1" title="腰封">
                        <!-- <input type="radio" lay-filter="kind" name="kind" value="2" title="吊牌"> -->
						<input type="radio" lay-filter="kind" name="kind" value="3" title="贺卡">
						<input type="radio" lay-filter="kind" name="kind" value="4" title="优惠券">
						<input type="radio" lay-filter="kind" name="kind" value="5" title="抽奖券">
                        <!--<input type="radio" lay-filter="kind" name="kind" value="6" title="特价名片">-->
						<input type="radio" lay-filter="kind" name="kind" value="7" title="存酒卡">
						<input type="radio" lay-filter="kind" name="kind" value="13" title="刮刮卡">
						<input type="radio" lay-filter="kind" name="kind" value="8" title="门挂牌">
                        <!--<input type="radio" lay-filter="kind" name="kind" value="9" title="售后卡">-->
						<input type="radio" lay-filter="kind" name="kind" value="10" title="吸管套">
						<input type="radio" lay-filter="kind" name="kind" value="11" title="圣诞卡">
					</span>
                <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="特种纸名片">
						<input type="radio" lay-filter="kind" name="kind" value="婚礼卡" title="婚礼卡">
						<input type="radio" lay-filter="kind" name="kind" value="种子纸" title="种子纸">
					</span>
            </div>
            <div id="doorList" style="display: none">
                <%@include file="doorList.jsp" %>
            </div>
        </form>
        <div id="other">
            <form class="layui-form" id="kindValueForm">
                <p>材质</p>
                <div class="kindValue">
                    <input type="radio" lay-filter="kindValue" name="kindValue" value="2" title="300克铜版纸">
                    <input type="radio" lay-filter="kindValue" name="kindValue" value="1" title="200克铜版纸">
                    <input type="radio" class="157" lay-filter="kindValue" name="kindValue" value="0" title="157克铜版纸">
                </div>
                <div class="kindValue2" style="display:none">
                    <input type="radio" name="kindValue2" lay-filter="kindValue2" value="2" title="300克铜版纸"
                           checked="checked">
                    <input type="radio" name="kindValue2" lay-filter="kindValue2" value="10" title="400克铜版纸">
                </div>
                <div class="kindValue3" style="display:none">
                    <input type="radio" name="kind3Value" lay-filter="kindValue3" value="3" title="300克铜版纸">
                    <input type="radio" name="kind3Value" lay-filter="kindValue3" value="4" title="600克铜版纸">
                    <!-- <input type="radio" name="kind3Value" lay-filter="kindValue3" value="5" title="800克铜版纸"> -->
                </div>
                <div class="kindValue4" style="display:none">
                    <input type="radio" name="kind4Value" lay-filter="kindValue4" value="3" title="300克铜版纸">
                    <input type="radio" name="kind4Value" lay-filter="kindValue4" value="6" title="特种纸名片（不配绳子）">
                </div>
                <div class="kindValue5" style="display:none">
                    <input type="radio" name="kindValue5" lay-filter="kindValue5" value="1" title="300克铜版纸" checked>
                    <input type="radio" name="kindValue5" lay-filter="kindValue5" value="2" title="pvc">
                </div>
                <div class="kindValue6" style="display:none">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="皙贝" title="皙贝"
                           checked>
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="玉蕊" title="玉蕊">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="睿狐" title="睿狐">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="溪雪" title="溪雪">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="珠光" title="珠光">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="琮纹" title="琮纹">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="雅柔" title="雅柔">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="萱姿" title="萱姿">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="草香" title="草香">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="芳怡" title="芳怡">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="金绒" title="金绒">
                    <input type="radio" name="kindValue6" lay-filter="kindValue6" value="超感" title="超感">
                </div>
                <div class="kindValue7" style="display:none">
                    <input type="radio" name="kindValue7" lay-filter="kindValue7" value="2" title="300克铜版纸"
                           checked="checked">
                    <input type="radio" name="kindValue7" lay-filter="kindValue7" value="8" title="250克牛皮纸">
                </div>
                <div class="ui_sdk" style="display:none">
                    <input type="radio" name="ui_sdk_cz" value="1" title="700克白卡纸" checked>
                </div>
                <div class="ui_hlbz" style="display:none">
                    <input type="radio" name="ui_hlbz_cz" value="1" title="157克铜版纸" checked>
                </div>
                <div id="tag" style="display: none">
                    <%@include file="tag.jsp" %>
                </div>
                <div id="specialCard" style="display: none">
                    <%@include file="specialCard.jsp" %>
                </div>
            </form>
            <form class="layui-form" id="3zValueForm">
                <p>类型</p>
                <div class="z3type">
                    <input type="radio" lay-filter="z3type" name="z3type" value="0" title="门票入场" checked>
                    <input type="radio" lay-filter="z3type" name="z3type" value="1" title="卡片">
                    <input type="radio" lay-filter="z3type" name="z3type" value="2" title="圆形">
                    <input type="radio" lay-filter="z3type" name="z3type" value="3" title="开窗">
                    <input type="radio" name="z3type" lay-filter="z3type" value="4" title="自定义">
                </div>
            </form>
            <div class="tagOther">
                <form class="layui-form">
                    <input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="4">
                    <input type="hidden" name="proTypeLabel" id="proTypeLabel" class="layui-input">
                    <input type="hidden" name="d" id="d" class="layui-input">
                    <p class="size-tip-other">
                        尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
                        &nbsp;<span class="ui_yf" style="font-size:14px;color:red">200克、300克腰封模切最大尺寸100cm，200克腰封裁切最大尺寸118cm</span>
                        <span class="ui_yh" style="font-size:14px;color: red;">压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价</span>
                        <span class="ui_tz_yh" style="font-size:14px;color: red;display:none">压1痕最小尺寸10.8*6cm,压2痕最小尺寸13.5*5.4CM</span>
                    </p>
                    <p class="size-tip-z3" style="display:none;">
                        尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
                        &nbsp;<span style="font-size:14px;color:red">最小尺寸5*8cm，最大尺寸20*30cm</span>
                    </p>

                    <div class="qt">
                        <input type="text" name="size" placeholder="格式:长*宽" id="size" class="layui-input"
                               autocomplete="off">
                    </div>
                    <div class="ui_menu_size" style="display: none;">
                        <select name="ui_menu_size" id="ui_menu_size" class="select">
                            <option value="21*14">21*14 cm</option>
                            <option value="21*28.5">21*28.5 cm</option>
                            <option value="42*28.5">42*28.5 cm</option>
                        </select>
                    </div>
                    <div class="ui_shk_size" style="display: none;">
                        <select name="ui_shk_size" id="ui_shk_size" class="select">
                            <option value="9*5.4">9*5.4 cm</option>
                            <option value="9*11">9*11 cm</option>
                            <option value="8*11">8*11 cm</option>
                            <option value="7*14">7*14 cm</option>
                            <option value="8*14">8*14 cm</option>
                            <option value="10*15">10*15 cm</option>
                            <option value="11*18">11*18 cm</option>
                            <option value="9*9">9*9 cm</option>
                            <option value="9*14">9*14 cm</option>
                        </select>
                    </div>
                    <div class="3z_size" id="3z_size" style="display: none;">
                        <div id="3z_menpiao_size" style="display: none">
                            <select name="z3size1" lay-filter="z3size1" class="select">
                                <option value="16*7">16*7 cm</option>
                                <option value="19*7">19*7 cm</option>
                                <option value="15*5">15*5 cm</option>
                                <option value="13*5">13*5 cm</option>
                            </select>
                        </div>
                        <div id="3z_kapian_size" style="display: none">
                            <select name="z3size1" lay-filter="z3size1" class="select">
                                <option value="10*15">10*15 cm</option>
                                <option value="16*7">16*7 cm</option>
                                <option value="6*9">6*9 cm</option>
                                <option value="7*10">7*10 cm</option>
                                <option value="9*9">9*9 cm</option>
                                <option value="8*11">8*11 cm</option>
                                <option value="15*5">15*5 cm</option>
                            </select>
                        </div>
                        <div id="3z_yuan_size" style="display: none">
                            <select name="z3size1" lay-filter="z3size1" class="select">
                                <%--                                <option value="8.5*8.5">8.5*8.5 cm</option>--%>
                                <option value="9*9">9*9 cm</option>
                            </select>
                        </div>
                        <div id="3z_chuang_size" style="display: none">
                            <select name="z3size1" lay-filter="z3size1" class="select">
                                <option value="16*7">16*7 cm</option>
                                <option value="19*7">19*7 cm</option>
                            </select>
                        </div>
                    </div>
                    <div class="z3_vice" style="display: none;">
                        <div class="z_16">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券6cm）"
                                   title="圆角+手撕线+缺口（副券6cm）">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券4cm）"
                                   title="圆角+手撕线+缺口（副券4.5cm）">
                            <%--                            <input type="radio" name="3z_vice" value="直角+手撕线+无缺口（副券3.5cm）"--%>
                            <%--                                   title="直角+手撕线+无缺口（副券3.5cm）">--%>
                        </div>
                        <div class="z_19">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券5.6cm）"
                                   title="圆角+手撕线+缺口（副券5.6cm）">
                        </div>
                        <div class="z_15">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券5cm）"
                                   title="圆角+手撕线+缺口（副券5cm）">
                        </div>
                        <div class="z_13">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券4.5cm）"
                                   title="圆角+手撕线+缺口（副券4.5cm）">
                        </div>
                        <div class="z_45">
                            <input type="radio" name="3z_vice" value="圆角+手撕线+缺口（副券4.5cm）"
                                   title="圆角+手撕线+缺口（副券4.5cm）">
                        </div>


                    </div>
                    <div class="ui_sdk" style="display: none;">
                        <select name="ui_sdk_size" id="ui_sdk_size" class="select">
                            <option value="31*18">31*18 cm</option>
                        </select>
                    </div>
                    <div class="ui_xgt" style="display: none;">
                        <select name="size" id="ui_sdk_size" class="select">
                            <option value="6.5*5.4">6.5*5.4 cm</option>
                        </select>
                    </div>
                    <span class="layui-form-item guaguaSize1">
							<p>
								<span style="font-size:14px;color:red">刮刮卡最小尺寸75*50mm，400*400mm</span>
							</p>
							<p>
								刮刮膜尺寸(MM/毫米)
							</p>
							<select name="size1" id="size1" class="select">
								<option value="6*18">6*18 mm</option>
								<option value="6*22">6*22 mm</option>
								<option value="6*26">6*26 mm</option>
								<option value="8*26">8*26 mm</option>
								<option value="8*30">8*30 mm</option>
								<option value="15*15">15*15mm</option>
								<option value="18*18">18*18mm</option>
								<option value="20*20">20*20mm</option>
								<option value="18*32">18*32 mm</option>
								<option value="15*48">15*48 mm</option>
								<option value="8*36">8*36 mm</option>
                                <option value="70*50">70*50 mm</option>
                                <option value="60*25" selected>60*25 mm</option>
                                <option value="35*58">35*58 mm</option>
                                <option value="41*72">41*72 mm</option>
							</select>
                            <div id="otherSize"></div>
							<p>
                              <span style="font-size:14px;color:red">组合价：卡片内容尺寸一样  奖项 数量可以不一样</span>
                            </p>
						</span>
                    <div class="layui-input-block guaguaSize1" style="display:inline-block;">
                        <input type="checkbox" name="fmType" lay-filter="fmType" value="0" title="贴膜">
                        <div class="layui-inline edge stickNum" style="width:60px; ">
                            <select name="stickNum" class="select stickNum" lay-filter="stickNum">
                                <option value="1" selected>1处</option>
                                <option value="2">2处</option>
                                <option value="3">3处</option>
                                <option value="4">4处</option>
                                <option value="5">5处</option>
                                <option value="6">6处</option>
                            </select>
                        </div>
                        <input type="checkbox" name="fmType" lay-filter="fmType" value="1" title="配膜">
                    </div>
                    <span class="layui-form-item guaguaSize1">
                        <p>
                            输入奖项个数
                        </p>
                        <div class="layui-form-item">
                            <input type="number" max="30" value="1" name="awards" id="awards" placeholder="请输入整数"
                                   class="layui-input"
                                   autocomplete="off" onkeyup="clearNoNum(this)">
                        </div>
                        <p>
                          <span style="font-size:14px;color:red">奖项最高30个，最低1个</span>
                        </p>
                    </span>
                    <span class=" layui-form-item guaguaSize">
                        <p>
                            <span style="font-size:14px;color:red">尺寸超过4个名片位请单独报价</span>
                        </p>
                        <p>
                            刮刮膜尺寸(MM/毫米)
                        </p>
                        <select name="size1" id="size2" class="select">
                            <option value="6*18">6*18 mm</option>
								<option value="6*22">6*22 mm</option>
								<option value="6*26">6*26 mm</option>
								<option value="8*26">8*26 mm</option>
								<option value="8*30">8*30 mm</option>
								<option value="15*15">15*15mm</option>
								<option value="18*18">18*18mm</option>
								<option value="20*20">20*20mm</option>
								<option value="18*32">18*32 mm</option>
								<option value="15*48">15*48 mm</option>
								<option value="8*36">8*36 mm</option>
                                <option value="70*50">70*50 mm</option>
                                <option value="60*25" selected>60*25 mm</option>
                                <option value="35*58">35*58 mm</option>
                                <option value="41*72">41*72 mm</option>
                        </select>
                        <p>
                            <span style="font-size:14px;color:red">同个客户下单多款，其中一款数量在200张以上请全部按照印刷报价<br/>200张以上车间贴，200张以下客户自己贴</span>
                        </p>
                    </span>
                    <div id="kaichuang" style="display: none">
                        <div class="layui-form-item">
                            <select class="select">
                                <option value="单开窗">单开窗</option>
                                <option value="双开窗">双开窗</option>
                            </select>
                        </div>
                    </div>
                    <p>
                        数量(张) <span class="switchCount"><input type="checkbox" name="switchCount" class="Count"
                                                               lay-filter="switchCount" title="自定义数量"></span>
                    </p>
                    <div class="count">
                        <div class="layui-form-item">
                            <select name="count" id="selectCount" class="select">
                                <option value="200">200</option>
                                <option value="500">500</option>
                                <option value="1000">1000</option>
                                <option value="2000">2000</option>
                                <option value="3000">3000</option>
                                <option value="5000">5000</option>
                                <option value="10000">10000</option>
                            </select>
                        </div>
                    </div>
                    <div class="ui_sdk">
                        <div class="layui-form-item">
                            <select name="count" id="selectCount1" class="select">
                                <option value="50">50</option>
                                <option value="100">100</option>
                                <option value="500">500</option>
                                <option value="1000">1000</option>
                                <option value="2000">2000</option>
                                <option value="5000">5000</option>
                                <option value="10000">10000</option>
                            </select>
                        </div>
                    </div>
                    <div class="ui_xgt" style="display: none;">
                        <div class="layui-form-item">
                            <select name="count" id="selectCount2" class="select">
                                <option value="500">500</option>
                                <option value="1000">1000</option>
                                <option value="2000">2000</option>
                                <option value="3000">3000</option>
                                <option value="5000">5000</option>
                                <option value="10000">10000</option>
                                <option value="20000">20000</option>
                                <option value="30000">30000</option>
                                <option value="50000">50000</option>
                                <option value="100000">100000</option>
                            </select>
                        </div>
                    </div>
                    <div class="diyCount" style="display: none">
                        <div class="layui-form-item">
                            <input type="text" name="count" id="count" placeholder="请输入整数" class="layui-input"
                                   autocomplete="off">
                        </div>
                    </div>
                    <p>款数</p>
                    <div class="layui-form-item">
                        <input type="text" name="number" id="number" autocomplete="off"
                               class="layui-input" value="1" lay-verify="number">
                    </div>
                    <div class="layui-form-item" id="ui_des" style="display:none;">
                        <p>
                            设计内容
                        </p>
                        <select name="desType" lay-filter="desType" id="desType" class="select" lay-search>
                            <option value=""></option>
                            <option value="1">改序号</option>
                            <option value="2">改名字</option>
                            <option value="3">改二维码</option>
                            <option value="4">改图片</option>
                            <option value="5">改内容模板相同</option>
                            <option value="6" selected>改内容模板完全不同</option>
                        </select>
                    </div>
                    <p>
                        客户旺旺
                    </p>
                    <div class="layui-form-item">
                        <input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
                               class="layui-input">
                    </div>
                </form>
            </div>
            <div class="tagOther normalCountHideCraft">
                <form class="layui-form" id="craftForm">
                    <div id="craft">
                        <p>
                            工艺&nbsp;<span style="font-size:12px;color:red">优惠券异形模切+打码限于简单刀版（无法做圆形  椭圆机）最小9*5.4 300克腰封压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价</span>
                        </p>
                        <%--                        <div class="layui-input-block doublefumo" style="display:inline-block;">--%>
                        <%--                            <input type="checkbox" class="ui_double_fm" name="craft" lay-filter="ui_fm" value="双面覆哑膜"--%>
                        <%--                                   title="双面覆哑膜">--%>
                        <%--                        </div>--%>
                        <div class="layui-input-block value7">
                            <div>
                                裁切工艺：
                                <input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="模切"
                                       title="异形模切">
                                <input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="直角裁切"
                                       title="直角裁切" checked>
                            </div>
                            <div>
                                <span class="ui_fm_l">
                                    覆膜工艺：
                                    <input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面覆哑膜" title="双面覆哑膜"/>
                                    <span class="huafangCraft">
                                        <input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面星光膜" title="双面星光膜"/>
                                        <input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面镭射膜" title="双面镭射膜"/>
                                        <input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面触感膜" title="双面触感膜"/>
                                        <input type="checkbox" name="craft" class="ui_fm" lay-filter="ui_yf_fm" value="双面雪花膜" title="双面雪花膜"/>
                                    </span>
                                </span>
                            </div>
                            <div>
                                <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>

                            </div>
                            <span id="craftHu" style="display:none;margin-top: 5px;">
                                    后道工艺：
                                    <input type="checkbox" name="craft" class="ui_hu" lay-filter="switch" value="糊成品"
                                           title="糊成品">
                                    <input type="checkbox" name="craft" class="ui_hu" lay-filter="switch" value="糊半成品"
                                           title="糊半成品">
                                </span>
                            <div>
                                <span class="yhydx">
                                    烫金工艺：
                                    <input type="checkbox" name="craft" class="tang" lay-filter="switch" value="单面烫金" title="单面烫金">
                                </span>
                            </div>

                        </div>
                        <div class="layui-input-block craft tj">
                            烫金工艺：
                            <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="单面烫金"
                                   title="单面烫金">
                            <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="双面烫金"
                                   title="双面烫金">
                            <span class="sizeTang">
                                <div class="layui-inline">
                                    <input type="text" placeholder="长边" autocomplete="off" name="lengthTang"
                                           id="lengthTang" class="layui-input" style="width:50px;height:35px;">
                                </div>x
                                <div class="layui-inline">
                                    <input type="text" placeholder="短边" autocomplete="off" name="widthTang"
                                           id="widthTang" class="layui-input" style="width:50px;height:35px;">
                                </div>
                            </span>
                            <span class="huafangCraft">
                                <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="单面局部UV" title="单面局部UV">
                                <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="双面局部UV" title="双面局部UV">
                                <span class="sizeUV">
                                    <div class="layui-inline">
                                        <input type="text" placeholder="长边" autocomplete="off" name="lengthVU" id="lengthVU" class="layui-input"
                                               style="width:50px;height:35px;">
                                    </div>x
                                    <div class="layui-inline">
                                        <input type="text" placeholder="短边" autocomplete="off" name="widthUV" id="widthUV" class="layui-input"
                                               style="width:50px;height:35px;">
                                    </div>
                                </span>
                            </span>

                        </div>
                        <div class="layui-input-block craft">
                            特殊工艺：
                            <input type="checkbox" name="craft" class="yh disab max ya cjkDisab" lay-filter="switch"
                                   value="压痕" title="压痕">
                            <div class="layui-inline edge yahenHide" style="width:60px; display:none">
                                <select name="yaheng" class="select yahen" lay-filter="yahen">
                                    <option value="1" selected>1</option>
                                    <option value="2">2</option>
                                </select>
                            </div>
                            <span class="value5">
							      	<input type="checkbox" name="craft" class="ydx disab max ya cjkDisab"
                                           lay-filter="switch" value="压点线" title="压点线">
							      </span>
                            <div class="layui-inline edge yadianxianHide" style="width:60px;display:none">
                                <select name="dadianxian" class="select yadianxian" lay-filter="yadianxian">
                                    <option value="1" selected>1</option>
                                    <option value="2">2</option>
                                </select>
                            </div>
                            <span class="value2">
							      	<input type="checkbox" name="craft" class="dk disab max cjkDisab"
                                           lay-filter="switch" value="打孔" title="打孔">
								</span>
                            <%--                            <div class="layui-inline edge dakongHide" style="width:60px;display:none">--%>
                            <%--                                <select name="dakong" class="select dakong" lay-filter="dakong">--%>
                            <%--                                    <option value="1" selected>1</option>--%>
                            <%--                                    <option value="2">2</option>--%>
                            <%--                                </select>--%>
                            <%--                            </div>--%>
                            <div class="layui-inline edge dakongHide" style="width:60px;display:none">
                                <select class="select wkong layui-inline">
                                    <option value="3mm" selected>3mm</option>
                                    <option value="5mm">5mm</option>
                                </select>
                            </div>
                            <input type="checkbox" name="craft" class="yj disab max cjkDisab" lay-filter="switch"
                                   value="圆角" title="圆角">
                            <div class="layui-input-block craft value5 value7 dm" style="display:inline-block;">
                                <input type="checkbox" name="craft" lay-filter="switch" value="打码" title="打码">
                                <div class="layui-inline edge damaHide" style="width:100px;display:none">
                                    <div style="display: flex;align-items: center">
                                        <span style="flex-shrink: 0">码数:</span>
                                        <select name="pcount" class="select" lay-filter="mashu">
                                            <option value="7" selected>7</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline edge damaHide" style="width:100px;display:none">
                                    <div style="display: flex;align-items: center">
                                        <span style="flex-shrink: 0">个数:</span>
                                        <select name="maxian" class="select dama" lay-filter="dama">
                                            <option value="1" selected>1</option>
                                            <option value="2">2</option>
                                            <option value="3">3</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline edge damaHide" style="width:120px;display:none">
                                    <div style="display: flex;align-items: center">
                                        <span style="flex-shrink: 0">颜色:</span>
                                        <select name="macolor" class="select macolor">
                                            <option value="金色码" selected>金色码</option>
                                            <option value="红色码">红色码</option>
                                            <option value="黑色码">黑色码</option>
                                        </select>
                                    </div>

                                </div>
                                <div class="layui-inline edge bianma" style="width:120px;display:none">
                                    <select name="bianma" class="select bianmaSelect" lay-filter="bianma">
                                        <option value="水平编码" selected>水平编码</option>
                                        <%--                                        <option value="上下编码">上下编码</option>--%>
                                    </select>
                                </div>
                            </div>
                            <div class="bmType" style="display:none">
                                <span style="font-size:14px;color:red">打码数量为‘2’时,需要选择打码类型：[水平编码] 或 [上下编码]
                                    </br>水平编码：价格相同; 上下编码：价格不同
                                    </br>只能打红色码和黑色码 ，3个码的价格按照7个码的翻倍价格算
                                </span>
                            </div>
                        </div>
                        <div class="neibu" style="display: none">
                            <input type="checkbox" name="craft" class="yj" id="nmq" value="内部模切" title="内部模切" lay-filter="nmq"/>
                            <span class="n_mq_input" style="display: none">
                                 <span style="margin-top:12px;flex-shrink: 0">个数 ： </span>
                                <input type="text" placeholder="请输入整数" autocomplete="off" name="n_mq_num" value="0"
                                       class="layui-input" style="width: 70px">
                                 <span style="margin-top:12px;flex-shrink: 0">尺寸(CM/厘米) <span
                                         style="font-size:14px;color:red">输入格式: 长 * 宽</span>  </span>
                                <input type="text" placeholder="尺寸" autocomplete="off" name="n_mq_size"
                                       class="layui-input">
                            </span>
                        </div>
                    </div>
                </form>
            </div>
            <div class="lessCountHideCraft" style="display:none">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>
                    <div class="layui-input-block">
                        <div>
                            印刷工艺：
                            <input type="radio" name="craftShua" value="双面印刷" title="双面印刷" checked>
                        </div>
                        <div>
                            裁切工艺：
                            <span class="zhijiaoCard">
                                <input type="checkbox" name="craft" lay-filter="switchCraft" value="直角" title="直角" lay-skin="primary"
                                       class="zhijiaoCraft">
                            </span>
                            <input type="checkbox" name="craft" lay-filter="switchCraft" value="异形" title="异形" lay-skin="primary"
                                   class="specialCraft">
                        </div>

                        <div>
                            <span class="tj">
                                烫金工艺：
                                <input type="checkbox" name="craft" lay-filter="switchCraft" value="烫金" title="烫金"
                                       lay-skin="primary" class="tjCraft">
    <%--                            <input type="checkbox" name="craft" lay-filter="switchCraft" value="彩色印刷+烫金"--%>
    <%--                                   title="彩色印刷+烫金" lay-skin="primary" class="tjCraft">--%>
                            </span>
                        </div>
                    </div>
                </form>
            </div>
            <div class="ui_menu_craft" style="display: none;">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>
                    <div class="layui-input-block">
                        <input type="radio" name="craft" class="ui_cd_craft" value="单面过塑" title="单面过塑"
                               checked="checked">
                        <input type="radio" name="craft" class="ui_cd_craft" value="双面过塑" title="双面过塑">
                    </div>
                </form>
            </div>
            <div class="z3_craft" style="display: none;">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>

                    <div class="layui-input-block">
                        <div>
                            裁切工艺：
                            <span class="z3_craft_yj">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="圆角" title="圆角"/>
                            </span>
                            <span class="z3_craft_zj">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="直角" title="直角"/>
                            </span>
                            <span class="z3_craft_mq">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="模切" title="模切"/>
                            </span>
                        </div>
                        <div>
                            特殊工艺：
                            <span class="z3_craft_dk">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="打孔" title="打孔"/>
                            </span>
                            <span class="z3_craft_ssx">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="打点线" title="打点线"/>
                            </span>
                            <span class="z3_craft_yh">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="压痕" title="压痕"/>
                            </span>
                            <span class="z3_craft_bm">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="编码" title="编码"/>
                            </span>
                        </div>
                        <div>
                            配件：
                            <span class="z3_craft_opp">
                                <input type="checkbox" name="craft" lay-filter="z3Crafts" value="装opp袋" title="装opp袋"/>
                            </span>
                            <input type="checkbox" class="shengz" name="craft" lay-filter="z3Crafts" value="绳子" title="绳子">
                            <div class="shengz scolor" style="width: 150px;display: none">
                                <select class="select">
                                    <option value="白色绳子">白色绳子</option>
                                    <option value="黑色绳子">黑色绳子</option>
                                    <option value="红色绳子">红色绳子</option>
                                </select>
                            </div>
                            <input type="checkbox" name="craft" lay-filter="z3Crafts" value="葫芦针" title="葫芦针"/>
                            <input type="checkbox" name="craft" lay-filter="z3Crafts" value="棉绳" title="棉绳"/>
                        </div>
                        <div>
                            覆膜工艺：
                            <input type="radio" name="fm" value="不覆膜" title="不覆膜" checked="checked"/>
                        </div>

                    </div>
                </form>
            </div>
            <div class="z4_craft" id="z4_craft" style="display: none;">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>
                    <div class="layui-input-block" style="display:inline-block;">
                        覆膜工艺：
                        <input type="checkbox" class="ui_double_fm" name="craft" lay-filter="ui_fm" value="双面覆哑膜"
                               title="双面覆哑膜">
                    </div>
                    <div class="layui-input-block" style="display:inline-block;">
                        烫金类型：
                        <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="单面烫金"
                               title="单面烫金">
                        <input type="checkbox" name="craft" class="tangjin" lay-filter="switch" value="双面烫金"
                               title="双面烫金">
                    </div>
                    <div class="layui-input-block">
                        裁切工艺：
                        <input type="checkbox" name="craft" class="mq caiqie" lay-filter="switchMQ" value="裁切"
                               title="直角裁切">
                        <input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="模切"
                               title="异形模切">
                        <input type="checkbox" name="craft" class="mq" lay-filter="switchMQ" value="圆角"
                               title="圆角">
                    </div>
                    <div class="layui-input-block">
                        常见工艺：
                        <%--                        <input type="checkbox" name="craft" class="nomq" lay-filter="switchCrafts" value="压痕"--%>
                        <%--                               title="压痕"/>--%>
                        <div class="layui-inline yahenghide" style="width:60px;display:none">
                            <select name="yaheng" class="select yadianxian">
                                <option value="1" selected>1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                            </select>
                        </div>
                        <input type="checkbox" name="craft" class="nomq" lay-filter="switchCrafts" value="打点线"
                               title="打点线"/>
                        <div class="layui-inline dadianxianhide" style="width:60px;display:none">
                            <select name="dadianxian" class="select dadianxian">
                                <option value="1" selected>1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                            </select>
                        </div>

                        <input type="checkbox" name="craft" class="nomq" lay-filter="switchCrafts" value="打孔"
                               title="打孔"/>
                        <div class="layui-inline dakonghide" style="width:60px;display:none">
                            <select class="select wkong">
                                <option value="3mm" selected>3mm</option>
                                <option value="5mm">5mm</option>
                            </select>
                        </div>
                        <input type="checkbox" name="craft" value="打码" lay-filter="switchCrafts" title="打码"/>
                        <div class="layui-inline maxianhide" style="width:60px;display:none">
                            <select name="maxian" class="select maxian">
                                <option value="1" selected>1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                            </select>
                        </div>

                    </div>

                </form>
            </div>
            <div class="ui_sdk" style="display: none;">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>
                    <div class="layui-input-block">
                        <input type="radio" name="ui_sdk_craft" value="无" title="无" checked="checked"
                               lay-filter="ui_sdk_craft">
                        <input type="radio" name="ui_sdk_craft" value="opp袋" title="opp袋" lay-filter="ui_sdk_craft">
                        <input type="radio" name="ui_sdk_craft" value="丝带" title="丝带" lay-filter="ui_sdk_craft">
                        <br/>
                        <span class="ui_sd" style="display: none;margin-left:180px;">
								<input type="radio" name="sd" value="绿色" title="绿色" checked="checked">
								<input type="radio" name="sd" value="红色" title="红色">
							</span>
                    </div>
                </form>
            </div>
            <div class="ui_tzmp" style="display: none;">
                <form class="layui-form">
                    <p>
                        工艺
                    </p>
                    <div class="layui-input-block">
                        <div>
                            裁切工艺：
                            <input type="checkbox" name="craft" class="mq disab max ya cjkDisab" lay-filter="switch" value="模切" title="模切">
                        </div>
                        <div>
                            常见工艺：
                            <input type="checkbox" name="craft" class="dk disab max cjkDisab" lay-filter="switch"
                                   value="打孔" title="打孔">
                            <div class="layui-inline edge dakongHide" style="width:60px;display:none">
                                <select name="ui_dk" class="select dakong" lay-filter="ui_dk">
                                    <option value="1" selected>1</option>
                                    <option value="2">2</option>
                                </select>
                            </div>
                            <input type="checkbox" name="craft" class="yh disab max ya cjkDisab" lay-filter="switch"
                                   value="压痕" title="压痕">
                            <div class="layui-inline edge yahenHide" style="width:60px; display:none">
                                <select name="ui_yh" class="select yahen" lay-filter="ui_yh">
                                    <option value="1" selected>1</option>
                                    <option value="2">2</option>
                                </select>
                            </div>
                        </div>

                    </div>
                </form>
            </div>
            <div class="peijian_ui" id="peijian_ui" style="display: none;">
                <form class="layui-form">
                    <span style="font-size:12px;color:red">opp袋：规格尺寸长度包含胶边2厘米（如8*5厘米规格，含胶边2厘米实际可装尺寸6*5厘米）</span>
                    <div class="layui-input-block">
                        配件：
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配葫芦针"
                               title="配葫芦针">
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="流苏"
                               title="流苏">
                        <div class="layui-inline select_liusu" style="width: 110px;display: none">
                            <select class="select" name="craft" disabled>
                                <option value="配流苏">配流苏</option>
                                <option value="穿流苏">穿流苏</option>
                            </select>
                        </div>
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="尼龙绳"
                               title="尼龙绳">
                        <div class="layui-inline select_nilongshen" style="width: 110px;display: none">
                            <select class="select" name="craft" disabled>
                                <option value="配尼龙绳">配尼龙绳</option>
                                <option value="穿尼龙绳">穿尼龙绳</option>
                            </select>
                        </div>
                        <div class="layui-inline shengz scolor" style="width: 110px;display: none">
                            <select class="select" name="shen_color">
                                <option value="白色绳子">白色绳子</option>
                                <option value="黑色绳子">黑色绳子</option>
                                <option value="红色绳子">红色绳子</option>
                            </select>
                        </div>
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳"
                               title="配弹力绳（15cm）">
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配弹力绳捆"
                               title="配弹力绳（捆）">
                        <div class="layui-inline shengz tscolor" style="width: 110px;display: none">
                            <select class="select">
                                <option value="金色绳子">金色绳子</option>
                                <option value="银色绳子">银色绳子</option>
                            </select>
                        </div>
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="opp袋"
                               title="opp袋">
                        <div class="layui-inline select_opp" style="width: 110px;display: none">
                            <select class="select" name="craft" disabled lay-filter="oppSelect">
                                <option value="配opp袋">配opp袋</option>
                                <option value="装opp袋">装opp袋</option>
                            </select>
                        </div>
                        <div class="layui-inline opp" style="width: 110px;display: none">
                            <select class="select" name="toothpick_size">
                                <option value="8*5">8*5CM</option>
                                <option value="8*10">8*10CM</option>
                                <option value="8*12">8*12CM</option>
                                <option value="10*5">10*5CM</option>
                                <option value="11*18">11*18CM</option>
                                <option value="12*5">12*5CM</option>
                                <option value="12*6">12*6CM</option>
                                <option value="12*7">12*7CM</option>
                                <option value="17*6">17*6CM</option>
                                <option value="12*10">12*10CM</option>
                            </select>
                        </div>
                        <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配棉绳" title="配棉绳">
                        <div class="yzlayout layui-inline">
                            <input type="checkbox" class="peijian" name="craft" lay-filter="z4PeiJian" value="配印章" title="配印章">
                            <div class="layui-inline yzinput" style="width: 110px;display: none">
                                <input type="text" placeholder="请输入整数" autocomplete="off" name="po_number" value="1" class="layui-input"
                                       style="width: 70px"/>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div id="lesspeijian" style="display:none">
                <form class="layui-form">
                    <div class="layui-input-block">
                        配件：
                        <input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配葫芦针"
                               title="配葫芦针">
                        <input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配棉绳"
                               title="配棉绳">
                        <input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配尼龙绳"
                               title="配尼龙绳">
                        <div class="layui-inline shengz scolor" style="width: 110px;display: none">
                            <select class="select" name="shen_color">
                                <option value="白色绳子">白色绳子</option>
                                <option value="黑色绳子">黑色绳子</option>
                                <option value="红色绳子">红色绳子</option>
                            </select>
                        </div>
                        <input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配弹力绳"
                               title="配弹力绳（15cm）">
                        <div class="layui-inline shengz tscolor" style="width: 110px;display: none">
                            <select class="select">
                                <option value="金色绳子">金色绳子</option>
                                <option value="银色绳子">银色绳子</option>
                            </select>
                        </div>
                        <input type="checkbox" class="lesspeijian" name="craft" lay-filter="lessz4PeiJian" value="配流苏"
                               title="配流苏">
                        <div class="layui-inline liusu" style="width: 110px;display: none;align-items: center">
                            <input class="layui-input" name="co_number" value="1"><span style="flex-shrink: 0;">包  (10条/包)</span>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <form class="layui-form">
            <div class="layui-input-block">

                <input type="checkbox" name="craft" lay-filter="ui_craft" value="抠图" title="抠图">
                <div class="layui-inline crop" style="display:none;width: 80px">
                    <input class="layui-input" type="text" name="cropNumber">
                </div>
            </div>
        </form>
        <form class="layui-form">
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit="" lay-filter="acount_btn" id="queryCondBtn">计算</button>
                <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="13" 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="11" cols="75" id="bz_result" readonly="readonly" style="height: 60px;resize: none;"></textarea>
				</div>-->
            <div>
                <table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
            </div>
        </form>
    </div>
    <div class="right_div">
        <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>
<%@include file="/views/copyResult.jsp" %>
<script>
    function clearNoNum(obj) {
        if (obj.value > 30) {
            obj.value = 30;
        }
        if (obj.value <= 0) {
            obj.value = 1
        }
    }

    setNumberOptions();

    function setNumberOptions() {
        let html = '';
        if (window.parent.system_isPdd) {
            html = `<option value=""></option>
                <option value="1">改序号</option>
                <option value="2">改名字</option>
                <option value="3">改二维码</option>
                <option value="4">改图片</option>
                <option value="5">改内容模板相同</option>
                <option value="6" selected>改内容模板完全不同</option>`;
        } else {
            html = `<option value=""></option>
                <option value="1">改序号</option>
                <option value="6" selected>改内容模板完全不同</option>`;
        }
        $("#desType").empty().append(html);
    }

    layui.use(['table', 'form', 'carousel'], function () {
            var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
            var carousel = layui.carousel;
            var table = layui.table;
            let remark_html = ''

            function setRemark() {
                let kv = $("input[name='kindValue']:checked").val();
                $("#remark").empty();
                let html = '';
                if (kv == 2) {
                    html = remark_html
                }
                if (kv == 1) {
                    html = '预计发货时间：<br>江苏：直角裁切 (2-3天发货) 韵达 顺丰<br> 河南：直角裁切 (2-3天发货 ) 中通 顺丰<br> 江苏：异形模切 (3-4天发货) 圆通 顺丰<br> 河南：异形模切 (3-4天发货) 中通 顺丰'
                }
                if (kv == 0) {
                    html = '预计发货时间：<br>福建：直角裁切 (2-3天发货) 圆通 顺丰<br>福建：异形模切 (3-4天发货) 圆通 顺丰'
                }

                $("#remark").append('<div><span>' + html + '<span/></div>');

            }

            function getProductImage(craftValue) {
                let kind = $('input[name="kind"]:checked').val()
                if (kind != 5 && kind != 7 && kind != 3 && kind != 4) {
                    craftValue = "";
                }
                if (kind == 7 && (craftValue != '单面烫金' && craftValue != '双面烫金' && craftValue != '模切')) {
                    craftValue = "";
                }
                let proTypeValue = kind == 8 ? 25 : 4
                let kindValue2 = $("input[name='kindValue2']:checked").val();
                // 轮播图
                let html = " ";
                // 清空轮播图
                let data = {
                    proTypeValue: proTypeValue,
                    kindValue: kind
                }
                if (kind == "3") {
                    data.kind2Value = kindValue2
                }
                if (craftValue != '') {
                    data.craftValue = craftValue;
                }
                $("#carousel").empty();
                $("#remark").empty();
                $.ajax({
                    url: "${pageContext.request.contextPath}/getImgs",
                    type: "GET",
                    data,
                    //dataType : "json",
                    success: function (result) {
                        for (let i = 0; i < result.length; i++) {
                            // 只留一个remark
                            remark = "";
                            html += '<div><img style="width:100%;height: 100%;object-fit: contain" src="' + result[i].imgUrl + '"></div>';
                            remark += '<div><span>' + result[i].remark + '<span/></div>';
                        }
                        $("#carousel").append(html);
                        if (remark.indexOf("null") < 0) {
                            remark_html = remark;
                            $("#remark").append(remark);
                        }
                        $("#test1 .layui-carousel-ind").empty();
                        // 如果没有轮播图就隐藏
                        if (result.length == 0) {
                            document.getElementById("test1").style.display = "none";   //隐藏
                        } else {
                            document.getElementById("test1").style.display = "block";  //显示
                            ins.reload({
                                elem: '#test1',
                                width: result[0].imgWidth,  //设置容器宽度
                                height: result[0].imgHeight,
                                indicator: 'outside',
                            });
                        }
                    }
                });
            }

            function z3Craft(val) {

            }

            function z3Vice(val, type = 0) {
                $(".z3_vice input").prop("checked", false);
                $(".z3_vice .z_16").hide();
                $(".z3_vice .z_19").hide();
                $(".z3_vice .z_15").hide();
                $(".z3_vice .z_13").hide();
                $(".z3_vice .z_45").hide();
                if (type == 0) {
                    if (val == "16*7") {
                        $(".z3_vice .z_16").show();
                        $(".z3_vice .z_16 input:first").prop("checked", true);

                    }
                    if (val == "19*7") {
                        $(".z3_vice .z_19").show();
                        $(".z3_vice .z_19 input:first").prop("checked", true);
                    }
                    if (val == "15*5") {
                        $(".z3_vice .z_15").show();
                        $(".z3_vice .z_15 input:first").prop("checked", true);
                    }
                    if (val == "13*5") {
                        $(".z3_vice .z_13").show();
                        $(".z3_vice .z_13 input:first").prop("checked", true);
                    }
                } else if (type == 3) {
                    $(".z3_vice .z_45").show();
                    $(".z3_vice .z_45 input:first").prop("checked", true);
                }
                form.render();
            }

            function z3Select(val) {
                $(".z3_vice").hide();
                $("#kaichuang").hide();
                $("#kaichuang select").attr("disabled", true);
                $(".z3_craft input[name='craft']").prop("checked", false);
                $(".z3_craft input[name='craft']").prop("disabled", false);
                $(".z3_craft_yj").show();
                $(".z3_craft_zj").show();
                $(".z3_craft_dk").show();
                $(".z3_craft_opp").show();
                $(".z3_craft_ssx").show();
                $(".z3_craft_yh").show();
                $(".z3_craft_bm").show();
                $(".z3_craft_mq").show();
                $("#3z_menpiao_size").hide();
                $("#3z_kapian_size").hide();
                $("#3z_yuan_size").hide();
                $("#3z_chuang_size").hide();
                $(".z3_craft_ssx").hide();
                $(".z3_craft_yh").hide();
                $("#3z_menpiao_size select").attr("disabled", true)
                $("#3z_kapian_size select").attr("disabled", true)
                $("#3z_yuan_size select").attr("disabled", true)
                $("#3z_chuang_size select").attr("disabled", true)
                $(".z3_craft input[name='craft']").prop("checked", false);
                $(".z3_craft input[name='craft']").prop("disabled", false);
                $("#3z_size").show();
                $("#size").val($('select[name="z3size1"]:not(:disabled) option:checked').val());//尺寸重新赋值
                $(".qt").hide()
                $("#3zValueForm").show();

                if (val == 0) {
                    let menpiao_size = $("#3z_menpiao_size select option:selected").val();
                    $("#3z_menpiao_size").show();
                    $("#3z_menpiao_size select").attr("disabled", false)
                    if (!$('input[name="switchz3Size"]:checked').val()) {
                        $("#size").val(menpiao_size);
                    }
                    $(".z3_vice").show();
                    $(".z3_craft_yj").hide();
                    $(".z3_craft_zj").hide();
                    $(".z3_craft_dk").hide();
                    $(".z3_craft_ssx").hide();
                    $(".z3_craft_yh").hide();
                    z3Vice(menpiao_size, val)
                }
                if (val == 1) {
                    $("#3z_kapian_size").show();
                    $("#3z_kapian_size select").attr("disabled", false)
                    if (!$('input[name="switchz3Size"]:checked').val()) {
                        $("#size").val($("#3z_kapian_size select option:selected").val());
                    }
                    $(".z3_craft_mq").hide();
                    z3Craft($("#size").val())
                }
                if (val == 2) {
                    $(".z3_craft_yj").hide();
                    $(".z3_craft_zj").hide();
                    $(".z3_craft_bm").hide();
                    $("#3z_yuan_size").show();
                    $("#3z_yuan_size select").attr("disabled", false)
                    if (!$('input[name="switchz3Size"]:checked').val()) {
                        $("#size").val($("#3z_yuan_size select option:selected").val());
                    }
                }
                if (val == 3) {
                    let menpiao_size = $("#3z_chuang_size select option:selected").val();
                    $(".z3_vice").show();
                    $(".z3_craft_yj").hide();
                    $(".z3_craft_zj").hide();
                    $(".z3_craft_bm").hide();
                    $("#3z_chuang_size").show();
                    $("#3z_chuang_size select").attr("disabled", false)
                    if (!$('input[name="switchz3Size"]:checked').val()) {
                        $("#size").val($("#3z_chuang_size select option:selected").val());
                    }
                    $("#kaichuang").show();
                    $("#kaichuang select").attr("disabled", false);
                    z3Vice(menpiao_size, val)
                }
                if (val == 4) {
                    $("#3z_size").hide();
                    $(".qt").show();
                    $(".z3_vice").hide();
                    $("#size").val('');
                    $(".z3_craft_yj").show();
                    $(".z3_craft_zj").show();
                    $(".z3_craft_dk").show();
                    $(".z3_craft_ssx").show();
                    $(".z3_craft_yh").show();
                    $(".z3_craft_bm").show();
                    $(".z3_craft_mq").show();
                }
                form.render();
            }

            // 监听回车键，如果敲了回车，调用点击‘计算’
            $(document).keydown(function (e) {
                if (e.keyCode === 13) {
                    $("#queryCondBtn").trigger("click");
                }
            });

            //建造实例
            ins = carousel.render({});
            if ((${ sessionScope.USER_SESSION.role.contains('1010')})) {
                $("input[name='kind']").each(function (index, value) {
                    if ($(value).val() == "4" || $(value).val() == "3") {
                        $(value).hide();
                        $(value).attr("disabled", true);
                    }
                })
            }

            $("#number").on("input", function (e) {
                var number = e.delegateTarget.value;
                var kind = $("input[name='kind']:checked").val();
                if ($("input[name='couponKind']:checked").val() == "少数量" && number > 1 && kind != "婚礼报纸" && kind != "菜单") {
                    $("#ui_des").show();
                } else {
                    $("#ui_des").hide();
                }
            });

            function peijianuiHide() {
                $("#peijian_ui .tscolor").hide();
                $("#peijian_ui .tscolor select").prop("disabled", true);
                $("#peijian_ui .scolor").hide();
                $("#peijian_ui .scolor select").prop("disabled", true);
                $("#peijian_ui .select_nilongshen").hide();
                $("#peijian_ui .select_nilongshen select").prop("disabled", true);
                $("#peijian_ui .select_liusu").hide();
                $("#peijian_ui .select_liusu select").prop("disabled", true);
                $("#peijian_ui .opp").hide();
                $("#peijian_ui .opp select").prop("disabled", true);
                $("#peijian_ui .select_opp").hide();
                $("#peijian_ui .select_opp select").prop("disabled", true);
                $("#peijian_ui .yzinput").hide();
                $("#peijian_ui .yzinput input").prop("disabled", true);
                form.render();
            }

            // 监听count输入框
            $(function () {
                //输入框的值改变时触发(一边尺寸小于4自动选中模切)
                $("#size").on("input", function (e) {
                    var s = e.delegateTarget.value
                    //获取input输入的值
                    // 选中模切、禁用其他
                    let type = $("input[name='couponKind']:checked").val()
                    let type1 = $("input[name='kind']:checked").val()
                    if (type1 == "特种纸名片" && type == "少数量") {
                        if ((s.split("*")[0] < 4 || s.split("*")[1] < 4)) {
                            // $(".disab").attr("disabled", true);
                            // $('input[class = mq]').prop('checked', true);
                        } else if ((s.split("*")[0] >= 4 || s.split("*")[1] >= 4) && kind != 1 && kindValue != 2) { // 腰封 - 300克铜版纸不取消模切
                            $(".disab").attr("disabled", false);
                            $('input[class = mq]').prop('checked', false);
                        }
                    }
                    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();
                        $(".liusu").hide();
                    }
                    form.render();
                });
            });
            form.on("select(oppSelect)", function (data) {
                if (data.value == "装opp袋") {
                    $("#peijian_ui .opp").hide();
                    $("#peijian_ui .opp select").prop("disabled", true);
                }
                if (data.value == "配opp袋") {
                    $("#peijian_ui .opp").show();
                    $("#peijian_ui .opp select").prop("disabled", false);
                }
                form.render();
            })
            form.on("checkbox(z4PeiJian)", function (data) {
                let craft_pei = [];
                $(".peijian:checked").each(function (i) {
                    // 没有被禁用的工艺加到arr中
                    if (!$(this).is(':disabled') && $(this).val() != "opp袋") {
                        craft_pei.push($(this).val());
                    }
                });
                let craft_list = [];
                $("input:checkbox[name='craft']:checked").each(function (i) {
                    if (!$(this).is(':disabled')) {
                        craft_list.push($(this).val());
                    }
                });
                if (craft_pei.length > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('配件只能选择一种！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                const carft_pei = ["配葫芦针", "流苏", "尼龙绳", "配弹力绳", "配弹力绳捆", "opp袋", "配棉绳", "内部模切"];
                const carft_nopei = ["单面局部UV", "双面局部UV", "双面星光膜", "双面镭射膜", "双面触感膜", "双面雪花膜"];
                const carftpei = carft_pei.filter(craft => craft_list.includes(craft));
                const carftnopei = carft_nopei.filter(craft => craft_list.includes(craft));

                if (carftpei.length > 0 && carftnopei.length > 0) {
                    $(data.elem).prop("checked", false);
                    layer.msg(carft_nopei.join(",") + "与配件、内部模切不能同时选择", {offset: ['300px', '300px']}, function () {
                    });
                    form.render();
                    return false;
                }
                if (data.value == "流苏") {
                    if ($(data.elem).is(":checked")) {
                        $("#peijian_ui .select_liusu").show();
                        $("#peijian_ui .select_liusu select").prop("disabled", false);
                    } else {
                        $("#peijian_ui .select_liusu").hide();
                        $("#peijian_ui .select_liusu select").prop("disabled", true);
                    }
                }
                if (data.value == "尼龙绳") {
                    if ($(data.elem).is(":checked")) {
                        $("#peijian_ui .scolor").show();
                        $("#peijian_ui .scolor select").prop("disabled", false);
                        $("#peijian_ui .select_nilongshen").show();
                        $("#peijian_ui .select_nilongshen select").prop("disabled", false);
                    } else {
                        $("#peijian_ui .scolor").hide();
                        $("#peijian_ui .scolor select").prop("disabled", true);
                        $("#peijian_ui .select_nilongshen").hide();
                        $("#peijian_ui .select_nilongshen select").prop("disabled", true);
                    }
                }
                if (data.value == "配弹力绳" || data.value == "配弹力绳捆") {
                    if ($(data.elem).is(":checked")) {
                        $("#peijian_ui .tscolor").show();
                        $("#peijian_ui .tscolor select").prop("disabled", false);
                        getProductImage('弹力绳');
                    } else {
                        $("#peijian_ui .tscolor").hide();
                        $("#peijian_ui .tscolor select").prop("disabled", true);
                        getProductImage('');
                    }
                }
                if (data.value == "opp袋") {
                    if ($(data.elem).is(":checked")) {
                        $("#peijian_ui .opp").show();
                        $("#peijian_ui .opp select").prop("disabled", false);
                        $("#peijian_ui .select_opp").show();
                        $("#peijian_ui .select_opp select").prop("disabled", false);
                        $("#peijian_ui .select_opp select option[value='配opp袋']").prop("selected", true);

                        getProductImage('opp袋');

                    } else {
                        $("#peijian_ui .opp").hide();
                        $("#peijian_ui .opp select").prop("disabled", true);
                        $("#peijian_ui .select_opp").hide();
                        $("#peijian_ui .select_opp select").prop("disabled", true);
                        getProductImage();

                    }
                }
                if (data.value == "配印章") {
                    if ($(data.elem).is(":checked")) {
                        $("#peijian_ui .yzinput").show();
                        $("#peijian_ui .yzinput input").prop("disabled", false);
                        getProductImage('印章');
                    } else {
                        $("#peijian_ui .yzinput").hide();
                        $("#peijian_ui .yzinput input").prop("disabled", true);
                        getProductImage();

                    }
                }

                form.render();
            });
            form.on("select(mashu)", function (data) {
                let value = data.value;
                let html = `<option value="金色码" selected>金色码</option>
                                <option value="红色码">红色码</option>
                            <option value="黑色码">黑色码</option>`;
                if (data.value == "3") {
                    html = `<option value="红色码" selected>红色码</option>
                            <option value="黑色码">黑色码</option>`;
                }
                $("select[name='macolor']").empty();
                $("select[name='macolor']").append(html);
                form.render();
            })
            form.on("checkbox(lessz4PeiJian)", function (data) {
                let peijiansize = $(".lesspeijian:checked").length;
                if (peijiansize > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('配件只能选择一种！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }


                if (data.value == "配尼龙绳") {
                    if ($(data.elem).is(":checked")) {
                        $("#lesspeijian .scolor").show();
                        $("#lesspeijian .scolor").prop("disabled", false);
                    } else {
                        $("#lesspeijian .scolor").hide();
                        $("#lesspeijian .scolor").prop("disabled", true);
                    }
                }
                if (data.value == "配弹力绳") {
                    if ($(data.elem).is(":checked")) {
                        $("#lesspeijian .tscolor").show();
                        $("#lesspeijian .tscolor").prop("disabled", false);
                    } else {
                        $("#lesspeijian .tscolor").hide();
                        $("#lesspeijian .tscolor").prop("disabled", true);
                    }
                }
                if (data.value == "配流苏") {
                    if ($(data.elem).is(":checked")) {
                        $("#lesspeijian .liusu").css("display", "flex");
                        $("#lesspeijian .liusu").prop("disabled", false);
                    } else {
                        $("#lesspeijian .liusu").hide();
                        $("#lesspeijian .liusu").prop("disabled", true);
                    }
                }
            });
            form.on("radio(kindValue2)", function (data) {
                peijianuiHide();
                $("#peijian_ui .yzlayout").hide();
                $("#peijian_ui .yzlayout").find(":input").attr("disabled", true);
                if (data.value == 10) {
                    $("#craftForm").hide();
                    $("#craftForm").find(":input").attr("disabled", true);
                    $("#z4_craft form")[0].reset();
                    $("#peijian_ui form")[0].reset();
                    $("#z4_craft").show();
                    $("#peijian_ui").show();
                    $("#z4_craft").find(":input").attr("disabled", false);
                    $("#peijian_ui").find(":input").attr("disabled", false);
                    $("#z4_craft .ui_double_fm").prop("checked", true);
                    $('.ui_fm_l').find(":input").prop('checked', false);
                    $('.ui_fm_l input[value="双面覆哑膜"]').prop('checked', true);
                    $("#z4_craft .scolor").hide();
                    $("#peijian_ui .scolor").hide();
                    $("#z4_craft .dadianxianhide").hide();
                    $("#z4_craft .yahenghide").hide();
                    $("#z4_craft .maxianhide").hide();
                    $("#z4_craft .dakonghide").hide();
                    $("#z4_craft .caiqie").prop("checked", true);
                    form.on('checkbox(switchMQ)', function (data) {
                        let mqLength = $("#z4_craft .mq:checked").length;

                        if (mqLength > 1) {
                            $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                            $(data.elem).prop("checked", false);
                            layer.msg('[裁切- 模切 - 圆角]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                            return false;
                        }

                        if (data.value == "模切") {
                            if ($(data.elem).is(":checked")) {
                                $("#z4_craft .nomq").prop("checked", false).prop("disabled", true);
                            } else {
                                $("#z4_craft .nomq").prop("disabled", false);
                            }

                        }
                        form.render('checkbox');
                    });
                    form.on("checkbox(switchCrafts)", function (data) {
                        if (data.value == "压痕") {
                            if ($(data.elem).is(":checked")) {
                                $("#z4_craft .yahenghide").show();
                            } else {
                                $("#z4_craft .yahenghide").hide();
                            }
                        }
                        if (data.value == "打点线") {
                            if ($(data.elem).is(":checked")) {
                                $("#z4_craft .dadianxianhide").show();
                            } else {
                                $("#z4_craft .dadianxianhide").hide();
                            }
                        }
                        if (data.value == "打码") {
                            if ($(data.elem).is(":checked")) {
                                $("#z4_craft .maxianhide").show();
                            } else {
                                $("#z4_craft .maxianhide").hide();
                            }
                        }
                        if (data.value == "打孔") {
                            if ($(data.elem).is(":checked")) {
                                $("#z4_craft .dakonghide").show();
                            } else {
                                $("#z4_craft .dakonghide").hide();
                            }
                        }
                        form.render('checkbox');
                    });
                } else {
                    if (couponKind != "少数量") {
                        $("#craftForm").show();
                        $("#craftForm").find(":input").attr("disabled", false);
                    }
                    $("#z4_craft").hide();
                    $("#peijian_ui").hide();
                    $("#z4_craft").find(":input").attr("disabled", true);
                    $("#peijian_ui .scolor").hide();
                    $("#peijian_ui").find(":input").attr("disabled", true);
                    if (data.value == 2 && couponKind != "少数量") {
                        $("#peijian_ui form")[0].reset();
                        $("#peijian_ui").show();
                        $("#peijian_ui input").attr("disabled", false);
                        $("#peijian_ui .scolor").hide();
                        $("#peijian_ui .yzlayout").show();
                    }
                }
                getProductImage();
                form.render();
            })
            form.on("select(stickNum)", function (data) {
                let html = ``;
                let num = data.value;
                $("#otherSize").empty()
                if (num > 1) {
                    for (let i = 0; i < num - 1; i++) {
                        html += `<select name="size1" class="select">
								<option value="6*18">6*18 mm</option>
								<option value="6*22">6*22 mm</option>
								<option value="6*26">6*26 mm</option>
								<option value="8*26">8*26 mm</option>
								<option value="8*30">8*30 mm</option>
								<option value="15*15">15*15mm</option>
								<option value="18*18">18*18mm</option>
								<option value="20*20">20*20mm</option>
								<option value="18*32">18*32 mm</option>
								<option value="15*48">15*48 mm</option>
								<option value="8*36">8*36 mm</option>
                                <option value="70*50">70*50 mm</option>
                                <option value="60*25" selected>60*25 mm</option>
                                <option value="35*58">35*58 mm</option>
                                <option value="41*72">41*72 mm</option>
							</select>`;
                    }
                }
                $("#otherSize").append(html)
                form.render();
            })
            var couponKind = ""
            // 选择卡片种类
            form.on('radio(couponKind)', function (couponKindData) {
                // 切换按钮的时候,重置kind品种
                $("#kindForm")[0].reset();
                // 产品种类的值
                couponKind = couponKindData.value;
                if (couponKind == '少数量') {
                    $('input[class = Count]').prop('checked', false);
                    $(".switchCount").hide();
                    $(".diyCount").show();
                    $(".count").hide();
                    $(".diyCount").find(":input").attr("disabled", false);
                    $(".count").find(":input").attr("disabled", true);
                    $("#selectCount").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    // 选择少数量的时候，展示‘少数量’的品种
                    $(".lessCount").show();
                    $(".lessCount").find(":input").attr("disabled", false);
                    $(".normal").hide();
                    $(".normal").find(":input").attr("disabled", true);
                    if (kind != "婚礼报纸" || kind != "菜单") {
                        $("#ui_des").hide();
                    } else {
                        $("#ui_des").show();
                    }
                    form.render();
                } else {
                    $("#ui_des").hide();
                    $(".switchCount").show();
                    $(".count").show();
                    $(".diyCount").hide();
                    $(".count").find(":input").attr("disabled", false);
                    $(".diyCount").find(":input").attr("disabled", true);
                    $("#selectCount").attr("disabled", false);

                    // 选择常规的时候，隐藏‘少数量’的品种
                    $(".normal").show();
                    $(".normal").find(":input").attr("disabled", false);
                    $(".lessCount").hide();
                    $(".lessCount").find(":input").attr("disabled", true);
                    // 恢复标准数量的时候会被禁用，加这个解决
                    form.render();
                }
            });

            $(".guaguaSize").hide();
            $(".guaguaSize").find("select").attr("disabled", true);
            $(".guaguaSize1").hide();
            $(".guaguaSize1").find("select").attr("disabled", true);
            var kind;
            var kindValue;
            form.on('checkbox(switchMQ)', function (switchData) {
                if ($(".normalCountHideCraft .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});
                    form.render('checkbox');
                    return false;
                }
            })
            form.on('radio(kind)', function (data) {
                kind = data.value;
                if (data.value == 1) {
                    $(".ui_yf").show();
                    $(".ui_yh").hide();
                } else {
                    $(".ui_yh").show();
                    $(".ui_yf").hide();
                }
                $(".n_mq_input").hide()
                $(".n_mq_input input").prop("disabled", true);
                $("#size").val("");
                $("#craftForm").show();
                $("#craftForm").find(":input").attr("disabled", false);
                $("#z4_craft").hide();
                $("#z4_craft").find(":input").attr("disabled", true);
                $(".lesspeijian").prop("checked", false);
                $("#lesspeijian").hide();
                $("#lesspeijian").find(":input").attr("disabled", true);
                $(".huafangCraft").hide();
                $(".huafangCraft").find(":input").attr("disabled", true);
                $(".ui_fm_l").show();
                $('.ui_fm_l').find(":input").attr("disabled", false);
                $('.ui_fm_l').find(":input").prop('checked', false);
                $("#peijian_ui form")[0].reset();
                peijianuiHide()
                if (data.value == '直角卡片' || data.value == '异形卡片' || data.value == '贺卡' || data.value == '特种纸名片') {
                    if (data.elem.checked) {
                        $("#lesspeijian").show();
                        $("#lesspeijian").find(":input").attr("disabled", false);
                    }
                }


                if (data.value == 8) {
                    $("#doorList").show();
                    $("#doorList").find(":input").attr("disabled", false);
                    $("#other").hide();
                    $("#other").find(":input").attr("disabled", true);
                    $("#specialCard").hide();
                    $("#specialCard").find(":input").attr("disabled", true);
                } else {
                    $("#other").show();
                    $("#other").find(":input").attr("disabled", false);
                    $("#doorList").hide();
                    $("#doorList").find(":input").attr("disabled", true);
                    $("#specialCard").hide();
                    $("#specialCard").find(":input").attr("disabled", true);
                    $(".doublefumo").find(":input").prop("checked", false);
                }

                if (data.value == 10 && $("input[name='kindValue7']:checked").val() == 8) {
                    $(".ui_xgt").show();
                    $(".ui_xgt").attr("disabled", false);
                } else {
                    $(".ui_xgt").hide();
                    $(".ui_xgt").attr("disabled", true);
                }


                // !吊牌
                if (data.value != 2) {
                    // 隐藏吊牌600克/800克;显示原本的
                    $("#tag").hide();
                    $("#tag").find(":input").attr("disabled", true);
                    if (data.value != 8) {
                        $(".tagOther").show();
                        $(".tagOther").find(":input").attr("disabled", false);
                    }
                } else {
                    // 切换吊牌的时候，重置材质单选框
                    $("#kindValueForm")[0].reset();
                }
                $("#craftForm")[0].reset();
                $(".yhselect").hide();
                $(".ydxselect").hide();
                $(".yhydx").hide();
                $(".yhydx").find(":input").attr("disabled", true);
                $('input[class = mq]').prop('checked', false);
                $('input[class = mq][value=直角裁切]').prop('checked', true);
                if (data.value == 0 || data.value == 1) {
                    $(".count").show();
                    $(".count").find(":input").attr("disabled", false);
                    $("#kindValueForm")[0].reset();
                    $(".kindValue").show();
                    $(".kindValue").attr("disabled", false);
                    $(".kindValue2").hide();
                    $(".kindValue2").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue5").hide();
                    $(".kindValue5").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    form.render();
                    /*=====选择腰封的时候将工艺隐藏=====*/
                    $("#craft").show();
                    $(".craft").hide();
                    $(".craft").find(":input").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").find(":input").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".qt").show();
                    $(".qt").attr("disabled", false);
                    $(".switchCount").show();
                    $(".switchCount").find(":input").attr("disabled", false);
                    $(".ui_fm_l").show();
                    $('.ui_fm_l').find(":input").attr("disabled", false);

                    form.on('radio(kindValue)', function (kindValueData) {
                        kindValue = kindValueData.value
                        $(".ui_fm_l").show();
                        $('.ui_fm_l').find(":input").attr("disabled", false);
                        $(".yhydx").hide();
                        $('.yhydx').find(":input").attr("disabled", true);
                        // 腰封的时候，157克没有【覆膜】工艺
                        if (data.value == 1) {
                            // 腰封的时候，默认选择【单面覆膜】
                            $('.fm').prop('checked', true);

                            form.render('checkbox');
                            if (kindValueData.value == 2) {
                                $("#craftHu").show();
                                $('.ui_fm_l input[value="双面覆哑膜"]').prop('checked', true);
                                $(".ui_fm").prop('disabled', false);
                                $(".yhydx").show();
                                $('.yhydx').find(":input").attr("disabled", false);
                            } else if (kindValueData.value == 0) {
                                $("#craftHu").show();
                                // $(".ui_fm").prop('disabled', true);
                                $(".ui_fm_l").hide();
                                $('.ui_fm_l').find(":input").prop('checked', false);
                                $('.ui_fm_l').find(":input").attr("disabled", true);
                            } else {
                                $("#craftHu").hide();
                            }
                            $('.fm').prop('disabled', false);
                            if (kindValueData.value == 0) {
                                $('.fm').prop('checked', false);
                                $('.fm').prop('disabled', true);
                            }
                        } else {
                            $('.fm').hide();
                            $('.fm').prop('checked', false);
                        }
                        $('input[class = mq]').prop('checked', false);
                        $('input[class = mq][value=直角裁切]').prop('checked', true);
                        // 吊旗、腰封--300克铜版纸的时候勾选模切，且不能取消
                        if (data.value == 0) {
                            form.on('checkbox(switchMQ)', function (switchData) {
                                // 吊旗/吊牌的模切
                                if (!switchData.elem.checked) {
                                    layer.msg('吊旗不能取消 [ 模切 ] 工艺！', {offset: ['300px', '300px']}, function () {
                                    });
                                    form.render('checkbox');
                                } else {
                                    kindValueData.value = 1;
                                }
                                if ($(".normalCountHideCraft .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});
                                    form.render('checkbox');
                                    return false;
                                }

                                if (switchData.elem.checked) {
                                    $(".disab").attr("disabled", true);
                                    $('input[class = disab]').prop('checked', false);
                                } else if (!switchData.elem.checked) {//放开模切的时候数量变成1
                                    $(".disab").attr("disabled", false);
                                    $('input[class = disab]').prop('checked');
                                    $(".yahen").val(1)
                                    $(".yadianxian").val(1)
                                    $(".dakong").val(1)
                                    form.render('select');
                                }
                                form.render('checkbox');
                            })
                        }
                        if (data.value == 1) {
                            if (kindValueData.value == 2) {
                                //$('input[class = mq]').prop('checked', true);
                                form.on('checkbox(switchMQ)', function (switchData) {
                                    if ($(".normalCountHideCraft .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;
                                    }
                                    if (kindValueData.value == 2) {
                                        // 吊旗/吊牌的模切
                                        if (!switchData.elem.checked) {
                                            // layer.msg('[ 腰封 - 300克铜版纸 ] 不能取消 [ 模切 ] 工艺！', {offset: ['300px', '300px']}, function () {
                                            // });
                                            // $('input[class = mq]').prop('checked', true);
                                            // form.render('checkbox');
                                        } else {
                                            kindValueData.value = 1;
                                        }
                                    }
                                })
                            } else {
                            }
                        }
                        form.render();
                        setRemark()
                    })
                }/* else if (data.value == 2) {
				if(couponKind != '少数量'){
					$(".kindValue3").show();
					$(".kindValue3").attr("disabled", false);
					$(".kindValue2").hide();
					$(".kindValue2").attr("disabled", true);
				}else{
					$(".kindValue2").show();
					$(".kindValue2").attr("disabled", false);
					$(".kindValue3").hide();
					$(".kindValue3").attr("disabled", true);
					// 少数量吊牌没有600/800克铜版纸
					$(".tagOther").show();
					$(".tagOther").find(":input").attr("disabled", false);
					$("#tag").hide();
					$("#tag").find(":input").attr("disabled", true);
				}
				$(".kindValue").hide();
				$(".kindValue").attr("disabled", true);
				$(".kindValue4").hide();
				$(".kindValue4").attr("disabled", true);
				$("#craft").show();
				$(".craft").show();
				$(".craft").find(":input").attr("disabled", false);
				$('input[class = mq]').prop('checked', false);
				$(".ui_shk_size").hide();
				$(".ui_shk_size").attr("disabled", true);
				$(".ui_sdk").hide();
				$(".ui_sdk").find(":input").attr("disabled", true);
				$(".qt").show();
				$(".qt").attr("disabled", false);
				$(".switchCount").show();
				$(".switchCount").find(":input").attr("disabled", false);
			// 特种纸名片
			} */ else if (couponKind != "少数量" && data.value == 6) {
                    $("#kindValueForm")[0].reset();
                    $(".kindValue4").show();
                    $(".kindValue4").attr("disabled", false);
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue2").hide();
                    $(".kindValue2").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").find(":input").attr("disabled", true);
                    $(".qt").show();
                    $(".qt").attr("disabled", false);
                    form.render();
                } else if (couponKind != "少数量" && data.value == 9) {//售后卡
                    $("#kindValueForm")[0].reset();
                    $(".kindValue2").show();
                    $(".kindValue2").attr("disabled", false);
                    $(".ui_shk_size").show();
                    $(".ui_shk_size").attr("disabled", false);
                    $(".count").show();
                    $(".count").find(":input").attr("disabled", false);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".qt").hide();
                    $(".qt").attr("disabled", true);
                    $(".craft").hide();
                    $(".craft").find(":input").attr("disabled", true);
                    $("#craft").hide();
                    $(".switchCount").hide();
                    $(".switchCount").find(":input").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").find(":input").attr("disabled", true);
                    $(".ui_yh").hide();
                    form.render();
                } else if (couponKind != "少数量" && data.value == 10) {//吸管套
                    $(".craft").hide();
                    $(".craft").find(":input").attr("disabled", true);
                    $(".kindValue7").show();
                    $(".kindValue7").attr("disabled", false);
                    $(".qt").show();
                    $(".qt").attr("disabled", false);
                    $(".count").show();
                    $(".count").find(":input").attr("disabled", false);
                    $(".kindValue2").hide();
                    $(".kindValue2").attr("disabled", true);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").find(":input").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").find(":input").attr("disabled", true);
                    $("#craft").hide();
                    $(".ui_yh").hide();
                } else if (data.value == 11) {//圣诞卡
                    $(".ui_sdk").show();
                    $(".ui_sdk").find(":input").attr("disabled", false);
                    $(".craft").hide();
                    $(".craft").find(":input").attr("disabled", true);
                    $(".kindValue2").hide();
                    $(".kindValue2").attr("disabled", true);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".qt").hide();
                    $(".qt").attr("disabled", true);
                    $(".switchCount").hide();
                    $(".switchCount").find(":input").attr("disabled", true);
                    $(".count").hide();
                    $(".count").find(":input").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $("#craft").hide();
                    $(".ui_yh").hide();
                } else if (couponKind != "少数量") {
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".kindValue2").show();
                    $("#craft").show();
                    $(".craft").show();
                    $(".craft").find(":input").attr("disabled", false);
                    $(".kindValue5").hide();
                    $(".kindValue5").attr("disabled", true);
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").find(":input").attr("disabled", true);
                    $(".qt").show();
                    $(".qt").attr("disabled", false);
                    $(".switchCount").show();
                    $(".switchCount").find(":input").attr("disabled", false);
                    $(".count").show();
                    $(".count").find(":input").attr("disabled", false);
                    $("#craftHu").hide();
                    form.render('checkbox');
                }

                //卡片默认覆膜
                if (couponKind != "少数量" && data.value != 1 && data.value != 8 && data.value != 9 && data.value != 10 && data.value != 11) {
                    $('.ui_double_fm').prop('checked', true);
                    $('.ui_fm_l input[value="双面覆哑膜"]').prop('checked', true);
                    form.on('checkbox(ui_fm)', function (switchData) {
                        if (!switchData.elem.checked) {
                            layer.msg('卡片不能取消 [覆膜] 工艺！', {offset: ['300px', '300px']}, function () {
                            });
                            $('.ui_double_fm').prop('checked', true);
                            $('.ui_fm_l input[value="双面覆哑膜"]').prop('checked', true);
                            form.render('checkbox');
                        }
                        getProductImage(switchData.elem.checked ? switchData.value : '')
                    })
                } else if (data.value == 8) {
                    $('.ui_door_fm').prop('checked', true);

                }
                if (data.value == 13) {
                    $("input[name='fmType']").prop('checked', false);
                    $("input[name='fmType']")[0].checked = true;
                    form.render('checkbox');
                }
                // 腰封的时候有覆膜
                if (data.value == 1) {
                    $(".fumo").show();
                    $(".fumo").find(":input").attr("disabled", false);
                    $(".doublefumo").hide();
                    $(".doublefumo").find(":input").attr("disabled", true);
                } else {
                    $(".doublefumo").show();
                    $(".doublefumo").find(":input").attr("disabled", false);
                    $(".fumo").hide();
                    $(".fumo").find(":input").attr("disabled", true);
                    $(".fm").hide();
                    $(".fm").attr("disabled", true);
                }

                // 选中吊牌的时候勾选打孔--下拉框也显示
                if (data.value == 2) {
                    $(".dakongHide").show();
                    $(".value2").find(":input").attr("checked", true);
                } else {
                    $(".dakongHide").hide();
                    $(".value2").find(":input").attr("checked", false);
                }
                // 抽奖券的时候勾选压点线、打码
                if (data.value == 5) {
                    $(".yadianxianHide").show();
                    $(".value5").find(":input").attr("checked", true);
                } else {
                    $(".value5").find(":input").attr("checked", false);
                    $(".yadianxianHide").hide();
                }
                // 存酒卡的时候勾选打码(下拉框显示)、模切,禁用第一排工艺
                if (data.value == 7) {
                    $(".value7").find(":input").attr("checked", false);
                    $(".damaHide").hide();
                    $('input[class = cjkDisab]').prop('checked', false);
                    $(".cjkDisab").attr("disabled", true);
                    // 打码勾选--编码类型说明显示
                    $(".bmType").hide();
                    // 切换到存酒卡的时候，把编码隐藏（4/28）
                    $(".bianma").hide();
                    $(".bianma").find(":input").attr("disabled", true);
                    $('input[class = ui_hu]').prop('checked', false);
                    $(".ui_hu").attr("disabled", true);
                } else {
                    // 打码,模切取消选中
                    $(".value7").find(":input").attr("checked", false);
                    $(".damaHide").hide();
                    // 除‘存酒卡’外，编码类型、类型说明都隐藏
                    $(".bianma").hide();
                    $(".bianma").find(":input").attr("disabled", true);
                    $(".bmType").hide();
                }

                // 腰封、吊牌、贺卡隐藏【打码】工艺
                if (data.value == 1 || data.value == 2 || data.value == 3 || data.value == 7) {
                    $(".dm").hide();
                    $(".dm").find(":input").attr("disabled", true);
                }

                // 5.11:选中少数量的时候隐藏所有的【烫金】工艺
                // 12.31恢复少数量 【烫金】工艺
                if (couponKind == '少数量') {
                    $(".tj").hide();
                    // 禁用没用，下面有放开
                    //$(".tj").find(":input").attr("disabled", true);
                    $('input[class = tjCraft]').prop('checked', false);
                } else {
                    if (data.value != 13) {
                        $(".tj").show();
                        $(".tj").find(":input").attr("disabled", false);
                    }

                }

                // 腰封，隐藏【烫金】工艺
                if (data.value == 1) {
                    $(".tj").hide();
                    $(".tj").find(":input").attr("disabled", true);
                }


                if (data.value == 3) {
                    $(".huafangCraft").show();
                    $(".huafangCraft").find(":input").attr("disabled", false);
                }
                form.render('checkbox');


                var kind = $('input[name="kind"]:checked').val()
                var proTypeValue = $("#proTypeValue").val()
                // 用于轮播图的proTypeValue
                if (kind == 8) {
                    proTypeValue = 25
                } else {
                    proTypeValue = 4
                }
                //kind != 1 && kind != 2 && kind != 3 &&
                if (true) {
                    // 轮播图
                    var html = " ";
                    var remark = " ";
                    // 清空轮播图
                    $("#carousel").empty();
                    $("#remark").empty();
                    let kindValue2 = $("input[name='kindValue2']:checked").val();
                    // 轮播图

                    let params = {
                        proTypeValue: proTypeValue,
                        kindValue: kind
                    }
                    if (kind == "3") {
                        params.kind2Value = kindValue2
                    }
                    $.ajax({
                        url: "${pageContext.request.contextPath}/getImgs",
                        type: "GET",
                        data: params,
                        //dataType : "json",
                        success: function (result) {
                            for (let i = 0; i < result.length; i++) {
                                // 只留一个remark
                                remark = "";
                                html += '<div><img style="width:' + result[0].imgWidth + 'px" src="' + result[i].imgUrl + '"></div>';
                                remark += '<div><span>' + result[i].remark + '<span/></div>';
                            }
                            $("#carousel").append(html);
                            // 如果没有说明，就不显示null
                            if (remark.indexOf("null") < 0) {
                                remark_html = remark;
                                $("#remark").append(remark);
                            }
                            $("#test1 .layui-carousel-ind").empty();
                            // 如果没有轮播图就隐藏
                            if (result.length == 0) {
                                document.getElementById("test1").style.display = "none";   //隐藏
                            } else {
                                document.getElementById("test1").style.display = "block";  //显示
                                ins.reload({
                                    elem: '#test1',
                                    width: result[0].imgWidth,  //设置容器宽度
                                    height: result[0].imgHeight
                                });
                            }
                        }
                    });
                } else {
                    document.getElementById("test1").style.display = "none";   //隐藏
                }
                // 少数量展示kindValue2，隐藏kindValue、kindValue3、kindValue4
                // 上面的else 已经有这个效果了
                $(".scolor").hide()
                $(".tscolor").hide()
                $(".liusu").hide();
                $("#kindValueForm").show();
                if (couponKind == "少数量") {
                    $(".ui_shk_size").hide();
                    $(".ui_shk_size").attr("disabled", true);
                    $(".ui_sdk").hide();
                    $(".ui_sdk").attr("disabled", true);
                    $("#selectCount1").hide();
                    $("#selectCount1").attr("disabled", true);
                    $(".kindValue2").show();
                    $(".kindValue2").attr("disabled", false);
                    $(".kindValue").hide();
                    $(".kindValue").attr("disabled", true);
                    $(".kindValue3").hide();
                    $(".kindValue3").attr("disabled", true);
                    $(".kindValue4").hide();
                    $(".kindValue4").attr("disabled", true);
                    $(".kindValue7").hide();
                    $(".kindValue7").attr("disabled", true);
                    $(".ui_xgt").hide();
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    // 少数量隐藏常规的工艺
                    $(".lessCountHideCraft").show();
                    $(".lessCountHideCraft").find(":input").attr("disabled", false);
                    $(".normalCountHideCraft").hide();
                    $(".normalCountHideCraft").find(":input").attr("disabled", true);

                    $(".lessCountHideCraft").show();
                    $(".lessCountHideCraft").find(":input").attr("disabled", false);
                    $(".ui_menu_craft").hide();
                    $(".ui_menu_craft").find(":input").attr("disabled", true);
                    $(".z3_craft").hide()
                    $(".z3_craft input[name='craft']").prop("disabled", true);
                    $(".z4_craft").hide();
                    $(".peijian_ui").hide();
                    $(".z4_craft").find(":input").attr("disabled", true);
                    $(".peijian_ui").find(":input").attr("disabled", true);
                    $(".kindValue5").hide();
                    $(".kindValue5").find(":input").attr("disabled", true);
                    $(".ui_hlbz").hide();
                    $(".ui_hlbz").find(":input").attr("disabled", true);
                    $(".kindValue2").show();
                    $(".kindValue2").find(":input").attr("disabled", false);
                    $(".qt").show();
                    $(".qt").find(":input").attr("disabled", false);
                    $("#size").show();
                    $(".ui_menu_size").hide();
                    $(".ui_menu_size").find(":input").attr("disabled", true);
                    $(".ui_tzmp").hide();
                    $(".ui_tzmp").find(":input").attr("disabled", true);
                    $(".kindValue6").hide();
                    $(".kindValue6").find(":input").attr("disabled", true);
                    if ($("#number").val() > 1) {
                        $("#ui_des").show();
                    }
                    $("#kindValueForm").show();

                    $("#3zValueForm").hide();
                    $("#3z_size").hide()
                    $(".z3_vice").hide()
                    $("#kaichuang").hide();
                    $("#kaichuang select").attr("disabled", true);
                    $(".switchz3Size").hide();
                    $(".size-tip-z3").hide();
                    $(".size-tip-other").show();

                    $('input[class = specialCraft]').prop('checked', false);
                    if (data.value == '异形卡片' && data.value == "直角卡片") {
                        $(".specialCraft").attr("disabled", true);
                        $('input[class = specialCraft]').prop('checked', false);
                    }
                    if (data.value == '异形卡片') {
                        $('input[class = specialCraft]').prop('checked', true);
                    }
                    if (data.value == "婚礼卡") {
                        $(".zhijiaoCard").show();
                        $('input[class = zhijiaoCraft]').prop('checked', true);
                    } else {
                        $(".zhijiaoCard").hide();
                        $('input[class = zhijiaoCraft]').prop('checked', false);
                    }

                    if (data.value == "菜单") {
                        $(".lessCountHideCraft").hide();
                        $(".lessCountHideCraft").find(":input").attr("disabled", true);
                        $(".ui_menu_craft").show();
                        $(".ui_menu_craft").find(":input").attr("disabled", false);
                        $(".kindValue2").hide();
                        $(".kindValue2").find(":input").attr("disabled", true);
                        $(".kindValue5").show();
                        $(".kindValue5").find(":input").attr("disabled", false);
                        $(".kindValue6").hide();
                        $(".kindValue6").find(":input").attr("disabled", true);
                        $(".qt").hide();
                        $(".qt").find(":input").attr("disabled", true);
                        $("#size").hide();
                        $(".ui_menu_size").show();
                        $(".ui_menu_size").find(":input").attr("disabled", false);
                        $("input[name='craftShua']").removeAttr("checked");
                        $(".ui_hlbz").hide();
                        $(".ui_hlbz").find(":input").attr("disabled", true);
                        $("#ui_des").hide();

                    } else if (data.value == "婚礼报纸") {
                        $(".ui_hlbz").show();
                        $(".ui_hlbz").find(":input").attr("disabled", false);
                        $(".kindValue2").hide();
                        $(".kindValue2").find(":input").attr("disabled", true);
                        $(".kindValue5").hide();
                        $(".kindValue5").find(":input").attr("disabled", true);
                        $(".kindValue6").hide();
                        $(".kindValue6").find(":input").attr("disabled", true);
                        $(".ui_menu_craft").hide();
                        $(".ui_menu_craft").find(":input").attr("disabled", true);
                        $(".lessCountHideCraft").hide();
                        $(".lessCountHideCraft").find(":input").attr("disabled", true);
                        $("#ui_des").hide();


                    } else if (data.value == "特种纸名片") {
                        $(".ui_tzmp").show();
                        $(".ui_tzmp").find(":input").attr("disabled", false);
                        $(".kindValue6").show();
                        $(".kindValue6").find(":input").attr("disabled", false);
                        $(".ui_hlbz").hide();
                        $(".ui_hlbz").find(":input").attr("disabled", true);
                        $(".kindValue2").hide();
                        $(".kindValue2").find(":input").attr("disabled", true);
                        $(".kindValue5").hide();
                        $(".kindValue5").find(":input").attr("disabled", true);
                        $(".ui_menu_craft").hide();
                        $(".ui_menu_craft").find(":input").attr("disabled", true);
                        $(".lessCountHideCraft").hide();
                        $(".lessCountHideCraft").find(":input").attr("disabled", true);
                        $(".ui_yh").hide();
                        $(".ui_tz_yh").show();
                        if ($("#number").val() > 1) {
                            $("#ui_des").show();
                        }

                    } else if (data.value == '种子纸') {
                        $('input[class = tjCraft]').prop('checked', false);
                        $("#3zValueForm").show();
                        $("#3z_size").show();
                        $(".z3_craft").show()
                        $(".z3_craft").find(":input").attr("disabled", false);
                        $(".z4_craft").hide();
                        $(".peijian_ui").hide();
                        $(".z4_craft").find(":input").attr("disabled", true);
                        $(".peijian_ui").find(":input").attr("disabled", true);
                        z3Select($('input[name="z3type"]:checked').val());
                        $(".switchz3Size").show();
                        $("#kindValueForm").hide()
                        $(".lessCountHideCraft").hide();
                        $(".lessCountHideCraft").find(":input").attr("disabled", true);
                        $(".qt").hide();
                        $('input[name="switchz3Size"]').prop('checked', false);
                        $(".size-tip-z3").show();
                        $(".size-tip-other").hide();
                    } else {

                    }
                    $(".guaguaSize").hide();
                    $(".guaguaSize").find("select").attr("disabled", true);
                    $(".guaguaSize1").hide();
                    $(".guaguaSize1").find("select").attr("disabled", true);
                    if (kind == 13 || kind == "刮刮卡") {
                        $(".guaguaSize").show();
                        $(".guaguaSize select[name='size1']").attr("disabled", false);
                    } else {
                        $(".guaguaSize").hide();
                        $(".guaguaSize select[name='size1']").attr("disabled", true);
                    }
                    form.render('checkbox');
                } else {
                    $(".lessCountHideCraft").hide();
                    $(".lessCountHideCraft").find(":input").attr("disabled", true);
                    $(".ui_hlbz").hide();
                    $(".ui_hlbz").find(":input").attr("disabled", true);
                    $(".ui_menu_craft").hide();
                    $(".ui_menu_craft").find(":input").attr("disabled", true);
                    $(".ui_menu_size").hide();
                    $(".ui_menu_size").find(":input").attr("disabled", true);
                    $(".ui_tzmp").hide();
                    $(".ui_tzmp").find(":input").attr("disabled", true);
                    $(".kindValue6").hide();
                    $(".kindValue6").find(":input").attr("disabled", true);
                    $("#3zValueForm").hide();
                    $("#3z_size").hide()
                    $(".z3_vice").hide()
                    $(".switchz3Size").hide();
                    $(".size-tip-z3").hide();
                    $(".z3_craft").hide();
                    $(".z3_craft input[name='craft']").prop("disabled", true);
                    $(".z4_craft").hide();
                    $(".peijian_ui").hide();
                    $(".z4_craft").find(":input").attr("disabled", true);
                    $(".peijian_ui").find(":input").attr("disabled", true);
                    $(".size-tip-other").show();
                    $('input[class = specialCraft]').prop('checked', false);

                    $(".lessCountHideCraft").find(".specialCraft").prop('checked', false);
                    $("#size").show();
                    $(".guaguaSize").hide();
                    $(".guaguaSize").find("select").attr("disabled", true);
                    $(".guaguaSize1").hide();
                    $(".guaguaSize1").find("select").attr("disabled", true);
                    if (kind == 13 || kind == "刮刮卡") {
                        $(".guaguaSize1").show();
                        $(".guaguaSize1 select").attr("disabled", false);
                    } else {
                        $(".guaguaSize1").hide();
                        $(".guaguaSize1 select").attr("disabled", true);
                    }
                }
                $(".kindValue2 input[value='10']").prop("disabled", true).prop("checked", false);
                $(".kindValue2 input[value='2']").prop("disabled", false).prop("checked", true);

                if (data.value == 3) {
                    $(".kindValue2 input[value='10']").prop("disabled", false);
                    $("#peijian_ui").show();
                    $("#peijian_ui input").attr("disabled", false);
                }
                $(".carft_lius").hide();
                $(".carft_lius checkbox[name='craft']").attr("disabled", true);
                $(".neibu").hide();
                $(".neibu").find("input").attr("disabled", true);
                if (data.value == 3 && couponKind != "少数量") {
                    $(".carft_lius").show();
                    $(".carft_lius checkbox[name='craft']").attr("disabled", false);
                    $(".neibu").css("display", "flex");
                    $(".neibu").find("input").attr("disabled", false);
                }
                form.render();
            });
            form.on('checkbox(z3Crafts)', (data) => {
                let value = data.value;
                let checked = $(data.elem).is(":checked");

                if (value == '直角' && $(".z3_craft_yj input[name='craft']").is(":checked")) {
                    $(data.elem).prop("checked", false);
                    layer.msg('直角-圆角不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                }
                if (value == '圆角' && $(".z3_craft_zj input[name='craft']").is(":checked")) {
                    $(data.elem).prop("checked", false);
                    layer.msg('直角-圆角不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                }
                if (value == '模切') {
                    $(".z3_craft_yj input[name='craft']").prop("disabled", checked);
                    $(".z3_craft_zj input[name='craft']").prop("disabled", checked);
                    $(".z3_craft_dk input[name='craft']").prop("disabled", checked);
                    $(".z3_craft_ssx input[name='craft']").prop("disabled", checked);
                    $(".z3_craft_yh input[name='craft']").prop("disabled", checked);
                    $(".z3_craft_bm input[name='craft']").prop("disabled", checked);
                } else {
                    let other_list = ["圆角", "直角", "打孔", "编码"];
                    if (other_list.indexOf(value) != -1 || (other_list.indexOf(value) != -1 && checked)) {
                        $(".z3_craft_mq input[name='craft']").prop("disabled", checked);
                    }
                }
                let shengz = $(".shengz:checked").length;
                if (shengz == 1) {
                    $(".scolor").css("display", "inline-block")
                } else {
                    $(".scolor").hide()
                }
                form.render();
            })
            form.on('radio(z3type)', (data) => {
                z3Select(data.value);
            })
            form.on('select(z3size1)', (data) => {
                if ($('input[name="z3type"]:checked').val() == 0) {
                    z3Vice(data.value);
                }
                if ($('input[name="z3type"]:checked').val() == 1) {
                    z3Craft(data.value)
                }
                $("#size").val(data.value);
            })
            form.on('checkbox(switchz3Size)', (data) => {

            })
            form.on('radio(kindValue7)', function (xgtData) {
                if (xgtData.value == 2) {
                    $(".ui_xgt").hide();
                    $(".ui_xgt").find(":input").attr("disabled", true);
                    $(".qt").show();
                    $(".qt").find(":input").attr("disabled", false);
                    $(".count").show();
                    $(".count").find(":input").attr("disabled", false);
                } else {
                    $(".ui_xgt").show();
                    $(".ui_xgt").find(":input").attr("disabled", false);
                    $(".qt").hide();
                    $(".qt").find(":input").attr("disabled", true);
                    $(".count").hide();
                    $(".count").find(":input").attr("disabled", true);
                }

                form.render();
            });


            // 监听吊牌材质
            form.on('radio(kindValue3)', function (tagData) {
                // !300克铜版纸
                if (tagData.value != 3) {
                    $(".tagOther").hide();
                    $(".tagOther").find(":input").attr("disabled", true);
                    $("#tag").show();
                    $("#tag").find(":input").attr("disabled", false);
                } else {
                    $(".tagOther").show();
                    $(".tagOther").find(":input").attr("disabled", false);
                    $("#tag").hide();
                    $("#tag").find(":input").attr("disabled", true);
                }
                form.render();
            })
            // 监听名片材质
            form.on('radio(kindValue4)', function (specialCardData) {
                // !300克铜版纸
                if (specialCardData.value != 3) {
                    $(".tagOther").hide();
                    $(".tagOther").find(":input").attr("disabled", true);
                    $("#specialCard").show();
                    $("#specialCard").find(":input").attr("disabled", false);
                    form.on('select(kindValueSelect)', function (data) {
                        // 轮播图
                        var html = " ";
                        var remark = " ";
                        // 清空轮播图
                        $("#carousel").empty();
                        $("#remark").empty();
                        $.ajax({
                            url: "${pageContext.request.contextPath}/getImgs",
                            type: "GET",
                            data: {
                                proTypeValue: "4",
                                kindValue: "6",
                                kind2Value: data.value
                            },
                            //dataType : "json",
                            success: function (result) {
                                for (let i = 0; i < result.length; i++) {
                                    // 只留一个remark
                                    remark = "";
                                    html += '<div><img style="width:' + result[0].imgWidth + 'px" src="' + result[i].imgUrl + '"></div>';
                                    remark += '<div><span>' + result[i].remark + '<span/></div>';
                                }
                                $("#carousel").append(html);
                                // 如果没有说明，就不显示null
                                if (remark.indexOf("null") < 0) {
                                    remark_html = remark;
                                    $("#remark").append(remark);
                                }
                                $("#test1 .layui-carousel-ind").empty();
                                // 如果没有轮播图就隐藏
                                if (result.length == 0) {
                                    document.getElementById("test1").style.display = "none";   //隐藏
                                } else {
                                    document.getElementById("test1").style.display = "block";  //显示
                                    ins.reload({
                                        elem: '#test1',
                                        width: result[0].imgWidth,  //设置容器宽度
                                        height: result[0].imgHeight
                                    });
                                }
                            }
                        });


                        if (data.value.length <= 4) {
                            $("#noCraft").show();
                            $("#hasCraft").hide();
                            $("#noCraft").find(":input").attr("disabled", false);
                            $("#hasCraft").find(":input").attr("disabled", true);
                            $('.noCraft').removeAttr('disabled');
                            $('.hasCraft').prop('disabled', 'disabled');


                            if (data.value == '珠光纸') {
                                $('input[class = switchCardCount]').prop('checked', false);
                                // 默认禁用自定义的数量
                                $(".diyCardCount").find(":input").attr("disabled", true);
                                //【自定义数量】复选框
                                $(".cardCount").show();
                                // 自定义少数量
                                form.on('checkbox(switchCardCount)', function (data) {
                                    if (data.elem.checked) {
                                        $(".diyCardCount").show();
                                        $(".notDiyCardCount").hide();
                                        $(".diyCardCount").find(":input").attr("disabled", false);
                                        $(".notDiyCardCount").find(":input").attr("disabled", true);
                                    } else {
                                        $(".notDiyCardCount").show();
                                        $(".diyCardCount").hide();
                                        $(".notDiyCardCount").find(":input").attr("disabled", false);
                                        $(".diyCardCount").find(":input").attr("disabled", true);
                                    }
                                    form.render();
                                })
                            } else {
                                //【自定义数量】复选框
                                $(".cardCount").hide();

                                $(".notDiyCardCount").show();
                                $(".diyCardCount").hide();
                                $(".notDiyCardCount").find(":input").attr("disabled", false);
                                $(".diyCardCount").find(":input").attr("disabled", true);
                            }
                            form.render();
                        } else {
                            $("#hasCraft").show();
                            $("#noCraft").hide();
                            $("#hasCraft").find(":input").attr("disabled", false);
                            $("#noCraft").find(":input").attr("disabled", true);
                            $('.hasCraft').removeAttr('disabled');
                            $('.noCraft').prop('disabled', 'disabled');
                        }
                        form.render();
                    })
                } else {
                    $(".tagOther").show();
                    $(".tagOther").find(":input").attr("disabled", false);
                    $("#specialCard").hide();
                    $("#specialCard").find(":input").attr("disabled", true);
                }
                form.render();
            })

            // 自定义少数量
            form.on('checkbox(switchCount)', function (data) {
                if (data.elem.checked) {
                    $(".diyCount").show();
                    $(".count").hide();
                    $(".diyCount").find(":input").attr("disabled", false);
                    $(".count").find(":input").attr("disabled", true);
                } else {
                    $(".count").show();
                    $(".diyCount").hide();
                    $(".count").find(":input").attr("disabled", false);
                    $(".diyCount").find(":input").attr("disabled", true);
                    // 恢复标准数量的时候会被禁用，加这个解决
                    form.render();
                }
            })

            form.on('checkbox(ui_yf_fm)', function (data) {
                var fm = $(".fm:checked").val();
                var ui_fm = $(".ui_fm:checked").val();
                if (fm == "单面覆膜" && ui_fm == "双面覆膜") {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('单面覆膜和双面覆膜只能选一种！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                // if (!data.elem.checked && data.value == "双面覆哑膜") {
                //     layer.msg('不能取消 [覆膜] 工艺！', {offset: ['300px', '300px']}, function () {
                //     });
                //     $(data.elem).prop("checked", true);
                //     form.render();
                //     return;
                // }
                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;
                }
                const carft_list2 = ["双面覆哑膜", "双面星光膜", "双面镭射膜", "双面触感膜", "双面雪花膜"];
                const carft_pei = ["配葫芦针", "流苏", "尼龙绳", "配弹力绳", "配弹力绳捆", "opp袋", "配棉绳"];
                const carft_nopei = ["单面局部UV", "双面局部UV", "双面星光膜", "双面镭射膜", "双面触感膜", "双面雪花膜"];
                const carft2 = carft_list2.filter(craft => craft_list.includes(craft));
                const carftpei = carft_pei.filter(craft => craft_list.includes(craft));
                const carftnopei = carft_nopei.filter(craft => craft_list.includes(craft));
                if (carft2.length > 1) {
                    $(data.elem).prop("checked", false);
                    layer.msg("覆膜不能同时选择", {offset: ['300px', '300px']}, function () {
                    });
                    form.render();
                    return false;
                }
                if (carftpei.length > 0 && carftnopei.length > 0) {
                    $(data.elem).prop("checked", false);
                    layer.msg(carft_nopei.join(",") + "与配件不能同时选择", {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();
                    }
                }
                if (data.value == "双面星光膜") {
                    if ($(data.elem).is(":checked")) {
                        getProductImage('星光膜');
                    } else {
                        getProductImage();
                    }
                }
                if (data.value == "双面镭射膜") {
                    if ($(data.elem).is(":checked")) {
                        getProductImage('镭射膜');
                    } else {
                        getProductImage();
                    }
                }
                if (data.value == "双面触感膜") {
                    if ($(data.elem).is(":checked")) {
                        getProductImage('触感膜');
                    } else {
                        getProductImage();
                    }
                }
                if (data.value == "双面雪花膜") {
                    if ($(data.elem).is(":checked")) {
                        getProductImage('雪花膜');
                    } else {
                        getProductImage();
                    }
                }
                form.render();
            })

            // 吊牌600克/800克自定义尺寸
            form.on('checkbox(switchSize)', function (data) {
                if (data.elem.checked) {
                    $(".diySize").show();
                    $(".fixedSize").hide();
                    $(".diySize").find(":input").attr("disabled", false);
                    $(".fixedSize").find(":input").attr("disabled", true);
                } else {
                    $(".fixedSize").show();
                    $(".diySize").hide();
                    $(".fixedSize").find(":input").attr("disabled", false);
                    $(".diySize").find(":input").attr("disabled", true);
                    // 恢复标准数量的时候会被禁用，加这个解决
                    form.render();
                }
            })
            form.on('checkbox(ui_craft)', function (data) {
                let craft_list = [];
                let kindValue = $('input[name="kindValue"]:checked').val();
                craft_list.push($("select[name='craft'] option:selected").val());
                $("input[name='craft']:checked").each(function () {
                    if (!$(this).is(':disabled')) {
                        craft_list.push($(this).val());
                    }
                });

                if (data.value == '抠图') {
                    $(".crop").hide();
                    $(".crop").find("input").prop("disabled", true)
                    if (data.elem.checked) {
                        $(".crop").show();
                        $(".crop").find("input").prop("disabled", false)
                    }
                }
                form.render();
            })
            // 监听工艺多选框
            form.on('checkbox(switchMQ)', function (data) {
                var kind = $('input[name="kind"]:checked').val();
                if ($(".normalCountHideCraft .mq:checked").length > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('[裁切- 模切]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    form.render('checkbox');
                    return false;
                }
                //判断当前多选框是选中还是取消选中
                if (kind != 7) {
                    // 除存酒卡
                    if (data.elem.checked && data.value == '模切') {
                        // 选中模切时取消除烫金外的选中并禁用工艺
                        $('input.disab').prop('checked', false);
                        $(".disab").attr("disabled", true);
                    } else if (!data.elem.checked && data.value == '模切') {//放开模切的时候数量变成1
                        $(".disab").attr("disabled", false);
                        $('input.disab').prop('checked');
                        $(".yahen").val(1)
                        $(".yadianxian").val(1)
                        $(".dakong").val(1)
                    }
                } else {
                    // 存酒卡
                    if (data.elem.checked && data.value == '模切') {
                        // 选中模切后取消除烫金、打码外的选中并禁用工艺
                        $('input[class = cjkDisab]').prop('checked', false);
                        $(".cjkDisab").attr("disabled", true);
                    } else if (!data.elem.checked && data.value == '模切') {//放开模切的时候数量变成1
                        $(".cjkDisab").attr("disabled", false);
                        $('input[class = cjkDisab]').prop('checked');
                        $(".yahen").val(1)
                        $(".yadianxian").val(1)
                        $(".dakong").val(1)
                    }
                }
                form.render();
                getProductImage(data.elem.checked ? data.value : '')
            });
            form.on('checkbox(ui_lius)', function (data) {
                getProductImage(data.elem.checked ? data.value : '')
            })
            form.on('checkbox(fmType)', function (data) {
                if (data.elem.checked) {
                    $(data.elem).siblings().prop("checked", false);
                } else {
                    $(data.elem).prop("checked", true);
                    layer.msg('贴膜-配膜必须选择！', {offset: ['300px', '300px']}, {icon: 5});
                }

                form.render('checkbox');
            })


            // 选中工艺的时候，才显示出对应下拉框
            form.on('checkbox(switch)', function (data) {
                // 四个只能选俩个
                var len = $(".max:checked").length;
                if (len > 2) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('【压痕、压点线、打孔、圆角】最多只能选2项！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                // 压痕压点线只能选一个
                var yaLen = $(".ya:checked").length;
                if (yaLen > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('[压痕 - 压点线]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                // 单面/双面烫金只能选一个
                var tangjin = $(".tangjin:checked").length;
                if (tangjin > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('烫金工艺不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                var hu = $(".ui_hu:checked").length;
                if (hu > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('[糊成品 - 糊半成品]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                } else if (hu == 1) {
                    var size = $("#size").val();
                    if ((size.split("*")[0] < 20 || size.split("*")[1] < 4) && (size.split("*")[0] < 4 || size.split("*")[1] < 20)) {
                        $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                        $(data.elem).prop("checked", false);
                        layer.msg('糊成品/糊半成品最小尺寸20*4cm！', {offset: ['300px', '300px']}, {icon: 5});
                        return false;
                    }
                }
                var kind = $('input[name="kind"]:checked').val();

                if (kind == 8 && !data.elem.checked && data.value == "双面覆哑膜") {
                    layer.msg('门挂牌不能取消 [覆膜] 工艺！', {offset: ['300px', '300px']}, function () {
                    });
                    $('.ui_door_fm').prop('checked', true);
                    form.render('checkbox');
                }
                // 产品品种

                // 腰封4*4cm内无法选择【单面覆膜】工艺
                /* if (data.value == '单面覆膜') {
                    if(data.elem.checked){
                        if (($("#size").val().split("*")[0] < 4 || $("#size").val().split("*")[1] < 4)) {
                            layer.msg("[ 腰封 ] 尺寸小于4 cm无法 [ 单面覆膜 ]",{offset:['300px','300px']},function(){});
                            $('input[class = fm]').prop('checked', false);
                            form.render('checkbox');
                            return false;
                        }
                    }
                } */

                // 打码选中的时候，显示数量下拉框、编码类型、并把数量置为1（4/28改,原来只有存酒卡才显示）
                if (data.value == '打码') {
                    if (data.elem.checked) {
                        var size = $("#size").val();
                        if ((size.split("*")[0] < 9 || size.split("*")[1] < 5.4) && (size.split("*")[1] < 9 || size.split("*")[0] < 5.4)) {
                            $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                            $(data.elem).prop("checked", false);
                            layer.msg('打码工艺最小尺寸9*5.4cm！', {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                        $(".bmType").show();
                        $(".damaHide").show();
                        $(".dama").val(1);
                        //$('input[class = mq]').prop('disabled', true);
                        let v_kind = $("input[name='kind']:checked").val();
                        let html = `<option value="7" selected>7</option>
                                            <option value="3">3</option>`;
                        if (v_kind == 13) {
                            html = `<option value="7" selected>7</option>`;
                        }
                        $("select[name='pcount']").empty();
                        $("select[name='pcount']").append(html);
                        let color_html = `<option value="金色码" selected>金色码</option>
                                <option value="红色码">红色码</option>
                            <option value="黑色码">黑色码</option>`;
                        $("select[name='macolor']").empty();
                        $("select[name='macolor']").append(color_html);
                        form.render('select');
                    } else {
                        // 打码取消选中的时候，隐藏下拉框、编码类型
                        $(".bianma").hide();
                        $(".bmType").hide();
                        $(".damaHide").hide();
                        //$('input[class = mq]').prop('disabled', false);
                    }
                }
                // 除存酒卡
                if (kind != 7) {
                    // 压痕数量是2的时候，切换成模切，禁用其它
                    if (data.value == '压痕') {
                        if (data.elem.checked) {
                            $(".yahenHide").show();
                            var size = $("#size").val();
                            var length = size.split("*")[0];
                            var width = size.split("*")[1];
                            if ($(".yahen").val() == 1) {

                            } else {

                            }
                        } else {
                            $(".yahenHide").hide();
                        }
                    }
                    // 压点线数量是2的时候，切换成模切，禁用其它
                    if (data.value == '压点线') {
                        if (data.elem.checked) {
                            $(".yadianxianHide").show();
                            if ($(".yadianxian").val() == 2) {
                                $('input[class = disab]').prop('checked', false);
                                $(".disab").attr("disabled", true);
                                $('input[class = mq]').prop('checked', true);
                            }
                        } else {
                            $(".yadianxianHide").hide();
                        }
                    }
                    // 打孔数量是2的时候，切换成模切，禁用其它
                    if (data.value == '打孔') {
                        if (data.elem.checked) {
                            $(".dakongHide").show();
                            if ($(".dakong").val() == 2) {
                                $('input[class = disab]').prop('checked', false);
                                $(".disab").attr("disabled", true);
                                $('input[class = mq]').prop('checked', true);
                            }
                        } else {
                            $(".dakongHide").hide();
                        }
                    }
                    // 打码选中的时候，显示下拉框（4/28注释）
                    /* if (data.value == '打码') {
                        if(data.elem.checked){
                            $(".damaHide").show();
                        }else{
                            $(".damaHide").hide();
                        }
                    } */
                } else {
                    // 存酒卡
                    // 压痕数量是2的时候，切换成模切，禁用第一排
                    if (data.value == '压痕') {
                        if (data.elem.checked) {
                            $(".yahenHide").show();
                            if ($(".yahen").val() == 2) {
                                $('input[class = cjkDisab]').prop('checked', false);
                                $(".cjkDisab").attr("disabled", true);
                                $('input[class = mq]').prop('checked', true);
                            }
                        } else {
                            $(".yahenHide").hide();
                        }
                    }
                    // 压点线数量是2的时候，切换成模切，禁用其它
                    if (data.value == '压点线') {
                        if (data.elem.checked) {
                            $(".yadianxianHide").show();
                            if ($(".yadianxian").val() == 2) {
                                $('input[class = cjkDisab]').prop('checked', false);
                                $(".cjkDisab").attr("disabled", true);
                                $('input[class = mq]').prop('checked', true);
                            }
                        } else {
                            $(".yadianxianHide").hide();
                        }

                    }
                    // 打孔数量是2的时候，切换成模切，禁用其它
                    if (data.value == '打孔') {
                        if (data.elem.checked) {
                            $(".dakongHide").show();
                            if ($(".dakong").val() == 2) {
                                $('input[class = cjkDisab]').prop('checked', false);
                                $(".cjkDisab").attr("disabled", true);
                                $('input[class = mq]').prop('checked', true);
                            }
                        } else {
                            $(".dakongHide").hide();
                        }
                    }

                    // 存酒卡打码（4/28注释）
                    /* if (data.value == '打码') {
                        // 打码选中的时候，显示数量下拉框、编码类型、并把数量置为1
                        if(data.elem.checked){
                            $(".bmType").show();
                            $(".damaHide").show();
                            $(".dama").val(1);
                            form.render('select');
                        }else{
                            // 打码取消选中的时候，隐藏下拉框、编码类型
                            $(".bianma").hide();
                            $(".bmType").hide();
                            $(".damaHide").hide();
                        }
                    } */
                }

                if (kind == '特种纸名片') {
                    $(data.elem).prop('disabled', false);
                    if (data.elem.checked) {
                        $(data.elem).siblings('input').prop('disabled', true);
                    } else {
                        $(data.elem).siblings('input').prop('disabled', false);
                    }
                }
                form.render('checkbox');
                getProductImage(data.elem.checked ? data.value : '')
            });

            // 婚礼卡选中工艺的时候，不能同时选
            form.on('checkbox(switchCraft)', function (data) {
                // 婚礼卡 直角/异形只能选一个
                var zhijiaoCraft = $(".zhijiaoCraft:checked").length;
                var specialCraft = $(".specialCraft:checked").length;
                if (zhijiaoCraft + specialCraft > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('[直角 - 异形]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                // 少数量烫金只能选一个
                var tjCraft = $(".tjCraft:checked").length;
                if (tjCraft > 1) {
                    $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                    $(data.elem).prop("checked", false);
                    layer.msg('[烫金 - 彩色印刷+烫金]不能同时选择！', {offset: ['300px', '300px']}, {icon: 5});
                    return false;
                }
                let kingv = $("input[name='kind']:checked").val()
                if (kingv == "异形卡片") {
                    if (data.value == "异形" && !$(data.elem).is(":checked")) {
                        layer.msg('[异形卡片 - 异形]不能取消！', {offset: ['300px', '300px']}, {icon: 5});
                        $(data.elem).prop("checked", true);
                        form.render('checkbox');
                        return false;
                    }
                }
            })

            // 监听下拉框,数量是2的时候，切换成模切，禁用其它
            form.on('select(yahen)', function (data) {
                var kind = $('input[name="kind"]:checked').val();
                // 除存酒卡
                if (kind != 7) {
                    if (data.value == 2) {
                        if ($(".yh").is(':checked')) {
                            $('input[class = disab]').prop('checked', false);
                            $(".disab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                } else {
                    // 存酒卡
                    // 数量是2的时候，切换成模切，禁用第一排
                    if (data.value == 2) {
                        if ($(".yh").is(':checked')) {
                            $('input[class = cjkDisab]').prop('checked', false);
                            $(".cjkDisab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                }
                form.render('checkbox');
            });
            form.on('select(yadianxian)', function (data) {
                var kind = $('input[name="kind"]:checked').val();
                // 除存酒卡
                if (kind != 7) {
                    if (data.value == 2) {
                        if ($(".ydx").is(':checked')) {
                            $('input[class = disab]').prop('checked', false);
                            $(".disab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                } else {
                    // 存酒卡
                    // 数量是2的时候，切换成模切，禁用第一排
                    if (data.value == 2) {
                        if ($(".ydx").is(':checked')) {
                            $('input[class = cjkDisab]').prop('checked', false);
                            $(".cjkDisab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                }
                form.render('checkbox');
            });
            form.on('select(dakong)', function (data) {
                var kind = $('input[name="kind"]:checked').val();
                // 除存酒卡
                if (kind != 7) {
                    if (data.value == 2) {
                        if ($(".dk").is(':checked')) {
                            $('input[class = disab]').prop('checked', false);
                            $(".disab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                } else {
                    // 存酒卡
                    // 数量是2的时候，切换成模切，禁用第一排
                    if (data.value == 2) {
                        if ($(".dk").is(':checked')) {
                            $('input[class = cjkDisab]').prop('checked', false);
                            $(".cjkDisab").attr("disabled", true);
                            $('input[class = mq]').prop('checked', true);
                        }
                    }
                }
                form.render('checkbox');
            });
            // 监听打码下拉框，当选择存酒卡-打码-数量2的时候，显示编码下拉框
            form.on('select(dama)', function (data) {
                var kind = $('input[name="kind"]:checked').val();
                // 存酒卡选择打码数量2的时候，显示编码种类（4/28改为所有产品）
                // 选择打码数量2的时候，显示编码种类，并取消禁用（上面有禁用操作）(4/28)
                if (data.value == 2) {
                    // $(".bianma").show();
                    // $(".bianma").find(":input").attr("disabled", false);
                } else {
                    $(".bianma").hide();
                    $(".bianma").find(":input").attr("disabled", true);
                }
                form.render('select');
            });

            form.on('radio(ui_sdk_craft)', function (data) {
                if (data.value == "丝带") {
                    $(".ui_sd").show();
                    $(".ui_sd").find(":input").attr("disabled", false);
                } else {
                    $(".ui_sd").hide();
                    $(".ui_sd").find(":input").attr("disabled", true);
                }
                form.render();
            });

            form.on('checkbox(nmq)', (data) => {
                let craft_list = [];
                $("input:checkbox[name='craft']:checked").each(function (i) {
                    // 没有被禁用的工艺加到arr中
                    if (!$(this).is(':disabled')) {
                        craft_list.push($(this).val());
                    }
                });
                if (!craft_list.includes("模切")) {
                    $(data.elem).prop("checked", false);
                    layer.msg("异形模切才能选择内部模切", {offset: ['300px', '300px']}, function () {
                    });
                    form.render();
                    return false;
                }
                const carft_nopei = ["单面局部UV", "双面局部UV", "双面星光膜", "双面镭射膜", "双面触感膜", "双面雪花膜"];
                const carftnopei = carft_nopei.filter(craft => craft_list.includes(craft));
                if (data.elem.checked && carftnopei.length > 0) {
                    $(data.elem).prop("checked", false);
                    layer.msg(carft_nopei.join(",") + "与配件、内部模切不能同时选择", {offset: ['300px', '300px']}, function () {
                    });
                    form.render();
                    return false;
                }
                if (data.elem.checked) {
                    $(".n_mq_input").css("display", "flex")
                    $(".n_mq_input input").prop("disabled", false);
                } else {
                    $(".n_mq_input").hide()
                    $(".n_mq_input input").prop("disabled", true);
                }
            })

            //点击计算，计算价格
            form.on('submit(acount_btn)', function (data) {
                /* var wangwang = $("#wangwang").val();
                if(wangwang == ""){
                    layer.msg("请填写客户旺旺号！",{offset:['300px','300px']},function(){});
                    return false;
                } */
                // 选中‘自定义数量’
                if ($('input[name="switchCount"]:checked').length != 0) {
                    if ($("#count").val() < 10000 || $("#count").val() % 1000 != 0) {
                        layer.msg("自定义数量需要大于10000 且是1000的整数倍", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                if ($('input[name="switchCardCount"]:checked').length != 0) {
                    if ($("#cardCount").val() > 200) {
                        layer.msg("特种纸名片 - 珠光纸自定义数量最大不超过200", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }

                var kind = $('input[name="kind"]:checked').val()
                var kindValue = $('input[name="kindValue"]:checked').val()
                // 如果是吊牌，用kind3Value
                if (kind == 2 && couponKind != '少数量') {
                    kindValue = $('input[name="kind3Value"]:checked').val()
                    if (!kindValue) {
                        layer.msg("请选择材质", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                // 如果是名片，用kind4Value
                if (kind == 6 && couponKind != '少数量') {
                    kindValue = $('input[name="kind4Value"]:checked').val()
                    if (!kindValue) {
                        layer.msg("请选择材质", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                var kindValue2 = $('input[name="kindValue2"]:checked').val()
                var kindValue3 = $('input[name="kindValue3"]:checked').val()
                var kindValue4 = $('input[name="kind4Value"]:checked').val()
                var number = $("#number").val();
                var size = $("#size").val();
                var guaguaSize = $("#size1").val();
                var couponKind = $("input[name='couponKind']:checked").val();

                if ((size.split("*")[0] > 140 || size.split("*")[1] > 100) && (size.split("*")[0] > 100 || size.split("*")[1] > 140)) {
                    layer.msg("卡片尺寸不能超过140*100 cm", {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                /* if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
                    layer.msg("[ 卡片 ]尺寸小于4*4 cm请以 [ 插卡 - 异形插牌 ] 报价!",{offset:['300px','300px']},function(){});
                    return false;
                } */

                if (couponKind != "少数量" && (kind == 1 || kind == 3 || kind == 4 || kind == 5 || kind == 7 || kind == 13)) {
                    if ($(".mq:checked").length == 0) {
                        layer.msg("请选择裁切类型", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                var kindData = {
                    0: "吊旗",
                    1: "腰封",
                    2: "吊牌",
                    3: "贺卡",
                    4: "优惠券",
                    5: "抽奖券",
                    6: "特价名片",
                    7: "存酒卡",
                    8: "门挂牌",
                    9: "售后卡",
                    10: "吸管套",
                    11: "圣诞卡",
                    13: "刮刮卡",
                    "直角卡片": "卡片",
                    "异形卡片": "异形卡片",
                    "腰封": "腰封",
                    "贺卡": "贺卡",
                    "积分卡": "积分卡",
                    "抽奖卡": "抽奖卡",
                    "婚礼卡": "婚礼卡",
                    "刮刮卡": "刮刮卡",
                    "菜单": "菜单",
                    "婚礼报纸": "婚礼报纸",
                    "特种纸名片": "特种纸名片",
                    "种子纸": "种子纸"
                }, kindValueData = {
                    0: "157克铜版纸",
                    1: "200克铜版纸",
                    2: "300克铜版纸",
                    3: "300克铜版纸",
                    4: "600克铜版纸",
                    5: "800克铜版纸",
                    6: "特种纸名片（不配绳子）",
                    7: "700克白卡纸",
                    8: "250克牛皮纸",
                    10: "400克铜版纸"
                };
                var arr = [];
                let szkun = false;
                let tscolor = $(".tscolor select option:selected").val();
                let selectCount = $("#selectCount").val();
                $(".sizeTang").find(":input").attr("disabled", true);
                $("input:checkbox[name='craft']:checked").each(function (i) {
                    // 没有被禁用的工艺加到arr中
                    if (!$(this).is(':disabled')) {
                        // 选中编码工艺的时候，展示打码数

                        if (kindValue2 != 10) {
                            if ($(this).val() === '打码') {
                                arr.push($(this).val() + '(' + $(".dama").val() + '个' + $("select[name='pcount'] option:selected").val() + '位' + $("select[name='macolor'] option:selected").val() + ')');
                            }
                            if (kind != 1 && ($(this).val() === '单面烫金' || $(this).val() === '双面烫金')) {
                                $(".sizeTang").find(":input").attr("disabled", false);
                                if ($("#lengthTang").val() == '' || $("#widthTang").val() == '') {
                                    layer.msg('请填写烫金版尺寸！', {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                                if (Number(size.split("*")[0]) < Number($("#lengthTang").val()) || Number(size.split("*")[1]) < Number($("#widthTang").val())) {
                                    layer.msg('烫金版尺寸不能大于输入尺寸！', {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                            }
                        } else {
                            if ($(this).val() === '打码') {
                                arr.push("打码" + $(".maxian option:selected").val() + "组")
                                return;
                            }
                            if ($(this).val() === '打点线') {
                                arr.push("打点线" + $(".dadianxian option:selected").val() + "组")
                                return;
                            }
                            if ($(this).val() === '压痕') {
                                arr.push("压痕" + $(".yadianxian option:selected").val() + "组")
                                return;
                            }

                        }
                        if (kindValue2 == 2 && kind == 3) {
                            if ($(this).val() === '单面局部UV' || $(this).val() === '双面局部UV') {
                                if ($("#lengthVU").val() == '' || $("#widthUV").val() == '') {
                                    layer.msg('请填写UV版尺寸！', {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                                if (Number(size.split("*")[0]) < Number($("#widthUV").val()) || Number(size.split("*")[1]) < Number($("#lengthVU").val())) {
                                    layer.msg('UV版尺寸不能大于输入尺寸！', {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                                arr.push($(this).val() + $("#widthUV").val() + "*" + $("#lengthVU").val());
                                return
                            }
                        }
                        if ($(this).val() === '打孔' && kind != "种子纸") {
                            arr.push("打孔" + $(".wkong:enabled option:selected").val())
                            return;
                        }
                        if ($(this).val() === '尼龙绳') {
                            arr.push($(".select_nilongshen select[name='craft'] option:selected").val() + "-" + $("select[name='shen_color'] option:selected").val())
                            return;
                        }
                        if ($(this).val() === '配尼龙绳' || $(this).val() === '穿尼龙绳') {
                            let shenColor = $("select[name='shen_color'] option:selected").val();
                            if (couponKind == "少数量") {
                                shenColor = $("#lesspeijian select[name='shen_color'] option:selected").val();
                            }
                            arr.push($(this).val() + "-" + shenColor)
                            return;
                        }
                        if ($(this).val() === '配流苏') {
                            if (couponKind == "少数量") {
                                let coNumber = $("#lesspeijian input[name='co_number']").val();
                                arr.push(coNumber + "包" + $(this).val())
                            }
                            return;
                        }
                        if ($(this).val() === '流苏') {
                            arr.push($(".select_liusu select[name='craft'] option:selected").val())
                            return;
                        }
                        if ($(this).val() == "配弹力绳捆") {

                            arr.push(tscolor + "配弹力绳(" + Math.ceil(selectCount * 20 / 5000) + "捆)");
                            szkun = true;
                            return;
                        }
                        if ($(this).val() == "配弹力绳") {
                            arr.push(tscolor + "配弹力绳(15CM)");
                            return;
                        }
                        if ($(this).val() == "配印章") {
                            arr.push($("input[name='po_number']").val() + "印章");
                            return;
                        }
                        if ($(this).val() == "opp袋") {
                            let oppdai = $(".select_opp select[name='craft'] option:selected").val();
                            let oppSize = $("select[name='toothpick_size'] option:selected").text();
                            if (oppdai == "装opp袋") {
                                oppSize = "";
                            }
                            arr.push(oppdai + oppSize);
                            return;
                        }
                        if ($(this).val() == "抠图") {
                            arr.push($(this).val() + $("input[name='cropNumber']").val());
                            return;
                        }
                        if ($(this).val() == "内部模切") {
                            return;
                        }
                        arr.push($(this).val());
                    }
                });

                // 未满足条件，禁止提交
                if (kind == null) {
                    layer.msg('请选择品种！', {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if (kind == 0 || kind == 1) {
                    if (kindValue == null) {
                        layer.msg('请选择材质！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                if (kind == 10) {
                    kindValue = $("input[name='kindValue7']:checked").val();
                    if (kindValue == 8) {
                        size = "6.5*5.4 cm";
                    }

                    if ((size.split("*")[0] > 9 || size.split("*")[1] > 10.8) && (size.split("*")[1] > 9 || size.split("*")[0] > 10.8)) {
                        layer.msg('吸管套最大尺寸9*10.8cm！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                if (kind != 8 && kind != 2 && kind != 6 && kind != 13 && kind != "菜单" && kind != 9 && kind != 11) {
                    if (size == "") {
                        layer.msg('请填写尺寸！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                if (kind == 13) {
                    if (size.split("*")[0] > 17 || size.split("*")[1] > 17) {
                        // layer.msg("尺寸最大不能超过17cm！");
                        // return false;
                    }

                }
                if (kind == 1) {
                    if (kindValue == 1) {
                        if (arr.length > 0) {
                            if (arr[0].indexOf("模切") >= 0) {
                                if (size.split("*")[0] > 100 || size.split("*")[1] > 100) {
                                    layer.msg("200克铜版纸腰封[模切]尺寸最大为100cm");
                                    return false;
                                }
                            } else {
                                if (size.split("*")[0] > 118 || size.split("*")[1] > 118) {
                                    layer.msg("200克铜版纸腰封[裁切]尺寸最大为118cm");
                                    return false;
                                }
                            }
                        } else {
                            if (size.split("*")[0] > 118 || size.split("*")[1] > 118) {
                                layer.msg("200克铜版纸腰封[裁切]尺寸最大为118cm");
                                return false;
                            }
                        }
                    }
                }
                // 腰封尺寸小于 4 cm无法 单面覆膜
                /* if(kind == 1){
                    if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
                        for (let i = 0; i < arr.length; i++) {
                            if(arr[i] === '单面覆膜'){
                                layer.msg("[ 腰封 ] 尺寸小于 4 cm无法 [ 单面覆膜 ]",{offset:['300px','300px']},function(){});
                                return false;
                            }
                        }
                    }
                } */

                // 选中[打码]工艺，判断尺寸:4.5cm以内不能打码;打2组码不能超过26*11;
                if (arr.length > 0) {
                    for (let i = 0; i < arr.length; i++) {
                        if (arr[i].indexOf('打码') != -1) {
                            if ((size.split("*")[0] < 4.5 || size.split("*")[1] < 4.5) && (size.split("*")[0] < 4.5 || size.split("*")[1] < 4.5)) {
                                layer.msg("尺寸小于4.5cm 无法【打码】", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            } else if (((size.split("*")[0] < 13 || size.split("*")[1] < 4.5) && (size.split("*")[0] < 4.5 || size.split("*")[1] < 13))
                                && $(".dama").val() == 2) {
                                layer.msg("尺寸小于13*5.4cm 无法【打码】 2 组", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            } else if ((size.split("*")[0] > 26 || size.split("*")[1] > 11) && (size.split("*")[0] > 11 || size.split("*")[1] > 26)) {
                                layer.msg("尺寸大于26 * 11cm 无法【打码】", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                    }
                }
                if (couponKind == '少数量' && arr.length > 0) {
                    for (let i = 0; i < arr.length; i++) {
                        if (arr[i].indexOf("烫金") > -1) {
                            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 () {
                                });
                                return false;
                            }
                        }
                    }
                }
                // 吊旗
                if (kind == 0) {
                    // 吊旗  && 300克铜版纸
                    if (kindValue == 2) {
                        $("#proTypeValue").val(4)
                    } else {
                        $("#proTypeValue").val(13)
                    }
                } else if (kind == 1) { // 腰封
                    // 腰封&&300克铜版纸
                    if (kindValue == 2) {
                        $("#proTypeValue").val(4)
                    } else {
                        $("#proTypeValue").val(15)
                    }
                    if ((size.split("*")[0] < 4 || size.split("*")[1] < 4) && arr[0] !== '模切') {
                        if (kindValue == 0) {
                            layer.msg("[ 157克铜版纸 ] 尺寸小于 4cm 无法制作", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                        /* else if (kindValue == 1) {
                            layer.msg("尺寸小于 4cm 请勾选 [ 模切 ]", {offset : [ '300px', '300px' ]}, function() {});
                            return false;
                        }  */
                    }
                    // if ($(".fm:checked").val() == null && $(".ui_fm:checked").val() == null) {
                    //     layer.msg("腰封不能选择不覆膜", {offset: ['300px', '300px']}, function () {
                    //     });
                    //     return false;
                    // }
                } else if (kind == 6) {
                    $("#proTypeValue").val("特价名片")
                } /* else if (kind == 13) {
				$("#proTypeValue").val("刮刮卡")
			}  */ else if (kind != 0 && kind != 1) {
                    $("#proTypeValue").val(4)
                }

                // 判断是否选中模切标识
                var flag = false;
                if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
                    if (arr.length > 0) {
                        for (let i = 0; i < arr.length; i++) {
                            if (arr[i] === '模切') {
                                flag = true
                            }
                        }
                    } else {
                        flag = false
                    }
                    // 判断存酒卡是否选中模切标识
                    if (kind == 7) {
                        if (!flag) {
                            layer.msg("[ 卡片 - 存酒卡 ]尺寸小于 4cm 请勾选 [ 模切 ]", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    }
                }
                // 判断是否选中[异形]标识
                var yxFlag = false;
                if ((size.split("*")[0] > 70 || size.split("*")[1] > 53) && (size.split("*")[0] > 53 || size.split("*")[1] > 70)) {
                    if (arr.length > 0) {
                        for (let i = 0; i < arr.length; i++) {
                            if (arr[i] === '异形') {
                                yxFlag = true
                            }
                        }
                    } else {
                        yxFlag = false
                    }
                    // 选中异形、尺寸大于70*53厘米，return
                    if (yxFlag) {
                        layer.msg("选择[ 异形 ]时 尺寸应小于70*53cm", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                var l1 = Math.ceil(size.split("*")[0] / 9);
                var w1 = Math.ceil(size.split("*")[1] / 5.4);
                var l2 = Math.ceil(size.split("*")[1] / 9);
                var w2 = Math.ceil(size.split("*")[0] / 5.4);
                var min = Math.min(l1 * w1, l2 * w2);
                if (couponKind == '常用种类') {
                    if (kind != 7 && kind != 8) {
                        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)) {
                                layer.msg("[ 卡片 ]9*5.4 cm以内,尺寸小于4 cm请以 [ 插卡 - 异形插牌 ] 报价!", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        } else if (kind == 3 || kind == 4 || kind == 5 || kind == 7) {
                            /*if (min >= 6 && !(kindValue2 == 10 && kind == 3)) {
                                if ($('input[class = mq]:checked').val() == "模切") {
                                    layer.msg("超过6位异形模切卡片请以[ 腰封 - 异形模切]报价！", {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                            }*/
                        } else {
                            //吊牌300克
                            if (kindValue3 == 2) {
                                if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {// && arr[0] !== '模切'
                                    if (!flag) {
                                        layer.msg("尺寸小于 4cm 请勾选 [ 模切 ]", {offset: ['300px', '300px']}, function () {
                                        });
                                        return false;
                                    }
                                }
                            }
                        }
                    }
                    if (kind == 1 && kindValue == 2) {
                        if (arr.includes("糊成品") && !arr.includes("压痕")) {
                            layer.msg("糊成品请选择压痕", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    }
                }
                if (kind == 1 && kindValue == 0) {
                    if ((size.split("*")[0] > 115 || size.split("*")[1] > 84.8) && (size.split("*")[0] > 84.8 || size.split("*")[1] > 115)) {
                        layer.msg("157克腰封尺寸不能超过 115*84.8 cm", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                if (kind == 13 || kind == "刮刮卡") {
                    let awards = $("input[name='awards']").val();

                    if (awards > 1) {
                        if ($('input[class = mq]:checked').val() == "模切") {
                            layer.msg("异形刮刮卡2个奖项要按照款数来报价!", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    }
                }
                // 选择了少数量
                if (couponKind == '少数量') {
                    guaguaSize = $("#size2").val();
                    $("#proTypeValue").val("卡片少数量")
                    $("#proTypeLabel").val(kindData[kind])
                    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 () {
                        // });
                        // return false;
                    }
                    if (kind == "种子纸") {
                        let type = $('input[name="z3type"]:checked').val();
                        let switchz3Size = $('input[name="switchz3Size"]:checked').val()
                        if ((size.split("*")[0] < 8 || size.split("*")[1] < 5) && (size.split("*")[0] < 5 || size.split("*")[1] < 8)) {
                            layer.msg("尺寸小于 8*5cm 无法报价", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                        if ((size.split("*")[0] > 20 || size.split("*")[1] > 30) && (size.split("*")[0] > 30 || size.split("*")[1] > 20)) {
                            layer.msg("尺寸超过 20.0*30.cm 无法报价", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                        if (!switchz3Size && type == 1) {
                            if (arr.indexOf("圆角") == -1 && arr.indexOf("直角") == -1) {
                                layer.msg("圆角，直角必选 无法报价", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }

                    } else if (kind != "异形卡片") {
                        if ((size.split("*")[0] > 70 || size.split("*")[1] > 70)) {
                            if ($("#count").val() != 1 && $("#count").val() != 5 && $("#count").val() % 10 != 0) {
                                layer.msg("该尺寸数量必须为1；5；或 10的倍数", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                        if ((size.split("*")[0] > 72.6 || size.split("*")[1] > 52.6) && (size.split("*")[0] > 52.6 || size.split("*")[1] > 72.6)) {
                            layer.msg("少数量尺寸不能超过 72.6*52.6 cm", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    } else {
                        if ((size.split("*")[0] > 70 || size.split("*")[1] > 53) && (size.split("*")[0] > 53 || size.split("*")[1] > 70)) {
                            layer.msg("【异形卡片】尺寸不能超过 70*53 cm", {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    }
                    if (number > 1) {
                        if ($("#desType option:selected").val() == "" || $("#desType option:selected").val() == null) {
                            if (kind != "婚礼报纸" && kind != "菜单") {
                                layer.msg('请选择设计内容！', {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                    }
                    // 选择少数量时，取消常规数量提交
                    $("#selectCount").val("")
                }

                // 门挂牌
                if (kind == 8) {
                    $("#proTypeValueDoorList").val(25)
                }
                // 吊旗&&300克铜版纸
                if (kind == 0 && kindValue == 2) {
                    $("#d").val("13")
                } else if (kind == 1 && kindValue == 2) {
                    $("#d").val("15")
                } else {
                    $("#d").val("")
                }
                form.render();

                // 300克铜版纸
                if (kind != 0 && kind != 1 && kind != 2 && kind != 6 && kind != 10) {
                    kindValue = 2
                }
                if (kind == 2 && couponKind == '少数量') {
                    kindValue = 2
                }
                if (couponKind != "少数量" && kindValue2 == 10) {
                    kindValue = 10;
                }
                //少数量没有工艺
                //没选中[模切]，设置工艺为“直角裁切”
                if (couponKind != '少数量') {
                    var mqFlag = false;
                    if (arr.length > 0) {
                        for (let i = 0; i < arr.length; i++) {
                            if (arr[i] === '模切' || arr[i] === '圆角') {
                                mqFlag = true
                            }
                        }
                        if (!mqFlag) {
                            //门挂牌
                            if (kind == 8) {
                                arr.push("模切")
                            } else {
                            }
                        }
                    } else {
                        //门挂牌
                        if (kind == 8) {
                            arr.push("模切")
                        } else {
                        }
                    }
                    // 没选中[覆膜]工艺，设置工艺为“不覆膜”
                    // var fmFlag = false;
                    // if (arr.length > 0) {
                    //     for (let i = 0; i < arr.length; i++) {
                    //         if (arr[i].indexOf('覆') != -1) {
                    //             fmFlag = true
                    //         }
                    //     }
                    //     if (!fmFlag) {
                    //         arr.push("双面不覆膜")
                    //     }
                    // } else {
                    //     arr.push("双面不覆膜")
                    // }
                } else {
                    if (kind != "种子纸") {
                        arr.push($('input[name="craftShua"]:checked').val())
                    }
                    let shengz = $(".shengz:checked").length;
                    if (shengz == 1) {
                        let select = $(".scolor select option:selected").val();
                        let index = arr.findIndex((e) => {
                            return e == "绳子"
                        });
                        if (index >= 0) {
                            arr[index] = select;
                        }
                    }
                }
                if ($("#countTag").val() > 10000) {
                    layer.msg("[ 吊牌600克 ] 数量大于1万 请单独报价", {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if (kindValue == 10) {
                    if ($("#z4_craft .mq:checked").length == 0) {
                        layer.msg("400克铜版纸裁切工艺必选", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
                let n_moq_num = $('input[name="n_mq_num"]').val()
                let n_moq_size = $("input[name='n_mq_size']").val()
                let nmq = $("#nmq:checked").val();
                if (!$("#nmq").is(':disabled')) {
                    if (nmq == '内部模切' && n_moq_num == 0) {
                        layer.msg('请输入内模切个数！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if (nmq == '内部模切' && n_moq_num > 0 && n_moq_size == "") {
                        layer.msg('请输入内模切尺寸！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if (nmq == '内部模切' && n_moq_num > 0 && n_moq_size.indexOf("*") == -1) {
                        layer.msg('请输入内模切正确尺寸！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }

                    if (n_moq_num > 0) {
                        let main_size = size.split("*");
                        let moq_size = n_moq_size.split("*");

                        let max_number = Math.max(Math.floor(main_size[0] * 10 / (moq_size[0] * 10 + 2)) * Math.floor(main_size[1] * 10 / (moq_size[1] * 10 + 2)), Math.floor(main_size[1] * 10 / (moq_size[0] * 10 + 2)) * Math.floor(main_size[0] * 10 / (moq_size[1] * 10 + 2)))
                        if (max_number < n_moq_num) {
                            layer.msg('内模切尺寸超出范围！', {offset: ['300px', '300px']})
                            return false;
                        }
                    }
                }

                $.ajax({
                    url: "${pageContext.request.contextPath}/getThanSum",
                    type: "GET",
                    data: $(".big_box form").serialize(),
                    success: function (result) {
                        if (result.code == 100) {
                            layer.msg(result.msg, {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }

                        // 特种纸名片材料
                        var kindValueSelect;
                        // 吊牌 && !少数量
                        if (kind == 2 && couponKind != '少数量') {
                            // 600/800克
                            if ($('input[name="kind3Value"]:checked').val() != 3) {
                                // 自定义尺寸和常规尺寸
                                if ($('input[name="switchSize"]:checked').length == 0) {
                                    var size1 = $(".size1").val();
                                    size = $("#diySize").val();
                                    if (size1) {
                                        size = size + '厘米，' + size1
                                    }
                                    if ((size.split("*")[0] < 4 || size.split("*")[1] < 4)) {
                                        layer.msg("[ 吊牌600克 ] 尺寸小于 4cm 请单独报价", {offset: ['300px', '300px']}, function () {
                                        });
                                        return false;
                                    }
                                } else {
                                    size = $("#sizeTag option:checked").text();
                                }
                                number = $("#numberTag").val();
                                arr = []
                                arr = $('input[name="kind2Value"]:checked').val();
                            }
                        } else if (kind == 6 && kindValue4 == "6") {
                            size = $(".sizeSpecialCard").val();
                            if ((size.split("*")[0] < 5 || size.split("*")[1] < 4) && (size.split("*")[0] < 4 || size.split("*")[1] < 5)) {
                                layer.msg("【特种纸名片】尺寸不能小于5*4 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                            number = $(".numberSpecialCard").val();
                            arr = []
                            $("input:checkbox[name='craft']:checked").each(function (i) {
                                if (!$(this).is(':disabled')) {
                                    if ($(this).val() != "双面覆哑膜") {
                                        if ($(this).val() == "配弹力绳捆") {
                                            arr.push(tscolor + "配弹力绳(" + Math.ceil(data[0].count * 20 / 5000) + "捆)");
                                            szkun = true;
                                        } else if ($(this).val() == "配弹力绳") {
                                            arr.push(tscolor + "配弹力绳(15CM)");
                                        } else {
                                            arr.push($(this).val());
                                        }
                                    }
                                }
                            });
                            kindValueSelect = $(".kindValueSelect option:checked").text();
                        } else if (kind == 8) {
                            size = $("#sizeDoorList").val();
                            number = $("#numberDoorList").val();
                        } else if (kind == "婚礼报纸") {
                            if ((size.split("*")[0] < 10 || size.split("*")[1] < 14) && (size.split("*")[0] < 14 || size.split("*")[1] < 10)) {
                                layer.msg("婚礼报纸尺寸不能小于10*14 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            } else if ((size.split("*")[0] > 42 || size.split("*")[1] > 28.5) && (size.split("*")[0] > 28.5 || size.split("*")[1] > 42)) {
                                layer.msg("婚礼报纸尺寸不能超过42*28.5 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                        if (!kindValueSelect) {
                            kindValueSelect = ""
                        }
                        if (kindValueData[kindValue] == "300克铜版纸") {
                            if ((size.split("*")[0] > 100 || size.split("*")[1] > 65) && (size.split("*")[0] > 65 || size.split("*")[1] > 100)) {
                                layer.msg("[300克铜版纸]尺寸不能超过100*65 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                        if (kindData[kind] == "特价名片" && kindValueData[kindValue] == "300克铜版纸") {
                            if ((size.split("*")[0] < 3 || size.split("*")[1] < 3)) {
                                layer.msg("[特价名片]尺寸不能小于3 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                            if ((size.split("*")[0] > 9 || size.split("*")[1] > 5.4) && (size.split("*")[0] > 5.4 || size.split("*")[1] > 9)) {
                                layer.msg("[特价名片]尺寸不能超过9*5.4 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                        let awards = $("input[name='awards']").val();
                        if (couponKind == '少数量') {
                            awards = 1;
                        }
                        let same = '同款内容';
                        if (couponKind == '少数量' && number > 1) {
                            same = "不同内容"
                        }
                        if (!$("#nmq").is(':disabled') && nmq == '内部模切' && n_moq_num > 0) {
                            arr.push("内部模切:" + n_moq_num + "/" + n_moq_size)
                        }
                        var data = result.data.proList;
                        if (kind == 13 || kind == "刮刮卡") {
                            var span_result = kindData[kind] + " -" + kindValueData[kindValue] + "-" + kindValueSelect + "-" + size
                                + "厘米;刮刮膜: " + guaguaSize + "毫米- " + awards + "个奖项(" + same + ") \n" + "工艺 :" + arr + "\n";
                        } else if (kindData[kind] == "菜单") {//菜单
                            var cd_kind = "";
                            if ($("input[name='kindValue5']:checked").val() == 1) {
                                cd_kind = "300克铜版纸"
                            } else {
                                cd_kind = "pvc"
                            }
                            var span_result = kindData[kind] + "-" + cd_kind + "-" + $("#ui_menu_size").val() + "厘米\n"
                                + "工艺：" + $(".ui_cd_craft").val() + "\n";
                        } else if (kind == 10) {
                            var span_result = kindData[kind] + "-" + kindValueData[kindValue] + "-" + size + "厘米\n";
                            +"工艺：双面覆哑膜,裁切\n";
                        } else if (kind == 9) {
                            var span_result = kindData[kind] + "-" + kindValueData[kindValue] + "-" + $("#ui_shk_size").val() + "厘米\n";
                            +"工艺：不覆膜裁切\n";
                        } else if (kind == 11) {
                            var span_result = kindData[kind] + "-700克白卡纸-" + $("#ui_sdk_size").val() + "厘米\n";
                            var ui_gy = "工艺：双面覆哑膜,模切";
                            var gy = $("input[name='ui_sdk_craft']:checked").val();
                            if (gy != "无") {
                                if (gy == "丝带") {
                                    gy = $("input[name='sd']:checked").val() + gy;
                                }
                                ui_gy += "," + gy;
                            }
                            span_result += ui_gy + "\n";
                        } else if (kindData[kind] == "婚礼报纸") {
                            var span_result = kindData[kind] + "-157克铜版纸-" + size + "厘米\n";
                        } else if (kindData[kind] == "特种纸名片") {
                            var tzCraft = $(".ui_tzmp input[name='craft']:checked").val();
                            var span_result = kindData[kind] + "-" + $("input[name='kindValue6']:checked").val() + "-" + size + "厘米\n";
                            span_result += "工艺：不覆膜";
                            if (tzCraft != null) {
                                span_result += "," + tzCraft;
                            }
                            span_result += "\n";
                        } else if (kindData[kind] == "种子纸") {
                            let switchz3Size = $('input[name="switchz3Size"]:checked').val()
                            var span_result = kindData[kind] + " -" + size + "厘米-(" + same + ")"
                            if (($('input[name="z3type"]:checked').val() == 0 || $('input[name="z3type"]:checked').val() == 3) && !switchz3Size) {
                                span_result = span_result + " - " + $('input[name="3z_vice"]:checked')[0].title
                            }
                            if ($('input[name="z3type"]:checked').val() == 3) {
                                arr.push($("#kaichuang select option:selected").val());
                            }
                            span_result = span_result + " \n" + "工艺 :" + arr + ",不覆膜" + "\n";
                        } else {
                            if (couponKind == "少数量") {

                                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
                                + "厘米-(" + same + ") \n" + "工艺 :" + arr + "\n";
                        }

                        if (number > 1) {
                            if (couponKind == "少数量") {
                                let numberType = $("#desType option:selected").text();
                                span_result += "款数：" + number + "-" + numberType + "\n";
                            }

                            for (let i = 0; i < data.length; i++) {
                                let price_text = "";

                                if (szkun) {
                                    price_text = "," + Math.ceil(data[i].count * 20 / 5000) + "捆";
                                }
                                span_result += number + '款 各' + data[i].count + "个，共" + data[i].price + "元" + price_text + '\n'
                                data[i].number = number;
                            }
                        } else {
                            for (let i = 0; i < data.length; i++) {
                                let price_text = "";

                                if (szkun) {
                                    price_text = "," + Math.ceil(data[i].count * 20 / 5000) + "捆";
                                }
                                span_result += number + '款 ' + data[i].count + "个，共" + data[i].price + "元" + price_text + '\n'
                                data[i].number = number;
                            }
                        }
                        if (kind == "2") {
                            span_result += '配送吊绳\n'
                        }
                        span_result += '包邮，免费设计呢~（偏远地区需补邮费）';

                        if (window.parent.system_isGai) {
                            span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
                        }

                        if (window.parent.system_isPddPrice) {
                            span_result = span_result.replace("种子纸", "会发芽的纸");
                        }

                        addLog(span_result);
                        $("#span_result").val(span_result);

                        var switchCount = [];
                        $("input:checkbox[name='switchCount']:checked").each(function (i) {
                            if (!$(this).is(':disabled')) {
                                switchCount.push($(this).val());
                            }
                        });
                        var display = $("#noCraft").css("display");
                        if (kind == 8) {
                            count = $("#doorCount option:selected").val();
                        } else if (display != "none") {
                            if (switchCount[0] == "on") {
                                count = $("#count").val();
                            } else {
                                count = $("#selectCount option:selected").val();
                            }
                        }

                        var craft = "";
                        for (var i = 0; i < arr.length; i++) {
                            craft += arr[i];
                        }

                        getRemark(kindData[kind], size, count + "张", kindValueData[kindValue], number, craft, "");
                        //计算完自动复制文本
                        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>
</html>