<!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="orderNumber" id="orderNumber" 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="productType" id="productType" 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="productEnterprise" id="productEnterprise" 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="productName" id="productName" 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="orderTime" id="orderTime" 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="orderSource" id="orderSource" 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="orderStatus" id="orderStatus" 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="orderingAccount" id="orderingAccount" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">用户ID:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="userId" id="userId" 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="orderingPhone" id="orderingPhone" 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="orderingStore" id="orderingStore" 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="storeCode" id="storeCode" 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="refundOperator" id="refundOperator" 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="couponUsed" id="couponUsed" 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="physicalRedemptionUsed" id="physicalRedemptionUsed" 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="salesChannel" id="salesChannel" 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 orderNumber = $("input[name='orderNumber']").val();
           var productType = $("input[name='productType']").val();
           var productEnterprise = $("input[name='productEnterprise']").val();
           var productName = $("input[name='productName']").val();
           var orderTime = $("input[name='orderTime']").val();
           var orderAmount = $("input[name='orderAmount']").val();
           var orderSource = $("input[name='orderSource']").val();
           var orderStatus = $("input[name='orderStatus']").val();
           var orderingAccount = $("input[name='orderingAccount']").val();
           var userId = $("input[name='userId']").val();
           var orderingPhone = $("input[name='orderingPhone']").val();
           var orderingStore = $("input[name='orderingStore']").val();
           var storeCode = $("input[name='storeCode']").val();
           var refundOperator = $("input[name='refundOperator']").val();
           var couponUsed = $("input[name='couponUsed']").val();
           var physicalRedemptionUsed = $("input[name='physicalRedemptionUsed']").val();
           var salesChannel = $("input[name='salesChannel']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "fwgl/sfwglserverorderinfo/sFwglServerorderinfoAdd",
            data : {
                "orderNumber": orderNumber,
                "productType": productType,
                "productEnterprise": productEnterprise,
                "productName": productName,
                "orderTime": orderTime,
                "orderAmount": orderAmount,
                "orderSource": orderSource,
                "orderStatus": orderStatus,
                "orderingAccount": orderingAccount,
                "userId": userId,
                "orderingPhone": orderingPhone,
                "orderingStore": orderingStore,
                "storeCode": storeCode,
                "refundOperator": refundOperator,
                "couponUsed": couponUsed,
                "physicalRedemptionUsed": physicalRedemptionUsed,
                "salesChannel": salesChannel,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
