<!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="orderId" id="orderId" 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="deliveryType" id="deliveryType" 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="mobileNumber" id="mobileNumber" 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="channelName" id="channelName" 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="channelOrderNo" id="channelOrderNo" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">PSO销售单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="psoSaleOrderNo" id="psoSaleOrderNo" 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="deliveryStatus" id="deliveryStatus" 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="orderDate" id="orderDate" 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="storeName" id="storeName" 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="consumptionTime" id="consumptionTime" 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="memberId" id="memberId" 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="memberName" id="memberName" 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="systemLoginUserId" id="systemLoginUserId" 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="orderPlacer" id="orderPlacer" 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">结账单id:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="settlementId" id="settlementId" class="styled-input" type="text" maxlength="255" >
                                </div>
                            </div>
                            <label class="col-sm-3 control-label">结账单code:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="settlementCode" id="settlementCode" 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="finalPaymentTime" id="finalPaymentTime" 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="totalDrugQuantity" id="totalDrugQuantity" 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="cardNumber" id="cardNumber" 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="shippingAddress" id="shippingAddress" 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="orderAddress" id="orderAddress" 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>
                            <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="totalAmount" id="totalAmount" 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="deliveryFee" id="deliveryFee" 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="refundAmount" id="refundAmount" 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="deliveryPickupMethod" id="deliveryPickupMethod" 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="deliveryPickupTime" id="deliveryPickupTime" 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="remarks" id="remarks" 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 orderId = $("input[name='orderId']").val();
           var deliveryType = $("input[name='deliveryType']").val();
           var mobileNumber = $("input[name='mobileNumber']").val();
           var channelName = $("input[name='channelName']").val();
           var channelOrderNo = $("input[name='channelOrderNo']").val();
           var psoSaleOrderNo = $("input[name='psoSaleOrderNo']").val();
           var orderStatus = $("input[name='orderStatus']").val();
           var deliveryStatus = $("input[name='deliveryStatus']").val();
           var orderDate = $("input[name='orderDate']").val();
           var storeName = $("input[name='storeName']").val();
           var consumptionTime = $("input[name='consumptionTime']").val();
           var memberId = $("input[name='memberId']").val();
           var memberName = $("input[name='memberName']").val();
           var systemLoginUserId = $("input[name='systemLoginUserId']").val();
           var orderPlacer = $("input[name='orderPlacer']").val();
           var orderTime = $("input[name='orderTime']").val();
           var settlementId = $("input[name='settlementId']").val();
           var settlementCode = $("input[name='settlementCode']").val();
           var finalPaymentTime = $("input[name='finalPaymentTime']").val();
           var totalDrugQuantity = $("input[name='totalDrugQuantity']").val();
           var cardNumber = $("input[name='cardNumber']").val();
           var shippingAddress = $("input[name='shippingAddress']").val();
           var orderAddress = $("input[name='orderAddress']").val();
           var orderType = $("input[name='orderType']").val();
           var orderSource = $("input[name='orderSource']").val();
           var totalAmount = $("input[name='totalAmount']").val();
           var deliveryFee = $("input[name='deliveryFee']").val();
           var refundAmount = $("input[name='refundAmount']").val();
           var deliveryPickupMethod = $("input[name='deliveryPickupMethod']").val();
           var deliveryPickupTime = $("input[name='deliveryPickupTime']").val();
           var remarks = $("input[name='remarks']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "ddgl/sddglorderstore/sDdglOrderStoreAdd",
            data : {
                "orderId": orderId,
                "deliveryType": deliveryType,
                "mobileNumber": mobileNumber,
                "channelName": channelName,
                "channelOrderNo": channelOrderNo,
                "psoSaleOrderNo": psoSaleOrderNo,
                "orderStatus": orderStatus,
                "deliveryStatus": deliveryStatus,
                "orderDate": orderDate,
                "storeName": storeName,
                "consumptionTime": consumptionTime,
                "memberId": memberId,
                "memberName": memberName,
                "systemLoginUserId": systemLoginUserId,
                "orderPlacer": orderPlacer,
                "orderTime": orderTime,
                "settlementId": settlementId,
                "settlementCode": settlementCode,
                "finalPaymentTime": finalPaymentTime,
                "totalDrugQuantity": totalDrugQuantity,
                "cardNumber": cardNumber,
                "shippingAddress": shippingAddress,
                "orderAddress": orderAddress,
                "orderType": orderType,
                "orderSource": orderSource,
                "totalAmount": totalAmount,
                "deliveryFee": deliveryFee,
                "refundAmount": refundAmount,
                "deliveryPickupMethod": deliveryPickupMethod,
                "deliveryPickupTime": deliveryPickupTime,
                "remarks": remarks,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
