⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newrule.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>

<%@ include file="/agt/public/jsp/top.jsp" %>







<%@ page import = "java.net.*"%>



<!-- <title>新增考评规则</title>-->



<form name="RuleForm" method="post" action="/RuleAction.do" >

<input type="hidden" name="operatorflag" value = "RULE_ADD">

<input type="hidden" name="ruleid" >

                    
  <table width="539" height="35" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">规则名称*</td>

      <td colspan="3" class="td-cs2"> <label>

                          <input name="ruletitle" type="text" class="input2" size="20" maxlength=10>



        </label> </td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">规则说明</td>

      <td colspan="3" class="td-cs2">

<input name="rulenote" type="text" class="input2" size="50" maxlength=25></td>

    </tr>

    <tr>

                        <td height="25" colspan="4" align="center" class="td-cs1">详细信息*(以下选择各种数据所占比例)</td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">出勤率 </td>

      <td width="140" class="td-cs2"> 
        <label></label> 

        <input name="dutyratio" type="text" class="input1" size="2" >

        % </td>

                        <td width="110" align="center" class="td-cs1">工作量所占比例</td>

      <td width="151" class="td-cs2">&nbsp; 
        <input name="workratio" type="text" class="input1" size="2" >



        % </td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">平均处理时长</td>

      <td class="td-cs2"> 
        <input name="handleratio" type="text" class="input1" size="2" >

        % </td>

                        <td width="110" align="center" class="td-cs1">考评员考评资料</td>

      <td class="td-cs2">&nbsp; 
        <input name="qcratio" type="text" class="input1" size="2" >

        % </td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">社会监督员资料</td>

      <td class="td-cs2"> 
        <input name="monitorratio" type="text" class="input1" size="2" >

        %</td>

                        <td width="110" align="center" class="td-cs1">回访调查数据</td>

      <td class="td-cs2">&nbsp; 
        <input name="visitratio" type="text" class="input1" size="2" >

        % </td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">培训考试</td>

      <td class="td-cs2"> 
        <input name="trainratio" type="text" class="input1" size="2" >

        % </td>

      <td width="110" class="td-cs2">&nbsp;</td>

      <td class="td-cs2">&nbsp;</td>

    </tr>

    <tr>

                        <td width="110" height="25" align="center" class="td-cs1">分值转化方法*</td>

      <td colspan="3" class="td-cs2"> 

          <select name="methodid" class="input3">
      <%
        SysDbConn aplcoms = null;
        aplcoms = SysConnPool.getInstance().getAplComs();
        aplcoms.preparedQuery("");
        SysResultSet rs =aplcoms.csCommonQuery("SQL_AGT_QueryMethodList","1","-1").getResultSet();

       if (rs != null)
       {
      for (int k = 0; k < rs.getMetaData().getRecordCount(); k++)
       {
         rs.setRecord(k);
    %>
       <option value=<%= rs.getString(0) %> > <%=  rs.getString(1) %>  </option>

      <%
        }
     }
          if(aplcoms != null)
          {
             aplcoms.close();
          }

    %>
          </select>
       </td>

    </tr>

  </table>

  <table width="539" height="30" border="0" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td align="center"> <table width="424" height="30" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="25%">&nbsp; </td>
                              <td width="25%"><input name="save" type="image" onclick="SaveSubmit();return false;" src="/agt/public/images/save.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                              <td><input name="reset" type="image" onClick="RuleForm.reset();return false;" src="/agt/public/images/reset.gif" width="82" height="22" border="0" onMouseOver="this.src='/agt/public/images/'+ this.name + '_2.gif';" onMouseOut="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                            </tr>
                          </table>
</td>
                      </tr>
                    </table>

</form>

<script language="JavaScript" type="text/JavaScript">



function isNumber(str){

    if(str.length==0) return false;

  for(var i=0;i<str.length;i++){

      if((str.charAt(i)<'0') ||( str.charAt(i)>'9'))

        return false;

  }

  return true;

}





function CheckAvailable()

{

 var dutyr =(new Number(document.RuleForm.dutyratio.value)).valueOf();

 var workr =(new Number(document.RuleForm.workratio.value)).valueOf();

 var handler = (new Number(document.RuleForm.handleratio.value)).valueOf();

 var qcr =(new Number(document.RuleForm.qcratio.value)).valueOf();

 var monitorr =(new Number(document.RuleForm.monitorratio.value)).valueOf();

 var visitr = (new Number(document.RuleForm.visitratio.value)).valueOf();

 var trainr = (new Number(document.RuleForm.trainratio.value)).valueOf();



 if (document.RuleForm.ruletitle.value == "")

 {

    alert("规则名称不能为空");

    document.RuleForm.ruletitle.focus();

    return false;

 }

 else if (document.RuleForm.methodid.value == "")

 {

    alert("分值转换方法不能为空");

    document.RuleForm.methodid.focus();

    return false;

 }

  else if  ((document.RuleForm.dutyratio.value == "")||

           ((!(isNumber(document.RuleForm.dutyratio.value)))||

           (document.RuleForm.dutyratio.value > 100)||

           (document.RuleForm.dutyratio.value < 0)))

 {

    alert("出勤率应为0到100间的数字");

    document.RuleForm.dutyratio.focus();

    return false;

 }

  else if  ((document.RuleForm.workratio.value == "")||

           ((!(isNumber(document.RuleForm.workratio.value)))||

           (document.RuleForm.workratio.value > 100)||

           (document.RuleForm.workratio.value < 0)))

 {

    alert("工作量比率应为0到100间的数字");

    document.RuleForm.workratio.focus();

    return false;

 }

  else if  ((document.RuleForm.handleratio.value == "")||

           ((!(isNumber(document.RuleForm.handleratio.value)))||

           (document.RuleForm.handleratio.value > 100)||

           (document.RuleForm.handleratio.value < 0)))

 {

    alert("平均处理时长比率应为0到100间的数字");

    document.RuleForm.handleratio.focus();

    return false;

 }

  else if  ((document.RuleForm.qcratio.value == "")||

           ((!(isNumber(document.RuleForm.qcratio.value)))||

           (document.RuleForm.qcratio.value > 100)||

           (document.RuleForm.qcratio.value < 0)))

 {

    alert("考评员评分所占比率应为0到100间的数字");

    document.RuleForm.qcratio.focus();

    return false;

 }

  else if  ((document.RuleForm.monitorratio.value == "")||

           ((!(isNumber(document.RuleForm.monitorratio.value)))||

           (document.RuleForm.monitorratio.value > 100)||

           (document.RuleForm.monitorratio.value < 0)))

 {

    alert("社会监督评分所占比率应为0到100间的数字");

    document.RuleForm.monitorratio.focus();

    return false;

 }

  else if  ((document.RuleForm.visitratio.value == "")||

           ((!(isNumber(document.RuleForm.visitratio.value)))||

           (document.RuleForm.visitratio.value > 100)||

           (document.RuleForm.visitratio.value < 0)))

 {

    alert("回访调查数据所占比率应为0到100间的数字");

    document.RuleForm.visitratio.focus();

    return false;

 }

  else if  ((document.RuleForm.trainratio.value == "")||

           ((!(isNumber(document.RuleForm.trainratio.value)))||

           (document.RuleForm.trainratio.value > 100)||

           (document.RuleForm.trainratio.value < 0)))

 {

    alert("培训考试所占比率应为0到100间的数字");

    document.RuleForm.trainratio.focus();

    return false;

 }

  else if  ((dutyr + workr + handler + qcr + monitorr + visitr + trainr)!= 100)



 {

    alert("各项比例相加应该等于100");

    document.RuleForm.trainratio.focus();

    return false;

 }

  else

  {

    return true;

  }

}



function SaveSubmit(){

  if (CheckAvailable())

  {

    document.RuleForm.submit();

    return true;

  }

  else

  {

   return false;

  }

}



</script>











<%@ include file="/agt/public/jsp/bot.jsp" %> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -