123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- /***********************************************************************************************************************************************
- * create date : 2008.02.12
- * author : dhkim
- * file name : SMMNA01020.js
- * desc : 년도별 채별부작용 명단
- ***********************************************************************************************************************************************/
- 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);
-
- var getlastDate = currentDate.substring(0, 6) + getLastDay(currentDate.substring(0, 4), currentDate.substring(4, 6));
- model.setValue(xCondPath + '/todd', getlastDate);
-
- model.removenode('/root/init/L0095list');
- model.makenode('/root/init/L0095list');
- // zbcfGetCodeList(new Array("M0376"), new Array("/root/init/M0376list")); //혈액형
- zbcfGetCodeList(new Array("L0095"), new Array("/root/init/L0095list")); //직업코드
-
- //grd_dnorlist.extendLastCol = true;
- grd_dnorlist.frozencols = grd_dnorlist.colref("dnorregstno");
- fSearch();
- }
- /*
- * 년도별 채별부작용 명단를 조회한다.
- */
- 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('TRMNA01021')){
- messageBox('조회를', 'E009');
- }
- }
- /*
- * 엑셀출력
- */
- function fExcel(){
- var pGrd = grd_dnorlist;
-
- if (pGrd.rows > pGrd.fixedrows ) {
- var fileName = window.fileDialog("save", ",", false, "년도별채혈부작용명단_"+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;
-
- switch (flag) {
- case "1": // 공여자팝업
- //만들어야함
-
- break;
- case "2": // 환자팝업
- vPid = model.getValue("/root/cond/pid");
-
- //팝업조건설정
- model.removenode("/root/temp/pid");
- model.makeValue("/root/temp/pid", vPid);
-
- //팝업호출
- modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/temp", "/root/cond");
- //리턴값
- if (model.getValue("/root/main/popupendflag") == "ok") {
- var ipid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var ihngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- var irrgstno= model.getValue("/root/main/patinfo/patinfolist/rrgstno1") + "-" +
- model.getValue("/root/main/patinfo/patinfolist/rrgstno2") ;
-
- model.setValue("/root/cond/pid", ipid );
- model.setValue("/root/cond/pidnm", ihngnm );
- model.setValue("/root/cond/rrgstno", irrgstno );
- model.refresh();
- }
-
- break;
- }
- }
|