123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>미등록물질 청구 부서 조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <condition>
- <fromdd/>
- <todd/>
- </condition>
- <goodlist>
- <reqdeptcd/>
- <reqdeptnm/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- <prodcmpynm/>
- <maincustlastsuplplcenm/>
- </goodlist>
- </main>
- <send/>
- <init/>
- <hidden>
- </hidden>
- <temp>
- </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="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <!--script type="javascript" src="../../../mis/purcbaseweb/js/SMRSC05302.js"/-->
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fOpenForm();
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
-
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm() {
- //model.removenode("/root/main/goodlist");
- //model.removenode("/root/main/deptlist");
- //model.refresh();
-
- misfGridInit(grd_goodlist);
- model.setValue("/root/main/condition/fromdd" , getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat("YYYYMMDD") ); //기간 설정 //getCurrentDate() //.substr(0,6)); //.toDate().getAddDate(-1, "D").getDateFormat("YYYYMMDD")
- model.setValue("/root/main/condition/todd" , getCurrentDate() ); //기간 설정 //.substr(0,6));
- model.refresh();
- //fGetGoodList();//코드 목록 조회
-
- // if(model.getValue("/root/main/goodlist[1]/matrcd") != "") {
- // grd_goodlist.isSelected(1) = true;
- // fGetGoodInfo(1);
- // }else {
- // fCopyInstance();
- // }
- }
- //========================================================================================
- //인스턴스 Copy 함수
- //========================================================================================
- function fCopyInstance() {
- //----model.copyNode("/root/hidden/goodinfo", "/root/main/goodinfo");
-
- model.refresh();
- }
- //========================================================================================
- //코드 목록 조회 함수
- //========================================================================================
- function fGetGoodList() {
- misfGridInit(grd_goodlist);
- //model.resetInstanceNode("/root/main/goodinfo");//조회시 기존 데이터 삭제
-
- model.copyNode("/root/send", "/root/main/condition");
- submit("TRRSM00601");
- model.refresh();
- }
-
- //========================================================================================
- //목록 -> 상세내역
- //========================================================================================
- function fGetGoodInfo(pRow) {
- if ( pRow > 0 ) {
-
- model.copyNode("/root/main/goodinfo", "/root/main/goodlist[" + pRow + "]");
- //model.refresh();
-
- ipt_matrnm.refresh();
- opt_goodcd.refresh();
- opt_goodnm.refresh();
- opt_goodspec.refresh();
- ipt_prodcmpycd.refresh();
- opt_prodcmpynm.refresh();
- ipt_maincustlastsuplplce.refresh();
- opt_maincustlastsuplplcenm.refresh();
- ipt_frgstdd.refresh();
- ta_cmt.refresh();
-
-
- }
- }
-
- //========================================================================================
- //상세내역 -> 목록
- //========================================================================================
- function fPutGoodInfo() {
- if ( true ) {
-
- var iRow = grd_goodlist.findRow(opt_goodcd.value, 1, grd_goodlist.colRef("goodcd"), true, true);
-
- //alert(iRow);
-
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/matrnm", ipt_matrnm.value.getTrim());
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/prodcmpycd", ipt_prodcmpycd.value.getTrim());
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/prodcmpynm", opt_prodcmpynm.value);
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/maincustlastsuplplce", ipt_maincustlastsuplplce.value.getTrim());
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/maincustlastsuplplcenm", opt_maincustlastsuplplcenm.value);
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/frgstdd", ipt_frgstdd.value);
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/cmt", ta_cmt.value);
-
- //model.refresh();
- grd_goodlist.refresh();
- }
- }
- //========================================================================================
- //신규 버턴 클릭시 인스턴스 초기화
- //========================================================================================
- function fSetMatrInfo() {
- ipt_matrcd.disabled = false;
- // 아래 두줄로 변경
- //model.resetInstanceNode("/root/main/goodinfo");
- model.resetInstanceNode("/root/main/goodinfo");
- //model.resetInstanceNode("/root/main/goodinfo/deptlist");
- misfGridInit(grd_deptlist);
-
- //return;
-
- model.setFocus("ipt_matrcd");
- model.setValue("/root/main/goodinfo/status", "i");
- model.setValue("/root/main/goodinfo/msdsflag", "Y");
- // 서식에서 징수의무자 상호(법인명)으로 쓰임. 기본값으로 경북대학교병원장 셋팅.
- //model.setValue("/root/main/goodinfo/prntnm1" , "경북대학교병원장");
- fCopyInstance();
- }
-
- //========================================================================================
- // 저장버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveBtn() {
- var iCheckCount = 0;
- for(var i = 1; i < grd_goodlist.rows; i++) {
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("checkflag")) == "Y") {
- iCheckCount = 1;
- break;
- }
- }
- if(iCheckCount == 0) {
- messageBox("선택된 물품이 없습니다. 먼저 코드 등록할 물품을 선택하십시요. ", "E999", "");
- return false;
- }
-
-
- if(opt_goodcd.value != "") {
- fPutGoodInfo();
- }
-
-
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
-
-
- //model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/detail");
- //model.copyNode("/root/send", "/root/main/goodinfo");
-
- model.makeValue("/root/send/goodlist", grd_goodlist.getUpdateData());
-
- //return;
-
- if(submit("TXRSM00501")) {
- btn_search.dispatch("DOMActivate");
- //fGetGoodList();//코드 목록 재조회
- //model.copyNode("/root/send", "/root/main/goodinfo");
- //submit("TRRSM00102"); //상세내역 및 조사표 재조회
- //model.setValue("/root/main/goodinfo/status", "-");
- //grd_deptlist.clearStatus();
- //--model.makeNode("/root/hidden/goodinfo");
- //model.makeNode("/root/hidden/goodinfo");
- //fCopyInstance();
-
- //ipt_matrcd.disabled = true;
- }
- }
-
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- function fIsValidForSave() {
- //필수 입력 항목 체크(공통 ftHelper.js)
- //if(!isRequiredControls("ipt_matrcd","ipt_matrnm")) { //,"ipt_prodcmpycd"
- // return false;
- //}
-
- //var sStatus = model.getValue("/root/main/goodinfo/status");
- //var sNewData = fGetNodeText("/root/main/goodinfo");
- //var sOldData = fGetNodeText("/root/hidden/goodinfo");
-
- for(var i = 1; i < grd_goodlist.rows; i++) {
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("checkflag")) == "N") continue;
-
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("matrnm")) == "" ){
- messageBox("물품코드 " + grd_goodlist.valueMatrix(i, grd_goodlist.colRef("goodcd")) + " 의 물질명이 등록되지 않았습니다. ", "E999", "");
- return false;
- }
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("prodcmpycd")) == "" ){
- messageBox("물품코드 " + grd_goodlist.valueMatrix(i, grd_goodlist.colRef("goodcd")) + " 의 제조회사가 등록되지 않았습니다. ", "E999", "");
- return false;
- }
- }
-
- return true;
-
-
-
-
-
-
- /*
- //상세내역에 변경된 정보가 있는지 확인
- if(sNewData != sOldData && sStatus == "-") { // 데이터 수정일 경우
- model.setValue("/root/main/goodinfo/status","u");
- return true;
- } else if(sNewData == sOldData && sStatus == "-" ) { //변경된 값이 없을경우
- //messageBox("변경된 정보가 ", "I004");
- //return false;
- return true;
- }else if(sStatus == "i") { //데이터 입력일 경우
- return true;
- }else if(sStatus = "d") { //데이터 삭제일 경우
- return true;
- }
- */
- }
-
- //========================================================================================
- //엑셀입력(excel file을 그리드에 입력)
- //========================================================================================
- function fInputExcel(pGrid) {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != "") {
- pGrid.loadExcel(fileName, 1, true);
- pGrid.deleteRow(1);
- pGrid.refresh();
- }
- }
-
- //========================================================================================
- //동일한 Depth의 인스턴스의 값을 스트링형으로 변환
- //========================================================================================
- function fGetNodeText(pNode) {
- var trgNdoe = instance1.selectSingleNode(pNode);
- var trgNdoeList = trgNdoe.childNodes;
- var childNode;
- var allText = "";
- while( childNode = trgNdoeList.nextNode() ) {
-
- allText += childNode.text;
- }
- return allText;
- }
-
- function fOpenPopupDeptHelp(pControl, pInstance)
- {
- misfOpenPopUpList("02", pControl, "", pInstance);
- model.refresh();
- }
-
-
- ]]>
- </script>
- <submission id="TRRSM00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/goodlist"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1193;1,1406;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:331px; height:14px; ">미등록물질 청구 부서 조회</caption>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption7" class="search_name" style="left:71px; top:9px; width:79px; height:17px; ">청구일자</caption>
- <line id="line5" class="line_4" style="x1:380px; y1:6px; x2:380px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="4" style="left:403px; top:7px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetGoodList();
- ]]>
- </script>
- </button>
- <caption id="caption1" style="left:247px; top:11px; width:11px; height:15px; ">~</caption>
- <input id="ipt_fromdd" ref="/root/main/condition/fromdd" class="input_default" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:154px; top:8px; width:91px; height:19px; text-align:center; "/>
- <input id="ipt_todd" ref="/root/main/condition/todd" class="input_default" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:261px; top:8px; width:91px; height:19px; text-align:center; "/>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1193; y2:75px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:60px; width:245px; height:14px; ">부서별 미등록된 물류 MSDS물품 목록</caption>
- <datagrid id="grd_goodlist" nodeset="/root/main/goodlist" caption="부서코드^청구부서명^물품코드^물품명^규격^제조회사^주거래처" colsep="^" colwidth="79, 202, 77, 313, 181, 139, 138" explorerbar="sortshow" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="16" rowsep="|" navindex="5" style="left:0px; top:80px; width:1193px; height:600px; ">
- <col ref="reqdeptcd" style="text-align:center; vertical-align:middle; "/>
- <col ref="reqdeptnm" style="vertical-align:middle; "/>
- <col class="text_center" ref="goodcd" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="prodcmpynm"/>
- <col ref="maincustlastsuplplcenm"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_goodlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption3" style="left:5px; top:685px; width:1065px; height:20px; color:#ff0000; ">※ 1. 소모품 청구건 만을 대상으로 합니다.</caption>
- <button id="btn_excel" class="btn2_letter4" style="left:1129px; top:55px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀출력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //radfSaveExcel(ipt_detailist);
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- grd_goodlist.saveExcel(fileName,"sheetname:savetype");
- ]]>
- </script>
- </button>
- <caption id="caption2" style="left:20px; top:705px; width:1064px; height:20px; color:#ff0000; ">2. 물류 물품마스터에서 물품코드의 제조회사를 변경하였을 경우, 해당 물품코드가 화학물질코드로 기등록된 것이면 제조회사와 무관하게 위의 목록 상에는 나타나지 않음을 양지하시기 바랍니다.</caption>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
- <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|