<!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="region" id="region" 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">门店名称:</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="storeAttribute" id="storeAttribute" 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="generatedTasks" id="generatedTasks" 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="batchTasks" id="batchTasks" 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="totalTasks" id="totalTasks" 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="completedTasks" id="completedTasks" 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="completedBatchTasks" id="completedBatchTasks" 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="completedTotalTasks" id="completedTotalTasks" 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 region = $("input[name='region']").val();
           var storeCode = $("input[name='storeCode']").val();
           var storeName = $("input[name='storeName']").val();
           var storeAttribute = $("input[name='storeAttribute']").val();
           var generatedTasks = $("input[name='generatedTasks']").val();
           var batchTasks = $("input[name='batchTasks']").val();
           var totalTasks = $("input[name='totalTasks']").val();
           var completedTasks = $("input[name='completedTasks']").val();
           var completedBatchTasks = $("input[name='completedBatchTasks']").val();
           var completedTotalTasks = $("input[name='completedTotalTasks']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skcknstoreinventorystats/sKcKnStoreinventorystatsAdd",
            data : {
                "region": region,
                "storeCode": storeCode,
                "storeName": storeName,
                "storeAttribute": storeAttribute,
                "generatedTasks": generatedTasks,
                "batchTasks": batchTasks,
                "totalTasks": totalTasks,
                "completedTasks": completedTasks,
                "completedBatchTasks": completedBatchTasks,
                "completedTotalTasks": completedTotalTasks,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
