<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改托盘管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-WorkTrayRealTimeInfo-edit" th:object="${tRpWorktrayrealtimeinfo}">
            <input name="rfidNum" th:field="*{rfidNum}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">系统条码：</label>
                <div class="col-sm-8">
                    <input name="barCode" th:field="*{barCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产线条码：</label>
                <div class="col-sm-8">
                    <input name="semiBarcode" th:field="*{semiBarcode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">当前工位：</label>
                <div class="col-sm-8">
                    <input name="currentStation" th:field="*{currentStation}" 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="state" class="form-control m-b" th:with="type=${@dict.getType('palletState')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{state}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用状态：</label>
                <div class="col-sm-8">
                    <select name="usedFlag" class="form-control m-b" th:with="type=${@dict.getType('palletUseflag')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{usedFlag}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">添加时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="insertTime" th:value="${#dates.format(tRpWorktrayrealtimeinfo.insertTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">停用时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="deleteTime" th:value="${#dates.format(tRpWorktrayrealtimeinfo.deleteTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "nanjing/WorkTrayRealTimeInfo";
        $("#form-WorkTrayRealTimeInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-WorkTrayRealTimeInfo-edit').serialize());
            }
        }

        $("input[name='insertTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='deleteTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>