<!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-plandetailinfo-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">计划ID：</label>
                <div class="col-sm-8">
                    <input name="planid" th:value="*{planid}" class="form-control" type="text" readonly="true">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物料ID：</label>
                <div class="col-sm-8">
                    <select name="materialId" id="materialId" class="form-control ">
                        <option value="">--请选择物料--</option>
                        <option name="cbmaterialInfo" th:each="materialId:${cbmaterialInfo}" th:value="${materialId.materialId}" th:text="${materialId.materialName}" th:disabled="${materialId.status == '1'}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">计划产量：</label>
                <div class="col-sm-8">
                    <input name="planAmount" 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="realAmount" 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="unitId" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_info')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">班组：</label>
                <div class="col-sm-8">
                    <select name="groupId" id="groupId" class="form-control ">
                        <option value="">--请选择班组--</option>
                        <option name="cbGroupInfo" th:each="groupId:${cbGroupInfo}" th:value="${groupId.groupid}" th:text="${groupId.groupname}" th:disabled="${groupId.status == '1'}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "baseinfo/plandetailinfo"
        $("#form-plandetailinfo-add").validate({
            focusCleanup: true
        });

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