<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/init.jsp"%>
<script type="text/javascript" src="${ctx}/resources/js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(function(){
    $('#dbfPaperInfo-search-form').submit(function(event){
        event.preventDefault(); 
        var param = $('#dbfPaperInfo-search-form').serializeJson();
        $('#dbfPaperInfoDG').datagrid('load',param);
    });
    
    $('#findRelatedPapersForm').submit(function(event){
        event.preventDefault(); 
        var param = $('#findRelatedPapersForm').serializeJson();
        $('#findRelatedPapersDG').datagrid('load',param);
    });
    
    $("#findRelatedPapersBtn").on('click',function(){
        $('#findRelatedPapersForm').submit();
    });
    
    $("#dbfPaperInfoSearchBtn").on('click',function(){
        $('#dbfPaperInfo-search-form').submit();
    });
    
    swfuDbfPaperInfo = new SWFUpload({
        upload_url :"${ctx}/dbfPaperInfo/DBFUpload/${paperBatch.id}",
        use_query_string : false,
        
       // File Upload Settings
       file_size_limit : "10 MB",  // 1000MB
       file_types : "*.DBF",
       file_types_description : "所有文件",
       file_upload_limit : "1",
                       
       file_queue_error_handler : fileQueueError,
       file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
       upload_progress_handler : uploadProgress,
       upload_error_handler : uploadError,
       upload_success_handler : uploadDbfPaperInfoSuccess,
       
       // Button Settings
       button_image_url : '${ctx}/resources/images/SmallSpyGlassWithTransperancy_17x18.png',
       button_placeholder_id : "dbfPaperInfoUploadBtnSpan",
       button_width: 180,
       button_height: 18,
       button_text : '<span class="button">导入课程与教材信息(dbf)<spn class="buttonSmall"></span></span>',
       button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; } .buttonSmall { font-size: 10px; color: #ff0000;}',
       button_text_top_padding: 0,
       button_text_left_padding: 18,
       button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
       button_cursor: SWFUpload.CURSOR.HAND,
       
       // Flash Settings
       flash_url : '${ctx}/resources/js/swfupload/swfupload.swf',

       custom_settings : {
           upload_target : "divFileProgressContainer"
       },
       // Debug Settings
       debug: false  //是否显示调试窗口
   });
});

function uploadDbfPaperInfoSuccess(file, serverData) {
    if(serverData=="success"){
        $.messager.alert('提示','导入成功');
        $("#uploadDbfPaperInfo").window('close');
        $('#dbfPaperInfoDG').datagrid('reload');
       uploadSuccessNum++;
    }else{
        $.messager.alert('提示',serverData);
    }
    $(document).unmask();
}

function matchPapers(paperBatchId){
    $(document).mask('正在操作，请稍等...');
    $.ajax({
        type : "POST",
        url : "${ctx}/dbfPaperInfo/autoMatchPapers/" + paperBatchId,
        success : function(callback) {
            $(document).unmask();
            if(callback.flag=="success"){
                $.messager.alert('提示','自动匹配试卷完成！');
                $('#dbfPaperInfoDG').datagrid('reload');
            }else{
                $.messager.alert('提示','自动匹配试卷失败！');
            }
        }
    });
    
}

function relatedPaperCountCellStyler(value, row, index){
   if (value==0){
        return 'background-color:#ffee00;color:red;';
    }else{
        return 'color:green;';
    }
}
var index;
function daiding(){
	var rowData=$('#dbfPaperInfoDG').datagrid('getRows')[index];
	if(rowData.df=='0'){
		$.messager.alert('提示','选中的行已经是待定状态,无法做待定操作','error');
	}else{
		$.messager.confirm("操作提示", "是否做待定操作?", function (data) {
			if (data) {
				var obj={
	            		"id" : rowData.id,
	            		"df" : 0
	            	};
				var DbfPaperInfo=JSON.stringify(obj);
				sendDFAjax(DbfPaperInfo);
			}
		});
	}
}
function fouding(){
	var rowData=$('#dbfPaperInfoDG').datagrid('getRows')[index];
	if(rowData.df=='1'){
		$.messager.alert('提示','选中的行已经是否定状态,无法做否定操作','error');
	}else{
		$.messager.confirm("操作提示", "是否做否定操作?", function (data) {
			if (data) {
				var obj={
	            		"id" : rowData.id,
	            		"df" : 1
	            	};
				var DbfPaperInfo=JSON.stringify(obj);
				sendDFAjax(DbfPaperInfo);
			}
		});
	}
}
function onClickCell(rowIndex, field,value ){
	if(field=="relatedPaperNum"){
		var rowData=$('#dbfPaperInfoDG').datagrid('getRows')[rowIndex];
		index=rowIndex;
	    if(rowData.relatedPaperNum > 0){
	        showRelatedPapers(rowIndex, rowData);
	    }else{
	        showFindRelatedPapers(rowIndex, rowData);
	    }
	}else if(field=='df'){
		var rowData=$('#dbfPaperInfoDG').datagrid('getRows')[rowIndex];
		if(value==0){
			$.messager.confirm("操作提示", "是否做否定操作?", function (data) {
				if (data) {
					var obj={
		            		"id" : rowData.id,
		            		"df" : 1
		            	};
					var DbfPaperInfo=JSON.stringify(obj);
					sendDFAjax(DbfPaperInfo);
				}
			});
		}else if(value==1){
			$.messager.confirm("操作提示", "是否做待定操作?", function (data) {
				if (data) {
					var obj={
		            		"id" : rowData.id,
		            		"df" : 0
		            	};
					var DbfPaperInfo=JSON.stringify(obj);
					sendDFAjax(DbfPaperInfo);
				}
			});
		}
	}
}
function sendDFAjax(DbfPaperInfo){
	$.ajax({
		type : "POST",
		url : "${ctx}/dbfPaperInfo/updateDF",
		data :  DbfPaperInfo ,
		contentType : "application/json; charset=utf-8",
		dataType : "json",
		success : function(callback) {
			callback=eval(callback);
			if(callback.type=="success"){
				$.messager.alert('提示','操作完成','info');
				$('#dbfPaperInfoDG').datagrid('reload');
			}
		}
	});
}

function showRelatedPapers(rowIndex, rowData){
    $('#relatedPapersDG').datagrid('load', {dbfPaperInfoId:rowData.id});
    $('#rp_dbfPaperInfoId').val(rowData.id);
    $('#rp_dbfPaperInfoDGRowIndex').val(rowIndex);
    $("#relatedPapers").window('open');
}

function showFindRelatedPapers(rowIndex, rowData){
    $('#findRelatedPapersDG').datagrid('load', {dbfPaperInfoId:rowData.id, courseCode:rowData.courseCode});
    $('#frp_courseCode').val(rowData.courseCode);
    $('#frp_courseName').val(rowData.courseName);
    $('#frp_bookName').val(rowData.bookName);
    $('#frp_bookAuthor').val(rowData.bookAuthor);
    $('#frp_bookPress').val(rowData.bookPress);
    $('#frp_bookPressYear').val(rowData.bookPressYear);
    $('#frp_dbfPaperInfoId').val(rowData.id);
    $("#findRelatedPapers").window('open');
}

function addToUsedBatch(){
    var selectedRows = $('#findRelatedPapersDG').datagrid('getSelections');
    if(selectedRows.length < 1){
        $.messager.alert('提示', '请选择一行记录！', 'info');
        return;
    }
    
    var hasDraftPapers = false;
    for(var i = 0; i < selectedRows.length; i++){
        if('DRAFT' == selectedRows[i].status){
            hasDraftPapers = true;
            break;
        }
     }
    
    if(hasDraftPapers){
        $.messager.confirm('确认', '选中的列表中包含毛坯状态的试卷，确定要启用吗？', function(r){
           if (r){
               doAddToUsedBatch();
           }
         });
    }else{
        doAddToUsedBatch();
    }
        
}

function doAddToUsedBatch(){
    var dbfPaperInfoId = $('#frp_dbfPaperInfoId').val();
    var selectedRows = $('#findRelatedPapersDG').datagrid('getSelections');
    
    var relatedPaperIds = [];
    for(var i = 0; i < selectedRows.length; i++){
        relatedPaperIds.push(selectedRows[i].id);
    }
    $.ajax({
        type : "POST",
        url : "${ctx}/dbfPaperInfo/manualAddMatchedPapers",
        data : {dbfPaperInfoId: dbfPaperInfoId, relatedPaperIds : relatedPaperIds},
        dataType : "json",
        success: function(){
            $("#findRelatedPapers").window('close');
            $('#dbfPaperInfoDG').datagrid('reload');
        }
    });
}

function removePaperFromUsedBatch(){
    var selectedRows = $('#relatedPapersDG').datagrid('getSelections');
    if(selectedRows.length < 1){
        $.messager.alert('提示','请选中一行或多行记录！');
    }else{
        
        var dbfPaperInfoId = $('#rp_dbfPaperInfoId').val();
        var relatedPaperIds = [];
        for(var i = 0; i < selectedRows.length; i++){
            relatedPaperIds.push(selectedRows[i].id);
        }

        $(document).mask('正在操作，请稍等...');
        $.ajax({
            type : "POST",
            url : "${ctx}/dbfPaperInfo/removePaperFromUsedBatch",
            data : {dbfPaperInfoId: dbfPaperInfoId, relatedPaperIds : relatedPaperIds},
            dataType : "json",
            success: function(){
                $(document).unmask();
                $.messager.alert('提示','操作成功！');
                $('#relatedPapersDG').datagrid('reload');
                $('#dbfPaperInfoDG').datagrid('reload');
            }
        });
    }
}

function goFindRelatedPapers(){
    var rowIndex = $('#rp_dbfPaperInfoDGRowIndex').val();
    $("#relatedPapers").window('close');
    var rows = $('#dbfPaperInfoDG').datagrid('getRows');
    showFindRelatedPapers(rowIndex, rows[rowIndex]);
    
}

function removeDbfPaperInfo(){
    var selectedRows = $('#dbfPaperInfoDG').datagrid('getSelections');
    if(selectedRows.length < 1){
        $.messager.alert('提示','请选中一行或多行记录！');
    }else{
        var hasRelatedPapers = false;
        for(var i = 0; i < selectedRows.length; i++){
            if(selectedRows[i].relatedPaperNum > 0){
                hasRelatedPapers = true;
                break;
            }
        }
        if(hasRelatedPapers){
            $.messager.confirm('确认', '是否将课程下关联的试卷移出批次？', function(r){
               if (r){
                   doRemoveDbfPaperInfo(true);
               }else{
                   doRemoveDbfPaperInfo(false);
               }
             });
        }else{
            doRemoveDbfPaperInfo(false);
        }
    }
}

function doRemoveDbfPaperInfo(isRemoveRelatedPapers){
    var selectedRows = $('#dbfPaperInfoDG').datagrid('getSelections');
    var dbfPaperInfoIds = [];
    for(var i = 0; i < selectedRows.length; i++){
        dbfPaperInfoIds.push(selectedRows[i].id);
    }
    
    $(document).mask('正在操作，请稍等...');
    $.ajax({
        type : "POST",
        url : "${ctx}/dbfPaperInfo/removeDbfPaperInfoFromBatch",
        data : {dbfPaperInfoIds: dbfPaperInfoIds, isRemoveRelatedPapers: isRemoveRelatedPapers},
        dataType : "json",
        success: function(){
            $(document).unmask();
            $.messager.alert('提示','操作成功！');
            $('#dbfPaperInfoDG').datagrid('reload');
            $('#dbfPaperInfoDG').datagrid('clearChecked');
        }
    });
}
function DBClickCell(rowIndex, field, value){
	if(field=='bookName'||field=='bookAuthor'||field=='bookPress'||field=='bookPressYear'){
		$.messager.confirm("操作提示", "是否编辑选中行的信息", function (data) {
			if (data) {
				$('#findRelatedPapersDG').datagrid('rejectChanges');
				$('#findRelatedPapersDG').datagrid('selectRow', rowIndex).datagrid('beginEdit', rowIndex);
			}
		});
	}
}
function rejectChange(){
	$('#findRelatedPapersDG').datagrid('rejectChanges');
}
var editIndex = undefined;
var index;
var parentIndex;

function acceptChange(){
	
	var row = $('#findRelatedPapersDG').datagrid('getSelected');
	if(row==null){
		return;
	}
	var id=row.id;
	var bookName=$('#findRelatedPapersDG').datagrid('getEditor',{index:index,field:"bookName"});
	var bookAuthor=$('#findRelatedPapersDG').datagrid('getEditor',{index:index,field:"bookAuthor"});
	var bookPress=$('#findRelatedPapersDG').datagrid('getEditor',{index:index,field:"bookPress"});
	var bookPressYear=$('#findRelatedPapersDG').datagrid('getEditor',{index:index,field:"bookPressYear"});
	
	if($(bookName.target).val() ==''||$(bookAuthor.target).val()==''||$(bookPress.target).val()==''||$(bookPressYear.target).val()==''){
		$.messager.alert('提示','修改后的信息不能存在空值的情况','error');
		return;
	}
	if($(bookPressYear.target).val().length>10){
		$.messager.alert('提示','修改的版次字段长度过长','error');
		return;
	}
	
	
	var obj={
			"id" :id,
			"bookName"	:$(bookName.target).val(),
			"bookAuthor":$(bookAuthor.target).val(),
			"bookPress"	:$(bookPress.target).val(),
			"bookPressYear"	:$(bookPressYear.target).val()
		};
	$.ajax({
		type : "POST",
		url : "${ctx}/examPaper/updatePaper",
		data :  JSON.stringify(obj) ,
		contentType : "application/json; charset=utf-8",
		dataType : "json",
		success : function(callback) {
			callback=eval(callback);
			if(callback.result=='success'){
				$('#findRelatedPapersDG').datagrid('reload');
				$.messager.alert('提示','修改成功','info');
			}else{
				$('#findRelatedPapersDG').datagrid('reload');
				$.messager.alert('提示','修改失败','error');
			}
		}
	});
}
function selectRows(rowIndex, rowData){
	index=rowIndex;
}

function selectParentRows(rowIndex, rowData){
	parentIndex=rowIndex;
}
function editInfoChange(){
	var row = $('#findRelatedPapersDG').datagrid('getSelected');
    if (row){
    	$('#findRelatedPapersDG').datagrid('rejectChanges');
		$('#findRelatedPapersDG').datagrid('selectRow', index).datagrid('beginEdit', index);
    }
    else{
    	$.messager.alert('提示','请选择需要修改的试卷信息','error');
    }
}
function previous(){
	var grid = $('#dbfPaperInfoDG');
	var options = grid.datagrid('getPager').data("pagination").options;
	var currPage = options.pageNumber;
	var totalCount = options.total;
	var maxPage = Math.ceil(totalCount/options.pageSize);
	
	if(parentIndex=='0'&&currPage=='1'){
		$.messager.alert('提示','当前为第一页第一条数据,无法选择上一条','error');
		return;
	}else{
		if(parentIndex=='0'){
			currPage--;
			grid.datagrid({pageNumber:currPage});
			//选中
			grid.datagrid('selectRow', options.pageSize-1);
			
			var row = grid.datagrid('getSelected');
			$('#findRelatedPapersDG').datagrid('load',{courseCode:row.courseCode,dbfPaperInfoId:row.id});
			setValue(row);
			//alert(row.courseCode+"                   "+row.id);
		}else{
			parentIndex--;
			grid.datagrid("clearChecked");
			grid.datagrid('selectRow', parentIndex);
			
			var row = grid.datagrid('getSelected');
			$('#findRelatedPapersDG').datagrid('load',{courseCode:row.courseCode,dbfPaperInfoId:row.id});
			setValue(row);
			//alert(row.courseCode+"                   "+row.id);
		}
	}
}
function next(){
	var grid = $('#dbfPaperInfoDG');
	var options = grid.datagrid('getPager').data("pagination").options;
	var currPage = options.pageNumber;
	var totalCount = options.total;
	var maxPage = Math.ceil(totalCount/options.pageSize);
	
	//var row = $('#dg').datagrid('getSelected');
	var currCount=parentIndex+(currPage-1)*options.pageSize+1;
	if(currCount==totalCount&&currPage==maxPage){
		$.messager.alert('提示','当前为最后一页最后一条数据,无法选择下一条','error');
		return;
	}else{
		if(parentIndex=='9'){
			currPage++;
			grid.datagrid({pageNumber:currPage});
			grid.datagrid('selectRow', 0);
			
			var row = grid.datagrid('getSelected');
			$('#findRelatedPapersDG').datagrid('load',{courseCode:row.courseCode,dbfPaperInfoId:row.id});
			setValue(row);
			//alert(row.courseCode+"                   "+row.id);
		}else{
			parentIndex++;
			grid.datagrid("clearChecked");
			grid.datagrid('selectRow', parentIndex);
			
			var row = grid.datagrid('getSelected');
			$('#findRelatedPapersDG').datagrid('load',{courseCode:row.courseCode,dbfPaperInfoId:row.id});
			setValue(row);
			//alert(row.courseCode+"                   "+row.id);
		}
	}
}

function setValue(rowData){
	$('#frp_courseCode').val(rowData.courseCode);
    $('#frp_courseName').val(rowData.courseName);
    $('#frp_bookName').val(rowData.bookName);
    $('#frp_bookAuthor').val(rowData.bookAuthor);
    $('#frp_bookPress').val(rowData.bookPress);
    $('#frp_bookPressYear').val(rowData.bookPressYear);
    $('#frp_dbfPaperInfoId').val(rowData.id);
}
</script>

<div id="uploadDbfPaperInfo" class="easyui-window" title="导入教材与课程信息" data-options="modal:true,closed:true,iconCls:'icon-import'" style="width:600px;height:200px;padding:10px;">
    <div id="do_import_button">
        <div class="uploadMsg" ></div>
        <span id="dbfPaperInfoUploadBtnSpan"></span>
    </div>
    <br />
        <div>
        	提示:<br />
        		&nbsp;&nbsp;&nbsp;&nbsp;导入的DBF文件需要有:
        		<div align="center" style="color: red">
        			<table style="border-collapse: collapse;" class="tongjiTab">
        				<tr>
        					<td>字段名称</td>
        					<td>KCDM</td>
        					<td>KCMC</td>
        					<td>JC</td>
        					<td>BZ</td>
        					<td>CBS</td>
        					<td>BC</td>
        				</tr>
        				<tr>
        					<td>字段含义</td>
        					<td>课程代码</td>
        					<td>课程名称</td>
        					<td>教材</td>
        					<td>编者</td>
        					<td>出版社</td>
        					<td>版次</td>
        				</tr>
        				<tr>
        					<td>数据类型</td>
        					<td>字符串</td>
        					<td>字符串</td>
        					<td>字符串</td>
        					<td>字符串</td>
        					<td>字符串</td>
        					<td>字符串</td>
        				</tr>
        			</table>
        		 	
        		 </div> 
        </div>
</div>

<div id="relatedPapers" class="easyui-window" title="关联试卷信息" data-options="modal:true,closed:true,iconCls:'icon-import'" style="width:1100px;height:500px;padding:10px;">
    <table id="relatedPapersDG" class="easyui-datagrid"
    data-options="
       url: '${ctx}/dbfPaperInfo/queryRelatedPapers',
      fitColumns:true
      ,singleSelect:false
      ,toolbar:'#tb_relatedPapers'
      ,striped:true">
        <thead>
            <tr class="title">
                <th rowspan="2" data-options="field:'ck',checkbox:true"></th>
                <th rowspan="2" data-options="field:'code',width:75">试卷代码</th>
                <th rowspan="2" data-options="field:'status',width:30,formatter: formatStatus">状态</th>
                <th rowspan="2" data-options="field:'courseCode',width:45">课程代码</th>
                <th rowspan="2" data-options="field:'courseName',width:180">课程名称</th>
                <th rowspan="2" data-options="field:'bookName',width:190">教材名称</th>
                <th rowspan="2" data-options="field:'bookAuthor',width:100">编者</th>
                <th rowspan="2" data-options="field:'bookPress',width:100">出版社</th>
                <th rowspan="2" data-options="field:'bookPressYear',width:35">版次</th>
            </tr>
        </thead>
      </table>
      
      <div id="tb_relatedPapers" style="height:auto">
          <div style="margin-bottom:5px">
              <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removePaperFromUsedBatch()">移出批次</a>
              <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="goFindRelatedPapers()">手工查找试卷</a>
              <input id="rp_dbfPaperInfoId" name="dbfPaperInfoId" type="hidden" />
              <input id="rp_dbfPaperInfoDGRowIndex" type="hidden" />
           </div>
       </div>
</div>

<div id="findRelatedPapers" class="easyui-window" title="手工关联试卷信息" data-options="modal:true,closed:true,iconCls:'icon-import'" style="width:1100px;height:500px;padding:10px;">
    <table id="findRelatedPapersDG" class="easyui-datagrid"
    data-options="
      url: '${ctx}/dbfPaperInfo/searchRelatedPapers',
      fitColumns:true
      ,singleSelect:false
      ,toolbar:'#tb_findRelatedPapers'
      ,striped:true,
      onDblClickCell:DBClickCell,
      onSelect:selectRows">
        <thead>
            <tr class="title">
                <th rowspan="2" data-options="field:'ck',checkbox:true"></th>
                <th rowspan="2" data-options="field:'code',width:75">试卷代码</th>
                <th rowspan="2" data-options="field:'status',width:30,formatter: formatStatus">状态</th>
                <th rowspan="2" data-options="field:'courseCode',width:45">课程代码</th>
                <th rowspan="2" data-options="field:'courseName',width:180">课程名称</th>
                <th rowspan="2" data-options="field:'bookName',width:190,editor:{
	                                   type:'validatebox',
	                                   options:{
	                                       required:true
	                                       }
	                                   }">教材名称</th>
                <th rowspan="2" data-options="field:'bookAuthor',width:100,editor:{
	                                   type:'validatebox',
	                                   options:{
	                                       required:true
	                                       }
	                                   }">编者</th>
                <th rowspan="2" data-options="field:'bookPress',width:100,editor:{
	                                   type:'validatebox',
	                                   options:{
	                                       required:true
	                                       }
	                                   }">出版社</th>
                <th rowspan="2" data-options="field:'bookPressYear',width:30,editor:{
	                                   type:'validatebox',
	                                   options:{
	                                       required:true
	                                       }
	                                   }">版次</th>
            </tr>
        </thead>
      </table>
      
      <div id="tb_findRelatedPapers" style="height:auto">
          <div style="margin-bottom:5px">
              <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addToUsedBatch()">添加到批次</a>
              <%-- <c:if test="${paperBatch.type=='启用'}"> --%>
              	<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-confirm',plain:true" onclick="daiding()">待定</a>
              	<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="fouding()">否定</a>
              <%-- </c:if> --%>
              
              <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" id="findRelatedPapersBtn">查找</a>
              <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="editInfoChange()">编辑</a>
			  <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="acceptChange()">保存修改</a>
			  <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="rejectChange()">撤销编辑</a>
			  <!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="previous()">上一条</a>
			  <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-redo',plain:true" onclick="next()">下一条</a> -->
           </div>
           
           <div style="padding-left: 170px;">
                <form id="findRelatedPapersForm" method="post" >
                	<table>
                		<tr>
                			<td ><span>课程代码:</span></td>
                			<td><span>课程名称:</span></td>
                			<td ><span>教材名称:</span></td>
                			<td ><span>编者:</span></td>
                			<td ><span>出版社:</span></td>
                			<td ><span>版次:</span></td>
                		</tr>
                		<tr>
                			<td ><input id="frp_courseCode" name="courseCode" style="width: 55px;"/></td>
                			<td ><input id="frp_courseName" name="courseName" style="width: 240px;"/></td>
                			<td > <input id="frp_bookName" name="bookName" style="width: 250px;"/></td>
                			<td ><input id="frp_bookAuthor" name="bookAuthor" style="width: 130px;"/></td>
                			<td ><input id="frp_bookPress" name="bookPress" style="width: 130px;"/></td>
                			<td ><input id="frp_bookPressYear" name="bookPressYear" style="width: 30px;"/></td>
                		</tr>
                	</table>
                	<input id="frp_dbfPaperInfoId" name="dbfPaperInfoId" type="hidden" />
                   <!-- <span>课程代码:</span>
                   <input id="frp_courseCode" name="courseCode" style="width: 45px;" />
                   <span>课程名称:</span>
                   <input id="frp_courseName" name="courseName" style="width: 180px;"/>
                   <span>教材名称:</span>
                   <input id="frp_bookName" name="bookName" style="width: 190px;"/>
                   <span>编者:</span>
                   <input id="frp_bookAuthor" name="bookAuthor" style="width: 100px;"/>
                   <span>出版社:</span>
                   <input id="frp_bookPress" name="bookPress" style="width: 100px;"/>
                   <span>版次:</span>
                   <input id="frp_bookPressYear" name="bookPressYear" style="width: 30px;"/>
                   <input id="frp_dbfPaperInfoId" name="dbfPaperInfoId" type="hidden" />
                   
                   <a href="#" class="easyui-linkbutton" iconCls="icon-search" id="search1">查找</a> -->
                </form>
           </div>
      </div>
      
      <div align="center" style="padding-top: 50px;">
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="previous()">上一条</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-redo',plain:true" onclick="next()">下一条</a>
	</div>
</div>

