123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>구매팀 부서 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <rscmdodtlist/>
- <zsdddeptlist/>
- </main>
- <send>
- <instcd/>
- <goodflag/>
- <deptcd/>
- <deptnm/>
- </send>
- <init/>
- <hidden/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRRSC01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/rscmdodtlist"/>
- <submission id="TRRSC01602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/zsdddeptlist"/>
- <submission id="TXRSC01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/rscmdodtlist" resultref="/root/temp"/>
- </model>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- misfGridInit(grd_rscmdodtlist);
- misfGridInit(grd_zsdddeptlist);
-
- model.resetInstanceNode("/root/send");
-
- misfMsterDetailSet(grd_rscmdodtlist,null,"TRRSC01601","Y");
- misfMsterDetailSet(grd_zsdddeptlist,null,"TRRSC01602","N");
-
-
- misfComboComCdList("C0048", cmb_instcd); //기관코드
- misfComboComCdList(cmb_instcd.value + "R0029", cmb_deptflag); //부서구분 공통코드 031R0029 : 본원 부서구분, 032R0029 : 칠곡 부서구분
- misfComboCopyItemSet(cmb_deptflag,"",grd_rscmdodtlist,"deptflag");
-
-
- rszfGoodFlagListByPgmGubn(cmb_goodflag,"1","N");
- cmb_goodflag.refresh();
-
- model.setValue("/root/send/instcd", getUserInfo("dutplceinstcd"));
-
- //화면 권한 설정
- btn_save.disabled = !(checkAuth("X"));
- btn_prt.disabled= !(checkAuth("P"));
-
- // cmb_goodflag.select(0);
- cmb_goodflag.value = 'Y';
-
- //부서 리스트 조회
- fSearchDeptList();
- }
-
- function fSearchDeptList()
- {
- if(submit("TRRSC01602")){
- model.resetInstanceNode(grd_rscmdodtlist.attribute("nodeset"));
- misfComboComCdList(cmb_instcd.value + "R0029", cmb_deptflag); //부서구분 공통코드 031R0029 : 본원 부서구분, 032R0029 : 칠곡 부서구분
- btn_search.dispatch("DOMActivate");
- }
- }
-
- function fGridDbclick()
- {
- var fInstcd = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("instcd"));
- var fDeptcd = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
-
- if( fGridDataCheck( fInstcd, fDeptcd) )
- {
- return;
- }
-
- misfGridIUD(grd_rscmdodtlist, "A");
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptnm")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("depthngnm"));
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("demddeptcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("deptcd"));
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("demddeptnm")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("depthngnm"));
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("instcd")) = grd_zsdddeptlist.valueMatrix(grd_zsdddeptlist.row, grd_zsdddeptlist.colRef("instcd"));
-
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptgr")) = 'A';
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("deptflag")) = 'I';
- grd_rscmdodtlist.valueMatrix(grd_rscmdodtlist.row, grd_rscmdodtlist.colRef("goodflag")) = cmb_goodflag.value;
- }
-
- //Data중복 Check.
- function fGridDataCheck( pInstcd, pDeptcd)
- {
- for( fRow = grd_rscmdodtlist.fixedRows; fRow < grd_rscmdodtlist.rows; fRow++)
- {
- if( grd_rscmdodtlist.valueMatrix(fRow, grd_rscmdodtlist.colRef("deptcd")) == pDeptcd)
- {
- if( grd_rscmdodtlist.valueMatrix(fRow, grd_rscmdodtlist.colRef("instcd")) == pInstcd )
- {
- model.setFocus("grd_rscmdodtlist");
- grd_rscmdodtlist.row = fRow;
- grd_rscmdodtlist.select(fRow,1,fRow,6) = true;
- messageBox("등록된 Data가 있습니다. 확인하시고 다시 입력하세요.", "");
-
- return true;
- }
- }
- }
-
- return false;
- }
-
- function fsearch()
- {
- var updtdata = getGridUpdateData(grd_rscmdodtlist);
- if ( updtdata != "") {
- var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
- submit("TRRSC01601");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">구매팀 부서 등록</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:40px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="cap_instcd" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
- <line id="line13" class="line_4" style="x1:1110px; y1:0px; x2:1110px; y2:34px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1124px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fsearch();
- ]]>
- </script>
- </button>
- <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_s_essential" appearance="minimal" style="left:102px; top:8px; width:188px; height:19px; text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearchDeptList();
- ]]>
- </script>
- <select1 id="cmb_goodflag" ref="/root/send/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:897px; top:9px; width:188px; height:19px; text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <caption id="cap_goodflag" class="search_name" visibility="hidden" style="left:810px; top:10px; width:86px; height:17px; ">물품구분 :</caption>
- <caption id="caption11" class="search_name" style="left:351px; top:9px; width:86px; height:17px; ">부 서 명 :</caption>
- <button id="btn_deptcd" class="icon_search" visibility="visible" style="left:551px; top:9px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ipt_deptcd,"", "deptcd,deptnm") ;
- model.refresh();
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <input id="ipt_deptnm" ref="/root/send/deptnm" class="output_fix" editable="false" appearance="input" style="left:575px; top:8px; width:165px; height:19px; text-align:left; "/>
- <input id="ipt_deptcd" ref="/root/send/deptcd" class="input_s_essential" style="left:441px; top:8px; width:104px; height:19px; text-align:left; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfSearchDept(ipt_deptnm);
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- </group>
- <line id="line2" class="line_1" style="x1:352px; y1:80px; x2:1194px; y2:79px; "/>
- <caption id="caption8" class="tit_2" style="left:5px; top:64px; width:129px; height:14px; ">부서 List</caption>
- <button id="btn_grddel" class="btn2_letter3" style="left:1141px; top:58px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_rscmdodtlist, "D");
- ]]>
- </script>
- </button>
- <datagrid id="grd_rscmdodtlist" nodeset="/root/main/rscmdodtlist" caption="부서코드^부서명^부서그룹^부서구분^집계부서^집계부서^기관코드^물품구분" colsep="^" colwidth="116, 154, 122, 89, 141, 157, 100, 100" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:352px; top:84px; width:842px; height:640px; ">
- <col ref="deptcd" _key="true" style="text-align:left; "/>
- <col ref="deptnm" _key="true" style="text-align:left; "/>
- <col ref="deptgr" type="combo" _key="true">
- <choices>
- <item>
- <label>외래</label>
- <value>A</value>
- </item>
- <item>
- <label>병동</label>
- <value>B</value>
- </item>
- <item>
- <label>수술실</label>
- <value>C</value>
- </item>
- <item>
- <label>마취</label>
- <value>D</value>
- </item>
- <item>
- <label>방사선과</label>
- <value>E</value>
- </item>
- <item>
- <label>진단검사</label>
- <value>F</value>
- </item>
- <item>
- <label>Angio</label>
- <value>G</value>
- </item>
- <item>
- <label>가정간호</label>
- <value>H</value>
- </item>
- </choices>
- </col>
- <col ref="deptflag" type="combo" _key="true">
- <choices>
- <itemset>
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="demddeptcd" type="inputbutton" style="text-align:left; "/>
- <col ref="demddeptnm" _key="true" style="text-align:left; "/>
- <col ref="instcd" visibility="hidden" _key="true"/>
- <col ref="goodflag" visibility="hidden" _key="true"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (grd_rscmdodtlist.col == grd_rscmdodtlist.colRef("demddeptcd"))
- {
- misfOpenPopUpList("02", grd_rscmdodtlist, "", "demddeptcd,demddeptnm");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (grd_rscmdodtlist.col == grd_rscmdodtlist.colRef("demddeptcd")) {
- misfValidationCheck("02", "", "demddeptcd,demddeptnm" );
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_rscmdodtlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_zsdddeptlist" nodeset="/root/main/zsdddeptlist" caption="부서코드^부서명^기관코드" colsep="^" colwidth="86, 168, 100" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="true" style="left:0px; top:84px; width:320px; height:635px; ">
- <col ref="deptcd" style="text-align:left; "/>
- <col ref="depthngnm" style="text-align:left; "/>
- <col ref="instcd" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- fGridDbclick();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_rscmdodtlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:80px; x2:320px; y2:79px; "/>
- <caption id="caption1" class="tit_2" style="left:355px; top:64px; width:129px; height:13px; ">구매팀 부서 List</caption>
- <caption id="caption2" style="left:326px; top:250px; width:23px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption3" style="left:326px; top:265px; width:23px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption4" style="left:326px; top:280px; width:23px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption5" style="left:326px; top:430px; width:24px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption7" style="left:326px; top:445px; width:24px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption9" style="left:326px; top:460px; width:24px; height:20px; font-weight:bold; ">
- <![CDATA[>>]]>
- </caption>
- <caption id="caption10" style="left:705px; top:59px; width:356px; height:23px; font-weight:bold; color:#ff6600; ">※부서 List 를 더블클릭시 구매팀 부서 List에 추가됩니다.</caption>
- <button id="button1" class="btn2_letter4" style="left:1072px; top:58px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
-
- if (fileName != "") {
- grd_rscmdodtlist.saveExcel(fileName, "sheetname:sheet1;colhiddenextend:true;rowhiddenextend:false;exportfalsecols:0,0;col_1:value;");
- }
- ]]>
- </script>
- </button>
- <select1 id="cmb_deptflag" class="combo_default" visibility="hidden" appearance="minimal" style="left:480px; top:190px; width:90px; height:19px; text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- </group>
- <group id="group2" style="left:0px; top:12px; width:1195px; height:27px; ">
- <line id="line16" class="line_2" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
- <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1069px; top:3; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_rscmdodtlist);
- if (updtdata == "")
- {
- messageBox("변경된 데이터가","I004");
- return;
- }
-
- if(!checkKeyColumn("grd_rscmdodtlist")) return;
-
- rtn = messageBox("", "Q002");
- if(rtn != "6" ) return false;
-
- misfSave("TXRSC01601");
- fsearch();
- ]]>
- </script>
- </button>
- <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|