123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 사유입력 ( SPMRI03100_사유입력.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- /**
- * @desc : 화면초기화
- * @id :
- * @event : xforms-ready
- * @return : void
- * @authur : 박종훈
- */
- function fInitalize()
- {
-
- var sUserDeptcd = getUserInfo("dutplcecd");
-
-
- var sJobkind = getUserInfo("jobkindcd").substring(0, 2);
- var iptjobkind = "";
- if(sJobkind == "03") {
- iptjobkind = "03";
- }
- else if (sJobkind == "11") {
- iptjobkind = "05";
- }
- else {
- iptjobkind = "-";
- }
-
- model.makeValue("/root/send/rsnsrch/instcd", getUserInfo("dutplceinstcd"));
- model.makeValue("/root/send/rsnsrch/jobkind", iptjobkind);
- model.makeValue("/root/send/rsnsrch/deptcd", sUserDeptcd);
- model.makeValue("/root/send/rsnsrch/topyn","Y");
-
-
- submit("TRMRI03102");
- }
- /**
- * @desc : 확인버튼 클릭
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur : 박종훈
- */
- function fConfirm(){
- var sRsnCd = model.getValue("/root/main/accresn/resncd");
-
- if (sRsnCd == "")
- {
- messageBox("사유를", "C002");
- model.setFocus("cmb_resn");
- return;
- }
- else if (sRsnCd == "99")
- {
- var sEtc = model.getValue("/root/main/accresn/etc");
-
- var tmpEtc = sEtc.replace(/\s/g, "");
-
- if (tmpEtc == "") //기타사유 입력여부 검사
- {
- messageBox("기타 사유를", "C001");
- model.setValue("/root/main/accresn/etc", tmpEtc);
- ipt_etc.refresh();
- model.setFocus("ipt_etc");
- return;
- }
- else
- {
- if (sEtc.length < 6)
- {
- messageBox("한글5자, 영문10자 이상 기록", "I008");
- model.setFocus("ipt_etc");
- return;
- }
- }
- }
-
- var sRsnCd = model.getValue("/root/main/accresn/resncd");
- var rsnnm = model.getValue("/root/main/accresn/etc");
- var deptcd = getUserInfo("dutplcecd");
- var instcd = getUserInfo("dutplceinstcd");
- var jobkindcd = getUserInfo("jobkindcd");
-
- var pid = "";
- var orddd = "";
- var cretno = "";
- var ioflag = "";
-
- pid = model.getValue("/root/temp/outpatpaminfo/pid");
-
-
-
- //외래일때
- if (pid!="") {
- orddd = model.getValue("/root/temp/outpatpaminfo/orddd");
- cretno = model.getValue("/root/temp/outpatpaminfo/cretno");
- ioflag = model.getValue("/root/temp/outpatpaminfo/ioflag");
- }
- else {
- pid = model.getValue("/root/temp/inpatpaminfo/pid");
- if (pid!="") {
- orddd = model.getValue("/root/temp/inpatpaminfo/indd");
- cretno = model.getValue("/root/temp/inpatpaminfo/cretno");
- ioflag = model.getValue("/root/temp/inpatpaminfo/ioflag");
- }
- else {
- pid = model.getValue("/root/temp/etcpatpaminfo/pid");
- orddd = model.getValue("/root/temp/etcpatpaminfo/indd");
- cretno = model.getValue("/root/temp/etcpatpaminfo/cretno");
- ioflag = model.getValue("/root/temp/etcpatpaminfo/ioflag");
- }
- }
-
- model.makeValue("/root/send/savedata/pid",pid);
- model.makeValue("/root/send/savedata/orddd",orddd);
- model.makeValue("/root/send/savedata/cretno",cretno);
- model.makeValue("/root/send/savedata/ioflag",ioflag);
- model.makeValue("/root/send/savedata/rsncd",sRsnCd);
- model.makeValue("/root/send/savedata/rsnnm",rsnnm);
- model.makeValue("/root/send/savedata/deptcd",deptcd);
- model.makeValue("/root/send/savedata/jobkindcd",jobkindcd);
-
- submit("TXMRI03110");
-
- opener.javascript.setParameter("SPMRI03110_param_confirmyn","Y");
-
- model.close();
-
- }
- /**
- * @desc : 사유선택
- * @id :
- * @event : xforms-value-changed
- * @return : void
- * @authur : 박종훈
- */
- function fSelectResn()
- {
- var sRsnCd = model.getValue("/root/main/accresn/resncd");
- var sRsnNm = model.getValue("/root/init/resn/resnlist[rsncd='" + sRsnCd + "']/rsnnm");
- model.setValue("/root/main/accresn/resnnm", sRsnNm);
-
- if (sRsnCd == "99")
- {
- ipt_etc.disabled = false;
- }
- else
- {
- ipt_etc.disabled = true;
- }
-
- }
|