123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- /* --------------------------------------------------------
-
- 회의록 등록 관리 (SMAYA02000.xfm - JScript )
-
- - Version :
- 1) : Ver.1.00.01
- : Create By 임여원
- : 2015.05.02
- -------------------------------------------------------- */
-
-
- /**
- * @group :
- * @ver : 2007.11.26
- * @by : Lim YeoWon
- * @-----------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 회의록 등록 관리의 초기화 함수
- * @-----------------------------------------------------------
- */
-
-
- function fInit(){
-
- model.setValue("/root/main/cond/condinfo/status","i"); //상태값 i로 입력 가능하게 셋팅
- model.removeNodeset("/root/main/grdlist/itemlist");
- model.removeNodeset("/root/init/chrgconslrlist/chrgconslrlistinfo");
- model.removeNodeset("/root/main/conslrlist/conslrlistinfo");
-
- grd_conslrlist.fixedcellcheckbox(0,1)=true; //체크박스 위에 전체 선택 하는 콤보 셋팅
-
- //사용자명 (입력자 또는 로그인한 사용자명)
- var usernm = getUserInfo("usernm");
- model.setValue(opt_rgstnm.attribute("ref"), usernm);
-
- var CurrentDate=getCurrentDate();
- model.setValue("/root/main/search/searchlilst/fromdd", CurrentDate.substr(0,6)+ "01"); //조회시작기간 1일로 세팅
- model.setValue("/root/main/search/searchlilst/todd", CurrentDate); //조회종료기간 오늘날짜로 세팅
-
- model.makeValue("/root/send/reqdata/joblncd", "B");
- submit("TRAYA02002", false); //화면뜰때 원목자 리스트 가져오는 서브미션
-
- model.makeValue("/root/send/reqdata/joblncd", "B");
- submit("TRAYA02801", false); //콤보 박스에 원목자 리스트 가져오는 서브미션
- addComboItem("cmb_conslrnm", "","","above"); //원목자에도 전체 뜨도록 셋팅
- zbcfGetCodeList( new Array("A0453"), new Array("/root/hidden/init/comcd") ); //관계코드 2개 설정
- zbcfGetCodeList( new Array("A0453"), new Array("/root/hidden/init/comcd1") );
- addComboItem("cmb_confflagcd", "","","above"); //화면 오픈시 구분 콤보 2개에 전체 뜨도록 셋팅
- addComboItem("cmb_confdetlflagcd", "","","above");
-
- model.refresh();
-
- }
-
- /* --------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 회의록 등록관리 조회 함수 */
- /* --------------------------------------------------------------------------*/
- function fConfRgstListRef(){
-
- model.removeNodeset("/root/send/reqdata"); //보낼 데이타 초기화
- model.makeNode("/root/send/reqdata"); //보낼 데이타 다시 만들어줌
- model.copyNode("/root/send/reqdata", "/root/main/search"); //조회할 데이터를 REQDATA에 카피한 후에
- if( submit("TRAYA02001")==true)
- {
- fConfInfoReset();
- } //회의록 데이터는 초기화
- var CurrentDate=getCurrentDate();
-
- model.setValue("/root/main/cond/condinfo/confdd", CurrentDate); //조회기간 오늘날짜로 세팅
- model.setFocus("cmb_confflagcd1");
-
-
- model.refresh();
-
- }
- /* --------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 회의록 리스트 클릭시 회의록 입력창에 세부 정보 나타내는 함수 */
- /* --------------------------------------------------------------------------*/
- function fConfInfoListRef() {
- var idxRow=grd_itemlist.row; //행의 정보를 변수에 저장
- var idxRows=grd_itemlist.rows;
-
- if(idxRow==0)
- {
- fConfInfoReset();
- return;
- }
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata","/root/main/grdlist/itemlist["+idxRow+"]"); //그리드에 선택된 값을 reqdata로 카피
- if (submit("TRAYA02003") == true)
- { //선택한 회의 정보 가져오는 서브미션
- var supcdid = model.getValue("/root/main/cond/condinfo/confflagcd"); //상위코드 값 받아서 관계코드 셋팅
- var sortfield = "cdnm";
- var sortmethod = "asc";
- var minimum = "true";
- zbcfGetSubCodeList("A0453", supcdid, "A0454", sortfield, sortmethod, minimum, "/root/hidden/init/comcd1");
- //상위코드에 따른 하위코드 이름을 셋팅
- cmb_confflagcd1.disabled=true; //수정시 회의구분,세부구분,일자는 비활성
- cmb_confdetlflagcd1.disabled=true;
- ipt_confdd.disabled=true;
-
- //마지막으로 수정한 사용자명
- var usernm = getUserInfo("usernm");
- model.setValue(opt_rgstnm.attribute("ref"), usernm);
-
- //submit("TRAYA02002", false); //화면뜰때 원목자 리스트 가져오는 서브미션
- };
- model.refresh();
- }
-
-
- /* --------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 화면 클릭시 원목자 클릭된 정보 나타내는 함수 */
- /* --------------------------------------------------------------------------*/
-
- function fConslrDetailList() {
- var idxRow=grd_itemlist.row; //클릭한 그리드
-
- model.removeNodeset("/root/send/reqdata");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata","/root/main/grdlist/itemlist["+idxRow+"]"); //그리드에 선택된 값을 reqdata로 카피
- submit("TRAYA02004");
-
- model.refresh();
-
- }
- /* --------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 회의록 등록 및 수정 함수 */
- /* --------------------------------------------------------------------------*/
-
- function fConfRgstSave() {
-
- var status1=model.getValue("/root/main/cond/condinfo/status"); //상태값을 받아 변수에 저장한다.
- var attntrqty1=model.getValue("/root/main/cond/condinfo/attntrqty"); //참석자 수 받아 변수에 저장
- var fromtm1=model.getValue("/root/main/cond/condinfo/fromtm"); //들어가는 시간받아 변수에 저장
- var totm1=model.getValue("/root/main/cond/condinfo/totm"); //회의 시작 시간 받아 변수에 저장
-
- if(attntrqty1 =='') //참석자 수가 없을때
- model.setValue("/root/main/cond/condinfo/attntrqty","0"); //0을 셋팅해준다
-
- if(status1=='i') //상태값이 i 일때
- {
- var confflagcd1= model.getValue("/root/main/cond/condinfo/confflagcd"); //confflagcd에 있는 값을 받아 변수에 저장
- var confdetlflagcd1=model.getValue("/root/main/cond/condinfo/confdetlflagcd");
- var confdd1=model.getValue("/root/main/cond/condinfo/confdd");
- if(confflagcd1=='') //비었으면 메시지 박스 출력
- {
- messageBox("회의구분은","I003");
- model.setFocus("cmb_confflagcd1");
- return;
- }
- else if(confdetlflagcd1 == '' )
- {
- messageBox("회의세부구분은","I003");
- model.setFocus("cmb_confdetlflagcd1");
- return;
- }
- else if(confdd1 == '')
- {
- messageBox("회의일자는","I003");
- model.setFocus("ipt_confdd");
- return;
- }
- else
- {
-
- var chkdata= 'chk' //원목자 체크 정보 받을 파리채 생성
- + '▦conslrnm'
- + '▦conslrid'
- + '▦status'
- + '▩' ;
-
- var idxRow=grd_conslrlist.rows;
-
- for(var i=1;i<idxRow;i++) //원목자 수만큼 for문을 돌려서
- {
- var chkFlag=model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/chk')
-
- if(chkFlag=='1') //체크되어 있는 값들을
- {
- chkdata+= chkFlag // 체크플래그 값 1을 받아 파리채에 저장
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/ conslrnm')
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/conslrid')
- + '▦' +'i' //status는 i로 저장한다
- + '▩' ;
- }
-
- }
-
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/main/cond/chkdata",chkdata); //파리채에 담긴 체크된 데이터들을 cond 밑에 저장
- model.copyNode("/root/send/savedata","root/main/cond");
-
- if(submit("TXAYA02002")==true) //서브밋 날려서 저장
- {
-
- if (model.getValue("/root/temp/chklist/confyn") == "Y") // 동일회의가 시간과 날짜 중복 되었지는 서버 체크(2010.0127 hhm)
- {
- messageBox("동일동시간대 데이터가" , "E006");
- }else{
- messageBox("등록이" , "I002");
- fConfInfoReset(); //초기화
- fConfRgstListRef(); //조회
- model.refresh();
- }
-
- }
- }
- }
-
- else if(status1=='u')
- {
-
- var idxRow=grd_conslrlist.rows;
-
- var chkdata= 'chk' //원목자 체크 정보 받을 파리채 생성
- + '▦conslrnm'
- + '▦conslrid'
- + '▦status'
- + '▦seqno'
- + '▩' ;
- for(var i=1;i<idxRow;i++) //원목자 수만큼 for문을 돌려서
- {
- var chkFlag=model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/chk')
-
- chkdata+= chkFlag // 체크플래그 값 1과 0을 받아 파리채에 저장
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/ conslrnm')
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/conslrid')
- + '▦' +'u' //status는 u로 저장
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/seqno')
- + '▩' ;
- }
-
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/main/cond/chkdata",chkdata); //파리채 데이터를 root정해 저장
- model.copyNode("/root/send/savedata","/root/main/cond"); //수정한 파리채 데이터와 회의록 등록 데이터 서브밋으로 보냄
-
- if(submit("TXAYA02002")==true)
- {
- if (model.getValue("/root/temp/chklist/confyn") == "Y") // 동일회의가 시간과 날짜 중복 되었지는 서버 체크(2010.0127 hhm)
- {
- messageBox("동일동시간대 데이터가" , "E006");
- return;
- }else{
- messageBox("저장이" , "I002");
- fConfInfoReset(); //초기화
-
- var lastupdtrid= getUserInfo("lastupdtrid"); //최종 수정자 id를 셋팅
- model.setValue(opt_rgstnm.attribute("ref"), lastupdtrid);
- fConfRgstListRef(); //조회
- }
- }
-
- }
- }
- /* --------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 회의록 등록 창 초기화 함수 */
- /* --------------------------------------------------------------------------*/
-
- function fConfInfoReset() {
- model.setValue("/root/main/cond/condinfo/status","i");
- model.resetInstanceNode("/root/main/cond/condinfo");
- cmb_confflagcd1.disabled=false;
- cmb_confdetlflagcd1.disabled=false;
- ipt_confdd.disabled=false;
- var CurrentDate=getCurrentDate();
-
- model.setValue("/root/main/cond/condinfo/confdd", CurrentDate); //조회기간 오늘날짜로 세팅
- model.setFocus("cmb_confflagcd1");
-
- //사용자명 (입력자 또는 로그인한 사용자명)
- var usernm = getUserInfo("usernm");
- model.setValue(opt_rgstnm.attribute("ref"), usernm);
-
- grd_conslrlist.fixedcellischeck(0,1)=false; //전체 체크박스 헤재
-
- for(var i=0;i<=grd_conslrlist.rows;i++)
- {
- model.resetInstanceNode("/root/main/conslrlist/conslrlistinfo["+i+"]/chk");
- }
-
- model.removeNodeset("/root/send/reqdata"); //보낼 데이타 초기화
- model.makeNode("/root/send/reqdata"); //보낼 데이타 다시 만들어줌
- model.copyNode("/root/send/reqdata", "/root/main/search"); //조회할 데이터를 REQDATA에 카피한 후에
- submit("TRAYA02001");
-
- model.refresh();
- }
- /* ----------------------------------------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 회의록 창 삭제 함수 */
- /* ----------------------------------------------------------------------------------*/
-
- function fDelConfList() {
-
- var idxRow=grd_itemlist.row; // 클릭한 행 반환
-
- if(idxRow<1) // 클릭한 행이 존재 하지 않을 때
- {
- messageBox("삭제할 회의 내역이", "I004");
- }
- else // 클릭한 행이 존재 할때
- {
- var btn=messageBox("선택 회의 내역을","Q001");
- if(btn=='6')
- {
- var idxRow=grd_itemlist.row; // 클릭한 그리드 행을 변수에 저장
- model.setValue("/root/main/cond/condinfo/status","d"); // 회의록 상태에 d를 저장
-
-
- var chkdata= 'chk' // 원목자 체크 정보 받을 파리채 생성
- + '▦conslrnm'
- + '▦conslrid'
- + '▦status'
- + '▩' ;
- var idxRow=grd_conslrlist.rows;
- for(var i=1;i<idxRow;i++) //원목자 수만큼 for문을 돌려서
- {
- var chkFlag=model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/chk')
-
- if(chkFlag=='1') //체크되어 있는 값들을
- {
- chkdata+= chkFlag // 체크플래그 값 1을 받아 파리채에 저장
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/ conslrnm')
- + '▦' + model.getValue('/root/main/conslrlist/conslrlistinfo'+'['+i+']/conslrid')
- + '▦' +'d' //status는 d로 저장
- + '▩' ;
- }
- }
-
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/main/cond/chkdata",chkdata); //파리채에 담긴 체크된 데이터들을 cond 밑에 저장
- model.copyNode("/root/send/savedata","root/main/cond");
-
- if(submit("TXAYA02002")==true)
- {
- messageBox("삭제가" , "I002");
- fConfInfoReset(); //초기화
- fConfRgstListRef(); //다시 조회
- model.refresh();
- }
- }
- else if(btn=='7')
- {
- return;
- }
- }
- }
|