SPZCS00101_제외약품등록.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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. <list>
  11. <resultlist>
  12. <applyflagnm/>
  13. <paytype/>
  14. <hdrugcd/>
  15. <edicd/>
  16. <edinm/>
  17. <kornm/>
  18. <engnm/>
  19. <iengnm/>
  20. <bocheongunit/>
  21. <hamryang/>
  22. <jeyaksanm/>
  23. <yakpumgu/>
  24. <fdrugcd/>
  25. <gcnseqno/>
  26. </resultlist>
  27. </list>
  28. <list2>
  29. </list2>
  30. <list3/>
  31. <sublist>
  32. <resultExceptDrugList/>
  33. </sublist>
  34. </main>
  35. <send>
  36. <req>
  37. </req>
  38. </send>
  39. <init/>
  40. <hidden/>
  41. <temp/>
  42. </root>
  43. </instance>
  44. <script type="javascript" ev:event="xforms-ready">
  45. <![CDATA[
  46. /*
  47. 화면을 초기화 합니다.
  48. */
  49. fInitialize();
  50. ipt_pKeyword.attribute("style") = "imemode:hangul";
  51. var vMode = model.getValue("/root/send/req/pGubn");
  52. if(vMode=="S"){
  53. caption6.value="제외불가 약품 등록";
  54. } else {
  55. caption6.value="제외 약품 등록";
  56. }
  57. submit("TRZCS00201");
  58. ]]>
  59. </script>
  60. <submission id="TRZCN01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/list"/>
  61. <submission id="TRZCS00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/sublist"/>
  62. <submission id="TXZCS00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/sublist/resultExceptDrugList" replace="instance" resultref="/root/temp"/>
  63. </model>
  64. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  65. <script type="javascript" src="../../../com/referenceweb/js/ZCR001.js"/>
  66. <script type="javascript">
  67. <![CDATA[
  68. /*
  69. 초기화 작업을 합니다.
  70. */
  71. function fInitialize(){
  72. model.removeNodeset("/root/main/list/resultlist");
  73. grd_resultlist.refresh();
  74. }
  75. /*
  76. model.getValue(); 를 함수로 만들었습니다.
  77. param1 : node는 grid의 xPath입니다.
  78. param2 : row는 grid에서 선택한 row값입니다.
  79. param3 : element는 getvalue할 해당 element 명입니다.
  80. 해당 getvalue값을 return 해줍니다.
  81. return 하지 않으면 해당값을 가져올 수 없습니다.
  82. */
  83. function fGetValue(node, row, element) {
  84. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  85. return rtnValue;
  86. }
  87. /*
  88. model.reqGetDetailInfo(); 를 함수로 만들었습니다.
  89. param1 : 선택된 약품 grid에서 선택된 약품코드 입니다.
  90. param2 : 선택된 약품 grid에서 선택된 GCN코드 입니다.
  91. param3 : 선택된 약품 grid에서 선택된 ROW값 입니다.
  92. 해당 getvalue값을 return 해줍니다.
  93. return 하지 않으면 해당값을 가져올 수 없습니다.
  94. */
  95. function mergecolTab1(){
  96. grd_resultlist.mergecol(1)=false;
  97. grd_resultlist.mergecol(2)=false;
  98. grd_resultlist.mergecol(3)=false;
  99. grd_resultlist.mergecol(4)=false;
  100. grd_resultlist.mergecol(5)=false;
  101. grd_resultlist.mergecol(6)=false;
  102. grd_resultlist.mergecol(7)=false;
  103. grd_resultlist.mergecells="byrestriccol";
  104. grd_resultlist.refresh();
  105. }
  106. function mergecolTab2(){
  107. grd_resultlist2.mergecol(1)=false;
  108. grd_resultlist2.mergecol(2)=false;
  109. grd_resultlist2.mergecol(3)=false;
  110. grd_resultlist2.mergecol(4)=false;
  111. grd_resultlist2.mergecol(5)=false;
  112. grd_resultlist2.mergecol(6)=false;
  113. grd_resultlist2.mergecol(7)=false;
  114. grd_resultlist2.mergecells="byrestriccol";
  115. grd_resultlist2.refresh();
  116. }
  117. ]]>
  118. </script>
  119. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  120. <script type="javascript" src="../../../com/navigationweb/js/ZCN001.js"/>
  121. </xhtml:head>
  122. <xhtml:body pagewidth="840" pageheight="700" guideline="2,296;1,1200;2,778;" style="margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  123. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:157px; height:14px; ">제외/제외불가 약품등록</caption>
  124. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:6px; top:50px; width:820px; height:45px; background-color:#fffbf2; border-color:#ffd799; "/>
  125. <datagrid id="grd_resultlist" nodeset="/root/main/list/resultlist" autoresize="true" caption="급여구분^약품명^약품코드^영문상품명^영문성분명^제조회사" colsep="^" colwidth="70, 192, 100, 180, 160, 120" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:6px; top:100px; width:820px; height:275px; ">
  126. <col ref="paytype" style="vertical-align:top; "/>
  127. <col ref="edinm"/>
  128. <col ref="hdrugcd"/>
  129. <col ref="engnm"/>
  130. <col ref="iengnm"/>
  131. <col ref="jeyaksanm"/>
  132. <script type="javascript" ev:event="ondblclick">
  133. <![CDATA[
  134. var selectedrow = grd_resultlist.row;
  135. if(0 == selectedrow){return;}
  136. if('-1' != datagrid2.findRow(model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "hdrugcd"), 0, 3, false, true)){
  137. return;
  138. }
  139. if(model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "scndrgexptyn")=="Y"){
  140. alert("제외불가 약품으로 동록된 약품입니다.");
  141. return;
  142. }
  143. datagrid2.addRow();
  144. var rowcnt = datagrid2.rows-1;
  145. model.makeNode("/root/main/sublist/resultExceptDrugList/applyflag_nm");
  146. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/applyflag_nm", model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "applyflagnm"));
  147. model.makeNode("/root/main/sublist/resultExceptDrugList/edi_nm");
  148. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/edi_nm", model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "edinm"));
  149. model.makeNode("/root/main/sublist/resultExceptDrugList/hcode");
  150. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/hcode", model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "hdrugcd"));
  151. model.makeNode("/root/main/sublist/resultExceptDrugList/ieng_nm");
  152. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/ieng_nm", model.getValue("/root/main/list/resultlist" + "[" + selectedrow + "]/" + "iengnm"));
  153. model.makeNode("/root/main/sublist/resultExceptDrugList/moduleid");
  154. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/moduleid", model.getValue("/root/send/req/pModuleID"));
  155. model.makeNode("/root/main/sublist/resultExceptDrugList/gubn");
  156. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/gubn", model.getValue("/root/send/req/pGubn"));
  157. model.makeNode("/root/main/sublist/resultExceptDrugList/status");
  158. model.makeValue("/root/main/sublist/resultExceptDrugList["+rowcnt+"]/status", "i");
  159. datagrid2.refresh();
  160. //import1.refresh();
  161. ]]>
  162. </script>
  163. </datagrid>
  164. <select1 id="rdo_pSearchType" ref="/root/send/req/pSearchType" class="radio_search" visibility="visible" appearance="full" cols="3" itemwidth="100" overflow="visible" style="left:120px; top:55px; width:255px; height:35px; border-style:none; ">
  165. <choices>
  166. <item>
  167. <label>영문상품명</label>
  168. <value>01</value>
  169. </item>
  170. <item>
  171. <label>영문성분명</label>
  172. <value>02</value>
  173. </item>
  174. <item>
  175. <label>한글상품명</label>
  176. <value>03</value>
  177. </item>
  178. <item>
  179. <label>제조회사명</label>
  180. <value>04</value>
  181. </item>
  182. <item>
  183. <label>병원코드</label>
  184. <value>05</value>
  185. </item>
  186. <item>
  187. <label>EDI코드</label>
  188. <value>06</value>
  189. </item>
  190. </choices>
  191. <script type="javascript" ev:event="onclick">
  192. <![CDATA[
  193. if(rdo_pSearchType.value=="01"||rdo_pSearchType.value=="02"||rdo_pSearchType.value=="05"||rdo_pSearchType.value=="06"){
  194. ipt_pKeyword.attribute("style") = "imemode:inactive";
  195. }
  196. else
  197. {
  198. ipt_pKeyword.attribute("style") = "imemode:hangul";
  199. }
  200. ]]>
  201. </script>
  202. </select1>
  203. <caption id="caption13" class="search_name" style="left:30px; top:55px; width:86px; height:17px; ">조회구분 :</caption>
  204. <input id="ipt_pKeyword" ref="/root/send/req/pKeyword" class="input_search" style="left:455px; top:60px; width:245px; height:19px; ">
  205. <script type="javascript" ev:event="onkeypress">
  206. <![CDATA[
  207. if (event.keycode == 13)
  208. {
  209. ipt_pKeyword.value = ipt_pKeyword.currentText;
  210. model.removeNodeset("/root/main/list");
  211. submit("TRZCN01001");
  212. mergecolTab1();
  213. }
  214. ]]>
  215. </script>
  216. </input>
  217. <button id="btn_ClassficationSearch7" class="btn1_letter2" style="left:705px; top:60px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  218. <caption>조회</caption>
  219. <script type="javascript" ev:event="onclick">
  220. <![CDATA[
  221. model.removeNodeset("/root/main/list");
  222. submit("TRZCN01001");
  223. mergecolTab1();
  224. ]]>
  225. </script>
  226. </button>
  227. <line id="line8" class="line_1" style="x1:5px; y1:40px; x2:834px; y2:40px; "/>
  228. <group id="group1" style="left:8px; top:25px; width:822px; height:13px; "/>
  229. <caption id="caption12" class="tit_2" style="left:10px; top:25px; width:70px; height:13px; ">약품검색</caption>
  230. <datagrid id="datagrid2" nodeset="/root/main/sublist/resultExceptDrugList" autoresize="true" caption="상태^약품명^약품코드^성분명^등록일자" colsep="^" colwidth="80,229, 120, 236, 140" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:5px; top:405px; width:823px; height:275px; ">
  231. <col ref="applyflag_nm"/>
  232. <col ref="edi_nm"/>
  233. <col ref="hcode"/>
  234. <col ref="ieng_nm"/>
  235. <col ref="inputdt"/>
  236. </datagrid>
  237. <group id="group2" style="left:8px; top:685px; width:822px; height:13px; "/>
  238. <caption id="caption1" class="tit_2" style="left:5px; top:685px; width:820px; height:13px; color:#ff6600; ">SUPER USER 가 지정한 제외 불가 약품은 DB에 저장되지 않습니다.</caption>
  239. <button id="btn_save" class="btn2_letter3" style="left:770px; top:382px; width:53px; height:19px; ">
  240. <caption>저장</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. if(!checkGridUpdate(datagrid2))
  244. {
  245. return;
  246. }
  247. var cnt_row = datagrid2.rows; // 현재 행의 갯수 가져오기
  248. var workRow = 0;
  249. for(i = 1 ; i< cnt_row; i++ ) //순번제지정
  250. {
  251. workRow = i;
  252. var iStatus = datagrid2.rowstatus(i);
  253. // alert("i= "+i+ " iStatus= "+iStatus+" /cnt_row:"+cnt_row);
  254. // alert(model.getValue( "/root/main/sublist/resultExceptDrugList["+workRow+"]/edi_nm"));
  255. if(iStatus == "4")
  256. {
  257. model.makeValue("/root/main/sublist/resultExceptDrugList["+workRow+"]/status", "d");
  258. }else if(iStatus == "1"){
  259. model.makeValue("/root/main/sublist/resultExceptDrugList["+workRow+"]/status", "i");
  260. }
  261. }
  262. if ( submit("TXZCS00201") ) {
  263. datagrid2.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  264. submit("TRZCS00201");
  265. }
  266. //window.opener.fExceptDrug(model.getValue("/root/send/req/pModuleID"));
  267. ]]>
  268. </script>
  269. </button>
  270. <button id="button9" class="btn2_letter3" style="left:710px; top:382px; width:53px; height:19px; ">
  271. <caption>행삭제</caption>
  272. <script type="javascript" ev:event="DOMActivate">
  273. <![CDATA[
  274. var cur_row = datagrid2.row; // 행 번호 가져오기
  275. if(cur_row<0) {
  276. alert("삭제할 행을 선택해주세요.");
  277. return;
  278. }
  279. var all_row = datagrid2.selectedRows;
  280. for(i= 0;i< all_row;i++){
  281. var delete_row = datagrid2.selectedrow(i);
  282. var iStatus = datagrid2.rowstatus(delete_row);
  283. if (iStatus == 1||iStatus == 3) // 새로 삽입된 행이면
  284. {
  285. datagrid2.deleteitem(delete_row);
  286. }
  287. else if (iStatus == 4) // 삭제로 표시된 행이면
  288. {
  289. datagrid2.removestatus(delete_row, "delete");
  290. }
  291. else
  292. {
  293. datagrid2.addStatus(delete_row, "delete");
  294. }
  295. }
  296. ]]>
  297. </script>
  298. </button>
  299. <caption id="caption2" class="tit_2" style="left:5px; top:385px; width:100px; height:13px; font-weight:bold; color:#800080; ">검토모듈명 :</caption>
  300. <caption id="caption3" ref="/root/send/req/pModuleNM" style="left:100px; top:385px; width:420px; height:13px; font-weight:bold; color:#800080; "/>
  301. <button id="button1" class="btn4_letter2" style="left:765px; top:60px; width:56px; height:22px; ">
  302. <caption>닫기</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. window.close();
  306. ]]>
  307. </script>
  308. </button>
  309. </xhtml:body>
  310. </xhtml:html>