<!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-commodityorder-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>订单金额(分)：</label>
                <div class="col-sm-8">
                    <input name="orderMoney" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>订单状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="orderStatus" value="" required>
                        <label th:for="orderStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户姓名：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text" required maxlength="10">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户电话：</label>
                <div class="col-sm-8">
                    <input name="userPhone" class="form-control" type="text" required maxlength="11">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用户地址：</label>
                <div class="col-sm-8">
                    <input name="userAddress" class="form-control" type="text" required maxlength="50">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品id：</label>
                <div class="col-sm-8">
                    <input name="commodityId" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>产品数量：</label>
                <div class="col-sm-8">
                    <input name="commodityCount" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>商户id：</label>
                <div class="col-sm-8">
                    <input name="merchantId" class="form-control" type="text" required maxlength="36">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="createTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="updateTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>操作人：</label>
                <div class="col-sm-8">
                    <input name="updateBy" class="form-control" type="text" required maxlength="20">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label"><span style="color: red; ">*</span>数据版本：</label>
                <div class="col-sm-8">
                    <input name="dataVerFlag" class="form-control" type="text" required maxlength="20">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "bussiness/commodityorder"
        $("#form-commodityorder-add").validate({
            focusCleanup: true
        });

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

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

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