const routesList = [
	{
		path: '/businessManage',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/businessCreate',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/templateExamine',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/pledgeWay',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/bond',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/winBidding',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/refundDeposit',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/businessManageSee',
		sidebarId: ['#businessManagement']
	},
	{
		path: '/relationDisburse',
		sidebarId: ['#financialInstitutionManagement', '#relationDisburse']
	},
	{
		path: '/relationDisburseDetails',
		sidebarId: ['#financialInstitutionManagement', '#relationDisburse']
	},
	{
		path: '/cooperationSurvey',
		sidebarId: ['#financialInstitutionManagement', '#overviewCooperation']
	},
	{
		path: '/customerInfo',
		sidebarId: ['#financialInstitutionManagement', '#financialCustomerManagement']
	},
	{
		path: '/customerInfoEdit',
		sidebarId: ['#financialInstitutionManagement', '#financialCustomerManagement']
	},
	{
		path: '/customerInfoExamine',
		sidebarId: ['#financialInstitutionManagement', '#financialCustomerManagement']
	},
	{
		path: '/customerInfoSee',
		sidebarId: ['#financialInstitutionManagement', '#financialCustomerManagement']
	},
	{
		path: '/customerDisburseInfo',
		sidebarId: ['#financialInstitutionManagement', '#customerDisburse']
	},
	{
		path: '/customerDisburseInfoEdit',
		sidebarId: ['#financialInstitutionManagement', '#customerDisburse']
	},
	{
		path: '/customerDisburseInfoContract',
		sidebarId: ['#financialInstitutionManagement', '#customerDisburse']
	},
	{
		path: '/customerDisburseInfoApproval',
		sidebarId: ['#financialInstitutionManagement', '#customerDisburse']
	},
	{
		path: '/settleManagement',
		sidebarId: ['#settleManagement']
	},
	{
		path: '/settleManagementCreate',
		sidebarId: ['#settleManagement']
	},
]

$(window).resize(function(){
	// 设计稿是1440时规定font-size是100px, 即当浏览器窗口调整到1440px时, 1rem=100px
	// 100/1440 = ?/window.innerWidth
	var windowWidth = window.innerWidth;
	if( window.innerWidth<1200 && $('#vueApp').css('display') === 'none'){
		$('.yk_content').width(1200);
		windowWidth = 1200;
	}else{
		$('.yk_content').css('width','100%');
		windowWidth = window.innerWidth;
	};
	$('html').css('font-size',(100*windowWidth/1440)+'px');
	// 如果要设置设计稿(1440)下的12px字体(文档里说的字体大小), rem设置为0.12rem即可

	if( $('.remittanceplanDetailList').length>0 ){
		//账后等列表页里的列表页有多个表格的高度计算
		for( var i=0;i<$(".remittanceplanDetailList").length;i++ ){
			if( $(".remittanceplanDetailList").eq(i).css('left') == '0px' ){
				$("#formForProjectListBox").css('height',($(".remittanceplanDetailList").eq(i).innerHeight()+$('.projectListTab').innerHeight()+50)+'px');
				break;
			}
		};
		i= null;
	}else{
		//立项管理等列表页有多个表格的高度计算
		for( var i=0;i<$(".formForProjectList").length;i++ ){
			if( $(".formForProjectList").eq(i).css('left') == '0px' ){
				$("#formForProjectListBox").css('height',($(".formForProjectList").eq(i).innerHeight()+$('.projectListTab').innerHeight()+50)+'px');
				break;
			}
		};
		i= null;
	}
});
$(window).resize();

//根据开始日期和有效天数 计算截止日期
function caculateDeadlineDate(startDate,valueTime){
	var valueTime = parseInt(parseInt(valueTime)-1);
	var date = new Date(startDate);
	var newDate = new Date(date.getFullYear(),date.getMonth(),date.getDate()+valueTime);
	var year = newDate.getFullYear();
	var month = (newDate.getMonth()+1)<10?'0'+(newDate.getMonth()+1):(newDate.getMonth()+1);
	var day = (newDate.getDate())<10?'0'+(newDate.getDate()):(newDate.getDate());
	return year+"-"+month+"-"+day;
};

// 计算两个日期之间相差的天数
function getDifferDays(date1 , date2){
	var date1Str = date1.split("-");//将日期字符串分隔为数组,数组元素分别为年.月.日
	//根据年 . 月 . 日的值创建Date对象
	var date1Obj = new Date(date1Str[0],(date1Str[1]-1),date1Str[2]);
	var date2Str = date2.split("-");
	var date2Obj = new Date(date2Str[0],(date2Str[1]-1),date2Str[2]);
	var t1 = date1Obj.getTime();
	var t2 = date2Obj.getTime();
	var dateTime = 1000*60*60*24; //每一天的毫秒数
	var minusDays = Math.floor(((t2-t1)/dateTime));//计算出两个日期的天数差
	var days = Math.abs(minusDays);//取绝对值
	return days;
};

//获取地址栏参数
function GetRequest() {
	var str = decodeURI(window.location.href).split("?")[1];
	if( !(str==undefined||str==null||str.length<=0) ){
		var theRequest = new Object();
		strs = str.split("&");
		for(var i = 0; i < strs.length; i ++) {
			theRequest[strs[i].split("=")[0]]=strs[i].split("=")[1];
		}

		return theRequest;
	}else{
		return null
	}
};

//获取当前时间(52周新增计划等处使用到)
function doGetNowDate(){
	var nowdate='';
	$.ajax({
		url: '/weekWorkPlan/do_getNowDate',
		dataType: 'json',
		async:false,
		data: {},
		success: function(data) { // 获取当前月的数据
			nowdate=new Date(data);
		},
		error:function(error){
			new $.zui.Messager('获取当前时间出错：'+error, {
				type: 'warning',
				time:1500
			}).show();
		}
	});
	return getStandardDate(nowdate)
};

//获取本周一日期
function getFirstDay(){
	var now =new Date(doGetNowDate());
	var nowTime = now.getTime() ;
	var day = now.getDay();
	if(parseInt(day)==0){
		day=7;
	}
	var oneDayLong = 24*60*60*1000 ;
	var MondayTime = nowTime - (day-1)*oneDayLong;//计算周一
	var monday = new Date(MondayTime);
	return getStandardDate(monday);
};

//获取本周日日期
function getLastDay(){
	var now =new Date(doGetNowDate());
	var nowTime = now.getTime() ;
	var day = now.getDay();
	if(parseInt(day)==0){
		day=7;
	}
	var oneDayLong = 24*60*60*1000 ;
	var SundayTime =  nowTime + (7-day)*oneDayLong;//计算周日
	var sunday = new Date(SundayTime);
	return getStandardDate(sunday);
};

//获取下周一日期
function getNextWeekFirstDay(){
	var now=new Date(new Date(doGetNowDate()).getTime() + 7*24*60*60*1000);
	var nowTime = now.getTime() ;
	var day = now.getDay();
	if(parseInt(day)==0){
		day=7;
	}
	var oneDayLong = 24*60*60*1000 ;
	var MondayTime = nowTime - (day-1)*oneDayLong;//计算周一
	var monday = new Date(MondayTime);
	return getStandardDate(monday);
};

//获取下周日日期
function getNextWeekLastDay(){
	var now=new Date(new Date(doGetNowDate()).getTime() + 7*24*60*60*1000);
	var nowTime = now.getTime() ;
	var day = now.getDay();
	if(parseInt(day)==0){
		day=7;
	}
	var oneDayLong = 24*60*60*1000 ;
	var SundayTime =  nowTime + (7-day)*oneDayLong;//计算周日
	var sunday = new Date(SundayTime);
	return getStandardDate(sunday);
};

//比较日期大小
function compareDate(checkStartDate, checkEndDate) {
	var arys1= new Array();
	var arys2= new Array();
	if(checkStartDate != null && checkEndDate != null) {
		arys1=checkStartDate.split('-');
		var sdate=new Date(arys1[0],parseInt(arys1[1]-1),arys1[2]);
		arys2=checkEndDate.split('-');
		var edate=new Date(arys2[0],parseInt(arys2[1]-1),arys2[2]);
		if(sdate > edate) {
			return true;
		}else {
			return false;
		}
	}
};

//获取yyyy-mm-dd型的日期
function getStandardDate(date) {
	var y = date.getFullYear();
	var m = date.getMonth() + 1;
	var d = date.getDate();
	if (m < 10) {
		m = "0" + m;
	}
	if (d < 10) {
		d = "0" + d;
	}
	return y + '-' + m + '-' + d;
};

//手机号码验证
jQuery.validator.addMethod("mobileValid", function(value, element) {
	var length = value.length;
	return this.optional(element) || (length == 11 && /^[1][3,4,5,7,8][0-9]{9}$/.test(value));
}, "请输入正确的手机号码!");

//登录名验证
jQuery.validator.addMethod("loginNameValid", function(value, element) {
	return this.optional(element) || (/^[^\u4e00-\u9fa5]{0,}$/.test(value));
}, "请不要输入中文!");

//密码验证
jQuery.validator.addMethod("passwordFormValid", function(value, element) {
	return this.optional(element) || (/^[0-9a-zA-Z]*$/.test(value));
}, "只能输入数字或字母!");

//工号验证
jQuery.validator.addMethod("jobNumberValid", function(value, element) {
	return this.optional(element) || (/^[0-9]*$/.test(value));
}, "只能输入数字!");

//大于0的自然数验证
jQuery.validator.addMethod("numberValid2", function(value, element) {
	return this.optional(element) || (/^\+?[1-9]\d*$/.test(value));
}, "请输入大于0的整数");

//分机号验证
jQuery.validator.addMethod("telValid", function(value, element) {
	return this.optional(element) || (/^[\d\-]+$/.test(value));
}, "请输入正确格式的号码");

//允许正数和小数和负数验证
jQuery.validator.addMethod("decimalNumberValid", function(value, element) {
	//不允许负数的-->/^[0-9]+([.]{1}[0-9]+){0,1}$/
	return this.optional(element) || (/^(\-|\+)?\d+(\.\d+)?$/.test(value.split(',').join('')));
}, "请输入正确的数字");

//允许正数和小数验证(不允许负数和0)验证
jQuery.validator.addMethod("decimalNumberValid2", function(value, element) {
	var numberFlag = false;
	if( /^[0-9]+([.]{1}[0-9]+){0,1}$/.test(value.split(',').join('')) ){
		if( parseFloat(value)==0 ){
			numberFlag = false;
		}else{
			numberFlag = true;
		}
	}else{
		numberFlag = false;
	}
	return this.optional(element) || numberFlag;
}, "请输入大于0的正确的数字");

//允许正数和小数验证(不允许负数允许0)验证
jQuery.validator.addMethod("decimalNumberValid3", function(value, element) {
	var numberFlag = false;
	if( /^[0-9]+([.]{1}[0-9]+){0,1}$/.test(value.split(',').join('')) ){
		numberFlag = true;
	}else{
		numberFlag = false;
	}
	return this.optional(element) || numberFlag;
}, "请输入大于等于0的正确的数字");

//几个比例的验证(大于0小于100,输入时最多两位小数)
jQuery.validator.addMethod("rateValid", function(value, element) {
	var rateFlag = false;
	if( (/^([1-9]\d?(\.\d{1,2})?|0\.\d{1,2}|99.99)$/.test(value)) ){
		if( parseFloat(value)==0 ){
			rateFlag = false;
		}else{
			rateFlag = true;
		}
	}else{
		rateFlag = false;
	}
	return this.optional(element) || rateFlag;
}, "请输入大于0小于100的数字,最多两位小数");

//几个比例的验证2(大于等于0小于等于100,输入时最多两位小数)
jQuery.validator.addMethod("rateValid2", function(value, element) {
	var rateFlag = false;
	if( (/^(0|[1-9]\d?(\.\d{1,2})?|0\.\d{1,2}|100)$/.test(value)) ){
		rateFlag = true;
	}else{
		if( value=='100.0' || value=='100.00' ){
			rateFlag = true;
		}else{
			rateFlag = false;
		};
	}
	return this.optional(element) || rateFlag;
}, "请输入大于等于0小于等于100的数字,最多两位小数");

//irr长度的验证
jQuery.validator.addMethod("irrValid", function(value, element) {
	var irrFlag = false;
	if( value.indexOf('-')>=0 ){
		if( value.split('.')[0].length > 5 ){
			irrFlag = false;
		}else{
			irrFlag = true;
		};
	}else{
		if( value.split('.')[0].length > 4 ){
			irrFlag = false;
		}else{
			irrFlag = true;
		};
	}
	return this.optional(element) || irrFlag;
}, "整数位最多四位数字");

// 银行卡号验证(1至49位的数字)
jQuery.validator.addMethod("bankNoValid", function(value, element) {
	return this.optional(element) || (/^[0-9]{1,49}$/.test(value));
},'请输入大于0位小于50位的数字');

//小数点后最多两位小数验证
jQuery.validator.addMethod("decimalPointValid", function(value, element) {
	var decimalPointFlag = false;
	if( value.indexOf('.')>0 ){
		if( String(value).split('.')[1].length>2 ){
			decimalPointFlag = false;
		}else{
			decimalPointFlag = true;
		}
	}else{
		decimalPointFlag = true;
	}
	return this.optional(element) || decimalPointFlag;
}, "小数点后最多两位小数");

//验证加了逗号分隔符的数字只能输入n位数,包括小数点和小数点后两位(即使没有输入小数也要自动补两位小数),不包括'-'号(这里是17位数,新增银行卡信息等使用)
//如果第15位之前没有小数点,则第15位只能输入小数点,如果第15位之前有小数点,则不做处理
jQuery.validator.addMethod("decimalLengthValid", function(value, element) {
	var decimalLengthFlag = false,changevalue = '';
	if( value.indexOf('-') != -1 ){//有负号
		changevalue = value.split(',').join('').substring(1,value.split(',').join('').length);
	}else{//没有负号
		changevalue = value.split(',').join('');
	};
	if( changevalue.length<=14 ){
		decimalLengthFlag = true;
	}else{
		if( changevalue.length > 17 ){
			decimalLengthFlag = false;
		}else{
			decimalLengthFlag = true;
			if( changevalue.substring(0,14).indexOf('.') == -1 ){//第15位之前没有小数点,第15位只能是小数点
				if( changevalue.charAt(14) == '.' ){
					decimalLengthFlag = true;
				}else{
					decimalLengthFlag = false;
				}
			}
		};
	};
	return this.optional(element) || decimalLengthFlag;
}, "超出金额可输入最大位数");

//验证加了逗号分隔符的数字只能输入n位数,包括小数点和小数点后两位(即使没有输入小数也要自动补两位小数),不包括'-'号(这里是11位,征信上报注册资本等使用)
//如果第9位之前没有小数点,则第9位只能输入小数点,如果第9位之前有小数点,则不做处理
jQuery.validator.addMethod("decimalLengthValid2", function(value, element) {
	var decimalLengthFlag = false,changevalue = '';
	if( value.indexOf('-') != -1 ){//有负号
		changevalue = value.split(',').join('').substring(1,value.split(',').join('').length);
	}else{//没有负号
		changevalue = value.split(',').join('');
	};
	if( changevalue.length<=8 ){
		decimalLengthFlag = true;
	}else{
		if( changevalue.length > 11 ){
			decimalLengthFlag = false;
		}else{
			decimalLengthFlag = true;
			if( changevalue.substring(0,8).indexOf('.') == -1 ){//第9位之前没有小数点,第9位只能是小数点
				if( changevalue.charAt(8) == '.' ){
					decimalLengthFlag = true;
				}else{
					decimalLengthFlag = false;
				}
			}
		};
	};
	return this.optional(element) || decimalLengthFlag;
}, "超出金额可输入最大位数");

//验证加了逗号分隔符的数字只能输入n位数,包括小数点和小数点后两位(即使没有输入小数也要自动补两位小数),不包括'-'号(这里是21位,不良信贷/借款人诉讼等使用)
//如果第19位之前没有小数点,则第19位只能输入小数点,如果第19位之前有小数点,则不做处理
jQuery.validator.addMethod("decimalLengthValid3", function(value, element) {
	var decimalLengthFlag = false,changevalue = '';
	if( value.indexOf('-') != -1 ){//有负号
		changevalue = value.split(',').join('').substring(1,value.split(',').join('').length);
	}else{//没有负号
		changevalue = value.split(',').join('');
	};
	if( changevalue.length<=18 ){
		decimalLengthFlag = true;
	}else{
		if( changevalue.length > 21 ){
			decimalLengthFlag = false;
		}else{
			decimalLengthFlag = true;
			if( changevalue.substring(0,18).indexOf('.') == -1 ){//第9位之前没有小数点,第9位只能是小数点
				if( changevalue.charAt(18) == '.' ){
					decimalLengthFlag = true;
				}else{
					decimalLengthFlag = false;
				}
			}
		};
	};
	return this.optional(element) || decimalLengthFlag;
}, "超出金额可输入最大位数");

//添加逗号分隔符(每输入一个字符就执行一次)
function commaDelimiter(value,fillDecimal){//需要加逗号的值
	if( value=='' ){
		return value;
	}else{

		value = value.toString();
		if( !(/^(\-|\+)?\d+(\.\d+)?$/.test(value.split(',').join(''))) ){//不符合正数或负数或小数时把逗号通通去掉
			return value.split(',').join('');
		}else{
			var lastnumber = '',prevnumber = value.split('.')[0].split(',').join('');
			lastnumber = value.indexOf('.')>0?'.'+value.split('.')[1]:'';//有小数点时,添加完逗号后需要把小数点后的内容加回来
			if( fillDecimal=='need' ){   // 需要手动补小数位,基本用在列表显示
				if( lastnumber == '' ){
					lastnumber = '.00';
				}else{
					if( lastnumber.length == 2 ){
						lastnumber += '0';
					}
				};
			};
			//对小数点前的进行操作,倒数每隔三位添加一个逗号
			return prevnumber.toString().replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,") + lastnumber;
		}
	}
};

//元换成万元
function unitConversion(v) {
	return commaDelimiter((Math.round(v*100))/100,'need')
}

//显示列表金额处理
function handleListAmountFn(amount,currency){
	var amountShowStr = '';
	if( amount!=undefined && amount!='' ){
		amount = amount.toString();
		if( currency ){
			amountShowStr += currency;
		};
		if( amount.indexOf('-')>=0 ){
			amountShowStr += '-';
		};
		if( amount.indexOf('-')>=0 ){
			amountShowStr += (' '+commaDelimiter(amount.split('-')[1],'need'));
		}else{
			amountShowStr += (' '+commaDelimiter(amount.split('-')[0],'need'));
		}
	};
	return amountShowStr;
};

//回到顶部
function backTop(str){
	$(str).animate({scrollTop:0})
};

//各个列表查询参数
var mylistpage = 1;//获取列表的页数（第几页）---mylistpage 第一层列表页数  sendlistpage 内部一层列表页数
var messagetypeid = '',messagetypeword = '请选择消息类型', messagecontent = '';//消息管理进入已发送 保存查询时的消息类型id,文字,消息标题或内容
var sendmessagetypeid = '',sendmessagetypeword = '请选择消息类型',sendmessagecontent = '',sendlistpage = 1;//历史发送消息进入新增时保存查询条件

var enterPriseBusinessQuery = {//企业信息管理查询条件   business   import
	'businessKeyValue':'','businessListPage':1,'importKeyValue':'','importListPage':1,'source':'business','enterPriseDomesticCompanyId':''
};
var businessEmployeeEmpName = '';//员工列表查询条件
var businessStockholderShName = '';//股东列表查询条件
var businessBranchedShName = '';//分支机构列表查询条件
var businessUpdateRecordName = '';//变更记录列表查询条件
var businessExecutedInfoName = '';//被执行人列表查询条件
var businessDishonestExecutedName = '';//失信执行列表查询条件
var businessJudgeDocumentCaseNo = '';//裁判文书列表查询条件
var businessCourtAnnouncementName = '';//法院公告列表查询条件
var businessCertificateQualificName = '';//经营异常列表查询条件
var businessSoftwareCopyrightName = '';//软件著作列表查询条件
var businessEntryName = '';//在线查询进入tab详情时保存查询条件
var reportStartTime='',reportEndTime='',reportListPage=1;//财务报表

var interfacetypeid = '';//企业信息管理-历史数据查询列表保留查询条件

var businessQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId: ''
}

var supplierQuery = {
	listPage : 1, searchName: '',
}

var enterpriseQuery = {
	listPage : 1, searchName: '',
}

var platformQuery = {
	listPage: 1
}

var salesContractQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var salesContractProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var salesContractAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var purchaseContractQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var purchaseContractProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var purchaseContractAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var acceptanceQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId:'',detailId2:''
}

var acceptancePendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var acceptanceProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var acceptanceAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var signQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId:'',detailId2:''
}

var signPendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var signProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var signAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var settleQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId:'',detailId2:''
}

var settlePendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var settleProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var settleAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var underlyingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId:'',detailId2:''
}

var underlyingPendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var underlyingProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var underlyingAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: ''
}

var invoiceQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId:'',detailId2:'',source:''
}

var purchInvoicePendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var purchInvoiceProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var purchInvoiceAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var saleInvoicePendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var saleInvoiceProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var saleInvoiceAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',amountType:'',invoiceType:''
}

var cashFlowQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',type:'',detailId:''
}

var bankNewsQuery = {//现金流-银行信息设置列表查询条件
	'listPage':1,'bankCompanyOwnershipId':'','bankKeyWord':''
};

var ledgerPendingQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId: '', customerName: ''
}

var ledgerProcessedQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId: ''
}

var ledgerAllQuery = {
	listPage : 1, searchName: '',startDate: '',endDate: '',status: '',detailId: ''
}

//----------------------------------------------------------------
var messageJumpTakId = '';// 消息列表跳往业务模块的业务数据的taskid
var messageJumpLeastEname = '';// 消息列表跳往业务模块的最深层的ename
var messageJumpLeastPrevId = '';// 消息列表跳往业务模块的需要再次进入的数据 id


//获取用户未读消息数量
function getUnreadMessage(){
	$.ajax({
		url:'/systemMsg/do_getUnreadMessageNum',
		type:'get',
		data:{},
		beforeSend: function (xhr) {},
		success:function(data){
			if( data.success ){
				var totalNumber = data.data.totalNumber>=100?'99+':data.data.totalNumber;
				$(".unreadMessage").text(totalNumber);
				$(".totalNumber").text(data.data.totalNumber);
				$(".systemMessageNumber").text(data.data.systemMessageNumber);
				$(".pendingNewsNumber").text(data.data.pendingNewsNumber);
				if( data.data.totalNumber>0 ){
					$(".totalNumberli").addClass('havemessage');
					$(".headmessage .dropdown-toggle").addClass("move");
					if( data.data.totalNumber>=10 ){
						$(".headmessage .dropdown-toggle").addClass("largeTen");
						if( data.data.totalNumber>=100 ){
							$(".headmessage .dropdown-toggle").addClass("largeHun");
						}
					};
				}else{
					$(".totalNumberli").removeClass('havemessage');
					$(".headmessage .dropdown-toggle").removeClass("move");
					$(".headmessage .dropdown-toggle").removeClass("largeTen");
					$(".headmessage .dropdown-toggle").removeClass("largeHun");
				};

				setTimeout(getUnreadMessage,2000)
			}else{
				new $.zui.Messager('获取未读消息数量失败:'+data.msg, {
					type: 'danger'
				}).show();
				window.location.href = '';
			}
		},
		error:function(status){
			new $.zui.Messager('获取未读消息数量时发生错误:'+status, {
				type: 'danger'
			}).show();
			window.location.href = '';
		},
		complete: function (xhr, status) {}
	})
};

//获取系统当前时间(精确到日, 不加不减)
function getCurrentDayTime(){
	var currentTime = '';
	$.ajax({
		url:"/index/getSystemNowDate",
		type:'get',
		async:false,
		success:function(data){
			if( data.success ){
				currentTime = data.data;
			}else{
				new $.zui.Messager('获取当前系统时间失败:'+ data.msg, {
					type: 'danger'
				}).show();
			}
		},
		error:function(status){
			new $.zui.Messager('获取当前系统时间时发生错误:'+status, {
				type: 'danger'
			}).show();
		}
	})
	return currentTime
};

// 获取当前登录用户的所有权限
function getpermission(){
	var permissionData = [];
	$.ajax({
		url:'/user/do_permission',//获取当前用户的权限
		type:'get',
		async:false,
		success:function(data){
			if( data.success ){
				permissionData = data.data;
			}else{
				new $.zui.Messager('获取当前用户权限失败:'+data.msg, {
					type: 'danger'
				}).show();
			}
		},
		error:function(status){
			new $.zui.Messager('获取当前用户权限时发生错误:'+status, {
				type: 'danger'
			}).show();
		}
	});
	return permissionData;
};

//权限相关操作后可以登录系统时的操作
function afterPermission(){
	$('.yk_menubox').load('/permission/sidebar',function(){//重新加载左侧菜单
		endMenuLine();
		if( $(".yk_menu #orgManage").length<=0 ){//没有'组织机构管理'权限
			loadIndexPage();
		}else{//有'组织机构管理'权限
			$(".yk_menu #sysManage").next().show();
			$(".yk_menu #orgManage").addClass("yk_menuactive");
			//判断有没有'新增角色组,新增角色,添加成员,批量移除成员,调整成员排序'的权限
			if( $(".yk_menubox #addRoleGroup").length<=0 ){$(".yk_roleBtn .yk_addRoleGroup").remove();}else{if( $(".yk_roleBtn .yk_addRoleGroup").length<=0 ){if( $(".yk_roleBtn .yk_addRole").length<=0 ){$(".yk_roleBtn").append($("#addRoleGroupTag").html())}else{$(".yk_roleBtn .yk_addRole").before($("#addRoleGroupTag").html())}}};
			if( $(".yk_menubox #addRole").length<=0 ){$(".yk_roleBtn .yk_addRole").remove();}else{if( $(".yk_roleBtn .yk_addRole").length<=0 ){if( $(".yk_roleBtn .yk_addRoleGroup").length<=0 ){$(".yk_roleBtn").append($("#addRoleTag").html())}else{$(".yk_roleBtn .yk_addRoleGroup").after($("#addRoleTag").html())}}};
			if( $(".yk_roleBtn button").length<=0 ){$("#roleTree").css({'top':'1.3rem'})}else{$("#roleTree").css({'top':'1.68rem'})};
			if( $(".yk_menubox #addRoleUserRel").length<=0 ){$(".yk_orgDepartBtnbox .addRoleMember").remove();}else{if( $(".yk_orgDepartBtnbox .addRoleMember").length<=0 ){if( $(".yk_orgDepartBtnbox button").length<=0 ){$(".yk_orgDepartBtnbox").append($("#addRoleMemberTag").html())}else{$(".yk_orgDepartBtnbox button:first").before($("#addRoleMemberTag").html())}}};
			if( $(".yk_menubox #batchDeleteRoleUserRel").length<=0 ){$(".yk_orgDepartBtnbox .deletesRoleMember").remove()}else{if( $(".yk_orgDepartBtnbox .deletesRoleMember").length<=0 ){if( $(".yk_orgDepartBtnbox button").length<=0 ){$(".yk_orgDepartBtnbox").append($("#deletesRoleMemberTag").html())}else{if( $(".yk_orgDepartBtnbox .addRoleMember").length>0 ){$(".yk_orgDepartBtnbox .addRoleMember").after($("#deletesRoleMemberTag").html())}else{$(".yk_orgDepartBtnbox button:first").before($("#deletesRoleMemberTag").html())}}}};
			if( $(".yk_menubox #orderRoleUser").length<=0 ){$(".yk_orgDepartBtnbox .adjustRoleMemberSort").remove();}else{if( $(".yk_orgDepartBtnbox .adjustRoleMemberSort").length<=0 ){$(".yk_orgDepartBtnbox").append($("#adjustRoleMemberSortTag").html())}};
		}
	})
};

//获取当前登录用户是否是管理员
function getLongUser(){
	$.ajax({
		url:'/user/do_getLongUser',//获取当前用户是否是管理员
		type:'get',
		async:false,
		success:function(data){
			if( data.success ){
				if( data.data.admin ){//是管理员,一定可以登录系统且有全部权限
					afterPermission();
				}else{//不是管理员
					if( getpermission().length<=0 ){//不能登录系统
						new $.zui.Messager('您已不属于任何角色,暂时无法登录系统,请联系管理分配一个角色', {
							type: 'warning'
						}).show();
						//退出到登录页面
						$.post('/session/sgin_out',function(){
							window.location.href = 'http://'+window.location.host+'/authority/login'
						});
					}else{//可以登录系统
						afterPermission()
					}
				}
			}else{
				new $.zui.Messager('获取当前用户是否是管理员失败:'+data.msg, {
					type: 'danger'
				}).show();
			}
		},
		error:function(status){
			new $.zui.Messager('获取当前用户是否是管理员时发生错误:'+status, {
				type: 'danger'
			}).show();
		}
	})
};

//给每个菜单的最后一个三级菜单(如果有的话)添加类名,防止一级菜单连接线没有结束
function endMenuLine(){
	for( var i=0;i<$(".yk_thirdmenu").length;i++ ){
		if( $(".yk_thirdmenu").eq(i).parent().index() == $(".yk_thirdmenu").eq(i).parents('.yk_menuout').find('.yk_secondmenu>li').length-1 ){
			$(".yk_thirdmenu").eq(i).addClass("noleftborder")
		}
	};
};

//根据是否有月历权限右侧加载对应页面
function loadIndexPage(){
	if( GetRequest() ){
		if( GetRequest()['showbusinesspage']=='yes' ){
			$("#enterpriseInfoManagement").addClass("yk_menuactive");
			enterPriseBusinessQuery.enterPriseDomesticCompanyId = GetRequest()['businesscode'];
			$(".yk_rightcontent").load('/enterPriseBusiness/baseTab',function(){
				$("#businessname").text( GetRequest()['businessname'] );
				$("#companySocialCreditCode").val( GetRequest()['businesscode'] );
				$("#companyId").val('');
			});
			return;
		};
		if( GetRequest()['viewUnderlyingAssets']=='1' ){
			return;
		};
		if( GetRequest()['viewInitiation']=='1' ){
			return;
		};
		if( GetRequest()['viewDuediligence']=='1' ){
			return;
		};
		if( GetRequest()['viewAssignMoneyFile']=='1' ){// 查看金额分配附件
			$('#assignFileTextarta').val(window.localStorage.getItem('assignFileTextartaText'));
			var editor = new UE.ui.Editor({
				'fullscreen':true
			});
			editor.render('assignFileTextarta');
			editor.addListener('ready',function(){
				editor.setDisabled();
			});
			return;
		};
	};

	if( $("#workingCalendar").length<=0 ){
		const questionIndex = window.location.hash.indexOf('?')
		let hashUrl = ''
		if(questionIndex === -1) {
			hashUrl = window.location.hash.slice(1)
		}else {
			hashUrl = window.location.hash.slice(1, questionIndex)
		}
		const routesFilter =  routesList.filter(item => item.path === hashUrl)
		if(routesFilter.length) {
			$('.yk_rightcontent').hide()
			$('#vueApp').show()
			routesFilter[0].sidebarId.forEach((item, index) => {
				if(index === routesFilter[0].sidebarId.length - 1) {
					$(item).addClass("yk_menuactive")
				}else {
					$(item).next().show()
				}
			});
		}else {
			$('.yk_rightcontent').show()
			$('#vueApp').hide()
			$(".yk_rightcontent").load('/org/welcomeIndex');
			window.location.href = 'http://'+window.location.host+'/#/welcome'
		}
	}else{//有月历权限则进入直接展示月历
		console.log(22222)
		$(".yk_rightcontent").load('/weekWorkPlan/calendarPage');
		window.location.href = 'http://'+window.location.host+'/#/workingCalendar'
		$("#officeManagement").next().show();
		$("#fiftyTwoManage").next().show();
		$("#workingCalendar").addClass("yk_menuactive")
	}
};

$(document).ready(function() {
	endMenuLine();
	getUnreadMessage();//获取头部未读消息数量

	$('.yk_head .headmessage').click(function(){
		if( $('.yk_menu #messageManage').length<=0 ){
			new $.zui.Messager('无消息管理模块权限, 请联系管理员开通', {
				type: 'danger'
			}).show();
		}else{
			$('.yk_menu #messageManage').click();
			window.location.href = window.location.origin+'/#/messageManage'
		}
	});

	//点击头部未读消息数量进入消息列表
	$(".tosystemmsg").click(function(e){
		$(".yk_menuactive").removeClass('yk_menuactive');
		$('#messageManage').addClass('yk_menuactive');
		$('.yk_secondmenu,.yk_thirdmenu').hide();
		if( $('#messageManage').parent().parent().hasClass("yk_thirdmenu") ){
			$('#messageManage').parents('.yk_menuout').find('.yk_thirdmenu').show();
		}
		$('#messageManage').parents('.yk_menuout').find('.yk_secondmenu').show();
		mylistpage = 1;
		messagecontent = '';
		sendmessagetypeid = '';
		sendmessagetypeword = '请选择消息类型';
		sendmessagecontent = '';
		sendlistpage = 1;
		if( $(this).attr('id')=='systemMessageNumber' ){
			messagetypeword = '系统消息';
		}else{
			messagetypeword = '待办消息';
		};
		for( var i=0;i<$(".getmessageType").length;i++ ){
			if( $(".getmessageType").eq(i).find('a').text()==messagetypeword ){
				messagetypeid = $(".getmessageType").eq(i).attr("value");
				break;
			}
		};
		i = null;
		if( $(".yk_menubox #messageManage").length<=0 ){
			new $.zui.Messager('您没有消息模块的权限, 请联系管理员开通', {
				type: 'danger'
			}).show();
		}else{
			$(".yk_rightcontent").load($('#messageManage').attr("url"),function(){
				backTop('.yk_rightcontent');
			});
		};
	});

	//滑入悬浮显示列全部数据
	$("body").on("mouseenter",".ui-jqgrid-bdiv td",function(){
		if( $(this).parents(".attendance-datagrid").length>0 ){return}//考勤的不需要
		$(this).attr("title",'');
		if( $(this).text()!=undefined && $(this).text()!=' ' && $(this).text()!='' && $(this).text()!=' ' && !$(this).hasClass("jqgrid-rownum") && $(this).find(".noHover").length<=0 ){
			var ellipsisDomText = $(this).text();
			if( $(this).hasClass('tableRowMultiple') ){
				ellipsisDomText = $(this).html();
			};
			if( $(this).find('.ellipsisDom').length<=0 ){
				if( $(this).children().length<=0 ){
					$(this).empty().append('<div class="ellipsisDom">'+ellipsisDomText+'<div style="font-size:0;width:0;height:0;border:0;"></div></div>');
				}else{
					$(this).children().addClass("ellipsisDom");
					$(this).children().append("<span style='font-size:0;width:0;height:0;border:0;display:block;'></span>");
				}
			}else{

			};
			$(".tableToolTip").remove();
			$(this).css({'position':'relative','overflow':'visible'});
			if( $(this).hasClass('rightTitle') ){
				$(this).append("<div class='tableToolTip' style='right:"+$(this).width()/2+"px;top:"+($(this).height()/2+12)+"px;display:block;'><p>"+ellipsisDomText+"</p></div>");
			}else{
				$(this).append("<div class='tableToolTip' style='left:"+$(this).width()/2+"px;top:"+($(this).height()/2+12)+"px;display:block;'><p>"+ellipsisDomText+"</p></div>");
			};
			$(this).find('.tableToolTip').width($(this).find('.tableToolTip>p').innerWidth()+10)
		};
		return false;
	});
	$("body").on("mouseenter",".tableToolTip",function(){return false;});
	$("body").on("mouseleave",".tableToolTip",function(){$(".tableToolTip").remove();return false;});
	$("body").on("mouseleave",".ui-jqgrid-bdiv td",function(){$(".tableToolTip").remove();});
	$("body").mouseenter(function(){$(".tableToolTip").remove();})

	//全局禁掉回车提交
	$("body").off("keydown").on("keydown","input",function(event){
		var e = event || window.event || arguments.callee.caller.arguments[0];
		if(e && e.keyCode==13){
			return false;
		}
	});
	$("body").off("click").on("click","button",function(){
		$(this).blur();
	});
	//展开关闭菜单
	$('.yk_menubox').on('click',".yk_firstmenu",function(){
		if( $(this).next().hasClass('yk_secondmenu') ){
			$(this).next().slideToggle();
		}
	});
	$('.yk_menubox').on('click',".yk_secondlink",function(){
		if( $(this).next().hasClass('yk_thirdmenu') ){
			$(this).next().slideToggle();
		}
	});
	$(".yk_menubox").on('click',".menu-link",function(){
		$(".yk_menuactive").removeClass('yk_menuactive');
		$(this).addClass('yk_menuactive');
		$('.yk_secondmenu,.yk_thirdmenu').hide();
		if( $(this).parent().parent().hasClass("yk_thirdmenu") ){
			$(this).parent().parent().show();
		}
		$(this).parents('.yk_menuout').find('.yk_secondmenu').show();
		$.ajax({
			url:'/org/findRootOrgTreeNode',
			type:'get',
			async:false,
			data:{},
			success:function(data){
				$("#navTreeSelectOrgId").val(data[0].id);
				orgIdTitle=undefined;
			}
		});
		localStorage.removeItem("localdata");

		mylistpage = 1;messagecontent = '';messagetypeid = '';messagetypeword = '请选择消息类型';sendmessagetypeid = '';sendmessagetypeword = '请选择消息类型';sendmessagecontent = '';sendlistpage = 1;

		enterPriseBusinessQuery.businessKeyValue = '';enterPriseBusinessQuery.businessListPage = 1;enterPriseBusinessQuery.importKeyValue = '';enterPriseBusinessQuery.importListPage = 1;enterPriseBusinessQuery.source = 'business';enterPriseBusinessQuery.enterPriseDomesticCompanyId = '';

		businessEmployeeEmpName = '';businessStockholderShName = '';businessBranchedShName = '';businessUpdateRecordName = '';businessExecutedInfoName = '';businessDishonestExecutedName = '';businessJudgeDocumentCaseNo = '';businessCourtAnnouncementName = '';businessCertificateQualificName = '';businessSoftwareCopyrightName = '';businessEntryName = '';
		reportStartTime='';reportEndTime='';reportListPage=1;interfacetypeid = '';

		businessQuery.listPage=1; businessQuery.startDate=''; businessQuery.endDate=''; businessQuery.status=''; businessQuery.searchName='';businessQuery.detailId='';

		salesContractQuery.listPage=1; salesContractQuery.startDate=''; salesContractQuery.endDate=''; salesContractQuery.status=''; salesContractQuery.searchName='';

		salesContractProcessedQuery.listPage=1; salesContractProcessedQuery.startDate=''; salesContractProcessedQuery.endDate=''; salesContractProcessedQuery.status=''; salesContractProcessedQuery.searchName='';

		salesContractAllQuery.listPage=1; salesContractAllQuery.startDate=''; salesContractAllQuery.endDate=''; salesContractAllQuery.status=''; salesContractAllQuery.searchName='';

		purchaseContractQuery.listPage=1; purchaseContractQuery.startDate=''; purchaseContractQuery.endDate=''; purchaseContractQuery.status=''; purchaseContractQuery.searchName='';

		purchaseContractProcessedQuery.listPage=1; purchaseContractProcessedQuery.startDate=''; purchaseContractProcessedQuery.endDate=''; purchaseContractProcessedQuery.status=''; purchaseContractProcessedQuery.searchName='';

		purchaseContractAllQuery.listPage=1; purchaseContractAllQuery.startDate=''; purchaseContractAllQuery.endDate=''; purchaseContractAllQuery.status=''; purchaseContractAllQuery.searchName='';

		acceptanceQuery.listPage=1; acceptanceQuery.startDate=''; acceptanceQuery.endDate=''; acceptanceQuery.status=''; acceptanceQuery.searchName='';acceptanceQuery.detailId='';acceptanceQuery.detailId2='';

		acceptancePendingQuery.listPage=1; acceptancePendingQuery.startDate=''; acceptancePendingQuery.endDate=''; acceptancePendingQuery.status=''; acceptancePendingQuery.searchName='';

		acceptanceProcessedQuery.listPage=1; acceptanceProcessedQuery.startDate=''; acceptanceProcessedQuery.endDate=''; acceptanceProcessedQuery.status=''; acceptanceProcessedQuery.searchName='';

		acceptanceAllQuery.listPage=1; acceptanceAllQuery.startDate=''; acceptanceAllQuery.endDate=''; acceptanceAllQuery.status=''; acceptanceAllQuery.searchName='';

		settleQuery.listPage=1; settleQuery.startDate=''; settleQuery.endDate=''; settleQuery.status=''; settleQuery.searchName='';settleQuery.detailId='';settleQuery.detailId2='';

		settlePendingQuery.listPage=1; settlePendingQuery.startDate=''; settlePendingQuery.endDate=''; settlePendingQuery.status=''; settlePendingQuery.searchName='';

		settleProcessedQuery.listPage=1; settleProcessedQuery.startDate=''; settleProcessedQuery.endDate=''; settleProcessedQuery.status=''; settleProcessedQuery.searchName='';

		settleAllQuery.listPage=1; settleAllQuery.startDate=''; settleAllQuery.endDate=''; settleAllQuery.status=''; settleAllQuery.searchName='';

		underlyingQuery.listPage=1; underlyingQuery.startDate=''; underlyingQuery.endDate=''; underlyingQuery.status=''; underlyingQuery.searchName='';underlyingQuery.detailId='';underlyingQuery.detailId2='';

		underlyingPendingQuery.listPage=1; underlyingPendingQuery.startDate=''; underlyingPendingQuery.endDate=''; underlyingPendingQuery.status=''; underlyingPendingQuery.searchName='';

		underlyingProcessedQuery.listPage=1; underlyingProcessedQuery.startDate=''; underlyingProcessedQuery.endDate=''; underlyingProcessedQuery.status=''; underlyingProcessedQuery.searchName='';

		underlyingAllQuery.listPage=1; underlyingAllQuery.startDate=''; underlyingAllQuery.endDate=''; underlyingAllQuery.status=''; underlyingAllQuery.searchName='';

		invoiceQuery.listPage=1; invoiceQuery.startDate='',invoiceQuery.endDate='';invoiceQuery.searchName='';invoiceQuery.status='';invoiceQuery.source='';invoiceQuery.detailId='';invoiceQuery.detailId2='';

		purchInvoicePendingQuery.listPage=1; purchInvoicePendingQuery.startDate=''; purchInvoicePendingQuery.endDate=''; purchInvoicePendingQuery.status=''; purchInvoicePendingQuery.searchName='';purchInvoicePendingQuery.amountType='';purchInvoicePendingQuery.invoiceType='';

		purchInvoiceProcessedQuery.listPage=1; purchInvoiceProcessedQuery.startDate=''; purchInvoiceProcessedQuery.endDate=''; purchInvoiceProcessedQuery.status=''; purchInvoiceProcessedQuery.searchName='';purchInvoiceProcessedQuery.amountType='';purchInvoiceProcessedQuery.invoiceType='';

		purchInvoiceAllQuery.listPage=1; purchInvoiceAllQuery.startDate=''; purchInvoiceAllQuery.endDate=''; purchInvoiceAllQuery.status=''; purchInvoiceAllQuery.searchName='';purchInvoiceAllQuery.amountType='';purchInvoiceAllQuery.invoiceType='';

		saleInvoicePendingQuery.listPage=1; saleInvoicePendingQuery.startDate=''; saleInvoicePendingQuery.endDate=''; saleInvoicePendingQuery.status=''; saleInvoicePendingQuery.searchName='';saleInvoicePendingQuery.amountType='';saleInvoicePendingQuery.invoiceType='';

		saleInvoiceProcessedQuery.listPage=1; saleInvoiceProcessedQuery.startDate=''; saleInvoiceProcessedQuery.endDate=''; saleInvoiceProcessedQuery.status=''; saleInvoiceProcessedQuery.searchName='';saleInvoiceProcessedQuery.amountType='';saleInvoiceProcessedQuery.invoiceType='';

		saleInvoiceAllQuery.listPage=1; saleInvoiceAllQuery.startDate=''; saleInvoiceAllQuery.endDate=''; saleInvoiceAllQuery.status=''; saleInvoiceAllQuery.searchName='';saleInvoiceAllQuery.amountType='';saleInvoiceAllQuery.invoiceType='';

		cashFlowQuery.listPage=1; cashFlowQuery.searchName=''; cashFlowQuery.startDate=''; cashFlowQuery.endDate=''; cashFlowQuery.type=''; cashFlowQuery.status='';cashFlowQuery.detailId='';

		bankNewsQuery.listPage = 1;bankNewsQuery.bankCompanyOwnershipId = '';bankNewsQuery.bankKeyWord = '';

		ledgerPendingQuery.listPage=1; ledgerPendingQuery.startDate=''; ledgerPendingQuery.endDate=''; ledgerPendingQuery.status=''; ledgerPendingQuery.searchName='';ledgerPendingQuery.detailId=''; ledgerPendingQuery.customerName='';

		ledgerProcessedQuery.listPage=1; ledgerProcessedQuery.startDate=''; ledgerProcessedQuery.endDate=''; ledgerProcessedQuery.status=''; ledgerProcessedQuery.searchName='';ledgerProcessedQuery.detailId='';

		ledgerAllQuery.listPage=1; ledgerAllQuery.startDate=''; ledgerAllQuery.endDate=''; ledgerAllQuery.status=''; ledgerAllQuery.searchName='';ledgerAllQuery.detailId='';

		supplierQuery.listPage=1; supplierQuery.searchName='';

		enterpriseQuery.listPage=1; enterpriseQuery.searchName='';

		platformQuery.listPage=1;

		messageJumpTakId = '';messageJumpLeastEname = '';messageJumpLeastPrevId = '';

		$('.datetimepicker.dropdown-menu').remove();
		if(!$(this).attr("url")) {
			$(".yk_rightcontent").empty()
			$("#vueApp").show()
			$(".yk_rightcontent").hide()
		}else {
			$(".yk_rightcontent").show()
			$("#vueApp").hide()
			$(".yk_rightcontent").load($(this).attr("url"),function(){
				backTop('.yk_rightcontent');
			});
		}
	});
	loadIndexPage();

	//设置全局beforeSend时显示加载图标
	function initAjaxSetup(){
		var indexxx = '';
		$.ajaxSetup({
			type: "POST",
			beforeSend: function (xhr) {
				indexxx = layer.load(0, {time: 30*1000,shade: [0.01, '#fff']});
			},
			error: function (xhr, status, e) {

			},
			complete: function (xhr, status) {
				layer.close(indexxx);
			}
		});
	};
	initAjaxSetup();

});
