123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- /***********************************************************************************************************************************************
- * create date : 2008.02.12
- * author : dhkim
- * file name : SMMNA01000.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);
-
- //20090206 dhkim
- //공통코드
- zbcfGetCodeList(new Array("L0099"
- , "L0100"
- , "L0101"
- , "L0102"
- , "L0103")
- , new Array("/root/init/L0099list"
- , "/root/init/L0100list"
- , "/root/init/L0101list"
- , "/root/init/L0102list"
- , "/root/init/L0103list")
- , true);
-
- //zbcfGetCodeList(new Array("M0376"), new Array("/root/init/M0376list")); //혈액형
-
- submit("TRMNA01053"); //병동콤보
- //grd_dnorlist.extendLastCol = true;
- grd_dnorsum.frozencols = grd_dnorsum.colRef("depttotal");
- grd_dnorlist.frozencols = grd_dnorlist.colRef("execdt");
-
- grd_dnorsum.rowheight(0) = 30;
- grd_dnorsum.rowheight(1) = 35;
- //alert(grd_dnorsum.rowheight(0) + "/" + grd_dnorsum.rowheight(1));
-
- fSearch();
- }
- /*
- * APU_업무현황조회
- */
- function fSearch(){
- var dayflag = model.getValue(xCondPath+'/dayflag');
- var fromdd = model.getValue(xCondPath+'/fromdd');
- var todd = model.getValue(xCondPath+'/todd');
-
- if(fromdd == '')
- fromdd = currentDate;
- if(todd == '')
- todd = currentDate;
-
- if (dayflag == "M") {
- fromdd = fromdd.substring(0,6) + '01';
- todd = todd.substring(0,6) + '31' ;
- }
- if (dayflag == "Y") {
- fromdd = fromdd.substring(0,4)+ '0101' ;
- todd = todd.substring(0,4)+ '1231';
- }
-
- model.removeNodeset(xDnorPath + "/dnorlist");
- model.removeNodeset(xReqPath);
- model.makeValue(xReqPath + '/dayflag', dayflag);
- model.makeValue(xReqPath + '/fromdd', fromdd);
- model.makeValue(xReqPath + '/todd', todd);
-
- //if(!submit('TRMNA01051')){
- if(!submit('TRMNA01052')){
- messageBox('조회를', 'E009');
- }
- fSearch2();
- }
- /*
- * 집계그리드 만들기
- */
- function fSearch2(){
- //1.타이틀만들기
- //2.그리드생성하기
- }
- /*
- * 엑셀출력
- */
- function fExcel(flag){
- var fileNm = "";
- var pGrd ;
- switch (flag) {
- case "S":
- fileNm = "APU 업무내역SUM";
- pGrd = grd_dnorsum;
- break;
- case "D":
- fileNm = "APU 업무내역LIST";
- pGrd = grd_dnorlist;
- break;
- }
-
- if (pGrd.rows > pGrd.fixedrows ) {
- var fileName = window.fileDialog("save", ",", false, fileNm + "_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if (fileName != "") {
- pGrd.saveExcel(fileName, "SheetName", true, true, "", "", false);
- messageBox("엑셀저장이 ", "I002", ""); //I002 : 완료되었습니다.
- }
- } else {
- messageBox("자료가 존재하지 않습니다.", "E999", "");
- }
- }
- /**
- * 년,월,일별 검색조건에 따라 조회시작, 종료 날짜 컴퍼넌트를 년,월,일 형식에 맞게 바꿔준다.
- *
- */
- function fChangeDDFlag(ddflag){
- var xCondPath = '/root/cond'; //조회 xPath
-
- //model.removeNodeset(xCondPath);
- //model.makeNode(xCondPath + '/dayflag');
- //model.makeNode(xCondPath + '/fromdd');
- //model.makeNode(xCondPath + '/todd');
- //var condDate = currentDate;
-
- if(ddflag == 'D'){
- cap_date.value = '시행일자 : ';
- ipt_Fromdd.attribute("width") = "95";
- ipt_Enddd.attribute("width") = "95";
- ipt_Fromdd.attribute('format') = 'yyyy-mm-dd';
- ipt_Enddd.attribute('format') = 'yyyy-mm-dd';
- }else if(ddflag == 'M'){
- //condDate = condDate.substring(0, 6);
- cap_date.value = '시행년월 : ';
- ipt_Fromdd.attribute("width") = "80";
- ipt_Enddd.attribute("width") = "80";
- ipt_Fromdd.attribute('format') = 'yyyy-mm';
- ipt_Enddd.attribute('format') = 'yyyy-mm';
- }else if(ddflag == 'Y'){
- //condDate = condDate.substring(0, 4);
- cap_date.value = '시행년도 : ';
- ipt_Fromdd.attribute("width") = "60";
- ipt_Enddd.attribute("width") = "60";
- ipt_Fromdd.attribute('format') = 'yyyy';
- ipt_Enddd.attribute('format') = 'yyyy';
- }
- //model.setValue(xCondPath + '/ddflag', ddflag);
- //model.setValue(xCondPath + '/fromdd', condDate);
- //model.setValue(xCondPath + '/todd', condDate);
- model.refresh();
-
- }
|