<!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" id="app">
    <form class="form-horizontal m" id="form-network-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">案件编号：</label>
            <div class="col-sm-8">
                <input name="caseNo" required readonly class="form-control" th:value="${caseNo}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">物品编号：</label>
            <div class="col-sm-8">
                <input name="itemNo" required class="form-control" placeholder="请输入物品编号" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">物品类型：</label>
            <div class="col-sm-8">
                <select name="itemType" required class="form-control m-b" th:with="type=${@dict.getType('sys_cases_itemtype')}">
                    <option value="">---请选择---</option>
                    <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">
                <input name="brand"  class="form-control" placeholder="请输入品牌型号" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">数量：</label>
            <div class="col-sm-8">
                <input name="number"  class="form-control" placeholder="请输入数量" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">价值：</label>
            <div class="col-sm-8">
                <input name="price"  class="form-control" placeholder="请输入价值" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">来源：</label>
            <div class="col-sm-8">
                <input name="source"  class="form-control" placeholder="请输入来源" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/item"
    $("#form-network-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-network-add').serialize());
        }
    }
    $("input[name='filingTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>
