<!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="purchaseReceiptNumber" id="purchaseReceiptNumber" 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="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="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="receiver" id="receiver" 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="receiptStatus" id="receiptStatus" 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="receiptTime" id="receiptTime" 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 purchaseReceiptNumber = $("input[name='purchaseReceiptNumber']").val();
           var purchaseOrderNumber = $("input[name='purchaseOrderNumber']").val();
           var supplier = $("input[name='supplier']").val();
           var totalCostAmount = $("input[name='totalCostAmount']").val();
           var receiver = $("input[name='receiver']").val();
           var receiptStatus = $("input[name='receiptStatus']").val();
           var receiptTime = $("input[name='receiptTime']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkdcshstorepurchasereceipt/sKcCrkDcshStorepurchasereceiptAdd",
            data : {
                "storeShortName": storeShortName,
                "purchaseReceiptNumber": purchaseReceiptNumber,
                "purchaseOrderNumber": purchaseOrderNumber,
                "supplier": supplier,
                "totalCostAmount": totalCostAmount,
                "receiver": receiver,
                "receiptStatus": receiptStatus,
                "receiptTime": receiptTime,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
