autoFormParamList.vm 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <script type="text/javascript">
  2. jQuery('#addAutoFormParamBtn').linkbutton({
  3. iconCls: 'icon-add'
  4. });
  5. jQuery('#delAutoFormParamBtn').linkbutton({
  6. iconCls: 'icon-remove'
  7. });
  8. jQuery('#addAutoFormParamBtn').bind('click', function(){
  9. var tr = jQuery("#add_autoFormParam_table_template tr").clone();
  10. jQuery("#add_autoFormParam_table").append(tr);
  11. resetTrNum('add_autoFormParam_table');
  12. return false;
  13. });
  14. jQuery('#delAutoFormParamBtn').bind('click', function(){
  15. jQuery("#add_autoFormParam_table").find("input:checked").parent().parent().remove();
  16. resetTrNum('add_autoFormParam_table');
  17. return false;
  18. });
  19. jQuery(document).ready(function(){
  20. jQuery(".datagrid-toolbar").parent().css("width","auto");
  21. if(location.href.indexOf("load=detail")!=-1){
  22. jQuery(":input").attr("disabled","true");
  23. jQuery(".datagrid-toolbar").hide();
  24. }
  25. //将表格的表头固定
  26. jQuery("#autoFormParam_table").createhftable({
  27. height:'100px',
  28. width:'auto',
  29. fixFooter:false
  30. });
  31. });
  32. function deleteOne(obj){
  33. var tableId = jQuery(obj).parent().parent().parent().parent().attr("id");
  34. jQuery(obj).parent().parent().parent().remove();
  35. /*刷新拥有该列的表的序列*/
  36. resetTrNum(jQuery("input[name='dbType']:checked").val()+"_div #"+tableId);
  37. }
  38. </script>
  39. <div style="padding: 3px; height: 25px;width:auto;" class="datagrid-toolbar">
  40. <a id="addAutoFormParamBtn" href="#">添加</a>
  41. <a id="delAutoFormParamBtn" href="#">删除</a>
  42. </div>
  43. <table border="0" cellpadding="2" cellspacing="0" id="autoFormParam_table">
  44. <tr bgcolor="#E6E6E6">
  45. <td align="center" width="40px" bgcolor="#EEEEEE">编码</td>
  46. <td align="center" width="40px" bgcolor="#EEEEEE">选择</td>
  47. <td align="left" width="120px" bgcolor="#EEEEEE">参数</td>
  48. <td align="left" width="120px" bgcolor="#EEEEEE">参数文本</td>
  49. <td align="left" width="120px" bgcolor="#EEEEEE">默认值</td>
  50. <td align="left" width="120px" bgcolor="#EEEEEE">排序</td>
  51. <td align="center" width="50px" bgcolor="#EEEEEE">操作</td>
  52. </tr>
  53. <tbody id="add_autoFormParam_table">
  54. #if($!{autoFormParamList})
  55. #set($count=0)
  56. #foreach($!{info} in $!{autoFormParamList})
  57. <tr>
  58. <input name="autoFormParamList[${count}].id" type="hidden" value="$!{info.id}"/>
  59. <input name="autoFormParamList[${count}].createName" type="hidden" value="$!{info.createName}"/>
  60. <input name="autoFormParamList[${count}].createBy" type="hidden" value="$!{info.createBy}"/>
  61. <input name="autoFormParamList[${count}].createDate" type="hidden" value="$!{info.createDate}"/>
  62. <input name="autoFormParamList[${count}].updateName" type="hidden" value="$!{info.updateName}"/>
  63. <input name="autoFormParamList[${count}].updateBy" type="hidden" value="$!{info.updateBy}"/>
  64. <input name="autoFormParamList[${count}].updateDate" type="hidden" value="$!{info.updateDate}"/>
  65. <input name="autoFormParamList[${count}].sysOrgCode" type="hidden" value="$!{info.sysOrgCode}"/>
  66. <input name="autoFormParamList[${count}].sysCompanyCode" type="hidden" value="$!{info.sysCompanyCode}"/>
  67. <input name="autoFormParamList[${count}].autoFormDbId" type="hidden" value="$!{info.autoFormDbId}"/>
  68. <td align="center"><div style="width: 40px;" name="xh">$!{velocityCount}</div></td>
  69. <td align="center"><input style="width:20px;" type="checkbox" name="ck" /></td>
  70. <td align="left">
  71. <input name="autoFormParamList[${count}].paramName" maxlength="32" type="text" class="inputxt" style="width:120px;" datatype="*" value="$!{info.paramName}" />
  72. <label class="Validform_label" style="display: none;">参数</label>
  73. </td>
  74. <td align="left">
  75. <input name="autoFormParamList[${count}].paramDesc" maxlength="32" type="text" class="inputxt" style="width:120px;" value="$!{info.paramDesc}" />
  76. <label class="Validform_label" style="display: none;">参数文本</label>
  77. </td>
  78. <td align="left">
  79. <input name="autoFormParamList[${count}].paramValue" maxlength="32" type="text" class="inputxt" style="width:120px;" value="$!{info.paramValue}" />
  80. <label class="Validform_label" style="display: none;">默认值</label>
  81. </td>
  82. <td align="left">
  83. <input name="autoFormParamList[${count}].seq" maxlength="32" type="text" class="inputxt" style="width:120px;" value="$!{info.seq}" />
  84. <label class="Validform_label" style="display: none;">排序</label>
  85. </td>
  86. <td align="center">
  87. <div style="width: 50px;" align="center">[<a class="delAutoFormParamOneBtn" href="javascript:void(0)" onclick="deleteOne(this)">删除</a>]</div>
  88. </td>
  89. </tr>
  90. #set($count=$count+1)
  91. #end
  92. #end
  93. </tbody>
  94. </table>