<%@ 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>
    .ui_feb .layui-edge {
        right: 20px;
    }
</style>
<body>
<div class="big_box">
    <div class="left_div">
        <h1 class="h1">海报</h1> <span style="color:red;font-weight:700;"></span>
        <hr>
        <form class="layui-form">
            <input type="hidden" name="proTypeValue" id="proTypeValue" class="layui-input" value="17">
            <p>
                类目
            </p>
            <div class="kindValue">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="0" title="制度牌">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="1" title="室内写真">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="2" title="户外写真">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="3" title="布">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="4" title="展架">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="5" title="刻字">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="6" title="条幅">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="7" title="贡缎布">
                <input type="radio" lay-filter="kindValue" name="kindValue" value="8" title="锦旗">
                <!-- <input type="radio" lay-filter="kindValue" name="kindValue" value="9" title="彩旗"> -->
                <input type="radio" lay-filter="kindValue" name="kindValue" value="9" title="号牌布">
                <!--<input type="radio" lay-filter="kindValue" name="kindValue" value="10" title="帆布"> -->
                <input type="radio" lay-filter="kindValue" name="kindValue" value="12" title="宠物婚礼KT版">
            </div>
            <div class="qita productName">
                <p>
                    产品名称
                </p>
                <div class="layui-form-item">
                    <select name="kind2Value" id="kind2Value" lay-filter="kind2Value" class="select" lay-search>
                    </select>
                </div>
            </div>
            <div class="dengx-type" style="display: none">
                <p>
                    类型
                </p>
                <div class="kindValue">
                    <input type="radio" lay-filter="dengxType" name="dengxType" value="0" title="常规" checked>
                    <input type="radio" lay-filter="dengxType" name="dengxType" value="1" title="套餐">
                </div>
            </div>
            <div class="ui_jq_name" style="display:none;">
                <p>
                    产品名称
                </p>
                <div class="layui-form-item">
                    <select name="ui_qz_name" id="ui_qz_name" lay-filter="ui_qz_name" class="select" lay-search
                            onchange="showCq()">
                        <option value=""></option>
                        <option value="0">锦旗</option>
                        <option value="1">彩旗</option>
                    </select>
                </div>
            </div>
            <div class="size qita">
                <p>
                    尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
                    <span class="switchSizeCoupon" style="display: none">
                        <input type="checkbox" name="switchSize" lay-filter="switchSize" title="自定义尺寸"
                               lay-skin="primary">
                    </span>
                </p>
                <div class="layui-form-item diy-size" style="display: none">
                    <input type="text" placeholder="格式:长*宽" name="size" id="size" class="layui-input"
                           autocomplete="off">
                </div>
                <div class="layui-form-item normol-size">
                    <select name="select_size" lay-filter="select_size" class="select">
                        <option value="100*30">100*30</option>
                        <option value="100*45">100*45</option>
                        <option value="120*30">120*30</option>
                        <option value="120*65">120*65</option>
                        <option value="150*30">150*30</option>
                        <option value="150*65">150*65</option>
                        <option value="180*30">180*30</option>
                        <option value="180*65">180*65</option>
                    </select>
                </div>
            </div>
            <div class="qita">
                <p>
                    数量(个)<span style="font-size:14px;color:red">一张起做</span>
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="请输入整数" autocomplete="off" name="count" class="layui-input">
                </div>
            </div>

            <!-- 刻字 -->
            <div class="kezi" style="display:none">
                <p>
                    尺寸(CM/厘米) <span style="font-size:14px;color:red">输入单个字较宽的一边尺寸</span>
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="输入单个字较宽的一边尺寸（厘米）" name="size" id="keziSize" class="layui-input"
                           autocomplete="off">
                </div>
                <p>
                    数量(个)<span style="font-size:14px;color:red">总数量（有几个字输入几）</span>
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="总数量（有几个字输入几）" autocomplete="off" name="count" id="count2"
                           class="layui-input">
                </div>
            </div>

            <!-- 布 -->
            <div class="ui_zb" style="display:none">
                <p>
                    材质
                </p>
                <div class="layui-form-item">
                    <select name="zbKind" id="zbKind" class="select">
                        <option value=""></option>
                        <option value="蓝底">蓝底</option>
                        <option value="白底">白底</option>
                        <option value="红底">红底</option>
                    </select>
                </div>
            </div>
            <!-- 条幅 -->
            <div class="banner" style="display:none">
                <p>
                    材质
                </p>
                <div class="layui-form-item">
                    <select name="kind2Value" lay-filter="kind2Value" id="bannerKind" class="select">
                        <option value=""></option>
                        <option value="旗帜布" selected>旗帜布</option>
                        <%--                        <option value="10">旗帜布</option>--%>
                        <!-- <option value="红底条幅">红底条幅</option> -->
                    </select>
                </div>
                <p>
                    宽幅
                </p>
                <div class="layui-form-item fixedSizeCoupon">
                    <select name="width" id="width" class="select">
                        <option value="50">50cm宽幅</option>
                        <option value="60">60cm宽幅</option>
                        <option value="70">70cm宽幅</option>
                        <option value="80" class="redNo">80cm宽幅</option>
                        <option value="90">90cm宽幅</option>
                    </select>
                </div>
                <span class="diySizeCoupon" style="display:none">
						<input type="text" name="width" id="diySizeCoupon" placeholder="请输入宽幅" class="layui-input"
                               autocomplete="off">
					</span>
                <input type="checkbox" name="ui_tf_size" class="ui_tf_size" lay-filter="ui_tf_size" title="自定义尺寸"
                       lay-skin="primary">
                <p>
                    尺寸(CM/厘米) <span style="font-size:14px;color:red">条幅长度（输入长度）</span>
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="请输入条幅长度（厘米）" name="size" id="bannerSize" class="layui-input"
                           autocomplete="off">
                </div>
                <p>
                    数量(条)
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="请输入整数" autocomplete="off" name="count" class="layui-input"
                           id="count3">
                </div>
            </div>

            <!-- 贡缎布 -->
            <div class="satinCloth" style="display:none">
                <p>
                    尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="格式:长*宽" name="size" id="stinClothSize" class="layui-input"
                           autocomplete="off">
                </div>
                <p>
                    数量(张)
                </p>
                <div class="layui-form-item">
                    <input type="text" placeholder="请输入整数" autocomplete="off" name="count" class="layui-input"
                           id="count4">
                </div>
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <select name="kind2Value" lay-filter="kind2Value" id="satinClothKind" class="select" lay-search>
                        <option value="0">左缝筒</option>
                        <option value="1">右缝筒</option>
                        <option value="2">上缝筒</option>
                        <option value="3">左右缝筒</option>
                        <option value="4">上下缝筒</option>
                        <option value="5">上缝筒左缝吊耳</option>
                        <option value="6">四角吊耳</option>
                    </select>
                </div>
            </div>
            <p>
                款数
            </p>
            <div class="layui-form-item">
                <input type="text" placeholder="请输入整数" autocomplete="off" name="number" id="number" value="1"
                       class="layui-input" lay-verify="number">
            </div>
            <p>
                客户旺旺
            </p>
            <div class="layui-form-item">
                <input type="text" placeholder="请输入客户旺旺号" autocomplete="off" name="wangwang" id="wangwang"
                       class="layui-input">
            </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>
            <!-- 制度牌 -->
            <div class="zhiDuPai" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="checkbox" name="craft" lay-filter="switch" class="pvcHide tang" value="模切" title="模切">
                    <input type="checkbox" name="craft" lay-filter="switch" class="pvcHide tang" value="打孔" title="打孔">
                </div>
                <div class="layui-form-item" id="zhijia">
                    配件：
                    <input type="checkbox" name="craft" lay-filter="switch" value="铁架支架" title="铁架支架">
                    <div class="layui-inline zheye-lay" style="width: 50px;display: none">
                        <input type="text" value="1" name="zheye" class="layui-input">
                    </div>
                    <input type="checkbox" name="craft" lay-filter="switch" value="伸缩支架" title="伸缩支架">
                    <div class="layui-inline yaheng-lay" style="width: 50px;display: none">
                        <input type="text" value="1" name="yaheng" class="layui-input">
                    </div>
                </div>
            </div>
            <!-- 条幅 -->
            <div class="banner" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftTiao" value="缝筒" title="缝筒" checked="checked">
                    <input type="radio" name="craftTiao" value="打扣" title="打扣">
                    <input type="radio" name="craftTiao" value="四角吊耳" title="四角吊耳">
                    <input type="radio" name="craftTiao" value="净裁" title="净裁">
                    <input type="radio" name="craftTiao" value="双喷" title="双喷">
                    <!-- <input type="checkbox" name="ui_tf_qg" value="旗杆" title="旗杆" lay-filter="ui_tf_qg"> -->
                    <div class="layui-inline edge ui_tf_count" style="width:60px;display:none">
                        <input type="number" placeholder="请输入旗杆数" name="zheye"/>
                    </div>

                </div>
            </div>
            <!-- 旗帜布 -->
            <div class="qiZhiBu" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftqz" value="缝筒" title="缝筒" checked="checked">
                    <input type="radio" name="craftqz" value="打扣" title="打扣">
                    <input type="radio" name="craftqz" value="四角吊耳" title="四角吊耳">
                    <input type="radio" name="craftqz" value="净裁" title="净裁">
                    <input type="checkbox" name="craftBu" value="双喷" title="双喷">
                    <input type="checkbox" name="ui_qzb_qg" value="旗杆" title="旗杆" lay-filter="ui_qzb_qg">
                    <div class="layui-inline edge ui_qzb_count" style="width:60px;display:none">
                        <input type="number" placeholder="请输入旗杆数" name="zheye"/>
                    </div>

                </div>
            </div>
            <!-- 双喷布 -->
            <div class="doubleBu" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftBu" value="车边" title="车边" checked="checked">
                    <input type="radio" name="craftBu" value="打扣" title="打扣">
                    <input type="radio" name="craftBu" value="留白" title="留白">
                    <input type="radio" name="craftBu" value="净裁" title="净裁">
                    <input type="radio" name="craftBu" value="挂轴" title="挂轴">
                </div>
            </div>
            <!-- 桌布 -->
            <div class="ui_zb" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftZb" value="" title="无" checked>
                    <input type="radio" name="craftZb" value="花边" title="花边">
                    <input type="radio" name="craftZb" value="直角" title="直角">
                </div>
            </div>
            <!-- 喷绘布 -->
            <div class="penHuiBu" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftPenHuiBu" value="留白内打孔" title="留白内打孔" checked>
                    <input type="radio" name="craftPenHuiBu" value="留白外打孔" title="留白外打孔">
                    <input type="radio" name="craftPenHuiBu" value="不留白打孔" title="不留白打孔">
                    <input type="radio" name="craftPenHuiBu" value="留白净裁" title="留白净裁">
                    <input type="radio" name="craftPenHuiBu" value="净裁" title="净裁">
                </div>
            </div>
            <!-- 写真布/油画布/灯片 -->
            <div class="xieZhenBu youHuaBu dengPian" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftJingcai" value="净裁" title="净裁" checked>
                </div>
            </div>
            <!-- PP纸/直喷PVC -->
            <div class="PPZhi zhiPenPVC" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftPPZhi" value="净裁" title="净裁" checked>
                    <input type="radio" name="craftPPZhi" value="打孔" title="打孔">
                </div>
            </div>
            <!-- 静电贴 -->
            <div class="zdt_xiezhen" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    裁切工艺：
                    <input type="radio" value="模切" title="模切" checked>
                </div>
                <div class="layui-form-item zdt_yin">
                    印面：
                    <input type="radio" name="yinmian" value="单面印刷" title="单面印刷" checked>
                    <input type="radio" name="yinmian" value="双面印刷" title="双面印刷">
                </div>
            </div>
            <!-- 软膜 -->
            <div class="ruanMo" style="display:none">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="radio" name="craftRuanMo" value="净裁" title="净裁" checked>
                    <input type="radio" name="craftRuanMo" value="车胶边" title="车胶边">
                </div>
            </div>
            <div class="craftGtt" style="display:none;">
                <p>材质</p>
                <div class="layui-form-item">
                    <input type="radio" name="craftGtt" value="透明" title="透明" checked>
                    <input type="radio" name="craftGtt" value="打白" title="打白">
                </div>
            </div>
            <!-- 贡缎布 -->
            <div class="ui_gdb" style="display:none">
                <p>
                    工艺
                </p>
                <input type="checkbox" name="ui_gdb_qg" value="旗杆" title="旗杆" lay-filter="ui_gdb_qg">
                <div class="layui-inline edge ui_gdb_count" style="width:60px;display:none">
                    <input type="number" placeholder="请输入旗杆数" name="yaheng"/>
                </div>
            </div>
            <!-- 锦旗 -->
            <div class="ui_jq" style="display:none">
                <p>
                    尺寸(cm/厘米)
                </p>
                <div class="layui-form-item">
                    <select name="size" id="ui_jq_size" class="select" lay-search>
                        <option value="60*90">60*90</option>
                        <option value="70*110">70*110</option>
                        <option value="80*120">80*120</option>
                    </select>
                </div>
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <select name="kind3Value" id="ui_jq_gy" lay-filter="kind3Value" class="select" lay-search>
                        <option value="小龙须黄字">小龙须黄字</option>
                        <option value="小龙须3d镀金">小龙须3d镀金</option>
                        <option value="大龙须黄字">大龙须黄字</option>
                        <option value="大龙须3d镀金">大龙须3d镀金</option>
                    </select>
                </div>
            </div>
            <!-- 彩旗  -->
            <div class="ui_cq" style="display:none">
                <p>
                    尺寸(cm/毫米)
                </p>
                <div class="layui-form-item">
                    <select name="size" id="ui_cq_size" class="select" lay-search>
                        <option value="40*80">40*80</option>
                        <option value="60*90">60*90</option>
                        <option value="70*120">70*120</option>
                        <option value="80*150">80*150</option>
                    </select>
                </div>
            </div>
            <!-- 号码布 -->
            <div class="ui_hmp" style="display:none">
                <p>
                    尺寸(mm/毫米)
                </p>
                <div class="layui-form-item">
                    <select name="size" id="ui_hmb_size" class="select" lay-search>
                        <option value="240*200">240*200</option>
                        <option value="200*140">200*140</option>
                        <option value="120*80">120*80</option>
                    </select>
                </div>
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <select name="kind3Value" id="ui_hmb_gy" lay-filter="kind3Value" class="select" lay-search>
                        <option value="春亚布">春亚布</option>
                        <option value="贡缎布">贡缎布</option>
                    </select>
                </div>
            </div>
            <!-- 帆布 -->
            <div class="ui_fb" style="display:none">
                <p>
                    材质
                </p>
                <div class="layui-form-item">
                    <select name="ui_fb_name" id="ui_fb_name" lay-filter="ui_fb_name" class="select" lay-search>
                        <option value="1">露营布</option>
                        <option value="2">摆摊布</option>
                    </select>
                </div>
                <p>
                    尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽 </span>
                    <input type="checkbox" name="switchSize" class="switchSizeCoupon" lay-filter="switchSizeCoupon"
                           title="自定义尺寸" lay-skin="primary">
                </p>
                <div class="layui-form-item ui_size">
                    <select name="size" id="ui_size" class="select">
                        <option value="100*45">100*45</option>
                    </select>
                </div>
                <span class="ui_zdy_size" style="display:none">
						<input type="text" id="ui_zdy_size" placeholder="格式:长*宽" class="layui-input" autocomplete="off">
					</span>
                <p>
                    工艺<span style="font-size:14px;color:red">木棍长度40cm</span>
                </p>
                <div class="layui-form-item">
                    <input type="checkbox" name="craft" value="封边" title="封边" lay-filter="craft">
                    <div class="layui-inline ui_feb" style="width:100px;display:none">
                        <select name="fb" class="select fb" lay-filter="fb">
                            <option value="1" selected>上封边</option>
                            <option value="2">下封边</option>
                            <option value="3">左封边</option>
                            <option value="4">右封边</option>
                            <option value="5">上下封边</option>
                            <option value="6">左右封边</option>
                        </select>
                    </div>
                    <input type="checkbox" name="craft" value="四角打孔" title="四角打孔" lay-filter="craft">
                    <input type="checkbox" name="craft" value="净裁" title="净裁" lay-filter="craft">
                    <input type="checkbox" name="craft" value="吊耳" title="吊耳" lay-filter="craft">
                    <input type="checkbox" name="craft" value="缝兜" title="缝兜" lay-filter="craft">
                    <input type="checkbox" name="craft" value="木棍" title="木棍" lay-filter="craft">
                </div>
            </div>
            <div class="dengxiang">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="checkbox" name="craft" lay-filter="switch" value="裁切" title="裁切" checked>
                </div>
            </div>
            <div class="guaban">
                <p>
                    工艺
                </p>
                <div class="layui-form-item">
                    <input type="checkbox" name="craft" lay-filter="switch" value="刮板" title="刮板">
                    <div class="layui-inline pcount-lay" style="width: 50px;display: none">
                        <input type="text" value="1" name="pcount" class="layui-input">
                    </div>
                </div>
            </div>
            <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>
            <hr>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</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="11" cols="75" id="span_result" readonly="readonly"></textarea>
                <%@include file="../acountExpressFee.jsp" %>
            </div>
            <!--<h2>下单备注-<button type="button" class="layui-btn layui-btn-primary layui-btn-sm copyResult" onclick="copyBz()">点击复制</button></h2>
            <div>
                <textarea rows="5" cols="75" id="bz_result" readonly="readonly"></textarea>
            </div>-->
            <!-- <div>
                <p style="color:red;font-weight:normal;font-size:23px;">UV高透贴:<br>郑州：2天发货;<br>龙岩：2-3天发货;</p>
                <p style="color:red;font-weight:normal;font-size:23px;">其他产品:<br>17点前上传系统正常隔天发货;</p>
            </div> -->
            <div>
                <table class="layui-hide" id="priceTable" lay-filter="priceTable"></table>
            </div>
        </form>
    </div>
    <div class="right_div" style="margin-left:50px;">
        <div class="layui-carousel" id="test1">
            <div carousel-item id="carousel"></div>
            <br>
            <div id="remark" style="font-size:20px;color:red"></div>
        </div>
    </div>
</div>
</body>
<%@include file="/views/copyResult.jsp" %>
<script>
    //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;

        //建造实例
        ins = carousel.render({});

        var kind;
        $("#number").on("input", function (e) {
            showDes()
        });

        function showDes() {
            var number = $("#number").val();
            let number_kindValue = $("input[name='kindValue']:checked").val();
            let number_kind2Value = $("select[name='kind2Value'] option:selected").val();
            if (number > 1 && ((number_kindValue == 0 && number_kind2Value == 0) || (number_kindValue == 1 && (number_kind2Value == 3 || number_kind2Value == 8 || number_kind2Value == 15)) || number_kindValue == 2)) {
                $("#ui_des").show();
            } else {
                $("#ui_des").hide();
            }
        }

        form.on('checkbox(switch)', function (data) {
            if (data.value == "铁架支架") {
                if (data.elem.checked) {
                    $(".zheye-lay").show();
                } else {
                    $(".zheye-lay").hide();
                }
            }
            if (data.value == "伸缩支架") {
                if (data.elem.checked) {
                    $(".yaheng-lay").show();
                } else {
                    $(".yaheng-lay").hide();
                }
            }
            if (data.value == "刮板") {
                if (data.elem.checked) {
                    $(".pcount-lay").show();
                } else {
                    $(".pcount-lay").hide();
                }
            }

        })
        // 根据类目获取产品名称
        form.on('radio(kindValue)', function (data) {
            kind = data.value;
            $(".zdt_xiezhen").hide();
            showDes()
            // 制度牌
            $(".zhiDuPai").hide();
            $(".zhiDuPai").find(":input").attr("disabled", true);

            //室内写真
            $(".PPZhi").hide();
            $(".PPZhi").find(":input").attr("disabled", true);
            $(".zhiPenPVC").hide();
            $(".zhiPenPVC").find(":input").attr("disabled", true);
            $(".ruanMo").hide();
            $(".ruanMo").find(":input").attr("disabled", true);

            //布
            $(".penHuiBu").hide();
            $(".penHuiBu").find(":input").attr("disabled", true);
            $(".xieZhenBu").hide();
            $(".xieZhenBu").find(":input").attr("disabled", true);
            $(".doubleBu").hide();
            $(".doubleBu").find(":input").attr("disabled", true);
            $(".youHuaBu").hide();
            $(".youHuaBu").find(":input").attr("disabled", true);
            $(".qiZhiBu").hide();
            $(".qiZhiBu").find(":input").attr("disabled", true);
            $(".ui_zb").hide();
            $(".ui_zb").find(":input").attr("disabled", true);
            $(".dengxiang").hide();
            $(".dengxiang").find(":input").attr("disabled", true);
            $(".guaban").hide();
            $(".guaban").find(":input").attr("disabled", true);
            // 制度牌
            if (kind == 0) {
                // !背胶单裱3mmPVC(户内高清）
                if (kind2 != 12) {
                    $(".zhiDuPai").show();
                    $(".zhiDuPai").find(":input").attr("disabled", false);
                }
            }
            // 室内写真
            if (kind == 1) {
                // PP纸
                if (kind2 == 3) {
                    $(".PPZhi").show();
                    $(".PPZhi").find(":input").attr("disabled", false);
                } else if (kind2 == 5) { // 直喷PVC
                    $(".PPZhi").show();
                    $(".PPZhi").find(":input").attr("disabled", false);
                } else if (kind2 == 14) { // 软膜
                    $(".ruanMo").show();
                    $(".ruanMo").find(":input").attr("disabled", false);
                }
            }
            // 户外写真
            if (kind == 2) {
                // 灯片
                if (kind2 == 5) {
                    $(".dengPian").show();
                    $(".dengPian").find(":input").attr("disabled", false);
                }
                $(".guaban").show();
                $(".guaban").find(":input").attr("disabled", false);
            }
            // 布
            if (kind == 3) {
                // 喷绘布
                if (kind2 == 1) {
                    $(".penHuiBu").show();
                    $(".penHuiBu").find(":input").attr("disabled", false);
                } else if (kind2 == 6) { // 写真布
                    $(".xieZhenBu").show();
                    $(".xieZhenBu").find(":input").attr("disabled", false);
                } else if (kind2 == 7) { // 双喷布
                    $(".doubleBu").show();
                    $(".doubleBu").find(":input").attr("disabled", false);
                } else if (kind2 == 8) { // 油画布
                    $(".youHuaBu").show();
                    $(".youHuaBu").find(":input").attr("disabled", false);
                } else if (kind2 == 10) { // 旗帜布
                    $(".qiZhiBu").show();
                    $(".qiZhiBu").find(":input").attr("disabled", false);
                } else if (kind2 == 13) {//桌布
                    $(".ui_zb").show();
                    $(".ui_zb").find(":input").attr("disabled", false);
                }
            }

            // 切换类目的时候清空轮播图
            if (data.value == 5 || data.value == 6 || data.value == 7 || data.value == 8 || data.value == 9 || data.value == 10 || data.value == 12) {
                // 轮播图
                var html = " ";
                var remark = " ";
                // 清空轮播图
                $("#carousel").empty();
                $("#remark").empty();
                var proTypeValue = "";
                if (data.value != 5 || data.value != 7) {
                    proTypeValue = '17';
                } else {
                    proTypeValue = $("#proTypeValue").val();
                }
                $.ajax({
                    url: "${pageContext.request.contextPath}/getImgs",
                    type: "GET",
                    data: {
                        proTypeValue: proTypeValue,
                        kindValue: $('input[name="kindValue"]:checked').val()
                    },
                    //dataType : "json",
                    success: function (result) {
                        for (let i = 0; i < result.length; i++) {
                            // 只留一个remark
                            remark = "";
                            html += '<div><img style="width:' + result[0].imgWidth + 'px;object-fit: contain" src="' + result[i].imgUrl + '" class="imgUrl"></div>';
                            remark += '<div><span>' + result[i].remark + '<span/></div>';
                        }
                        $("#carousel").append(html);
                        // 如果没有说明，就不显示null
                        if (remark.indexOf("null") < 0) {
                            $("#remark").append(remark);
                        }

                        // 如果没有轮播图就隐藏
                        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 == 5) {
                    $(".kezi").show();
                    $(".kezi").find(":input").attr("disabled", false);
                    $(".qita").hide();
                    $(".qita").find(":input").attr("disabled", true);
                }
            } else {
                $(".qita").show();
                $(".qita").find(":input").attr("disabled", false);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
            }
            // 展架、刻字的时候隐藏尺寸
            if (data.value != 4 && data.value != 5 && data.value != 8 && data.value != 9) {
                $(".size").show();
                $(".size").find(":input").attr("disabled", false);
            } else {
                $(".size").hide();
                $(".size").find(":input").attr("disabled", true);
            }
            $(".banner").hide();
            $(".banner").find(":input").attr("disabled", true);
            $(".ui_jq").hide();
            $(".ui_jq").find(":input").attr("disabled", true);
            $(".ui_cq").hide();
            $(".ui_cq").find(":input").attr("disabled", true);
            if (data.value == 6) {//条幅
                $(".productName").show();
                $(".banner").show();
                $(".banner").find(":input").attr("disabled", false);
                $(".qita").hide();
                $(".qita").find(":input").attr("disabled", true);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
                $(".satinCloth").hide();
                $(".satinCloth").find(":input").attr("disabled", true);
                $(".ui_jq").hide();
                $(".ui_jq").find(":input").attr("disabled", true);
                $(".ui_hmp").hide();
                $(".ui_hmp").find(":input").attr("disabled", true);
                $(".ui_jq_name").hide();
                $(".ui_fb").hide();
                $(".ui_fb").find(":input").attr("disabled", true);
                $("#proTypeValue").val("17");
                $(".ui_gdb").hide();
                $(".ui_gdb").find(":input").attr("disabled", true);
                $('.ui_tf_size').val("off");
                $('.ui_tf_size').prop("checked", false);
                $(".diySizeCoupon").hide();
                $(".diySizeCoupon").find(":input").attr("disabled", true);
                $(".fixedSizeCoupon").show();
                $(".fixedSizeCoupon").find(":input").attr("disabled", false);
            } else if (data.value == 7) {//贡缎布
                $(".satinCloth").show();
                $(".satinCloth").find(":input").attr("disabled", false);
                $(".ui_gdb").show();
                $(".ui_gdb").find(":input").attr("disabled", false);
                $(".qita").hide();
                $(".qita").find(":input").attr("disabled", true);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
                $(".banner").hide();
                $(".banner").find(":input").attr("disabled", true);
                $(".ui_jq").hide();
                $(".ui_jq").find(":input").attr("disabled", true);
                $(".ui_hmp").hide();
                $(".ui_hmp").find(":input").attr("disabled", true);
                $(".ui_jq_name").hide();
                $(".ui_fb").hide();
                $(".ui_fb").find(":input").attr("disabled", true);
                $("#proTypeValue").val("17");
                $(".productName").show();
            } else if (data.value == 8) {//锦旗
                $(".qita").show();
                $("input[name='size']").val("");
                $(".size").hide();
                $("input[name='count']").attr("disabled", false);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
                $(".ui_gdb").hide();
                $(".ui_gdb").find(":input").attr("disabled", true);
                $(".productName").hide();
                $(".banner").hide();
                $(".banner").find(":input").attr("disabled", true);
                $(".satinCloth").hide();
                $(".satinCloth").find(":input").attr("disabled", true);
                $(".ui_hmp").hide();
                $(".ui_hmp").find(":input").attr("disabled", true);
                $(".ui_cq").hide();
                $(".ui_cq").find(":input").attr("disabled", true);
                $(".ui_fb").hide();
                $(".ui_fb").find(":input").attr("disabled", true);
                $(".ui_jq_name").show();
                $(".ui_jq").show();
                $(".ui_jq").find(":input").attr("disabled", false);
                $("#proTypeValue").val("锦旗");
            } else if (data.value == 9) {//号码布
                $(".productName").hide();
                $(".banner").hide();
                $("input[name='size']").val("");
                $(".size").hide();
                $("input[name='count']").attr("disabled", false);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
                $(".banner").find(":input").attr("disabled", true);
                $(".satinCloth").hide();
                $(".satinCloth").find(":input").attr("disabled", true);
                $(".productName").hide();
                $(".ui_jq").hide();
                $(".ui_jq").find(":input").attr("disabled", true);
                $(".ui_cq").hide();
                $(".ui_cq").find(":input").attr("disabled", true);
                $(".ui_jq_name").hide();
                $(".ui_fb").hide();
                $(".ui_fb").find(":input").attr("disabled", true);
                $(".ui_hmp").show();
                $(".ui_hmp").find(":input").attr("disabled", false);
                $(".ui_gdb").hide();
                $(".ui_gdb").find(":input").attr("disabled", true);
                $("#proTypeValue").val("号码布");
            } else if (data.value == 10) {//帆布
                $(".qita").show();
                $(".qita").find(":input").attr("disabled", false);
                $(".kezi").hide();
                $(".kezi").find(":input").attr("disabled", true);
                $(".productName").hide();
                $(".banner").hide();
                $(".banner").find(":input").attr("disabled", true);
                $(".satinCloth").hide();
                $(".satinCloth").find(":input").attr("disabled", true);
                $(".ui_jq").hide();
                $(".ui_jq").find(":input").attr("disabled", true);
                $(".ui_cq").hide();
                $(".ui_cq").find(":input").attr("disabled", true);
                $(".ui_jq_name").hide();
                $(".ui_hmp").hide();
                $(".ui_hmp").find(":input").attr("disabled", true);
                $(".ui_gdb").hide();
                $(".ui_gdb").find(":input").attr("disabled", true);
                $("input[name='size']").val("");
                $(".size").hide();
                $("input[name='size']").val("");
                $(".ui_zdy_size").find(":input").attr("disabled", false);
                /* $(".size").show();
                $(".size").find(":input").attr("disabled", false); */
                $(".ui_fb").show();
                $(".ui_fb").find(":input").attr("disabled", false);
                $("#proTypeValue").val("帆布");
            } else {
                $(".productName").show();
                $(".banner").hide();
                $(".banner").find(":input").attr("disabled", true);
                $(".satinCloth").hide();
                $(".satinCloth").find(":input").attr("disabled", true);
                $(".ui_jq").hide();
                $(".ui_jq").find(":input").attr("disabled", true);
                $(".ui_cq").hide();
                $(".ui_cq").find(":input").attr("disabled", true);
                $(".ui_jq_name").hide();
                $(".ui_hmp").hide();
                $(".ui_hmp").find(":input").attr("disabled", true);
                $(".ui_gdb").hide();
                $(".ui_gdb").find(":input").attr("disabled", true);
                $(".ui_fb").hide();
                $(".ui_fb").find(":input").attr("disabled", true);
                $("#proTypeValue").val("17");
            }
            $(".dengx-type").hide()
            $(".switchSizeCoupon").hide()
            $("input[name='size']").val('');
            $(".diy-size").show();
            $(".normol-size").hide();


            if (![5, 6, 8, 9, 10, 11].includes(data.value)) {
                // 切换按钮清空下拉框(防止一直重复加)
                $("#kind2Value").empty();
                // 下拉框第一列添加空的option
                $('#kind2Value').append(new Option("", ""));
                form.render("select");
                $.ajax({
                    url: "${pageContext.request.contextPath}/getKind2sByKind",
                    type: "GET",
                    dataType: "json",
                    data: {
                        proTypeValue: 17,
                        kindValue: data.value
                    },
                    success: function (result) {
                        $.each(result, function (index, item) {
                            if (data.value == 1) {
                                if (index == '16' || index == '17' || index == '18') {
                                    if ((${ sessionScope.USER_SESSION.role.contains('1010')})) {
                                        $('#kind2Value').append(new Option(item, index));
                                    }
                                } else {
                                    $('#kind2Value').append(new Option(item, index));
                                }
                            } else {
                                $('#kind2Value').append(new Option(item, index));//往下拉菜单里添加元素
                            }
                        });
                        layui.form.render("select");
                    }
                });
            }
            if (12 == data.value) {
                $("#kind2Value").empty();
                $('#kind2Value').append(new Option("KT版", 0));
                $(".zhiDuPai").show();
                $(".zhiDuPai").find(":input").attr("disabled", false);
            }
            form.render();
        });

        form.on('radio(dengxType)', function (data) {
            $(".switchSizeCoupon").hide();
            $(".normol-size").show();
            $(".diy-size").hide();
            if (data.value == 0) {
                $(".switchSizeCoupon").show();
            }
            $("input[name='switchSize']").prop("checked", false);
            setSelectOption()
            form.render();
        });
        form.on('checkbox(switchSize)', function (data) {
            if (data.elem.checked) {
                $(".diy-size").show();
                $(".normol-size").hide();
            } else {
                $(".normol-size").show();
                $(".diy-size").hide();
            }
            form.render();
        });
        form.on('select(select_size)', function (data) {
            $("input[name='size']").val(data.value);
            form.render();
        });

        function setSelectOption() {
            let value = $("input[name='dengxType']:checked").val();
            let kindValue = $("input[name='kindValue']:checked").val();
            let html = `<option value="100*30" selected>100*30</option>
                        <option value="100*45">100*45</option>
                        <option value="120*30">120*30</option>
                        <option value="120*65">120*65</option>
                        <option value="150*30">150*30</option>
                        <option value="150*65">150*65</option>
                        <option value="180*30">180*30</option>
                        <option value="180*65">180*65</option>`;
            if (kindValue != 3) {
                $("input[name='size']").val('100*30');
            }
            if (value == 1) {
                html = `<option value="100*30,100*45" selected>100*30,100*45</option>
                        <option value="120*30,120*65">120*30,120*65</option>
                        <option value="150*30,150*65">150*30,150*65</option>
                        <option value="180*30,180*65">180*30,180*65</option>`;
                $("input[name='size']").val('100*30,100*45');
            }
            $("select[name='select_size']").empty().append(html);
            form.render();
        }

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

        form.on('checkbox(craft)', function (data) {
            if ($("input[name='craft']:checked").val() == "封边") {
                $(".ui_feb").show();
                $(".ui_feb select").attr("disabled", false);
            } else {
                $(".ui_feb").hide();
                $(".ui_feb select").attr("disabled", true);
            }
            form.render();
        });

        form.on('checkbox(ui_tf_qg)', function (data) {
            if ($("input[name='ui_tf_qg']:checked").val() == "旗杆") {
                $(".ui_tf_count").show();
                $(".ui_tf_count input").attr("disabled", false);
            } else {
                $(".ui_tf_count").hide();
                $(".ui_tf_count input").attr("disabled", true);
            }
            form.render();
        });

        form.on('checkbox(ui_qzb_qg)', function (data) {
            if ($("input[name='ui_qzb_qg']:checked").val() == "旗杆") {
                $(".ui_qzb_count").show();
                $(".ui_qzb_count input").attr("disabled", false);
            } else {
                $(".ui_qzb_count").hide();
                $(".ui_qzb_count input").attr("disabled", true);
            }
            form.render();
        });

        form.on('checkbox(ui_gdb_qg)', function (data) {
            if ($("input[name='ui_gdb_qg']:checked").val() == "旗杆") {
                $(".ui_gdb_count").show();
                $(".ui_gdb_count input").attr("disabled", false);
            } else {
                $(".ui_gdb_count").hide();
                $(".ui_gdb_count input").attr("disabled", true);
            }
            form.render();
        });

        var kind2;
        // 根据产品名称展示工艺
        form.on('select(kind2Value)', function (data) {
            showDes()
            if (data.value == '红底条幅') {
                $("#width").find("option[value = 50]").attr("selected", true);
                $(".redNo").attr("disabled", true);
            } else if (data.value == '彩色条幅') {
                $(".redNo").attr("disabled", false);
                $("#width").find("option[value = 50]").attr("selected", false);
            }

            let kindValue = $("input[name='kindValue']:checked").val();
            $(".dengx-type").hide()
            $(".switchSizeCoupon").hide()
            $("input[name='size']").val('');
            $(".diy-size").show();
            $(".normol-size").hide();
            $(".dengxiang").hide();
            $(".dengxiang").find(":input").attr("disabled", true);
            $(".guaban").hide();
            $(".guaban").find(":input").attr("disabled", true);
            if (kindValue == 2) {
                $(".guaban").show();
                $(".guaban").find(":input").attr("disabled", false);
            }
            if (kindValue == 2 && data.value == 24) {
                // 下拉框第一列添加空的option
                $(".dengx-type").show()
                $(".dengx-type input[name='dengxType']:first").click()
                $(".switchSizeCoupon").show();
                $(".diy-size").hide();
                $(".normol-size").show();
                $(".dengxiang").show();
                $(".dengxiang").find(":input").attr("disabled", false);
                $(".guaban p").hide();
            }
            $(".zdt_xiezhen").hide();
            if (kindValue == 1 && data.value == 8) {
                $(".zdt_xiezhen").show();
            }
            $("#zhijia").hide();
            $("#zhijia").find(":input").attr("disabled", true);
            if (kindValue == 0 && data.value == "0") {
                $("#zhijia").show();
                $("#zhijia").find(":input").attr("disabled", false);
            }
            form.render();
            setSelectOption()

            // 根据选择的产品出轮播图
            // 轮播图
            var html = " ";
            var remark = " ";
            // 清空轮播图
            $("#carousel").empty();
            $("#remark").empty();
            $.ajax({
                url: "${pageContext.request.contextPath}/getImgs",
                type: "GET",
                data: {
                    proTypeValue: $("#proTypeValue").val(),
                    kindValue: $('input[name="kindValue"]:checked').val(),
                    kind2Value: $("#kind2Value option:checked").val()
                },
                //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 + '" class="imgUrl"></div>';
                        remark += '<div><span>' + result[i].remark + '<span/></div>';
                    }
                    $("#carousel").append(html);
                    // 如果没有说明，就不显示null
                    if (remark.indexOf("null") < 0) {
                        $("#remark").append(remark);
                    }
                    //console.log(remark);
                    // 如果没有轮播图就隐藏
                    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
                        });
                    }
                }
            });
            /*


            kind2 = data.value;
            // 制度牌
            $(".zhiDuPai").hide();
            $(".zhiDuPai").find(":input").attr("disabled", true);

            //室内写真
            $(".PPZhi").hide();
            $(".PPZhi").find(":input").attr("disabled", true);
            $(".zhiPenPVC").hide();
            $(".zhiPenPVC").find(":input").attr("disabled", true);
            $(".ruanMo").hide();
            $(".ruanMo").find(":input").attr("disabled", true);

            //布
            $(".penHuiBu").hide();
            $(".penHuiBu").find(":input").attr("disabled", true);
            $(".xieZhenBu").hide();
            $(".xieZhenBu").find(":input").attr("disabled", true);
            $(".doubleBu").hide();
            $(".doubleBu").find(":input").attr("disabled", true);
            $(".youHuaBu").hide();
            $(".youHuaBu").find(":input").attr("disabled", true);
            $(".qiZhiBu").hide();
            $(".qiZhiBu").find(":input").attr("disabled", true);
            $(".ui_zb").hide();
            $(".ui_zb").find(":input").attr("disabled", true);

            // 制度牌
            if(kind == 0){
                // !背胶单裱3mmPVC(户内高清）
                if(kind2 != 12){
                    $(".zhiDuPai").show();
                    $(".zhiDuPai").find(":input").attr("disabled", false);
                }
            }
            // 室内写真
            if(kind == 1){
                // PP纸
                if(kind2 == 3){
                    $(".PPZhi").show();
                    $(".PPZhi").find(":input").attr("disabled", false);
                    $(".craftGtt").hide();
                    $(".craftGtt").find(":input").attr("disabled", true);
                }else if(kind2 == 5){ // 直喷PVC
                    $(".PPZhi").show();
                    $(".PPZhi").find(":input").attr("disabled", false);
                    $(".craftGtt").hide();
                    $(".craftGtt").find(":input").attr("disabled", true);
                }else if(kind2 == 14){ // 软膜
                    $(".ruanMo").show();
                    $(".ruanMo").find(":input").attr("disabled", false);
                    $(".craftGtt").hide();
                    $(".craftGtt").find(":input").attr("disabled", true);
                }else if(kind2 == 18){
                    $(".craftGtt").show();
                    $(".craftGtt").find(":input").attr("disabled", false);
                }else{
                    $(".craftGtt").hide();
                    $(".craftGtt").find(":input").attr("disabled", true);
                }
            }
            // 户外写真
            if(kind == 2){
                // 灯片
                if(kind2 == 5){
                    $(".dengPian").show();
                    $(".dengPian").find(":input").attr("disabled", false);
                }
            }
            // 布
            if(kind == 3){
                // 喷绘布
                if(kind2 == 1){
                    $(".penHuiBu").show();
                    $(".penHuiBu").find(":input").attr("disabled", false);
                }else if(kind2 == 6){ // 写真布
                    $(".xieZhenBu").show();
                    $(".xieZhenBu").find(":input").attr("disabled", false);
                }else if(kind2 == 7){ // 双喷布
                    $(".doubleBu").show();
                    $(".doubleBu").find(":input").attr("disabled", false);
                }else if(kind2 == 8){ // 油画布
                    $(".youHuaBu").show();
                    $(".youHuaBu").find(":input").attr("disabled", false);
                }else if(kind2 == 10){ // 旗帜布
                    $(".qiZhiBu").show();
                    $(".qiZhiBu").find(":input").attr("disabled", false);
                }else if(kind2 == 13){//桌布
                    $(".ui_zb").show();
                    $(".ui_zb").find(":input").attr("disabled", false);
                }
            }
            // 条幅
            if(kind == 6){
                $(".banner").show();
                $(".banner").find(":input").attr("disabled", false);
            }

            form.render();*/
        });
        // 自定义尺寸
        form.on('checkbox(switchSizeCoupon)', function (data) {
            if (data.elem.checked) {
                $('.switchSizeCoupon').val("on")
                $(".ui_zdy_size").show();
                $("#ui_zdy_size").attr("name", "size");
                $(".ui_size").hide();
                $("#ui_size").attr("name", "");
                $(".ui_zdy_size").find(":input").attr("disabled", false);
                $(".ui_size").find(":input").attr("disabled", true);
            } else {
                $('.switchSizeCoupon').val("off")
                $(".ui_size").show();
                $("#ui_size").attr("name", "size");
                $(".ui_zdy_size").hide();
                $("#ui_zdy_size").attr("name", "");
                $(".ui_size").find(":input").attr("disabled", false);
                $(".ui_zdy_size").find(":input").attr("disabled", true);
                // 恢复标准数量的时候会被禁用，加这个解决
                form.render();
            }
        })

        form.on('select(ui_qz_name)', function (data) {

            var isJq = $("#ui_qz_name option:checked").val();
            if (isJq == "0") {
                $(".ui_jq").show();
                $(".ui_cq").hide();
                $("#proTypeValue").val("锦旗")
            } else {
                $(".ui_cq").show();
                $(".ui_jq").hide();
                $("#proTypeValue").val("彩旗");
            }
            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('submit(acount_btn)', function (data) {
            var value = $('input[name="kindValue"]:checked').val();
            if (!value) {
                layer.msg('请选择产品类目！', {offset: ['300px', '300px']}, function () {
                });
                return false;
            }
            if (value != 4 && value != 5 && value != 6 && value != 8 && value != 9 && value != 10) {
                // 贡缎布
                if (value == 7) {
                    var size = $("#stinClothSize").val();
                    if (size.split("*")[0] < 14 || size.split("*")[1] < 14) {
                        layer.msg("贡缎布尺寸不能小于14 cm", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    } else if (size.split("*")[0] > 150 && size.split("*")[1] > 150) {
                        layer.msg("贡缎布超过150cm需要拼接", {offset: ['300px', '300px']}, function () {
                        });
                    }
                    if ($("input[name='ui_gdb_qg']:checked").val() == "旗杆") {
                        var count = $("#count4").val();
                        var number = $("#number").val();
                        var qg_count = $("input[name='yaheng']").val();
                        if (qg_count <= 0) {
                            layer.msg('请输入旗杆数量！', {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        } else {
                            if (parseFloat(qg_count) > parseFloat(count) && parseFloat(qg_count) > parseFloat(number)) {
                                layer.msg('旗杆数量不能超过产品数量！', {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        }
                    }
                } else {
                    var size = $("#size").val();
                }
                if (!size) {
                    layer.msg('请填写尺寸！', {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if (value == 3) {
                    if (kind2 == 10) {
                        if (size.split("*")[1] > 200 && size.split("*")[0] > 200) {
                            layer.msg('旗帜布两边超过200cm需要拼接！', {offset: ['300px', '300px']}, function () {
                            });
                        }
                    }
                }
            }
            if (value == 5) {
                if ($("#keziSize").val().indexOf("*") != -1) {
                    layer.msg('请填写正确的尺寸格式！', {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
            }
            if (value == 6) {
                if ($("#bannerSize").val().indexOf("*") != -1) {
                    layer.msg('请填写正确的尺寸格式！', {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if ($("#diySizeCoupon").val() > 160 && $("#bannerSize").val() > 160) {
                    layer.msg('条幅两边超过160cm需要拼接！', {offset: ['300px', '300px']}, function () {
                    });
                }
                /* if($("#diySizeCoupon").val() > 160){
                    layer.msg('条幅宽幅超过160cm需要单独报价！',{offset:['300px','300px']},function(){});
                } */
                if ($("input[name='ui_tf_qg']:checked").val() == "旗杆") {
                    var count = $("#count3").val();
                    var qg_count = $("input[name='zheye']").val();
                    if (qg_count <= 0) {
                        layer.msg('请输入旗杆数量！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    } else {
                        if (parseFloat(qg_count) > parseFloat(count)) {
                            layer.msg('旗杆数量不能超过产品数量！', {offset: ['300px', '300px']}, function () {
                            });
                            return false;
                        }
                    }
                }
                var craftTiao = [$('input[name="craftTiao"]:checked').val()];
                if (craftTiao == '双喷') {
                    // if ($("#bannerSize").val() > 500 || $("#diySizeCoupon").val() > 160) {
                    //     layer.msg('条幅双喷不能超过50*1.6米！', {offset: ['300px', '300px']}, function () {
                    //     });
                    //     return false;
                    // }
                }
                // $("#bannerSize").val($("#bannerSize").val()+'*'+$("#width").val())
            }
            if (value == 10) {
                if ($("input[name='switchSize']:checked").val() == "on") {
                    if ($("#ui_zdy_size").val().split("*")[0] < 20 || $("#ui_zdy_size").val().split("*")[1] < 20) {
                        layer.msg('帆布最小尺寸20*20cm！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ($("#ui_zdy_size").val().split("*")[0] > 140 && $("#ui_zdy_size").val().split("*")[1] > 140) {
                        layer.msg('帆布尺寸超过140cm需要拼接！', {offset: ['300px', '300px']}, function () {
                        });
                    }
                }
            }
            if (value == 0) {
                if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
                    layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸10*10CM！", {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if ((size.split("*")[1] > 120 && size.split("*")[0] > 120)) {
                    layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过120*120CM需要拼接！", {offset: ['300px', '300px']}, function () {
                    });
                }
            }
            if (value == 1) {
                if ($("select[name='kind2Value'] option:selected").val() == 8) {
                    if ($("#size").val().split("*")[0] < 4 || $("#size").val().split("*")[1] < 4) {
                        layer.msg('静电贴最小尺寸4*4cm！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if (($("#size").val().split("*")[0] > 500 || $("#size").val().split("*")[1] > 58) && $("#size").val().split("*")[0] > 58 || $("#size").val().split("*")[1] > 500) {
                        layer.msg('静电贴最大尺寸500*58cm！', {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                } else if ($("select[name='kind2Value'] option:selected").val() != 24) {
                    if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] > 120 || size.split("*")[0] > 150) && (size.split("*")[0] > 120 || size.split("*")[1] > 150)) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过150*150CM需要拼接！", {offset: ['300px', '300px']}, function () {
                        });
                    }
                }
            }
            if (value == 2) {
                if (size.split("*")[1] < 20 || size.split("*")[0] < 20) {
                    layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM！", {offset: ['300px', '300px']}, function () {
                    });
                    return false;
                }
                if ((size.split("*")[1] > 150 || size.split("*")[0] > 150) && (size.split("*")[0] > 150 || size.split("*")[1] > 150)) {
                    layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过150*150CM需要拼接！", {offset: ['300px', '300px']}, function () {
                    });
                }
                if ($("select[name='kind2Value'] option:selected").val() == 24 && $("input[name='dengxType']:checked").val() == 0 && $("input[name='switchSize']:checked").length > 0) {
                    if (size.indexOf(",") > 0) {
                        layer.msg("尺寸格式不正确！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] < 60 || size.split("*")[0] < 30) && (size.split("*")[0] < 60 || size.split("*")[1] < 30)) {
                        layer.msg("最小尺寸60*30CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                }
            }
            if (value == 3) {
                if ($("select[name='kind2Value'] option:selected").val() == 5) {
                    if (size.split("*")[1] < 10 || size.split("*")[0] < 10) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸10*10CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] > 150 || size.split("*")[0] > 150) && (size.split("*")[0] > 150 || size.split("*")[1] > 150)) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过150*150CM需要拼接！", {offset: ['300px', '300px']}, function () {
                        });
                    }
                } else if ($("select[name='kind2Value'] option:selected").val() == 2 || $("select[name='kind2Value'] option:selected").val() == 6 || $("select[name='kind2Value'] option:selected").val() == 8) {
                    if (size.split("*")[1] < 20 || size.split("*")[0] < 20) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] > 150 && size.split("*")[0] > 150)) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过150*150CM需要拼接！", {offset: ['300px', '300px']}, function () {
                        });
                    }
                } else if ($("select[name='kind2Value'] option:selected").val() == 11) {
                    if (size.split("*")[1] < 20 || size.split("*")[0] < 20) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] > 500 || size.split("*")[0] > 500)) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过500*500CM需要拼接！", {offset: ['300px', '300px']}, function () {
                        });
                    }
                } else if ($("select[name='kind2Value'] option:selected").val() == 13) {
                    if (size.split("*")[1] < 20 || size.split("*")[0] < 20) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸20*20CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    if ((size.split("*")[1] > 300 || size.split("*")[0] > 300)) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过300*300CM需要拼接！", {offset: ['300px', '300px']}, function () {
                        });
                    }
                }

            }

            if (value == 6) {
                if ($("select[name='kind2Value'] option:selected").val() == "旗帜布") {
                    let diySizeCoupon = 50;
                    if ($("input[name='ui_tf_size']:checked").val() == "on") {
                        diySizeCoupon = $("#diySizeCoupon").val()
                    }
                    if (diySizeCoupon < 17 || $("#bannerSize").val() < 17) {
                        layer.msg($("select[name='kind2Value'] option:selected").html() + "最小尺寸17*17CM！", {offset: ['300px', '300px']}, function () {
                        });
                        return false;
                    }
                    // if (diySizeCoupon > 200 && $("#bannerSize").val() > 200) {
                    //     layer.msg($("select[name='kind2Value'] option:selected").html() + "最大尺寸超过200*200CM需要拼接！", {offset: ['300px', '300px']}, function () {
                    //     });
                    // }
                }
            }
            var kindData = {
                0: "制度牌", 1: "室内写真", 2: "户外写真",
                3: "布", 4: "展架", 5: "刻字", 6: "条幅",
                7: "贡缎布", 8: "锦旗", 9: "号码布", 10: "帆布", 11: "灯箱", 12: "宠物婚礼KT版"
            };
            // 获取选中单选框和下拉框的值
            var kind = $('input[name="kindValue"]:checked').val();
            var number = $("#number").val();
            $.ajax({
                url: "${path}/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 data = result.data.proList;
                    let arr = []
                    $("input[name='craft']:checked").each(function () {
                        if (!$(this).is("disabled")) {
                            if ($(this).val() == "抠图") {
                                arr.push($(this).val() + $("input[name='cropNumber']").val());
                                return;
                            }
                        }
                    })
                    // !条幅 && !贡缎布
                    if (value != 6 && value != 7) {
                        if (value != 4 && value != 5) {
                            var size = $("#size").val();
                            if (value == 2 && $("#kind2Value option:checked").text() == "户外写真可移白胶、黑胶") {
                                if (size.split("*")[0] < 10 || size.split("*")[1] < 10) {
                                    layer.msg("户外写真可移白胶、黑胶最小尺寸 10*10cm", {offset: ['300px', '300px']}, function () {
                                    });
                                    return false;
                                }
                            }
                        } else if (value == 5) {
                            var size = $("#keziSize").val();
                            if (size > 60) {
                                layer.msg("【刻字】单边尺寸不能超过60 cm", {offset: ['300px', '300px']}, function () {
                                });
                                return false;
                            }
                        } else {
                            var size = ''
                        }
                        if (value != 5) {
                            var kind2 = $("#kind2Value option:checked").text();
                        } else {
                            var kind2 = ''
                        }
                        // 制度牌
                        var craftList = "";
                        if (value == 0 || value == 12) {
                            if (kind2 != "背胶单裱3mmPVC(户内高清）") {
                                $("input:checkbox[name='craft']:checked").each(function (i) {
                                    // 没有被禁用的工艺加到arr中
                                    if (!$(this).is(':disabled')) {
                                        if ($(this).val() == "铁架支架") {
                                            arr.push($("input[name='zheye']").val() + "个" + $(this).val());
                                        } else if ($(this).val() == "伸缩支架") {
                                            arr.push($("input[name='yaheng']").val() + "个" + $(this).val());
                                        } else if ($(this).val() == "抠图") {
                                            return;
                                        } else {
                                            arr.push($(this).val());
                                        }
                                    }
                                });
                                var craftBu = [$('input[name="craftBu"]:checked').val()];
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                                craftList = craftBu + arr;
                            } else {
                                var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            }
                        } else if (value == 1) { //室内写真
                            if (kind2 == "pp纸(室内)") {
                                var craftBu = [$('input[name="craftPPZhi"]:checked').val()];
                                arr.push($('input[name="craftPPZhi"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "直喷PVC") {
                                var craftBu = [$('input[name="craftPPZhi"]:checked').val()];
                                arr.push($('input[name="craftPPZhi"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + craftBu + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "软膜") { // 软膜
                                var craftBu = [$('input[name="craftRuanMo"]:checked').val()];
                                arr.push($('input[name="craftRuanMo"]:checked').val());
                                craftList = craftBu
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "静电贴") {
                                arr.push("模切");
                                arr.push($(".zdt_yin input:checked").val());
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else {
                                var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            }
                        } else if (value == 2) { //户外写真
                            $("input:checkbox[name='craft']:checked").each(function (i) {
                                // 没有被禁用的工艺加到arr中
                                if (!$(this).is(':disabled')) {
                                    if ($(this).val() == "刮板") {
                                        arr.push($("input[name='pcount']").val() + "个" + $(this).val());
                                    } else if ($(this).val() == "抠图") {
                                        return;
                                    } else {
                                        arr.push($(this).val());
                                    }
                                }
                            });
                            if (kind2 == "户外写真灯片") {
                                var craftBu = [$('input[name="craftJingcai"]:checked').val()];
                                arr.push(craftBu);
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "摆摊软膜灯箱") {
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else {
                                var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            }
                        } else if (value == 3) { //布
                            if (kind2 == "喷绘布") {
                                var craftBu = [$('input[name="craftPenHuiBu"]:checked').val()];
                                arr.push($('input[name="craftPenHuiBu"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "写真布") {
                                var craftBu = [$('input[name="craftJingcai"]:checked').val()];
                                arr.push($('input[name="craftJingcai"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "双喷布") {
                                var craftBu = [$('input[name="craftBu"]:checked').val()];
                                arr.push($('input[name="craftBu"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "油画布") {
                                var craftBu = [$('input[name="craftJingcai"]:checked').val()];
                                arr.push($('input[name="craftJingcai"]:checked').val());
                                craftList = craftBu;
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "旗帜布") {
                                var craftBu = [$('input[name="craftqz"]:checked').val()];
                                arr.push($('input[name="craftqz"]:checked').val());
                                craftList = craftBu;
                                if ($("input[name='craftBu']:checked").val() == "双喷") {
                                    craftBu += "双喷";
                                    arr.push("双喷");
                                }
                                if ($("input[name='ui_qzb_qg']:checked").val() == "旗杆") {
                                    craftBu += ",旗杆(" + $("input[name='zheye']").val() + "根)";
                                    arr.push("旗杆(" + $("input[name='zheye']").val() + "根)");
                                }
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else if (kind2 == "桌布") {
                                var craftBu = [$('input[name="craftZb"]:checked').val()];
                                arr.push($('input[name="craftZb"]:checked').val());
                                kind2 = $("#zbKind option:checked").val() + kind2;
                                craftList = craftBu
                                var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            } else {
                                var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            }
                        } else {
                            var span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                            if (value == 8) {// 8:锦旗
                                var size = "";
                                var kind2 = $("#ui_jq_gy option:checked").text();
                                var jqType = $("#ui_qz_name option:checked").text();
                                if (jqType == "彩旗") {
                                    size = $("#ui_cq_size option:checked").text();
                                    span_result = jqType + '--' + size + 'cm(同款内容)\n';
                                } else {
                                    size = $("#ui_jq_size option:checked").text();
                                    span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'cm(同款内容)\n';
                                }
                            } else if (value == 9) {//9:号码布
                                var size = $("#ui_hmb_size option:checked").text();
                                var kind2 = $("#ui_hmb_gy option:checked").text();
                                span_result = kindData[kind] + '-' + kind2 + ' - ' + size + 'mm(同款内容)\n';
                            } else if (value == 10) {//10:帆布
                                if ($("input[name='switchSize']:checked").val() == "on") {
                                    size = $("#ui_zdy_size").val();
                                } else {
                                    size = "100*45";
                                }
                                var fb_name = $("#ui_fb_name option:selected").text();
                                var craft = [];
                                $("input:checkbox[name='craft']:checked").each(function (i) {
                                    // 没有被禁用的工艺加到arr中
                                    if (!$(this).is(':disabled')) {
                                        craft.push($(this).val());
                                        if ($(this).val() == "抠图") {
                                            return;
                                        } else {
                                            arr.push($(this).val());
                                        }
                                    }
                                });
                                if (craft == "封边" || craft == "打孔") {
                                    craft = craft + "绳子";
                                    arr.push("绳子");
                                }

                                span_result = kindData[kind] + '-' + fb_name + ' - ' + size + 'cm(同款内容)\n';
                                if ($("input[name='switchSize']:checked").val() != "on") {
                                    span_result += "(特惠款)";
                                }
                            }

                        }
                        let dengxType = $("input[name='dengxType']:checked").val();
                        let unit = "个";
                        if (dengxType == 1 && value == 2 && kind2 == "摆摊软膜灯箱") {
                            unit = "套"
                        }
                        if (arr.length > 0) {
                            span_result += "工艺：" + arr.join(",") + '\n';
                        }

                        if (number > 1) {
                            if ($("#ui_des").css("display") != "none") {
                                let numberType = $("#desType option:selected").text();
                                span_result += "款数：" + number + "-" + numberType + "\n";
                            }
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 各' + data[i].count + unit + "，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                            }
                        } else {
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 ' + data[i].count + unit + "，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                            }
                        }
                    } else if (value == 6) { // 条幅
                        var size = $("#bannerSize").val();
                        var width = $("#width option:checked").text();
                        if ($("input[name='ui_tf_size']:checked").val() == "on") {
                            width = $("#diySizeCoupon").val() + "cm宽幅";
                        }
                        var kind2 = $("#bannerKind option:checked").text();
                        var craftTiao = "";
                        arr.push($('input[name="craftTiao"]:checked').val())
                        if ($("input[name='ui_tf_qg']:checked").val() == "旗杆") {
                            craftTiao += "旗杆(" + $("input[name='zheye']").val() + "根)"
                        }
                        if (width == "50cm宽幅") {
                            if (size <= 300 && size > 200) {
                                craftTiao += "（特惠款）";
                            } else if (size == 500) {
                                craftTiao += "（特惠款）";
                            }
                        }
                        arr.push(craftTiao)
                        var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm * ' + width + '\n';
                        if (arr.length > 0) {
                            span_result += "工艺：" + arr.join(",") + '\n';
                        }
                        if (number > 1) {
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 各' + data[i].count + "条，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                                data[i].kindLabel = "条幅"
                            }
                        } else {
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 ' + data[i].count + "条，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                                data[i].kindLabel = "条幅"
                            }
                        }
                    } else if (value == 7) { // 贡缎布
                        var size = $("#stinClothSize").val();
                        var kind2 = $("#satinClothKind option:checked").text();
                        if ($("input[name='ui_gdb_qg']:checked").val() == "旗杆") {
                            kind2 += ",旗杆(" + $("input[name='yaheng']").val() + "根)"
                        }
                        var span_result = kindData[kind] + ' - ' + kind2 + ' - ' + size + 'cm' + '\n';

                        if (arr.length > 0) {
                            span_result += "工艺：" + arr.join(",") + '\n';
                        }
                        if (number > 1) {
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 各' + data[i].count + "条，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                                data[i].kindLabel = "条幅"
                            }
                        } else {
                            for (let i = 0; i < data.length; i++) {
                                span_result += number + '款 ' + data[i].count + "条，共" + data[i].price + "元" + '\n'
                                data[i].number = number;
                                data[i].kindLabel = "条幅"
                            }
                        }
                    }

                    if (value == 10) {
                        data[0].kindLabel = "帆布";
                    }
                    span_result += '包邮，免费设计呢~（偏远地区需补邮费）'
                    if (window.parent.system_isGai) {
                        span_result += "\n\n亲 现在下单可以参加淘宝活动8.5折折扣哦!"
                    }
                    addLog(span_result);
                    $("#span_result").val(span_result);

                    var count = $("input[name='count']").val();

                    count += "个";
                    if (kind == 4) {
                        var sizeIndex = kind2.indexOf("cm");
                        size = kind2.substring(sizeIndex - 6, sizeIndex);
                        kind2 = kind2.substring(0, sizeIndex - 6);
                    } else if (kind == 5) {
                        size += "*0";
                        count = $("#count2").val() + "个字";
                    } else if (kind == 6) {
                        var width = $("#width").val();
                        width = width.substring(0, 2);
                        size = $("#bannerSize").val() + "*" + width;
                        craftList = $("input[name='craftTiao']:checked").val();
                        count = $("#count3").val() + "条";
                    } else if (kind == 7) {
                        count = $("#count4").val() + "张";
                        craftList = "";
                    } else if (kind == 9) {
                        size += "mm";
                    } else if (kind == 10) {
                        craftList = $("input[name='craft']:checked").val();
                        kindData[kind] = "领淘帆布-" + kindData[kind];
                    }
                    if (kind2 == "高透贴") {
                        kind2 += "-" + $("input[name='craftGtt']:checked").val();
                    }
                    getRemark(kindData[kind], size, count, kind2, number, craftList, "");
                    //计算完自动复制文本
                    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 : '折扣价',
							templet : function(d) {
								if(d.kindLabel == "帆布" || d.kindLabel == "条幅"){
									return Math.ceil(d.price)
								}
								return Math.ceil(d.price * 0.95)
							} 
						},{
							field : 'wangwang',
							align : "center",
							width : '19%',
							title : '跳楼价',
							templet : function(d) {
								if(d.kindLabel == "帆布" || d.kindLabel == "条幅"){
									return Math.ceil(d.price);
								}
								return Math.ceil(d.price * 0.93)
							} 
						},*/{
                                field: 'weight',
                                width: '21%',
                                align: "center",
                                title: '重量（kg）'
                            }
                        ]],
                        done: function () {
                        }
                    });
                }
            });
            return false;
        });
    });

</script>
</html>