SMMQI00102_일괄조회항목.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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. <headinfo>
  11. <headlist>
  12. <headcd/>
  13. <headnm/>
  14. <seqno/>
  15. <hardspec/>
  16. <harccdno/>
  17. </headlist>
  18. </headinfo>
  19. <tmpldtmn>
  20. <condqry/>
  21. <headcd/>
  22. <headnm/>
  23. </tmpldtmn>
  24. </main>
  25. <send>
  26. <condition>
  27. <fromdd/>
  28. <todd/>
  29. <ddflag/>
  30. <searchkind/>
  31. </condition>
  32. <savedata/>
  33. <cond>
  34. <condqry/>
  35. <hardcdno/>
  36. <headcd/>
  37. </cond>
  38. <reqdata/>
  39. </send>
  40. <hidden>
  41. <headinfo>
  42. <headlist/>
  43. </headinfo>
  44. <hardcdinfo>
  45. <hardcdlist/>
  46. </hardcdinfo>
  47. </hidden>
  48. <init>
  49. <headwidth>
  50. <headwidthlist>
  51. </headwidthlist>
  52. </headwidth>
  53. <hardcd/>
  54. </init>
  55. </root>
  56. </instance>
  57. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  58. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  59. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  60. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  61. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  62. <script type="javascript" src="../../../emr/qiweb/js/SMMQI00101.js"/>
  63. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  64. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  65. <script type="javascript" ev:event="xforms-ready">
  66. <![CDATA[
  67. fMakeHeadWidthComboNode();
  68. fInitialization();
  69. ]]>
  70. </script>
  71. <script type="javascript">
  72. <![CDATA[
  73. function fInitialization(){
  74. mmbfGetHardCodeInfo("/root/send/reqdata", "/root/init/hardcd", 9949);
  75. //하드코드 테이블 체크
  76. fGetHardCDList("N", 9949, 0 , "/root/init/hardcd");
  77. var cnt = getNodesetCnt(model, "/root/init/hardcd/hardcd");
  78. adminchk = "";
  79. for(var i=1; i<=cnt; i++){
  80. var dutplcecd = model.getValue("/root/init/hardcd/hardcd[" + i + "]/hardcd");
  81. if(getUserInfo("dutplcecd") == dutplcecd){
  82. adminchk=true;
  83. break;
  84. }
  85. }
  86. if ( adminchk == true ){
  87. btn_set.visible = true;
  88. }else{
  89. btn_set.visible = false;
  90. }
  91. model.removeNodeset("/root/main/headinfo/headlist");
  92. model.removeNodeset("/root/hidden/headinfo/headlist");
  93. copyNodesetType("/root/send/condition", "/root/main/cond", "replace", model, opener.model);
  94. model.refresh();
  95. var recflag = model.getValue("/root/send/condition/searchkind");
  96. // fGetHardcdno() 함수는 SMMQI00101.js에 포함
  97. model.makeValue("/root/send/condition/hardcdno", fGetHardcdno_title(recflag, getScreenID()));
  98. if(submit("TRMQI00104")){
  99. fHeadinfoInit();
  100. }
  101. }
  102. function fHeadinfoInit(){
  103. copyNodesetType("/root/main/headinfo", "/root/hidden/headinfo","replace");
  104. grd_headlist.rebuild();
  105. fColorChangeRows("#E6A947");
  106. }
  107. function fColorChangeRows(color){
  108. var nRows = getNodesetCount("/root/main/headinfo/headlist");
  109. var sToday = getCurrentDate();
  110. for(var i = 1; i<=nRows; i++){
  111. if(model.getValue("/root/main/headinfo/headlist["+i+"]/valitodd") < sToday){
  112. grd_headlist.rowStyle(i, "data", "background-color") = color;
  113. }
  114. }
  115. }
  116. function fMakeHeadWidthComboNode(){
  117. var nInitValue = 10;
  118. for(var i=10; i<=30; i++){
  119. model.makeValue("/root/init/headwidth/headwidthlist["+ eval(i - 9) +"]/nm", i * nInitValue);
  120. model.makeValue("/root/init/headwidth/headwidthlist["+ eval(i - 9) +"]/cd", i * nInitValue);
  121. model.refresh();
  122. }
  123. }
  124. ]]>
  125. </script>
  126. <submission id="TRMQI00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/hidden/headinfo/headlist"/>
  127. <submission id="TRMQI00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/hidden/hardcdinfo/hardcdlist"/>
  128. <submission id="TXMQI00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata"/>
  129. <submission id="TXMQI00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond"/>
  130. </model>
  131. </xhtml:head>
  132. <xhtml:body pagewidth="1024" pageheight="768" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  133. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1001px; height:730px; ">
  134. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1000px; y2:25px; "/>
  135. <caption id="lbl_title" class="tit_2" style="left:0px; top:10px; width:260px; height:13px; ">일괄목록 항목수정</caption>
  136. <datagrid id="grd_headlist" nodeset="/root/main/headinfo/headlist" caption="항목이름^순서^너비^비고^사용여부^적용시작기간^적용종료기간^평가코드^연동쿼리^항목코드^harccdno" colsep="^" colwidth="150, 50, 50, 355, 57, 6, 10, 100, 114, 100, 100" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:30px; width:1000px; height:695px; ">
  137. <col ref="headnm" type="input"/>
  138. <col ref="seqno" type="input"/>
  139. <col ref="headwidth" type="combo" style="text-align:center; ">
  140. <choices>
  141. <itemset nodeset="/root/init/headwidth/headwidthlist">
  142. <label ref="nm"/>
  143. <value ref="cd"/>
  144. </itemset>
  145. </choices>
  146. </col>
  147. <col ref="headcomment" type="input"/>
  148. <col ref="apply" type="checkbox"/>
  149. <col ref="valifromdd" visibility="hidden" format="yyyy-mm-dd"/>
  150. <col ref="valitodd" visibility="hidden" format="yyyy-mm-dd"/>
  151. <col ref="ccode" type="input"/>
  152. <col ref="condqry"/>
  153. <col ref="headcd"/>
  154. <col ref="hardcdno"/>
  155. <script type="javascript" ev:event="onendedit">
  156. <![CDATA[
  157. var sSeqno = model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/seqno");
  158. var sInitSeqno = model.getValue("/root/hidden/headinfo/headlist["+grd_headlist.row+"]/seqno");
  159. var sHeadWidth = model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/headwidth");
  160. var sInitHeadWidth = model.getValue("/root/hidden/headinfo/headlist["+grd_headlist.row+"]/headwidth");
  161. if(!sSeqno.isNumber()){
  162. messageBox("숫자만 입력할 수","I010");
  163. model.setValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/seqno", sInitSeqno);
  164. return;
  165. }
  166. ]]>
  167. </script>
  168. <script type="javascript" ev:event="ondblclick">
  169. <![CDATA[
  170. // 관리자이면서 항목코드 더블클릭시에만.
  171. if( grd_headlist.isCell(event.target) && grd_headlist.row >= grd_headlist.fixedRows && grd_headlist.col == grd_headlist.colRef("condqry")
  172. && adminchk == true ){
  173. group1.visible = true;
  174. grd_headlist.disabled = true;
  175. model.setValue("/root/main/tmpldtmn/condqry", model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/condqry"));
  176. txa_condqry.refresh();
  177. grd_headlist.refresh();
  178. }
  179. ]]>
  180. </script>
  181. </datagrid>
  182. <button id="button1" class="btn4_letter2" style="left:800px; top:2px; width:56px; height:22px; ">
  183. <caption>조회</caption>
  184. <script type="javascript" ev:event="DOMActivate">
  185. <![CDATA[
  186. fInitialization();
  187. ]]>
  188. </script>
  189. </button>
  190. <button id="button2" class="btn4_letter2" style="left:942px; top:2px; width:56px; height:22px; ">
  191. <caption>저장</caption>
  192. <script type="javascript" ev:event="DOMActivate">
  193. <![CDATA[
  194. model.setValue("/root/send/savedata", grd_headlist.getUpdateData());
  195. if(submit("TXMQI00104")){
  196. fInitialization();
  197. }
  198. ]]>
  199. </script>
  200. </button>
  201. <group id="group1" visibility="hidden" style="left:165px; top:110px; width:710px; height:525px; border-color:#333333; border-style:solid; ">
  202. <textarea id="txa_condqry" ref="/root/main/tmpldtmn/condqry" style="left:3px; top:34px; width:696px; height:477px; "/>
  203. <caption id="caption1" class="tit_2" style="left:4px; top:6px; width:98px; height:13px; ">조회쿼리수정</caption>
  204. <line id="line2" class="line_1" style="x1:4px; y1:26px; x2:699px; y2:26px; "/>
  205. <button id="btn_exe" class="btn4_letter2" style="left:584px; top:4px; width:56px; height:22px; ">
  206. <caption>저장</caption>
  207. <script type="javascript" ev:event="DOMActivate">
  208. <![CDATA[
  209. model.setValue("/root/send/cond/condqry", model.getValue("/root/main/tmpldtmn/condqry"));
  210. model.setValue("/root/send/cond/hardcdno", model.getValue("/root/send/condition/hardcdno"));
  211. model.setValue("/root/send/cond/headcd", model.getValue("/root/main/headinfo/headlist["+ grd_headlist.row +"]/headcd"));
  212. if(submit("TXMQI00105")){
  213. // group1.visible = false;
  214. // fInitialization();
  215. }
  216. ]]>
  217. </script>
  218. </button>
  219. <button id="button3" class="btn4_letter2" style="left:644px; top:4px; width:56px; height:22px; ">
  220. <caption>닫기</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. model.setValue("/root/main/tmpldtmn/condqry", "");
  224. group1.visible = false;
  225. grd_headlist.disabled = false;
  226. model.refresh();
  227. ]]>
  228. </script>
  229. </button>
  230. <output id="output1" ref="/root/main/tmpldtmn/headcd" style="left:109px; top:4px; width:100px; height:19px; "/>
  231. <output id="output2" ref="/root/main/tmpldtmn/headnm" style="left:214px; top:4px; width:305px; height:19px; "/>
  232. </group>
  233. <button id="btn_set" class="btn4_letter4" style="left:859px; top:2px; width:80px; height:22px; ">
  234. <caption>쿼리수정</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. if ( grd_headlist.row < 1 ) {
  238. return;
  239. }
  240. if ( group1.visible == false ){
  241. group1.visible = true;
  242. grd_headlist.disabled = true;
  243. model.setValue("/root/main/tmpldtmn/condqry", model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/condqry"));
  244. model.setValue("/root/main/tmpldtmn/headcd", model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/headcd"));
  245. model.setValue("/root/main/tmpldtmn/headnm", model.getValue("/root/main/headinfo/headlist["+grd_headlist.row+"]/headnm"));
  246. txa_condqry.refresh();
  247. grd_headlist.refresh();
  248. }else{
  249. group1.visible = false;
  250. model.setValue("/root/main/tmpldtmn/condqry", "");
  251. model.setValue("/root/main/tmpldtmn/headcd", "");
  252. model.setValue("/root/main/tmpldtmn/headnm", "");
  253. txa_condqry.refresh();
  254. }
  255. model.refresh();
  256. ]]>
  257. </script>
  258. </button>
  259. </group>
  260. </xhtml:body>
  261. </xhtml:html>