123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- /***********************************************************************************************************************************************
- * create date : 2008.02.12
- * author : dhkim
- * file name : SMLBD01000.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"), new Array("/root/init/M0376list")); //혈액형
- submit("TRLBD01053"); //병동콤보
- //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('TRLBD01051')){
- if(!submit('TRLBD01052')){
- 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", "");
- }
- }
|