ruleData.jsp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>操作信息</title>
  7. <t:base type="jquery,easyui,tools"></t:base>
  8. <script type="text/javascript">
  9. function ruleConditionsChange(){
  10. var ruleConditions = $('select[name="ruleConditions"]').val();
  11. if(ruleConditions === 'IN'){
  12. $('#ruleConditionsIN').removeClass("ruleConditionsHide");
  13. $('#ruleConditionsOther').addClass("ruleConditionsHide");
  14. }else{
  15. $('#ruleConditionsOther').removeClass("ruleConditionsHide");
  16. $('#ruleConditionsIN').addClass("ruleConditionsHide");
  17. }
  18. }
  19. function beforeSubmitRemoveDiv(){
  20. var ruleConditions = $('select[name="ruleConditions"]').val();
  21. if(ruleConditions !== 'IN'){
  22. $('#ruleConditionsIN').remove();
  23. }else{
  24. $('#ruleConditionsOther').remove();
  25. }
  26. return true;
  27. }
  28. </script>
  29. </head>
  30. <body style="overflow-y: hidden" scroll="no">
  31. <t:formvalid formid="formobj" layout="div" dialog="true" action="functionController.do?saverule" beforeSubmit="beforeSubmitRemoveDiv">
  32. <input name="id" type="hidden" value="${operation.id}">
  33. <fieldset class="step">
  34. <div class="form">
  35. <label class="Validform_label"> 规则名称: </label>
  36. <input name="ruleName" class="inputxt" value="${operation.ruleName}" datatype="s2-20">
  37. <span class="Validform_checktip"> <t:mutiLang langKey="operatename.rang2to20"/></span>
  38. </div>
  39. <div class="form">
  40. <label class="Validform_label"> 规则字段: </label>
  41. <input name="ruleColumn" class="inputxt" type="hidden" value="${TSFunctionRule.ruleColumn}"/>
  42. <input name="ruleColumnStr" class="inputxt" readonly value="${TSFunctionRule.ruleName}"/>
  43. </div>
  44. <div class="form">
  45. <label class="Validform_label"> 条件规则: </label>
  46. <t:dictSelect field="ruleConditions" typeGroupCode="rulecon" hasLabel="false" defaultVal="${operation.ruleConditions}" onchange="ruleConditionsChange()"></t:dictSelect>
  47. </div>
  48. <input name="TSFunction.id" value="${functionId}" type="hidden">
  49. <div class="form">
  50. <label class="Validform_label"> 规则值: </label>
  51. <%-- <input name="ruleValue" class="inputxt" readonly value="${operation.ruleValue}"/>--%>
  52. <c:if test="${ TSFunctionRuleValues.ruleType != null && TSFunctionRuleValues.ruleType == 'group' }">
  53. <div id="ruleConditionsIN" class="${empty operation.ruleConditions || operation.ruleConditions != 'IN' ? 'ruleConditionsHide' : ''}">
  54. <t:dictSelect id="dictSelectIN" field="ruleValue" type="checkbox" typeGroupCode="${TSFunctionRuleValues.ruleValue}" hasLabel="false" title="in" defaultVal="${operation.ruleValue}"></t:dictSelect>
  55. </div>
  56. <div id="ruleConditionsOther" class="${!empty operation.ruleConditions && operation.ruleConditions == 'IN' ? 'ruleConditionsHide' : ''}">
  57. <t:dictSelect id="dictSelectOther" field="ruleValue" type="select" typeGroupCode="${TSFunctionRuleValues.ruleValue}" hasLabel="false" title="other" defaultVal="${operation.ruleValue}"></t:dictSelect>
  58. </div>
  59. </c:if>
  60. <c:if test="${ TSFunctionRuleValues.ruleType != null && TSFunctionRuleValues.ruleType == 'join' }">
  61. <div id="ruleConditionsIN" class="${empty operation.ruleConditions || operation.ruleConditions != 'IN' ? 'ruleConditionsHide' : ''}">
  62. <t:dictSelect id="dictSelectIN" field="ruleValue" type="checkbox" dictTable="${TSFunctionRuleValues.ruleTable}" dictField="${TSFunctionRuleValues.ruleValue}" dictText="${TSFunctionRuleValues.ruleName}" defaultVal="${operation.ruleValue}"
  63. hasLabel="false" title="in" extendJson="{class:'form-control',style:'width:150px'}"></t:dictSelect>
  64. </div>
  65. <div id="ruleConditionsOther" class="${!empty operation.ruleConditions && operation.ruleConditions == 'IN' ? 'ruleConditionsHide' : ''}">
  66. <t:dictSelect id="dictSelectOther" field="ruleValue" type="select" dictTable="${TSFunctionRuleValues.ruleTable}" dictField="${TSFunctionRuleValues.ruleValue}" dictText="${TSFunctionRuleValues.ruleName}" defaultVal="${operation.ruleValue}"
  67. hasLabel="false" title="other" extendJson="{class:'form-control',style:'width:150px'}"></t:dictSelect>
  68. </div>
  69. </c:if>
  70. <%-- <input name="ruleValue" class="inputxt" value="${operation.ruleValue}">--%>
  71. <%-- <t:dictSelect field="ruleConditions" typeGroupCode="rulecon" hasLabel="false" defaultVal="${operation.ruleConditions}"></t:dictSelect>--%>
  72. </div>
  73. </fieldset>
  74. </t:formvalid>
  75. </body>
  76. </html>
  77. <style>
  78. .ruleConditionsHide{
  79. display: none;
  80. }
  81. </style>