/** * @desc : È­¸é ÃʱâÈ­ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fInitialize_SMMMB08400(){ fGetMhrcdList(); } /** * @desc : Áø·á°øÅëÄÚµå ¸®½ºÆ® Á¶È¸ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fGetMhrcdList(){ model.removeNodeset("/root/main/info/mhrcd/mhrcdlist"); // Áø·á°øÅëÄÚµå ¸®½ºÆ® model.resetInstanceNode("/root/main/hardcdinfo/mhrcdinfo"); model.resetInstanceNode("/root/main/dhrcd/dhrcdlist"); model.resetInstanceNode("/root/main/ahrcd/ahrcdlist"); model.setValue("/root/main/cond/userid", getUserInfo("userid")); model.setValue("/root/main/cond/deptcd", getUserInfo("dutplcecd")); submit("TRMMB08401"); model.refresh(); // Æ®¸®°¡ Á¢Èù »óÅ¿¡¼­ ÀçÁ¶È¸ ÇÏ¸é ±×¸®µå¿¡ Á¢Èù ¼ö¸¸Å­ Á¶È¸ µÇÁö ¾Ê´Â ¿À·ù ¼öÁ¤. setTree(grd_mhrcdlist, grd_mhrcdlist.colRef("levl"), grd_mhrcdlist.colRef("displaynm"), false); //input¹Ú½º ºñȰ¼ºÈ­ ipt_hardcdno.disabled = true; ipt_hardcdnm.disabled = true; ipt_suphardcdno.disabled = true; txt_rmk.disabled = true; // ÀúÀå¹öư ºñȰ¼ºÈ­ btn_SaveMhrcd.disabled = true; btn_SaveAhrcd.disabled = true; btn_SaveDhrcd.disabled = true; grd_dhrcdlist.clearStatus(); grd_ahrcdlist.clearStatus(); model.refresh(); } /** * @desc : Áø·á°øÅëÄÚµå ¸®½ºÆ® Ŭ¸¯½Ã ±âº»Á¤º¸ ¼³Á¤ * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSetHrcdInfo(){ var nRow = grd_mhrcdlist.row; var sHardCdNo = model.getValue("/root/main/mhrcd/mhrcdlist["+nRow+"]/hardcdno"); if(!isNull(sHardCdNo)) { model.makeValue("/root/send/reqdata/userid", getUserInfo("userid")); model.makeValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd")); model.makeValue("/root/send/reqdata/hardcdno", sHardCdNo); if (submit("TRMMB08402")){ model.resetInstanceNode("/root/main/hardcdinfo/mhrcdinfo"); model.resetInstanceNode("/root/main/dhrcd/dhrcdlist"); model.resetInstanceNode("/root/main/ahrcd/ahrcdlist"); copyNodesetType("/root/main/hardcdinfo/mhrcdinfo", "/root/main/recv/mhrcdinfo", "replace", model, model); copyNodesetType("/root/main/dhrcd/dhrcdlist", "/root/main/recv/dhrcdlist", "replace", model, model); copyNodesetType("/root/main/ahrcd/ahrcdlist", "/root/main/recv/ahrcdlist", "replace", model, model); //input¹Ú½º ºñȰ¼ºÈ­ ipt_hardcdno.disabled = true; ipt_hardcdnm.disabled = true; ipt_suphardcdno.disabled = true; txt_rmk.disabled = true; grd_dhrcdlist.clearStatus(); grd_ahrcdlist.clearStatus(); var sAuthType = model.getValue("/root/main/hardcdinfo/mhrcdinfo/authtype"); if(sAuthType == "A" || getUserInfo("userid") == "EMR") { btn_SaveMhrcd.disabled = false; btn_SaveAhrcd.disabled = false; btn_SaveDhrcd.disabled = false; } else if(sAuthType == "E"){ btn_SaveMhrcd.disabled = true; btn_SaveAhrcd.disabled = true; btn_SaveDhrcd.disabled = false; } else { btn_SaveMhrcd.disabled = true; btn_SaveAhrcd.disabled = true; btn_SaveDhrcd.disabled = true; } model.removeNodeset("/root/main/recv"); model.refresh(); } } } /** * @desc : Áø·á°øÅëÄÚµå »ó¼¼ ¸®½ºÆ® ÀúÀå * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSaveMHrcdInfo(){ if( messageBox("±âº»Á¤º¸¸¦","Q002") == 6 ){ copyNodesetType("/root/send/savedata/mhrcdinfo", "/root/main/hardcdinfo/mhrcdinfo", "replace", model, model); if ( submit("TXMMB08401") ) { fGetMhrcdList(); } } } /** * @desc : Áø·á°øÅëÄÚµå »ó¼¼ ¸®½ºÆ® ÀúÀå * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSaveDHrcdList(){ if( messageBox("»ó¼¼ÄÚµå Á¤º¸¸¦","Q002") == 6 ){ model.setValue("/root/send/savedata/dhrcdlist", grd_dhrcdlist.getUpdateData()); if ( submit("TXMMB08402") ) { fSetHrcdInfo(); } } } /** * @desc : Áø·á°øÅëÄÚµå ±ÇÇÑ ¸®½ºÆ® ÀúÀå * @ * @param : * @return : * @author : ¾ö¿µ¸¸ * @--------------------------------------------------- */ function fSaveAHrcdList(){ if( messageBox("±ÇÇÑÁ¤º¸¸¦","Q002") == 6 ){ model.setValue("/root/send/savedata/ahrcdlist", grd_ahrcdlist.getUpdateData()); if ( submit("TXMMB08403") ) { fSetHrcdInfo(); } } }