<!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="week" id="week" 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="requisitionOrderCount" id="requisitionOrderCount" 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="requisitionItemRows" id="requisitionItemRows" 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="deliveryOrderCount" id="deliveryOrderCount" 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="deliveryItemRows" id="deliveryItemRows" 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="deliveryRowRatio" id="deliveryRowRatio" 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="requisitionQuantity" id="requisitionQuantity" 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="deliveryQuantity" id="deliveryQuantity" 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="deliveryQuantityRatio" id="deliveryQuantityRatio" 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="validAutoRequisitionRows" id="validAutoRequisitionRows" 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="modifiedAutoRequisitionRows" id="modifiedAutoRequisitionRows" 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="manuallyAddedRows" id="manuallyAddedRows" 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="manuallyDeletedRows" id="manuallyDeletedRows" 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="modifiedPercentage" id="modifiedPercentage" 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="addedPercentage" id="addedPercentage" 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="deletedPercentage" id="deletedPercentage" 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="confirmedSubmissionRows" id="confirmedSubmissionRows" 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="autoGeneratedRequisitionQuantity" id="autoGeneratedRequisitionQuantity" 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="confirmedSubmissionQuantity" id="confirmedSubmissionQuantity" 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 week = $("input[name='week']").val();
           var requisitionOrderCount = $("input[name='requisitionOrderCount']").val();
           var requisitionItemRows = $("input[name='requisitionItemRows']").val();
           var deliveryOrderCount = $("input[name='deliveryOrderCount']").val();
           var deliveryItemRows = $("input[name='deliveryItemRows']").val();
           var deliveryRowRatio = $("input[name='deliveryRowRatio']").val();
           var requisitionQuantity = $("input[name='requisitionQuantity']").val();
           var deliveryQuantity = $("input[name='deliveryQuantity']").val();
           var deliveryQuantityRatio = $("input[name='deliveryQuantityRatio']").val();
           var validAutoRequisitionRows = $("input[name='validAutoRequisitionRows']").val();
           var modifiedAutoRequisitionRows = $("input[name='modifiedAutoRequisitionRows']").val();
           var manuallyAddedRows = $("input[name='manuallyAddedRows']").val();
           var manuallyDeletedRows = $("input[name='manuallyDeletedRows']").val();
           var modifiedPercentage = $("input[name='modifiedPercentage']").val();
           var addedPercentage = $("input[name='addedPercentage']").val();
           var deletedPercentage = $("input[name='deletedPercentage']").val();
           var confirmedSubmissionRows = $("input[name='confirmedSubmissionRows']").val();
           var autoGeneratedRequisitionQuantity = $("input[name='autoGeneratedRequisitionQuantity']").val();
           var confirmedSubmissionQuantity = $("input[name='confirmedSubmissionQuantity']").val();

        $.ajax({
            cache : true,
            type : "POST",
            url : ctx + "kc/skccrkweeklyrequisitionstats/sKcCrkWeeklyrequisitionstatsAdd",
            data : {
                "week": week,
                "requisitionOrderCount": requisitionOrderCount,
                "requisitionItemRows": requisitionItemRows,
                "deliveryOrderCount": deliveryOrderCount,
                "deliveryItemRows": deliveryItemRows,
                "deliveryRowRatio": deliveryRowRatio,
                "requisitionQuantity": requisitionQuantity,
                "deliveryQuantity": deliveryQuantity,
                "deliveryQuantityRatio": deliveryQuantityRatio,
                "validAutoRequisitionRows": validAutoRequisitionRows,
                "modifiedAutoRequisitionRows": modifiedAutoRequisitionRows,
                "manuallyAddedRows": manuallyAddedRows,
                "manuallyDeletedRows": manuallyDeletedRows,
                "modifiedPercentage": modifiedPercentage,
                "addedPercentage": addedPercentage,
                "deletedPercentage": deletedPercentage,
                "confirmedSubmissionRows": confirmedSubmissionRows,
                "autoGeneratedRequisitionQuantity": autoGeneratedRequisitionQuantity,
                "confirmedSubmissionQuantity": confirmedSubmissionQuantity,
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
