confirm.jsp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. $('#confirmChooseHouseForm').form('submit',
  22. {
  23. url : whzl.basePath+'/chooseHouseAction_confirmChooseHouse',
  24. success : function(result){
  25. var parseResult = $.parseJSON(result);
  26. if(parseResult.success){
  27. $("#taskDialog").dialog("close");
  28. $.messager.alert('提示','接收成功!');
  29. if( $('#chooseHouseDataGrid') != null){
  30. $('#chooseHouseDataGrid').datagrid('reload');
  31. }
  32. if( $('#taskDataGrid') != null){
  33. $('#taskDataGrid').datagrid('reload');
  34. }
  35. }else{
  36. $.messager.alert("提示",parseResult.message);
  37. }
  38. }
  39. }
  40. );
  41. }
  42. var task_load = function(id){
  43. $.ajax({
  44. type: "post",//使用get方法访问后台
  45. dataType: "json",//返回json格式的数据
  46. url: "chooseHouseAction_findById",//要访问的后台地址
  47. data: "chooseHouse.id="+id,//要发送的数据
  48. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  49. success: function(msg){//msg为返回的数据,在这里做数据绑定
  50. $("#chooseHouseId_detail").val(msg.obj.id);
  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. <form id="confirmChooseHouseForm" method="post">
  105. <input type="hidden" name="chooseHouse.id" id="chooseHouseId_detail">
  106. <table class="mytable" style="width: 100%;">
  107. <tr>
  108. <th width="20%">标题</th>
  109. <td width="80%" colspan="3" style="width: 100%">
  110. <span id="title_detail"></span>
  111. </td>
  112. </tr>
  113. <tr>
  114. <th width="20%">业务时间</th>
  115. <td width="30%">
  116. <span id="businessDate_detail"></span>
  117. </td>
  118. <th width="20%">业务人</th>
  119. <td width="30%">
  120. <span id="businessUserName_detail"></span>
  121. </td>
  122. </tr>
  123. <tr>
  124. <th>是否接收</th>
  125. <td colspan="3">
  126. <SELECT required="true" name="confirm" class="easyui-validatebox" style="width: 100px">
  127. <option value="">请选择...</option>
  128. <option value="1">接收</option>
  129. <option value="2">不接收</option>
  130. </SELECT>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th>备注</th>
  135. <td colspan="3">
  136. <textarea rows="4" cols="" style="width: 100%" name="chooseHouse.remark"></textarea>
  137. </td>
  138. </tr>
  139. </table>
  140. </form>
  141. <table id="chooseHouseInfo_detail">
  142. <thead>
  143. <tr>
  144. <th data-options="field:'communityName',width:150,formatter:communityNameFormatter">小区名称</th>
  145. <th data-options="field:'address',width:200,formatter:addressFormatter">居住地点</th>
  146. <th data-options="field:'houseNumber',width:40,formatter:houseNumberFormatter">房号</th>
  147. <th data-options="field:'area',width:60,formatter:areaFormatter">面积</th>
  148. </tr>
  149. </thead>
  150. </table>