mzBatchList.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. $("#mzBatchDataGrid").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 + '/mzBatchAction_listMzBatch',
  18. toolbar:'#searchtool',
  19. nowrap:true,
  20. singleSelect:true,
  21. loadFilter:function(result){
  22. if(result.success){
  23. return result.obj;
  24. }else{
  25. $.messager.alert("提示",result.message);
  26. return ;
  27. }
  28. }
  29. })
  30. });
  31. var dateFormFormatter = function(value , row , index){
  32. return dealDate(value);
  33. }
  34. /**查询*/
  35. function searchFun(){
  36. $("#mzBatchDataGrid").datagrid("load", {
  37. "mzBatch.title":$("#tblQuery").find("input[id='title']").val()
  38. });
  39. }
  40. /*清除查询条件**/
  41. function ClearQuery() {
  42. $("#tblQuery").find("input").val("");
  43. $("#tblQuery").find("select").val("");
  44. }
  45. function familyExport(){
  46. var rows = $('#mzBatchDataGrid').datagrid('getSelections');
  47. if(rows.length>1||rows.length<1){
  48. $.messager.alert("提示","请选择一条要导出的民政信息!");
  49. return;
  50. }
  51. var id = rows[0].id;
  52. window.location.href = whzl.basePath+"/mzBatchAction_familyExport?mzBatch.id="+id;
  53. }
  54. function personExport(){
  55. var rows = $('#mzBatchDataGrid').datagrid('getSelections');
  56. if(rows.length>1||rows.length<1){
  57. $.messager.alert("提示","请选择一条要导出的民政信息!");
  58. return;
  59. }
  60. var id = rows[0].id;
  61. window.location.href = whzl.basePath+"/mzBatchAction_personExport?mzBatch.id="+id;
  62. }
  63. var detailFormatter = function(value , row , index){
  64. return "<img src='<%=basePath%>/images/btzfht.png' title='详情' onclick=mzBatchDetail(" + row.id + ") style='cursor:pointer' />";
  65. }
  66. var mzBatchDetail = function(id){
  67. $("#mzBatchDetailDialog").dialog({
  68. buttons : [{
  69. text : '关闭',
  70. iconCls : 'icon-ok',
  71. handler : function(){
  72. $("#mzBatchDetailDialog").dialog("close");
  73. }
  74. }],
  75. onLoad : function(){
  76. mzBatchDetail_load(id);
  77. }
  78. });
  79. }
  80. var backFormatter = function(value , row , index){
  81. if(row.state=="0"){
  82. return "<img src='<%=basePath%>/images/yhzhlr.png' title='反馈' onclick=mzBatchBack(" + row.id + ") style='cursor:pointer' />";
  83. }else{
  84. return "";
  85. }
  86. }
  87. var mzBatchBack = function(id){
  88. $("#mzBatchBackDialog").dialog({
  89. buttons : [{
  90. text : '确认',
  91. iconCls : 'icon-ok',
  92. handler : function(){
  93. $("#mzBatchBackDialog").dialog("close");
  94. }
  95. }],
  96. onLoad : function(){
  97. import_load(id);
  98. }
  99. });
  100. }
  101. //确认民政反馈数据提交完全
  102. var confirmFormatter = function(value , row , index){
  103. if(row.state=="0"){
  104. return "<img src='<%=basePath%>/images/sqjwhcs.png' title='提交' onclick=confirmMzBatch(" + row.id + ") style='cursor:pointer' />";
  105. }else{
  106. return "";
  107. }
  108. }
  109. function confirmMzBatch(id){
  110. $.messager.confirm('提示', '民政反馈数据是否完全导入,将提交给区住建局终审对比?', function(r){
  111. if (r){
  112. parent.$.messager.progress({
  113. title : '提示',
  114. text : '数据处理中,请稍候....'
  115. });
  116. $.ajax({
  117. type: "post",//使用get方法访问后台
  118. dataType: "json",//返回json格式的数据
  119. url: "mzBatchAction_confirmMzBatch",//要访问的后台地址
  120. data: "mzBatch.id="+id,//要发送的数据
  121. success: function(msg){//msg为返回的数据,在这里做数据绑定
  122. parent.$.messager.progress('close');
  123. if(msg.success){
  124. $("#mzBatchDataGrid").datagrid("reload");
  125. }else{
  126. $.messager.alert("提示",msg.message);
  127. }
  128. }
  129. });
  130. }
  131. })
  132. }
  133. var zipFormatter= function(value , row , index){
  134. return "<img src='<%=basePath%>/images/gzftb.png' title='详情' onclick=zipFile('" + row.mzBatchId + "') style='cursor:pointer' />";
  135. }
  136. function zipFile(mzBatchId){
  137. //window.location.href = whzl.basePath+"/mzBatchAction_zipFile?mzBatch.mzBatchId="+mzBatchId;
  138. $.ajax({
  139. type: "post",//使用post方法访问后台
  140. dataType: "json",//返回json格式的数据
  141. url: "mzBatchAction_zipFile",//要访问的后台地址
  142. data:{"mzBatch.mzBatchId":mzBatchId},
  143. success: function(msg){//msg为返回的数据,在这里做数据绑定
  144. if(msg.success){
  145. $.messager.alert('成功',"成功压缩文件");
  146. }
  147. }
  148. });
  149. }
  150. var downLoadFormatter= function(value , row , index){
  151. return "<img src='<%=basePath%>/images/down.png' title='详情' onclick=downLoadFile() style='cursor:pointer' />";
  152. }
  153. function downLoadFile(){
  154. window.location.href = whzl.basePath+"/mzBatchAction_downLoadFile";
  155. }
  156. </script>
  157. <div class="easyui-layout" data-options="fit:true,border:false">
  158. <div data-options="region:'center',border:false">
  159. <div id="searchtool" data-options="region:'north' , border:false">
  160. <table id="tblQuery" style="width:100%;font-size:12px;" >
  161. <tr>
  162. <td align="right" style="width: 12%"><span>批次名称</span></td>
  163. <td style="width: 10%"><input id="title" type="text"/></td>
  164. <td style="width: 50%">
  165. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  166. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  167. <a href="javascript:familyExport();" class="easyui-linkbutton" data-options="iconCls:'icon-export',plain:true">导出申请人</a>
  168. <a href="javascript:personExport();" class="easyui-linkbutton" data-options="iconCls:'icon-export',plain:true">导出家庭成员</a>
  169. </td>
  170. </tr>
  171. </table>
  172. </div>
  173. <table id="mzBatchDataGrid">
  174. <thead frozen="true">
  175. <tr>
  176. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  177. <th data-options="field:'title',sortable:true,width:200">批次名称</th>
  178. </tr>
  179. </thead>
  180. <thead>
  181. <tr>
  182. <th data-options="field:'familyCount',width:80">总家庭数</th>
  183. <th data-options="field:'peopleCount',width:80">总人数</th>
  184. <th data-options="field:'pushDate',width:150,formatter:dateFormFormatter">推送时间</th>
  185. <th data-options="field:'backDate',width:150,formatter:dateFormFormatter">反馈时间</th>
  186. <th data-options="field:'detail',width:80,align:'center',formatter:detailFormatter">详情</th>
  187. <th data-options="field:'zip',width:80,align:'center',formatter:zipFormatter">压缩</th>
  188. <th data-options="field:'downLoad',width:80,align:'center',formatter:downLoadFormatter">下载</th>
  189. <th data-options="field:'back',width:80,align:'center',formatter:backFormatter">反馈</th>
  190. <th data-options="field:'confirm',width:80,align:'center',formatter:confirmFormatter">确认提交</th>
  191. </tr>
  192. </thead>
  193. </table>
  194. </div>
  195. </div>
  196. <div id="mzBatchDetailDialog" data-options="title:'&nbsp;详情信息',iconCls:'icon-detail',width:800,height:400,modal:true,href:'<%=basePath %>/mzBatchAction_toDetail'">
  197. </div>
  198. <div id="mzBatchBackDialog" data-options="title:'&nbsp;反馈上传',iconCls:'icon-detail',width:800,height:400,modal:true,href:'<%=basePath %>/mzBatchAction_toBack'">
  199. </div>
  200. <script type="text/javascript">
  201. $(function(){
  202. parent.$.messager.progress('close');
  203. })
  204. </script>