<!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="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="supplier" id="supplier" 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="creator" id="creator" 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="creationTime" id="creationTime" 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="reviewStatus" id="reviewStatus" 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="reviewer" id="reviewer" 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="reviewTime" id="reviewTime" 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 purchaseRequestNumber = $("input[name='purchaseRequestNumber']").val();
           var supplier = $("input[name='supplier']").val();
           var creator = $("input[name='creator']").val();
           var creationTime = $("input[name='creationTime']").val();
           var totalCostAmount = $("input[name='totalCostAmount']").val();
           var reviewStatus = $("input[name='reviewStatus']").val();
           var reviewer = $("input[name='reviewer']").val();
           var reviewTime = $("input[name='reviewTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkdcshstorepurchaserequest/sKcCrkDcshStorepurchaserequestAdd",
            data : {
                "storeShortName": storeShortName,
                "purchaseRequestNumber": purchaseRequestNumber,
                "supplier": supplier,
                "creator": creator,
                "creationTime": creationTime,
                "totalCostAmount": totalCostAmount,
                "reviewStatus": reviewStatus,
                "reviewer": reviewer,
                "reviewTime": reviewTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
