<!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-material-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">资料名称：</label>
            <div class="col-sm-8">
                <input id="materialName" name="materialName" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">资料类型：</label>
            <div class="col-sm-8">
                <select name="materialType" class="form-control m-b">
                    <option value="1">基础资料</option>
                    <option value="2">财务资料</option>
                    <option value="3">法务资料</option>
                    <option value="4">尽调附件</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">所属项目：</label>
            <div class="col-sm-8">
                <input id="projectName" name="projectName" 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 id="sourceChannel" name="sourceChannel" 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 id="ownerName" name="ownerName" 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="materialStatus" class="form-control m-b">
                    <option value="0">待收集</option>
                    <option value="1">补充中</option>
                    <option value="2">已归档</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">文件路径：</label>
            <div class="col-sm-8">
                <input id="filePath" name="filePath" 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 id="submitDate" name="submitDate" class="form-control" type="text" placeholder="yyyy-MM-dd">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remark" class="form-control"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
    var prefix = ctx + "risk/material";

    $("#form-material-add").validate({
        focusCleanup: true
    });

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