123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442 |
- function fRemoveBlank(str)
- {
- str = str.replace(/\s/g,'');
-
- return str;
- }
-
- /**
- * @desc : 화면초기화
- * @ root/init/today, time에 현재 날짜와 시간 설정
- * @ 초기 화면의 번튼 비활성화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- grd_pltte.rowHeight(0) = grd_pltte.rowHeight(0) + 10;
- grd_pltte.frozenCols = 7;
- model.setFocus("ipt_srchdata");
- //submit("TRMRF00706");
-
- //zbcfGetCodeList( new Array("M0534"), new Array("/root/init/M0534list") );
-
- /**
- * 수정 : 2009.09.15 안치원 TASK-2897
- * 내용 : 서식관리화면에서 서식조회조건으로 기관코드추가
- */
- /* 2010.05.28, 주희경 , 기관별 서식 사용이력을 볼 때 기관별로 조회가능하여야 하도록 주석처리
- if (getUserInfo("posinstcd") == "001" && getUserInfo("posdeptcd") == "4130700000") {
- cmb_cond_instcd.attribute("visibility") = "visible";
- } else {
- cmb_cond_instcd.attribute("visibility") = "hidden";
- }
- */
- model.setValue("/root/main/condition/reqinstcd", getUserInfo("dutplceinstcd"));
-
- model.refresh();
- }
- /**
- * @desc : Grid 저장 후 화면을 clear
- *
- * @param : 그리드 id (grdID)
- * @return :
- * @---------------------------------------------------
- */
- function fClrGrdStatus(grdID){
- var totRow = grdID.rows;
- for(var i = grdID.fixedRows; i < totRow; i++){
- var statusflag = grdID.rowstatus(i);
- if(statusflag == 1 || statusflag == 2){
- grdID.rowstatus(i) = 0;
- }else if(statusflag == 4){
- grdID.deleteItem(i);
- }
- }
- }
- function fSrchForm()
- {
- var formnm = "";
- var reqflag = model.getValue("/root/main/condition/reqflag");
-
- if(reqflag == "formcd"){
-
- var sCode = model.getValue("/root/main/condition/reqdata");
-
- var sTmp = "";
- var iTmp = 0;
-
- // form코드 입력시 자릿수 채워준다
-
- var iCodeLength = sCode.length;
- if(iCodeLength ==0){
- messageBox(ipt_srchdata.label +" 서식코드 조건을", "C001");
- return;
-
- }
- else if(iCodeLength > 10){
- messageBox(ipt_srchdata.label +" 서식코드 자리수를 올바르게 ", "C001");
- return;
- }
-
- var temp = 10 - iCodeLength;
-
- for(var i = 1; i <= temp; i++){
- sTmp += "0";
- }
- sTmp = sTmp + sCode;
- model.setValue("/root/main/condition/reqdata",sTmp);
- }
- formnm = model.getValue("/root/main/condition/reqdata");
- // 유효 및 전체 조회시 검색 값이 없는 경우 검색값 요청을 하도록 수정
- if(formnm == "")
- {
- messageBox(ipt_srchdata.label +" 조회할 서식을 ", "C001");
- return;
- }
- model.setValue("/root/main/condition/reqdata",formnm.toUpperCase());
-
- // 서식관리에서 보낸 쿼리라는것을 명시
- model.makeValue("/root/main/condition/reqsrch", "formmaster");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/condition");
- submit("TRMRF07001");
-
- // 서식디자인 생성안한 것들을 색상으로 표시
- //fClassificationForm();
-
- }
- function fClassificationForm()
- {
- // 서식을 생성하지 않은 것들을 색상으로 분류함.
- try
- {
- /*
- // 과별서식, 공통서식
- var srchformlist = model.instances(0).selectNodes("/root/main/formlist[formprogflag != 'OCR' and formprogflag != 'PROF(CODE)' and formprogflag != 'PROF']");
- //var srchformlist = model.instances(0).selectNodes("/root/main/formlist[formprogflag = '-' or (formprogflag = 'PROG' and formcd = srcformcd and formkind = 'C' and formprognm != '-']");
-
- var totalRows = grd_formlist.rows - 1;
-
- if(totalRows < 1){
- return;
- }
- var forminfo = "";
-
- for(var idx = 0 ; idx < totalRows; idx++)
- {
- forminfo = srchformlist.item(idx);
-
- if(forminfo != null)
- {
- var formcd = forminfo.selectSingleNode("formcd").text;
-
- if(forminfo.selectSingleNode("formdegnseq").text == ""
- || forminfo.selectSingleNode("formdegnseq").text == "0")
- {
- grd_formlist.rowstyle(idx + 1, "data", "background-color") = "#FFCCFF";
- }
- }
- }
- grd_formlist.refresh();
- */
- }
- catch(e)
- {
- return;
- }
-
- }
- function fPreviewFormdegn()
- {
- var row = grd_formlist.row;
- var formcd = model.getValue("/root/main/formlist["+row+"]/formcd");
- var formprogflag = model.getValue("/root/main/formlist["+row+"]/formprogflag");
- var formxrwyn = model.getValue("/root/main/formlist["+row+"]/formxrwyn");
- var formdegnseq = model.getValue("/root/main/formlist["+row+"]/formdegnseq");
- model.copyNode("/root/main/forminfo/formmast", "/root/main/formlist["+row+"]");
- if(formprogflag == "MAIN" || formprogflag == "PROF" || formprogflag == "-" || formprogflag == "PROG")
- {
- if(formxrwyn == "Y" && formdegnseq != "")
- {
- setParameter("SPMRF05500_formcd", formcd);
-
- modal("SPMRF05500", 1,10, 10, "SPMRF05500", "", "");
- //open("SPMRF05500", "2", 0, 0, "SPMRF05500", "", "");
- }
- else
- messageBox("해당 서식은 저장되지", "E007");
- }
- else
- {
- messageBox("해당 서식은 " + formprogflag + " 유형 서식", "I009");
- return;
- }
- }
- function fShowCntl()
- {
- /*var ref = grd_pltte.attribute("nodeset");
- var degnitemno = model.getValue(ref + "[" + grd_pltte.row + "]/degnitemno");
- var degnitemkind = model.getvalue(ref + "[" + grd_pltte.row + "]/degnitemkind");
- var degncntrviewflag = model.getValue(ref + "[" + grd_pltte.row + "]/degncntrviewflag");
- var ctrl = canvas.window.document.controls(degnitemkind + "_" + degnitemseqno);
- if(ctrl != null)
- {
- if(degncntrviewflag == "A")
- ctrl.attribute("visibility") = "hidden";
- else
- ctrl.attribute("visibility") = "visible";
- ctrl.refresh();
- }*/
- }
- function fShowLbl()
- {
- /*var ref = grd_pltte.attribute("nodeset");
- var degnitemseqno = model.getValue(ref + "[" + grd_pltte.row + "]/degnitemseqno");
- var degnlblviewyn = model.getValue(ref + "[" + grd_pltte.row + "]/degnlblviewyn");
- var ctrl = canvas.window.document.controls("LBL_" + degnitemseqno);
- if(ctrl != null)
- {
- if(degnlblviewyn == "N")
- ctrl.attribute("visibility") = "hidden";
- else
- ctrl.attribute("visibility") = "visible";
- ctrl.refresh();
- }*/
- }
- function fSelectVallist()
- {
- var ref = grd_pltte.attribute("nodeset");
- var degnitemkind = model.getValue(ref + "[" + grd_pltte.row + "]/degnitemkind");
- var itemattrval = model.getValue(ref + "[" + grd_pltte.row + "]/itemattrval");
- if(degnitemkind != "RDO" && degnitemkind != "CMB" && degnitemkind != "CHK" && degnitemkind != "GRD" && degnitemkind != "GSU")
- return;
-
- if(degnitemkind == "GSU")
- {
- if(isSearchString(itemattrval, "axtype:COMBO") != true)
- {
- return;
- }
- }
-
- if(degnitemkind == "GRD")
- {
- modal("SPMRF01700_누적선택", 1, 100, 100);
- /*var grupcd = getParameter("grupcd");
- var grupnm = getParameter("grupnm");
- model.setValue(ref + "[" + grd_pltte.row + "]/valgrupcd", grupcd);
- model.setValue(ref + "[" + grd_pltte.row + "]/valgrupnm", grupnm);
- grd_pltte.refresh();*/
- }
- else
- {
- //데이타갱신
- modal("SPMRF01600_밸류리스트선택", 1, 100, 100);
- var grupcd = getParameter("grupcd");
- var grupnm = getParameter("grupnm");
- if(grupcd != "")
- {
- model.setValue(ref + "[" + grd_pltte.row + "]/valgrupcd", grupcd);
- model.setValue(ref + "[" + grd_pltte.row + "]/valgrupnm", grupnm);
- grd_pltte.refresh();
-
- setParameter("grupcd", "");
- setParameter("grupnm", "");
- }
- }
- }
- function fSelectUnit()
- {
- var ref = grd_pltte.attribute("nodeset");
- var degnitemkind = model.getValue(ref + "[" + grd_pltte.row + "]/degnitemkind");
- var degnattrval = model.getValue(ref + "[" + grd_pltte.row + "]/degnattrval");
-
- if(degnitemkind == "STX" || degnitemkind == "SSU" || degnitemkind == "CMB")
- {
- if(degnitemkind == "CMB")
- {
- var itemattrval = model.getValue(ref + "[" + grd_pltte.row + "]/itemattrval");
-
- if(isSearchString(itemattrval, "extn") == true)
- {
- var ret = messageBox("단위를 설정하려면 확장컨트롤을 삭제하여야 합니다.", "Q001");
- if(ret == "6")
- {
- fDelExtnStx();
- }
- else
- {
- return;
- }
- }
- }
-
- modal("SPMRF01500_단위선택",1, 100, 100);
-
- //데이터갱신
- var ref = grd_pltte.attribute("nodeset");
- var unitcd = getParameter("unitcd");
- var unitnm = getParameter("unitnm");
- model.setValue(ref + "[" + grd_pltte.row + "]/unitcd", unitcd);
- model.setValue(ref + "[" + grd_pltte.row + "]/unitnm", unitnm);
-
- grd_pltte.refresh();
- }
- //화면갱신
- /*var degnitemno = model.getValue(ref + "[" + grd_pltte.row + "]/degnitemno");
- var ctrlid = "UNIT_" + degnitemno;
- var ctrl = canvas.window.document.controls(ctrlid);
- if(ctrl == null)
- return;
- ctrl.attribute("text") = unitnm;
- ctrl.refresh();*/
- }
- function fSelectForm()
- {
- if(!isDataCell())
- return;
- iRow = grd_formlist.row;
- if(iRow < 1){
- return;
- }
-
- model.makeNode("/root/send/reqdata/formcd");
- model.setValue("/root/send/reqdata/formcd", model.getValue("/root/main/formlist[" + iRow + "]/formcd") );
-
- submit("TRMRF07002");
- submit("TRMRF07003");
-
- model.removenode("/root/main/forminfo");
- model.makeNode("/root/main/forminfo");
-
- model.refresh();
-
- btn_master.selected = "false";
- btn_design.selected = "true";
- model.toggle("case2");
-
-
- }
- function fSelectionDsgnForm()
- {
- if( grd_dsgnlist.row < grd_dsgnlist.fixedRows )
- return false;
- var iRow = grd_dsgnlist.row;
- if(iRow < 1){
- return;
- }
-
- if(model.getValue("/root/main/dsgnlist[" + iRow + "]/formdegnseq") == "")
- return;
- model.removenode("/root/main/forminfo");
- model.makeNode("/root/main/forminfo");
-
- model.refresh();
- //model.setValue("/root/send/formdegnseqno", model.getValue("/root/main/formlist[" + iRow + "]/valu"));
- model.makeValue("/root/send/req/formcd", "");
- model.makeValue("/root/send/req/formdegnseq", model.getValue("/root/main/dsgnlist[" + iRow + "]/formdegnseq"));
- model.makeValue("/root/send/req/extnunitformlistyn", "N");
- model.makeValue("/root/send/req/cashedformdegnseq", "");
- model.makeValue("/root/send/req/sysformrecdt", model.getValue("/root/main/dsgnlist[" + iRow + "]/formdegnfromdt"));
- model.makeValue("/root/send/req/mode", "D");
-
- submit("TRMRF07004");
-
- var colLevl = grd_pltte.colref("degnitemlevlno");
-
- btn_collapsed.attribute("background-image") = "..\\..\\..\\com\\commonweb\\images\\tree_plus.gif";
- setTree(grd_pltte, colLevl, grd_pltte.colref("degnitemcd"), true);
- }
- var g_pageInfo = new PAGEINFO();
- var openWindow;
- function fOnCreate(viewerobj)
- {
- return new PAGEINFO(viewerobj);
- }
- function fAppDegn(mode)
- {
- if(mode == null)
- mode = "design";
- //item정보 카피
- var pageInfo = fOnCreate(openWindow);
- copyNode(openWindow.model, model, pageInfo.forminfoRef, pageInfo.forminfoRef);
-
- openWindow.window.javascript.fCreateDegnBySelfInfo(pageInfo, openWindow, mode);
-
- setTree(grd_pltte, grd_pltte.colref("degnitemlevlno"), grd_pltte.colref("degnitemcd"), false);
-
- }
- function fSetDegnCmpltYN(check) {
- }
- function fSetDegnItemStyle(ctrl, attrName, attrValue, bEmpty) {
- }
- function fPopViewer(mode) {
- button1.dispatch("DOMActivate");
- model.makeValue("/root/temp/mode", mode);
- open("SSMRF01100", 1, 0, 0, "tempWin", "", "");
- openWindow = window.children("tempWin");
- }
|