123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683 |
- /* ---------------------------------------------------------------------
-
- SMRSC0100_사용자별관리물품권한.xrw (SMRSC0100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By Francis Choi
- : 2015.05.02
- ---------------------------------------------------------------------- */
-
- var xAuth = !(checkAuth("X"));
- var pAuth = !(checkAuth("P"));
- var DataPath = "/root/main/RscmggbnEmpData";
- var MainPath = "/root/main/RscmggbnLists/rscmggbnlist";
- var ListPath = "/root/main/RscmggbnEmpLists";
- var HidePath = "/root/WorkData/HideData";
-
- var TreePath = "/root/main/RscmgubnLists/TreeList";
- var WorkPath = "/root/init/WorkInit";
- var CompPath = "/root/init/CompareInit";
- // --------------------------------------------------
- // Tree정보 가져오기
- // --------------------------------------------------
- function fInit() {
- fInitialize();
-
- // grp_lag.disabled = true;
- // grp_dept.disabled = true;
- // grp_mdl.disabled = true;
- // grp_sml.disabled = true;
- // grp_anct.disabled = true;
-
- // btn_save.disabled = !(checkAuth("X"));
- // btn_cdclssysrgst.disabled = !(checkAuth("P"));
-
- var vInstCd = getUserInfo("dutplceinstcd"); // 기관코드
-
- model.setValue(HidePath + "/instcd" , vInstCd ); // 기관코드
- model.removenode("/root/send");
- model.makeValue("/root/send/goodflag","" ); // 메시지종류
- model.makeValue("/root/send/treeflag","A" ); // 트리구분 T: TREE, L: LARGE
-
- // model.makeValue("/root/send/emplno" ,getUserInfo("userid")); // 사원번호
- submit("TRRSC05104"); // Tree Data 정보를 가져온다.
-
- fRscmggbnTree();
- model.refresh();
- }
-
- // --------------------------------------------------
- // 사용자별관리물품권한를 TREE 조회
- // --------------------------------------------------
- function fRscmggbnTree() {
-
- model.removenode("/root/send");
- model.makeValue("/root/send/viewcls",model.getValue(HidePath + "/viewcls")); // 트리구성구분 E:사번,G:물품구분
- model.makeValue("/root/send/instcd" ,getUserInfo("dutplceinstcd") ); // 기관코드
- model.makeValue("/root/send/deptcd" ,getUserInfo("posdeptcd" ) ); // 부서코드
- submit("TRRSC01005"); // Tree Data 정보를 가져온다.
-
- trv_setcode.refresh();
- }
-
- // --------------------------------------------------
- // Tree Click
- // --------------------------------------------------
- function fTreeClick(pIdx) {
-
- var OpCode = "";
- var OpDepth = "";
- var vDepth = "";
- var vGoodflag = "";
- var vGoodflagnm = "";
- var vLrgcd = "";
- var vLrgnm = "";
- var vMdlcd = "";
- var vMdlnm = "";
- var vSmlcd = "";
- var vSmlnm = "";
- var vMainmngtdeptcd = "";
- var vMainmngtdeptnm = "";
- var vWinacnt = "";
- var vWinacntnm = "";
- var vAmtacnt = "";
- var vAmtacntnm = "";
- var Idx = pIdx + 1;
-
- bbt_append.disabled = false;
- bbt_delete.disabled = false;
-
-
- model.setValue(DataPath + "/jobcls" , "I");
-
- var sDepth = model.getValue(MainPath +"["+Idx+"]/depth");
- var vCodeCd = model.getValue(MainPath +"["+Idx+"]/codecd");
- var vCodeNm = model.getValue(MainPath +"["+Idx+"]/codenm");
- var vBaseCd = model.getValue(MainPath +"["+Idx+"]/basecd");
-
- bbt_append.disabled = true;
- btn_save.disabled = true;
- bbt_delete.disabled = true;
-
- // cmb_instcd.disabled = true;
- cmb_emplno.disabled = true;
- btn_winpsn.disabled = true;
- goodflag.disabled = true;
- if (sDepth == "1") {
- model.setValue(DataPath + "/instcd" , vCodeCd);
- bbt_append.disabled = false;
-
- cmb_emplno.disabled = false;
- btn_winpsn.disabled = false;
- goodflag.disabled = false;
- }
-
- //
-
- if (sDepth == "2") {
- if (model.getValue(HidePath + "/viewcls")=="E") {
- model.setValue(DataPath + "/emplno" , vCodeCd);
- model.setValue(DataPath + "/emplnm" , vCodeNm);
- } else {
- model.setValue(DataPath + "/goodflag" , vCodeCd);
- }
-
- model.setValue(DataPath + "/instcd", model.getValue(MainPath +"[pcode='"+ vBaseCd+"']/codecd"));
- }
- //
- if (sDepth == "3") {
- model.setValue(DataPath + "/jobcls" , "U");
- if (model.getValue(HidePath + "/viewcls")=="E") {
- model.setValue(DataPath + "/goodflag" , vCodeCd);
- } else {
- model.setValue(DataPath + "/emplno" , vCodeCd);
- model.setValue(DataPath + "/emplnm" , vCodeNm);
- }
- model.setValue(DataPath + "/instcd" , model.getValue(MainPath +"["+Idx+"]/instcd"));
- model.setValue(DataPath + "/emplno" , model.getValue(MainPath +"["+Idx+"]/emplno"));
- model.setValue(DataPath + "/emplnm" , model.getValue(MainPath +"["+Idx+"]/usernm"));
-
- model.setValue(DataPath + "/goodflag", model.getValue(MainPath +"["+Idx+"]/goodflag"));
- model.removenode("/root/send");
-
- // model.makeValue("/root/send/goodflag" ,model.getValue(DataPath+"/goodflag")); // "물품구분
- model.makeValue("/root/send/instcd" ,model.getValue(DataPath+"/instcd" )); // "기관코드
- model.makeValue("/root/send/emplno" ,model.getValue(DataPath+"/emplno" )); // "사원번호
-
- submit("TRRSC01006"); // Tree Data 정보를 가져온다.
-
- btn_save.disabled = false;
- bbt_delete.disabled = false;
-
- trv_empdata.rebuild();
- }
-
- //grp_disp.rebuild();
- // model.setValue(WorkPath + "/depth" , sDepth );
- // model.setValue(WorkPath + "/goodflag" , vGoodflag );
- // model.setValue(WorkPath + "/goodflagnm" , vGoodflagnm );
- // model.setValue(WorkPath + "/lrgcd" , vLrgcd );
- // model.setValue(WorkPath + "/lrgnm" , vLrgnm );
- // model.setValue(WorkPath + "/mdlcd" , vMdlcd );
- // model.setValue(WorkPath + "/mdlnm" , vMdlnm );
- // model.setValue(WorkPath + "/smlcd" , vSmlcd );
- // model.setValue(WorkPath + "/smlnm" , vSmlnm );
- // model.setValue(WorkPath + "/mainmngtdeptcd", vMainmngtdeptcd );
- // model.setValue(WorkPath + "/mainmngtdeptnm", vMainmngtdeptnm );
- // model.setValue(WorkPath + "/winacnt" , vWinacnt );
- // model.setValue(WorkPath + "/winacntnm" , vWinacntnm );
- // model.setValue(WorkPath + "/amtacnt" , vAmtacnt );
- // model.setValue(WorkPath + "/amtacntnm" , vAmtacntnm );
- //
- // model.setValue(CompPath + "/depth" , sDepth );
- // model.setValue(CompPath + "/goodflag" , vGoodflag );
- // model.setValue(CompPath + "/goodflagnm" , vGoodflagnm );
- // model.setValue(CompPath + "/lrgcd" , vLrgcd );
- // model.setValue(CompPath + "/lrgnm" , vLrgnm );
- // model.setValue(CompPath + "/mdlcd" , vMdlcd );
- // model.setValue(CompPath + "/mdlnm" , vMdlnm );
- // model.setValue(CompPath + "/smlcd" , vSmlcd );
- // model.setValue(CompPath + "/smlnm" , vSmlnm );
- // model.setValue(CompPath + "/mainmngtdeptcd", vMainmngtdeptcd );
- // model.setValue(CompPath + "/mainmngtdeptnm", vMainmngtdeptnm );
- // model.setValue(CompPath + "/winacnt" , vWinacnt );
- // model.setValue(CompPath + "/winacntnm" , vWinacntnm );
- // model.setValue(CompPath + "/amtacnt" , vAmtacnt );
- // model.setValue(CompPath + "/amtacntnm" , vAmtacntnm );
- //
- // if (xAuth) {
- // grp_lag.disabled = xAuth;
- // grp_dept.disabled = xAuth;
- // grp_mdl.disabled = xAuth;
- // grp_sml.disabled = xAuth;
- // grp_anct.disabled = xAuth;
- //
- // bbt_append.disabled = xAuth;
- // btn_save.disabled = xAuth;
- // bbt_delete.disabled = xAuth;
- // }
- //
- grp_disp.refresh();
-
- }
- // --------------------------------------------------
- // Append Data
- // --------------------------------------------------
- function fAppendData() {
-
- var sDepth = model.getValue(DataPath + "/depth");
-
- bbt_append.disabled = true;
-
- if (sDepth == "") {
- alert("상위 분류를 선택 하십시요!! ");
- return;
- }
-
- //
- if (fCheckEdit() ){
- if (messageBox("데이터가 변경 되었습니다. ", "Q003") == "2") return;
-
- fCompare2Work();
- }
-
- //
- if (sDepth == "1") {
- model.setValue(DataPath + "/depth" , "2");
- model.setValue(DataPath + "/emplno" , "" );
- model.setValue(DataPath + "/emplnm" , "" );
- model.setValue(DataPath + "/goodflag" , "" );
- grp_lag.disabled = false;
- grp_dept.disabled = false;
- grp_mdl.disabled = true;
- grp_sml.disabled = true;
- grp_anct.disabled = false;
- }
- if (sDepth == "2") {
- model.setValue(DataPath + "/depth" , "3");
- if (model.getValue(HidePath + "/viewcls")=="E") {
- cmb_emplno.disabled = true;
- btn_winpsn.disabled = true;
- goodflag.disabled = false;
- model.setValue(DataPath + "/goodflag" , "" );
- } else {
- goodflag.disabled = true;
- cmb_emplno.disabled = false;
- btn_winpsn.disabled = false;
- model.setValue(DataPath + "/emplno" , "" );
- model.setValue(DataPath + "/emplnm" , "" );
- }
- }
- if (sDepth == "3") {
- model.setValue(DataPath + "/depth" , "4");
- if (model.getValue(HidePath + "/viewcls")=="E") {
- model.setValue(DataPath + "/goodflag", vCodeCd);
- } else {
- model.setValue(DataPath + "/emplno" , vCodeCd);
- model.setValue(DataPath + "/emplnm" , vCodeNm);
- }
- grp_lag.disabled = true;
- grp_dept.disabled = true;
- grp_mdl.disabled = true;
- grp_sml.disabled = false;
- grp_anct.disabled = false;
-
- bbt_append.disabled = true;
- }
- bbt_delete.disabled = true;
-
- // ipt_lrgcd.disabled = true;
- // ipt_mdlcd.disabled = true;
- // ipt_smlcd.disabled = true;
- model.setValue(WorkPath + "/jobcls" , "I" );
- model.setValue(WorkPath + "/mainmngtdeptcd", "" );
- model.setValue(WorkPath + "/mainmngtdeptnm", "" );
- model.setValue(WorkPath + "/winacnt" , "" );
- model.setValue(WorkPath + "/winacntnm" , "" );
- model.setValue(WorkPath + "/amtacnt" , "" );
- model.setValue(WorkPath + "/amtacntnm" , "" );
- grp_disp.refresh();
- }
- //
- // 변경여부 Check
- //
- function fCheckEdit(){
- var EditChk = true;
- if ( model.getValue(WorkPath + "/depth" ) != model.getValue(CompPath + "/depth" )) return EditChk;
- if ( model.getValue(WorkPath + "/goodflag" ) != model.getValue(CompPath + "/goodflag" )) return EditChk;
- if ( model.getValue(WorkPath + "/goodflagnm" ) != model.getValue(CompPath + "/goodflagnm" )) return EditChk;
- if ( model.getValue(WorkPath + "/lrgcd" ) != model.getValue(CompPath + "/lrgcd" )) return EditChk;
- if ( model.getValue(WorkPath + "/lrgnm" ) != model.getValue(CompPath + "/lrgnm" )) return EditChk;
- if ( model.getValue(WorkPath + "/mdlcd" ) != model.getValue(CompPath + "/mdlcd" )) return EditChk;
- if ( model.getValue(WorkPath + "/mdlnm" ) != model.getValue(CompPath + "/mdlnm" )) return EditChk;
- if ( model.getValue(WorkPath + "/smlcd" ) != model.getValue(CompPath + "/smlcd" )) return EditChk;
- if ( model.getValue(WorkPath + "/smlnm" ) != model.getValue(CompPath + "/smlnm" )) return EditChk;
- if ( model.getValue(WorkPath + "/mainmngtdeptcd") != model.getValue(CompPath + "/mainmngtdeptcd")) return EditChk;
- if ( model.getValue(WorkPath + "/mainmngtdeptnm") != model.getValue(CompPath + "/mainmngtdeptnm")) return EditChk;
- if ( model.getValue(WorkPath + "/winacnt" ) != model.getValue(CompPath + "/winacnt" )) return EditChk;
- if ( model.getValue(WorkPath + "/winacntnm" ) != model.getValue(CompPath + "/winacntnm" )) return EditChk;
- if ( model.getValue(WorkPath + "/amtacnt" ) != model.getValue(CompPath + "/amtacnt" )) return EditChk;
- if ( model.getValue(WorkPath + "/amtacntnm" ) != model.getValue(CompPath + "/amtacntnm" )) return EditChk;
- EditChk = false;
- return EditChk;
- }
- //
- // 변경여부 Check
- //
- function fCompare2Work(){
-
- model.setValue(WorkPath + "/depth" , model.getValue(CompPath + "/depth" ));
- model.setValue(WorkPath + "/goodflag" , model.getValue(CompPath + "/goodflag" ));
- model.setValue(WorkPath + "/goodflagnm" , model.getValue(CompPath + "/goodflagnm" ));
- model.setValue(WorkPath + "/lrgcd" , model.getValue(CompPath + "/lrgcd" ));
- model.setValue(WorkPath + "/lrgnm" , model.getValue(CompPath + "/lrgnm" ));
- model.setValue(WorkPath + "/mdlcd" , model.getValue(CompPath + "/mdlcd" ));
- model.setValue(WorkPath + "/mdlnm" , model.getValue(CompPath + "/mdlnm" ));
- model.setValue(WorkPath + "/smlcd" , model.getValue(CompPath + "/smlcd" ));
- model.setValue(WorkPath + "/smlnm" , model.getValue(CompPath + "/smlnm" ));
- model.setValue(WorkPath + "/mainmngtdeptcd", model.getValue(CompPath + "/mainmngtdeptcd"));
- model.setValue(WorkPath + "/mainmngtdeptnm", model.getValue(CompPath + "/mainmngtdeptnm"));
- model.setValue(WorkPath + "/winacnt" , model.getValue(CompPath + "/winacnt" ));
- model.setValue(WorkPath + "/winacntnm" , model.getValue(CompPath + "/winacntnm" ));
- model.setValue(WorkPath + "/amtacnt" , model.getValue(CompPath + "/amtacnt" ));
- model.setValue(WorkPath + "/amtacntnm" , model.getValue(CompPath + "/amtacntnm" ));
-
- }
- // --------------------------------------------------
- // 분류코드 저장하기
- // --------------------------------------------------
- function fDataSubmit(pCls) {
- var tIdx = trv_setcode.focusIndex;
- var wJobCls = "";
- model.removenode("/root/send");
- if (pCls == "D") {
- if (model.getValue(WorkPath + "/depth") == "1") {
- return;
- }
- //
- wJobCls = "D";
- } else {
- wJobCls = model.getValue(WorkPath + "/jobcls");
- }
-
- //
- model.makeValue("/root/send/status" , wJobCls ); // 작업구분
- model.makeValue("/root/send/depth" , model.getValue(WorkPath + "/depth" )); // 분류구분
- model.makeValue("/root/send/lrgcd" , model.getValue(WorkPath + "/lrgcd" )); // 대분류코드
- model.makeValue("/root/send/lrgnm" , model.getValue(WorkPath + "/lrgnm" )); // 대분류명
- model.makeValue("/root/send/mdlcd" , model.getValue(WorkPath + "/mdlcd" )); // 중분류코드
- model.makeValue("/root/send/mdlnm" , model.getValue(WorkPath + "/mdlnm" )); // 중분류명
- model.makeValue("/root/send/smlcd" , model.getValue(WorkPath + "/smlcd" )); // 소분류코드
- model.makeValue("/root/send/smlnm" , model.getValue(WorkPath + "/smlnm" )); // 소분류명
- model.makeValue("/root/send/mainmngtdeptcd" , model.getValue(WorkPath + "/mainmngtdeptcd")); // 주관부서
- model.makeValue("/root/send/winacnt" , model.getValue(WorkPath + "/winacnt" )); // 계정코드(입고)
- model.makeValue("/root/send/winacntnm" , model.getValue(WorkPath + "/winacntnm" )); // 계정명(입고)
- model.makeValue("/root/send/amtacnt" , model.getValue(WorkPath + "/amtacnt" )); // 계정코드(출고)
- model.makeValue("/root/send/amtacntnm" , model.getValue(WorkPath + "/amtacntnm" )); // 계정명(출고)
- model.makeValue("/root/send/goodflag" , model.getValue(WorkPath + "/goodflag" )); // 물품구분
-
- if (submit("TXRSC05102")) {
-
- messageBox("작업이 ","I001"); // 작업 처리 완료
-
- if (wJobCls !="U") {
-
- fInit();
-
- //trv_setcode.focusIndex = tIdx;
- trv_setcode.refresh();
- }
-
- }
- }
- // ----------------------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // ----------------------------------------------------------------
- function fInitialize() {
- // grid reset
- //misfGridInit(grd_rscmggbn);
- //misfGridInit(grd_rscmregb);
- //misfGridInit(grd_rscmreus);
- //misfGridInit(grd_rscmsude);
- //misfGridInit(grd_gooddmnd);
-
- ///////////////////////////////////////////////////////////////////////////////////////////////
- // tab1 기관코드 combo setting
- //rszfUserInstList(cmb_instcd,getUserInfo("userid")); //사용자소속기관
- ///////////////////////////////////////////////////////////////////////////////////////////////
- misfComboComCdList("Z0007", cmb_instcd); //전체기관코드
-
- ///////////////////////////////////////////////////////////////////////////////////////////////
- // tab2 기관코드 combo setting
- //rszfUserInstList(cmb_instcd,getUserInfo("userid")); //사용자소속기관
- ///////////////////////////////////////////////////////////////////////////////////////////////
- misfComboComCdList("Z0007", cmb_instcd_tab2); //전체기관코드
-
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //물품구분
- //misfComboComCdList("R0025", goodflag); //물품구분
- ///////////////////////////////////////////////////////////////////////////////////////////////
- //misfGridComboComCdList("R0025",grd_rscmggbn,"goodflag");
-
- // 스위치 오픈 설정.
- cse_ggbn.selected=true;
- // 막음.황
- //rszfGridComboLrgcdList("P", grd_rscmggbn, "lrgcd")
-
- // tab1 .master ,detail set
- //misfMsterDetailSet(grd_rscmggbn,null, "TRRSC01001" ,"Y");
- // tab2 .master ,detail set
- //misfMsterDetailSet(grd_rscmregb,null, "TRRSC01002" ,"Y");
- // tab2 master, detail set 청구처리권한 설정
- //misfMsterDetailSet(grd_rscmreus, grd_rscmregb, "TRRSC01003", "Y");
- // tab2 master, detail set 취합부서 설정
- //misfMsterDetailSet(grd_rscmsude, grd_rscmregb, "TRRSC01004", "Y");
- //model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
- //model.setValue(opt_purcdmnddeptcd.attribute("ref") , getUserInfo("dutplcecd"));
- //model.setValue(opt_purcdmnddeptnm.attribute("ref") , getUserInfo("dutplcenm"));
- model.refresh();
- }
- // ----------------------------------------------------------------
- function fCheckRetrieveData(pmsg)
- {
-
- if(swh_select.selectedIndex == 0)
- {
- if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("기관코드를 " ,"C002");
- model.setFocus("cmb_instcd");
- }
- return false;
- }
- return true;
- }
- else if (swh_select.selectedIndex ==1)
- {
-
- if(model.getValue(cmb_instcd_tab2.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("기관코드를 " ,"C002");
- model.setFocus("cmb_instcd_tab2");
- }
- return false;
- }
- return true;
- }
- else return;
- }
- // ----------------------------------------------------------------
- function fDefaultSetting(prow)
- {
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/purcreqflag",model.getValue("/root/send/gooddmnd/purcreqflag"));
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/instcd" ,model.getValue("/root/send/gooddmnd/instcd") );
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/goodflag" ,model.getValue("/root/send/gooddmnd/goodflag") );
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/purcdmnddd" ,model.getValue("/root/send/gooddmnd/purcdmnddd") );
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/reqdeptcd" ,model.getValue("/root/send/gooddmnd/reqdeptcd") );
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/reqpsn" ,model.getValue("/root/send/gooddmnd/reqpsn") );
- model.setValue(grd_gooddmnd.nodeset+"["+prow+"]/purcdmndseq",prow);
- }
-
- // ----------------------------------------------------------------
- function fSettingGoodList(pnode, nodename, userqtynm){
-
- var codynode = instance1.selectNodes(pnode + "/*");
- var addRow = grd_gooddmnd.rows - grd_gooddmnd.fixedRows;
-
- if(model.getValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
- for (var j = 1; j <= codynode.length ; j++) {
- if(addRow > grd_gooddmnd.rows - grd_gooddmnd.fixedRows)
- {
- misfGridIUD(grd_gooddmnd,"A");
- addRow = grd_gooddmnd.rows - grd_gooddmnd.fixedRows;
- fDefaultSetting(addRow );
- }
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/reqpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/reqpackcnt" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/requnit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/reqqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/reqpackcntperunit" ,1);
- model.setValue(grd_gooddmnd.nodeset + "[" + addRow + "]/goodunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
-
- addRow = addRow + 1;
- }
-
- model.recalculate();
- model.refresh();
- }
-
- // ----------------------------------------------------------------
- function fCheckSaveData()
- {
- /*
- if(model.getValue(rbo_workflag.attribute("ref")).length== 0 )
- {
- messageBox("작업구분을 " ,"C002");
- model.setFocus("rbo_workflag");
- return false;
- }
- if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
- {
- messageBox("기관코드를 " ,"C002");
- model.setFocus("cmb_instcd");
- return false;
- }
- */
-
- if(swh_select.selectedIndex == 0)
- {
- for(var currow = grd_rscmggbn.fixedRows ; currow < grd_rscmggbn.rows ; currow++)
- {
-
- // if (grd_rscmggbn.rowStatus(currow) != '4')
- if (grd_rscmggbn.rowStatus(currow) == '1' || grd_rscmggbn.rowStatus(currow) == '2'|| grd_rscmggbn.rowStatus(currow) == '3')
- {
- if(grd_rscmggbn.valueMatrix(currow , grd_rscmggbn.colRef("emplno")).length == 0)
- {
- messageBox((currow )+ " 번째 사원번호를 " ,"C001");
- grd_rscmggbn.row = currow;
- grd_rscmggbn.col= grd_rscmggbn.colRef("emplno");
- grd_rscmggbn.editCell();
- return false;
- }
- if(grd_rscmggbn.valueMatrix(currow , grd_rscmggbn.colRef("goodflag")).length == 0)
- {
- messageBox((currow)+ " 번째 물품구분을 " ,"C001");
- grd_rscmggbn.row = currow;
- grd_rscmggbn.col= grd_rscmggbn.colRef("goodflag");
- grd_rscmggbn.editCell();
- return false;
- }
- if(grd_rscmggbn.valueMatrix(currow , grd_rscmggbn.colRef("lrgcd")).length == 0)
- {
- messageBox((currow)+ " 번째 대분류코드를 " ,"C001");
- grd_rscmggbn.row = currow;
- grd_rscmggbn.col= grd_rscmggbn.colRef("lrgcd");
- grd_rscmggbn.editCell();
- return false;
- }
- }
- }
- }
- else if(swh_select.selectedIndex == 1)
- {
- for(var currow = grd_rscmregb.fixedRows ; currow < grd_rscmregb.rows ; currow++)
- {
-
- //if (grd_rscmregb.rowStatus(currow) != '4')
- if (grd_rscmregb.rowStatus(currow) == '1' || grd_rscmregb.rowStatus(currow) == '2'|| grd_rscmregb.rowStatus(currow) == '3')
- {
- if(grd_rscmregb.valueMatrix(currow , grd_rscmregb.colRef("reqflag")).length == 0)
- {
- messageBox((currow )+ " 번째 청구구분을 " ,"C001");
- grd_rscmregb.row = currow;
- grd_rscmregb.col= grd_rscmregb.colRef("reqflag");
- grd_rscmregb.editCell();
- return false;
- }
- if(grd_rscmregb.valueMatrix(currow , grd_rscmregb.colRef("reqflagnm")).length == 0)
- {
- messageBox((currow )+ " 번째 청구구분명을 " ,"C001");
- grd_rscmregb.row = currow;
- grd_rscmregb.col= grd_rscmregb.colRef("reqflagnm");
- grd_rscmregb.editCell();
- return false;
- }
- if(grd_rscmregb.valueMatrix(currow , grd_rscmregb.colRef("delivedeptcd")).length == 0)
- {
- messageBox((currow )+ " 번째 출고부서명을 " ,"C001");
- grd_rscmregb.row = currow;
- grd_rscmregb.col= grd_rscmregb.colRef("delivedeptcd");
- grd_rscmregb.editCell();
- return false;
- }
- }
- }
- for(var currow = grd_rscmreus.fixedRows ; currow < grd_rscmreus.rows ; currow++)
- {
- //if (grd_rscmreus.rowStatus(currow) != '4')
- if (grd_rscmreus.rowStatus(currow) == '1' || grd_rscmreus.rowStatus(currow) == '2'|| grd_rscmreus.rowStatus(currow) == '3')
- {
- if(grd_rscmreus.valueMatrix(currow , grd_rscmreus.colRef("emplno")).length == 0)
- {
- messageBox((currow )+ " 번째 사원번호을 " ,"C001");
- grd_rscmreus.row = currow;
- grd_rscmreus.col= grd_rscmreus.colRef("reqflag");
- grd_rscmreus.editCell();
- return false;
- }
- }
- }
- for(var currow = grd_rscmsude.fixedRows ; currow < grd_rscmsude.rows ; currow++)
- {
- //if (grd_rscmsude.rowStatus(currow) != '4')
- if (grd_rscmsude.rowStatus(currow) == '1' || grd_rscmsude.rowStatus(currow) == '2'|| grd_rscmsude.rowStatus(currow) == '3')
- {
- if(grd_rscmsude.valueMatrix(currow , grd_rscmsude.colRef("reqdeptcd")).length == 0)
- {
- messageBox((currow )+ " 번째 청구부서 " ,"C001");
- grd_rscmsude.row = currow;
- grd_rscmsude.col= grd_rscmsude.colRef("reqdeptcd");
- grd_rscmsude.editCell();
- return false;
- }
- if(grd_rscmsude.valueMatrix(currow , grd_rscmsude.colRef("reqcollcdeptcd")).length == 0)
- {
- messageBox((currow )+ " 번째 취합부서 " ,"C001");
- grd_rscmsude.row = currow;
- grd_rscmsude.col= grd_rscmsude.colRef("reqcollcdeptcd");
- grd_rscmsude.editCell();
- return false;
- }
- }
- }
- }
- return true;
- }
- // trv_base.select(i); 위치...
- // trv_base.rebuild();
- // if ( btn_trvzoom.attribute("text") == "닫힘" ) {
- // trv_base.expandDepth = 0;
- // btn_trvzoom.attribute("text") = "펼침";
- //
- // } else {
- // trv_base.expandDepth = -1;
- // btn_trvzoom.attribute("text") = "닫힘";
- // }
-
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|