SMRSC09000_상비약품관리.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. <?xml version="1.0" encoding="UTF-8"?>
  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. <main>
  10. <stockdata>
  11. <item>
  12. <reqdeptcd/>
  13. <reqdeptnm/>
  14. <goodcd/>
  15. <goodnm/>
  16. <allsizespecid/>
  17. <drugqty/>
  18. <keepmth/>
  19. <lastupdtdt/>
  20. <clinicreason/>
  21. <modifyreason/>
  22. <goodunitcost/>
  23. <lrgnm/>
  24. <mdlnm/>
  25. <smlnm/>
  26. <allsizecnt/>
  27. <cmt/>
  28. <todd/>
  29. </item>
  30. </stockdata>
  31. <deptdata>
  32. <item>
  33. <deptcd/>
  34. <deptnm/>
  35. <itemcnt/>
  36. <itemamt/>
  37. </item>
  38. </deptdata>
  39. <historydata>
  40. <item>
  41. <reqdeptnm/>
  42. <goodcd/>
  43. <goodnm/>
  44. <drugqty/>
  45. <setunit/>
  46. <lastupdt/>
  47. <modifyreason/>
  48. <cmt/>
  49. </item>
  50. </historydata>
  51. <articleCnt/>
  52. <totalPrice/>
  53. <itemcnt/>
  54. <itemamt/>
  55. <prtlist>
  56. <drugprtinfo>
  57. <drugprtlist/>
  58. </drugprtinfo>
  59. </prtlist>
  60. </main>
  61. <init>
  62. <lrgCategory>
  63. </lrgCategory>
  64. <mdlCategory>
  65. </mdlCategory>
  66. <smlCategory>
  67. </smlCategory>
  68. <viwoption>
  69. <reqdeptcd/>
  70. <reqdeptnm/>
  71. <lrgnm/>
  72. <mdlnm/>
  73. <smlnm/>
  74. <lastupdt/>
  75. <lastupdtnm/>
  76. </viwoption>
  77. <CheckData/>
  78. <usernm/>
  79. <drugflag>
  80. <item>
  81. <label>일반약</label>
  82. <value>1</value>
  83. </item>
  84. <item>
  85. <label>마약류</label>
  86. <value>2</value>
  87. </item>
  88. <item>
  89. <label>비치약품</label>
  90. <value>3</value>
  91. </item>
  92. <item>
  93. <label>응급약물</label>
  94. <value>4</value>
  95. </item>
  96. </drugflag>
  97. </init>
  98. <send>
  99. <search>
  100. <instcd/>
  101. <lrgcd/>
  102. <mdlcd/>
  103. <smlcd/>
  104. <deptcd/>
  105. <deptnm/>
  106. <drugtxt/>
  107. <drugnm/>
  108. <drugcd/>
  109. <allsizespecid/>
  110. <totalflag/>
  111. <drugflag>1</drugflag>
  112. </search>
  113. <saveData/>
  114. <category>
  115. <goodflag/>
  116. <lrgcd/>
  117. <mdlcd/>
  118. </category>
  119. </send>
  120. <temp>
  121. <usrSelectDrugcd/>
  122. <receivedata>
  123. <receiveref>/root/temp/usrSelectDrugcd</receiveref>
  124. </receivedata>
  125. <tmpDrugDetail/>
  126. <result/>
  127. <copyVal/>
  128. <category/>
  129. <selectDept>/root/temp/selectDept/deptnm</selectDept>
  130. </temp>
  131. <target>
  132. <recvref>/root/main/stockdata/item</recvref>
  133. <recvitem>
  134. <reqdeptcd/>
  135. <reqdeptnm/>
  136. </recvitem>
  137. <control>grd_stock</control>
  138. <defaultvalue>012</defaultvalue>
  139. </target>
  140. <hidden>
  141. <allchk/>
  142. <allvisble/>
  143. </hidden>
  144. </root>
  145. </instance>
  146. <script type="javascript" ev:event="xforms-ready">
  147. <![CDATA[
  148. fInitForm() ;
  149. var jobkindcd = getUserInfo("jobkindcd");
  150. if (jobkindcd != '1220') {
  151. fAllVisble() ;
  152. }
  153. ]]>
  154. </script>
  155. <submission id="TRRSC09001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/deptdata"/>
  156. <submission id="TRRSC09002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/stockdata"/>
  157. <submission id="TRRSC09003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/historydata"/>
  158. <submission id="TXRSC09001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/saveData" replace="instance" resultref="/root/temp/result"/>
  159. <bind id="itemcnt" ref="/root/main/itemcnt" calculate="sum(/root/main/deptdata/item/itemcnt)" type="xsd:float"/>
  160. <bind id="itemamt" ref="/root/main/itemamt" calculate="sum(/root/main/deptdata/item/itemamt)" type="xsd:float"/>
  161. <bind id="articleCnt" ref="/root/main/articleCnt" calculate="count(/root/main/stockdata/item)" type="xsd:float"/>
  162. <bind id="totalPrice" ref="/root/main/totalPrice" calculate="sum(/root/main/stockdata/item/itemamt)" type="xsd:float"/>
  163. <submission id="TRRSC09004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/prtlist"/>
  164. </model>
  165. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  166. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  167. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  168. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  169. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  170. <script type="javascript" src="../../../mis/purcbaseweb/js/SMRSC09000.js"/>
  171. <script type="javascript">
  172. <![CDATA[
  173. /**
  174. * @ver : 2011-03-26
  175. * @desc : 선택약품을 적용
  176. * @param :
  177. * @return :
  178. * @---------------------------------------------------
  179. */
  180. function fAllVisble(){
  181. button2.visible = false ;
  182. button4.visible = false ;
  183. caption8.visible = false ;
  184. cpt_excel.visible = false ;
  185. ckb_reqdeptcd.visible = false ;
  186. ckb_mdlnm.visible = false ;
  187. ckb_reqdeptnm.visible = false ;
  188. ckb_smlnm.visible = false ;
  189. ckb_lrgnm.visible = false ;
  190. ckb_lastupdt.visible = false ;
  191. chk_lastupdtnm.visible = false ;
  192. btn_excel.visible = false ;
  193. button3.visible = false ;
  194. btn_addRow.visible = false ;
  195. btn_delRow.visible = false ;
  196. btn_save.visible = false ;
  197. btn_find.disabled = true ;
  198. btn_HistoryExcel.visible = false ;
  199. var vdutplcecd = getUserInfo("dutplcecd");
  200. var vdutplcenm = getUserInfo("dutplcenm");
  201. model.setValue("/root/send/search/deptcd", vdutplcecd );
  202. model.setValue("root/send/search/deptnm", vdutplcenm);
  203. model.refresh();
  204. }
  205. function fGetGrugGoodInfo(getRCVS){
  206. var params = getRCVS.split("▩");
  207. var duplFlag = false;
  208. for(var i = 1; i <(params.length-1); i++){
  209. var sGoodcd = params[i].split("▦")[1]; //물품코드
  210. var sGoodcdEngnm = params[i].split("▦")[2]; //물품영문명
  211. var Setunit = params[i].split("▦")[11]; //발주단위
  212. var sGoodunitcost = params[i].split("▦")[12]; //물품구입단가
  213. var k;
  214. for(k =0;k <grd_stock.rows;k++){
  215. compGoodcd = grd_stock.valueMatrix(k,grd_stock.colRef("goodcd"));
  216. if(sGoodcd ==compGoodcd){
  217. duplFlag = true;
  218. break;
  219. }else{
  220. duplFlag = false;
  221. }
  222. }
  223. if(duplFlag == true){
  224. messageBox(sGoodcd+"은(는) 이미 등록하신 코드","I009");
  225. }else{
  226. grd_stock.addRow(false);
  227. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/reqdeptcd" ,model.getValue(ipt_deptcd.attribute("ref")));
  228. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/drugflag" ,model.getValue(rdo_drugflag.attribute("ref")));
  229. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/goodcd" ,sGoodcd);
  230. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/goodnm" ,sGoodcdEngnm);
  231. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/setunit" ,Setunit);
  232. model.makeValue("/root/main/stockdata/item["+grd_stock.row+"]/goodunitcost" ,sGoodunitcost);
  233. }
  234. }
  235. grd_stock.refresh();
  236. }
  237. ]]>
  238. </script>
  239. </xhtml:head>
  240. <xhtml:body>
  241. <group id="group1" style="left:8px; top:15px; width:1193px; height:740px; ">
  242. <button id="btn_save" class="btn4_letter2" style="left:1132px; top:110px; width:56px; height:22px; ">
  243. <caption>저장</caption>
  244. <script type="javascript" ev:event="DOMActivate">
  245. <![CDATA[
  246. fSave();
  247. ]]>
  248. </script>
  249. </button>
  250. <shape id="rnd_searcharea" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:8px; width:1186px; height:77px; "/>
  251. <caption id="cap_search_dept" class="search_name" style="left:10px; top:15px; width:86px; height:17px; vertical-align:middle; ">기관코드 :</caption>
  252. <select1 id="cmb_instcd" ref="/root/send/search/instcd" disabled="true" appearance="minimal" style="left:100px; top:15px; width:125px; height:19px; ">
  253. <choices>
  254. <itemset nodeset="/root/init/goodflag">
  255. <label ref="cdnm"/>
  256. <value ref="cdid"/>
  257. </itemset>
  258. </choices>
  259. </select1>
  260. <caption id="caption1" class="search_name" style="left:720px; top:15px; width:83px; height:17px; vertical-align:middle; ">대 분 류 :</caption>
  261. <caption id="caption3" class="search_name" style="left:720px; top:37px; width:83px; height:17px; vertical-align:middle; ">중 분 류 :</caption>
  262. <caption id="caption4" class="search_name" style="left:720px; top:59px; width:83px; height:17px; vertical-align:middle; ">소 분 류 :</caption>
  263. <caption id="cap_search_available" class="search_name" style="left:240px; top:15px; width:85px; height:17px; vertical-align:middle; ">부 서 :</caption>
  264. <caption id="caption5" class="search_name" style="left:240px; top:37px; width:86px; height:17px; vertical-align:middle; ">약품코드 :</caption>
  265. <line id="line13" style="x1:1106px; y1:27px; x2:1106px; y2:73px; border-color:#ffe4bb; border-left-style:solid; "/>
  266. <button id="btn_search" class="btn1_letter2" style="left:1116px; top:40px; width:56px; height:22px; ">
  267. <caption>조회</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. //if (model.getValue(ipt_deptcd.attribute("ref")) == "") {
  271. model.setValue(ipt_allsizespecid.attribute("ref") , "-");
  272. //}
  273. misfGridInit(grd_dept);
  274. submit("TRRSC09001");
  275. fSearch();
  276. ]]>
  277. </script>
  278. </button>
  279. <button id="btn_excel" class="btn2_letter2" style="left:905px; top:112px; width:42px; height:19px; ">
  280. <caption>엑셀</caption>
  281. <script type="javascript" ev:event="DOMActivate">
  282. <![CDATA[
  283. fSaveExcel();
  284. ]]>
  285. </script>
  286. </button>
  287. <button id="btn_addRow" class="btn2_letter3" visibility="visible" style="left:1018px; top:112px; width:53px; height:19px; ">
  288. <caption>행추가</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. fAddRow();
  292. ]]>
  293. </script>
  294. </button>
  295. <!--
  296. <button id="btn_copyRow" class="btn2_letter3" style="left:1076px; top:112px; width:53px; height:19px; ">
  297. <caption>행복사</caption>
  298. <script type="javascript" ev:event="DOMActivate">
  299. <![CDATA[
  300. fRowCopy();
  301. ]]>
  302. </script>
  303. </button>
  304. -->
  305. <button id="btn_delRow" class="btn2_letter3" style="left:1075px; top:112px; width:53px; height:19px; ">
  306. <caption>행삭제</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. misfGridIUD(grd_stock, "D");
  310. ]]>
  311. </script>
  312. </button>
  313. <datagrid id="grd_dept" nodeset="/root/main/deptdata/item" class="datagrid2" autoresize="true" caption="부서코드^^부서이름^품목수^금액^AllSize^PREAMT" colsep="^" colwidth="7, 25, 129, 44, 86, 100, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:140px; width:330px; height:595px; ">
  314. <col ref="deptcd" visibility="hidden"/>
  315. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  316. <col ref="deptnm"/>
  317. <col ref="itemcnt" format="#,###" style="text-align:right; "/>
  318. <col ref="itemamt" format="(-)#,###" style="text-align:right; "/>
  319. <col ref="allsizespecid" visibility="hidden"/>
  320. <col ref="itemamtp" visibility="hidden"/>
  321. <script type="javascript" ev:event="onclick">
  322. <![CDATA[
  323. fSearchStockList();
  324. ]]>
  325. </script>
  326. </datagrid>
  327. <datagrid id="grd_stock" nodeset="/root/main/stockdata/item" class="datagrid2" caption="순번^부서코드^부서^대분류^중분류^소분류^상품코드^상품코드^상품명^수량^단위^보관^보관방법^단가^등록일^임상적&#xA;보유사유^조정사유^비고^최종변경자^관리구분^종료일자" colsep="^" colwidth="38, 91, 100, 100, 100, 100, 89, 16, 163, 47, 82, 12, 65, 50, 80, 65, 77, 138, 71, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:340px; top:140px; width:849px; height:361px; ">
  328. <col ref="rowno" visibility="hidden"/>
  329. <col ref="reqdeptcd" type="output" visibility="hidden"/>
  330. <col class="input_essential" ref="reqdeptnm" type="output" visibility="hidden"/>
  331. <col ref="lrgnm" visibility="hidden"/>
  332. <col ref="mdlnm" visibility="hidden"/>
  333. <col ref="smlnm" visibility="hidden"/>
  334. <col class="input_essential" ref="goodcd" type="output"/>
  335. <col ref="allsizespecid" visibility="hidden"/>
  336. <col ref="goodnm"/>
  337. <col class="input_essential" ref="drugqty" type="input" style="text-align:right; "/>
  338. <col ref="setunit" style="text-align:center; "/>
  339. <col ref="keepmth" visibility="hidden"/>
  340. <col ref="pemtkeepmthd"/>
  341. <col ref="goodunitcost" format="#,###" style="text-align:right; "/>
  342. <col ref="lastupdt" type="output" visibility="hidden"/>
  343. <col ref="clinicreason" type="input"/>
  344. <col class="input_essential" ref="modifyreason" type="input"/>
  345. <col ref="cmt" type="input"/>
  346. <col ref="lastupdtnm" type="output" visibility="hidden"/>
  347. <col ref="drugflag" visibility="hidden"/>
  348. <col ref="todd"/>
  349. <script type="javascript" ev:event="onclick">
  350. <![CDATA[
  351. if(grd_stock.col != grd_stock.colRef("cmt")){
  352. fOperationStockGrid();
  353. }
  354. ]]>
  355. </script>
  356. <script type="javascript" ev:event="onendedit">
  357. <![CDATA[
  358. if(grd_stock.col == grd_stock.colRef("drugqty")){
  359. if(event.keyCode=="13"){
  360. if(grd_stock.row < grd_stock.rows - grd_stock.fixedRows){
  361. grd_stock.row = grd_stock.row + 1;
  362. grd_stock.select(grd_stock.row, grd_stock.colRef("drugqty")) = true;
  363. }
  364. }
  365. grd_stock.refresh();
  366. }
  367. ]]>
  368. </script>
  369. </datagrid>
  370. <datagrid id="grd_history" nodeset="/root/main/historydata/item" class="datagrid2" autoresize="true" caption="부서명^코드명^상품명^용량^수량^단위^보관^조정일^조정사유^비고^변경자^관리구분" colsep="^" colwidth="90, 84, 160, 61, 45, 78, 47, 121, 96, 55, 59, 100" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:340px; top:535px; width:849px; height:200px; ">
  371. <col ref="reqdeptnm"/>
  372. <col ref="goodcd"/>
  373. <col ref="goodnm"/>
  374. <col ref="goodmodel"/>
  375. <col ref="drugqty" format="#,###" style="text-align:right; "/>
  376. <col ref="setunit"/>
  377. <col ref="keepmth"/>
  378. <col ref="lastupdt" format="yyyy-mm-dd"/>
  379. <col ref="modifyreason"/>
  380. <col ref="cmt"/>
  381. <col ref="lastupdtnm"/>
  382. <col ref="drugflag" visibility="hidden"/>
  383. </datagrid>
  384. <select1 id="cmb_lrg" ref="/root/send/search/lrgcd" appearance="minimal" style="left:805px; top:15px; width:150px; height:19px; ">
  385. <choices>
  386. <itemset nodeset="/root/init/lrgCategory/item">
  387. <label ref="iname"/>
  388. <value ref="icode"/>
  389. </itemset>
  390. </choices>
  391. <script type="javascript" ev:event="xforms-value-changed">
  392. <![CDATA[
  393. rszfLMSComboList(model.getValue(ipt_goodflag.attribute("ref")), cmb_lrg.value, "", "cmb_mdl", "", "M", "Y", "Y");
  394. cmb_mdl.value="";
  395. cmb_sml.value="";
  396. ]]>
  397. </script>
  398. </select1>
  399. <select1 id="cmb_mdl" ref="/root/send/search/mdlcd" appearance="minimal" style="left:805px; top:37px; width:150px; height:19px; ">
  400. <choices>
  401. <itemset nodeset="/root/init/mdlCategory/item">
  402. <label ref="iname"/>
  403. <value ref="icode"/>
  404. </itemset>
  405. </choices>
  406. <script type="javascript" ev:event="xforms-value-changed">
  407. <![CDATA[
  408. rszfLMSComboList(model.getValue(ipt_goodflag.attribute("ref")), cmb_lrg.value, cmb_mdl.value, "cmb_sml", "", "S", "Y", "Y");
  409. cmb_sml.value="";
  410. ]]>
  411. </script>
  412. </select1>
  413. <select1 id="cmb_sml" ref="/root/send/search/smlcd" appearance="minimal" style="left:805px; top:59px; width:150px; height:19px; ">
  414. <choices>
  415. <itemset nodeset="/root/init/smlCategory/item">
  416. <label ref="iname"/>
  417. <value ref="icode"/>
  418. </itemset>
  419. </choices>
  420. </select1>
  421. <input id="ipt_deptcd" ref="/root/send/search/deptcd" style="left:325px; top:15px; width:85px; height:19px; ">
  422. <script type="javascript" ev:event="xforms-value-changed">
  423. <![CDATA[
  424. misfValidationCheck("02", "", "deptcd,deptnm", ipt_deptcd.value, "instcd");
  425. model.refresh();
  426. ]]>
  427. </script>
  428. </input>
  429. <output id="opt_deptnm" ref="/root/send/search/deptnm" class="output_fix" style="left:445px; top:15px; width:165px; height:19px; "/>
  430. <output id="opt_goodnm" ref="/root/send/search/drugnm" class="output_fix" style="left:445px; top:37px; width:165px; height:19px; "/>
  431. <input id="ipt_goodcd" ref="/root/send/search/drugcd" style="left:325px; top:37px; width:85px; height:19px; ">
  432. <script type="javascript" ev:event="xforms-value-changed">
  433. <![CDATA[
  434. if (ipt_goodcd.value != "")
  435. {
  436. rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd",
  437. "goodcd," + cmb_instcd.value + "," + ipt_goodflag.value + "," + ipt_goodcd.value ,"","drugcd,drugnm",
  438. ipt_goodcd,"SPRSD00210","instcd,goodflag","cmb_instcd,ipt_goodflag");
  439. }else{
  440. ipt_goodcd.value = "";
  441. opt_goodnm.value = "";
  442. }
  443. model.refresh();
  444. ]]>
  445. </script>
  446. </input>
  447. <button id="btn_find" class="icon_search" style="left:415px; top:15px; width:16px; height:16px; ">
  448. <caption/>
  449. <script type="javascript" ev:event="DOMActivate">
  450. <![CDATA[
  451. var recv_list = "deptcd,deptnm";
  452. misfOpenPopUpList("02", ipt_deptcd,"", recv_list, cmb_instcd.value, "instcd") ;
  453. model.refresh();
  454. ]]>
  455. </script>
  456. </button>
  457. <caption id="caption11" class="tit_2" style="left:0px; top:118px; width:45px; height:13px; ">
  458. <![CDATA[부서]]>
  459. </caption>
  460. <line id="line11" class="line_1" style="x1:0px; y1:133px; x2:330px; y2:133px; "/>
  461. <line id="line1" class="line_1" style="x1:340px; y1:133px; x2:1189px; y2:133px; "/>
  462. <caption id="caption2" class="tit_2" style="left:341px; top:119px; width:144px; height:13px; ">부서별 상비약품량</caption>
  463. <input id="ipt_goodflag" ref="/root/send/category/goodflag" visibility="hidden" style="left:640px; top:55px; width:75px; height:19px; "/>
  464. <input id="ipt_goodnm" ref="/root/send/search/drugtxt" class="input_default" style="left:325px; top:59px; width:193px; height:19px; "/>
  465. <caption id="caption27" class="search_name" style="left:240px; top:59px; width:85px; height:17px; ">약 품 명 :</caption>
  466. <button id="button1" class="icon_search" style="left:415px; top:37px; width:16px; height:16px; ">
  467. <caption/>
  468. <script type="javascript" ev:event="DOMActivate">
  469. <![CDATA[
  470. fSelectDrug();
  471. ]]>
  472. </script>
  473. </button>
  474. <caption id="caption7" style="left:138px; top:116px; width:38px; height:15px; font-weight:bold; text-align:center; vertical-align:top; ">합계 :</caption>
  475. <caption id="caption12" class="tit_2" style="left:340px; top:513px; width:177px; height:13px; ">상비약품 변경이력</caption>
  476. <line id="line2" class="line_1" style="x1:340px; y1:529px; x2:1189px; y2:529px; "/>
  477. <button id="btn_HistoryExcel" class="btn2_letter2" style="left:1145px; top:507px; width:42px; height:19px; ">
  478. <caption>엑셀</caption>
  479. <script type="javascript" ev:event="DOMActivate">
  480. <![CDATA[
  481. misfSaveExcel(grd_history, "부서상비약품변경이력_"+getCurrentDate());
  482. // fSaveHistoryExcel();
  483. ]]>
  484. </script>
  485. </button>
  486. <select id="ckb_reqdeptcd" ref="/root/init/viwoption/reqdeptcd" overflow="visible" appearance="full" style="left:675px; top:97px; width:70px; height:15px; border-style:none; ">
  487. <choices>
  488. <item>
  489. <label>부서코드</label>
  490. <value>Y</value>
  491. </item>
  492. </choices>
  493. <script type="javascript" ev:event="xforms-value-changed">
  494. <![CDATA[
  495. fSumViewOption(grd_stock,ckb_reqdeptcd, "reqdeptcd");
  496. ]]>
  497. </script>
  498. </select>
  499. <select id="ckb_reqdeptnm" ref="/root/init/viwoption/reqdeptnm" overflow="visible" appearance="full" style="left:748px; top:97px; width:57px; height:15px; border-style:none; ">
  500. <choices>
  501. <item>
  502. <label>부서명</label>
  503. <value>Y</value>
  504. </item>
  505. </choices>
  506. <script type="javascript" ev:event="xforms-value-changed">
  507. <![CDATA[
  508. fSumViewOption(grd_stock,ckb_reqdeptnm, "reqdeptnm");
  509. ]]>
  510. </script>
  511. </select>
  512. <select id="ckb_lrgnm" ref="/root/init/viwoption/lrgnm" overflow="visible" appearance="full" style="left:810px; top:97px; width:57px; height:15px; border-style:none; ">
  513. <choices>
  514. <item>
  515. <label>대분류</label>
  516. <value>Y</value>
  517. </item>
  518. </choices>
  519. <script type="javascript" ev:event="xforms-value-changed">
  520. <![CDATA[
  521. fSumViewOption(grd_stock,ckb_lrgnm, "lrgnm");
  522. ]]>
  523. </script>
  524. </select>
  525. <select id="ckb_mdlnm" ref="/root/init/viwoption/mdlnm" overflow="visible" appearance="full" style="left:675px; top:117px; width:57px; height:15px; border-style:none; ">
  526. <choices>
  527. <item>
  528. <label>중분류</label>
  529. <value>Y</value>
  530. </item>
  531. </choices>
  532. <script type="javascript" ev:event="xforms-value-changed">
  533. <![CDATA[
  534. fSumViewOption(grd_stock,ckb_mdlnm, "mdlnm");
  535. ]]>
  536. </script>
  537. </select>
  538. <select id="ckb_smlnm" ref="/root/init/viwoption/smlnm" overflow="visible" appearance="full" style="left:748px; top:117px; width:57px; height:15px; border-style:none; ">
  539. <choices>
  540. <item>
  541. <label>소분류</label>
  542. <value>Y</value>
  543. </item>
  544. </choices>
  545. <script type="javascript" ev:event="xforms-value-changed">
  546. <![CDATA[
  547. fSumViewOption(grd_stock,ckb_smlnm, "smlnm");
  548. ]]>
  549. </script>
  550. </select>
  551. <select id="ckb_lastupdt" ref="/root/init/viwoption/lastupdt" overflow="visible" appearance="full" style="left:810px; top:117px; width:57px; height:15px; border-style:none; ">
  552. <choices>
  553. <item>
  554. <label>등록일</label>
  555. <value>Y</value>
  556. </item>
  557. </choices>
  558. <script type="javascript" ev:event="xforms-value-changed">
  559. <![CDATA[
  560. fSumViewOption(grd_stock,ckb_lastupdt, "lastupdt");
  561. ]]>
  562. </script>
  563. </select>
  564. <select id="chk_lastupdtnm" ref="/root/init/viwoption/lastupdtnm" overflow="visible" appearance="full" style="left:871px; top:97px; width:84px; height:15px; border-style:none; ">
  565. <choices>
  566. <item>
  567. <label>최종수정자</label>
  568. <value>Y</value>
  569. </item>
  570. </choices>
  571. <script type="javascript" ev:event="xforms-value-changed">
  572. <![CDATA[
  573. fSumViewOption(grd_stock,chk_lastupdtnm, "lastupdtnm");
  574. ]]>
  575. </script>
  576. </select>
  577. <output id="opt_itemcnt" ref="/root/main/itemcnt" class="output_fix" format="#,###" style="left:176px; top:112px; width:61px; height:19px; font-weight:bold; text-align:right; "/>
  578. <output id="opt_itemamt" ref="/root/main/itemamt" class="output_fix" format="#,###" style="left:240px; top:112px; width:90px; height:19px; font-weight:bold; text-align:right; "/>
  579. <caption id="caption8" style="left:50px; top:118px; width:45px; height:15px; font-weight:bold; text-decoration:underline; color:#0000ff; text-align:center; vertical-align:top; ">
  580. <![CDATA[Excel]]>
  581. <script type="javascript" ev:event="onclick">
  582. <![CDATA[
  583. misfSaveExcel(grd_dept, "부서상비약품내역_"+getCurrentDate());
  584. ]]>
  585. </script>
  586. </caption>
  587. <output id="opt_cnt" ref="/root/main/articleCnt" class="output_fix" format="#,###" style="left:575px; top:93px; width:90px; height:19px; font-weight:bold; text-align:right; "/>
  588. <caption id="caption13" style="left:509px; top:117px; width:64px; height:15px; text-align:right; ">금액합계 :</caption>
  589. <caption id="caption16" style="left:509px; top:98px; width:64px; height:15px; text-align:right; ">품목수 :</caption>
  590. <output id="opt_amt" ref="/root/main/totalPrice" class="output_fix" format="#,###" style="left:575px; top:113px; width:90px; height:19px; font-weight:bold; text-align:right; "/>
  591. <output id="otp_usernm" ref="/root/init/usernm" style="left:100px; top:59px; width:125px; height:19px; "/>
  592. <caption id="caption9" class="search_name" style="left:10px; top:37px; width:86px; height:17px; vertical-align:middle; ">관리구분 :</caption>
  593. <select1 id="rdo_drugflag" ref="/root/send/search/drugflag" appearance="minimal" style="left:100px; top:37px; width:125px; height:19px; ">
  594. <choices>
  595. <itemset nodeset="/root/init/drugflag/item">
  596. <label ref="label"/>
  597. <value ref="value"/>
  598. </itemset>
  599. </choices>
  600. <script type="javascript" ev:event="xforms-value-changed">
  601. <![CDATA[
  602. misfGridInit(grd_dept);
  603. misfGridInit(grd_stock);
  604. misfGridInit(grd_history);
  605. ]]>
  606. </script>
  607. </select1>
  608. <caption id="caption10" class="search_name" style="left:10px; top:59px; width:112px; height:17px; vertical-align:middle; ">작업유저 :</caption>
  609. <input id="ipt_allsizespecid" ref="/root/send/search/allsizespecid" disabled="true" visibility="hidden" style="left:614px; top:15px; width:15px; height:19px; "/>
  610. <caption id="cpt_excel" visibility="hidden" style="left:470px; top:117px; width:45px; height:15px; font-weight:bold; text-decoration:underline; color:#0000ff; text-align:center; vertical-align:top; ">
  611. <![CDATA[Excel]]>
  612. <script type="javascript" ev:event="onclick">
  613. <![CDATA[
  614. misfSaveExcel(grd_stock, "부서별상비약품량내역_"+getCurrentDate());
  615. ]]>
  616. </script>
  617. </caption>
  618. <bool id="bool1" checkvalue="Y,N" ref="/root/hidden/allchk" style="left:26px; top:148px; width:15px; height:20px; ">
  619. <script type="javascript" ev:event="xforms-value-changed">
  620. <![CDATA[
  621. var allchk = model.getValue("/root/hidden/allchk");
  622. if(allchk=="Y"){
  623. for(var iRow =grd_dept.fixedRows;iRow < grd_dept.rows; iRow++){
  624. grd_dept.valueMatrix(iRow,grd_dept.colRef("chk"))="Y";
  625. grd_dept.isReadOnly(iRow,grd_dept.colRef("chk")) = true;
  626. }
  627. }else{
  628. for(var iRow =grd_dept.fixedRows;iRow < grd_dept.rows; iRow++){
  629. grd_dept.valueMatrix(iRow,grd_dept.colRef("chk"))="N";
  630. grd_dept.isReadOnly(iRow,grd_dept.colRef("chk")) = false;
  631. }
  632. }
  633. grd_dept.refresh();
  634. ]]>
  635. </script>
  636. </bool>
  637. <button id="button2" class="btn2_letter5" visibility="visible" style="left:175px; top:90px; width:75px; height:19px; ">
  638. <caption>병동별출력</caption>
  639. <script type="javascript" ev:event="DOMActivate">
  640. <![CDATA[
  641. var allchk = model.getValue("/root/hidden/allchk");
  642. if(allchk=="Y"){
  643. var msg = messageBox("전체 출력하시겠습니까?","Q");
  644. if(msg =="6"){
  645. model.removeNodeset("/root/send/reqdata");
  646. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/send/search/instcd"));
  647. model.makeValue("/root/send/reqdata/drugflag" ,model.getValue("/root/send/search/drugflag"));
  648. model.makeValue("/root/send/reqdata/srchflag" ,"D");
  649. if(submit("TRRSC09004")){
  650. model.removeNodeset("/root/prtinfo/drugprtinfo/drugprtlist");
  651. model.makeNode("/root/prtinfo/drugprtinfo/drugprtlist");
  652. copyNodesetType("/root/prtinfo/drugprtinfo/drugprtlist","/root/main/prtlist/drugprtinfo/drugprtlist","replace");
  653. exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  654. //exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo");
  655. /*for(var i =grd_drugprtlist.fixedRows;i < grd_drugprtlist.rows; i++){
  656. var sReqdeptcd = grd_drugprtlist.valueMatrix(i,grd_drugprtlist.colRef("reqdeptcd"));
  657. var sGoodcd = grd_drugprtlist.valueMatrix(i,grd_drugprtlist.colRef("goodcd"));
  658. model.removeNodeset("/root/prtinfo/drugprtinfo/drugprtlist");
  659. model.makeNode("/root/prtinfo/drugprtinfo/drugprtlist");
  660. copyNodesetType("/root/prtinfo/drugprtinfo/drugprtlist","/root/main/prtlist/drugprtinfo/drugprtlist[reqdeptcd='" + sReqdeptcd + "']","replace");
  661. //exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  662. exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo");
  663. }*/
  664. }
  665. }else{
  666. return;
  667. }
  668. }else{
  669. for(var iRow =grd_dept.fixedRows;iRow < grd_dept.rows; iRow++){
  670. var chk = grd_dept.valueMatrix(iRow,grd_dept.colRef("chk"));
  671. if(chk=="Y"){
  672. var deptcd = grd_dept.valueMatrix(iRow,grd_dept.colRef("deptcd"));
  673. model.removeNodeset("/root/send/reqdata");
  674. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/send/search/instcd"));
  675. model.makeValue("/root/send/reqdata/drugflag" ,model.getValue("/root/send/search/drugflag"));
  676. model.makeValue("/root/send/reqdata/reqdeptcd" ,deptcd);
  677. if(submit("TRRSC09004")){
  678. model.removeNodeset("/root/prtinfo/drugprtinfo/drugprtlist");
  679. model.makeNode("/root/prtinfo/drugprtinfo/drugprtlist");
  680. copyNodesetType("/root/prtinfo/drugprtinfo/drugprtlist","/root/main/prtlist/drugprtinfo/drugprtlist","replace");
  681. exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  682. //exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo");
  683. }
  684. }
  685. }
  686. }
  687. ]]>
  688. </script>
  689. </button>
  690. <datagrid id="grd_drugprtlist" nodeset="/root/main/prtlist/drugprtinfo/drugprtlist" class="datagrid2" visibility="hidden" autoresize="true" caption="부서코드^부서^약품코드^약품명^함량^낱개단위^포장단위^수량^비고^관리구분^단가^금액" colsep="^" colwidth="100, 100, 97, 100, 100, 30, 28, 59, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:35px; top:245px; width:540px; height:361px; ">
  691. <col ref="reqdeptcd"/>
  692. <col ref="reqdeptnm"/>
  693. <col ref="goodcd" type="output"/>
  694. <col ref="goodnm" type="output"/>
  695. <col ref="cntsqtyunit" type="output"/>
  696. <col ref="deliveunit" type="output"/>
  697. <col ref="purcunit" type="output"/>
  698. <col ref="drugqty"/>
  699. <col ref="cmt"/>
  700. <col ref="drugflag"/>
  701. <col ref="goodunitcost"/>
  702. <col ref="amt"/>
  703. </datagrid>
  704. <button id="button3" class="btn2_letter4" style="left:950px; top:112px; width:64px; height:19px; ">
  705. <caption>약품조회</caption>
  706. <script type="javascript" ev:event="DOMActivate">
  707. <![CDATA[
  708. var reqdeptcd = model.getValue(ipt_deptcd.attribute("ref"));
  709. if(reqdeptcd==""){
  710. messageBox("부서를 먼저","C002");
  711. return;
  712. }
  713. modal("SPRSC09000");
  714. ]]>
  715. </script>
  716. </button>
  717. <button id="button4" class="btn2_letter5" style="left:255px; top:90px; width:82px; height:19px; ">
  718. <caption>약품별출력</caption>
  719. <script type="javascript" ev:event="DOMActivate">
  720. <![CDATA[
  721. var allchk = model.getValue("/root/hidden/allchk");
  722. if(allchk=="Y"){
  723. var msg = messageBox("전체 출력하시겠습니까?","Q");
  724. if(msg =="6"){
  725. model.removeNodeset("/root/send/reqdata");
  726. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/send/search/instcd"));
  727. model.makeValue("/root/send/reqdata/drugflag" ,model.getValue("/root/send/search/drugflag"));
  728. model.makeValue("/root/send/reqdata/srchflag" ,"G");
  729. if(submit("TRRSC09004")){
  730. model.removeNodeset("/root/prtinfo/drugprtinfo/drugprtlist");
  731. model.makeNode("/root/prtinfo/drugprtinfo/drugprtlist");
  732. copyNodesetType("/root/prtinfo/drugprtinfo/drugprtlist","/root/main/prtlist/drugprtinfo/drugprtlist","replace");
  733. //exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  734. //exeReportPreview("RPRSC09002","XMLSTR","/root/prtinfo");
  735. exeReportPreview("RPRSC09002","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  736. }
  737. }else{
  738. return;
  739. }
  740. }else{
  741. for(var iRow =grd_dept.fixedRows;iRow < grd_dept.rows; iRow++){
  742. var chk = grd_dept.valueMatrix(iRow,grd_dept.colRef("chk"));
  743. if(chk=="Y"){
  744. var deptcd = grd_dept.valueMatrix(iRow,grd_dept.colRef("deptcd"));
  745. model.removeNodeset("/root/send/reqdata");
  746. model.makeValue("/root/send/reqdata/instcd" ,model.getValue("/root/send/search/instcd"));
  747. model.makeValue("/root/send/reqdata/drugflag" ,model.getValue("/root/send/search/drugflag"));
  748. model.makeValue("/root/send/reqdata/reqdeptcd" ,deptcd);
  749. if(submit("TRRSC09004")){
  750. model.removeNodeset("/root/prtinfo/drugprtinfo/drugprtlist");
  751. model.makeNode("/root/prtinfo/drugprtinfo/drugprtlist");
  752. copyNodesetType("/root/prtinfo/drugprtinfo/drugprtlist","/root/main/prtlist/drugprtinfo/drugprtlist","replace");
  753. //exeReportPreview("RPRSC09001","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  754. exeReportPreview("RPRSC09002","XMLSTR","/root/prtinfo", "", "true", "", "", "", "", "true");
  755. }
  756. }
  757. }
  758. }
  759. ]]>
  760. </script>
  761. </button>
  762. </group>
  763. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">상비약품관리</caption>
  764. </xhtml:body>
  765. </xhtml:html>