123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- /* ---------------------------------------------------------------------
-
- SMRSC08100_기관별구매시스템기본정보.xrw (SMRSC08100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By HR Choi
- : 2015.05.02
- ---------------------------------------------------------------------- */
-
-
- var vGoodNew = "U"; //U:UPDATE, N:NEW
- // --------------------------------------------------
- // 사용자권한 Check
- // --------------------------------------------------
- function fInitForm() {
- fInitialize();
- }
-
- // --------------------------------------------------
- // 사용자권한 Check
- // --------------------------------------------------
- function fCheckAuth() {
- // btn_search.disabled = rAuth ;
- btn_save.disabled = xAuth ;
- }
- // --------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // --------------------------------------------------
- function fInitialize() {
- model.resetInstanceNode("/root/send");
- misfGridInit(grd_rscsysinft);
- misfGridInit(grd_rscsysordtlist);
-
- rszfUserInstList(cmb_instcd,getUserInfo("userid"),"Y");
-
- //기관코드 읽어오는 부분 넣기
- var instcd = getUserInfo("dutplceinstcd");
- var instnm = getUserInfo("dutplceinstnm");
-
- // GOODFLAG 물품구분 R0025
-
- if(instcd.length > 0)model.setValue(cmb_instcd.attribute("ref"), instcd);
- else
- {
- if(cmb_instcd.length> 0) cmb_instcd.selectedindex= 0;
- }
-
- misfComboComCdListMulti("R0025","grd_rscsysordtlist.goodflag");
-
- misfMsterDetailSet(grd_rscsysinft,null, "TRRSC08100" ,"Y");
-
- grd_rscsysinft.explorerbar = "sortshow";
-
- model.refresh();
- }
-
-
- function fSaveDataSetting(pSubmit_Id, pCls) {
-
- // var insfromdd = model.getValue(ipt_insfromdd.attribute("ref"));
- if (pCls == "2") {
- model.removenode("/root/send/rscsysordtlist");
- model.makeNode("/root/send/rscsysordtlist");
-
- model.setValue("/root/send/rscsysordtlist" , grd_rscsysordtlist.getUpdateData());
- submit(pSubmit_Id);
-
- if (model.getValue(gvErrorMsgPath + "/type") != "error") grd_rscsysinft.dispatch("ondblclick");
-
- } else {
- model.removenode("/root/send/rscsysinftlist");
- model.makeNode("/root/send/rscsysinftlist");
-
- model.setValue("/root/send/rscsysinftlist" , grd_rscsysinft.getUpdateData());
- submit(pSubmit_Id);
-
- if (model.getValue(gvErrorMsgPath + "/type") != "error") btn_search.dispatch("DOMActivate");
- }
- }
-
-
- var vColRefData = "purcdept#drugdept#nutrdept#insucdeptcd#"
- + "purcdptjobid#purcdptmgrid#drugdptjobid#drugdptmgrid#nutrdptjobid#nutrdptmgrid";
-
- var vRcvListData = "purcdept,purcdeptnm#drugdept,drugdeptnm#nutrdept,nutrdeptnm#insucdeptcd,insucdeptcdnm#"
- + "purcdptjobid,purcdptjobidnm#purcdptmgrid,purcdptmgridnm#drugdptjobid,drugdptjobidnm#"
- + "drugdptmgrid,drugdptmgridnm#nutrdptjobid,nutrdptjobidnm#nutrdptmgrid,nutrdptmgridnm" ;
- var vColRef = vColRefData.split("#");
- var vRcvList = vRcvListData.split("#");
- function fOnButtonClick(pGrid) {
-
- var Idx = 99;
- for (var j=0; j < vColRef.length; j++) {
- if (pGrid.col == pGrid.colRef(vColRef[j])) {
- Idx = j ;
- break;
- }
- }
-
- // alert("Idx=>>"+Idx+" vRcvList[Idx]==>>"+ vRcvList[Idx]+"<<=="+vRcvList[Idx]);
-
- if (Idx < 4 ) {
- misfOpenPopUpList("02", pGrid,"", vRcvList[Idx],pGrid.valueMatrix(pGrid.row, pGrid.colRef("instcd")),"instcd" );
- } else if (Idx < 10 ) {
- misfOpenPopUpList("01", pGrid,"", vRcvList[Idx],pGrid.valueMatrix(pGrid.row, pGrid.colRef("instcd")),"instcd" );
-
- //misfOpenPopUpList( "45"
- // , pGrid
- // , ""
- // , vRcvList[Idx]
- // , pGrid.valueMatrix(pGrid.row, pGrid.colRef("instcd" )) + ", ," +
- // // pGrid.valueMatrix(pGrid.row, pGrid.colRef(vColRef[Idx] )) + "," +
- // pGrid.valueMatrix(pGrid.row, pGrid.colRef(vColRef[Idx]+"nm")) , "instcd,deptcd,emplnm" ); // 사용자 조회
- }
-
- model.refresh();
- }
-
- //
- function fValueChanged(pGrid) {
- var Idx = 99;
- for (var j=0; j < vColRef.length; j++) {
- if (pGrid.col == pGrid.colRef(vColRef[j])) {
- Idx = j ;
- break;
- }
- }
-
- // alert("Idx=>>"+Idx+" vRcvList[Idx]==>>"+ vRcvList[Idx]+"<<=="+vRcvList[Idx]);
-
- if (Idx < 4 ) {
- misfValidationCheck("02", "", vRcvList[Idx]);
- } else if (Idx < 10 ) {
- rpbfValidationCheck("EMPLNO", vRcvList[Idx]);
- }
-
- model.refresh();
- }
-
- //----------------------------
- // 기관별 구매발주자 정보 Data
- //----------------------------
- var gDeptCode = "purcdept#drugdept#nutrdept#insucdeptcd";
- var gDeptName = "purcdeptnm#drugdeptnm#nutrdeptnm#insucdeptcdnm";
- var gDeptCd = gDeptCode.split("#");
- var gDeptNm = gDeptName.split("#");
-
- var gPurcdept = "X";
- var gPurcdeptnm = "X";
-
- function fRscsysordtRead()
- {
- bbt_save.disabled = true;
- bbt_insert.disabled = true;
- bbt_delete.disabled = true;
-
- misfGridInit(grd_rscsysordtlist);
-
- model.setValue(opt_instcd.attribute("ref") , model.getValue(grd_rscsysinft.nodeset+"["+ grd_rscsysinft.row +"]/instcd"));
- model.setValue(opt_instcdnm.attribute("ref") , model.getValue(grd_rscsysinft.nodeset+"["+ grd_rscsysinft.row +"]/instnm"));
- model.setValue(opt_purcdept.attribute("ref") , model.getValue(grd_rscsysinft.nodeset+"["+ grd_rscsysinft.row +"]/"+ gPurcdept ));
- model.setValue(opt_purcdeptnm.attribute("ref") , model.getValue(grd_rscsysinft.nodeset+"["+ grd_rscsysinft.row +"]/"+ gPurcdeptnm));
- // model.setValue("/root/send/ordtlist/purcordid" ,ipt_goodcd.value);
- submit("TRRSC08101");
-
- if (model.getValue(gvErrorMsgPath + "/type") != "error") {
- bbt_insert.disabled = false;
- bbt_delete.disabled = false;
- bbt_save.disabled = false;
- }
-
- model.refresh();
- }
-
- //
-
- var gColumnName = "purcdept*purcdeptnm*purcdptjobid*purcdptjobidnm*purcdptmgrid*purcdptmgridnm*purcdepttel1*purcdepttel2*purcdeptfax*purcacctdate*purccloseyymm"
- + "#drugdept*drugdeptnm*drugdptjobid*drugdptjobidnm*drugdptmgrid*drugdptmgridnm*drugdepttel1*drugdepttel2*drugdeptfax*drugacctdate*drugcloseyymm"
- + "#nutrdept*nutrdeptnm*nutrdptjobid*nutrdptjobidnm*nutrdptmgrid*nutrdptmgridnm*nutrdepttel1*nutrdepttel2*nutrdeptfax*nutracctdate*nutrcloseyymm"
- + "#insucdeptcd*insucdeptcdnm";
-
- var gColumnNm = gColumnName.split("#");
-
- // --------------------------------------------------
- // View Option 처리하는 함수
- // --------------------------------------------------
- function fViewColumn() {
-
- for (var i=0; i < gColumnNm.length; i++){
-
- pHidden = (rdo_purcflag.value == i) ? false : true;
- fViewOptionToggle(gColumnNm[i], pHidden);
-
- }
- }
- // --------------------------------------------------
- // View Option 처리하는 함수
- // --------------------------------------------------
- function fViewOptionToggle(pColData, pHidden) {
-
- var ColName = pColData.split("*");
-
- for (var i=0; i < ColName.length; i++){
- grd_rscsysinft.colHidden(grd_rscsysinft.colRef(ColName[i])) = pHidden;
- }
- }
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|