<!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="saleDocumentNumber" id="saleDocumentNumber" 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="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="transferStatus" id="transferStatus" 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="saleDate" id="saleDate" 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="member" id="member" 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="cashier" id="cashier" 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="picker" id="picker" 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="pickerCode" id="pickerCode" 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="channelDocumentNumber" id="channelDocumentNumber" 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="om" id="om" 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 saleDocumentNumber = $("input[name='saleDocumentNumber']").val();
           var orderStatus = $("input[name='orderStatus']").val();
           var storeName = $("input[name='storeName']").val();
           var transferStatus = $("input[name='transferStatus']").val();
           var saleDate = $("input[name='saleDate']").val();
           var member = $("input[name='member']").val();
           var cashier = $("input[name='cashier']").val();
           var picker = $("input[name='picker']").val();
           var pickerCode = $("input[name='pickerCode']").val();
           var orderSource = $("input[name='orderSource']").val();
           var channelDocumentNumber = $("input[name='channelDocumentNumber']").val();
           var om = $("input[name='om']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "xsgl/sxsglxsmxddmxsalesorderinfo/sXsglXsmxDdmxSalesorderinfoAdd",
            data : {
                "saleDocumentNumber": saleDocumentNumber,
                "orderStatus": orderStatus,
                "storeName": storeName,
                "transferStatus": transferStatus,
                "saleDate": saleDate,
                "member": member,
                "cashier": cashier,
                "picker": picker,
                "pickerCode": pickerCode,
                "orderSource": orderSource,
                "channelDocumentNumber": channelDocumentNumber,
                "om": om,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
