<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改产品信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ProductInfo-edit" th:object="${tBdProductinfo}">
            <input name="ID" th:field="*{ID}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">机种ID：</label>
                <div class="col-sm-8">
                    <input name="productID" th:field="*{productID}" class="form-control" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">机种型号：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{productName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">机种类型：</label>
                <div class="col-sm-8">
                    <select name="productType" class="form-control m-b" th:with="type=${@dict.getType('productType')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{productType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">制具车条码：</label>
                <div class="col-sm-8">
                    <input name="toolCarNo" th:field="*{toolCarNo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标签有无：</label>
                <div class="col-sm-8">
                    <select name="machine" class="form-control m-b" th:with="type=${@dict.getType('ifLable')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{machine}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标签模板：</label>
                <div class="col-sm-8">
                    <input name="template" th:field="*{template}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标签形式：</label>
                <div class="col-sm-8">
                    <select name="printType" class="form-control m-b" th:with="type=${@dict.getType('pringtType')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{printType}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "nanjing/ProductInfo";
        $("#form-ProductInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-ProductInfo-edit').serialize());
            }
        }
    </script>
</body>
</html>