rentPlanList.jsp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <script type="text/javascript"><!--
  5. /**用户显示区*/
  6. $(function() {
  7. $('#rentPlanDataGrid').datagrid({
  8. rownumbers:true,
  9. fit:true,
  10. pageSize:20,
  11. pageList : [ 10, 20, 30, 40, 50 ],
  12. fitColumns:false,
  13. border:false,
  14. sortOrder:'desc',
  15. pagination:true,
  16. idField:'id',
  17. url:whzl.basePath + '/rentPlanAction_listRentPlan',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:false,
  21. nowrap:true,
  22. loadFilter:function(result){
  23. if(result.success){
  24. return result.obj;
  25. }else{
  26. $.messager.alert("提示",result.message);
  27. return ;
  28. }
  29. }
  30. });
  31. });
  32. /**查询*/
  33. function searchFun(){
  34. $("#rentPlanDataGrid").datagrid("load", {
  35. "rentPlan.title":$("#tblQuery").find("input[id='title']").val()
  36. });
  37. }
  38. /*清除查询条件**/
  39. function ClearQuery() {
  40. $("#tblQuery").find("input").val("");
  41. $("#tblQuery").find("select").val("-1");
  42. }
  43. /**详细*/
  44. var detailsFormatter = function(value , row , index){
  45. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=rentPlanDetails(" + row.id + ") style='cursor:pointer' />";
  46. };
  47. /**详细页面对话框*/
  48. var rentPlanDetails = function(id){
  49. $("#detailRentPlanDialog").dialog(
  50. {
  51. buttons : [
  52. {
  53. text : '确定',
  54. iconCls : 'icon-ok',
  55. handler : function(){
  56. $("#detailRentPlanDialog").dialog("close");
  57. }
  58. }
  59. ],
  60. onLoad : function(){
  61. detail_load(id);
  62. }
  63. }
  64. );
  65. };
  66. /**增加配租方案*/
  67. function rentPlanAdd(){
  68. $('#addRentPlanDialog').dialog({
  69. buttons : [{
  70. text : '确认',
  71. iconCls : 'icon-ok',
  72. handler : function(){
  73. add_submit();
  74. }
  75. },{
  76. text : '取消',
  77. iconCls : 'icon-cancel',
  78. handler : function(){
  79. $("#addRentPlanDialog").dialog("close");
  80. }
  81. }]
  82. });
  83. }
  84. /**业务时间*/
  85. var createDateFormatter = function(value , row , index){
  86. return dealDate(row.createDate);
  87. }
  88. /**录入人房对应结果*/
  89. var importResultFormatter = function(value , row , index){
  90. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='输入结果' onclick=importResult(" + row.id + ") style='cursor:pointer' />";
  91. }
  92. function importResult(id){
  93. $("#importFileDialog").dialog({
  94. buttons:[{
  95. text : '取消',
  96. iconCls : 'icon-cancel',
  97. handler : function(){
  98. $("#importFileDialog").dialog("close");
  99. }
  100. }],
  101. onLoad : function(){
  102. import_load(id);
  103. }
  104. })
  105. }
  106. --></script>
  107. <div class="easyui-layout" data-options="fit:true,border:false">
  108. <div data-options="region:'center',border:false">
  109. <div id="searchtool" data-options="region:'north' , border:false">
  110. <div class="clear"></div>
  111. <table id="tblQuery" style="width:100%;">
  112. <tr>
  113. <td align="right" style="width: 10%;"><span>摇号方案标题</span></td>
  114. <td style="width: 20%;"><input id="title" name="rentPlan.title" type="text" style="width: 140px;"/></td>
  115. <td align="left" style="width: 70%;">
  116. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  117. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  118. <a href="javascript:rentPlanAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</a>
  119. </td>
  120. </tr>
  121. </table>
  122. <div class="clear"></div>
  123. </div>
  124. <table id="rentPlanDataGrid">
  125. <thead frozen="true">
  126. <tr>
  127. <th data-options="field:'title',sortable:true,width:255">配租方案标题</th>
  128. </tr>
  129. </thead>
  130. <thead>
  131. <tr>
  132. <th data-options="field:'createDate',sortable:true,width:150,formatter:createDateFormatter">业务时间</th>
  133. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详细</th>
  134. <th data-options="field:'importResult',align:'center',width:60,formatter:importResultFormatter">导入结果</th>
  135. </tr>
  136. </thead>
  137. </table>
  138. </div>
  139. </div>
  140. <div id="detailRentPlanDialog" data-options="title:'&nbsp;配租方案详情',iconCls:'icon-details',width:700,height:550,modal:true,href:'<%=basePath %>/rentPlanAction_toDetail'">
  141. </div>
  142. <div id="addRentPlanDialog" data-options="title:'&nbsp;添加配租方案',iconCls:'icon-add',width:700,height:400,modal:true,href:'<%=basePath %>/rentPlanAction_toAdd'">
  143. </div>
  144. <div id="importFileDialog" data-options="title:'&nbsp;导入表格',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/rentPlanAction_toImportFile'">
  145. </div>
  146. <script type="text/javascript">
  147. <!--
  148. parent.$.messager.progress('close');
  149. //-->
  150. </script>