1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258 |
- /*---------------------------------------------------------------------
- 수술실 물품 마스터 (SMMNP04400.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By 김 진 명
- : 2007.09.08
- ----------------------------------------------------------------------*/
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 수술실 물품 마스터 초기화 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fInit() {
- model.removenode("/root/send");
- model.removeNodeset("/root/main/goodlist");
- //2009.04.08 하드코딩 소스 변경
- model.makeValue("/root/send/cdgrupid", "038");
- submit("TRMNP00323", false);
- model.setValue("/root/main/cond/refdept", model.getValue("/root/init/viewctrl/viewctrllist/viewctrlinfo/cdnm"));//CCR Main
- model.setValue("/root/main/cond/refdept", model.getValue("/root/init/viewctrl/viewctrllist/viewctrlinfo/cdnm"));//간호처방 화면
- //var dutplcecd = getUserInfo("dutplcecd");
- //if( dutplcecd == "3070000000" || dutplcecd == "1000000000" ){ // 수술실
- // model.setValue("/root/main/cond/refdept", "O");
- //}else if(dutplcecd == "3073100000"){ //마취부서
- // model.setValue("/root/main/cond/refdept", "A");
- //}else if(dutplcecd == "3073300000"){ //회복실부서
- // model.setValue("/root/main/cond/refdept", "R");
- //}else if(dutplcecd == "3072700000"){ //수술실 안과
- // model.setValue("/root/main/cond/refdept", "E");
- //}
- submit("TRMNP04414", false);//TREE 분류 조회
- submit("TRMNP04403", false);//물품구분 조회
- model.setValue("/root/main/goodinfo/gooddetlinfo/goodflag", "Y");
- model.makeValue("/root/send/reqdata/tabflag", "CCR");
- model.makeValue("/root/send/reqdata/goodflag", "Y");
- submit("TRMNP04408", false);//물품 상세정보 대분류 조회
- submit("TRMNP04404", false);
- var nodeCnt = getNodesetCount("/root/init/lrglist");
- if( nodeCnt > 0 ) {
- addComboItem("cmb_lrg", "전 체", "", "above" );
- }
- grd_goodlist.explorerbar = "sort";
- model.refresh();
- /* model.removeNodeset("/root/main/goodlist");
- model.setValue("/root/main/cond/tabflag", "CCR");
- model.toggle("ccrgood");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04403", false);
- model.setValue("/root/main/cond/goodflag", "Y");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- //2008-12-29 오후 12:21:02 taebum add
- submit("TRMNP04408", false);//물품 상세정보 대분류 조회
- submit("TRMNP04404", false);
- var nodeCnt = getNodesetCount("/root/init/lrglist");
- if( nodeCnt > 0 ) {
- addComboItem("cmb_lrg", "전 체", "", "above" );
- }
- grd_goodlist.explorerbar = "sort";
- grd_goodlist2.explorerbar = "sort";
- grd_goodlist3.explorerbar = "sort";
- fChangeDept("1");
- btn_save.disabled = true;
- model.refresh();*/
- }
- /*--------------------------------------------------*/
- /*type : function */
- /*access : public */
- /*desc : 수술실 물품 마스터 조회 */
- /*param : */
- /*return : */
- /*--------------------------------------------------*/
- function fSearch(pFlag) {
- var indexcd, lrgcd, mdlcd, smlcd;
- var refdeptflag = model.getValue("/root/main/cond/refdeptflag");
- var refdept = model.getValue("/root/main/cond/refdept");
- var refflag = model.getValue("/root/main/cond/refflag");
- var refnm = model.getValue("/root/main/cond/refnm");
- var prodcmpynm = model.getValue("/root/main/cond/prodcmpynm");
- var custnm = model.getValue("/root/main/cond/custnm");
- if( pFlag == "1" ) {//트리 조회 일 경우만 실행
- var item = trv_goodindxcdlist.item(trv_goodindxcdlist.selectedIndex);
- if(item != null){
- indexcd = item.value;
- if( indexcd.length == 2 ) {
- lrgcd = indexcd;
- }else if( indexcd.length == 4 ) {
- lrgcd = indexcd.substr(0, 2);
- mdlcd = indexcd.substr(2, 2);
- }else if( indexcd.length == 6 ) {
- lrgcd = indexcd.substr(0, 2);
- mdlcd = indexcd.substr(2, 2);
- smlcd = indexcd.substr(4, 2);
- }
- }
- }
- if( refnm == "" && prodcmpynm == "" && custnm == "" && lrgcd == "" && mdlcd == "" && smlcd == "" ) {
- messageBox("검색조건을 입력하지 ", "E007");
- model.setFocus("ipt_goodcd");
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/reqdata/lrgcd", lrgcd);
- model.makeValue("/root/send/reqdata/mdlcd", mdlcd);
- model.makeValue("/root/send/reqdata/smlcd", smlcd);
- submit("TRMNP04401");
- }
- /*--------------------------------------------------*/
- /*type : function */
- /*access : public */
- /*desc : 수술실 물품 마스터 조회(일괄등록) */
- /*param : */
- /*return : */
- /*--------------------------------------------------*/
- function fBatchSearch() {
- var indexcd, lrgcd, mdlcd, smlcd;
- var refdeptflag = model.getValue("/root/main/cond/refdeptflag");
- var refdept = model.getValue("/root/main/cond/refdept");
- var refflag = model.getValue("/root/main/cond/refflag");
- var refnm = model.getValue("/root/main/cond/refnm");
- var prodcmpynm = model.getValue("/root/main/cond/prodcmpynm");
- var custnm = model.getValue("/root/main/cond/custnm");
- if( refnm == "" && prodcmpynm == "" && custnm == "" && lrgcd == "" && mdlcd == "" && smlcd == "" ) {
- messageBox("검색조건을 입력하지 ", "E007");
- model.setFocus("ipt_goodcd");
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/reqdata/lrgcd", lrgcd);
- model.makeValue("/root/send/reqdata/mdlcd", mdlcd);
- model.makeValue("/root/send/reqdata/smlcd", smlcd);
- submit("TRMNP04401");
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 수술실 물품 부서별 부서 재고 화면 변경 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fChangeDept(flag) {
- /*
- var deptflag = model.getValue("/root/main/cond/refdeptflag");//부서구분
- var nodeCnt = parseInt(getNodesetCount("/root/init/oproomlist"))+1;
- if( deptflag != "R" ) {//수술, 마취
- var scrwidth = ( nodeCnt * 49 ) + 14;
- if( nodeCnt > 25 ) {//수술방이 25개 이상이면 스크롤 바로 인해 크기 조절
- grd_oproomstoclist.attribute("style") = "left:144px; top:50px; width:1050px; height:89px; text-align:right;";
- }else {
- grd_oproomstoclist.attribute("style") = "left:144px; top:65px; width:" + scrwidth + "px; height:72px; text-align:right;";
- }
- var captionlist = "";
- if( nodeCnt != 0 ) {
- if( flag == "2" ) {//부서를 변경했을 때
- for(var i = 0; i <= nodeCnt; i++ ) {
- grd_oproomstoclist.removeColumn(false);;
- }
- }
- for(var i = 0; i <= nodeCnt; i++ ) { //수술방 갯수 만큼 컴럼을 만들고 cation을 만들어 준다.(CCR제외)
- grd_oproomstoclist.addColumn("ref:oproomnostoc" + i + "; type:input;", false);
- if( i == 4 ) {
- grd_oproomstoclist.colWidth(i) = 60;
- }else {
- grd_oproomstoclist.colWidth(i) = 49;
- }
- grd_oproomstoclist.colAttribute(i, "format") = "#.###";
- if( i == 0 ) {
- captionlist = model.getValue("/root/init/oproomlist[" + i + "]/oproomnm");
- }else if( i == 4 ){
- captionlist = captionlist + "^OR총재고";
- }else if( i < 4 ) {
- captionlist = captionlist + "^" + model.getValue("/root/init/oproomlist[" + i + "]/oproomnm");
- }else if( i > 4 ) {
- j = i - 1;
- captionlist = captionlist + "^" + model.getValue("/root/init/oproomlist[" + j + "]/oproomnm");
- }
- }
- grd_oproomstoclist.caption = captionlist;
- grd_oproomstoclist.addRow(false);
- }
- grd_oproomstoclist.deleteColumn(0);
- if( deptflag == "O" ) {//수술
- grd_oproomstoclist.colDisabled(3) = "ture";
- }else {
- for( var j = 0; j < 4; j++ ) {
- grd_oproomstoclist.colDisabled(j) = "ture";
- }
- }
- }else {
- grd_oproomstoclist.attribute("style") = "left:144px; top:65px; width:242px; height:72px; text-align:right;";
- if( nodeCnt != 0 ) {
- for(var i = 0; i <= nodeCnt; i++ ) {
- grd_oproomstoclist.removeColumn(false);;
- }
- for(var i = 1; i <= 4; i++ ) {
- grd_oproomstoclist.addColumn("ref:oproomnostoc" + i + "; type:input;", false);
- grd_oproomstoclist.colWidth(i-1) = 60;
- grd_oproomstoclist.colAttribute(i-1, "format") = "#.###";
- }
- grd_oproomstoclist.caption = "CCR^C-C^C-O^회복실";
- grd_oproomstoclist.addRow(false);
- for( var j = 0; j < 3; j++ ) {
- grd_oproomstoclist.colDisabled(j) = "ture";
- }
- }
- }
- model.refresh();*/
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 수술실 물품 정보 저장 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fSaveGoodInfo() {
- var lrgcd, mdlcd, smlcd, cureflag, delivepriod, deliveyn, useflag, appdd, enddd;
- lrgcd = model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd");
- mdlcd = model.getValue("/root/main/goodinfo/gooddetlinfo/mdlcd");
- smlcd = model.getValue("/root/main/goodinfo/gooddetlinfo/smlcd");
- prcpnm = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodnm");
- goodspec = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodspec");
- goodmodel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodmodel");
- custtel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel");
- cureflag = model.getValue("/root/main/goodinfo/gooddetlinfo/cureflag");
- delivepriod = model.getValue("/root/main/goodinfo/gooddetlinfo/delivepriod");
- deliveyn = model.getValue("/root/main/goodinfo/gooddetlinfo/deliveyn");
- useflag = model.getValue("/root/main/goodinfo/gooddetlinfo/useflag");
- appdd = model.getValue("/root/main/goodinfo/gooddetlinfo/appdd");
- enddd = model.getValue("/root/main/goodinfo/gooddetlinfo/enddd");
- rgstflag = model.getValue("/root/main/goodinfo/gooddetlinfo/rgstflag");
- if( lrgcd == "" ) {
- messageBox("대분류를 선택하지 ", "E007");
- model.setFocus("cmb_lrg");
- return;
- }else if( mdlcd == "" ) {
- messageBox("중분류를 선택하지 ", "E007");
- model.setFocus("cmb_mdl");
- return;
- }else if( prcpnm.length > 200 ) {
- messageBox("물품명은 200자 이하 ", "E008");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( goodspec.length > 50 ) {
- messageBox("규격은 50자 이하 ", "E008");
- model.setFocus("ipt_goodspec");
- return;
- }else if( goodmodel.length > 50 ) {
- messageBox("모델은 50자 이하 ", "E008");
- model.setFocus("ipt_goodmodel");
- return;
- }else if( custtel.length > 13 ) {
- messageBox("업체전화번호는 13자 이하 ", "E008");
- model.setFocus("ipt_custtel");
- return;
- }else if( cureflag == "" ) {
- messageBox("처방구분를 선택하지 ", "E007");
- model.setFocus("rdo_cureflag");
- return;
- }else if( delivepriod == "" ) {
- messageBox("불출시기를 선택하지 ", "E007");
- model.setFocus("rdo_ccrdelivepriod");
- return;
- }else if( deliveyn == "" ) {
- messageBox("불출여부를 선택하지 ", "E007");
- model.setFocus("rdo_deliveyn");
- return;
- }else if( appdd == "" ) {
- messageBox("적용일자를 선택하지 ", "E007");
- model.setFocus("ipt_appdd");
- return;
- }else if( enddd == "" ) {
- messageBox("종료일자를 선택하지 ", "E007");
- model.setFocus("ipt_enddd");
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send/savedata");
- model.copyNode("/root/send/savedata", "/root/main/goodinfo/gooddetlinfo");
- model.makeValue("/root/send/savedata/refdept", model.getValue("/root/main/cond/refdept"));
- if( rgstflag == "E" ) {//단종이면 미사용으로 셋팅
- model.setValue("/root/send/savedata/rgstflag", "U");
- }
- if( submit("TXMNP04401") ) {
- model.removeNodeset("/root/main/goodinfo/gooddetlinfo");
- fSearch();
- }
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 수술실 물품 정보 저장(일괄) */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fSaveBatchGoodInfo() {
- var lrgcd, mdlcd, smlcd, cureflag, delivepriod, deliveyn, useflag, appdd, enddd, goodcd, allsizespecid, goodspec, goodmodel;
- var savelist = "goodcd▦allsizespecid▦lrgcd▦mdlcd▦smlcd▦rgstflag▦ccrgoodnm▦prcpunit▦prcpqty▦ccrcusttel▦deliveunit▦deliveqty▦goodmngt▦implant▦cureflag▦delivepriod▦deliveyn▦useflag▦acmlbaseqty▦ccrdeliveunit▦ccrdeliveqty▦goodinfo▦appdd▦enddd▦prcpinfo▦indexlrg▦indexmdl▦indexsml▦refdept";
- lrgcd = model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd");
- mdlcd = model.getValue("/root/main/goodinfo/gooddetlinfo/mdlcd");
- smlcd = model.getValue("/root/main/goodinfo/gooddetlinfo/smlcd");
- prcpnm = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodnm");
- goodspec = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodspec");
- goodmodel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodmodel");
- custtel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel");
- cureflag = model.getValue("/root/main/goodinfo/gooddetlinfo/cureflag");
- delivepriod = model.getValue("/root/main/goodinfo/gooddetlinfo/delivepriod");
- deliveyn = model.getValue("/root/main/goodinfo/gooddetlinfo/deliveyn");
- useflag = model.getValue("/root/main/goodinfo/gooddetlinfo/useflag");
- appdd = model.getValue("/root/main/goodinfo/gooddetlinfo/appdd");
- enddd = model.getValue("/root/main/goodinfo/gooddetlinfo/enddd");
- rgstflag = model.getValue("/root/main/goodinfo/gooddetlinfo/rgstflag");
- if( rgstflag == "E" ) {//단종이면 미사용으로 셋팅
- model.setValue("/root/send/savedata/rgstflag", "U");
- }
- if( lrgcd == "" ) {
- messageBox("대분류를 선택하지 ", "E007");
- model.setFocus("cmb_lrg");
- return;
- }else if( mdlcd == "" ) {
- messageBox("중분류를 선택하지 ", "E007");
- model.setFocus("cmb_mdl");
- return;
- }else if( prcpnm.length > 200 ) {
- messageBox("물품명은 200자 이하 ", "E008");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( goodspec.length > 50 ) {
- messageBox("규격은 50자 이하 ", "E008");
- model.setFocus("ipt_goodspec");
- return;
- }else if( goodmodel.length > 50 ) {
- messageBox("모델은 50자 이하 ", "E008");
- model.setFocus("ipt_goodmodel");
- return;
- }else if( custtel.length > 13 ) {
- messageBox("업체전화번호는 13자 이하 ", "E008");
- model.setFocus("ipt_custtel");
- return;
- }else if( cureflag == "" ) {
- messageBox("처방구분를 선택하지 ", "E007");
- model.setFocus("rdo_cureflag");
- return;
- }else if( delivepriod == "" ) {
- messageBox("불출시기를 선택하지 ", "E007");
- model.setFocus("rdo_ccrdelivepriod");
- return;
- }else if( deliveyn == "" ) {
- messageBox("불출여부를 선택하지 ", "E007");
- model.setFocus("rdo_deliveyn");
- return;
- }else if( appdd == "" ) {
- messageBox("적용일자를 선택하지 ", "E007");
- model.setFocus("ipt_appdd");
- return;
- }else if( enddd == "" ) {
- messageBox("종료일자를 선택하지 ", "E007");
- model.setFocus("ipt_enddd");
- return;
- }
- model.removenode("/root/send");
- model.makeNode("/root/send/savedata");
- for( var i = 0; i < grd_goodlist.rows; i++ ) {
- if( model.getValue("/root/main/goodlist[" + i + "]/chkflag") == "true" ) {
- if( model.getValue("/root/main/goodlist[" + i + "]/rgstyn") == "N" ) {//등록안된것만 등록
- goodcd = model.getValue("/root/main/goodlist[" + i + "]/goodcd");
- allsizespecid = model.getValue("/root/main/goodlist[" + i + "]/allsizespecid");
- savelist = savelist + "▩" + goodcd
- + "▦" + allsizespecid
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/mdlcd")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/smlcd")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/rgstflag")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/ccrgoodnm")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/prcpunit")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/prcpqty")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/deliveunit")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/deliveqty")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/goodmngt")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/implant")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/cureflag")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/delivepriod")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/deliveyn")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/useflag")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/acmlbaseqty")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/ccrdeliveunit")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/ccrdeliveqty")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/goodinfo")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/appdd")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/enddd")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/prcpinfo")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/indexlrg")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/indexmdl")
- + "▦" + model.getValue("/root/main/goodinfo/gooddetlinfo/indexsml")
- + "▦" + model.getValue("/root/main/cond/refdept");
- }
- }
- }
- alert(model.getValue("/root/main/cond/refdept"));
- model.setValue("/root/send/savedata", savelist);
- if( submit("TXMNP04402") ) {
- model.removeNodeset("/root/main/goodinfo/gooddetlinfo");
- fBatchSearch();
- }
- }
- /* function fSaveGoodInfo(){
- var deptflag = "";
- var opuseyn = "", anstuseyn = "", recovruseyn = "", opuseynstat = "", anstuseynstat = "", recovruseynstat = "";
- var oldopuseyn = "", oldanstuseyn = "", oldrecovruseyn = "";
- var endgood = model.getValue("/root/main/goodinfo/gooddetlinfo/useflag");
- var deptflag1 = model.getValue("/root/temp/deptflag1");
- var deptflagCnt = deptflag1.length;
- var refdeptflag = model.getValue("/root/main/cond/refdeptflag");
- oldopuseyn = model.getValue("/root/main/goodinfo/gooddetlinfo/opuseyn");
- oldanstuseyn = model.getValue("/root/main/goodinfo/gooddetlinfo/anstuseyn");
- oldrecovruseyn = model.getValue("/root/main/goodinfo/gooddetlinfo/recovruseyn");
- //1:수술, 2:마취, 3:회복, 4:수술/마취, 5:수술/회복, 6:마취/회복, 7:수술/마취/회복
- switch(deptflag1) {
- case "1"://수술
- if( refdeptflag == "O" ) {//수술
- deptflag = "1";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "N";
- }else if( refdeptflag == "A" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "R" ) {//수술/회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }
- break;
- case "2"://마취
- if( refdeptflag == "O" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "A" ) {//마취
- deptflag = "2";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "R" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }
- break;
- case "3"://회복
- if( refdeptflag == "O" ) {//수술/회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }else if( refdeptflag == "A" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "R" ) {//회복
- deptflag = "3";
- opuseyn = "N";
- anstuseyn = "N";
- recovruseyn = "Y";
- }
- break;
- case "1 2"://수술, 마취
- if( refdeptflag == "O" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "A" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "R" ) {//회복
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }
- break;
- case "2 1"://마취, 수술
- if( refdeptflag == "O" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "A" ) {//수술/마취
- deptflag = "4";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "R" ) {//전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }
- break;
- case "2 3"://마취, 회복
- if( refdeptflag == "O" ) {//전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "A" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "R" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }
- break;
- case "3 2"://회복, 마취
- if( refdeptflag == "O" ) {//전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "A" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "R" ) {//마취/회복
- deptflag = "6";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }
- break;
- case "1 3"://수술, 회복
- if( refdeptflag == "O" ) {//수술, 회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }else if( refdeptflag == "A" ) {//전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "R" ) {//수술, 회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }
- break;
- case "3 1"://회복, 수술
- if( refdeptflag == "O" ) {//수술, 회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }else if( refdeptflag == "A" ) {//전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- }else if( refdeptflag == "R" ) {//수술, 회복
- deptflag = "5";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "Y";
- }
- break;
- case "1 2 3"://전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- case "1 3 2"://전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- case "2 1 3"://전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- case "2 3 1"://전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- case "3 1 2"://전체
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- case "3 2 1":
- deptflag = "7";
- opuseyn = "Y";
- anstuseyn = "Y";
- recovruseyn = "Y";
- break;
- default :
- if( refdeptflag == "O" ) {//수술, 회복
- deptflag = "1";
- opuseyn = "Y";
- anstuseyn = "N";
- recovruseyn = "N";
- }else if( refdeptflag == "A" ) {//전체
- deptflag = "2";
- opuseyn = "N";
- anstuseyn = "Y";
- recovruseyn = "N";
- }else if( refdeptflag == "R" ) {//수술, 회복
- deptflag = "3";
- opuseyn = "N";
- anstuseyn = "N";
- recovruseyn = "Y";
- }
- break;
- }
- //수술
- if( ( oldopuseyn == "N" )&&( opuseyn == "Y" ) ) {//생성
- opuseynstat = "C";
- }else if( ( oldopuseyn == "Y" )&&( opuseyn == "Y" ) ) {//변경
- opuseynstat = "S";
- }else if( ( oldopuseyn == "Y" )&&( opuseyn == "N" ) ) {//미사용으로 전환
- opuseynstat = "U";
- opuseyn = "U";
- }else if( ( oldopuseyn == "U" )&&( opuseyn == "Y" ) ) {//사용으로 전환
- opuseynstat = "Z";
- }else {//등록안됨
- opuseynstat = "F";
- }
- if( endgood == "U" ){//미사용
- if( refdeptflag == "O" ) {
- opuseyn = "U";
- }else if( refdeptflag == "A" ) {
- anstuseyn = "U";
- }else if( refdeptflag == "R" ) {
- recovruseyn = "U";
- }
- }
- if( refdeptflag != "O") {//수술이 아니면 변경없음
- opuseynstat = "P";
- }
- //마취
- if( ( oldanstuseyn == "N" )&&( anstuseyn == "Y" ) ) {//생성
- anstuseynstat = "C";
- }else if( ( oldanstuseyn == "Y" )&&( anstuseyn == "Y" ) ) {//변경
- anstuseynstat = "S";
- }else if( ( oldanstuseyn == "Y" )&&( anstuseyn == "N" ) ) {//미사용으로 전환
- anstuseynstat = "U";
- anstuseyn = "U";//미사용으로 등록
- }else if( ( oldanstuseyn == "U" )&&( anstuseyn == "Y" ) ) {//사용으로 전환
- anstuseynstat = "Z";
- }else {
- anstuseynstat = "F";
- }
- if( refdeptflag != "A") {//마취가 아니면 변경없음
- anstuseynstat = "P";
- }
- //회복
- if( ( oldrecovruseyn == "N" )&&( recovruseyn == "Y" ) ) {//생성
- recovruseynstat = "C";
- }else if( ( oldrecovruseyn == "Y" )&&( recovruseyn == "Y" ) ) {//변경
- recovruseynstat = "S";
- }else if( ( oldrecovruseyn == "Y" )&&( recovruseyn == "N" ) ) {//미사용으로 전환
- recovruseynstat = "U";
- recovruseyn = "U";
- }else if( ( oldrecovruseyn == "U" )&&( recovruseyn == "Y" ) ) {//사용으로 전환
- recovruseynstat = "Z";
- }else {
- recovruseynstat = "F";
- }
- if( refdeptflag != "R") {//회복가 아니면 변경없음
- recovruseynstat = "P";
- }
- model.makeValue("/root/main/goodinfo/gooddetlinfo/refdeptflag", refdeptflag);
- model.makeValue("/root/main/goodinfo/gooddetlinfo/deptflag", deptflag); //수술:1, 마취:2, 회복:3, 수술/마취:4, 마취/회복:5, 수술/회복:6, 수술/마취/회복:7
- model.makeValue("/root/main/goodinfo/gooddetlinfo/opuseynstat", opuseynstat);
- model.makeValue("/root/main/goodinfo/gooddetlinfo/anstuseynstat", anstuseynstat);
- model.makeValue("/root/main/goodinfo/gooddetlinfo/recovruseynstat", recovruseynstat);
- model.setValue("/root/main/goodinfo/gooddetlinfo/opuseyn", opuseyn);
- model.setValue("/root/main/goodinfo/gooddetlinfo/anstuseyn", anstuseyn);
- model.setValue("/root/main/goodinfo/gooddetlinfo/recovruseyn", recovruseyn);
- var iNode = "/root/main/goodinfo/gooddetlinfo/";
- var cureflag, ccrcusttel, winflag, goodmngt, reuseflag, prcpalias, ccrmdl, goodexist, ccrdeptflag;
- cureflag = model.getValue( iNode + "cureflag");
- winflag = model.getValue( iNode + "winflag");
- reuseflag = model.getValue( iNode + "reuseflag");
- prcpalias = model.getValue( iNode + "prcpalias");
- ccrlrgcd = model.getValue( iNode + "ccrlrgcd");
- ccrmdlcd = model.getValue( iNode + "ccrmdlcd");
- goodexist = model.getValue( iNode + "goodexist");
- if( model.getValue("/root/main/cond/tabflag") != "PRC" ) {
- if( prcpalias == "" ){
- messageBox("처방명을 ", "C001");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( prcpalias.length > 200 ){
- messageBox("처방명은 200자 이하 ", "E008");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( cureflag == "" ) {
- messageBox("처치구분을 ", "C002");
- model.setFocus("cmb_cureflag");
- return;
- }else if( winflag == "" ) {
- messageBox("입고구분을 ", "C002");
- model.setFocus("cmb_winflag");
- return;
- }else if( reuseflag == "" ) {
- messageBox("재사용구분을 ", "C002");
- return;
- }else if( ccrlrgcd == "" ) {
- messageBox("대분류를 ", "C002");
- return;
- }else if( ccrmdlcd == "" ) {
- messageBox("중분류를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag == "" ) ) {//등록안된 물품인데 부서 체크안하면
- messageBox("저장할 부서를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag != "" ) ) {//등록안된 물품인데 조회 부서 체크안하면
- if( refdeptflag == "O" ){
- if( !(( deptflag == "1" )||( deptflag == "4" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("수술실을 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "A" ){
- if( !(( deptflag == "2" )||( deptflag == "4" )||( deptflag == "5" )||( deptflag == "7" )) ) {
- messageBox("마취과를 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "R" ){
- if( !(( deptflag == "3" )||( deptflag == "5" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("회복실을 선택하지 ", "E007");
- return;
- }
- }
- }
- }else {
- var prcpclscd = model.getValue("/root/main/goodinfo/gooddetlinfo/prcpclscd");//처방 구분
- if( ( prcpclscd == "M2" )||( prcpclscd == "A2" )||( prcpclscd == "A4" )||( prcpclscd == "A6" )||( prcpclscd == "I4" ) ) {//재료, 경구, 외용, 주사, 마취약
- if( prcpalias == "" ){
- messageBox("처방명을 ", "C001");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( prcpalias.length > 200 ){
- messageBox("처방명은 200자 이하 ", "E008");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( cureflag == "" ) {
- messageBox("처치구분을 ", "C002");
- model.setFocus("cmb_cureflag");
- return;
- }else if( winflag == "" ) {
- messageBox("입고구분을 ", "C002");
- model.setFocus("cmb_winflag");
- return;
- }else if( reuseflag == "" ) {
- messageBox("재사용구분을 ", "C002");
- return;
- }else if( ccrlrgcd == "" ) {
- messageBox("대분류를 ", "C002");
- return;
- }else if( ccrmdlcd == "" ) {
- messageBox("중분류를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag == "" ) ) {//등록안된 물품인데 부서 체크안하면
- messageBox("저장할 부서를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag != "" ) ) {//등록안된 물품인데 조회 부서 체크안하면
- if( refdeptflag == "O" ){
- if( !(( deptflag == "1" )||( deptflag == "4" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("수술실을 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "A" ){
- if( !(( deptflag == "2" )||( deptflag == "4" )||( deptflag == "5" )||( deptflag == "7" )) ) {
- messageBox("마취과를 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "R" ){
- if( !(( deptflag == "3" )||( deptflag == "5" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("회복실을 선택하지 ", "E007");
- return;
- }else if( cureflag == "" ) {
- messageBox("처치구분을 ", "C002");
- model.setFocus("cmb_cureflag");
- return;
- }
- }
- }
- }else {//처방 탭에서 물품, 약이 아닌 물품들(처치 처방종류)
- if( prcpalias.length > 200 ){
- messageBox("처방명은 200자 이하 ", "E008");
- model.setFocus("ipt_prcpnm");
- return;
- }else if( cureflag == "" ) {
- messageBox("처치구분을 ", "C002");
- model.setFocus("cmb_cureflag");
- return;
- }else if( ccrlrgcd == "" ) {
- messageBox("대분류를 ", "C002");
- return;
- }else if( ccrmdlcd == "" ) {
- messageBox("중분류를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag == "" ) ) {//등록안된 물품인데 부서 체크안하면
- messageBox("저장할 부서를 ", "C002");
- return;
- }else if( ( goodexist == "N" )&&( deptflag != "" ) ) {//등록안된 물품인데 조회 부서 체크안하면
- if( refdeptflag == "O" ){
- if( !(( deptflag == "1" )||( deptflag == "4" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("수술실을 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "A" ){
- if( !(( deptflag == "2" )||( deptflag == "4" )||( deptflag == "5" )||( deptflag == "7" )) ) {
- messageBox("마취과를 선택하지 ", "E007");
- return;
- }
- }else if( refdeptflag == "R" ){
- if( !(( deptflag == "3" )||( deptflag == "5" )||( deptflag == "6" )||( deptflag == "7" )) ) {
- messageBox("회복실을 선택하지 ", "E007");
- return;
- }else if( cureflag == "" ) {
- messageBox("처치구분을 ", "C002");
- model.setFocus("cmb_cureflag");
- return;
- }
- }
- }
- }
- }
- var oproomcd, safestocqty, stocqty, goodcd, allsizespecid, refdeptflag;
- var nodeCnt = parseInt(getNodesetCount("/root/init/oproomlist"))+1;
- var oproomstoclist = "oproomcd▦safestocqty▦stocqty▦goodcd▦allsizespecid▦refdeptflag";
- goodcd = model.getValue("/root/main/goodinfo/gooddetlinfo/goodcd");
- allsizespecid = model.getValue("/root/main/goodinfo/gooddetlinfo/allsizespecid");
- for( var j = 1; j < nodeCnt; j++) {
- oproomcd = model.getValue("/root/init/oproomlist["+j+"]/oproomcd");
- if( j < 4 ) {//OR총재고를 제외하기 위해
- if( refdeptflag == "O" ) {//수술이면 CCR, Clean-Zone, OR(창고) 포함
- safestocqty = model.getValue("/root/temp/oproomstoclist/oproomnostoc"+j);
- stocqty = model.getValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j);
- refdeptflag = "O";//CCR, Clean-Zone, OR(창고)수술실에서만 관리
- oproomstoclist = oproomstoclist + "▩"
- + oproomcd + "▦"
- + safestocqty + "▦"
- + stocqty + "▦"
- + goodcd + "▦"
- + allsizespecid + "▦"
- + refdeptflag;
- }else if( refdeptflag == "A" ) {//마취면
- if( (oldopuseyn == "N")&&(oldrecovruseyn == "N")) {
- safestocqty = model.getValue("/root/temp/oproomstoclist/oproomnostoc"+j);
- stocqty = model.getValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j);
- refdeptflag = "O";//CCR, Clean-Zone, OR(창고)수술실에서만 관리
- oproomstoclist = oproomstoclist + "▩"
- + oproomcd + "▦"
- + safestocqty + "▦"
- + stocqty + "▦"
- + goodcd + "▦"
- + allsizespecid + "▦"
- + refdeptflag;
- }
- }else if( refdeptflag == "R" ) {//회복이면
- if( (oldopuseyn == "N")&&(oldanstuseyn == "N")) {
- safestocqty = model.getValue("/root/temp/oproomstoclist/oproomnostoc"+j);
- stocqty = model.getValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j);
- refdeptflag = "O";//CCR, Clean-Zone, OR(창고)수술실에서만 관리
- oproomstoclist = oproomstoclist + "▩"
- + oproomcd + "▦"
- + safestocqty + "▦"
- + stocqty + "▦"
- + goodcd + "▦"
- + allsizespecid + "▦"
- + refdeptflag;
- }
- }
- }else {
- safestocqty = model.getValue("/root/temp/oproomstoclist/oproomnostoc"+(j+1));
- stocqty = model.getValue("/root/temp/oproomstoclist[2]/oproomnostoc"+(j+1));
- refdeptflag = model.getValue("/root/main/cond/refdeptflag");
- oproomstoclist = oproomstoclist + "▩"
- + oproomcd + "▦"
- + safestocqty + "▦"
- + stocqty + "▦"
- + goodcd + "▦"
- + allsizespecid + "▦"
- + refdeptflag;
- }
- model.setValue("/root/temp/oproomstoclist/oproomnostoc"+j, ""); //수술방 안전재고 instance 초기화
- model.setValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j, "");//수술방 재고 instance 초기화
- }
- var custtel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel");
- if( custtel != "" ) {
- if( custtel.length < 10 ) {
- messageBox("거래처 전화번호를 정확히 입력하세요!", "");
- model.setFocus("ipt_custtel");
- return;
- }
- var custteltemp = custtel.split("-");
- var tellen = custteltemp.length;
- if( tellen > 1 ) {//'-'입력시
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custteltemp[0]+""+custteltemp[1]+""+custteltemp[2]);
- }else {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custteltemp[0]);
- }
- }
- model.copyNode("/root/send/reqdata", "/root/main/goodinfo/gooddetlinfo");
- model.setValue("/root/send/senddata", oproomstoclist);
- if( endgood == "N" ) {
- messageBox("단종된 물품은 저장할 수 ", "I004");
- }else {
- submit("TXMNP04401");
- }
- model.removenode("/root/main/goodinfo/goodstocinfo/refdeptflag");
- model.setValue("/root/main/cond/deptflag", "");
- model.setValue("/root/temp/deptflag1", "");
- model.setValue("/root/temp/deptflag1", "");
- model.resetInstanceNode("/root/main/goodinfo");
- model.setValue("/root/main/cond/ccrlrgcd", "");
- model.setValue("/root/main/cond/ccrmdlcd", "");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04401");//저장 후 재조회
- btn_save.disabled = true;
- }*/
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 수술실 물품 상세 정보 조회 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fDblClick(){
- model.removenode("/root/send");
- model.makeValue("/root/send/reqdata/goodcd", model.getValue("/root/main/goodlist[" + grd_goodlist.row + "]/goodcd"));
- model.makeValue("/root/send/reqdata/allsizespecid", model.getValue("/root/main/goodlist[" + grd_goodlist.row + "]/allsizespecid"));
- model.makeValue("/root/send/reqdata/refdeptflag", model.getValue("/root/main/cond/refdeptflag"));
- model.makeValue("/root/send/reqdata/refdept", model.getValue("/root/main/cond/refdept"));
- submit("TRMNP04402", false);
- //대, 중분류에 따른 콤보 조회
- if( model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd") != "" ) {
- model.resetInstanceNode("/root/temp/mdllist");
- model.resetInstanceNode("/root/temp/smllist");
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/reqdata/tabflag", "CCR");
- model.makeValue("/root/send/reqdata/ccrlrgcd", model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd"));
- submit("TRMNP04409");
- }
- if( model.getValue("/root/main/goodinfo/gooddetlinfo/mdlcd") != "" ) {
- model.resetInstanceNode("/root/temp/smllist");
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/reqdata/tabflag", "CCR");
- model.makeValue("/root/send/reqdata/ccrlrgcd", model.getValue("/root/main/goodinfo/gooddetlinfo/lrgcd"));
- model.makeValue("/root/send/reqdata/ccrmdlcd", model.getValue("/root/main/goodinfo/gooddetlinfo/mdlcd"));
- submit("TRMNP04410");
- }
- model.refresh();
- /*
- var iRow = -1;
- if( idx == 1 ) {//구매 조회일때
- iRow = grd_goodlist.row;
- }else if( idx == 2 ) {//CCR 조회일때
- iRow = grd_goodlist2.row;
- }else if( idx == 3 ) {//처방 조회
- iRow = grd_goodlist3.row;
- }
- if(iRow < 1)
- {
- return;
- }else {
- model.makeValue("/root/send/reqdata/goodcd", model.getValue("/root/main/goodlist"+"["+iRow+"]/goodcd"));
- model.makeValue("/root/send/reqdata/allsizespecid", model.getValue("/root/main/goodlist"+"["+iRow+"]/allsizespecid"));
- model.makeValue("/root/send/reqdata/endgood", model.getValue("/root/main/goodlist"+"["+iRow+"]/endgood"));
- submit("TRMNP04402", false);
- var totalSafeCnt = 0;
- var totaStocCnt = 0;
- var custtel = model.getValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel");
- var tellen = custtel.length;
- var custteltemp = custtel.substring(0, 2);
- //전화번호 '-'로 구분 표시
- if( tellen != 0 ) {//번호가 있을때
- if( custteltemp == "01" ) {//휴대폰
- if( tellen == 11 ) {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,3)+"-"+custtel.substr(3,4)+"-"+custtel.substr(7,4));
- }else {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,3)+"-"+custtel.substr(3,3)+"-"+custtel.substr(6,4));
- }
- }else {
- if( custteltemp == "02" ) {//서울
- if( tellen == 10 ) {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,2)+"-"+custtel.substr(2,4)+"-"+custtel.substr(6,4));
- }else {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,2)+"-"+custtel.substr(2,3)+"-"+custtel.substr(5,4));
- }
- }else {//그 외
- if( tellen == 10 ) {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,3)+"-"+custtel.substr(3,3)+"-"+custtel.substr(6,4));
- }else {
- model.setValue("/root/main/goodinfo/gooddetlinfo/ccrcusttel", custtel.substr(0,3)+"-"+custtel.substr(3,4)+"-"+custtel.substr(7,4));
- }
- }
- }
- }
- //수술:1, 마취:2, 회복:3, 수술/마취:4, 마취/회복:5, 수술/회복:6, 수술/마취/회복:7
- var deptflag = model.getValue("/root/main/goodinfo/gooddetlinfo/deptflag") ;
- switch( deptflag ) {
- case "1":
- model.setValue("/root/temp/deptflag1", "1");
- break;
- case "2":
- model.setValue("/root/temp/deptflag1", "2");
- break;
- case "3":
- model.setValue("/root/temp/deptflag1", "3");
- break;
- case "4":
- model.setValue("/root/temp/deptflag1", "1 2");
- break;
- case "5":
- model.setValue("/root/temp/deptflag1", "2 3");
- break;
- case "6":
- model.setValue("/root/temp/deptflag1", "1 3");
- break;
- case "7":
- model.setValue("/root/temp/deptflag1", "1 2 3");
- break;
- }
- if( model.getValue("/root/main/goodinfo/gooddetlinfo/ccrdeliveyn") == "Y" ) {
- ccrdelivepriod.disabled = "true";
- }else {
- ccrdelivepriod.disabled = "false";
- }
- if( model.getValue("/root/main/goodinfo/gooddetlinfo/ccrlrgcd") != "" ) {
- //대분류 값이 있으면
- //물품 분류를 보여주기 위해 대분류로 중분류 조회 후 중분류값 대입
- model.setValue("/root/main/cond/ccrlrgcd", model.getValue("/root/main/goodinfo/gooddetlinfo/ccrlrgcd"));
- model.resetInstanceNode("/root/temp/mdllist");
- model.resetInstanceNode("/root/temp/smllist");
- var oldtabflag = model.getValue("/root/main/cond/tabflag");
- if( oldtabflag != "CCR" ) {
- model.setValue("/root/main/cond/tabflag", "CCR");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04409");
- model.setValue("/root/main/cond/tabflag", oldtabflag);
- }else {
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04409");
- }
- }
- if( model.getValue("/root/main/goodinfo/gooddetlinfo/ccrmdlcd") != "" ) {
- //중분류 값이 있으면
- //물품 분류를 보여주기 위해 중분류로 소분류 조회 후 소분류값 대입
- model.setValue("/root/main/cond/ccrlrgcd", model.getValue("/root/main/goodinfo/gooddetlinfo/ccrlrgcd"));
- model.setValue("/root/main/cond/ccrmdlcd", model.getValue("/root/main/goodinfo/gooddetlinfo/ccrmdlcd"));
- model.resetInstanceNode("/root/temp/smllist");
- if( model.getValue("/root/main/cond/tabflag") != "CCR" ) {
- model.setValue("/root/main/cond/tabflag", "CCR");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04410");
- model.setValue("/root/main/cond/tabflag", "MIS");
- }else {
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP04410");
- }
- var nodeCnt = getNodesetCount("/root/temp/smllist");
- if( nodeCnt > 0 ) {
- //addComboItem("cmb_ccrsml", "전 체", "", "above" );
- }
- }
- var nodeCnt = getNodesetCount("/root/temp/mdllist");
- if( nodeCnt > 0 ) {
- //addComboItem("cmb_ccrmdl", "전 체", "", "above" );
- }
- //재고 그리드 값 맵핑
- var nodeCnt = parseInt(getNodesetCount("/root/init/oproomlist"))+1;
- for( var j = 1; j <= nodeCnt; j++) {
- var safestocqty = model.getValue("/root/main/goodinfo/oproomstoclisthid["+j+"]/safestocqty");
- var stocqty = model.getValue("/root/main/goodinfo/oproomstoclisthid["+j+"]/stocqty");
- if( ( safestocqty == "" )||( stocqty == "" ) ) {
- model.setValue("/root/temp/oproomstoclist/oproomnostoc"+j, 0);
- model.setValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j, 0);
- }else {
- model.setValue("/root/temp/oproomstoclist/oproomnostoc"+j, model.getValue("/root/main/goodinfo/oproomstoclisthid["+j+"]/safestocqty"));
- model.setValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j, model.getValue("/root/main/goodinfo/oproomstoclisthid["+j+"]/stocqty"));
- }
- if( j < 5 ) {//CCR, CLEANE-ZONE, 창고, 수술방 총합만 합계
- totalSafeCnt += parseFloat(model.getValue("/root/temp/oproomstoclist/oproomnostoc"+j));
- totaStocCnt += parseFloat(model.getValue("/root/temp/oproomstoclist[2]/oproomnostoc"+j));
- }
- }
- //재고 총합계를 CSR총합계에 맵핑
- if( ( isNaN(totalSafeCnt) )||( isNaN(totaStocCnt) ) ) {//숫자가 아니면 리턴
- return;
- }else {
- //수술방에서 포장 단위로 계산하여 보여주기
- //var exchqty = model.getValue("/root/main/goodinfo/gooddetlinfo/exchqty"); //환산수량
- //var allpacksafeqty = parseFloat( totalSafeCnt / parseFloat(exchqty) );
- //var allpackqty = parseFloat( totaStocCnt / parseFloat(exchqty) );
- //model.makeValue("/root/main/goodinfo/ccrstocinfo/allpacksafeqty", totalSafeCnt);
- //model.makeValue("/root/main/goodinfo/ccrstocinfo/allpackqty", totaStocCnt);
- model.makeValue("/root/main/goodinfo/ccrstocinfo/allsafeqty", totalSafeCnt);
- model.makeValue("/root/main/goodinfo/ccrstocinfo/allqty", totaStocCnt);
- }
- }
- btn_save.disabled = false;
- model.refresh();*/
- }
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : 엑셀저장 */
- /* param : */
- /* return : */
- /* --------------------------------------------------*/
- function fSaveExcel(){
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- var tabflag = model.getValue("/root/main/cond/tabflag");
- if (fileName != "")
- {
- if( tabflag == "MIS" ) {
- grd_goodlist.saveExcel(fileName, "SheetName", false, false, "", "", true);
- }else if( tabflag == "CCR" ) {
- grd_goodlist2.saveExcel(fileName, "SheetName", false, false, "", "", true);
- }
- }
- }
|