<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('第三方支付开票表新增')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-role-add">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <!--is-required 增加星号 显示为必填-->
                            <label class="col-sm-3 control-label">订单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderNo" id="orderNo" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">支付方式编码:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="paymentMethodCode" id="paymentMethodCode" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">支付方式名称:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="paymentMethodName" id="paymentMethodName" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">订单金额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderAmount" id="orderAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">开票金额:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="billingAmount" id="billingAmount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">原正向订单:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="originalPositiveOrder" id="originalPositiveOrder" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">订单创建时间:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderCreateTime" id="orderCreateTime" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">订单类型 (正向单, 逆向单):</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="orderType" id="orderType" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                </div>
            </div>

        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">

    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
           var orderNo = $("input[name='orderNo']").val();
           var paymentMethodCode = $("input[name='paymentMethodCode']").val();
           var paymentMethodName = $("input[name='paymentMethodName']").val();
           var orderAmount = $("input[name='orderAmount']").val();
           var billingAmount = $("input[name='billingAmount']").val();
           var originalPositiveOrder = $("input[name='originalPositiveOrder']").val();
           var orderCreateTime = $("input[name='orderCreateTime']").val();
           var orderType = $("input[name='orderType']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "ddgl/sddglfpgldsfzfkp/sDdglFpglDsfzfkpAdd",
            data : {
                "orderNo": orderNo,
                "paymentMethodCode": paymentMethodCode,
                "paymentMethodName": paymentMethodName,
                "orderAmount": orderAmount,
                "billingAmount": billingAmount,
                "originalPositiveOrder": originalPositiveOrder,
                "orderCreateTime": orderCreateTime,
                "orderType": orderType,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
