<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- 吊牌 -->
<!-- <input type="hidden" name="proTypeValue" id="proTypeValueTag"
class="layui-input" value="吊牌"> -->
<p>
    尺寸(CM/厘米) <span style="font-size:14px;color:red">输入格式: 长 * 宽</span>
    <!-- <span class="addOrCut"> -->
    <%--    <button type="button" title="点击添加尺寸" class="layui-btn layui-btn-primary layui-btn-sm button" onclick="AddInput()"><i--%>
    <%--            class="layui-icon">组合</i></button>--%>
    <button type="button" title="点击移除尺寸" class="layui-btn layui-btn-primary layui-btn-sm button" onclick="CutInput()"><i
            class="layui-icon">单张</i></button>
    <!-- </span> -->
</p>
<div class="diySize">
    <div class="layui-form-item" id="fatherDiv">
        <input type="text" name="size" id="diySize" placeholder="格式:长*宽"
               class="layui-input" autocomplete="off">
    </div>
</div>
<p>数量</p>
<div class="layui-form-item">
    <input type="text" name="count" id="countTag" placeholder="请输入整数" class="layui-input"
           autocomplete="off">
</div>

<p>款数</p>
<div class="layui-form-item">
    <input type="text" placeholder="请输入整数" autocomplete="off" name="number"
           id="numberTag" 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>
<p>工艺</p>
<div class="layui-form-item">
    <input type="radio" name="kind2Value" lay-filter="kind2Value" value="无" title="无" checked="checked">
    <input type="radio" name="kind2Value" lay-filter="kind2Value" value="单面烫黄金" title="单面烫黄金">
    <span id="leishe_layout">
        <input type="radio" name="kind2Value" lay-filter="kind2Value" value="单面烫镭射银" title="单面烫镭射银">
        <input type="radio" name="kind2Value" lay-filter="kind2Value" value="双面烫镭射银" title="双面烫镭射银">
    </span>
    <input type="radio" name="kind2Value" lay-filter="kind2Value" value="击凸" title="击凸">
    <input type="radio" name="kind2Value" lay-filter="kind2Value" value="压凹" title="压凹">
    <span id="tcolor_type" class="layui-inline" style="display: none;width: 100px">
        <select name="craft" class="select" disabled>
            <option value="无色" selected>无色</option>
            <option value="有色">有色</option>
            <option value="有色加凹凸">有色加激凸/有色加压凹</option>
        </select>
    </span>
</div>
<span class="craftSheng" style="display: flex;flex-wrap: wrap">
	<input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="棉绳" title="棉绳"
           lay-skin="primary">
    <input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳" title="配弹力绳（15cm）"
           lay-skin="primary">
    <input type="checkbox" class="craftSheng2" name="craftSheng" lay-filter="switch" value="配弹力绳捆" title="配弹力绳（捆）"
           lay-skin="primary">
    <div class="shengz tscolor" style="width: 150px;display: none">
        <select class="select">
            <option value="金色绳子">金色绳子</option>
            <option value="银色绳子">银色绳子</option>
        </select>
    </div>
</span>

<script>
    //新增/删除尺寸
    //用来判断是删除 还是增加按钮 以便count值进行计算
    var count = 0;

    function AddInput() {
        if (count > 0) {
            return false;
        }
        count++;
        var fatherDiv = document.getElementById("fatherDiv");

        //创建input
        var input = document.createElement("input");
        input.type = "text";
        input.setAttribute('class', 'layui-input');
        input.name = "size" + count;
        input.placeholder = "格式:长*宽";
        input.autocomplete = "off";
        input.setAttribute('class', 'layui-input size1');
        fatherDiv.appendChild(input);
        /* var br = document.createElement("br");
        fatherDiv.appendChild(br);  */
    }

    /* $("body").on("click", ".size1", function (e) {
        $(this).remove();
        return false;
    }) */
    function CutInput() {
        count = 0;
        $(".size1").remove();
    }
</script>