| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 | 
$(function() {		$('select[node-payMentsSelect]').change(function() {		 var payVal=$(this).val();		 		 if(payVal=="INCOME"){			 $('#INCOMEBox').show();			 $('#EXPENDITUREBox').hide();		 }else if(payVal=="EXPENDITURE"){			 $('#INCOMEBox').hide();			 $('#EXPENDITUREBox').show();		 }	});		$('select[node-accountTypeSelect]').change(function() {		 var payVal=$(this).val();		 if(payVal=="1"){			 $('div[node-accountMsg1]').show();			 $('div[node-accountMsg2]').hide();			 $('div[node-accountMsg4]').hide();			 $('div[node-accountMsg7]').hide();			 $('div[node-accountMsg9]').hide();		 }else if(payVal=="2"){			 $('div[node-accountMsg1]').hide();			 $('div[node-accountMsg2]').show();			 $('div[node-accountMsg4]').hide();			 $('div[node-accountMsg7]').hide();			 $('div[node-accountMsg9]').hide();		 }else if(payVal=="4"){			 $('div[node-accountMsg1]').hide();			 $('div[node-accountMsg2]').hide();			 $('div[node-accountMsg4]').show();			 $('div[node-accountMsg7]').hide();			 $('div[node-accountMsg9]').hide();		 }else if(payVal=="7"){			 $('div[node-accountMsg1]').hide();			 $('div[node-accountMsg2]').hide();			 $('div[node-accountMsg4]').hide();			 $('div[node-accountMsg7]').show();			 $('div[node-accountMsg9]').hide();		 }else if(payVal=="9"){			 $('div[node-accountMsg1]').hide();			 $('div[node-accountMsg2]').hide();			 $('div[node-accountMsg4]').hide();			 $('div[node-accountMsg7]').hide();			 $('div[node-accountMsg9]').show();		 }else{			 $('div[node-accountMsg1]').hide();			 $('div[node-accountMsg2]').hide();			 $('div[node-accountMsg4]').hide();			 $('div[node-accountMsg7]').hide();			 $('div[node-accountMsg9]').hide();		 }	});		$('select[node-expenditureTypeSelect]').change(function() {		 var payVal=$(this).val();				 if(payVal=="3"){			 $('div[node-expenditureMsg3]').show();			 $('div[node-expenditureMsg4]').hide();			 $('div[node-expenditureMsg6]').hide();		 }else if(payVal=="4"){			 $('div[node-expenditureMsg3]').hide();			 $('div[node-expenditureMsg4]').show();			 $('div[node-expenditureMsg6]').hide();		 }else if(payVal=="6"){			 $('div[node-expenditureMsg3]').hide();			 $('div[node-expenditureMsg4]').hide();			 $('div[node-expenditureMsg6]').show();		 }else{			 $('div[node-expenditureMsg3]').hide();			 $('div[node-expenditureMsg4]').hide();			 $('div[node-expenditureMsg6]').hide();		 }	});		$('select[node-accountTypeSearch]').change(function() {				$("#submitType").val(1);		 $('#iaa').submit();	});	$('select[node-expenditureTypeSearch]').change(function() {				$("#submitType").val(2);		 $('#iaa').submit();	});		$('select[select-wasteBook]').change(function() {		 $('#ira').submit();	});			$('a[node-income=detail]').click(function() {				var key=$(this).attr("data-isKey");		$('div[node-accountMsg1]').hide();		 $('div[node-accountMsg2]').hide();		 $('div[node-accountMsg4]').hide();		 $('div[node-accountMsg7]').hide();				var url = "/ajaxGetPaymentsByAid";		$.ajax({			url : url,			type : "post",			cache : false,			dataType : "json",			data : {				serial : key,			},			global : true,			success : function(data) {				if (data.status == 1) {					$("#accountTypeEdi").find("option[value='"+data.detail.accountType+"']").attr("selected",true);					 $('div[node-accountMsg'+data.detail.accountType+']').show();					 $("input[name=accountMsg"+data.detail.accountType+"][value="+data.detail.accountMsg+"]").attr("checked",true);					 					 $("#receivedBank").find("option[value='"+data.detail.receivedBank+"']").attr("selected",true);					 					 $("#receivedPrice").val(data.detail.receivedPrice);					 $("#receivedMsg").val(data.detail.receivedMsg);					 $("#receivedDate").val(data.detail.receivedDate);					 $("#aidKeyIncome").val(data.detail.aidKey);					 				} else					$("div[loading-msg='true']").html("illegal request");			},			error : function(err) {				$("div[loading-msg='true']").html("");				$("#nr").html('');			}		});	});	$('a[node-EXPENDITURE=detail]').click(function() {				var key=$(this).attr("data-isKey");		$('div[node-expenditureMsg3]').hide();				var url = "/ajaxGetPaymentsByAid";		$.ajax({			url : url,			type : "post",			cache : false,			dataType : "json",			data : {				serial : key,			},			global : true,			success : function(data) {				if (data.status == 1) {					$("#expenditureTypeEdi").find("option[value='"+data.detail.expenditureType+"']").attr("selected",true);					 $('div[node-expenditureMsg'+data.detail.expenditureType+']').show();					 $("input[name=expenditureMsg"+data.detail.expenditureType+"][value="+data.detail.expenditureMsg+"]").attr("checked",true);					 $("#expenditureBank").find("option[value='"+data.detail.expenditureBank+"']").attr("selected",true);										 $("#expenditurePrice").val(data.detail.expenditurePrice);										 $("#aidKeyExpenditure").val(data.detail.aidKey);				} else					$("div[loading-msg='true']").html("illegal request");			},			error : function(err) {				$("div[loading-msg='true']").html("");				$("#nr").html('');			}		});	});	$('a[del-income=detail]').click(function() {		var key=$(this).attr("data-isKey");	$("#aidKeyDel").val(key);	});$('a[node-pay=waste]').click(function() {		var key=$(this).attr("data-key");	var url = "/ajaxGetPaymentsByAid";		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#WI-wasteStaff").html(data.detail.staffDetail.username+'-'+data.detail.staffDetail.category);								$("#WI-bookSerial").html(data.detail.bookSerial);				$("#WI-expenditureMsg").html(data.detail.expenditureTypeMsg);				$("#WI-expenditurePrice").html(data.detail.expenditurePrice);				$("#WI-expenditureBank").html(data.detail.expenditureBank);				$("#WI-expenditureDate").html(data.detail.expenditureDate);				$("#WI-remarks").html(data.detail.remarks);							} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});$('a[node-income=waste]').click(function() {		var key=$(this).attr("data-key");	var url = "/ajaxGetPaymentsByAid";		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#IN-wasteStaff").html(data.detail.staffDetail.username+'-'+data.detail.staffDetail.category);								$("#IN-bookSerial").html(data.detail.bookSerial);				$("#IN-expenditureMsg").html(data.detail.incomeTypeMsg);				$("#IN-expenditurePrice").html(data.detail.receivedPrice);				$("#IN-expenditureBank").html(data.detail.receivedBank);				$("#IN-expenditureDate").html(data.detail.receivedDate);				$("#IN-remarks").html(data.detail.remarks);							} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});$('a[node-ir=waste]').click(function() {		var key=$(this).attr("data-key");	var url = "/ajaxGetWasteinvoiceReceivables";		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#IR-wasteStaff").html(data.detail.inputStaff);								$("#IR-bookSerial").html(data.detail.receivablesSerial);				$("#IR-expenditureMsg").html(data.detail.receivablesMessage);				$("#IR-expenditurePrice").html(data.detail.OriginalPrice);				$("#IR-expenditureBank").html(data.detail.receivablesBank);				$("#IR-expenditureDate").html(data.detail.receivablesDate);											} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});$('a[node-i=waste]').click(function() {		var key=$(this).attr("data-key");	var url = "/ajaxGetWasteInvoice";		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#IR-wasteStaff").html(data.detail.userName);								$("#IR-bookSerial").html(data.detail.invoiceNo);				$("#IR-expenditureMsg").html(data.detail.invoiceElement);				$("#IR-expenditurePrice").html(data.detail.invoicePrice);				$("#IR-expenditureBank").html(data.detail.receivablesBank);				$("#IR-expenditureDate").html(data.detail.bindTime);											} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});$('a[node-ir11=waste]').click(function() {		var key=$(this).attr("data-key");	var url = "/ajaxGetWasteinvoiceReceivables";		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#IR11-wasteStaff").html(data.detail.inputStaff);								$("#IR11-bookSerial").html(data.detail.receivablesSerial);				$("#IR11-expenditureMsg").html(data.detail.receivablesMessage);				$("#IR11-expenditurePrice").html(data.detail.refundPrice);				$("#IR11-expenditureBank").html(data.detail.receivablesBank);				$("#IR11-expenditureDate").html(data.detail.receivablesDate);											} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});$('a[node-receipt=waste]').click(function() {		var key=$(this).attr("data-key");	var accountTypeKey=$(this).attr("data-accountTypeKey");	var url = "/ajaxGetWasteReceipt";		$("#wasteReceipt").html('');		$.ajax({		url : url,		type : "post",		cache : false,		dataType : "json",		data : {			serial : key,			accountTypeKey:accountTypeKey		},		global : true,		success : function(data) {			if (data.status == 1) {				$("#wasteReceipt").html(data.html);							} else				$("div[loading-msg='true']").html("illegal request");		},		error : function(err) {			$("div[loading-msg='true']").html("");		}	});});	})
 |