SMADB02600_용량분할관리.xrw 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" 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">
  4. <xhtml:head>
  5. <xhtml:title>용량분할관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <exptdeptlist>
  11. <exptdeptitem>
  12. <exptorddeptcd/>
  13. <exptorddeptnm/>
  14. <instcd/>
  15. </exptdeptitem>
  16. </exptdeptlist>
  17. <voldivlist>
  18. <voldivitem>
  19. <voldivflag/>
  20. <voldivcd/>
  21. <drugcd/>
  22. <instcd/>
  23. <seqno/>
  24. <basevol/>
  25. <basevolunit/>
  26. <nextvol/>
  27. </voldivitem>
  28. </voldivlist>
  29. <voldruglist>
  30. <voldrugitem>
  31. <divcd/>
  32. <voldivflag/>
  33. <voldivcd/>
  34. <drugcd/>
  35. <drugnm/>
  36. <seqno/>
  37. <basevol/>
  38. <nextvol/>
  39. <instcd/>
  40. <saveflag/>
  41. </voldrugitem>
  42. </voldruglist>
  43. </main>
  44. <send>
  45. <srchinfo>
  46. <srchvoldivflag/>
  47. <srchvoldivcd/>
  48. <srchdrug/>
  49. <srchdrugnm/>
  50. </srchinfo>
  51. <req>
  52. <exptdeptdata/>
  53. <voldivdata/>
  54. <voldrugdata/>
  55. <srchdeptcd/>
  56. <srchdrugcd/>
  57. </req>
  58. </send>
  59. <init>
  60. <deptitem>
  61. <deptcd/>
  62. <deptnm/>
  63. </deptitem>
  64. <drugitem>
  65. <drugcd/>
  66. <drugnm/>
  67. </drugitem>
  68. <codelist>
  69. <unit/>
  70. </codelist>
  71. </init>
  72. <hidden>
  73. <count/>
  74. <exptitem/>
  75. <voldivitem/>
  76. <voldrugitem/>
  77. </hidden>
  78. <temp>
  79. <receivedata>
  80. <receiveref>/root/temp/receivedata/drugcd</receiveref>
  81. <drugcd/>
  82. <drugnm/>
  83. <comcd/>
  84. </receivedata>
  85. </temp>
  86. </root>
  87. </instance>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  91. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  92. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  93. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  94. <submission id="TRADB02601" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/main/exptdeptlist"/>
  95. <script type="javascript" ev:event="xforms-ready">
  96. <![CDATA[
  97. // 권한 관리
  98. btn_save.disabled =! checkAuth("X"); // 저장
  99. grd_voldruglist.backcoloralternate = "transparent";
  100. //환산단위 기준자료조회.
  101. zbcfGetCodeList(new Array("A0599"), new Array("/root/init/codelist/unit"));
  102. fGetVolDivList();
  103. for(var i = grd_voldruglist.colRef("drugcd"); i < grd_voldruglist.cols; i++){
  104. grd_voldruglist.mergeCol(i) = false;
  105. }
  106. model.refresh();
  107. ]]>
  108. </script>
  109. <submission id="TRADB02602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchinfo" replace="instance" resultref="/root/main/voldruglist"/>
  110. <submission id="TXADB02601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/count"/>
  111. <submission id="TRADB02603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/init/deptitem"/>
  112. <submission id="TRADB02604" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/init/drugitem"/>
  113. <submission id="TRZBC00101"/>
  114. <script type="javascript">
  115. <![CDATA[
  116. function fGetVolDivList() {
  117. grd_voldruglist.rebuildStyle();
  118. submit("TRADB02601", false);
  119. submit("TRADB02602", false);
  120. grd_exptdeptlist.clearStatus();
  121. grd_voldruglist.clearStatus();
  122. model.refresh();
  123. /*
  124. if (model.getValue("/root/main/voldivlist/voldivitem[1]/voldivflag") != "") {
  125. grd_voldivlist.row= 1;
  126. grd_voldivlist.dispatch("onclick");
  127. model.refresh();
  128. }
  129. */
  130. }
  131. function fOpenDrugSrch() {
  132. // 약품코드 검색
  133. modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  134. var drugcode = model.getValue("/root/temp/receivedata/drugcd");
  135. // 약품명 검색
  136. if (drugcode != "") {
  137. model.makeValue("/root/send/srchinfo/srchdrug",drugcode);
  138. }
  139. ipt_srchdrugcd.refresh();
  140. }
  141. ]]>
  142. </script>
  143. </model>
  144. </xhtml:head>
  145. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  146. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  147. <caption id="caption1" class="tit_1" style="left:65px; top:75px; width:106px; height:13px; ">용량분할관리</caption>
  148. </group>
  149. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1194px; height:744px; ">
  150. <datagrid id="grd_voldruglist" nodeset="/root/main/voldruglist/voldrugitem" caption="caption1^관리구분^관리코드^약품코드^약품명^적용순서^기준용량^기준단위^큰함량단위용량^관리구분^saveflag^관리코드^기관코드" colsep="^" colwidth="100, 60, 59, 113, 356, 56, 57, 55, 91, 100, 100" explorerbar="sortshow" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:295px; top:89px; width:885px; height:619px; ">
  151. <col ref="divcd" type="input" visibility="hidden"/>
  152. <col disabled="true" ref="voldivflag" type="combo">
  153. <choices>
  154. <item>
  155. <label>항암</label>
  156. <value>A</value>
  157. </item>
  158. <item>
  159. <label>일반</label>
  160. <value>N</value>
  161. </item>
  162. </choices>
  163. </col>
  164. <col ref="voldivcd" type="input" _key="true"/>
  165. <col ref="drugcd" type="inputbutton" _key="true"/>
  166. <col ref="drugnm" _key="true"/>
  167. <col ref="seqno" type="input" style="text-align:right; "/>
  168. <col ref="basevol" type="input" style="text-align:right; "/>
  169. <col ref="basevolunit" type="combo">
  170. <choices>
  171. <itemset nodeset="/root/init/codelist/unit/A0599">
  172. <label ref="cdnm"/>
  173. <value ref="cdid"/>
  174. </itemset>
  175. </choices>
  176. </col>
  177. <col ref="nextvol" type="input" style="text-align:right; "/>
  178. <col ref="instcd" visibility="hidden"/>
  179. <col ref="saveflag" visibility="hidden"/>
  180. <script type="javascript" ev:event="onkeypress">
  181. <![CDATA[
  182. var grdrow= grd_voldruglist.row;
  183. var grdcol = grd_voldruglist.col;
  184. var srchdrugcd = "";
  185. if(event.keyCode == "13") {
  186. if(grd_voldruglist.mouseCol == grd_voldruglist.colRef("drugcd")){
  187. srchdrugcd = model.getValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugcd");
  188. if (srchdrugcd == "") {
  189. messageBox("약품코드를", "C001");
  190. }
  191. model.setValue("/root/send/req/srchdrugcd",srchdrugcd.toUpperCase());
  192. submit("TRADB02604");
  193. model.setValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugcd" ,model.getValue("/root/init/drugitem/drugcd") );
  194. model.setValue("/root/main/voldruglist/voldrugitem["+grd_voldruglist.row+"]/drugnm" ,model.getValue("/root/init/drugitem/drugnm") );
  195. }
  196. model.refresh();
  197. }
  198. ]]>
  199. </script>
  200. <script type="javascript" ev:event="onbuttonclick">
  201. <![CDATA[
  202. var row = grd_voldruglist.row;
  203. if(grd_voldruglist.rowStatus(row) == 1) {
  204. var drugcode = null;
  205. var drugnm = model.getValue("/root/main/hbookinfo/druglist["+row+"]/drugnm");
  206. if(grd_voldruglist.col == grd_voldruglist.colRef("drugcd")){
  207. // 약품코드 검색
  208. modal("SPADB60100",0,100,150,"SPADB60100","/root/temp/receivedata","/root/temp/receivedata");
  209. drugcode = model.getValue("/root/temp/receivedata/drugcd");
  210. // 약품명 검색
  211. if (drugcode != "") {
  212. model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd",drugcode);
  213. model.setValue("/root/send/req/srchdrugcd",drugcode);
  214. if(submit("TRADB02604",false)){
  215. var n_drugcd = model.getValue("/root/init/drugitem/drugcd");
  216. var n_drugnm = model.getValue("/root/init/drugitem/drugnm");
  217. var o_drugcd = model.getValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd");
  218. var o_drugnm = model.getValue("/root/main/voldruglist/voldrugitem["+row+"]/drugnm");
  219. if(o_drugcd != n_drugcd || o_drugnm != n_drugnm){
  220. model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugcd" , n_drugcd);
  221. model.setValue("/root/main/voldruglist/voldrugitem["+row+"]/drugnm" , n_drugnm);
  222. grd_voldruglist.addStatus(grd_voldruglist.row, "update"); // 조회된 사항이 이전데이터와 상이할 때 UPDATE 상태로 변경
  223. }
  224. model.setValue("/root/temp/receivedata/drugcd","");
  225. model.setValue("/root/temp/receivedata/drugnm","");
  226. model.setValue("/root/temp/receivedata/comcd","");
  227. }
  228. }
  229. }
  230. model.refresh();
  231. } else {
  232. messageBox("약품코드는 추가 및 삭제만 가능 합니다.", "I999");
  233. }
  234. ]]>
  235. </script>
  236. <script type="javascript" ev:event="onkeydown">
  237. <![CDATA[
  238. if(event.keyCode == "46"){
  239. btn_grddel3.dispatch("DOMActivate");
  240. }
  241. ]]>
  242. </script>
  243. <script type="javascript" ev:event="xforms-value-changed">
  244. <![CDATA[
  245. var sSaveflag = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/saveflag");
  246. var sVoldivflag = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/voldivflag");
  247. var sVoldivcd = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/voldivcd");
  248. var sBaseVolUnit = model.getValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/basevolunit");
  249. if(grd_voldruglist.col == grd_voldruglist.colRef("basevolunit")) {
  250. for(var iRow = 1 ; iRow <= getNodesetCount("/root/main/voldruglist/voldrugitem") ; iRow++) {
  251. if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/voldivflag") == sVoldivflag
  252. && model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/voldivcd") == sVoldivcd) {
  253. model.setValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/basevolunit", sBaseVolUnit);
  254. if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag") == "N"
  255. || model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag") == "M") {
  256. grd_voldruglist.rowStatus(iRow) = 1;
  257. } else {
  258. grd_voldruglist.rowStatus(iRow) = 2;
  259. }
  260. }
  261. }
  262. }
  263. if((sSaveflag == "N") || (sSaveflag == "M")) {
  264. grd_voldruglist.rowStatus(grd_voldruglist.row) = 1;
  265. }
  266. grd_voldruglist.refresh();
  267. ]]>
  268. </script>
  269. </datagrid>
  270. <caption id="caption2" class="tit_2" style="left:300px; top:45px; width:144px; height:13px; ">상세적용</caption>
  271. <caption id="caption4" class="tit_2" style="left:5px; top:45px; width:144px; height:13px; ">전체적용</caption>
  272. <caption id="caption14" class="cell_1" style="left:0px; top:65px; width:67px; height:23px; vertical-align:middle; ">제외진료과</caption>
  273. <line id="line1" class="line_1" style="x1:295px; y1:60px; x2:1180px; y2:60px; "/>
  274. <line id="line2" class="line_1" style="x1:0px; y1:60px; x2:290px; y2:60px; "/>
  275. <line id="line4" class="line_3" style="x1:5px; y1:742px; x2:1185px; y2:742px; "/>
  276. <datagrid id="grd_exptdeptlist" nodeset="/root/main/exptdeptlist/exptdeptitem" visibility="visible" caption="과코드^진료과명^기관코드" colsep="^" colwidth="93, 154, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:89px; width:290px; height:651px; ">
  277. <col ref="exptorddeptcd" type="inputbutton" _key="true"/>
  278. <col ref="exptorddeptnm" _key="true"/>
  279. <col ref="instcd" visibility="hidden"/>
  280. <script type="javascript" ev:event="onkeypress">
  281. <![CDATA[
  282. var row= grd_exptdeptlist.row;
  283. var col = grd_exptdeptlist.col;
  284. var srchdeptcd = "";
  285. if(event.keyCode == "13") {
  286. srchdeptcd = model.getValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd");
  287. if (srchdeptcd == "") {
  288. messageBox("제외진료과를", "C001");
  289. }
  290. model.setValue("/root/send/req/srchdeptcd",srchdeptcd);
  291. submit("TRADB02603",false);
  292. model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd" ,model.getValue("/root/init/deptitem/deptcd") );
  293. model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptnm",model.getValue("/root/init/deptitem/deptnm" ));
  294. model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/instcd" ,model.getValue("/root/init/deptitem/instcd" ));
  295. model.refresh();
  296. }
  297. ]]>
  298. </script>
  299. <script type="javascript" ev:event="onbuttonclick">
  300. <![CDATA[
  301. var row= grd_exptdeptlist.row;
  302. //수정은 불가하고 추가 및 삭제 만 가능.
  303. if(grd_exptdeptlist.rowStatus(row) == 1) {
  304. var search_condition = "deptnm";
  305. var search_term = ""; // model.getValue("/root/main/sample1/deptcd");
  306. var receive_deptcd_path = "/root/init/deptitem/deptcd";
  307. var receive_deptnm_path = "/root/init/deptitem/deptnm";
  308. var standard_yn = "orduseyn";
  309. var ord_deptflag = ""; //D
  310. model.setValue("/root/init/deptitem/deptcd","");
  311. model.setValue("/root/init/deptitem/deptnm","");
  312. zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag);
  313. if (model.getValue("/root/init/deptitem/deptcd")!=""){
  314. model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptcd" ,model.getValue("/root/init/deptitem/deptcd") );
  315. model.setValue("/root/main/exptdeptlist/exptdeptitem["+row+"]/exptorddeptnm" ,model.getValue("/root/init/deptitem/deptnm") );
  316. }
  317. model.refresh();
  318. } else {
  319. messageBox("추가 및 삭제만 가능 합니다.", "I999");
  320. }
  321. ]]>
  322. </script>
  323. </datagrid>
  324. <caption id="caption3" class="cell_1" style="left:295px; top:65px; width:79px; height:23px; ">관리구분코드</caption>
  325. <button id="btn_grdadd1" class="btn2_letter3" style="left:182px; top:69px; width:53px; height:19px; ">
  326. <caption>행추가</caption>
  327. <script type="javascript" ev:event="DOMActivate">
  328. <![CDATA[
  329. grd_exptdeptlist.addItem();
  330. ]]>
  331. </script>
  332. </button>
  333. <button id="btn_grdcopy1" class="btn2_letter3" visibility="hidden" style="left:80px; top:65px; width:53px; height:19px; ">
  334. <caption>행복사</caption>
  335. <script type="javascript" ev:event="DOMActivate">
  336. <![CDATA[
  337. var grdrow = grd_exptdeptlist.row;
  338. model.copyNode("/root/hidden/exptitem","/root/main/exptdeptlist/exptdeptitem["+ grdrow +"]");
  339. grd_exptdeptlist.insertItem(grdrow);
  340. model.copyNode("/root/main/exptdeptlist/exptdeptitem["+ grdrow +"]","/root/hidden/exptitem");
  341. model.refresh();
  342. ]]>
  343. </script>
  344. </button>
  345. <button id="btn_grddel1" class="btn2_letter3" style="left:237px; top:69px; width:53px; height:19px; ">
  346. <caption>행삭제</caption>
  347. <script type="javascript" ev:event="DOMActivate">
  348. <![CDATA[
  349. grd_exptdeptlist.addStatus(grd_exptdeptlist.row,"delete");
  350. ]]>
  351. </script>
  352. </button>
  353. <button id="btn_grdadd2" class="btn2_letter3" visibility="hidden" style="left:382px; top:69px; width:53px; height:19px; ">
  354. <caption>행추가</caption>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. grd_voldivlist.insertRow(grd_voldivlist.row, "below", false, true);
  358. // insertRow 실행 후 그리드상의 포커스 이동됨.
  359. grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("drugcd")) = "ZZZZZZZZZZZZ";
  360. grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("seqno")) = "0";
  361. grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("basevol")) = "0";
  362. grd_voldivlist.valueMatrix(grd_voldivlist.row, grd_voldivlist.colRef("nextvol")) = "0";
  363. /*
  364. model.setValue("/root/main/voldivlist/voldivitem["+row+"]/drugcd" ,"ZZZZZZZZZZZZ");
  365. model.setValue("/root/main/voldivlist/voldivitem["+row+"]/seqno" ,0);
  366. model.setValue("/root/main/voldivlist/voldivitem["+row+"]/basevol",0);
  367. model.setValue("/root/main/voldivlist/voldivitem["+row+"]/nextvol" ,0);
  368. */
  369. grd_voldivlist.refresh();
  370. ]]>
  371. </script>
  372. </button>
  373. <button id="btn_grdadd3" class="btn2_letter3" style="left:1017px; top:69px; width:53px; height:19px; ">
  374. <caption>행추가</caption>
  375. <script type="javascript" ev:event="DOMActivate">
  376. <![CDATA[
  377. // 그리드상에 포커스가 존재하지 않을시
  378. var BeforeRow = grd_voldruglist.row;
  379. if(BeforeRow == "-1"){
  380. BeforeRow = "1";
  381. }
  382. if(model.getValue("/root/main/voldruglist/voldrugitem["+ BeforeRow +"]/voldivflag") == ""
  383. || model.getValue("/root/main/voldruglist/voldrugitem["+ BeforeRow +"]/voldivcd") == "") {
  384. messageBox("관리구분, 관리코드를 입력하여 주세요.", "I999");
  385. return;
  386. }
  387. grd_voldruglist.insertRow(BeforeRow, "below", false, true);
  388. var currentRow = grd_voldruglist.row;
  389. grd_voldruglist.valueMatrix(currentRow, grd_voldruglist.colRef("voldivflag")) = grd_voldruglist.valueMatrix(BeforeRow, grd_voldruglist.colRef("voldivflag"));
  390. grd_voldruglist.valueMatrix(currentRow, grd_voldruglist.colRef("voldivcd")) = grd_voldruglist.valueMatrix(BeforeRow, grd_voldruglist.colRef("voldivcd"));
  391. grd_voldruglist.isReadOnly(currentRow, grd_voldruglist.colRef("voldivcd")) = true;
  392. model.setValue("/root/main/voldruglist/voldrugitem["+ currentRow +"]/saveflag", "M");
  393. grd_voldruglist.refresh();
  394. ]]>
  395. </script>
  396. </button>
  397. <button id="btn_grdcopy2" class="btn2_letter3" visibility="hidden" style="left:437px; top:69px; width:53px; height:19px; ">
  398. <caption>행복사</caption>
  399. <script type="javascript" ev:event="DOMActivate">
  400. <![CDATA[
  401. var grdrow = grd_voldivlist.row;
  402. model.copyNode("/root/hidden/voldivitem","/root/main/voldivlist/voldivitem["+ grdrow +"]");
  403. grd_voldivlist.insertItem(grdrow);
  404. model.copyNode("/root/main/voldivlist/voldivitem["+ grdrow +"]","/root/hidden/voldivitem");
  405. model.refresh();
  406. ]]>
  407. </script>
  408. </button>
  409. <button id="btn_grdcopy3" class="btn2_letter3" style="left:1072px; top:69px; width:53px; height:19px; ">
  410. <caption>행복사</caption>
  411. <script type="javascript" ev:event="DOMActivate">
  412. <![CDATA[
  413. var grdrow = grd_voldruglist.row;
  414. if(model.getValue("/root/main/voldruglist/voldrugitem["+ grdrow +"]/voldivflag") == ""
  415. || model.getValue("/root/main/voldruglist/voldrugitem["+ grdrow +"]/voldivcd") == "") {
  416. messageBox("관리구분, 관리코드를 입력하여 주세요.", "I999");
  417. return;
  418. }
  419. model.copyNode("/root/hidden/voldrugitem","/root/main/voldruglist/voldrugitem["+ grdrow +"]");
  420. grd_voldruglist.insertItem(grdrow);
  421. model.copyNode("/root/main/voldruglist/voldrugitem["+ grdrow +"]","/root/hidden/voldrugitem");
  422. model.setValue("/root/main/voldruglist/voldrugitem["+ grdrow+"]/saveflag", "M");
  423. model.refresh();
  424. ]]>
  425. </script>
  426. </button>
  427. <button id="btn_grddel2" class="btn2_letter3" visibility="hidden" style="left:492px; top:69px; width:53px; height:19px; ">
  428. <caption>행삭제</caption>
  429. <script type="javascript" ev:event="DOMActivate">
  430. <![CDATA[
  431. grd_voldivlist.addStatus(grd_voldivlist.row,"delete");
  432. ]]>
  433. </script>
  434. </button>
  435. <button id="btn_grddel3" class="btn2_letter3" style="left:1127px; top:69px; width:53px; height:19px; ">
  436. <caption>행삭제</caption>
  437. <script type="javascript" ev:event="DOMActivate">
  438. <![CDATA[
  439. var col = grd_voldruglist.colRef("seqno");
  440. var cnt = 1;
  441. // 선택한 행들에 대한 상태변경
  442. /*
  443. var selectedRows = Array(grd_voldruglist.selectedRows);
  444. for(var i = 0; i < grd_voldruglist.selectedRows; i++){
  445. selectedRows[i] = grd_voldruglist.selectedRow(i);
  446. }
  447. for(var i = selectedRows.length-1; i >= 0 ; i--){
  448. rowIdx = selectedRows[i];
  449. var row_status = grd_voldruglist.rowStatus(rowIdx);
  450. if(row_status == 1 || row_status == 3) {
  451. grd_voldruglist.deleteRow(rowIdx, false);
  452. }else{
  453. grd_voldruglist.addStatus(rowIdx, "delete");
  454. grd_voldruglist.rowStyle(rowIdx, "data", "background-color") = "#ffff00"
  455. }
  456. }
  457. */
  458. rowIdx = grd_voldruglist.row;
  459. var row_status = grd_voldruglist.rowStatus(rowIdx);
  460. if(row_status == 1 || row_status == 3) {
  461. grd_voldruglist.deleteRow(rowIdx, false);
  462. }else{
  463. grd_voldruglist.addStatus(rowIdx, "delete");
  464. grd_voldruglist.rowStyle(rowIdx, "data", "background-color") = "#ffff00"
  465. }
  466. // 삭제된 행을 제외한 나머지에 대하여 적용순서 변경
  467. // 순차적으로 증가
  468. for(var i = grd_voldruglist.fixedRows; i < grd_voldruglist.rows; i++){
  469. // 선택한 행의 같은 관리 코드인 항목에 한해서..
  470. if(grd_voldruglist.valueMatrix(grd_voldruglist.row, grd_voldruglist.colRef("voldivcd")) == grd_voldruglist.valueMatrix(i, grd_voldruglist.colRef("voldivcd"))){
  471. if(grd_voldruglist.rowStatus(i) != "4"){
  472. grd_voldruglist.valueMatrix(i, col) = cnt;
  473. cnt ++;
  474. }
  475. }
  476. }
  477. grd_voldruglist.refresh();
  478. ]]>
  479. </script>
  480. </button>
  481. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:295px; top:710px; width:185px; height:30px; background-color:transparent; border-color:#7cbbdd; border-style:solid; "/>
  482. <caption id="caption47" class="cell_2" style="left:302px; top:715px; width:70px; height:20px; ">범 례</caption>
  483. <caption id="caption32" style="left:380px; top:718px; width:44px; height:14px; color:#008000; vertical-align:middle; ">항암(A)</caption>
  484. <caption id="caption8" style="left:430px; top:718px; width:48px; height:14px; color:#008000; vertical-align:middle; ">일반(N)</caption>
  485. <caption id="caption6" class="cell_1" style="left:456px; top:65px; width:79px; height:23px; ">분할코드내역</caption>
  486. <group id="group2" style="left:0px; top:3px; width:1180px; height:37px; ">
  487. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1180px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  488. <line id="line13" style="x1:1098px; y1:7px; x2:1098px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  489. <caption id="caption10" class="search_name" style="left:5px; top:9px; width:95px; height:17px; ">약품코드 :</caption>
  490. <button id="btn_sea" class="btn1_letter2" style="left:1110px; top:7px; width:56px; height:22px; ">
  491. <caption>조회</caption>
  492. <script type="javascript" ev:event="DOMActivate">
  493. <![CDATA[
  494. fGetVolDivList();
  495. ]]>
  496. </script>
  497. </button>
  498. <input id="ipt_srchdrugcd" ref="/root/send/srchinfo/srchdrug" class="input_search" inputtype="button" style="left:96px; top:8px; width:140px; height:19px; ">
  499. <script type="javascript" ev:event="onkeypress">
  500. <![CDATA[
  501. if(event.keyCode == 13) {
  502. model.setValue("/root/send/srchinfo/srchdrug", ipt_srchdrugcd.currentText);
  503. ipt_srchdrugcd.refresh();
  504. fGetVolDivList();
  505. }
  506. ]]>
  507. </script>
  508. <script type="javascript" ev:event="onbuttonclick">
  509. <![CDATA[
  510. fOpenDrugSrch();
  511. ]]>
  512. </script>
  513. </input>
  514. <caption id="caption5" class="search_name" style="left:265px; top:10px; width:95px; height:17px; ">약품명 :</caption>
  515. <input id="ipt_srchdrugnm" ref="/root/send/srchinfo/srchdrugnm" class="input_search" style="left:344px; top:8px; width:466px; height:19px; ">
  516. <script type="javascript" ev:event="onkeypress">
  517. <![CDATA[
  518. if(event.keyCode == 13) {
  519. model.setValue("/root/send/srchinfo/srchdrugnm", ipt_srchdrugnm.currentText);
  520. ipt_srchdrugnm.refresh();
  521. fGetVolDivList();
  522. }
  523. ]]>
  524. </script>
  525. </input>
  526. </group>
  527. <button id="btn_grdadd" class="btn2_letter4" style="left:951px; top:69px; width:64px; height:19px; ">
  528. <caption>신규추가</caption>
  529. <script type="javascript" ev:event="DOMActivate">
  530. <![CDATA[
  531. grd_voldruglist.addItem();
  532. grd_voldruglist.bottomRow = grd_voldruglist.row;
  533. model.setValue("/root/main/voldruglist/voldrugitem["+ grd_voldruglist.row +"]/saveflag", "N");
  534. ]]>
  535. </script>
  536. </button>
  537. </group>
  538. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1194px; height:27px; ">
  539. <button id="btn_cle" class="btn4_letter4" visibility="hidden" style="left:1030px; top:5px; width:80px; height:22px; ">
  540. <caption>새로고침</caption>
  541. <script type="javascript" ev:event="DOMActivate">
  542. <![CDATA[
  543. fGetVolDivList();
  544. ]]>
  545. </script>
  546. </button>
  547. <button id="btn_save" class="btn4_letter2" style="left:1124px; top:5px; width:56px; height:22px; ">
  548. <caption>저장</caption>
  549. <script type="javascript" ev:event="DOMActivate">
  550. <![CDATA[
  551. var updtdata1 = getGridUpdateData(grd_exptdeptlist);
  552. //var updtdata2 = getGridUpdateData(grd_voldivlist);
  553. var updtdata3 = getGridUpdateData(grd_voldruglist);
  554. var sSaveFlag = "";
  555. //if (updtdata1 == "" && updtdata2 == "" && updtdata3 == "") {
  556. if (updtdata1 == "" && updtdata3 == "") {
  557. messageBox("변경된 데이터가","I004");
  558. return;
  559. }
  560. for(var iRow = 1 ; iRow <= getNodesetCount("/root/main/voldruglist/voldrugitem") ; iRow++) {
  561. sSaveFlag = model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/saveflag");
  562. if(sSaveFlag == "N" || sSaveFlag == "M") {
  563. if(model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/basevolunit") == "") {
  564. messageBox("[" + model.getValue("/root/main/voldruglist/voldrugitem["+ iRow +"]/drugcd") + "] " + "기준단위는 ","I003");
  565. return;
  566. }
  567. }
  568. }
  569. // 제외진료과 필수사항체크
  570. if (checkKeyColumn("grd_exptdeptlist") == false) return;
  571. // 관리구분코드 필수사항체크
  572. //if (checkKeyColumn("grd_voldivlist") == false) return;
  573. // 분할코드내역 필수사항체크
  574. if (checkKeyColumn("grd_voldruglist") == false) return;
  575. model.setValue( "/root/send/req/exptdeptdata", grd_exptdeptlist.getUpdateData());
  576. //model.setValue( "/root/send/req/voldivdata" , grd_voldivlist.getUpdateData());
  577. model.setValue( "/root/send/req/voldrugdata" , grd_voldruglist.getUpdateData());
  578. if(submit("TXADB02601")) {
  579. fGetVolDivList();
  580. }
  581. //submit("TRADB02601");
  582. //btn_cle.dispatch("DOMActivate");
  583. //grd_voldivlist.dispatch("onclick");
  584. //model.refresh();
  585. //messageBox("용량분할 자료처리가", "I002");
  586. ]]>
  587. </script>
  588. </button>
  589. </group>
  590. </xhtml:body>
  591. </xhtml:html>