<!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-order-edit" th:object="${tbOrder}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户编号：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">订单编号：</label>
                <div class="col-sm-8">
                    <input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">订单状态(0：初始；1：待付款；2：已取消；3：已失败；4：已过期；5：已付款；6：已退款；7：已发货；8：已收货；9：完成；)：</label>
                <div class="col-sm-8">
                    <input name="orderState" th:field="*{orderState}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付渠道(WECHAT：微信；ALIPAY：支付宝；APPLE:苹果)：</label>
                <div class="col-sm-8">
                    <input name="payChannel" th:field="*{payChannel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">会员到期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="vipExpireTime" th:value="${#dates.format(tbOrder.vipExpireTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付宝交易号：</label>
                <div class="col-sm-8">
                    <input name="tradeNo" th:field="*{tradeNo}" 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="goodsId" th:field="*{goodsId}" 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="goodsDesc" th:field="*{goodsDesc}" 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="userPhone" th:field="*{userPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单失效时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="exprireTime" th:value="${#dates.format(tbOrder.exprireTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单金额：</label>
                <div class="col-sm-8">
                    <input name="amt" th:field="*{amt}" 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="orignalAmt" th:field="*{orignalAmt}" 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="attach" th:field="*{attach}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">应用ID：</label>
                <div class="col-sm-8">
                    <input name="appId" th:field="*{appId}" 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="mchId" th:field="*{mchId}" 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="deviceInfo" th:field="*{deviceInfo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">统一下单接口返回码，微信：SUCCESS/FAIL：</label>
                <div class="col-sm-8">
                    <input name="returnCode" th:field="*{returnCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">统一下单接口返回码信息：</label>
                <div class="col-sm-8">
                    <textarea name="returnMsg" class="form-control">[[*{returnMsg}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">微信返回的随机字符串：</label>
                <div class="col-sm-8">
                    <input name="nonceStr" th:field="*{nonceStr}" 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="prepayId" th:field="*{prepayId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">关联ID：</label>
                <div class="col-sm-8">
                    <input name="subsId" th:field="*{subsId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">查询条件：</label>
                <div class="col-sm-8">
                    <textarea name="queryParam" class="form-control">[[*{queryParam}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">导出excel地址：</label>
                <div class="col-sm-8">
                    <input name="url" th:field="*{url}" 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="remark" th:field="*{remark}" class="form-control" 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="companyName" th:field="*{companyName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">解锁记录id：</label>
                <div class="col-sm-8">
                    <input name="recordId" th:field="*{recordId}" class="form-control" 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 + "business/order";
        $("#form-order-edit").validate({
            focusCleanup: true
        });

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

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

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