SIM0500.js 4.5 KB
//文字コードはEUCで保存すること
function chk_up(){

	sYM = document.frm.SIM_cboYaer.value+(("00"+ document.frm.SIM_cboMon.value).substr(("00"+document.frm.SIM_cboMon.value).length-2,2));
	if(document.frm.hidKaishi.value > sYM){
			alert("開始期間は"+(document.frm.hidKaishi.value).substr(0,4)+"年"+parseInt((document.frm.hidKaishi.value).substr(4,2))+"月以降を選択してください");
			return false;
	}

	for(i=0;i<(document.frm.elements["shikin[1][]"].length);i++){
		txtName = "shikin[1][]";
		val = document.frm.elements[txtName][i].value;
    if (val.match(/[^0-9]/g) && val != "") {
			alert("不正な金額が入力されています");
			return false;
		}
		txtName = "shikin[2][]";
		val = document.frm.elements[txtName][i].value;
    if (val.match(/[^0-9]/g) && val != "") {
			alert("不正な金額が入力されています");
			return false;
		}
	}

	document.frm.target = "_self";
	document.frm.action = "SIM0500.php";
	document.frm.method="POST";
	document.frm.submit();
}
function mycheck(val){
	if(val != ""){
		if (val.search(/^(\\|\$)?(0|-?[1-9]\d*)$/)	!=	-1 ){
			return true;
		}else{
			return false;
		}
	}else{
		return true;
	}
}


function show_conf(){
	window.open("","newwin","width=650,height=200,left=100,top=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,favorites=no,resizable=yes");
	document.frm.target = "newwin";
	document.frm.action = "SIM0502.php";
	document.frm.method="POST";
	document.frm.submit();
}

function memo_update(){
	document.frm.memo_flg.value = "1";
	document.frm.target = "_self";
	document.frm.action = "SIM0500.php";
	document.frm.method="POST";
	document.frm.submit();
}


function conf_close(){
	window.close();
}


function show_print(){

//	window.print();
	
	window.open("","prtwin","width=1024,height=840,status=no,menubar=yes,favorites=no,scrollbars=yes,resizable=yes");
	//window.open("","newwin2","width=1024,height=840,left=100,top=100,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,favorites=no,resizable=yes");

	document.frm.target = "prtwin";
	document.frm.action = "SIM0500.php?mode=p";
	document.frm.method="POST";
	document.frm.submit();
}

//*** エクセル出力 ***//
function excel_print(){
	document.frm.action = "SIM0601.php";
	document.frm.method="POST";
	document.frm.submit();
}


function dspUpdmsg() {
	document.getElementById("updmsg").innerHTML = "↑クリックで<br />確定します";
	document.getElementById("updmsg").style.color = "#FF0000";
	document.getElementById("updmsg").style.backgroundColor = "#DFFFFF";
	document.getElementById("updmsg").style.display = "block";
}

function csv_dl(){
	document.frm.action = "SIM0600.php";
	document.frm.method="POST";
	document.frm.submit();
}

function lnk_input(auth,sMode,bSeq,dSeq,cSeq){

	document.frm.btn_sim.value = "キャンセル";
	document.frm.btn_lst.value = "入金一覧へ";
	document.frm.sMode.value = sMode;
	document.frm.bSeq.value = bSeq;
	document.frm.dSeq.value = dSeq;

	document.frm.target="_self";

	if(auth == 1 || auth == 99){
		document.frm.action="SIM0210.php?chgmode=f&bSeq="+bSeq+"&dSeq="+dSeq+"&cSeq="+cSeq;
	}else{
		document.frm.action="SIM0200.php?chgmode=f";
	}
	document.frm.method="POST";
	document.frm.submit();
}

function lnk_uriage(mode, bdata,uriageMode, yyyy, mm){
	document.frm.elements['Disp_Y'].value = yyyy;
	document.frm.elements['Disp_M'].value = ("0" + mm).slice(-2);
//alert(document.frm.elements['Disp_Y'].value);
//alert(document.frm.elements['Disp_M'].value);
	document.frm.elements['cboMode'].value = mode;
	document.frm.elements['cboBunrui'].value = bdata;
	document.frm.elements['uriageMode'].value = uriageMode;
	document.frm.target="_self";
	document.frm.action="RCV1000.php";
	document.frm.method="POST";
	document.frm.submit();
}

function lnk_kariire(kmode, st, ed){

	document.frm.elements['kmode'].value = kmode;
	document.frm.elements['hensai_sd'].value = st;
	document.frm.elements['hensai_ed'].value = ed;

	document.frm.target="_self";
	document.frm.action="BRR0500.php";
	document.frm.method="POST";
	document.frm.submit();
}

function MoverStyle(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#B7E7F7";
	lay.style.cursor = "hand";
}

function MoutStyle(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#F7F7F7";
	lay.style.cursor = "default";
}

function MoutStyle2(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#FFCCCC";
	lay.style.cursor = "default";
}

function MoutStyle3(n){
	var lay;
	lay = document.getElementById("Td"+n);
	lay.style.background = "#FFFF99";
	lay.style.cursor = "default";
}