<div class="wrap">
    <h2>{{req.name}}{{req.year}}年{{req.month}}月业绩列表</h2>
    {{function("QuotaYearList::displayMonthTable")}}
</div>
<script>
    $(document).ready(function () {
        $("#the-list").on("click","td > .button.action",function(){
            var price = $(this).prev().val();
            var id = $(this).prev().attr("name");
            var params = {
                action:"replaceQuota",
                year:{{req.year}},
                month:{{req.month}},
                id:id,
                price:price
            };
            $.ajax({
                type: "post",
                url: "admin-ajax.php",
                data: params,
                success:function(json){
                    if(json.code == 200)
                        alert("设置业绩目标成功");
                    else
                        alert(json.msg);
                }
            });
        });
    });
</script>