123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- /************************************************************************************************************************************************
- * @project name : ast/fthcnstweb *
- * @create date : 2008.01.15 *
- * @author : dhkim *
- * @see : SMAYA02500_교직원종교현황조회.xrw *
- * @desc : 원목/교직원관리/교직원종교현황조회에서 사용하는 스크립트이다. *
- *************************************************************************************************************************************************/
- var xSendPath = '/root/send/reqdata'; //request xPath
- var xCondPath = '/root/cond'; //조회조건 xPath
- var xTreePath = '/root/main/tree'; //부서tree xPath
- var xGridPath = '/root/main/religinfo/relist'; //환자추가정보Grid xPath
-
- var currentdate = getCurrentDate();
- /**
- * @date : 2008.01.15
- * @author : dhkim
- * @desc : 모든 조회조건 및 조회결과내역을 초기화한다.
- * 조회조건 - 종교 default는 전체
- * 구분 defult는 해당없음
- */
- function fInit(){
-
-
- //인스턴스초기화
- model.removeNodeset(xGridPath); //교직원종교현황리스트그리드
- model.makeNode(xGridPath);
-
- //종교정보로드
- model.removeNode('/root/hidden/relign');
- model.makeNode('/root/hidden/relign');
- zbcfGetCodeList(new Array("R0137"), new Array("/root/hidden/relign"), true);
- addComboItem('cmb_relign', '전체', '', 'above');//콤보에 전체조회조건 추가
-
- //tree 초기화
- model.removeNodeset(xTreePath);
- model.makeNode(xTreePath);
- submit('TRAYA02502');
-
-
- //조회조건 초기화
- model.removeNodeset(xCondPath);
- model.makeNode(xCondPath + '/deptnm'); //부서명
- model.makeNode(xCondPath + '/deptcd'); //부서코드
- model.makeNode(xCondPath + '/deptupcd'); //상위부서코드
- model.makeValue(xCondPath + '/deptdownyn', 'Y');//하위부서존재여부
- model.makeNode(xCondPath + '/depth'); //부서레벨
- model.makeValue(xCondPath + '/relicd', ''); //종교코드
- model.makeNode(xCondPath + '/emplnm'); //사원명
- model.makeNode(xCondPath + '/emplcd'); //사원번호
- model.makeValue(xCondPath + '/ddflag', 'none'); //일자구분
- model.makeNode(xCondPath + '/fromdd'); //조회시작일
- model.makeNode(xCondPath + '/todd'); //조회종료일
-
-
- model.refresh();
-
- }
-
-
-
- /**
- * @date : 2008.01.13
- * @author : dhkim
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회조검의 구분라디오버튼이 해당없음일때는 조회시작,종료일을 disabled처리, 셰례일,견진일,영명축일,생일일때는 enable처리
- * 영명축일, 생일을 선택한 경우에는 날짜 조건을 월/일만 조회하도록 input component변경처리
- * 세례일:bapt, 견진일:conf, 영명축일:fest, 생일: birth
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fIsEnableDate(ddflag){
-
-
-
- //해당없음 선택
- if(ddflag == 'none'){
- ipt_fromdd.disabled = true;
- ipt_todd.disabled = true;
-
- ipt_fromdd.attribute("width") = "95";
- ipt_todd.attribute("width") = "95";
- ipt_fromdd.attribute('format') = 'yyyy-mm-dd';
- ipt_todd.attribute('format') = 'yyyy-mm-dd';
-
- model.setValue(xCondPath + '/fromdd', '');
- model.setValue(xCondPath + '/todd', '');
- }
- //영명축일 or 생일선택
- else if(ddflag == 'fest' || ddflag == 'birth'){
-
- ipt_fromdd.disabled = false;
- ipt_todd.disabled = false;
-
- ipt_fromdd.attribute("width") = "60";
- ipt_todd.attribute("width") = "60";
- ipt_fromdd.attribute('format') = 'mm-dd';
- ipt_todd.attribute('format') = 'mm-dd';
-
- model.setValue(xCondPath + '/fromdd', currentdate.substring(4));
- model.setValue(xCondPath + '/todd', currentdate.substring(4));
-
- }
- else{
- ipt_fromdd.disabled = false;
- ipt_todd.disabled = false;
-
- ipt_fromdd.attribute("width") = "95";
- ipt_todd.attribute("width") = "95";
- ipt_fromdd.attribute('format') = 'yyyy-mm-dd';
- ipt_todd.attribute('format') = 'yyyy-mm-dd';
-
- model.setValue(xCondPath + '/fromdd', currentdate);
- model.setValue(xCondPath + '/todd', currentdate);
- }
-
- model.refresh();
-
-
- }
-
-
-
- /**
- * @date : 2008.01.13
- * @author : dhkim
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 트리에서 선택한 부서의 하위에 팀이 존재할 경우 하위에 속한 직원도 조회되도록 한다.
- * 부서를 선택하지 않고 조회하는 경우에 라디오구분을 생일을 선택하거나 교직원명을 입력한 경우가 아니라면 부서선택은 필수조건으로 체크한다.
- * 조회조건 시작,종료일은 한달이상을 넘지 않도록 한다.
- * 영명축일/생일 선택의 경우에는 조회조건을 mm-dd 로 검색한다.
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fSearch(){
-
- var deptcd = model.getValue(xCondPath + '/deptcd'); //부서코드
-
- if(deptcd == ''){
- var idx = 1;
- model.setValue(xCondPath + '/deptcd', model.getValue(xTreePath + "/item[" + idx + "]/deptcd"));
- model.setValue(xCondPath + '/deptnm', model.getValue(xTreePath + "/item[" + idx + "]/deptnm"));
- model.setValue(xCondPath + '/depth', model.getValue(xTreePath + "/item[" + idx + "]/depth"));
- model.refresh();
- }
-
- var depth = model.getValue(xCondPath + '/depth'); //레베루
- var deptdownyn = model.getValue(xCondPath + '/deptdownyn'); //하위부서존재여부
- var religioncd = model.getValue(xCondPath + '/religioncd'); //종교
- var emplnm = model.getValue(xCondPath + '/emplnm'); //사원명
- var ddflag = model.getValue(xCondPath + '/ddflag'); //구분
- var fromdd = model.getValue(xCondPath + '/fromdd'); //시작일
- var todd = model.getValue(xCondPath + '/todd'); //종료일
-
- // if(depth < 3 && ddflag == 'none' && emplnm == ''){
- if(depth < 2 && ddflag == 'none' && emplnm == ''){
- messageBox('교직원명을 입력하시거나 하위부서를', 'C002');
- return false;
- }
-
- if(ddflag == 'bapt' || ddflag == 'conf'){
- if(fromdd == '' || !isValidDateTime(fromdd, 'YYYYMMDD')){
- messageBox('조회시작일을 날짜형식(예:2008-01-01)에 맞게', 'C001');
- return false;
- }
- if(todd == '' || !isValidDateTime(todd, 'YYYYMMDD')){
- messageBox('조회종료일을 날짜형식(예:2008-01-01)에 맞게', 'C001');
- return false;
- }
- if(fromdd > todd){
- messageBox('시작일이 종료일보다 클 수' , 'I004');
- return false;
- }
- if(getDateInterval(fromdd, todd) > 30){
- messageBox('시작일, 종료일의 구간을 한달단위로', 'C001');
- return false;
- }
- }else if(ddflag == 'fest' || ddflag == 'birth'){
- if(fromdd == '' || !isValidDateTime(fromdd, 'MMDD')){
- messageBox('조회시작일을 날짜형식(예:01-01)에 맞게', 'C001');
- return false;
- }
- if(todd == '' || !isValidDateTime(todd, 'MMDD')){
- messageBox('조회종료일을 날짜형식(예:01-01)에 맞게', 'C001');
- return false;
- }
- if(fromdd > todd){
- messageBox('시작일이 종료일보다 클 수' , 'I004');
- return false;
- }
- if(getDateInterval('0000'+fromdd, '0000'+todd) > 30){
- messageBox('시작일, 종료일의 구간을 한달단위로', 'C001');
- return false;
- }
- }
-
-
-
-
- model.removenode(xSendPath);
- model.makeNode(xSendPath);
- model.copyNode(xSendPath, xCondPath);
-
-
- if(!submit('TRAYA02501')){
- messageBox('조회를', 'E009');
- }
-
- }
-
-
-
-
- /**
- * @date : 2008.01.15
- * @author : dhkim
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Excel파일로 저장
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fSaveExcel(){
- var file = window.fileDialog("save","","true","","xls","All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(file != "") {
- grd_religion.saveExcel(file);
- }
- }
-
-
- /**
- * @date : 2008.01.15
- * @author : dhkim
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드에 조회된 교직원종교현황결과를 rexpert로 출력
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fPrint(){
- //그리드에 조회된 행사일정 결과를 rexpert를 이용해 출력
- exeReportPreview("RPAYA02501", "XMLSTR"); //미리보기
- }
- /**
- * @date : 2008.01.15
- * @author : dhkim
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 부서선택팝업을 호출
- * ------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fPopDeptCode(){
-
- var search_condition = "deptnm";
- var search_term = model.getValue("/root/cond/deptnm");
- var receive_deptcd_path = "/root/cond/deptcd";
- var receive_deptnm_path = "/root/cond/deptnm";
- var standard_yn = "orduseyn";
- var ord_deptflag = "D";
- zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm"));
- //기관별 부서정보 검색 팝업을 호출
-
- }
|