/* --------------------------------------------------------------------- ó¹æ(¹°Ç°)ã±â(SMMNP01601.xfm - JScript ) - Version : 1) : Ver.1.00.01 : Create By Francis Choi : 2015.05.02 ---------------------------------------------------------------------- */ var CondPath = "/root/main/cond"; var SendPtah = "/root/send/reqdata"; /* ------------------------------------------------- */ /* SMMNP01601_ó¹æ(¹°Ç°)ã±â */ /* On Load ½Ã Call */ /* ------------------------------------------------- */ /* group : EMR °£È£ ¼ö¼ú¸¶Ãë */ /* ver : 2015.05.15 */ /* by : ÃÖÇÐ·Ï */ /* --------------------------------------------------*/ /* type : function */ /* access : public */ /* desc : xforms-ready½Ã ¼öÇàÇÑ´Ù */ /* return : */ /* --------------------------------------------------*/ function fFormInit() { model.removeNodeset("/root/main/goodlist"); model.removeNodeset("/root/main/prcplist"); submit("TRMNP04462"); if (checkOpener() ) { var refnm = opener.javascript.getParameter("refnm"); var refflag = opener.javascript.getParameter("refflag"); var goodflag = opener.javascript.getParameter("goodflag"); model.setValue(CondPath + "/refnm" , refnm ); model.setValue(CondPath + "/refflag" , refflag ); model.setValue(CondPath + "/goodflag", goodflag); model.refresh(); if (( refnm == "" )|| ( refflag == "" )|| ( goodflag == "" ) ) {//¹°Ç°±¸ºÐ, Á¶È¸Á¶°Ç, Á¶È¸±¸ºÐÀÌ ¾øÀ¸¸é ¸®ÅÏ if (refflag == "" ) { model.setValue(CondPath + "/refflag", '1'); model.refresh(); } return; }else { var currentText = ipt_refcond.currentText; currentText = currentText.toUpperCase(); model.setValue(CondPath + "/refnm", currentText); ipt_refcond.refresh();//´ë¹®ÀÚ·Î º¯°æ model.copyNode("/root/send/reqdata", CondPath); submit("TRMNP04461"); } } } // -------------------------------------- // P:ó¹æºÐ·ù¼±ÅÃ, G:¹°Ç°±¸ºÐ¼±Åà // -------------------------------------- function fComboListChange(pDataCls) { model.removeNodeset("/root/init/lrglist"); model.removeNodeset("/root/init/mdllist"); model.removeNodeset("/root/init/smllist"); model.setValue(CondPath + "/lrgcd", ""); model.setValue(CondPath + "/mdlcd", ""); model.setValue(CondPath + "/smlcd", ""); model.copyNode("/root/send/reqdata", "/root/main/cond"); if (pDataCls == "P") { submit("TRMNP04467"); // ó¹æºÐ·ù¼±Åà return; } submit("TRMNP04463"); var currentText = ipt_refcond.currentText; currentText = currentText.toUpperCase(); model.setValue(CondPath + "/refnm", currentText); ipt_refcond.refresh();//´ë¹®ÀÚ·Î º¯°æ var refnm = model.getValue(CondPath + "/refnm"); if (refnm != "" ) { //¸ÞÀÎÈ­¸é¿¡¼­ °Ë»ö¾î¸¦ Ä¡°í µé¾î¿Â °æ¿ì ¹°Ç°±¸ºÐ ¼±Åýà ÀÚµ¿ Á¶È¸ if( (model.getValue(CondPath + "/goodflag") == "" )|| (model.getValue(CondPath + "/lrgcd" ) == "" )|| (model.getValue(CondPath + "/mdlcd" ) == "" ) ) { if (model.getValue(CondPath + "/refflag") == "" ) { messageBox("Á¶È¸±¸ºÐÀ» ¼±Åà ÇÏÁö", "E007"); return; } } model.copyNode("/root/send/reqdata", "/root/main/cond"); submit("TRMNP04461"); model.resetInstanceNode("/root/send/reqdata"); } } // -------------------------------------- // P:ó¹æºÐ·ù¼±ÅÃ, G:¹°Ç°±¸ºÐ¼±Åà // -------------------------------------- function fDataQuery() { var currentText = ipt_refcond.currentText; currentText = currentText.toUpperCase(); model.setValue(CondPath + "/refnm", currentText); ipt_refcond.refresh(); //´ë¹®ÀÚ·Î º¯°æ if( (model.getValue(CondPath + "/goodflag") == "" )|| (model.getValue(CondPath + "/lrgcd" ) == "" )|| (model.getValue(CondPath + "/mdlcd" ) == "" ) ) { if (model.getValue(CondPath + "/refflag") == "" ) { messageBox("Á¶È¸±¸ºÐÀ» ¼±Åà ÇÏÁö", "E007"); return; } } model.copyNode("/root/send/reqdata", CondPath); var xNode = instance1.selectSingleNode(SendPtah); if (xNode == null) { model.makeNode(SendPtah); } model.copyNode(SendPtah, CondPath); if ( rdo_reftrgt.value == "PRC" ) { model.removeNodeset("/root/main/prcplist"); submit("TRMNP04467"); }else { model.removeNodeset("/root/main/goodlist"); submit("TRMNP04461"); } model.resetInstanceNode("/root/send/reqdata"); } // -------------------------------------- // Grid Data Click // -------------------------------------- function fGridDataClick(pGrid, pName) { var iRow = pGrid.row; var pPath = "/root/main/"+ pName +"[" + pGrid.row + "]/chkflag"; if (pGrid.rows < 1 || pGrid.row == 0){ return; } else if (pGrid.col == 1) { return; }else { var sFlag = model.getValue(pPath); model.setValue(pPath, ((sFlag == "true") ? "false" :"true")); } model.refresh(); } // -------------------------------------- // Query Condition Select Á¶È¸ Á¶°Ç ¼±Åà // -------------------------------------- function fQueryCondSelect(pGrid, pName) { var sLogical = "true"; var sVisible1 = "visible"; var sVisible2 = "hidden" ; model.setValue(CondPath + "/goodflag", ""); model.setValue(CondPath + "/lrgcd" , ""); model.setValue(CondPath + "/mdlcd" , ""); model.setValue(CondPath + "/smlcd" , ""); model.copyNode("/root/send/reqdata", CondPath); if (rdo_reftrgt.value == "PRC" ) { submit("TRMNP04463"); //ó¹æºÐ·ù Á¶È¸ }else { submit("TRMNP04462"); sLogical = "false" ; sVisible1 = "hidden" ; sVisible2 = "visible" ; } // ipt_refcond.disabled = sLogical; ipt_cmpycond.disabled = sLogical; ipt_custcond.disabled = sLogical; cmb_goodflag.disabled = sLogical; grd_prcplist.attribute("visibility") = sVisible1; grd_goodlist.attribute("visibility") = sVisible2; model.refresh(); } // -------------------------------------- // Query Condition Select Á¶È¸ Á¶°Ç ¼±Åà // -------------------------------------- function fChoiceData() { var iParamList = ""; var wCnt = 0 ; var wIDx = 0 ; var wCode = "goodcd"; var wName = "goodnm"; var iNode = "/root/main/goodlist"; if (model.getValue(CondPath + "/tabflag") == "PRC" ) { wIDx = 1 ; wCode = "prcpcd"; wName = "prcpnm"; iNode = "/root/main/prcplist"; } var wChk = ""; var iRows = getNodesetCount(iNode); for( var i= 1; i <= iRows; i++ ) { wChk = model.getValue(iNode + "[" + i + "]/chkflag"); if (wChk == "true") { iParamList += model.getValue(iNode + "[" + i + "]/" + wCode ) + "|" // 00 ó¹æÄÚµå + model.getValue(iNode + "[" + i + "]/" + wName ) + "|" // 01 󹿏í + model.getValue(iNode + "[" + i + "]/allsizespecid") + "|" // 02 »çÀÌÁî + model.getValue(iNode + "[" + i + "]/prodcmpynm" ) + "|" // 03 Á¦Á¶È¸»ç¸í + model.getValue(iNode + "[" + i + "]/cureflag" ) + "|" // 04 óġ±¸ºÐ + model.getValue(iNode + "[" + i + "]/goodspec" ) + "|" // 05 ¹°Ç°±Ô°Ý + model.getValue(iNode + "[" + i + "]/goodmodel" ) + "|" // 06 ¹°Ç°¸ðµ¨ + "" + "¢Ì"; // 07 󹿴ÜÀ§ model.getValue(iNode + "[" + i + "]/prcpunit" )) wCnt += 1; } } // // if (cnt < 1 ) { // messageBox("¼±ÅÃÇÑ °ÍÀÌ", "I004"); // }else { if (checkOpener() ) { opener.javascript.setParameter("SendData", iParamList); window.close(); } else { model.removenode("/root/send"); model.makeValue("/root/send/SendData" , iParamList); // ±â°üÄÚµå } // } } /* ------------------------------------------------- */ /* ------End Of List ------------------------------- */ /* -------------------------------------------------- */