SMRSC09000_상비약품관리.xrw 34 KB

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