<!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="purchaseOrderNumber" id="purchaseOrderNumber" 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="purchaseRequestNumber" id="purchaseRequestNumber" 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="productSupplier" id="productSupplier" 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="documentStatus" id="documentStatus" 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="totalCostAmount" id="totalCostAmount" 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="headquartersConfirmationTime" id="headquartersConfirmationTime" 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 purchaseOrderNumber = $("input[name='purchaseOrderNumber']").val();
           var purchaseRequestNumber = $("input[name='purchaseRequestNumber']").val();
           var productSupplier = $("input[name='productSupplier']").val();
           var documentStatus = $("input[name='documentStatus']").val();
           var totalCostAmount = $("input[name='totalCostAmount']").val();
           var headquartersConfirmationTime = $("input[name='headquartersConfirmationTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkdcddstorepurchaseorder/sKcCrkDcddStorepurchaseorderAdd",
            data : {
                "storeShortName": storeShortName,
                "purchaseOrderNumber": purchaseOrderNumber,
                "purchaseRequestNumber": purchaseRequestNumber,
                "productSupplier": productSupplier,
                "documentStatus": documentStatus,
                "totalCostAmount": totalCostAmount,
                "headquartersConfirmationTime": headquartersConfirmationTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
