123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <?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>
- <updategood>
- <goodlist>
- <ifid/>
- <sel/>
- <chggubn/>
- <chggubnnm/>
- <drugfromdd/>
- <condd/>
- <goodcd/>
- <dupexpgoodcd/>
- <deptnm/>
- <oldcd/>
- <edicd/>
- <hngnm/>
- <goodengnm/>
- <comnm/>
- <lrgcd/>
- <lrgnm/>
- <mdlcd/>
- <mdlnm/>
- <smlcd/>
- <smlnm/>
- <welfprt/>
- <welfprtnm/>
- <prcpqty/>
- <prcpunit/>
- <cntsqty/>
- <cntsunit/>
- <hospdrguvol/>
- <hospdrguunit/>
- <gnrlspcl/>
- <gnrlspclnm/>
- <keepmthd/>
- <keepmthdnm/>
- <pemtkeepmthd/>
- <todd/>
- <drugtoddhis/>
- <ifstatus/>
- <calcmthdcd/>
- <usernm/>
- <grupsnglflag/>
- <shadelight/>
- </goodlist>
- </updategood>
- </main>
- <send>
- <srchinfo>
- <fromdd/>
- <todd/>
- <goodcd/>
- <chggubn/>
- </srchinfo>
- <drugdata>
- <druginfo/>
- </drugdata>
- </send>
- <init>
- <baseinfo>
- <calcmthdcd>
- <P0133>
- <cdid/>
- <cdnm/>
- </P0133>
- </calcmthdcd>
- </baseinfo>
- </init>
- <hidden>
- <item/>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
-
-
- //2010-03-12 물류갱신정보 속도개선 (MIS interface데이타을 전체가 아닌 구간별일자(일주일)를 가져오도록처리)
- var date = getCurrentDate();
- model.setValue("/root/send/srchinfo/fromdd" , date.toDate().getAddDate(-7).getDateFormat()); //검색구간- 시작일자
- model.setValue("/root/send/srchinfo/todd" , getCurrentDate()); //검색구간- 종료일자
- zbcfGetCodeList( new Array("P0133"), new Array("/root/init/baseinfo/calcmthdcd"));
-
- grd_data.rowHeight(0) = 50;
- grd_data.fixedcellcheckbox(0,1) = true;
-
- model.setValue("/root/send/srchinfo/chggubn","A");
- fGetGoodList();
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- // 현재일자를 적용일자로 설정하여 과거일자로의 변경을 막기 위함 2008-12-10
- //var gv_fromdd = "";
-
-
- function fGetGoodList(){
-
- submit("TRADB62901");
-
- // 현재일자로 적용일자 설정.
- // 이력변경 사항 설정을 위해 drugtoddhis를 현재일자 하루 전으로 설정
- /*
- gv_fromdd = getCurrentDate();
- var initFromdd = gv_fromdd;
- var initToddHis = initFromdd.toDate("YYYYMMDD"); // 문자형을 date 타입으로 변환 *getAddDate가 date타입만을 취급..
- initToddHis = initToddHis.getAddDate(-1).getDateFormat(); // 특정일의 상대일자를 구함
- */
- var lrgcd = "";
- for(var i = grd_data.fixedRows ; i < grd_data.rows; i++){
- var gv_fromdd = model.getValue("/root/main/updategood/goodlist["+i+"]/condd");
- var initFromdd = gv_fromdd;
- var initToddHis = initFromdd.toDate("YYYYMMDD"); // 문자형을 date 타입으로 변환 *getAddDate가 date타입만을 취급..
- initToddHis = initToddHis.getAddDate(-1).getDateFormat(); // 특정일의 상대일자를 구함
- model.setValue("/root/main/updategood/goodlist["+i+"]/drugfromdd", initFromdd);
- model.setValue("/root/main/updategood/goodlist["+i+"]/drugtoddhis",initToddHis);
- lrgcd = model.getValue("/root/main/updategood/goodlist["+i+"]/lrgcd");
- mdlcd = model.getValue("/root/main/updategood/goodlist["+i+"]/mdlcd");
- smlcd = model.getValue("/root/main/updategood/goodlist["+i+"]/smlcd");
-
- // RSCDGIUD와 ADBMDRUG의 대분류,중분류,소분류 코드 형식의 동기화.
- if(isSearchString(lrgcd, 0) != true){
- model.setValue("/root/main/updategood/goodlist["+i+"]/lrgcd", "0"+lrgcd);
- }else if(isSearchString(mdlcd, 0) != true){
- model.setValue("/root/main/updategood/goodlist["+i+"]/mdlcd", "0"+mdlcd);
- }else if(isSearchString(smlcd, 0) != true){
- model.setValue("/root/main/updategood/goodlist["+i+"]/smlcd", "0"+smlcd);
- }
- }
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRADB62901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/updategood"/>
- <submission id="TXADB62901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/drugdata" replace="instance" resultref="/root/hidden"/>
- </model>
- <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/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- </xhtml:head>
- <xhtml:body class="radio_search" pagewidth="1000" pageheight="500" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:50px; width:965px; height:400px; ">
- <line id="line1" class="line_1" style="x1:0px; y1:35px; x2:965px; y2:35px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:16px; width:100px; height:13px; ">물류정보갱신</caption>
- <button id="btn_excsave" class="btn2_letter4" style="left:900px; top:10px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- </button>
- <datagrid id="grd_data" nodeset="/root/main/updategood/goodlist" scroll="auto" caption="인터페이스 id^^구분코드^구분^적용일자^물류적용일자^약품코드^중복제외
대표코드^마지막수정부서^구코드^EDI코드^한글명^영문명^성분명^대분류코드^대분류^중분류코드^중분류^소분류코드^소분류^welfprt^복지부분류^처방수량^처방단위^함량용량^함량단위^병원용량^병원단위^gnrlspcl^일반/전문^keepmthd^실제보관법^허가보관방법^불용일^drugtoddhis^ifstatus^수가계산방법^그룹여부(G:그룹 S:싱글)^마지막수정자" colsep="^" colwidth="51, 24, 56, 30, 100, 100, 100, 100, 100, 100, 80, 150, 165, 150, 35, 60, 35, 130, 35, 150, 40, 200, 35, 35, 30, 30, 33, 30, 40, 70, 30, 70, 200, 100, 100, 100, 138, 56, 100, 100" explorerbar="sortshow" frozencols="9" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:40px; width:965px; height:360px; ">
- <col ref="ifid" visibility="hidden"/>
- <col checkvalue="Y,N" ref="sel" type="checkbox"/>
- <col ref="chggubn" visibility="hidden"/>
- <col ref="chggubnnm" visibility="hidden"/>
- <col ref="drugfromdd" type="inputdate" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
- <col ref="condd" type="inputdate" visibility="hidden" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
- <col ref="goodcd"/>
- <col ref="dupexpgoodcd"/>
- <col ref="deptnm" style="text-align:center; "/>
- <col ref="oldcd"/>
- <col ref="edicd" style="text-align:center; "/>
- <col ref="hngnm"/>
- <col ref="goodengnm"/>
- <col ref="comnm"/>
- <col ref="lrgcd" visibility="hidden"/>
- <col ref="lrgnm" style="text-align:center; "/>
- <col ref="mdlcd" visibility="hidden"/>
- <col ref="mdlnm"/>
- <col ref="smlcd" visibility="hidden"/>
- <col ref="smlnm"/>
- <col ref="welfprt" visibility="hidden"/>
- <col ref="welfprtnm"/>
- <col ref="prcpqty"/>
- <col ref="prcpunit"/>
- <col ref="cntsqty"/>
- <col ref="cntsunit"/>
- <col ref="hospdrguvol"/>
- <col ref="hospdrguunit"/>
- <col ref="gnrlspcl" visibility="hidden"/>
- <col ref="gnrlspclnm" style="text-align:center; "/>
- <col ref="keepmthd" visibility="hidden"/>
- <col ref="keepmthdnm" style="text-align:center; "/>
- <col ref="pemtkeepmthd"/>
- <col ref="todd" visibility="hidden"/>
- <col ref="drugtoddhis" visibility="hidden"/>
- <col ref="ifstatus" visibility="hidden"/>
- <col ref="shadelight" visibility="hidden"/>
- <col disabled="true" ref="calcmthdcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/baseinfo/calcmthdcd/P0133">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="usernm" style="text-align:center; "/>
- <col ref="grupsnglflag"/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
-
- // '체크상태' 변화에 따른 status값 변경
- if((grd_data.row == 0) && (grd_data.col== grd_data.colRef("sel"))){
- for(var i = grd_data.fixedRows; i < grd_data.rows; i++){
- grd_data.addStatus(parseInt(i), "update");
- }
- }else if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("sel"))){
- grd_data.addStatus(parseInt(grd_data.row), "update");
- }
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- // '체크상태' 변화에 따른 status값 변경
- if((grd_data.row == 0) && (grd_data.col== grd_data.colRef("sel"))){
- for(var i = grd_data.fixedRows; i < grd_data.rows; i++){
- grd_data.removeStatus(parseInt(i), "update");
- }
- }else if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("sel"))){
- grd_data.removeStatus(parseInt(grd_data.row), "update");
- }
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // 적용일자 변경시
- /* 적용일자 = 물류적용일자 // 변경가능토록 변경 2009-02-16 김귀남
- if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("drugfromdd"))){
- var drugfromdd = model.getValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd");
- if(gv_fromdd > drugfromdd){
- model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd",gv_fromdd);
- messageBox("과거일자로 적용일자를 변경","E001");
- return;
- }else{
- drugfromdd = drugfromdd.toDate("YYYYMMDD");
- model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugtoddhis", drugfromdd.getAddDate(-1).getDateFormat());
- }
- model.refresh();
- }
- */
- if((grd_data.row != 0) && (grd_data.col== grd_data.colRef("drugfromdd"))){
- var drugfromdd = model.getValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugfromdd");
- drugfromdd = drugfromdd.toDate("YYYYMMDD");
- model.setValue("/root/main/updategood/goodlist["+grd_data.row+"]/drugtoddhis", drugfromdd.getAddDate(-1).getDateFormat());
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_data.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_grddel" class="btn2_letter3" navindex="7" visibility="hidden" style="left:840px; top:10px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_data.addstatus(grd_data.row,"delete");
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:450px; width:965px; height:30px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:965px; y2:0px; "/>
- <button id="btn_insert" class="btn4_letter2" style="left:848px; top:8px; width:56px; height:22px; ">
- <caption>등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var chk = messageBox("물류정보를 갱신", "S001");
- var cnt = 0;
- if(chk == 6){
-
- for(var i = grd_data.fixedRows; i < grd_data.rows; i++){ // 체크박스 선택 유무 판단
- if(model.getValue("/root/main/updategood/goodlist["+i+"]/sel") == 'Y') {
- //2008-12-10 물류데이타 삭제 상태 추가
- model.setValue("/root/main/updategood/goodlist["+i+"]/ifstatus","S"); //"S" 등록
- grd_data.addStatus(i,"update");
- cnt ++;
- }
- }
-
- if(cnt != 0){
- var updateData = grd_data.getUpdateData("update");
- model.setValue("/root/send/drugdata/druginfo", updateData);
- submit("TXADB62901");
-
- fGetGoodList();
- }else messageBox("선택된 사항이","I004");
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_close" class="btn4_letter2" style="left:909px; top:7px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn4_letter2" style="left:5px; top:8px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var chk = messageBox("정말 ", "Q001");
- var cnt = 0;
- if(chk == 6){
-
- for(var i = grd_data.fixedRows; i < grd_data.rows; i++){ // 체크박스 선택 유무 판단
- if(model.getValue("/root/main/updategood/goodlist["+i+"]/sel") == 'Y') {
- //2008-12-10 물류데이타 삭제 상태 추가
- model.setValue("/root/main/updategood/goodlist["+i+"]/ifstatus","D"); //"D"삭제
- grd_data.addStatus(i,"update");
- cnt ++;
- }
- }
-
- if(cnt != 0){
- var updateData = grd_data.getUpdateData("update");
- model.setValue("/root/send/drugdata/druginfo", updateData);
- submit("TXADB62901");
-
- fGetGoodList();
- }else messageBox("선택된 사항이","I004");
- }
-
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption5" style="left:265px; top:5px; width:580px; height:25px; font-weight:bold; color:#ff0000; ">* 등록하면 임시저장 상태이므로 약품정보관리 화면에서 개별약품의 확정저장을 반드시 하십시요.</caption>
- </group>
- <group id="group1" style="left:0px; top:10px; width:965px; height:40px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:965px; height:40px; "/>
- <caption id="caption2" class="search_name" style="left:5px; top:10px; width:95px; height:17px; ">검색구간 :</caption>
- <input id="ipt_fromdd" ref="/root/send/srchinfo/fromdd" class="input_search" inputtype="date" style="left:95px; top:10px; width:100px; height:19px; "/>
- <input id="ipt_todd" ref="/root/send/srchinfo/todd" class="input_search" inputtype="date" style="left:200px; top:10px; width:100px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:315px; top:10px; width:90px; height:17px; ">약품코드 :</caption>
- <input id="ipt_goodcd" ref="/root/send/srchinfo/goodcd" class="input_search" style="left:405px; top:10px; width:100px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_sea","DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption4" class="search_name" visibility="hidden" style="left:525px; top:12px; width:95px; height:17px; ">구 분 1 :</caption>
- <select1 id="rdo_chggubn" ref="/root/send/srchinfo/chggubn" visibility="hidden" appearance="full" cols="3" rows="1" overflow="visible" style="left:615px; top:13px; width:140px; height:16px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value>A</value>
- </item>
- <item>
- <label>신규</label>
- <value>I</value>
- </item>
- <item>
- <label>변경</label>
- <value>U</value>
- </item>
- </choices>
- </select1>
- <button id="btn_sea" class="btn1_letter2" style="left:895px; top:10px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fromdd = model.getValue("/root/send/srchinfo/fromdd");
- var todd = model.getValue("/root/send/srchinfo/todd");
- if(fromdd != "" || todd != ""){
- if(fromdd == ""){
- messageBox("검색구간을 입력하지","E007");
- model.setFocus("ipt_fromdd");
- return;
- }else if(todd == ""){
- messageBox("검색구간을 입력하지","E007");
- model.setFocus("ipt_todd");
- return;
- }
- }
- fGetGoodList();
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|