123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>
- <druggooddelivereqinfo>
- <druggooddelivereqlist>
- </druggooddelivereqlist>
- </druggooddelivereqinfo>
- <druggooddelivereqdetailinfo>
- <druggooddelivereqdetailist/>
- <druggooddelivereqcustinfo>
- <druggoodreqcustlist/>
- </druggooddelivereqcustinfo>
- </druggooddelivereqdetailinfo>
- </main>
- <cond>
- <srchfromdd/>
- <srchtodd/>
- <maincustlastsuplplce/>
- <srchflag/>
- <delivedeptcd/>
- </cond>
- <send>
- <reqdata/>
- <savedata/>
- </send>
- <init>
- </init>
- <hidden>
- </hidden>
- <temp>
- <hidden/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.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/userdeptinfoweb/js/ZSU001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.removeNodeset(grd_druggoodreqlist.nodeset);
- model.removeNodeset(grd_druggoodreqdetailist.nodeset);
-
-
- var bfdd = ((getCurrentDate()).toDate()).getAddDate(-7, "D");
- model.setValue("/root/cond/srchfromdd",bfdd.getDateFormat());
- model.setValue("/root/cond/srchtodd" ,getCurrentDate());
- // misfComboComCdList("030M0010",cmb_deliveflag);
- // addComboItem( "cmb_maincustlastsuplplce", "전체", "", "above" );
-
- if(submit("TRRSO10001")){
-
- }
-
- model.refresh();
- ]]>
- </script>
- <submission id="TRRSO10001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/druggooddelivereqinfo"/>
- <submission id="TRRSO10002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/druggooddelivereqdetailinfo"/>
- </model>
- <script type="javascript">
- <![CDATA[
- /**
- * @ver : 2010-10-22
- * @desc : 약품불출요구사항 그리드 더블클릭시 상세정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrugReqDetailSrch(){
- var sRow = grd_druggoodreqlist.row - grd_druggoodreqlist.fixedRows + 1
- if(grd_druggoodreqlist.col != grd_druggoodreqlist.colRef("deliveflag")){
- var trantretdd = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("trantretdd"));
- if(trantretdd==""){
- var SendReqdd = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("reqdd"));
- var SendReqdeptcd = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("reqdeptcd"));
- var SendReqno = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("reqno"));
- var SrchReqFlag = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("srchreqflag"));
- var TrantretDD = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("trantretdd"));
- var DeliveDD = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("delivedd"));
- var DeliveNO = grd_druggoodreqlist.valueMatrix(sRow,grd_druggoodreqlist.colRef("deliveno"));
-
- var SendCustcd = model.getValue("/root/cond/maincustlastsuplplce");
-
- model.makeValue("/root/send/reqdata/reqdd" ,SendReqdd);
- model.makeValue("/root/send/reqdata/reqdeptcd" ,SendReqdeptcd);
- model.makeValue("/root/send/reqdata/reqno" ,SendReqno);
- model.makeValue("/root/send/reqdata/custcd" ,SendCustcd);
- model.makeValue("/root/send/reqdata/srchreqflag",SrchReqFlag);
- model.makeValue("/root/send/reqdata/trantretdd" ,TrantretDD);
- model.makeValue("/root/send/reqdata/delivedd" ,DeliveDD);
- model.makeValue("/root/send/reqdata/deliveno" ,DeliveNO);
- //일반지원부서에서 청구한 약품들은 청구부서를 불출부서로 셋팅하기 위한 flag
- model.makeValue("/root/send/reqdata/reqflag" ,model.getValue("/root/cond/reqflag"));
- if(submit("TRRSO10002")){
- addComboItem( "cmb_maincustlastsuplplce", "전체", "", "above" );
- model.removeNodeset("/root/send/reqdata");
-
- grd_druggoodreqdetailist.col =grd_druggoodreqdetailist.colRef("delivepackqty");
- model.setFocus("grd_druggoodreqdetailist");
- grd_druggoodreqdetailist.editCell();
- }
- }else if(trantretdd!=""){
- messageBox("이미 이송완료된 건","I009");
- return;
- }
- }
-
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="800" pageheight="700">
- <datagrid id="grd_druggoodreqlist" nodeset="/root/main/druggooddelivereqinfo/druggooddelivereqlist" class="datagrid2" caption="불출요구창고^불출요구창고^요구일자^순번^불출창고^건수^불출여부^불출일자^불출순번^이송일자^srchreqflag" colsep="^" colwidth="100, 18, 101, 42, 95, 44, 119, 91, 57, 95, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:4px; top:86px; width:785px; height:159px; ">
- <col ref="reqdeptnm" style="text-align:center; "/>
- <col ref="reqdeptcd" visibility="hidden" style="text-align:center; "/>
- <col ref="reqdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqno" style="text-align:center; "/>
- <col ref="delivedeptcd" style="text-align:center; "/>
- <col ref="goodcnt" style="text-align:center; "/>
- <col ref="deliveflag" type="combo" visibility="hidden" style="text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/cmb_deliveflag/comcodelist">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="delivedd" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="deliveno" visibility="hidden" style="text-align:center; "/>
- <col ref="trantretdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="srchreqflag" visibility="hidden" style="text-align:center; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(!isDataCell())return;
- fDrugReqDetailSrch();
- ]]>
- </script>
- </datagrid>
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:157px; height:14px; ">마약이송청구</caption>
- <line id="line2" class="line_1" style="x1:4px; y1:81px; x2:789px; y2:81px; "/>
- <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:4px; top:20px; width:785px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption1" class="tit_2" style="left:4px; top:66px; width:135px; height:14px; ">마약이송청구현황</caption>
- <line id="line13" class="line_4" style="x1:716px; y1:30px; x2:716px; y2:52px; "/>
- <button id="bnt_srch" class="btn1_letter2" style="left:725px; top:30px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(submit("TRRSO10001")){
-
- }
- ]]>
- </script>
- </button>
- <caption id="cap_dd" class="search_name" style="left:15px; top:30px; width:99px; height:17px; ">요구일자 :</caption>
- <caption id="caption23" style="left:213px; top:30px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
- <input id="ipt_purcdmndtodd" ref="/root/cond/srchtodd" class="input_s_fix" inputtype="date" style="left:228px; top:30px; width:100px; height:19px; "/>
- <input id="ipt_purcdmndfrdd" ref="/root/cond/srchfromdd" class="input_s_fix" inputtype="date" style="left:110px; top:30px; width:100px; height:19px; "/>
- <datagrid id="grd_druggoodreqdetailist" nodeset="/root/main/druggooddelivereqdetailinfo/druggooddelivereqdetailist" class="datagrid2" caption="약품명(영문)^거래처^거래처코드^포장규격^발주단위^환산량^요구량^불출량^이송량^현재고^goodcd^reqdeptcd^reqdd^reqno^reqseqno^goodunitcost^reqfla^requnit^reqpackcnt^goodpurccost^reqflag^reqqty^reqpackfla^deliveqty" colsep="^" colwidth="220, 102, 24, 67, 65, 44, 55, 51, 63, 58, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:5px; top:270px; width:785px; height:380px; ">
- <col ref="goodengnm" type="output" style="text-align:left; "/>
- <col ref="maincustlastsuplplcenm" style="text-align:center; "/>
- <col ref="maincustlastsuplplce" visibility="hidden"/>
- <col ref="packspec" style="text-align:center; "/>
- <col ref="reqpackunit" style="text-align:center; "/>
- <col ref="reqpackperunitqty" format="#,###.##" style="text-align:right; "/>
- <col ref="reqpackqty" format="#,###.##" style="text-align:right; "/>
- <col ref="delivedeptqty" visibility="hidden" format="#,###.##" style="text-align:right; "/>
- <col ref="delivepackqty" type="input" format="#,###.##" style="text-align:right; "/>
- <col ref="stocqty" visibility="hidden" format="#,###.##" style="text-align:right; "/>
- <col ref="goodcd" visibility="hidden" style="text-align:center; "/>
- <col ref="reqdeptcd" visibility="hidden" style="text-align:center; "/>
- <col ref="reqdd" visibility="hidden" style="text-align:center; "/>
- <col ref="reqno" visibility="hidden" style="text-align:center; "/>
- <col ref="reqseqno" visibility="hidden" style="text-align:center; "/>
- <col ref="goodunitcost" visibility="hidden" style="text-align:center; "/>
- <col ref="reqfla" visibility="hidden" style="text-align:center; "/>
- <col ref="requnit" visibility="hidden" style="text-align:center; "/>
- <col ref="reqpackcnt" visibility="hidden" style="text-align:center; "/>
- <col ref="goodpurccost" visibility="hidden" style="text-align:center; "/>
- <col ref="reqflag" visibility="hidden" style="text-align:center; "/>
- <col ref="reqqty" visibility="hidden" format="#,###.##" style="text-align:right; "/>
- <col ref="reqpackfla" visibility="hidden" style="text-align:right; "/>
- <col ref="deliveqty" visibility="hidden" style="text-align:right; "/>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
-
-
- if(grd_druggoodreqdetailist.col == grd_druggoodreqdetailist.colRef("delivepackqty"))
- {
- var reqpackperunitqty = parseFloat(grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("reqpackperunitqty")));
- var delivepackqty = parseFloat(grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("delivepackqty")));
- var goodunitcost = parseFloat(grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("goodunitcost")));
- var goodpurccost = parseFloat(grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("goodpurccost")));
- var deliveqty;
- grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("deliveqty")) = delivepackqty*reqpackperunitqty;
- deliveqty= parseFloat(grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("deliveqty")));
-
- grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("reqfla")) = deliveqty*goodunitcost;
- grd_druggoodreqdetailist.valueMatrix(grd_druggoodreqdetailist.row,grd_druggoodreqdetailist.colRef("reqpackfla")) = delivepackqty*goodpurccost;
-
- if(grd_druggoodreqdetailist.row < grd_druggoodreqdetailist.rows - grd_druggoodreqdetailist.fixedRows)
- {
- grd_druggoodreqdetailist.row = grd_druggoodreqdetailist.row + 1;
- grd_druggoodreqdetailist.select(grd_druggoodreqdetailist.row, grd_druggoodreqdetailist.colRef("delivepackqty")) = true;
- }
- }
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption3" class="tit_2" style="left:5px; top:250px; width:165px; height:14px; ">마약이송청구상세현황</caption>
- <line id="line1" class="line_1" style="x1:5px; y1:265px; x2:790px; y2:265px; "/>
- <caption id="caption4" class="search_name" visibility="hidden" style="left:410px; top:30px; width:125px; height:17px; ">거래처 조건조회:</caption>
- <select1 id="cmb_maincustlastsuplplce" ref="/root/cond/maincustlastsuplplce" class="input_essential" visibility="hidden" appearance="minimal" style="left:540px; top:30px; width:170px; height:19px; text-align:center; ">
- <choices>
- <itemset nodeset="/root/main/druggooddelivereqdetailinfo/druggooddelivereqcustinfo/druggoodreqcustlist">
- <label ref="custnm"/>
- <value ref="custcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fDrugReqDetailSrch();
- ]]>
- </script>
- </select1>
- <select id="checkbox1" ref="/root/cond/srchflag" visibility="hidden" overflow="visible" appearance="full" style="left:335px; top:29px; width:70px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>불출일자</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var SrchFlag = model.getValue("/root/cond/srchflag");
- if(SrchFlag=="Y"){
- cap_dd.value="불출일자"
- }else{
- cap_dd.value="요구일자"
- }
- cap_dd.refresh();
- ]]>
- </script>
- </select>
- <button id="btn_save" class="btn4_letter2" style="left:734px; top:660px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:675px; top:660px; width:56px; height:22px; ">
- <caption>선택</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var nodelist = instance1.selectNodes(grd_druggoodreqdetailist.nodeset);
-
- var rCVS = getNodeListCSV(nodelist);
-
- for(var i =1;i <=nodelist.length;i++){
- var delivepackqty = grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("delivepackqty"));
- if(delivepackqty==""){
- messageBox("이송량을","C001");
- model.setFocus("grd_druggoodreqdetailist");
- grd_druggoodreqdetailist.col =grd_druggoodreqdetailist.colRef("delivepackqty");
- grd_druggoodreqdetailist.editCell();
- return;
- }
- }
-
-
- if ( checkOpener() ) {
- opener.javascript.fGetDrugGoodReqInfo(rCVS);
- } else {
- var rtn = messageBox("상위화면을 찾을 수", "E001");
- }
- model.close();
-
-
-
- ]]>
- </script>
- </button>
- <button id="btn_listcopy" class="btn2_letter8" style="left:681px; top:245px; width:108px; height:19px; ">
- <caption>
- <![CDATA[요구량 -> 이송량]]>
- </caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for(var i =grd_druggoodreqdetailist.fixedRows;i <grd_druggoodreqdetailist.rows;i++){
- var reqpackqty = grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("reqpackqty"));
- var reqqty = grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("reqqty"));
-
- var goodunitcost = parseFloat(grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("goodunitcost")));
- var goodpurccost = parseFloat(grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("goodpurccost")));
- grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("delivepackqty"))=reqpackqty;
- grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("deliveqty"))=reqqty;
- var delivepackqty = parseFloat(grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("delivepackqty")));
- var deliveqty = parseFloat(grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("deliveqty")));
- grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("reqfla"))= deliveqty*goodunitcost;
- grd_druggoodreqdetailist.valueMatrix(i,grd_druggoodreqdetailist.colRef("reqpackfla"))=delivepackqty*goodpurccost;
-
- }
- grd_druggoodreqdetailist.col =grd_druggoodreqdetailist.colRef("delivepackqty");
- model.setFocus("grd_druggoodreqdetailist");
- grd_druggoodreqdetailist.editCell();
- ]]>
- </script>
- </button>
- <button id="btn_prnt" class="btn6_letter2" visibility="hidden" style="left:220px; top:660px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removeNodeset("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist");
- model.removeNodeset("/root/prtinfo");
- model.makeNode("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist");
- model.makeNode("/root/prtinfo/baseinfo");
- model.makeValue("/root/prtinfo/baseinfo/dutplceinstnm" ,getUserInfo("dutplceinstnm"));
- model.makeValue("/root/prtinfo/baseinfo/dutplcenm" ,getUserInfo("dutplcenm"));
- model.makeValue("/root/prtinfo/baseinfo/usernm" ,getUserInfo("usernm"));
- var paramreqflag = opener.javascript.getParameter("reqflag");
- model.makeValue("/root/prtinfo/baseinfo/paramreqflag" ,paramreqflag);
- copyNodesetType("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist","/root/main/druggoodreqdetailinfo/druggoodreqdetailist","replace");
- exeReportPreview("RPRSR10404","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
- ]]>
- </script>
- </button>
- <button id="button2" class="btn6_letter4" visibility="hidden" style="left:279px; top:660px; width:80px; height:22px; ">
- <caption>미리보기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removeNodeset("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist");
- model.removeNodeset("/root/prtinfo");
- model.makeNode("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist");
- model.makeNode("/root/prtinfo/baseinfo");
- model.makeValue("/root/prtinfo/baseinfo/dutplceinstnm" ,getUserInfo("dutplceinstnm"));
- model.makeValue("/root/prtinfo/baseinfo/dutplcenm" ,getUserInfo("dutplcenm"));
- model.makeValue("/root/prtinfo/baseinfo/usernm" ,getUserInfo("usernm"));
- var paramreqflag = opener.javascript.getParameter("reqflag");
- model.makeValue("/root/prtinfo/baseinfo/paramreqflag" ,paramreqflag);
- copyNodesetType("/root/prtinfo/druggoodreqdetailinfo/druggoodreqdetailist","/root/main/druggoodreqdetailinfo/druggoodreqdetailist","replace");
- exeReportPreview("RPRSR10404","XMLSTR","/root/prtinfo");
- ]]>
- </script>
- </button>
- <button id="button3" class="btn6_letter3" style="left:5px; top:660px; width:68px; height:22px; ">
- <caption>Excel</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_druggoodreqdetailist);
- ]]>
- </script>
- </button>
- <select1 id="cmb_deliveflag" visibility="hidden" appearance="minimal" style="left:645px; top:60px; width:140px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/cmb_deliveflag">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </xhtml:body>
- </xhtml:html>
|