<!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-electricpowergeneration-edit" th:object="${tElectricPowerGeneration}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">数据日期：</label>
                <div class="col-sm-8">
                    <input name="dataTime" th:field="*{dataTime}" 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="type" class="form-control m-b">
                        <option th:field="*{type}" value="">所有</option>
                        <option th:field="*{type}" value="1">光伏</option>
                        <option th:field="*{type}" value="2">风力</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发电量：</label>
                <div class="col-sm-8">
                    <input name="num" th:field="*{num}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "zhny/electricpowergeneration";
        $("#form-electricpowergeneration-edit").validate({
            focusCleanup: true
        });

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