SMRSO10200_약품출고현황조회(경북대).xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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">
  4. <xhtml:head>
  5. <xhtml:title>약품출고현황</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <cond>
  10. <instcd/>
  11. <srchfrdd/>
  12. <srchtodd/>
  13. <delivedd/>
  14. <iokind/>
  15. <delivedeptcd/>
  16. <iokind2/>
  17. </cond>
  18. <main>
  19. <list>
  20. <druggoodoutinfo>
  21. <druggoodoutlist/>
  22. </druggoodoutinfo>
  23. <druggoodoutdetailinfo>
  24. <druggoodoutdetailist/>
  25. </druggoodoutdetailinfo>
  26. </list>
  27. </main>
  28. <send>
  29. <reqdata>
  30. </reqdata>
  31. </send>
  32. <init>
  33. </init>
  34. <hidden>
  35. <common>
  36. <conflaglist/>
  37. <purcclslist/>
  38. </common>
  39. <commoninfo>
  40. <acntlist/>
  41. </commoninfo>
  42. <init>
  43. <sumpurcamt/>
  44. <sumpurcqty/>
  45. </init>
  46. </hidden>
  47. <temp>
  48. <maxpurcdmndnoinfo>
  49. <purcdmndno/>
  50. </maxpurcdmndnoinfo>
  51. </temp>
  52. <tmp>
  53. <costchginfo>
  54. <goodcd/>
  55. <goodunitcost/>
  56. </costchginfo>
  57. <commoninfo>
  58. <acntlist/>
  59. </commoninfo>
  60. </tmp>
  61. </root>
  62. </instance>
  63. <script type="javascript" ev:event="xforms-ready">
  64. <![CDATA[
  65. fInitialize();
  66. ]]>
  67. </script>
  68. <submission id="TRRSO10201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/list/druggoodoutinfo"/>
  69. <submission id="TRRSO10202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/list/druggoodoutdetailinfo"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  74. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. <script type="javascript">
  78. <![CDATA[
  79. /**
  80. * @ver : 2010-10-19
  81. * @desc : 폼 초기화
  82. * @param :
  83. * @return :
  84. * @---------------------------------------------------
  85. */
  86. function fInitialize() {
  87. misfGridInit(grd_druggoodoutlist);
  88. misfGridInit(grd_druggoodoutdetailist);
  89. misfComboComCdList("Z0007" ,cmb_instcd);
  90. rszfGetPurcIOFlagList(cmb_iokind, model.getValue(cmb_instcd.attribute("ref")) , "O","N","","","");
  91. rszfComboStockArthDeptcdList(cmb_delivedeptcd,getUserInfo("dutplceinstcd"),"PH" ,"Y");
  92. addComboItem("cmb_iokind2","전체","","above");
  93. var bfdd = ((getCurrentDate()).toDate()).getAddDate(-1, "M");
  94. model.setValue(ipt_srchfrdd.attribute("ref") , bfdd.getDateFormat());
  95. model.setValue(ipt_srchtodd.attribute("ref") , getCurrentDate());
  96. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  97. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/cond/instcd"));
  98. if(submit("TRRSO10201")){
  99. }
  100. model.refresh();
  101. }
  102. ]]>
  103. </script>
  104. </xhtml:head>
  105. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  106. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  107. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">약품출고현황</caption>
  108. </group>
  109. <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1185px; height:744px; ">
  110. <line id="line1" class="line_1" style="x1:0px; y1:95px; x2:1185px; y2:95px; "/>
  111. <switch id="sch_select" style="left:0px; top:80px; width:1185px; height:648px; ">
  112. <case id="cse_req" selected="true" style="left:0px; top:0px; width:1185px; height:638; ">
  113. <line id="line2" class="line_1" style="x1:0px; y1:25; x2:1185; y2:25; "/>
  114. <datagrid id="grd_druggoodoutlist" nodeset="/root/main/list/druggoodoutinfo/druggoodoutlist" class="datagrid2" caption="출고일자^출고부서^출고부서코드^출고유형^출고유형코드^품목" colsep="^" colwidth="100, 124, 44, 128, 73, 430" explorerbar="sortshow" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:1185px; height:608px; ">
  115. <col ref="delivedd" format="yyyy-mm-dd" style="text-align:center; "/>
  116. <col ref="delivedeptnm" style="text-align:center; "/>
  117. <col ref="delivedeptcd" visibility="hidden" style="text-align:center; "/>
  118. <col ref="iokindnm" type="output" style="text-align:center; "/>
  119. <col ref="iokind" type="output" visibility="hidden" style="text-align:center; "/>
  120. <col ref="goodcntnm" style="text-align:left; "/>
  121. <script type="javascript" ev:event="ondblclick">
  122. <![CDATA[
  123. btn_reqdetail.selected = true;
  124. model.toggle("cse_reqdetail");
  125. btn_reqdetail.dispatch("DOMActivate");
  126. var iRow = grd_druggoodoutlist.row - grd_druggoodoutlist.fixedRows + 1;
  127. var sInstcd = model.getValue("/root/cond/instcd");
  128. var sDelivedd = model.getValue("/root/main/list/druggoodoutinfo/druggoodoutlist["+iRow+"]/delivedd");
  129. var sDelivedeptcd = model.getValue("/root/main/list/druggoodoutinfo/druggoodoutlist["+iRow+"]/delivedeptcd");
  130. var sIokind = model.getValue("/root/main/list/druggoodoutinfo/druggoodoutlist["+iRow+"]/iokind");
  131. model.setValue("/root/cond/delivedd",sDelivedd);
  132. model.setValue("/root/cond/iokind",sIokind);
  133. model.setValue("/root/cond/delivedeptcd",sDelivedeptcd);
  134. model.makeValue("/root/send/reqdata/instcd" ,sInstcd);
  135. model.makeValue("/root/send/reqdata/delivedd" ,sDelivedd);
  136. model.makeValue("/root/send/reqdata/delivedeptcd" ,sDelivedeptcd);
  137. model.makeValue("/root/send/reqdata/iokind" ,sIokind);
  138. if(submit("TRRSO10202")){
  139. var sumpurcamt = 0;
  140. var sumpurcqty = 0;
  141. model.removeNodeset("/root/send/reqdata");
  142. for(var i =grd_druggoodoutdetailist.fixedRows;i <grd_druggoodoutdetailist.rows;i++){
  143. sumpurcqty = sumpurcqty + parseFloat( grd_druggoodoutdetailist.valueMatrix(i , grd_druggoodoutdetailist.colRef("delivedeptqty")));
  144. sumpurcamt = sumpurcamt + parseFloat( grd_druggoodoutdetailist.valueMatrix(i , grd_druggoodoutdetailist.colRef("outamt")));
  145. }
  146. model.setValue(opt_sumpurcqty.attribute("ref"),sumpurcqty);
  147. model.setValue(opt_sumpurcamt.attribute("ref"),sumpurcamt);
  148. opt_sumpurcqty.refresh();
  149. opt_sumpurcamt.refresh();
  150. }
  151. ]]>
  152. </script>
  153. </datagrid>
  154. <button id="btn_excel" class="btn2_letter2" style="left:1140px; top:4px; width:42px; height:19px; ">
  155. <caption>엑셀</caption>
  156. <script type="javascript" ev:event="DOMActivate">
  157. <![CDATA[
  158. misfSaveExcel(grd_druggoodoutlist);
  159. ]]>
  160. </script>
  161. </button>
  162. </case>
  163. <case id="cse_reqdetail" style="left:0px; top:0px; width:1185px; height:638; ">
  164. <line id="line3" class="line_1" style="x1:0px; y1:25; x2:1185; y2:25; "/>
  165. <datagrid id="grd_druggoodoutdetailist" nodeset="/root/main/list/druggoodoutdetailinfo/druggoodoutdetailist" class="datagrid2" caption="약품코드^약품명(영문)^포장규격^함량^단위^출고수량^출고단가^출고금액^출고부서명^출고유형^출고일자^포장^포장^포장^포장수량^낱개수량^단가^금액^전송상태^caption1^기관코드^물품구분^발주일자^발주번호^발주구분^발주부서^접수자^발주자" colsep="^" colwidth="99, 273, 77, 100, 73, 82, 107, 109, 100, 100, 60" dataheight="25" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:30px; width:1185px; height:603px; ">
  166. <col ref="goodcd" style="text-align:center; "/>
  167. <col ref="goodengnm" style="text-align:left; "/>
  168. <col ref="packspec" style="text-align:center; "/>
  169. <col ref="cntsqtyunit" style="text-align:center; "/>
  170. <col ref="deliveunit" style="text-align:center; "/>
  171. <col ref="delivedeptqty" format="#,###.##" style="text-align:right; "/>
  172. <col ref="goodunitcost" format="#,###.##" style="text-align:right; "/>
  173. <col ref="outamt" format="#,###.##" style="text-align:right; "/>
  174. <col ref="delivedeptnm" visibility="hidden"/>
  175. <col ref="iokindnm" visibility="hidden"/>
  176. <col ref="delivedd" visibility="hidden"/>
  177. </datagrid>
  178. <button id="button12" class="btn2_letter2" style="left:1140px; top:6px; width:42px; height:19px; ">
  179. <caption>엑셀</caption>
  180. <script type="javascript" ev:event="DOMActivate">
  181. <![CDATA[
  182. var fileName = window.fileDialog("save", ",", false, "약품수급계획조정", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  183. if (fileName != "")
  184. {
  185. grd_druggoodoutdetailist.saveExcel(fileName, "Excel",false);
  186. }
  187. ]]>
  188. </script>
  189. </button>
  190. </case>
  191. </switch>
  192. <button id="btn_reqdetail" class="btn_sw10" group="tab" style="left:111px; top:57px; width:136px; height:22px; ">
  193. <caption>약품출고상세현황</caption>
  194. <toggle case="cse_reqdetail" ev:event="onclick"/>
  195. <script type="javascript" ev:event="DOMActivate">
  196. <![CDATA[
  197. grp_srch1.visible = false;
  198. grp_srch2.visible = true;
  199. cap_sumpurcamt.visible = true;
  200. opt_sumpurcamt.visible = true;
  201. opt_sumpurcqty.visible = true;
  202. cap_sumpurcqty.visible = true;
  203. ]]>
  204. </script>
  205. </button>
  206. <button id="btn_req" class="btn_sw8" group="tab" selected="true" style="left:0px; top:57px; width:112px; height:22px; ">
  207. <caption>약품출고현황</caption>
  208. <toggle case="cse_req" ev:event="onclick"/>
  209. <script type="javascript" ev:event="DOMActivate">
  210. <![CDATA[
  211. grp_srch1.visible = true;
  212. grp_srch2.visible = false;
  213. cap_sumpurcamt.visible = false;
  214. opt_sumpurcamt.visible = false;
  215. opt_sumpurcqty.visible = false;
  216. cap_sumpurcqty.visible = false;
  217. ]]>
  218. </script>
  219. </button>
  220. <group id="grp_srch1" style="left:0px; top:0px; width:1185px; height:41px; ">
  221. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1185px; height:41px; "/>
  222. <select1 id="cmb_instcd" ref="/root/cond/instcd" class="combo_s_essential" disabled="true" appearance="minimal" style="left:105px; top:14px; width:143px; height:19px; text-align:center; ">
  223. <choices>
  224. <itemset nodeset="/root/init/instcd">
  225. <label ref="cdnm"/>
  226. <value ref="cdid"/>
  227. </itemset>
  228. </choices>
  229. </select1>
  230. <caption id="caption10" class="search_name" style="left:15px; top:15px; width:97px; height:17px; ">기관코드 :</caption>
  231. <caption id="cap_line" class="search_n_b" style="left:522px; top:17px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  232. <caption id="cap_purcmm" class="search_name" style="left:315px; top:15px; width:86px; height:17px; ">출고일자 :</caption>
  233. <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1110px; top:10px; width:56px; height:22px; text-align:left; ">
  234. <caption>조회</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. if(submit("TRRSO10201")){
  238. }
  239. ]]>
  240. </script>
  241. </button>
  242. <line id="line5" class="line_4" style="x1:1095px; y1:8px; x2:1095px; y2:35px; "/>
  243. <input id="ipt_srchtodd" ref="/root/cond/srchtodd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:538px; top:14px; width:105px; height:19px; text-align:center; "/>
  244. <input id="ipt_srchfrdd" ref="/root/cond/srchfrdd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:410px; top:14px; width:105px; height:19px; text-align:center; ">
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. ]]>
  248. </script>
  249. </input>
  250. <select1 id="cmb_iokind2" ref="/root/cond/iokind2" class="input_essential" appearance="minimal" style="left:775px; top:14px; width:125px; height:19px; text-align:center; ">
  251. <choices>
  252. <itemset nodeset="/root/init/ioflag/comcodelist">
  253. <label ref="cdnm"/>
  254. <value ref="cdid"/>
  255. </itemset>
  256. </choices>
  257. </select1>
  258. <caption id="caption1" class="search_name" style="left:686px; top:15px; width:87px; height:17px; ">출고유형 :</caption>
  259. </group>
  260. <group id="grp_srch2" visibility="hidden" style="left:0px; top:0px; width:1185px; height:41px; ">
  261. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1185px; height:41px; "/>
  262. <caption id="cap_purcdmnddd" class="search_name" style="left:25px; top:14px; width:115px; height:17px; ">출고일자 :</caption>
  263. <input id="ipt_windd" ref="/root/cond/delivedd" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:113px; top:13px; width:125px; height:19px; text-align:center; "/>
  264. <button id="btn_search1" class="btn1_letter2" navindex="7" style="left:1110px; top:10px; width:56px; height:22px; text-align:left; ">
  265. <caption>조회</caption>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. var sInstcd = model.getValue("/root/cond/instcd");
  269. var sDelivedd = model.getValue("/root/cond/delivedd");
  270. var sDelivedeptcd = model.getValue("/root/cond/delivedeptcd");
  271. var sIokind = model.getValue("/root/cond/iokind");
  272. model.makeValue("/root/send/reqdata/instcd" ,sInstcd);
  273. model.makeValue("/root/send/reqdata/delivedd" ,sDelivedd);
  274. model.makeValue("/root/send/reqdata/delivedeptcd" ,sDelivedeptcd);
  275. model.makeValue("/root/send/reqdata/iokind" ,sIokind);
  276. if(submit("TRRSO10202")){
  277. var sumpurcamt = 0;
  278. var sumpurcqty = 0;
  279. model.removeNodeset("/root/send/reqdata");
  280. for(var i =grd_druggoodoutdetailist.fixedRows;i <grd_druggoodoutdetailist.rows;i++){
  281. sumpurcqty = sumpurcqty + parseFloat( grd_druggoodoutdetailist.valueMatrix(i , grd_druggoodoutdetailist.colRef("delivedeptqty")));
  282. sumpurcamt = sumpurcamt + parseFloat( grd_druggoodoutdetailist.valueMatrix(i , grd_druggoodoutdetailist.colRef("outamt")));
  283. }
  284. model.setValue(opt_sumpurcqty.attribute("ref"),sumpurcqty);
  285. model.setValue(opt_sumpurcamt.attribute("ref"),sumpurcamt);
  286. opt_sumpurcqty.refresh();
  287. opt_sumpurcamt.refresh();
  288. }
  289. ]]>
  290. </script>
  291. </button>
  292. <line id="line4" class="line_4" style="x1:1100px; y1:8px; x2:1100px; y2:35px; "/>
  293. <caption id="caption2" class="search_name" style="left:315px; top:14px; width:87px; height:17px; ">출고유형 :</caption>
  294. <select1 id="cmb_iokind" ref="/root/cond/iokind" class="input_essential" disabled="true" appearance="minimal" style="left:404px; top:13px; width:125px; height:19px; text-align:center; ">
  295. <choices>
  296. <itemset>
  297. <label/>
  298. <value/>
  299. </itemset>
  300. </choices>
  301. </select1>
  302. <select1 id="cmb_delivedeptcd" ref="/root/cond/delivedeptcd" class="combo_s_essential" disabled="true" appearance="minimal" style="left:695px; top:13px; width:145px; height:19px; text-align:center; ">
  303. <choices>
  304. <itemset>
  305. <label/>
  306. <value/>
  307. </itemset>
  308. </choices>
  309. </select1>
  310. <caption id="caption8" class="search_name" style="left:610px; top:14px; width:89px; height:17px; ">출고부서 :</caption>
  311. </group>
  312. <caption id="cap_sumpurcamt" visibility="hidden" style="left:882px; top:54px; width:48px; height:25px; vertical-align:middle; ">총금액 :</caption>
  313. <output id="opt_sumpurcamt" ref="/root/hidden/init/sumpurcamt" class="output_default" visibility="hidden" format="#,###.##" style="left:929px; top:56px; width:90px; height:19px; font-weight:bold; text-align:center; "/>
  314. <output id="opt_sumpurcqty" ref="/root/hidden/init/sumpurcqty" class="output_default" visibility="hidden" format="#,###.##" style="left:795px; top:56px; width:70px; height:19px; font-weight:bold; text-align:center; "/>
  315. <caption id="cap_sumpurcqty" visibility="hidden" style="left:748px; top:57px; width:49px; height:20px; vertical-align:middle; ">총수량 :</caption>
  316. </group>
  317. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  318. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  319. <button id="btn_prnt" class="btn6_letter2" visibility="hidden" style="left:0px; top:5px; width:56px; height:22px; ">
  320. <caption>출력</caption>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. if(sch_select.selectedIndex == "1"){
  324. exeReportPreview("RPRSI10601","XMLSTR");
  325. }else{
  326. messageBox("약품출고상세현황에서 출력","I006");
  327. return;
  328. }
  329. ]]>
  330. </script>
  331. </button>
  332. </group>
  333. </xhtml:body>
  334. </xhtml:html>