123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- /***********************************************************************************************************************************************
- * create date : 2008.02.12
- * author : dhkim
- * file name : SMMNA01040.js
- * desc : APU 헌혈자 명단 조회
- ***********************************************************************************************************************************************/
- var xDnorPath = '/root/main/dnorinfo';
- var xCondPath = '/root/cond';
- var xReqPath = '/root/send/reqdata';
- var currentDate = getCurrentDate();
- /*
- * 초기화
- */
- function fInit(){
- model.removeNodeset(xDnorPath);
-
- model.setValue(xCondPath + '/fromdd', currentDate);
- model.setValue(xCondPath + '/todd', currentDate);
-
- zbcfGetCodeList(new Array("M0376","L0095"), new Array("/root/init/M0376list","/root/init/L0095list")); //혈액형,직업코드
-
- //grd_dnorlist.extendLastCol = true;
- grd_dnorlist.frozencols = grd_dnorlist.colref("sex");
- fSearch();
- }
- /*
- * APU 헌혈자 명단를 조회한다.
- */
- function fSearch(){
-
- var fromdd = model.getValue(xCondPath+'/fromdd');
- var todd = model.getValue(xCondPath+'/todd');
- var pidflag = model.getValue(xCondPath+'/pidflag');
- var pid = model.getValue(xCondPath+'/pid');
- var btype = model.getValue(xCondPath+'/btype');
- var kindflag = model.getValue(xCondPath+'/kindflag');
-
- if(fromdd == '')
- fromdd = currentDate;
- if(todd == '')
- todd = currentDate;
-
- model.removeNodeset(xDnorPath + "/dnorlist");
- model.removeNodeset(xReqPath);
- model.makeValue(xReqPath + '/fromdd', fromdd);
- model.makeValue(xReqPath + '/todd', todd);
- model.makeValue(xReqPath + '/pidflag', pidflag);
- model.makeValue(xReqPath + '/pid', pid);
- model.makeValue(xReqPath + '/btype', btype);
- model.makeValue(xReqPath + '/kindflag', kindflag);
-
- if(!submit('TRMNA01041')){
- messageBox('조회를', 'E009');
- }
- }
- /*
- * 엑셀출력
- */
- function fExcel(){
- var pGrd = grd_dnorlist;
-
- if (pGrd.rows > pGrd.fixedrows ) {
- var fileName = window.fileDialog("save", ",", false, "APU헌혈자명단_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "") {
- pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false);
- messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
- }
- } else {
- messageBox("자료가 존재하지 않습니다.", "E999", "");
- }
- }
- /*
- * 팝업
- */
- function fSearchPatInfo() {
- var flag = model.getValue("/root/cond/pidflag");
- var vPid = "";
- if (flag =="") return;
- vPid = model.getValue("/root/cond/pid");
- var vsrchcond = "1";
-
- //팝업조건설정
- switch (flag) {
- case "1": // 공여자팝업
- //dnorno
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/dnorno", vPid);
- model.makeValue("/root/temp/autoflag", "Y"); //Y:조회 내역이 1건일 경우 자동 화면 닫기
- //NON:조회 내역이 없을 경우 자동 화면 닫기
- //dnornm
- if ( vPid.isNumber() != true ) {
- vsrchcond = "2";
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/dnornm", vPid);
- model.makeValue("/root/temp/autoflag", "Y");
- }
- //팝업호출
- modal("SPMNA02000", "1","150", "150", "SPMNA02000", "/root/temp", "/root/send");
- break;
- case "2": // 환자팝업
- //pid
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/pid", vPid);
- model.makeValue("/root/temp/autoflag", "Y");
- //명칭
- if ( vPid.isNumber() != true ) {
- vsrchcond = "2";
- model.removenode("/root/temp");
- model.makeValue("/root/temp/srchcond", vsrchcond);
- model.makeValue("/root/temp/pid", '');
- model.makeValue("/root/temp/hngnm", vPid);
- model.makeValue("/root/temp/autoflag", "Y");
- }
- //팝업호출
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/temp", "/root/send");
- break;
- }
- //리턴값
- if (model.getValue("/root/main/popupendflag") == "ok") {
- var idnorno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnorno");
- var idnornm = model.getValue("/root/main/dnorpopinfo/dnorpoplist/dnornm");
- var irrgstno = model.getValue("/root/main/dnorpopinfo/dnorpoplist/rrgstno1") + "-" +
- model.getValue("/root/main/dnorpopinfo/dnorpoplist/rrgstno2") ;
-
- model.setValue("/root/cond/pid", idnorno );
- model.setValue("/root/cond/pidnm", idnornm );
- model.setValue("/root/cond/rrgstno", irrgstno );
- model.refresh();
- }
- }
|