SMRST06900_월마감작업(약국).xrw 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  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. <main>
  10. <cond>
  11. <deptcnts/>
  12. <instcd/>
  13. <userid/>
  14. <stocym/>
  15. <depthngnm/>
  16. <totcnts/>
  17. <instnm/>
  18. <usernm/>
  19. </cond>
  20. <phaminfo>
  21. </phaminfo>
  22. <phamuseinfo>
  23. <dummy/>
  24. <phamuselist/>
  25. </phamuseinfo>
  26. <toggle2_cond>
  27. <instcd/>
  28. <stocym/>
  29. <userid/>
  30. <usernm/>
  31. <stocflag/>
  32. <stocdd/>
  33. </toggle2_cond>
  34. <toggle3_cond>
  35. <instcd/>
  36. <goodflag/>
  37. <stocym/>
  38. <userid/>
  39. <usernm/>
  40. </toggle3_cond>
  41. <toggle4_cond>
  42. <instcd/>
  43. <stocym/>
  44. <userid/>
  45. <usernm/>
  46. <stocdeptcd/>
  47. <stocdeptnm/>
  48. </toggle4_cond>
  49. <toggle5_cond>
  50. <instcd/>
  51. <stocym/>
  52. <instnm/>
  53. <srchflag>1</srchflag>
  54. </toggle5_cond>
  55. <toggle6_cond>
  56. <instcd/>
  57. <fromstocym/>
  58. <instnm/>
  59. <tostocym/>
  60. </toggle6_cond>
  61. <outendrsltinfo/>
  62. <drugacctinfo/>
  63. <goodinfo/>
  64. <good_cond>
  65. <goodcd/>
  66. <goodnm/>
  67. <flag/>
  68. <instcd/>
  69. <stocym/>
  70. </good_cond>
  71. </main>
  72. <send>
  73. <reqdata/>
  74. </send>
  75. <init>
  76. <orddept/>
  77. <goodflag/>
  78. </init>
  79. <hidden/>
  80. <tmp>
  81. <cnts/>
  82. </tmp>
  83. </root>
  84. </instance>
  85. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  88. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  89. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  91. <script type="javascript" ev:event="xforms-ready">
  92. <![CDATA[
  93. // rszfUserGoodFlagList(cmb_cond3goodflag, getUserInfo("userid"));
  94. // var sDate = getCurrentDate();
  95. // var cDate = sDate.substring(0, 6);
  96. // model.setValue("/root/main/cond/stocym" , cDate);
  97. // model.setValue(opt_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  98. // model.setValue("/root/main/cond/userid", getUserId());
  99. btn_01.dispatch("DOMActivate");
  100. rdo_srchflag.dispatch("xforms-value-changed");
  101. // model.refresh();
  102. ]]>
  103. </script>
  104. <script type="javascript">
  105. <![CDATA[
  106. function saveGridToExcel(grdObj){
  107. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  108. if (fileName != ""){
  109. grdObj.saveExcel(fileName, "SheetName", false, false, "", "", true);
  110. }
  111. }
  112. ]]>
  113. </script>
  114. <submission id="TRRSZ00123" mediatype="application/x-www-form-urlencoded" method="post"/>
  115. <submission id="TRRST06901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/phaminfo"/>
  116. <submission id="TRRST06903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/phaminfo"/>
  117. <submission id="TXRST06901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/phamuseinfo/phamuselist" resultref="/root/hidden"/>
  118. <submission id="TXRST06902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle2_cond" resultref="/root/hidden"/>
  119. <submission id="TRRST06902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle2_cond" resultref="/root/tmp/cntinfo"/>
  120. <submission id="TXRST06903" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle3_cond" resultref="/root/hidden"/>
  121. <submission id="TXRST06904" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle4_cond" resultref="/root/hidden"/>
  122. <submission id="TRRST06905" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle5_cond" resultref="/root/main/outendrsltinfo"/>
  123. <submission id="TRRST06906" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/good_cond" resultref="/root/main/goodinfo"/>
  124. <submission id="TRRST06907" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/toggle6_cond" resultref="/root/main/drugacctinfo"/>
  125. </model>
  126. </xhtml:head>
  127. <xhtml:body guideline="2,765;1,1182;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  128. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:105px; height:13px; ">출고마감처리</caption>
  129. <case id="case1" selected="true" style="left:0px; top:0px; width:640px; height:340px; "/>
  130. <switch id="switch1" style="left:0px; top:40px; width:1135px; height:705px; ">
  131. <case id="case1" selected="true">
  132. <datagrid id="grd_phamlist" nodeset="/root/main/phaminfo/phamlist" caption="대분류^약품코드^구입단가^비용계정비^구코드^복지부분류^약품명^총합^금액^부서코드1^부서코드2^부서코드3^부서코드4^부서코드5^부서코드6^부서코드7^부서코드8^부서코드9^부서코드10" colsep="^" colwidth="0, 100, 60, 0, 0, 0, 170, 70, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:93px; width:1120px; height:610px; ">
  133. <col ref="c1"/>
  134. <col imemode="alpha" ref="c2" type="inputbutton"/>
  135. <col ref="c3" format="#,###.#" style="text-align:right; "/>
  136. <col ref="c4"/>
  137. <col ref="c5"/>
  138. <col ref="c6"/>
  139. <col ref="c7" type="input"/>
  140. <col ref="c8" format="#,###.#" style="text-align:right; "/>
  141. <col ref="c9"/>
  142. <col ref="c10" type="input" format="#,###.#" style="text-align:right; "/>
  143. <col ref="c11" type="input" format="#,###.#" style="text-align:right; "/>
  144. <col ref="c12" type="input" format="#,###.#" style="text-align:right; "/>
  145. <col ref="c13" type="input" format="#,###.#" style="text-align:right; "/>
  146. <col ref="c14" type="input" format="#,###.#" style="text-align:right; "/>
  147. <col ref="c15" type="input" format="#,###.#" style="text-align:right; "/>
  148. <col ref="c16" type="input" format="#,###.#" style="text-align:right; "/>
  149. <col ref="c17" type="input" format="#,###.#" style="text-align:right; "/>
  150. <col ref="c18" type="input" format="#,###.#" style="text-align:right; "/>
  151. <col ref="c19" type="input" format="#,###.#" style="text-align:right; "/>
  152. <script type="javascript" ev:event="xforms-value-changed">
  153. <![CDATA[
  154. if (grd_phamlist.row > 1) {
  155. model.resetInstanceNode("/root/main/good_cond");
  156. model.setValue("/root/main/good_cond/stocym", model.getValue("/root/main/cond/stocym"));
  157. model.setValue("/root/main/good_cond/instcd", model.getValue("/root/main/cond/instcd"));
  158. if (grd_phamlist.col == grd_phamlist.colRef("c2") ||grd_phamlist.col == grd_phamlist.colRef("c7")) {
  159. if (grd_phamlist.col == grd_phamlist.colRef("c2")) {
  160. model.setValue("/root/main/good_cond/flag", "C");
  161. model.setValue("/root/main/good_cond/goodcd", grd_phamlist.valueMatrix(grd_phamlist.row, grd_phamlist.col));
  162. } else if (grd_phamlist.col == grd_phamlist.colRef("c7")) {
  163. model.setValue("/root/main/good_cond/flag", "N");
  164. model.setValue("/root/main/good_cond/goodnm", grd_phamlist.valueMatrix(grd_phamlist.row, grd_phamlist.col));
  165. }
  166. submit("TRRST06906");
  167. var nodeCnts = getNodesetCount("/root/main/goodinfo/goodlist");
  168. if (nodeCnts >= "2") {
  169. grd_goodlist.visible = true;
  170. } else if (nodeCnts == "1" ){
  171. var goodcd = model.getValue("/root/main/goodinfo/goodlist/goodcd");
  172. var goodnm = model.getValue("/root/main/goodinfo/goodlist/goodnm");
  173. var goodunitcost = model.getValue("/root/main/goodinfo/goodlist/goodunitcost");
  174. var row2 = grd_phamlist.row;
  175. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c2" , goodcd)
  176. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c7" , goodnm)
  177. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c3" , goodunitcost)
  178. } else {
  179. messageBox("조회된 결과가 없습니다.", "I");
  180. }
  181. } else if (grd_phamlist.col == grd_phamlist.colRef("c10") ||grd_phamlist.col == grd_phamlist.colRef("c11")
  182. ||grd_phamlist.col == grd_phamlist.colRef("c12") ||grd_phamlist.col == grd_phamlist.colRef("c13")
  183. ||grd_phamlist.col == grd_phamlist.colRef("c14") ||grd_phamlist.col == grd_phamlist.colRef("c15")
  184. ||grd_phamlist.col == grd_phamlist.colRef("c16") ||grd_phamlist.col == grd_phamlist.colRef("c17")
  185. ||grd_phamlist.col == grd_phamlist.colRef("c18") ||grd_phamlist.col == grd_phamlist.colRef("c19")) {
  186. var row2 = grd_phamlist.row
  187. var c10 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c10");
  188. if (isNull(c10)) {
  189. c10 = 0;
  190. }
  191. var c11 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c11");
  192. if (isNull(c11)) {
  193. c11 = 0;
  194. }
  195. var c12 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c12");
  196. if (isNull(c12)) {
  197. c12 = 0;
  198. }
  199. var c13 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c13");
  200. if (isNull(c13)) {
  201. c13 = 0;
  202. }
  203. var c14 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c14");
  204. if (isNull(c14)) {
  205. c14 = 0;
  206. }
  207. var c15 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c15");
  208. if (isNull(c15)) {
  209. c15 = 0;
  210. }
  211. var c16 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c16");
  212. if (isNull(c16)) {
  213. c16 = 0;
  214. }
  215. var c17 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c17");
  216. if (isNull(c17)) {
  217. c17 = 0;
  218. }
  219. var c18 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c18");
  220. if (isNull(c18)) {
  221. c18 = 0;
  222. }
  223. var c19 = model.getValue("/root/main/phaminfo/phamlist[" + row2 + "]/c19");
  224. if (isNull(c19)) {
  225. c19 = 0;
  226. }
  227. var totalsum = parseInt(c10) + parseInt(c11) + parseInt(c12) + parseInt(c13) + parseInt(c14)
  228. + parseInt(c15) + parseInt(c16) + parseInt(c17) + parseInt(c18) + parseInt(c19)
  229. model.setValue("/root/main/phaminfo/phamlist[" + row2 + "]/c8" , totalsum);
  230. grd_phamlist.refresh();
  231. }
  232. }
  233. ]]>
  234. </script>
  235. </datagrid>
  236. <datagrid id="datagrid1" nodeset="/root/main/phamuseinfo/phamuselist" visibility="hidden" caption="대분류명^약품코드^관리실코드^수량^구입단가^총합계" colsep="^" colwidth="57, 99, 89, 56, 74, 61" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:15px; top:550px; width:475px; height:125px; ">
  237. <col ref="c1"/>
  238. <col ref="c2"/>
  239. <col ref="stocdeptcd"/>
  240. <col ref="cnt"/>
  241. <col ref="c3"/>
  242. <col ref="c8"/>
  243. </datagrid>
  244. <button id="btn_loadexcel" class="btn2_letter7" disabled="true" style="left:1020px; top:72px; width:97px; height:19px; ">
  245. <caption>데이터가져오기</caption>
  246. <script type="javascript" ev:event="DOMActivate">
  247. <![CDATA[
  248. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  249. grd_phamlist.loadExcel(fileName, 1);
  250. ]]>
  251. </script>
  252. </button>
  253. <group id="group2" style="left:0px; top:0px; width:1120px; height:70px; vertical-align:top; ">
  254. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1115px; height:70px; background-color:#fffbf2; border-color:#ffd799; "/>
  255. <caption id="cap_instcd" class="search_name" style="left:5px; top:16px; width:89px; height:17px; ">기관코드 :</caption>
  256. <output id="opt_instcd" ref="/root/main/cond/instcd" class="output_fix" style="left:95px; top:15px; width:30px; height:19px; "/>
  257. <output id="opt_instcdnm" ref="/root/main/cond/instnm" class="output_fix" style="left:128px; top:15px; width:202px; height:19px; "/>
  258. <caption id="caption2" class="search_name" style="left:5px; top:40px; width:88px; height:17px; ">작 업 자 :</caption>
  259. <output id="opt_jobuser" ref="/root/main/cond/userid" class="output_fix" style="left:95px; top:40px; width:75px; height:19px; "/>
  260. <output id="opt_jobusernm" ref="/root/main/cond/usernm" class="output_fix" style="left:178px; top:40px; width:152px; height:19px; "/>
  261. <button id="btm_init" class="btn4_letter2" style="left:1035px; top:25px; width:56px; height:22px; ">
  262. <caption>조회</caption>
  263. <script type="javascript" ev:event="DOMActivate">
  264. <![CDATA[
  265. if (submit("TRRST06901", false) == true) {
  266. var grd_deptcd = model.getValue("/root/main/phaminfo/deptlist/grd_deptcd");
  267. if (!isNull(grd_deptcd)) {
  268. grd_phamlist.caption = "대분류^약품코드^구입단가^비용계정비^구코드^복지부분류^약품명^총합^금액^" + grd_deptcd;
  269. }
  270. model.refresh();
  271. }
  272. ]]>
  273. </script>
  274. </button>
  275. <caption id="cap_fromdd" class="search_name" style="left:355px; top:16px; width:101px; height:17px; ">작업년월</caption>
  276. <input id="ipt_fromdd" ref="/root/main/cond/stocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:15px; width:97px; height:19px; text-align:center; "/>
  277. <button id="button2" class="btn1_letter2" style="left:975px; top:25px; width:56px; height:22px; ">
  278. <caption>저장</caption>
  279. <script type="javascript" ev:event="DOMActivate">
  280. <![CDATA[
  281. model.removeNodeset("/root/main/phamuseinfo");
  282. model.makeNode("/root/main/phamuseinfo/dummy")
  283. // model.resetInstanceNode(root.main.phamuseinfo.phamuselist);
  284. var deptcnts = model.getValue("/root/main/cond/deptcnts");
  285. if (isNull(deptcnts)) {
  286. messageBox("부서갯수를 입력해 주세요", "C");
  287. return;
  288. }
  289. var stocym = model.getValue("/root/main/cond/stocym");
  290. if (isNull(stocym)) {
  291. messageBox("작업년월을 입력하십시오", "C");
  292. return;
  293. }
  294. // 엑셀에서 데이터를 가지고 와서 실제 사용할 수 있는 데이터 형태로 가공한다.
  295. var ins = document.models( 0 ).instances( 0 );
  296. var nodes = ins.selectNodes( "/root/main/phaminfo/phamlist" );
  297. // 속도를 위해서 그리드의 리스트를 먼저 만들어 둔다.
  298. var length = (parseInt(nodes.length) -1) * deptcnts;
  299. for(i = 0; i < length ; i++) {
  300. var newNode = instance1.createElement("phamuselist");
  301. var node = root.main.phamuseinfo;
  302. var destNode = root.main.phamuseinfo.dummy;
  303. node.insertAfter(newNode ,destNode);
  304. }
  305. var nodes2 = ins.selectNodes( "/root/main/phamuseinfo/phamuselist" );
  306. var instcd = model.getValue("/root/main/cond/instcd");
  307. var userid = model.getValue("/root/main/cond/userid");
  308. var stocym = model.getValue("/root/main/cond/stocym");
  309. var cnt=0;
  310. for(i=1; i<nodes.length; i++) {
  311. var childnode = nodes.item(i).childnodes;
  312. for(j = 0; j < deptcnts; j++) {
  313. //대분류명 node copy
  314. var newNode = childnode.item(0).cloneNode( true );
  315. nodes2.item(cnt).appendChild(newNode);
  316. //약품코드 node copy
  317. var newNode = childnode.item(1).cloneNode( true );
  318. nodes2.item(cnt).appendChild(newNode);
  319. //구입단가 node copy
  320. var newNode = childnode.item(2).cloneNode( true );
  321. nodes2.item(cnt).appendChild(newNode);
  322. //총합계 node copy
  323. var newNode = childnode.item(7).cloneNode( true );
  324. nodes2.item(cnt).appendChild(newNode);
  325. //관리부서 node copy
  326. var firstChildnode = nodes.item(0).childnodes;
  327. newNode = instance1.createElement("stocdeptcd");
  328. newNode.value = firstChildnode.item(j+9).value;
  329. nodes2.item(cnt).appendChild(newNode);
  330. //수량 node copy
  331. newNode = instance1.createElement("cnt");
  332. newNode.value = childnode.item(j+9).value;
  333. nodes2.item(cnt).appendChild(newNode);
  334. // 기관코드를 조회한다.
  335. newNode = instance1.createElement("instcd");
  336. newNode.value = instcd
  337. nodes2.item(cnt).appendChild(newNode);
  338. //사용자 ID를 넣어준다.
  339. newNode = instance1.createElement("userid");
  340. newNode.value = userid
  341. nodes2.item(cnt).appendChild(newNode);
  342. //작업년월을 넣어준다.
  343. newNode = instance1.createElement("stocym");
  344. newNode.value = stocym
  345. nodes2.item(cnt).appendChild(newNode);
  346. cnt++;
  347. }
  348. }
  349. if(submit("TXRST06901")){
  350. if (submit("TRRST06901", false) == true) {
  351. var grd_deptcd = model.getValue("/root/main/phaminfo/deptlist/grd_deptcd");
  352. if (!isNull(grd_deptcd)) {
  353. grd_phamlist.caption = "대분류^약품코드^구입단가^비용계정비^구코드^복지부분류^약품명^총합^금액^" + grd_deptcd;
  354. }
  355. model.refresh();
  356. }
  357. }
  358. ]]>
  359. </script>
  360. </button>
  361. <line id="line1" class="line_4" style="x1:965px; y1:10px; x2:965px; y2:63px; "/>
  362. <caption id="caption3" class="search_name" style="left:565px; top:16px; width:102px; height:17px; ">부서코드찾기</caption>
  363. <input id="ipt_depthngnm" ref="/root/main/cond/depthngnm" class="input_s_essential" style="left:675px; top:15px; width:97px; height:19px; text-align:center; ">
  364. <script type="javascript" ev:event="onkeydown">
  365. <![CDATA[
  366. if (event.keyCode == "13") {
  367. btn_deptsrch.dispatch("DOMActivate");
  368. }
  369. ]]>
  370. </script>
  371. </input>
  372. <button id="btn_deptsrch" class="icon_search" style="left:776px; top:17px; width:16px; height:16px; ">
  373. <caption/>
  374. <script type="javascript" ev:event="DOMActivate">
  375. <![CDATA[
  376. model.makeValue("/root/send/reqdata/instcd" , model.getValue("root/main/cond/instcd"));
  377. model.makeValue("/root/send/reqdata/depthngnm" , ipt_depthngnm.currentText);
  378. getRszDeptCdList("/root/send/reqdata", "/root/init/orddept");
  379. var nodeCnts = getNodesetCount("/root/init/orddept/deptlist/deptcd")
  380. if (nodeCnts > 0 ) {
  381. group1.visible = true;
  382. } else {
  383. messageBox("검색된 결과가 없습니다.", "I");
  384. }
  385. ]]>
  386. </script>
  387. </button>
  388. <output id="output1" style="left:795px; top:15px; width:140px; height:19px; "/>
  389. <caption id="caption4" class="search_name" style="left:355px; top:40px; width:101px; height:17px; ">부서갯수</caption>
  390. <input id="input2" ref="/root/main/cond/deptcnts" class="input_s_essential" appearance="input" style="left:455px; top:40px; width:97px; height:19px; text-align:center; "/>
  391. </group>
  392. <datagrid id="grd_goodlist" nodeset="/root/main/goodinfo/goodlist" visibility="hidden" caption="약품코드^약품명^구코드^단가^기관코드^물품구분^작업년월^부서코드^대분류코드^재고조정처리여부" colsep="^" colwidth="102, 270, 100, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:75px; top:260px; width:580px; height:139px; ">
  393. <col imemode="alpha" ref="goodcd" type="output" _chartype="upper" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:left; "/>
  394. <col ref="goodnm" type="output" style="text-align:left; "/>
  395. <col ref="oldcd"/>
  396. <col ref="goodunitcost" format="#,###" style="text-align:right; "/>
  397. <col ref="instcd" visibility="hidden" _key="true"/>
  398. <col ref="goodflag" visibility="hidden" _key="true"/>
  399. <script type="javascript" ev:event="ondblclick">
  400. <![CDATA[
  401. if (isDataCell() == true) {
  402. var row = grd_goodlist.row;
  403. var goodcd = model.getValue("/root/main/goodinfo/goodlist[" + row + "]/goodcd");
  404. var goodnm = model.getValue("/root/main/goodinfo/goodlist[" + row + "]/goodnm");
  405. var goodunitcost = model.getValue("/root/main/goodinfo/goodlist[" + row + "]/goodunitcost");
  406. var row2 = grd_phamlist.row;
  407. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c2" , goodcd)
  408. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c7" , goodnm)
  409. model.makeValue("/root/main/phaminfo/phamlist[" + row2 + "]/c3" , goodunitcost)
  410. grd_goodlist.visible = false;
  411. model.refresh();
  412. }
  413. ]]>
  414. </script>
  415. </datagrid>
  416. <button id="button10" class="btn2_letter3" style="left:865px; top:72px; width:53px; height:19px; ">
  417. <caption>행추가</caption>
  418. <script type="javascript" ev:event="DOMActivate">
  419. <![CDATA[
  420. model.makeValue("/root/main/phaminfo/phamlist/c1" , "대분류");
  421. model.makeValue("/root/main/phaminfo/phamlist/c2" , "약품코드");
  422. model.makeValue("/root/main/phaminfo/phamlist/c3" , "구입단가");
  423. model.makeValue("/root/main/phaminfo/phamlist/c4" , "비용계정비");
  424. model.makeValue("/root/main/phaminfo/phamlist/c5" , "구코드");
  425. model.makeValue("/root/main/phaminfo/phamlist/c6" , "복지부분류");
  426. model.makeValue("/root/main/phaminfo/phamlist/c7" , "약품명");
  427. model.makeValue("/root/main/phaminfo/phamlist/c8" , "총합");
  428. model.makeValue("/root/main/phaminfo/phamlist/c9" , "금액");
  429. if(isNull(model.getValue("/root/main/phaminfo/phamlist/c10"))) {
  430. model.makeValue("/root/main/phaminfo/phamlist/c10" , "부서코드");
  431. }
  432. model.makeValue("/root/main/phaminfo/phamlist/c11" , "");
  433. model.makeValue("/root/main/phaminfo/phamlist/c12" , "");
  434. model.makeValue("/root/main/phaminfo/phamlist/c13" , "");
  435. model.makeValue("/root/main/phaminfo/phamlist/c14" , "");
  436. model.makeValue("/root/main/phaminfo/phamlist/c15" , "");
  437. model.makeValue("/root/main/phaminfo/phamlist/c16" , "");
  438. model.makeValue("/root/main/phaminfo/phamlist/c17" , "");
  439. model.makeValue("/root/main/phaminfo/phamlist/c18" , "");
  440. model.makeValue("/root/main/phaminfo/phamlist/c19" , "");
  441. grd_phamlist.refresh();
  442. grd_phamlist.addRow();
  443. ]]>
  444. </script>
  445. </button>
  446. <button id="button11" class="btn2_letter7" style="left:920px; top:72px; width:97px; height:19px; ">
  447. <caption>실사량 가져오기</caption>
  448. <script type="javascript" ev:event="DOMActivate">
  449. <![CDATA[
  450. submit("TRRST06903");
  451. ]]>
  452. </script>
  453. </button>
  454. <button id="btn_excel" class="btn5_letter3" style="left:810px; top:72px; width:53px; height:19px; ">
  455. <caption>Excel</caption>
  456. <script type="javascript" ev:event="DOMActivate">
  457. <![CDATA[
  458. var Stocy = model.getValue("/root/main/cond/stocym").substring(0,4);
  459. var Stocm = model.getValue("/root/main/cond/stocym").substring(5,7);
  460. misfSaveExcel(grd_phamlist , Stocy+"년"+Stocm+"월"+" "+"재고실사내역");
  461. ]]>
  462. </script>
  463. </button>
  464. </case>
  465. <case id="case2">
  466. <select1 id="radio1" ref="/root/main/toggle2_cond/stocflag" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:165px; top:19px; width:345px; height:20px; border-style:none; ">
  467. <choices>
  468. <item>
  469. <label>처방출고처리</label>
  470. <value>P</value>
  471. </item>
  472. <item>
  473. <label>수액처방출고처리</label>
  474. <value>H</value>
  475. </item>
  476. <item>
  477. <label>청구내역출고처리</label>
  478. <value>M</value>
  479. </item>
  480. </choices>
  481. </select1>
  482. <input id="ipt_stocym" ref="/root/main/toggle2_cond/stocym" class="input_default" inputtype="date" format="yyyy-mm" style="left:282px; top:62px; width:95px; height:19px; "/>
  483. <caption id="caption61" class="tit_2" style="left:60px; top:60px; width:100px; height:13px; ">청구내역 출고</caption>
  484. <button id="button39" img="/com/commonweb/images/geomsaek4.gif" hoverImg="/com/commonweb/images/geomsaek4_o.gif" style="left:362px; top:73px; width:23px; height:20px; font-family:굴림체; font-size:9pt; font-weight:bold; ">
  485. <caption/>
  486. </button>
  487. <select1 id="cmb_instcd" ref="/root/main/toggle2_cond/instcd" class="combo_essential" appearance="minimal" style="left:282px; top:40px; width:223px; height:19px; ">
  488. <choices>
  489. <itemset nodeset="/root/init/instcd">
  490. <label ref="cdnm"/>
  491. <value ref="cdid"/>
  492. </itemset>
  493. </choices>
  494. </select1>
  495. <line id="line23" class="line_2" style="x1:181px; y1:82px; x2:508px; y2:82px; "/>
  496. <line id="line35" class="line_3" style="x1:181px; y1:104px; x2:508px; y2:104px; "/>
  497. <caption id="caption7" class="cell_1" style="left:172px; top:84px; width:108px; height:19px; vertical-align:middle; ">작업자</caption>
  498. <caption id="caption44" class="cell_1" style="left:172px; top:62px; width:108px; height:19px; vertical-align:middle; ">마감년월</caption>
  499. <shape id="rectangle9" fillStyle="solid" shape="rectangle" fillColor="#bbbbbb" style="left:50px; top:15px; width:465px; height:120px; border-color:#788daf; "/>
  500. <line id="line2" class="line_2" style="x1:181px; y1:60px; x2:508px; y2:60px; "/>
  501. <button id="btn_gen" class="btn2_letter2" style="left:462px; top:107px; width:42px; height:19px; ">
  502. <caption>생성</caption>
  503. <script type="javascript" ev:event="DOMActivate">
  504. <![CDATA[
  505. var stocflag = model.getValue("/root/main/toggle2_cond/stocflag");
  506. if (stocflag == "P") {
  507. for (var i = 1; i <= 31; i++ ) {
  508. var dd = "";
  509. if ( i < 10) {
  510. dd = "0" + (i).toString();
  511. } else {
  512. dd = (i).toString();
  513. }
  514. var stocdd = model.getValue("/root/main/toggle2_cond/stocym") + dd;
  515. model.setValue("/root/main/toggle2_cond/stocdd", stocdd);
  516. submit("TXRST06902");
  517. }
  518. if (submit("TRRST06902") == true) {
  519. var cnts = getNodesetCount("/root/tmp/cntinfo/cntlist");
  520. if (cnts > 1 ) {
  521. messageBox("처방출고처리가 완료되지 않았습니다. \n 다시 생성버튼을 눌러주세요.", "I");
  522. } else {
  523. messageBox("성공적으로 처방출고처리 되었습니다.", "I");
  524. }
  525. }
  526. }else if(stocflag == "H"){
  527. for (var i = 1; i <= 31; i++ ) {
  528. var dd = "";
  529. if ( i < 10) {
  530. dd = "0" + (i).toString();
  531. } else {
  532. dd = (i).toString();
  533. }
  534. var stocdd = model.getValue("/root/main/toggle2_cond/stocym") + dd;
  535. model.setValue("/root/main/toggle2_cond/stocdd", stocdd);
  536. submit("TXRST06902");
  537. }
  538. if (submit("TRRST06902") == true) {
  539. var cnts = getNodesetCount("/root/tmp/cntinfo/cntlist");
  540. if (cnts > 1 ) {
  541. messageBox("처방출고처리가 완료되지 않았습니다. \n 다시 생성버튼을 눌러주세요.", "I");
  542. } else {
  543. messageBox("성공적으로 처방출고처리 되었습니다.", "I");
  544. }
  545. }
  546. }else {
  547. if (submit("TXRST06902") == true) {
  548. messageBox("작업이 성공적으로 수행되었습니다.", "I");
  549. }
  550. }
  551. ]]>
  552. </script>
  553. </button>
  554. <caption id="caption9" class="cell_1" style="left:172px; top:40px; width:108px; height:19px; vertical-align:middle; ">기관코드</caption>
  555. <line id="line7" class="line_1" style="x1:170px; y1:35px; x2:506px; y2:35px; "/>
  556. <input id="ipt_userid" ref="/root/main/toggle2_cond/userid" class="input_default" appearance="input" style="left:282px; top:84px; width:79px; height:19px; "/>
  557. <input id="ipt_usernm" ref="/root/main/toggle2_cond/usernm" class="input_default" appearance="input" style="left:365px; top:84px; width:140px; height:19px; "/>
  558. </case>
  559. <case id="case3">
  560. <input id="ipt_cond3stocym" ref="/root/main/toggle3_cond/stocym" class="input_default" inputtype="date" format="yyyy-mm" style="left:162px; top:84px; width:90px; height:19px; "/>
  561. <caption id="caption1" class="tit_2" style="left:55px; top:20px; width:100px; height:14px; ">마감처리</caption>
  562. <select1 id="cmb_cond3instcd" ref="/root/main/toggle3_cond/instcd" class="combo_essential" appearance="minimal" style="left:162px; top:40px; width:213px; height:19px; ">
  563. <choices>
  564. <itemset nodeset="/root/init/instcd">
  565. <label ref="cdnm"/>
  566. <value ref="cdid"/>
  567. </itemset>
  568. </choices>
  569. </select1>
  570. <line id="line3" class="line_2" style="x1:51px; y1:105px; x2:378px; y2:105px; "/>
  571. <line id="line4" class="line_3" style="x1:51px; y1:126px; x2:378px; y2:126px; "/>
  572. <caption id="caption5" class="cell_1" style="left:52px; top:84px; width:108px; height:19px; vertical-align:middle; ">작업년월</caption>
  573. <shape id="rectangle1" fillStyle="solid" shape="rectangle" fillColor="#bbbbbb" style="left:50px; top:15px; width:335px; height:140px; border-color:#788daf; "/>
  574. <button id="button7" class="btn2_letter2" style="left:332px; top:129px; width:42px; height:19px; ">
  575. <caption>생성</caption>
  576. <script type="javascript" ev:event="DOMActivate">
  577. <![CDATA[
  578. if (submit("TXRST06903") == true) {
  579. messageBox("작업이 성공적으로 수행되었습니다.", "I");
  580. }
  581. ]]>
  582. </script>
  583. </button>
  584. <line id="line5" class="line_2" style="x1:51px; y1:82px; x2:378px; y2:82px; "/>
  585. <input id="ipt_cond3userid" ref="/root/main/toggle3_cond/userid" class="input_default" appearance="input" style="left:162px; top:106px; width:79px; height:19px; "/>
  586. <caption id="caption8" class="cell_1" style="left:52px; top:106px; width:108px; height:19px; vertical-align:middle; ">작업자</caption>
  587. <caption id="caption10" class="cell_1" style="left:52px; top:40px; width:108px; height:19px; vertical-align:middle; ">기관코드</caption>
  588. <input id="ipt_cond3usernm" ref="/root/main/toggle3_cond/usernm" class="input_default" appearance="input" style="left:245px; top:106px; width:130px; height:19px; "/>
  589. <line id="line6" class="line_1" style="x1:51px; y1:35px; x2:378px; y2:35px; "/>
  590. <caption id="caption11" class="cell_1" style="left:52px; top:62px; width:108px; height:19px; vertical-align:middle; ">물품구분</caption>
  591. <line id="line9" class="line_2" style="x1:51px; y1:60px; x2:378px; y2:60px; "/>
  592. <select1 id="cmb_cond3goodflag" ref="/root/main/toggle3_cond/goodflag" appearance="minimal" style="left:162px; top:62px; width:100px; height:19px; ">
  593. <choices>
  594. <itemset nodeset="/root/init/goodflag">
  595. <label ref="cdnm"/>
  596. <value ref="cdid"/>
  597. </itemset>
  598. </choices>
  599. </select1>
  600. </case>
  601. <case id="case4">
  602. <input id="ipt_cond4userid" ref="/root/main/toggle4_cond/userid" class="input_default" appearance="input" style="left:172px; top:94px; width:79px; height:19px; "/>
  603. <line id="line8" class="line_2" style="x1:61px; y1:70px; x2:388px; y2:70px; "/>
  604. <input id="ipt_cond4usernm" ref="/root/main/toggle4_cond/usernm" class="input_default" appearance="input" style="left:255px; top:94px; width:130px; height:19px; "/>
  605. <input id="input9" ref="/root/main/toggle4_cond/stocym" class="input_default" inputtype="date" format="yyyy-mm" style="left:172px; top:72px; width:90px; height:19px; "/>
  606. <shape id="rectangle2" fillStyle="solid" shape="rectangle" fillColor="#bbbbbb" style="left:60px; top:25px; width:335px; height:140px; border-color:#788daf; "/>
  607. <line id="line10" class="line_2" style="x1:61px; y1:114px; x2:388px; y2:114px; "/>
  608. <line id="line11" class="line_3" style="x1:61px; y1:137px; x2:388px; y2:137px; "/>
  609. <line id="line12" class="line_2" style="x1:61px; y1:92px; x2:388px; y2:92px; "/>
  610. <line id="line13" class="line_1" style="x1:61px; y1:45px; x2:388px; y2:45px; "/>
  611. <button id="button6" class="btn2_letter2" style="left:342px; top:139px; width:42px; height:19px; ">
  612. <caption>생성</caption>
  613. <script type="javascript" ev:event="DOMActivate">
  614. <![CDATA[
  615. if (submit("TXRST06904") == true) {
  616. messageBox("작업이 성공적으로 수행되었습니다.", "I");
  617. }
  618. ]]>
  619. </script>
  620. </button>
  621. <select1 id="cmb_cond4instcd" ref="/root/main/toggle4_cond/instcd" class="combo_essential" appearance="minimal" style="left:172px; top:50px; width:213px; height:19px; ">
  622. <choices>
  623. <itemset nodeset="/root/init/instcd">
  624. <label ref="cdnm"/>
  625. <value ref="cdid"/>
  626. </itemset>
  627. </choices>
  628. </select1>
  629. <caption id="caption12" class="cell_1" style="left:62px; top:50px; width:108px; height:19px; vertical-align:middle; ">기관</caption>
  630. <caption id="caption13" class="tit_2" style="left:65px; top:30px; width:100px; height:14px; ">출고전표처리</caption>
  631. <caption id="caption14" class="cell_1" style="left:62px; top:72px; width:108px; height:19px; vertical-align:middle; ">작업년월</caption>
  632. <caption id="caption15" class="cell_1" style="left:62px; top:116px; width:108px; height:19px; vertical-align:middle; ">작업부서</caption>
  633. <caption id="caption16" class="cell_1" style="left:62px; top:94px; width:108px; height:19px; vertical-align:middle; ">작업자</caption>
  634. <input id="ipt_deptcd" ref="/root/main/toggle4_cond/stocdeptcd" class="input_default" appearance="input" style="left:172px; top:116px; width:79px; height:19px; "/>
  635. <input id="ipt_deptnm" ref="/root/main/toggle4_cond/stocdeptnm" class="input_default" appearance="input" style="left:255px; top:116px; width:130px; height:19px; "/>
  636. </case>
  637. <case id="case5">
  638. <datagrid id="datagrid3" nodeset="/root/main/outendrsltinfo/outendrsltlist" caption="작업년월^대분류&#xA;코드^대분류명^비용계정명^비용계정코드^dcntnm^dcntcd^ 이월수량^ 전월이월&#xA;금액^ 입고수량^ 입고금액^출고수량^ 출고금액^ 재고수량^재고금액|작업년월^대분류&#xA;코드^대분류명^비용계정명^비용계정코드^dcntnm^dcntcd^ 이월수량^ 전월이월&#xA;금액^ 입고수량^ 입고금액^출고수량^ 출고금액^ 재고수량^재고금액" colsep="^" colwidth="57, 45, 64, 94, 24, 12, 17, 82, 113, 112, 113, 98, 127, 91, 118" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:0px; top:62px; width:1090px; height:635px; ">
  639. <col ref="stocym" format="yyyy-mm" style="text-align:center; "/>
  640. <col ref="goodlrgcd" visibility="hidden"/>
  641. <col ref="goodlrgnm" style="text-align:left; "/>
  642. <col ref="acntnm" style="text-align:left; "/>
  643. <col ref="acntcd" visibility="hidden"/>
  644. <col ref="dcntnm" visibility="hidden"/>
  645. <col ref="dcntcd" visibility="hidden"/>
  646. <col ref="beftotqty00" format="#,###.#" style="text-align:right; "/>
  647. <col ref="appunitcost00" format="#,###.#" style="text-align:right; "/>
  648. <col ref="winqty01" format="#,###.#" style="text-align:right; "/>
  649. <col ref="winamt" format="#,###.#" style="text-align:right; "/>
  650. <col ref="outcnts" format="#,###.#" style="text-align:right; "/>
  651. <col ref="totuseamt" format="#,###.#" style="text-align:right; "/>
  652. <col ref="stoccnts" format="#,###.#" style="text-align:right; "/>
  653. <col ref="stocamt" format="#,###.#" style="text-align:right; "/>
  654. </datagrid>
  655. <caption id="caption18" class="tit_2" style="left:0px; top:45px; width:140px; height:14px; ">출고마감 처리 결과</caption>
  656. <button id="button4" class="btn2_letter2" style="left:1025px; top:40px; width:44px; height:19px; ">
  657. <caption>엑셀</caption>
  658. <script type="javascript" ev:event="DOMActivate">
  659. <![CDATA[
  660. saveGridToExcel(datagrid3);
  661. ]]>
  662. </script>
  663. </button>
  664. <group id="group3" style="left:0px; top:0px; width:1090px; height:40px; vertical-align:top; ">
  665. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:-10px; top:0px; width:1095px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  666. <caption id="caption17" class="search_name" style="left:5px; top:11px; width:89px; height:17px; ">기관코드 :</caption>
  667. <output id="output2" ref="/root/main/toggle5_cond/instcd" class="output_fix" style="left:95px; top:10px; width:30px; height:19px; "/>
  668. <output id="output3" ref="/root/main/toggle5_cond/instnm" class="output_fix" style="left:128px; top:10px; width:202px; height:19px; "/>
  669. <button id="button9" class="btn4_letter2" style="left:970px; top:10px; width:56px; height:22px; ">
  670. <caption>조회</caption>
  671. <script type="javascript" ev:event="DOMActivate">
  672. <![CDATA[
  673. if(submit("TRRST06905")){
  674. datagrid3.subtotal("clear", 0, 0);
  675. for(iCol = 1; iCol <=datagrid3.cols ; iCol++){
  676. if((datagrid3.colRef("stocym")!= iCol)&&(datagrid3.colRef("acntnm")!= iCol)) {
  677. datagrid3.subtotal("sum", 1, iCol, "format:(-)#,###.0; ", "background-color:#ffff99; font-weight:bold; ", datagrid3.colRef("stocym"), "합계");
  678. }
  679. }
  680. }
  681. ]]>
  682. </script>
  683. </button>
  684. <caption id="caption19" class="search_name" style="left:355px; top:11px; width:101px; height:17px; ">작업년월</caption>
  685. <input id="input1" ref="/root/main/toggle5_cond/stocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:10px; width:97px; height:19px; text-align:center; "/>
  686. <line id="line14" class="line_4" style="x1:885px; y1:5px; x2:885px; y2:38px; "/>
  687. <select1 id="rdo_srchflag" ref="/root/main/toggle5_cond/srchflag" appearance="full" cols="2" overflow="visible" style="left:635px; top:10px; width:175px; height:20px; border-style:none; ">
  688. <choices>
  689. <item>
  690. <label>대분류별</label>
  691. <value>1</value>
  692. </item>
  693. <item>
  694. <label>비용계정별</label>
  695. <value>2</value>
  696. </item>
  697. </choices>
  698. <script type="javascript" ev:event="xforms-value-changed">
  699. <![CDATA[
  700. var srchflag = model.getValue("/root/main/toggle5_cond/srchflag");
  701. if(srchflag=="1"){
  702. datagrid3.colHidden(datagrid3.colRef("goodlrgnm"))=false;
  703. datagrid3.colHidden(datagrid3.colRef("acntnm"))=true;
  704. }else if(srchflag=="2"){
  705. datagrid3.colHidden(datagrid3.colRef("goodlrgnm"))=true;
  706. datagrid3.colHidden(datagrid3.colRef("acntnm"))=false;
  707. }
  708. ]]>
  709. </script>
  710. </select1>
  711. <caption id="caption20" class="search_name" style="left:570px; top:11px; width:60px; height:17px; ">구분 :</caption>
  712. <caption id="caption21" class="search_name" style="left:570px; top:11px; width:60px; height:17px; ">구분 :</caption>
  713. <input id="input3" ref="/root/main/toggle5_cond/stocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:10px; width:97px; height:19px; text-align:center; "/>
  714. <caption id="caption22" class="search_name" style="left:5px; top:11px; width:89px; height:17px; ">기관코드 :</caption>
  715. <caption id="caption23" class="search_name" style="left:355px; top:11px; width:101px; height:17px; ">작업년월</caption>
  716. <output id="output4" ref="/root/main/toggle5_cond/instcd" class="output_fix" style="left:95px; top:10px; width:30px; height:19px; "/>
  717. <output id="output5" ref="/root/main/toggle5_cond/instnm" class="output_fix" style="left:128px; top:10px; width:202px; height:19px; "/>
  718. </group>
  719. </case>
  720. <case id="case6">
  721. <group id="group4" style="left:0px; top:0px; width:1090px; height:40px; vertical-align:top; ">
  722. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:-10px; top:0px; width:1095px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  723. <caption id="caption24" class="search_name" style="left:5px; top:11px; width:89px; height:17px; ">기관코드 :</caption>
  724. <output id="output6" ref="/root/main/toggle5_cond/instcd" class="output_fix" style="left:95px; top:10px; width:30px; height:19px; "/>
  725. <output id="output7" ref="/root/main/toggle5_cond/instnm" class="output_fix" style="left:128px; top:10px; width:202px; height:19px; "/>
  726. <button id="button13" class="btn4_letter2" style="left:970px; top:10px; width:56px; height:22px; ">
  727. <caption>조회</caption>
  728. <script type="javascript" ev:event="DOMActivate">
  729. <![CDATA[
  730. if(submit("TRRST06907")){
  731. datagrid4.subtotal("clear", 0, 0);
  732. for(iCol = 1; iCol <=datagrid4.cols ; iCol++){
  733. if( (datagrid4.colRef("stocym")!= iCol) && (datagrid4.colRef("acntnm")!= iCol) ) {
  734. datagrid4.subtotal("sum", 1, iCol, "format:(-)#,###.0; ", "background-color:#ffff99; font-weight:bold; ", datagrid4.colRef("stocym"), "합계");
  735. }
  736. }
  737. }
  738. ]]>
  739. </script>
  740. </button>
  741. <caption id="caption25" class="search_name" style="left:355px; top:11px; width:101px; height:17px; ">작업년월</caption>
  742. <input id="input4" ref="/root/main/toggle5_cond/stocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:10px; width:97px; height:19px; text-align:center; "/>
  743. <line id="line15" class="line_4" style="x1:885px; y1:5px; x2:885px; y2:38px; "/>
  744. <input id="input5" ref="/root/main/toggle6_cond/fromstocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:455px; top:10px; width:97px; height:19px; text-align:center; "/>
  745. <caption id="caption28" class="search_name" style="left:5px; top:11px; width:89px; height:17px; ">기관코드 :</caption>
  746. <caption id="caption29" class="search_name" style="left:355px; top:11px; width:101px; height:17px; ">작업년월</caption>
  747. <output id="output8" ref="/root/main/toggle6_cond/instcd" class="output_fix" style="left:95px; top:10px; width:30px; height:19px; "/>
  748. <output id="output9" ref="/root/main/toggle6_cond/instnm" class="output_fix" style="left:128px; top:10px; width:202px; height:19px; "/>
  749. <caption id="caption27" class="search_n_b" style="left:560px; top:12px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  750. <input id="input6" ref="/root/main/toggle6_cond/tostocym" class="input_s_essential" inputtype="date" format="yyyy-mm" style="left:581px; top:11px; width:97px; height:19px; text-align:center; "/>
  751. </group>
  752. <datagrid id="datagrid4" nodeset="/root/main/drugacctinfo/drugacctlist" caption="작업년월^비용계정명^비용계정코드^dcntnm^dcntcd^이월수량^전월이월금액^ 입고수량^ 입고금액^ 재고수량^재고금액|작업년월^비용계정명^비용계정코드^dcntnm^dcntcd^이월수량^전월이월금액^ 입고수량^ 입고금액^ 재고수량^재고금액" colsep="^" colwidth="178, 94, 24, 12, 17, 100, 140, 112, 142, 111, 146" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" subtotalposition="below" style="left:0px; top:62px; width:1090px; height:635px; ">
  753. <col ref="stocym" style="text-align:center; "/>
  754. <col ref="acntnm" style="text-align:left; "/>
  755. <col ref="acntcd" visibility="hidden"/>
  756. <col ref="dcntnm" visibility="hidden"/>
  757. <col ref="dcntcd" visibility="hidden"/>
  758. <col ref="beftotqty00" format="#,###.#" style="text-align:right; "/>
  759. <col ref="appunitcost00" format="#,###.#" style="text-align:right; "/>
  760. <col ref="winqty01" format="#,###.#" style="text-align:right; "/>
  761. <col ref="winamt" format="#,###.#" style="text-align:right; "/>
  762. <col ref="stoccnts" format="#,###.#" style="text-align:right; "/>
  763. <col ref="stocamt" format="#,###.#" style="text-align:right; "/>
  764. </datagrid>
  765. <button id="button14" class="btn2_letter2" style="left:1025px; top:40px; width:44px; height:19px; ">
  766. <caption>엑셀</caption>
  767. <script type="javascript" ev:event="DOMActivate">
  768. <![CDATA[
  769. saveGridToExcel(datagrid4);
  770. ]]>
  771. </script>
  772. </button>
  773. <caption id="caption26" class="tit_2" style="left:0px; top:45px; width:140px; height:14px; ">약품 회계자료조회</caption>
  774. </case>
  775. </switch>
  776. <button id="button1" class="btn_sw" group="tab" style="left:231px; top:20px; width:115px; height:22px; ">
  777. <caption>마감처리</caption>
  778. <toggle case="case3" ev:event="DOMActivate"/>
  779. <script type="javascript" ev:event="onclick">
  780. <![CDATA[
  781. rszfUserInstList(cmb_cond3instcd,getUserInfo("userid"));
  782. model.setValue(cmb_cond3instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  783. model.setValue(ipt_cond3userid.attribute("ref") , getUserInfo("userid"));
  784. model.setValue(ipt_cond3usernm.attribute("ref") , getUserInfo("usernm"));
  785. // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
  786. model.setValue(cmb_cond3goodflag.attribute("ref") , "PH");
  787. model.setValue("/root/main/toggle3_cond/stocym" , model.getValue("/root/main/cond/stocym"));
  788. model.refresh();
  789. ]]>
  790. </script>
  791. </button>
  792. <button id="button3" class="btn_sw" visibility="hidden" group="tab" style="left:796px; top:20px; width:115px; height:22px; ">
  793. <caption>사용분 전표처리</caption>
  794. <toggle case="case4" ev:event="DOMActivate"/>
  795. <script type="javascript" ev:event="onclick">
  796. <![CDATA[
  797. rszfUserInstList(cmb_cond4instcd ,getUserInfo("userid"));
  798. model.setValue(cmb_cond4instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  799. model.setValue(ipt_deptcd.attribute("ref") , getUserInfo("dutplcecd"));
  800. model.setValue(ipt_deptnm.attribute("ref") , getUserInfo("dutplcenm"));
  801. model.setValue(ipt_cond4userid.attribute("ref") , getUserInfo("userid"));
  802. model.setValue(ipt_cond4usernm.attribute("ref") , getUserInfo("usernm"));
  803. model.setValue("/root/main/toggle4_cond/stocym" , model.getValue("/root/main/cond/stocym"));
  804. model.refresh();
  805. ]]>
  806. </script>
  807. </button>
  808. <group id="group1" visibility="hidden" style="left:650px; top:115px; width:255px; height:185px; ">
  809. <datagrid id="datagrid2" nodeset="/root/init/orddept/deptlist" caption="부서명^부서코드명^영문약어" colsep="^" colwidth="100, 82, 55" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:25px; width:255px; height:160px; ">
  810. <col ref="depthngnm"/>
  811. <col ref="deptcd" type="input"/>
  812. <col ref="deptengabbr"/>
  813. <script type="javascript" ev:event="onclick">
  814. <![CDATA[
  815. datagrid2.editCell();
  816. ]]>
  817. </script>
  818. <script type="javascript" ev:event="ondblclick">
  819. <![CDATA[
  820. if (datagrid2.col == datagrid2.colRef("depthngnm")) {
  821. grd_phamlist.valueMatrix(grd_phamlist.row, grd_phamlist.col) = model.getValue("/root/init/orddept/deptlist[" + datagrid2.row + "]/deptcd");
  822. group1.visible = false;
  823. } else {
  824. datagrid2.editCell();
  825. }
  826. ]]>
  827. </script>
  828. </datagrid>
  829. <button id="button5" class="btn2_letter3" style="left:185px; top:4px; width:53px; height:19px; ">
  830. <caption>숨기기</caption>
  831. <script type="javascript" ev:event="DOMActivate">
  832. <![CDATA[
  833. group1.visible = false;
  834. ]]>
  835. </script>
  836. </button>
  837. </group>
  838. <button id="button8" class="btn_sw" group="tab" style="left:346px; top:20px; width:115px; height:22px; ">
  839. <caption>처리결과</caption>
  840. <toggle case="case5" ev:event="DOMActivate"/>
  841. <script type="javascript" ev:event="onclick">
  842. <![CDATA[
  843. rszfUserInstList(cmb_cond4instcd ,getUserInfo("userid"));
  844. model.setValue("/root/main/toggle5_cond/instcd" , getUserInfo("dutplceinstcd"));
  845. model.setValue(output3.attribute("ref"), getUserInfo("dutplceinstnm"));
  846. model.setValue("/root/main/toggle5_cond/stocym" , model.getValue("/root/main/cond/stocym"));
  847. model.setValue("/root/main/toggle5_cond/srchflag","2");
  848. model.refresh();
  849. rdo_srchflag.dispatch("xforms-value-changed");
  850. ]]>
  851. </script>
  852. </button>
  853. <button id="btn_01" class="btn_sw" group="tab" selected="true" style="left:1px; top:20px; width:115px; height:22px; ">
  854. <caption>재고실사내역</caption>
  855. <script type="javascript" ev:event="DOMActivate">
  856. <![CDATA[
  857. rszfUserGoodFlagList(cmb_cond3goodflag, getUserInfo("userid"));
  858. var sDate = getCurrentDate();
  859. var cDate = sDate.substring(0, 6);
  860. model.setValue("/root/main/cond/stocym" , cDate);
  861. model.setValue(opt_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  862. model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm"));
  863. model.setValue("/root/main/cond/userid", getUserId());
  864. model.setValue("/root/main/cond/usernm", getUserInfo("usernm"));
  865. model.toggle("case1");
  866. model.refresh();
  867. ]]>
  868. </script>
  869. </button>
  870. <button id="btn_03" class="btn_sw" disabled="true" group="tab" style="left:116px; top:20px; width:115px; height:22px; ">
  871. <caption>청구내역출고처리</caption>
  872. <!--<toggle case="case2" ev:event="DOMActivate"/>-->
  873. <script type="javascript" ev:event="DOMActivate">
  874. <![CDATA[
  875. model.toggle("case2");
  876. rszfUserInstList(cmb_instcd,getUserInfo("userid"));
  877. model.setValue(cmb_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  878. model.setValue(ipt_userid.attribute("ref") , getUserInfo("userid"));
  879. model.setValue(ipt_usernm.attribute("ref") , getUserInfo("usernm"));
  880. model.setValue("/root/main/toggle2_cond/stocym", model.getValue("/root/main/cond/stocym"));
  881. model.refresh();
  882. ]]>
  883. </script>
  884. </button>
  885. <button id="button12" class="btn_sw" group="tab" style="left:460px; top:20px; width:115px; height:22px; ">
  886. <caption>회계자료조회</caption>
  887. <toggle case="case6" ev:event="DOMActivate"/>
  888. <script type="javascript" ev:event="onclick">
  889. <![CDATA[
  890. rszfUserInstList(cmb_cond4instcd ,getUserInfo("userid"));
  891. model.setValue("/root/main/toggle6_cond/instcd" , getUserInfo("dutplceinstcd"));
  892. model.setValue(output9.attribute("ref"), getUserInfo("dutplceinstnm"));
  893. model.setValue("/root/main/toggle6_cond/tostocym" , model.getValue("/root/main/cond/stocym"));
  894. model.setValue("/root/main/toggle6_cond/fromstocym" , model.getValue("/root/main/cond/stocym"));
  895. model.refresh();
  896. ]]>
  897. </script>
  898. </button>
  899. </xhtml:body>
  900. </xhtml:html>