<div class="container-fluid edit-form-padding">
    <form id="exportForm" class="form-horizontal"  th:attr="action=${exportUrl}" method="post">
          
	    <input type="hidden" id="moduleName" name="moduleName" th:value="${moduleName}"/>
	     <input type="hidden" id="exportUrl" name="exportUrl" th:value="${exportUrl}"/>
	    
	    <div class="form-group">
	        <label class="col-xs-4 control-label req">请选择导出的数据：</label>
	        <div class="col-xs-4 checkbox">
	            <label> <input type="radio" name="pageOnly" value="false" checked>导出全部数据</label>
	            <label> <input type="radio" name="pageOnly" value="true">导出本页数据</label>
	        </div>
	    </div>
    </form>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        var moduleName = $('#moduleName').val();
        var exportUrl = $('#exportUrl').val();

        $("#exportForm").validate({
            submitHandler: function (form) {
                $("#exportForm").attr('action',exportUrl);
                var param = $(gridTable).jqGrid('getGridParam').postData;
                $.each(param, function (name, value) {
                    $('#exportForm').append('<input type="hidden" name="' + name + '" value="' + value + '">');
                });
                form.submit();
                sxUtil.msgbox.success('后台正在导出。。。');
                sxUtil.dialog.close($(form).data('index'));
            }
        });
    });
</script>
