修改导出遮罩层显示时间:处理完成时关闭
This commit is contained in:
@@ -349,262 +349,290 @@ function cancelPassOpt(url){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function doAll(checkboxes,url){
|
function doAll(checkboxes,url){
|
||||||
// var url = $(this).attr('data-url');
|
// var url = $(this).attr('data-url');
|
||||||
var str="";
|
var str="";
|
||||||
var compileIdStr="";
|
var compileIdStr="";
|
||||||
var ids="";
|
var ids="";
|
||||||
var compileIds="";
|
var compileIds="";
|
||||||
var flag=false;//是否删除的为但是响应策略的无策略配置
|
var flag=false;//是否删除的为但是响应策略的无策略配置
|
||||||
checkboxes.each(function(){
|
checkboxes.each(function(){
|
||||||
if(true == $(this).is(':checked')){
|
if(true == $(this).is(':checked')){
|
||||||
var id=$(this).attr("id");
|
var id=$(this).attr("id");
|
||||||
var serviceId=$(this).attr("id");
|
var serviceId=$(this).attr("id");
|
||||||
if($(this).attr("serviceId")){
|
if($(this).attr("serviceId")){
|
||||||
serviceId=$(this).attr("serviceId");
|
serviceId=$(this).attr("serviceId");
|
||||||
}
|
}
|
||||||
if(serviceId == 65 && id==0){
|
if(serviceId == 65 && id==0){
|
||||||
flag=true;
|
flag=true;
|
||||||
}
|
}
|
||||||
str+=$(this).attr("id")+",";
|
str+=$(this).attr("id")+",";
|
||||||
if($(this).attr("compileId")){
|
if($(this).attr("compileId")){
|
||||||
compileIdStr +=$(this).attr("compileId")+",";
|
compileIdStr +=$(this).attr("compileId")+",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if(flag && url.indexOf("?isAudit=3") > 1){
|
if(flag && url.indexOf("?isAudit=3") > 1){
|
||||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(str.substr(str.length-1)== ','){
|
if(str.substr(str.length-1)== ','){
|
||||||
ids = str.substr(0,str.length-1);
|
ids = str.substr(0,str.length-1);
|
||||||
}
|
}
|
||||||
if(compileIdStr.substr(compileIdStr.length-1)== ','){
|
if(compileIdStr.substr(compileIdStr.length-1)== ','){
|
||||||
compileIds = compileIdStr.substr(0,compileIdStr.length-1);
|
compileIds = compileIdStr.substr(0,compileIdStr.length-1);
|
||||||
}
|
}
|
||||||
if(ids == ""){
|
if(ids == ""){
|
||||||
//top.$.jBox.tip("不能选择公共模型("+nodes[i].name+")请重新选择。");
|
//top.$.jBox.tip("不能选择公共模型("+nodes[i].name+")请重新选择。");
|
||||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if((url.indexOf("?isAudit=3") > 1)){
|
if((url.indexOf("?isAudit=3") > 1)){
|
||||||
// 审核中区分是否有添加取消来函
|
// 审核中区分是否有添加取消来函
|
||||||
var requestName=$("#ifCancelRequestInfo").attr("requestName");
|
var requestName=$("#ifCancelRequestInfo").attr("requestName");
|
||||||
var indexTable=$("#ifCancelRequestInfo").attr("indexTable");
|
var indexTable=$("#ifCancelRequestInfo").attr("indexTable");
|
||||||
// 有来函业务的取消审核
|
// 有来函业务的取消审核
|
||||||
if(requestName!=null&&indexTable!=null&&requestName.indexOf("null")==-1&&indexTable.indexOf("null")==-1){
|
if(requestName!=null&&indexTable!=null&&requestName.indexOf("null")==-1&&indexTable.indexOf("null")==-1){
|
||||||
/****************取消审核时增加来函************************** */
|
/****************取消审核时增加来函************************** */
|
||||||
$.jBox.open("iframe:${ctx}/cfg/request/requestSelectInfo", "<spring:message code='cancel_approved'/>",500, 400, { buttons: { '<spring:message code="ok"/>': 1, '<spring:message code="cancel"/>': 0 },
|
$.jBox.open("iframe:${ctx}/cfg/request/requestSelectInfo", "<spring:message code='cancel_approved'/>",500, 400, { buttons: { '<spring:message code="ok"/>': 1, '<spring:message code="cancel"/>': 0 },
|
||||||
submit: function (v, h, f) {
|
submit: function (v, h, f) {
|
||||||
if (v == 0) {
|
if (v == 0) {
|
||||||
return true; // close the window
|
return true; // close the window
|
||||||
} else {
|
} else {
|
||||||
h.find('.errorBlock').hide('fast', function () { $(this).remove(); });
|
h.find('.errorBlock').hide('fast', function () { $(this).remove(); });
|
||||||
var cancelRequestId = h.find("iframe")[0].contentWindow.requestIsAudit.value;
|
var cancelRequestId = h.find("iframe")[0].contentWindow.requestIsAudit.value;
|
||||||
if (!cancelRequestId) {
|
if (!cancelRequestId) {
|
||||||
$('<div class="errorBlock" style="display: none;font-size:18px;color:red;text-align:center;margin-top:10px"><spring:message code="required"/></div>').prependTo(h).show('fast');
|
$('<div class="errorBlock" style="display: none;font-size:18px;color:red;text-align:center;margin-top:10px"><spring:message code="required"/></div>').prependTo(h).show('fast');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(url.indexOf("?")>0){
|
if(url.indexOf("?")>0){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:'${ctx}/basics/serviceDictInfo/requestCancleInfoAjax',
|
url:'${ctx}/basics/serviceDictInfo/requestCancleInfoAjax',
|
||||||
data:{"cancelRequestId":cancelRequestId,"ids":ids,"indexTable":indexTable},
|
data:{"cancelRequestId":cancelRequestId,"ids":ids,"indexTable":indexTable},
|
||||||
async:false,
|
async:false,
|
||||||
success:function(data,textStatus){//处理返回结果
|
success:function(data,textStatus){//处理返回结果
|
||||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||||
}
|
}
|
||||||
if(url.indexOf("?isAudit") > 1){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
}else if(url.indexOf("export") > 1){
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
loaded:function(h){
|
|
||||||
$(".jbox-content,top.document").css("overflow-y","hidden")
|
|
||||||
$(".jbox-content,top.document.children").css("clear","both")
|
|
||||||
$(".jbox-content,top.document.children").css("z-index","999999")
|
|
||||||
$(".jbox-content,top.document.children").css("overflow;","auto")
|
|
||||||
$(".jbox-content,top.document").css("width","90%")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************** */
|
|
||||||
}else{
|
|
||||||
// 无来函选项的取消审核操作
|
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
|
||||||
|
|
||||||
if(v=="ok"){
|
|
||||||
if(url.indexOf("?")>0){
|
|
||||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
|
||||||
}else{
|
|
||||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
|
||||||
}
|
|
||||||
if(url.indexOf("?isAudit") > 1){
|
if(url.indexOf("?isAudit") > 1){
|
||||||
loading('<spring:message code="onloading"/>');
|
loading('<spring:message code="onloading"/>');
|
||||||
}else if(url.indexOf("export") > 1){
|
}else if(url.indexOf("export") > 1){
|
||||||
closeTip();
|
closeTip();
|
||||||
}
|
}
|
||||||
//$("#searchForm").submit();
|
|
||||||
}
|
}
|
||||||
},{buttonsFocus:1});
|
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
|
||||||
}
|
|
||||||
//除取消审核之外的业务
|
|
||||||
}else{
|
|
||||||
|
|
||||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
|
||||||
|
|
||||||
if(v=="ok"){
|
|
||||||
if(url.indexOf("?")>0){
|
|
||||||
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
|
||||||
}else{
|
|
||||||
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
|
||||||
}
|
|
||||||
if(url.indexOf("?isAudit") > 1){
|
|
||||||
loading('<spring:message code="onloading"/>');
|
|
||||||
}else if(url.indexOf("export") > 1){
|
|
||||||
closeTip();
|
|
||||||
}
|
|
||||||
//$("#searchForm").submit();
|
|
||||||
}
|
|
||||||
},{buttonsFocus:1});
|
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//验证选择的配置,是否可删除或者审核未通过或者审核通过,只有未审核的配置可删除或审核未通过或审核通过
|
|
||||||
function validateAllNoAudit(checkboxes){
|
|
||||||
var flag = false;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
//alert($(this).val());
|
|
||||||
if($(this).val()!=0){
|
|
||||||
flag = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
//验证是否可删除
|
|
||||||
function validateIsDelete(checkboxes){
|
|
||||||
var flag = false;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
//alert($(this).val());
|
|
||||||
if($(this).val()!=0 && $(this).val()!=3){//状态为3的配置为取消审核的配置,可删除
|
|
||||||
flag = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
//验证选择的配置,是否有审核通过的
|
|
||||||
function validatePass(checkboxes){
|
|
||||||
var flag = false;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
if($(this).val()==1){
|
|
||||||
flag = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
//验证选择的配置,是否全部为审核通过的
|
|
||||||
function validateAllPass(checkboxes){
|
|
||||||
var flag = true;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
if($(this).val()!=1){
|
|
||||||
flag = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
function validateIsScheduler(checkboxes){
|
|
||||||
var flag = false;
|
|
||||||
$(checkboxes).filter(":checked").each(function(){
|
|
||||||
var schedulerFlag = $(this).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
|
||||||
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){
|
|
||||||
flag = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
//导出
|
|
||||||
function exportData(url,maxRow,searchUrl,exType){
|
|
||||||
var column=[];
|
|
||||||
var hColumn=[]; //隐藏列名
|
|
||||||
$("#${id} ${value} thead tr th").each(function(){
|
|
||||||
if($(this).is(":visible")){
|
|
||||||
column.push($(this).text().trim());
|
|
||||||
}else{
|
|
||||||
hColumn.push($(this).attr("column"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
|
||||||
if($("#exportValue").val() != null && $("#exportValue").val() != ""){
|
|
||||||
url+="&"+$("#exportType").val()+"="+$("#exportValue").val();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(column.toString()!="" && column.toString() =="<spring:message code='log'/>"){
|
|
||||||
top.$.jBox.tip("<spring:message code='all_columns_hidden'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(column.toString()!=""){
|
|
||||||
url+="&columns="+column.toString();
|
|
||||||
}else{
|
|
||||||
top.$.jBox.tip("<spring:message code='all_columns_hidden'/>", "<spring:message code='info'/>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(hColumn.toString()!=""){
|
|
||||||
url+="&hColumns="+hColumn.toString();
|
|
||||||
}
|
|
||||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
|
||||||
//导出选中数据
|
|
||||||
if($(checkboxes).filter(":checked").length>0){
|
|
||||||
doAll(checkboxes,url);
|
|
||||||
//导出检索条件下所有数据
|
|
||||||
}else{
|
|
||||||
var totalCount = $("#showTotalCount").html() == undefined ? '' : $("#showTotalCount").html().trim();
|
|
||||||
if (exType!='log') {
|
|
||||||
if(totalCount > maxRow){
|
|
||||||
top.$.jBox.confirm("<spring:message code='export_confirm_message'/>"+maxRow+"!","<spring:message code='info'/>",function(v,h,f){
|
|
||||||
if(v=="ok"){
|
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
$("#searchForm").submit();
|
|
||||||
closeTip();
|
|
||||||
$("#searchForm").attr("action",searchUrl);
|
|
||||||
}
|
|
||||||
},{buttonsFocus:1});
|
|
||||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
|
||||||
}else{
|
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
$("#searchForm").submit();
|
|
||||||
closeTip();
|
|
||||||
$("#searchForm").attr("action",searchUrl);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$("#searchForm").attr("action",url);
|
|
||||||
$("#searchForm").submit();
|
|
||||||
closeTip();
|
|
||||||
$("#searchForm").attr("action",searchUrl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
loaded:function(h){
|
||||||
|
$(".jbox-content,top.document").css("overflow-y","hidden")
|
||||||
|
$(".jbox-content,top.document.children").css("clear","both")
|
||||||
|
$(".jbox-content,top.document.children").css("z-index","999999")
|
||||||
|
$(".jbox-content,top.document.children").css("overflow;","auto")
|
||||||
|
$(".jbox-content,top.document").css("width","90%")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/****************************************** */
|
||||||
|
}else{
|
||||||
|
// 无来函选项的取消审核操作
|
||||||
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
|
|
||||||
|
if(v=="ok"){
|
||||||
|
if(url.indexOf("?")>0){
|
||||||
|
window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||||
|
}else{
|
||||||
|
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||||
|
}
|
||||||
|
if(url.indexOf("?isAudit") > 1){
|
||||||
|
loading('<spring:message code="onloading"/>');
|
||||||
|
}else if(url.indexOf("export") > 1){
|
||||||
|
closeTip();
|
||||||
|
}
|
||||||
|
//$("#searchForm").submit();
|
||||||
|
}
|
||||||
|
},{buttonsFocus:1});
|
||||||
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
}
|
||||||
|
alert("333");
|
||||||
|
//除取消审核之外的业务
|
||||||
|
}else{
|
||||||
|
|
||||||
|
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='info'/>",function(v,h,f){
|
||||||
|
|
||||||
|
if(v=="ok"){
|
||||||
|
if(url.indexOf("?")>0){
|
||||||
|
//window.location = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||||
|
url = url+"&ids="+ids+"&compileIds="+compileIds;
|
||||||
|
exportXmlRequest(url);
|
||||||
|
}else{
|
||||||
|
window.location = url+"?ids="+ids+"&compileIds="+compileIds;
|
||||||
|
}
|
||||||
|
if(url.indexOf("?isAudit") > 1){
|
||||||
|
loading('<spring:message code="onloading"/>');
|
||||||
|
}else if(url.indexOf("export") > 1){
|
||||||
|
closeTip();
|
||||||
|
}
|
||||||
|
//$("#searchForm").submit();
|
||||||
|
}
|
||||||
|
},{buttonsFocus:0});
|
||||||
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//验证选择的配置,是否可删除或者审核未通过或者审核通过,只有未审核的配置可删除或审核未通过或审核通过
|
||||||
|
function validateAllNoAudit(checkboxes){
|
||||||
|
var flag = false;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
//alert($(this).val());
|
||||||
|
if($(this).val()!=0){
|
||||||
|
flag = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
//验证是否可删除
|
||||||
|
function validateIsDelete(checkboxes){
|
||||||
|
var flag = false;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
//alert($(this).val());
|
||||||
|
if($(this).val()!=0 && $(this).val()!=3){//状态为3的配置为取消审核的配置,可删除
|
||||||
|
flag = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
//验证选择的配置,是否有审核通过的
|
||||||
|
function validatePass(checkboxes){
|
||||||
|
var flag = false;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
if($(this).val()==1){
|
||||||
|
flag = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
//验证选择的配置,是否全部为审核通过的
|
||||||
|
function validateAllPass(checkboxes){
|
||||||
|
var flag = true;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
if($(this).val()!=1){
|
||||||
|
flag = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
function validateIsScheduler(checkboxes){
|
||||||
|
var flag = false;
|
||||||
|
$(checkboxes).filter(":checked").each(function(){
|
||||||
|
var schedulerFlag = $(this).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
||||||
|
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){
|
||||||
|
flag = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
//导出
|
||||||
|
function exportData(url,maxRow,searchUrl,exType){
|
||||||
|
var column=[];
|
||||||
|
var hColumn=[]; //隐藏列名
|
||||||
|
$("#${id} ${value} thead tr th").each(function(){
|
||||||
|
if($(this).is(":visible")){
|
||||||
|
column.push($(this).text().trim());
|
||||||
|
}else{
|
||||||
|
hColumn.push($(this).attr("column"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||||
|
if($("#exportValue").val() != null && $("#exportValue").val() != ""){
|
||||||
|
url+="&"+$("#exportType").val()+"="+$("#exportValue").val();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(column.toString()!="" && column.toString() =="<spring:message code='log'/>"){
|
||||||
|
top.$.jBox.tip("<spring:message code='all_columns_hidden'/>", "<spring:message code='info'/>");
|
||||||
|
alert("第一个return");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(column.toString()!=""){
|
||||||
|
url+="&columns="+column.toString();
|
||||||
|
}else{
|
||||||
|
top.$.jBox.tip("<spring:message code='all_columns_hidden'/>", "<spring:message code='info'/>");
|
||||||
|
alert("第二个return");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(hColumn.toString()!=""){
|
||||||
|
url+="&hColumns="+hColumn.toString();
|
||||||
|
}
|
||||||
|
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||||
|
//导出选中数据
|
||||||
|
if($(checkboxes).filter(":checked").length>0){
|
||||||
|
doAll(checkboxes,url);
|
||||||
|
alert("doAll");
|
||||||
|
//导出检索条件下所有数据
|
||||||
|
}else{
|
||||||
|
var totalCount = $("#showTotalCount").html() == undefined ? '' : $("#showTotalCount").html().trim();
|
||||||
|
if (exType!='log') {
|
||||||
|
if(totalCount > maxRow){
|
||||||
|
top.$.jBox.confirm("<spring:message code='export_confirm_message'/>"+maxRow+"!","<spring:message code='info'/>",function(v,h,f){
|
||||||
|
if(v=="ok"){
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
$("#intype").attr("name",$("#seltype").val());
|
||||||
|
}
|
||||||
|
exportXmlRequest(url);
|
||||||
|
}
|
||||||
|
},{buttonsFocus:1});
|
||||||
|
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||||
|
}else{
|
||||||
|
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||||
|
$("#intype").attr("name",$("#seltype").val());
|
||||||
|
}
|
||||||
|
exportXmlRequest(url);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
exportXmlRequest(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function exportXmlRequest(url){
|
||||||
|
loading('onloading');
|
||||||
|
url+="&"+$('#searchForm').serialize();
|
||||||
|
var xmlResquest = new XMLHttpRequest();
|
||||||
|
xmlResquest.open("POST", url, true);
|
||||||
|
xmlResquest.setRequestHeader("Content-type", "application/json");
|
||||||
|
xmlResquest.responseType = "blob";
|
||||||
|
xmlResquest.onload = function (oEvent) {
|
||||||
|
var contDisp = xmlResquest.getResponseHeader("content-disposition");
|
||||||
|
var fileName = contDisp.substring(contDisp.indexOf("=")+1,contDisp.length).replace(/\"/g,"");
|
||||||
|
var content = xmlResquest.response;
|
||||||
|
var elink = document.createElement('a');
|
||||||
|
elink.download = fileName;
|
||||||
|
elink.style.display = 'none';
|
||||||
|
var blob = new Blob([content]);
|
||||||
|
elink.href = URL.createObjectURL(blob);
|
||||||
|
document.body.appendChild(elink);
|
||||||
|
elink.click();
|
||||||
|
document.body.removeChild(elink);
|
||||||
|
};
|
||||||
|
xmlResquest.onreadystatechange = function() {
|
||||||
|
if (xmlResquest.readyState==4) {
|
||||||
|
top.$.jBox.closeTip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlResquest.send();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -543,7 +543,7 @@ function customColumnClick(){
|
|||||||
var exports=JSON.stringify(map);
|
var exports=JSON.stringify(map);
|
||||||
aJaxImportPost(url,{"exports":exports});
|
aJaxImportPost(url,{"exports":exports});
|
||||||
pagination(30);
|
pagination(30);
|
||||||
closeTip();
|
//closeTip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -114,9 +114,11 @@ Date.prototype.Format = function (fmt) {
|
|||||||
return fmt;
|
return fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
function aJaxImportPost(url, params) {
|
function aJaxImportPost(url, params) {
|
||||||
|
top.$.jBox.tip("onloading",'loading',{opacity:0.5,persistent:true});
|
||||||
// 创建form元素
|
// 创建form元素
|
||||||
var temp_form = document.createElement("form");
|
var temp_form = document.createElement("form");
|
||||||
|
temp_form.id = "temp_form";
|
||||||
// 设置form属性
|
// 设置form属性
|
||||||
temp_form .action = url;
|
temp_form .action = url;
|
||||||
temp_form .target = "_self";
|
temp_form .target = "_self";
|
||||||
@@ -129,7 +131,32 @@ function aJaxImportPost(url, params) {
|
|||||||
opt.value = params[x];
|
opt.value = params[x];
|
||||||
temp_form .appendChild(opt);
|
temp_form .appendChild(opt);
|
||||||
}
|
}
|
||||||
document.body.appendChild(temp_form);
|
document.body.appendChild(temp_form);
|
||||||
// 提交表单
|
url=url+"?";
|
||||||
temp_form .submit();
|
url+="&"+$('#temp_form').serialize();
|
||||||
|
var xmlResquest = new XMLHttpRequest();
|
||||||
|
xmlResquest.open("POST", url, true);
|
||||||
|
xmlResquest.setRequestHeader("Content-type", "application/json");
|
||||||
|
xmlResquest.setRequestHeader("Content-Disposition","attachment");
|
||||||
|
xmlResquest.responseType = "blob";
|
||||||
|
xmlResquest.onload = function (oEvent) {
|
||||||
|
var contDisp = xmlResquest.getResponseHeader("content-disposition")
|
||||||
|
var fileName = contDisp.substring(contDisp.indexOf("=")+1,contDisp.length).replace(/\"/g,"")
|
||||||
|
var content = xmlResquest.response;
|
||||||
|
var elink = document.createElement('a');
|
||||||
|
elink.download = fileName;
|
||||||
|
elink.style.display = 'none';
|
||||||
|
var blob = new Blob([content]);
|
||||||
|
elink.href = URL.createObjectURL(blob);
|
||||||
|
document.body.appendChild(elink);
|
||||||
|
elink.click();
|
||||||
|
document.body.removeChild(elink);
|
||||||
|
|
||||||
|
};
|
||||||
|
xmlResquest.onreadystatechange = function() {
|
||||||
|
if (xmlResquest.readyState==4) {
|
||||||
|
top.$.jBox.closeTip();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xmlResquest.send();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user