detail.jsp 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="s" uri="/struts-tags" %>
  3. <script type="text/javascript">
  4. /**小区名称*/
  5. var communityNameFormatter = function(value , row , index){
  6. return row.house.communityName ;
  7. };
  8. /**居住地点*/
  9. var addressFormatter = function(value , row , index){
  10. return row.house.address ;
  11. };
  12. /**房号*/
  13. var houseNumberFormatter = function(value , row , index){
  14. return row.house.houseNumber ;
  15. };
  16. /**面积*/
  17. var areaFormatter = function(value , row , index){
  18. return row.house.area ;
  19. };
  20. var task_submit = function(id){
  21. $.ajax({
  22. type: "post",//使用get方法访问后台
  23. dataType: "json",//返回json格式的数据
  24. url: "chooseHouseAction_confirmChooseHouse",//要访问的后台地址
  25. data: "chooseHouse.id="+id,//要发送的数据
  26. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  27. success: function(msg){//msg为返回的数据,在这里做数据绑定
  28. if(msg.success){
  29. $("#taskDialog").dialog("close");
  30. $.messager.alert('提示','处理成功!');
  31. if( $('#chooseHouseDataGrid') != null){
  32. $('#chooseHouseDataGrid').datagrid('reload');
  33. }
  34. if( $('#taskDataGrid') != null){
  35. $('#taskDataGrid').datagrid('reload');
  36. }
  37. }else{
  38. $.messager.alert('提示','处理失败!');
  39. }
  40. }
  41. });
  42. }
  43. var task_load = function(id){
  44. $.ajax({
  45. type: "post",//使用get方法访问后台
  46. dataType: "json",//返回json格式的数据
  47. url: "chooseHouseAction_findById",//要访问的后台地址
  48. data: "chooseHouse.id="+id,//要发送的数据
  49. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  50. success: function(msg){//msg为返回的数据,在这里做数据绑定
  51. $("#title_detail").text(msg.obj.title);
  52. $("#content_detail").text(msg.obj.content);
  53. $("#businessDate_detail").text(dealDate(msg.obj.businessDate));
  54. $("#businessUserName_detail").text(dealDate(msg.obj.businessUserName));
  55. }
  56. });
  57. $('#chooseHouseInfo_detail').datagrid({
  58. rownumbers:true,
  59. border:false,
  60. sortOrder:'desc',
  61. url:whzl.basePath + '/chooseHouseAction_chooseHouseInfoList?chooseHouse.id='+id,
  62. checkOnSelect:true,
  63. selectOnCheck:false,
  64. loadFilter:function(result){
  65. if(result.success){
  66. return result.obj;
  67. }else{
  68. $.messager.alert("提示",result.message);
  69. return ;
  70. }
  71. }
  72. });
  73. }
  74. var detail_load = function(id){
  75. $.ajax({
  76. type: "post",//使用get方法访问后台
  77. dataType: "json",//返回json格式的数据
  78. url: "chooseHouseAction_findById",//要访问的后台地址
  79. data: "chooseHouse.id="+id,//要发送的数据
  80. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  81. success: function(msg){//msg为返回的数据,在这里做数据绑定
  82. $("#title_detail").text(msg.obj.title);
  83. $("#content_detail").text(msg.obj.content);
  84. }
  85. });
  86. $('#chooseHouseInfo_detail').datagrid({
  87. rownumbers:true,
  88. border:false,
  89. sortOrder:'desc',
  90. url:whzl.basePath + '/chooseHouseAction_chooseHouseInfoList?chooseHouse.id='+id,
  91. checkOnSelect:true,
  92. selectOnCheck:false,
  93. loadFilter:function(result){
  94. if(result.success){
  95. return result.obj;
  96. }else{
  97. $.messager.alert("提示",result.message);
  98. return ;
  99. }
  100. }
  101. });
  102. }
  103. </script>
  104. <table class="mytable" style="width: 100%;">
  105. <tr>
  106. <th width="20%">标题</th>
  107. <td width="80%" colspan="3" style="width: 100%">
  108. <span id="title_detail"></span>
  109. </td>
  110. </tr>
  111. <tr>
  112. <th width="20%">业务时间</th>
  113. <td width="30%">
  114. <span id="businessDate_detail"></span>
  115. </td>
  116. <th width="20%">业务人</th>
  117. <td width="30%">
  118. <span id="businessUserName_detail"></span>
  119. </td>
  120. </tr>
  121. <tr>
  122. <th>装修清单</th>
  123. <td width="80%" colspan="3" style="width: 100%">
  124. <span id="decorationName_detail"></span>
  125. </td>
  126. </tr>
  127. </table>
  128. <table id="chooseHouseInfo_detail">
  129. <thead>
  130. <tr>
  131. <th data-options="field:'communityName',width:150,formatter:communityNameFormatter">小区名称</th>
  132. <th data-options="field:'address',width:200,formatter:addressFormatter">居住地点</th>
  133. <th data-options="field:'houseNumber',width:40,formatter:houseNumberFormatter">房号</th>
  134. <th data-options="field:'area',width:60,formatter:areaFormatter">面积</th>
  135. </tr>
  136. </thead>
  137. </table>