SMRST02800_품목별 입출고현황 출력.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <goodflag/>
  12. <stocdeptcd/>
  13. <stocdeptnm/>
  14. <stocym/>
  15. <prtflag>B</prtflag>
  16. <goodcd/>
  17. <goodnm/>
  18. </cond>
  19. <main>
  20. <goodinoutinfo>
  21. <goodinoutlist>
  22. <stkdeptnm/>
  23. <goodcd/>
  24. <goodnm/>
  25. <purcunit/>
  26. <unitcost/>
  27. <beftotqty/>
  28. <beftotamt/>
  29. <winqty/>
  30. <winamt/>
  31. <outqty/>
  32. <outamt/>
  33. <stocqty/>
  34. <stocamt/>
  35. </goodinoutlist>
  36. </goodinoutinfo>
  37. </main>
  38. <send>
  39. <reqdata/>
  40. </send>
  41. </root>
  42. </instance>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. //화면 Control을 초기화한다
  46. fInitialize();
  47. ]]>
  48. </script>
  49. <submission id="TRRSD00192" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodiolist" resultref="/root/init/main"/>
  50. <submission id="TRRST02802" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/goodinoutinfo"/>
  51. </model>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  54. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  55. <script type="javascript" src="../../../mis/purccommonweb/js/PURC.js"/>
  56. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  57. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  58. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  59. <script type="javascript">
  60. <![CDATA[
  61. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  62. function fInitialize() {
  63. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  64. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  65. var curdate = getCurrentDate().substring(0,6);
  66. model.setValue(ipt_stocym.attribute("ref") ,curdate);
  67. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("stkdeptnm"))=true;
  68. misfGridInit(grd_goodinoutlist);
  69. model.refresh();
  70. }
  71. //필수항목 체크하는 메소드
  72. function fCheckRetrieveData()
  73. {
  74. if(!isRequiredControls("cmb_instcd") )return false; // 기관코드 , commonweb/js/tfHelper.js
  75. if(!isRequiredControls("cmb_goodflag") )return false; // 물품구분
  76. if(!isRequiredControls("ipt_stocym") )return false; // 기준년월
  77. //if(!isRequiredControls("ipt_delivetodd") )return false; // 출고종료일자
  78. //if(!isRequiredControls("cmb_stocdeptcd") )return false; // 부서코드
  79. }
  80. ]]>
  81. </script>
  82. </xhtml:head>
  83. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  84. <group id="group1" style="left:0px; top:0px; width:1195; height:13px; ">
  85. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">품목별 입출고현황 출력</caption>
  86. </group>
  87. <group id="group5" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
  88. <caption id="caption21" class="tit_2" style="left:5px; top:83px; width:216px; height:13px; ">품목별 입출고현황</caption>
  89. <group id="group6" style="left:0px; top:13px; width:1195px; height:61; vertical-align:top; ">
  90. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
  91. <caption id="cap_instcd" class="search_name" style="left:15px; top:9; width:93px; height:17px; ">기관코드 :</caption>
  92. <caption id="cap_stocym" class="search_name" style="left:323px; top:9px; width:93px; height:17px; ">기 준 월 :</caption>
  93. <caption id="cap_prtflag" class="search_name" style="left:595px; top:9px; width:112px; height:17px; ">조회구분 :</caption>
  94. <select1 id="cmb_instcd" ref="/root/cond/instcd" class="combo_s_essential" disabled="true" appearance="minimal" style="left:100px; top:8px; width:141px; height:19px; text-align:center; ">
  95. <choices>
  96. <itemset nodeset="/root/init/instcd">
  97. <label ref="cdnm"/>
  98. <value ref="cdid"/>
  99. </itemset>
  100. </choices>
  101. </select1>
  102. <input id="ipt_stocym" ref="/root/cond/stocym" class="input_s_essential" inputtype="date" maxlength="4" format="yyyy-mm" style="left:406px; top:8px; width:105px; height:19px; "/>
  103. <select1 id="rdo_prtflag" ref="/root/cond/prtflag" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:688px; top:10px; width:207px; height:20px; border-style:none; ">
  104. <choices>
  105. <item>
  106. <label>불출부서별</label>
  107. <value>A</value>
  108. </item>
  109. <item>
  110. <label>약품코드별</label>
  111. <value>B</value>
  112. </item>
  113. </choices>
  114. <script type="javascript" ev:event="xforms-value-changed">
  115. <![CDATA[
  116. var vPrtFlag = model.getValue("/root/cond/prtflag");
  117. if(vPrtFlag =="A"){
  118. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("stkdeptnm"))=false;
  119. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("goodcd"))=true;
  120. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("goodnm"))=true;
  121. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("purcunit"))=true;
  122. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("unitcost"))=true;
  123. ipt_goodcd.disabled = true;
  124. btn_searchgoodcd.disabled =true;
  125. ipt_goodnm.disabled = true;
  126. }else if(vPrtFlag =="B"){
  127. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("stkdeptnm"))=true;
  128. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("goodcd"))=false;
  129. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("goodnm"))=false;
  130. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("purcunit"))=false;
  131. grd_goodinoutlist.colHidden(grd_goodinoutlist.colRef("unitcost"))=false;
  132. ipt_goodcd.disabled = false;
  133. btn_searchgoodcd.disabled =false;
  134. ipt_goodnm.disabled = false;
  135. }
  136. model.refresh();
  137. ]]>
  138. </script>
  139. </select1>
  140. <button id="button3" class="icon_search" visibility="hidden" style="left:890px; top:35px; width:16px; height:16px; ">
  141. <caption/>
  142. <script type="javascript" ev:event="DOMActivate">
  143. <![CDATA[
  144. var recv_list = "stocdeptcd,stocdeptnm";
  145. misfOpenPopUpList("02", ipt_stocdeptcd,"", recv_list) ;
  146. model.refresh();
  147. ]]>
  148. </script>
  149. </button>
  150. <input id="ipt_stocdeptcd" ref="/root/cond/stocdeptcd" class="input_s_essential" visibility="hidden" style="left:810px; top:35px; width:78px; height:19px; ">
  151. <script type="javascript" ev:event="xforms-value-changed">
  152. <![CDATA[
  153. misfValidationCheck("02", "", "stocdeptcd,stocdeptnm" );
  154. model.refresh();
  155. ]]>
  156. </script>
  157. </input>
  158. <input id="ipt_stocdeptnm" ref="/root/cond/stocdeptnm" class="input_s_essential" visibility="hidden" style="left:915px; top:35px; width:127px; height:19px; "/>
  159. <caption id="caption1" class="search_name" visibility="hidden" style="left:710px; top:35px; width:90px; height:17px; ">부 서 :</caption>
  160. <caption id="cap_goodflag" class="search_name" visibility="hidden" style="left:520px; top:35px; width:93px; height:17px; ">물품구분 :</caption>
  161. <select1 id="cmb_goodflag" ref="/root/cond/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:605px; top:34px; width:141px; height:19px; ">
  162. <choices>
  163. <itemset nodeset="/root/init/goodflag">
  164. <label ref="cdnm"/>
  165. <value ref="cdid"/>
  166. </itemset>
  167. </choices>
  168. </select1>
  169. <button id="button4" class="btn1_letter2" navindex="8" style="left:1125px; top:20px; width:56px; height:22px; text-align:left; ">
  170. <caption>조회</caption>
  171. <script type="javascript" ev:event="DOMActivate">
  172. <![CDATA[
  173. submit("TRRST02802");
  174. ]]>
  175. </script>
  176. </button>
  177. <line id="line14" class="line_4" style="x1:1110px; y1:9px; x2:1110px; y2:52px; border-color:#ffe4bb; border-left-style:solid; "/>
  178. <input id="ipt_goodnm" ref="/root/cond/goodnm" class="input_fix" appearance="input" style="left:234px; top:34px; width:215px; height:19px; ">
  179. <script type="javascript" ev:event="xforms-value-changed">
  180. <![CDATA[
  181. if(ipt_goodnm.value.length == 0)
  182. {
  183. ipt_goodcd.value = "";
  184. }
  185. else {
  186. model.setValue("/root/cond/goodcd", "")
  187. btn_searchgoodcd.dispatch("DOMActivate");
  188. }
  189. model.refresh();
  190. ]]>
  191. </script>
  192. <script type="javascript" ev:event="onkeydown">
  193. <![CDATA[
  194. if (event.keyCode == 13)
  195. {
  196. ipt_goodnm.value = ipt_goodnm.currentText;
  197. ipt_goodnm.refresh();
  198. ipt_goodnm.dispatch("xforms-value-changed");
  199. }
  200. ]]>
  201. </script>
  202. </input>
  203. <button id="btn_searchgoodcd" class="icon_search" style="left:215px; top:35px; width:16px; height:16px; ">
  204. <caption/>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. model.makeValue("/root/send/goodiolist/instcd" ,model.getValue("/root/cond/instcd"));
  208. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  209. model.makeValue("/root/send/goodiolist/goodflag","PH");
  210. model.makeValue("/root/send/goodiolist/goodcd" ,model.getValue("/root/cond/goodcd"));
  211. model.makeValue("/root/send/goodiolist/goodnm" ,model.getValue("/root/cond/goodnm"));
  212. if (submit("TRRSD00192") == true) {
  213. var nodecnts = getNodesetCount("/root/init/main/goodlist");
  214. if (nodecnts >= "2") {
  215. group2.visible = true;
  216. } else if (nodecnts == "1") {
  217. var goodcd = model.getValue("/root/init/main/goodlist/goodcd");
  218. var goodnm = model.getValue("/root/init/main/goodlist/goodnm");
  219. model.setValue("/root/cond/goodcd" , goodcd)
  220. model.setValue("/root/cond/goodnm" , goodnm)
  221. } else {
  222. messageBox("검색된 코드가 없습니다.", "I");
  223. }
  224. }
  225. model.refresh();
  226. ]]>
  227. </script>
  228. </button>
  229. <input id="ipt_goodcd" ref="/root/cond/goodcd" class="input_s_essential" _chartype="upper" style="left:100px; top:34px; width:111px; height:19px; ">
  230. <script type="javascript" ev:event="xforms-value-changed">
  231. <![CDATA[
  232. if(ipt_goodcd.value.length == 0)
  233. {
  234. ipt_goodnm.value = "";
  235. }
  236. else {
  237. model.setValue("/root/cond/goodnm" , "")
  238. btn_searchgoodcd.dispatch("DOMActivate");
  239. }
  240. model.refresh();
  241. ]]>
  242. </script>
  243. <script type="javascript" ev:event="onkeydown">
  244. <![CDATA[
  245. if (event.keyCode == 13)
  246. {
  247. ipt_goodcd.value = ipt_goodcd.currentText;
  248. ipt_goodcd.refresh();
  249. ipt_goodcd.dispatch("xforms-value-changed");
  250. }
  251. ]]>
  252. </script>
  253. </input>
  254. <caption id="caption2" class="search_name" style="left:15px; top:35px; width:95px; height:17px; ">약품코드 :</caption>
  255. </group>
  256. <line id="line15" class="line_1" style="x1:0px; y1:98px; x2:1195px; y2:98px; "/>
  257. <datagrid id="grd_goodinoutlist" nodeset="/root/main/goodinoutinfo/goodinoutlist" caption="불출부서^물품코드^품명 및 규격^단 위^단 가^전월재고^전월재고^입고량^입고량^출고량^출고량^재고량^재고량|불출부서^물품코드^품명 및 규격^단 위^단 가^수량^금액^수량^금액^수량^금액^수량^금액" colsep="^" colwidth="115, 91, 314, 56, 102, 60, 72, 60, 62, 60, 64, 60, 78" dataheight="25" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:103px; width:1195px; height:631px; ">
  258. <col ref="stkdeptnm" style="text-align:center; "/>
  259. <col ref="goodcd" style="text-align:left; "/>
  260. <col ref="goodnm" style="text-align:left; "/>
  261. <col ref="purcunit" style="text-align:right; "/>
  262. <col ref="unitcost" format="#,###.##" style="text-align:right; "/>
  263. <col ref="beftotqty" style="text-align:right; "/>
  264. <col ref="beftotamt" format="#,###.##" style="text-align:right; "/>
  265. <col ref="winqty" style="text-align:right; "/>
  266. <col ref="winamt" format="#,###.##" style="text-align:right; "/>
  267. <col ref="outqty" style="text-align:right; "/>
  268. <col ref="outamt" format="#,###.##" style="text-align:right; "/>
  269. <col ref="stocqty" style="text-align:right; "/>
  270. <col ref="stocamt" format="#,###.##" style="text-align:right; "/>
  271. </datagrid>
  272. <button id="button1" class="btn2_letter6" style="left:1108px; top:77px; width:86px; height:19px; ">
  273. <caption>엑셀파일저장</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. misfSaveExcel(grd_goodinoutlist , "품목별입출고현황출력");
  277. ]]>
  278. </script>
  279. </button>
  280. <button id="button2" class="btn2_letter6" visibility="hidden" style="left:1020px; top:77px; width:86px; height:19px; ">
  281. <caption>엑셀파일열기</caption>
  282. </button>
  283. <group id="group2" visibility="hidden" style="left:55px; top:75px; width:415px; height:165px; ">
  284. <datagrid id="grd_goodlist" nodeset="/root/init/main/goodlist" visibility="visible" caption="약품코드^약품명^기관코드^물품구분^작업년월^부서코드^대분류코드^재고조정처리여부" colsep="^" colwidth="102, 270, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:25px; width:410px; height:139px; ">
  285. <col imemode="alpha" ref="goodcd" type="output" _chartype="upper" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:left; "/>
  286. <col ref="goodnm" type="output" style="text-align:left; "/>
  287. <col ref="instcd" visibility="hidden" _key="true"/>
  288. <col ref="goodflag" visibility="hidden" _key="true"/>
  289. <script type="javascript" ev:event="ondblclick">
  290. <![CDATA[
  291. if (isDataCell() == true) {
  292. var goodcd = model.getValue("/root/init/main/goodlist[" + grd_goodlist.row + "]/goodcd");
  293. var goodnm = model.getValue("/root/init/main/goodlist[" + grd_goodlist.row + "]/goodnm");
  294. model.setValue("/root/cond/goodcd" , goodcd)
  295. model.setValue("/root/cond//goodnm" , goodnm)
  296. group2.visible = false;
  297. }
  298. ipt_goodcd.refresh();
  299. ipt_goodnm.refresh();
  300. ]]>
  301. </script>
  302. </datagrid>
  303. <button id="button5" class="btn2_letter3" style="left:340px; top:4px; width:53px; height:19px; ">
  304. <caption>숨기기</caption>
  305. <script type="javascript" ev:event="DOMActivate">
  306. <![CDATA[
  307. group2.visible = false
  308. ]]>
  309. </script>
  310. </button>
  311. </group>
  312. </group>
  313. <group id="group4" scroll="auto" style="left:0px; top:12; width:1195px; height:27px; ">
  314. <button id="button46" class="btn6_letter2" visibility="hidden" style="left:0; top:3px; width:56px; height:22px; font-size:10pt; ">
  315. <caption>출력</caption>
  316. </button>
  317. <line id="line1" class="line_6" style="x1:0; y1:25; x2:1195; y2:25; "/>
  318. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3; width:68px; height:22px; ">
  319. <caption>초기화</caption>
  320. <script type="javascript" ev:event="DOMActivate">
  321. <![CDATA[
  322. fInitialize();
  323. ]]>
  324. </script>
  325. </button>
  326. </group>
  327. </xhtml:body>
  328. </xhtml:html>