warningEdit.jsp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <%@ page contentType="text/html;charset=UTF-8"%>
  2. <%@ include file="/WEB-INF/include/taglibs.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title></title>
  7. <%@ include file="/WEB-INF/include/common.jsp"%>
  8. <script type="text/javascript">
  9. $(function(){
  10. //定义页面元素
  11. var operate = '${requestScope.operate}';
  12. var warningData = ${ requestScope.warningData };
  13. var $tabs = $("#tabs");
  14. $tabs.tabs('select',"基本信息");
  15. $.WarningEdit = new $.AbstractEdit({
  16. entity:"Warning",
  17. formId:"warningForm",
  18. operate:operate,
  19. id:"id"
  20. }) ;
  21. //扩展或重写方法
  22. $.fn.extend( $.WarningEdit ,{
  23. });
  24. $.WarningEdit.init();
  25. if( !$.isEmpty( warningData )){
  26. $.WarningEdit.fillData( warningData );
  27. } ;
  28. //客户
  29. $('#customerId').combobox({
  30. url : WEBROOT + "/loadData.action?entity=customer",
  31. valueField : 'customerId',
  32. textField : 'customerName',
  33. delay : 500,
  34. mode : 'remote',
  35. showHeader : false,
  36. striped : true,
  37. columns : [[{field : 'customerName', width : '147'}]],
  38. onSelectAfter:function(index, record){
  39. },
  40. onShowPanel : function() {
  41. // 在第一次触发下拉框事件是加载数据
  42. if (!$(this).combobox('getText')) {
  43. $(this).combobox({
  44. onBeforeLoad : function(param) {
  45. return true;
  46. }
  47. });
  48. }
  49. }
  50. });
  51. $("#saveWarningBtn").click( $.proxy( $.WarningEdit.save,$.WarningEdit) );
  52. });
  53. </script>
  54. </head>
  55. <body style="overflow-y:hidden" fit="true" scroll="no">
  56. <div id="tabs" class="easyui-tabs" fit="true">
  57. <div title="基本信息">
  58. <form id="warningForm" method="post">
  59. <input type="hidden" name="id"></input>
  60. <table style="width:100%">
  61. <tr>
  62. <td class="title">
  63. <div class="star">*</div>预警类型:
  64. </td>
  65. <td>
  66. <s:select list="#request.warningTypeList" id="warningType" name="warningType" headerKey="" headerValue="" listKey="id" listValue="dictionaryName" myType="easyui-combobox" cssStyle="width: 155px" theme="simple" data-options="required:true" ></s:select>
  67. </td>
  68. <td class="title">
  69. <div class="star">*</div>通知方:
  70. </td>
  71. <td>
  72. <s:select list="#request.warningInformantList" id="warningInformant" name="warningInformant" headerKey="" headerValue="" listKey="id" listValue="dictionaryName" myType="easyui-combobox" cssStyle="width: 155px" theme="simple" data-options="required:true" ></s:select>
  73. </td>
  74. <td class="title">
  75. <div class="star">*</div>指定EMAIL:
  76. </td>
  77. <td>
  78. <input class="easyui-validatebox" type="text" style="vertical-align:middle" name="toEmail" data-options="required: true,validType:'email'" />
  79. </td>
  80. </tr>
  81. <tr>
  82. <td class="title">
  83. <div class="star">*</div>仓库:
  84. </td>
  85. <td>
  86. <s:select list="#request.warehouseList" listKey="warehouseId" listValue="warehouseName" cssClass="easyui-combobox" cssStyle="width: 155px" name="warehouseId" id="warehouseId" theme="simple" data-options="required:true" ></s:select>
  87. </td>
  88. <td class="title">
  89. <div class="star">*</div>客户:
  90. </td>
  91. <td>
  92. <input myType="easyui-combobox" style="width: 155px"
  93. id="customerId" name="customerId" data-options="required: true"></input>
  94. </td>
  95. <td class="title">
  96. 启用:
  97. </td>
  98. <td>
  99. <input type="checkbox" class="easyui-checkbox" name="isOpen" value="1">
  100. </td>
  101. </tr>
  102. <tr>
  103. <td colspan="6" align="right">
  104. <a href="#" icon="icon-save" id="saveWarningBtn" class="easyui-linkbutton">保存</a>
  105. </td>
  106. </tr>
  107. </table>
  108. </form>
  109. </div>
  110. </div>
  111. </body>
  112. </html>