<!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="storeShortName" id="storeShortName" 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">OMS单号:</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input name="omsOrderNumber" id="omsOrderNumber" 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="mainOrderNumber" id="mainOrderNumber" 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="orderProcessCode" id="orderProcessCode" 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="productCode" id="productCode" 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="batchNumber" id="batchNumber" 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="batch" id="batch" 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="quantity" id="quantity" 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="unit" id="unit" 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="specification" id="specification" 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 storeShortName = $("input[name='storeShortName']").val();
           var storeCode = $("input[name='storeCode']").val();
           var omsOrderNumber = $("input[name='omsOrderNumber']").val();
           var mainOrderNumber = $("input[name='mainOrderNumber']").val();
           var orderProcessCode = $("input[name='orderProcessCode']").val();
           var orderTime = $("input[name='orderTime']").val();
           var productCode = $("input[name='productCode']").val();
           var productName = $("input[name='productName']").val();
           var batchNumber = $("input[name='batchNumber']").val();
           var batch = $("input[name='batch']").val();
           var quantity = $("input[name='quantity']").val();
           var unit = $("input[name='unit']").val();
           var specification = $("input[name='specification']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknkqydstoreorderdetails/sKcKnKqydStoreorderdetailsAdd",
            data : {
                "storeShortName": storeShortName,
                "storeCode": storeCode,
                "omsOrderNumber": omsOrderNumber,
                "mainOrderNumber": mainOrderNumber,
                "orderProcessCode": orderProcessCode,
                "orderTime": orderTime,
                "productCode": productCode,
                "productName": productName,
                "batchNumber": batchNumber,
                "batch": batch,
                "quantity": quantity,
                "unit": unit,
                "specification": specification,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
