/* --------------------------------------------------------------------- * * SMRFC00600_¼ö¸®ºÎǰÄÚµåµî·Ï.xrw * * - Version : * 1) : Ver.1.00.01 * : Create By * : 2010.08.13 ---------------------------------------------------------------------- */ // È­¸é open½Ã¿Í ÃʱâÈ­ ¹öư Ŭ¸¯½Ã È­¸é ÃʱâÈ­ ±â´ÉÀ» ¼öÇàÇÑ´Ù. function fInitialize() { rszfUserGoodFlagList(cmb_goodflag_search,getUserInfo("userid")); misfComboComCdListMulti("R0039,R0035,Z0007", "cmb_deliveunit,cmb_prodplce,cmb_instcd"); model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd")); //¹°Ç°±¸ºÐÀÏ °æ¿ì ù¹øÂ° index ÀÚµ¿ ¼³Á¤ //[2010.08.26]AS-IS ÄÚµå TO_BE ÄÚµå ÀüȯÀ» À§ÇÑ ¹°Ç°±¸ºÐ º¯°æ (goodflag= B) => (goodflag= BC) model.setValue(cmb_goodflag_search.attribute("ref"), "BC"); misfGridInit(grd_goodlist); misfGridInit(grd_costhistinfo); model.resetInstanceNode("/root/main/gooddet/gooddetlist"); misfComboCopyItemSet(cmb_deliveunit, "" , grd_costhistinfo, "deliveunit"); //¼öºÒ´ÜÀ§ misfComboCopyItemSet(cmb_prodplce , "" , grd_costhistinfo, "prodplce" ); //Á¦Á¶±¹ rszfLMSComboList("BC", "", "", "cmb_lrgcd_search", "", "L", "Y", "Y"); rszfLMSComboList("BC", "", "", "ipt_lrgcd", "", "L", "", "Y"); model.refresh(); } function fCheckAuth() { btn_search.disabled = !checkAuth("R") ; btn_save.disabled = !checkAuth("X") ; } function fDisabledControl(state) { if (state == "i"){ btn_choidel.disabled = true; btn_save.disabled = false; btn_goodcdcopy.disabled = false; ipt_nonusetretdd.disabled = true; ipt_nonusetretresn.disabled = true; btn_maincustlastsuplplce.disabled = false btn_suppcustcd.disabled = false; btn_mngtdeptcd.disabled = false; ipt_lrgcd.disabled = false; ipt_mdlcd.disabled = false; ipt_smlcd.disabled = false; } if (state == "u"){ btn_choidel.disabled = false; btn_save.disabled = false; btn_goodcdcopy.disabled = true; ipt_nonusetretdd.disabled = false; ipt_nonusetretresn.disabled = false; btn_maincustlastsuplplce.disabled = false btn_suppcustcd.disabled = false; btn_mngtdeptcd.disabled = false; ipt_lrgcd.disabled = true; ipt_mdlcd.disabled = true; ipt_smlcd.disabled = true; } if (state == "d"){ btn_goodcdcopy.disabled = true; ipt_nonusetretdd.disabled = true; ipt_nonusetretresn.disabled = true; btn_choidel.disabled = false; btn_save.disabled = false; btn_goodcdcopy.disabled = true; ipt_nonusetretdd.disabled = true; ipt_nonusetretresn.disabled = true; btn_maincustlastsuplplce.disabled = true; btn_suppcustcd.disabled = true; btn_mngtdeptcd.disabled = true; ipt_lrgcd.disabled = true; ipt_mdlcd.disabled = true; ipt_smlcd.disabled = true; } if (state == "x" || state == "h"){ btn_choidel.disabled = true; btn_save.disabled = true; btn_goodcdcopy.disabled = true; ipt_nonusetretdd.disabled = true; ipt_nonusetretresn.disabled = true; btn_maincustlastsuplplce.disabled = true; btn_suppcustcd.disabled = true; btn_mngtdeptcd.disabled = true; ipt_lrgcd.disabled = true; ipt_mdlcd.disabled = true; ipt_smlcd.disabled = true; } } function fGoodCdCopy() { if(model.getValue(cmb_goodflag_search.attribute("ref")).length== 0 ) { messageBox("¹°Ç°±¸ºÐÀ» " ,"C002"); model.setFocus("cmb_goodflag"); return false; } if(model.getValue(ipt_lrgcd.attribute("ref")).length== 0 ) { messageBox("´ëºÐ·ùÄڵ带 " ,"C002"); model.setFocus("ipt_lrgcd"); return false; } if(model.getValue(ipt_mdlcd.attribute("ref")).length== 0 ) { messageBox("ÁߺзùÄڵ带 " ,"C002"); model.setFocus("ipt_mdlcd"); return false; } model.setValue("/root/send/goodcopy/instcd" , model.getValue(cmb_instcd.attribute("ref"))); model.setValue("/root/send/goodcopy/goodflag" , model.getValue(cmb_goodflag_search.attribute("ref"))); model.setValue("/root/send/goodcopy/lrgcd" , model.getValue(ipt_lrgcd.attribute("ref"))); model.setValue("/root/send/goodcopy/mdlcd" , model.getValue(ipt_mdlcd.attribute("ref"))); model.setValue("/root/send/goodcopy/smlcd" , model.getValue(ipt_smlcd.attribute("ref"))); submit("TRRFC00601"); var goodcd = model.getValue("/root/main/goodcopy/goodlist/goodcd"); //if(goodcd.length == 0)goodcd = model.getValue(cmb_goodflag_search.attribute("ref")) + model.getValue(ipt_lrgcd.attribute("ref")) + model.getValue(ipt_mdlcd.attribute("ref")) + "0001"; model.setValue(ipt_goodcd.attribute("ref"), goodcd); grp_detail.refresh(); } function fSetDataSave() { var status = model.getValue(ipt_status.attribute("ref")); var instcd = model.getValue(cmb_instcd.attribute("ref")); var goodflag = model.getValue(cmb_goodflag_search.attribute("ref")); var fromdd = model.getValue(ipt_fromdd.attribute("ref")); var lrgcd = model.getValue(ipt_lrgcd.attribute("ref")); var mdlcd = model.getValue(ipt_mdlcd.attribute("ref")); var smlcd = model.getValue(ipt_smlcd.attribute("ref")); var goodcd = model.getValue(ipt_goodcd.attribute("ref")); var goodnm = model.getValue(ipt_goodnm.attribute("ref")); var goodhngnm = model.getValue(ipt_goodhngnm.attribute("ref")); var goodengnm = model.getValue(ipt_goodengnm.attribute("ref")); var goodspec = model.getValue(ipt_goodspec.attribute("ref")); var goodmodel = model.getValue(ipt_goodmodel.attribute("ref")); var maincustlastsuplplce = model.getValue(ipt_maincustlastsuplplce.attribute("ref")); var suppcustcd = model.getValue(ipt_suppcustcd.attribute("ref")); var deliveunit = model.getValue(cmb_deliveunit.attribute("ref")); var prodplce = model.getValue(cmb_prodplce.attribute("ref")); var winacnt = model.getValue(ipt_winacnt.attribute("ref")); var amtacnt = model.getValue(ipt_amtacnt.attribute("ref")); var goodunitcost = model.getValue(ipt_goodunitcost.attribute("ref")); var mainmngtdeptcd = model.getValue(ipt_mainmngtdeptcd.attribute("ref")); var prodcmpycd = model.getValue(ipt_prodcmpycd.attribute("ref")); var cmt = model.getValue(tar_cmt.attribute("ref")); var mdlcd = model.getValue(ipt_mdlcd.attribute("ref")); var smlcd = model.getValue(ipt_smlcd.attribute("ref")); var appfixasetcd = model.getValue(ipt_appfixasetcd.attribute("ref")); var todd = model.getValue(ipt_nonusetretdd.attribute("ref")); var nonusetretresn = model.getValue(ipt_nonusetretresn.attribute("ref")); goodhngnm = ( goodhngnm == null ) ? "-" : goodhngnm ; goodengnm = ( goodengnm == null ) ? "-" : goodengnm ; goodspec = ( goodspec == null ) ? "-" : goodspec ; goodmodel = ( goodmodel == null ) ? "-" : goodmodel ; mdlcd = ( mdlcd == null ) ? "-" : mdlcd ; smlcd = ( smlcd == null ) ? "-" : smlcd ; amtacnt = ( amtacnt == null ) ? "-" : amtacnt ; mainmngtdeptcd = ( mainmngtdeptcd == null ) ? "-" : mainmngtdeptcd ; prodplce = ( prodplce == null ) ? "-" : prodplce ; prodcmpycd = ( prodcmpycd == null ) ? "-" : prodcmpycd ; goodunitcost = ( goodunitcost == null ) ? "0" : goodunitcost ; maincustlastsuplplce = ( maincustlastsuplplce == null ) ? "-" : maincustlastsuplplce ; suppcustcd = ( suppcustcd == null ) ? "-" : suppcustcd ; cmt = ( cmt == null ) ? "-" : cmt ; todd = ( todd == null ) ? "-" : todd ; nonusetretresn = ( nonusetretresn == null ) ? "-" : nonusetretresn ; var save = "m" + "¢Ë" // ŸÀÌÆ² setting + "instcd" + "¢Ë" + "goodflag" + "¢Ë" + "fromdd" + "¢Ë" + "lrgcd" + "¢Ë" + "mdlcd" + "¢Ë" + "smlcd" + "¢Ë" + "goodcd" + "¢Ë" + "goodnm" + "¢Ë" + "goodhngnm" + "¢Ë" + "goodengnm" + "¢Ë" + "goodspec" + "¢Ë" + "goodmodel" + "¢Ë" + "maincustlastsuplplce" + "¢Ë" + "suppcustcd" + "¢Ë" + "deliveunit" + "¢Ë" + "prodplce" + "¢Ë" + "winacnt" + "¢Ë" + "amtacnt" + "¢Ë" + "goodunitcost" + "¢Ë" + "mainmngtdeptcd" + "¢Ë" + "prodcmpycd" + "¢Ë" + "todd" + "¢Ë" + "nonusetretresn" + "¢Ë" + "appfixasetcd" + "¢Ë" + "cmt" + "¢Ì" + status + "¢Ë" // ÇØ´ç °ªµé setting + instcd + "¢Ë" + goodflag + "¢Ë" + fromdd + "¢Ë" + lrgcd + "¢Ë" + mdlcd + "¢Ë" + smlcd + "¢Ë" + goodcd + "¢Ë" + goodnm + "¢Ë" + goodhngnm + "¢Ë" + goodengnm + "¢Ë" + goodspec + "¢Ë" + goodmodel + "¢Ë" + maincustlastsuplplce + "¢Ë" + suppcustcd + "¢Ë" + deliveunit + "¢Ë" + prodplce + "¢Ë" + winacnt + "¢Ë" + amtacnt + "¢Ë" + goodunitcost + "¢Ë" + mainmngtdeptcd + "¢Ë" + prodcmpycd + "¢Ë" + todd + "¢Ë" + nonusetretresn + "¢Ë" + appfixasetcd + "¢Ë" + cmt + "¢Ì" ; model.makeValue("/root/send/save/goodlist", save); } // ºÎǰ ¸¶½ºÅÍ ÀúÀå½Ã µ¥ÀÌŸ Validation üũ function fDataValiChk() { var smsg = ""; if(ipt_goodcd.value.getTrim()=="") smsg += cap_goodcd.value.getTrim() +", "; //if(ipt_goodnm.value.getTrim()=="") smsg += cap_goodnm.value.getTrim() +", "; if(ipt_goodengnm.value.getTrim()=="") smsg += cap_goodengnm.value.getTrim() +", "; if(ipt_goodhngnm.value.getTrim()=="") smsg += cap_goodhngnm.value.getTrim() +", "; //if(ipt_goodmodel.value.getTrim()=="") smsg += cap_goodmodel.value.getTrim() +", "; if(ipt_goodspec.value.getTrim()=="") smsg += cap_goodspec.value.getTrim() +", "; if(ipt_fromdd.value.getTrim()=="") smsg += cap_fromdd.value.getTrim() +", "; if(ipt_lrgcd.value.getTrim()=="") smsg += cap_lrgcd.value.getTrim() +", "; if(ipt_mdlcd.value.getTrim()=="") smsg += cap_mdlcd.value.getTrim() +", "; //if(ipt_maincustlastsuplplce.value.getTrim() == "") smsg += cap_maincustlastsuplplce.value.getTrim() +", "; //if(ipt_winacnt.value.getTrim()=="") smsg += cap_winacnt.value.getTrim() +", "; //if(ipt_amtacnt.value.getTrim()=="") smsg += cap_amtacnt.value.getTrim() +", "; if(cmb_deliveunit.value.getTrim()=="") smsg += cap_deliveunit.value.getTrim() +", "; if (smsg == ""){ return true; }else{ messageBox(smsg.substr(0, smsg.length-2) + "Àº(´Â)","I003"); return false; } } /* ------------------------------------------------- */ /* ------End Of List ------------------------------- */ /* -------------------------------------------------- */