123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
- <jsp:include page="../../common/include.jsp" />
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript">
- /**列表显示区*/
- $(function(){
- $("#mzBatchDataGrid").datagrid({
- rownumbers:true,
- fit:true,
- pageSize:20,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- url:whzl.basePath + '/mzBatchAction_listMzBatch',
- toolbar:'#searchtool',
- nowrap:true,
- singleSelect:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- })
- });
- var dateFormFormatter = function(value , row , index){
- return dealDate(value);
- }
-
- /**查询*/
- function searchFun(){
- $("#mzBatchDataGrid").datagrid("load", {
- "mzBatch.title":$("#tblQuery").find("input[id='title']").val()
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("");
- }
-
- function familyExport(){
- var rows = $('#mzBatchDataGrid').datagrid('getSelections');
- if(rows.length>1||rows.length<1){
- $.messager.alert("提示","请选择一条要导出的民政信息!");
- return;
- }
- var id = rows[0].id;
- window.location.href = whzl.basePath+"/mzBatchAction_familyExport?mzBatch.id="+id;
- }
-
- function personExport(){
- var rows = $('#mzBatchDataGrid').datagrid('getSelections');
- if(rows.length>1||rows.length<1){
- $.messager.alert("提示","请选择一条要导出的民政信息!");
- return;
- }
- var id = rows[0].id;
- window.location.href = whzl.basePath+"/mzBatchAction_personExport?mzBatch.id="+id;
- }
-
- var detailFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/btzfht.png' title='详情' onclick=mzBatchDetail(" + row.id + ") style='cursor:pointer' />";
- }
-
- var mzBatchDetail = function(id){
- $("#mzBatchDetailDialog").dialog({
- buttons : [{
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#mzBatchDetailDialog").dialog("close");
- }
- }],
- onLoad : function(){
- mzBatchDetail_load(id);
- }
- });
- }
-
- var backFormatter = function(value , row , index){
- if(row.state=="0"){
- return "<img src='<%=basePath%>/images/yhzhlr.png' title='反馈' onclick=mzBatchBack(" + row.id + ") style='cursor:pointer' />";
- }else{
- return "";
- }
- }
-
- var mzBatchBack = function(id){
- $("#mzBatchBackDialog").dialog({
- buttons : [{
- text : '确认',
- iconCls : 'icon-ok',
- handler : function(){
- $("#mzBatchBackDialog").dialog("close");
- }
- }],
- onLoad : function(){
- import_load(id);
- }
- });
- }
- //确认民政反馈数据提交完全
- var confirmFormatter = function(value , row , index){
- if(row.state=="0"){
- return "<img src='<%=basePath%>/images/sqjwhcs.png' title='提交' onclick=confirmMzBatch(" + row.id + ") style='cursor:pointer' />";
- }else{
- return "";
- }
- }
-
- function confirmMzBatch(id){
- $.messager.confirm('提示', '民政反馈数据是否完全导入,将提交给区住建局终审对比?', function(r){
- if (r){
- parent.$.messager.progress({
- title : '提示',
- text : '数据处理中,请稍候....'
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "mzBatchAction_confirmMzBatch",//要访问的后台地址
- data: "mzBatch.id="+id,//要发送的数据
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- parent.$.messager.progress('close');
- if(msg.success){
- $("#mzBatchDataGrid").datagrid("reload");
- }else{
- $.messager.alert("提示",msg.message);
- }
- }
- });
- }
- })
- }
-
- var zipFormatter= function(value , row , index){
- return "<img src='<%=basePath%>/images/gzftb.png' title='详情' onclick=zipFile('" + row.mzBatchId + "') style='cursor:pointer' />";
- }
- function zipFile(mzBatchId){
- //window.location.href = whzl.basePath+"/mzBatchAction_zipFile?mzBatch.mzBatchId="+mzBatchId;
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "mzBatchAction_zipFile",//要访问的后台地址
- data:{"mzBatch.mzBatchId":mzBatchId},
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $.messager.alert('成功',"成功压缩文件");
- }
- }
- });
- }
- var downLoadFormatter= function(value , row , index){
- return "<img src='<%=basePath%>/images/down.png' title='详情' onclick=downLoadFile() style='cursor:pointer' />";
- }
- function downLoadFile(){
- window.location.href = whzl.basePath+"/mzBatchAction_downLoadFile";
- }
-
- </script>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'center',border:false">
- <div id="searchtool" data-options="region:'north' , border:false">
- <table id="tblQuery" style="width:100%;font-size:12px;" >
- <tr>
- <td align="right" style="width: 12%"><span>批次名称</span></td>
- <td style="width: 10%"><input id="title" type="text"/></td>
- <td style="width: 50%">
- <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
- <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
- <a href="javascript:familyExport();" class="easyui-linkbutton" data-options="iconCls:'icon-export',plain:true">导出申请人</a>
- <a href="javascript:personExport();" class="easyui-linkbutton" data-options="iconCls:'icon-export',plain:true">导出家庭成员</a>
- </td>
- </tr>
- </table>
- </div>
-
- <table id="mzBatchDataGrid">
- <thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'title',sortable:true,width:200">批次名称</th>
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'familyCount',width:80">总家庭数</th>
- <th data-options="field:'peopleCount',width:80">总人数</th>
- <th data-options="field:'pushDate',width:150,formatter:dateFormFormatter">推送时间</th>
- <th data-options="field:'backDate',width:150,formatter:dateFormFormatter">反馈时间</th>
- <th data-options="field:'detail',width:80,align:'center',formatter:detailFormatter">详情</th>
- <th data-options="field:'zip',width:80,align:'center',formatter:zipFormatter">压缩</th>
- <th data-options="field:'downLoad',width:80,align:'center',formatter:downLoadFormatter">下载</th>
- <th data-options="field:'back',width:80,align:'center',formatter:backFormatter">反馈</th>
- <th data-options="field:'confirm',width:80,align:'center',formatter:confirmFormatter">确认提交</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="mzBatchDetailDialog" data-options="title:' 详情信息',iconCls:'icon-detail',width:800,height:400,modal:true,href:'<%=basePath %>/mzBatchAction_toDetail'">
- </div>
- <div id="mzBatchBackDialog" data-options="title:' 反馈上传',iconCls:'icon-detail',width:800,height:400,modal:true,href:'<%=basePath %>/mzBatchAction_toBack'">
- </div>
- <script type="text/javascript">
- $(function(){
- parent.$.messager.progress('close');
- })
- </script>
|