SMMMB01200_환경설정MASTER.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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. <envestblist>
  11. <qestuseflag/>
  12. <qestkindcd/>
  13. <qestnm/>
  14. <qestremfact/>
  15. <qestcd/>
  16. <qestclscd/>
  17. </envestblist>
  18. <envestbanswlist>
  19. <answval/>
  20. <baseanswvalflag/>
  21. <answvalnm/>
  22. <qestcd/>
  23. <qestclscd/>
  24. <answvalold/>
  25. </envestbanswlist>
  26. <qestclscd>D</qestclscd>
  27. </main>
  28. <send>
  29. <qestclscd/>
  30. <qestcd/>
  31. <envestb/>
  32. <envestbansw/>
  33. </send>
  34. <temp/>
  35. </root>
  36. </instance>
  37. <script type="javascript" ev:event="xforms-ready">
  38. <![CDATA[
  39. fInitialize ();
  40. ]]>
  41. </script>
  42. <submission id="TRMMB01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/envestblist"/>
  43. <submission id="TXMMB01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  44. <submission id="TRMMB01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/envestbanswlist"/>
  45. <submission id="TXMMB01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  46. </model>
  47. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  49. <script type="javascript">
  50. <![CDATA[
  51. // 화면 open, 저장시 초기화 기능을 수행한다.
  52. function fInitialize() {
  53. //환경설정 list 조회
  54. model.setValue ( "/root/send/qestclscd", cmb_qestclscd.value);
  55. submit( "TRMMB01201" );
  56. //1번째 환경설정 답안 조회
  57. model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[1]/qestcd" ));
  58. submit ( "TRMMB01202" );
  59. //1번째 환경설정 답안이 기본 선택으로 함
  60. grd_envestblist.row = 1; // 첫번째 row 선택
  61. }
  62. // 필수항목 체크
  63. function fCheckSave() {
  64. var count = 0;
  65. if (grd_envestbanswlist.rows < 1) {
  66. messageBox ( "저장할 답안이", "I004" );
  67. return false;
  68. }
  69. for ( i=1; i < grd_envestbanswlist.rows; i++ ) {
  70. if (model.getValue( "/root/main/envestbanswlist[" + i + "]/answval") == "" ) {
  71. messageBox ( "답안코드값이", "I004" );
  72. return false;
  73. } else if (model.getValue( "/root/main/envestbanswlist[" + i + "]/answval").length > 2) {
  74. messageBox ( "답안코드는 2", "E015" );
  75. return false;
  76. }
  77. if (model.getValue( "/root/main/envestbanswlist[" + i + "]/baseanswvalflag") == "Y") {
  78. count++;
  79. }
  80. }
  81. if ( count >1 ) {
  82. messageBox ( "기본답안은 1", "E015" );
  83. return false;
  84. } else if ( count < 1 ) {
  85. messageBox ( "기본답안이", "E014" );
  86. return false;
  87. }
  88. }
  89. function fDeleteSelectedRows(grd,markonly) {
  90. var rowIdx;
  91. if (grd.selectedRows > 0) {
  92. var selectedRows = Array(grd.selectedRows);
  93. for(i=0;i<grd.selectedRows;i++) {
  94. selectedRows[i] = grd.selectedRow(i);
  95. }
  96. if (markonly != null && markonly == true) { // mark delete
  97. for(i=selectedRows.length-1;i>=0;i--) {
  98. rowIdx = selectedRows[i];
  99. if(grd.rowstatus(rowIdx) == 1 ) { // just inserted row
  100. grd.deleterow(rowIdx,false);
  101. } else {
  102. grd.addStatus(rowIdx,"delete");
  103. }
  104. }
  105. } else {
  106. for(i=selectedRows.length-1;i>=0;i--) {
  107. rowIdx = selectedRows[i];
  108. grd.deleterow(rowIdx,false);
  109. }
  110. }
  111. }
  112. }
  113. ]]>
  114. </script>
  115. </xhtml:head>
  116. <xhtml:body guideline="2,0;1,5;1,1194;2,11;1,6;1,1218;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  117. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1195px; height:784px; ">
  118. <group id="group2" style="left:0px; top:0px; width:1195px; height:784px; vertical-align:top; ">
  119. <line id="line9" class="line_3" style="x1:0px; y1:784px; x2:1194px; y2:784px; "/>
  120. <line id="line2" class="line_3" style="x1:0px; y1:780px; x2:747px; y2:780px; "/>
  121. <caption id="caption22" class="tit_2" style="left:6px; top:22px; width:113px; height:13px; ">환경설정 리스트</caption>
  122. <caption id="caption1" class="tit_2" style="left:755px; top:23px; width:87px; height:13px; ">답안 리스트</caption>
  123. <line id="line1" class="line_1" style="x1:0px; y1:40px; x2:747px; y2:40px; "/>
  124. <button id="button10" class="btn2_letter2" style="left:1139px; top:18px; width:42px; height:19px; ">
  125. <caption>저장</caption>
  126. <script type="javascript" ev:event="DOMActivate">
  127. <![CDATA[
  128. if (fCheckSave() == false) {
  129. return;
  130. }
  131. model.setValue("/root/send/envestbansw", grd_envestbanswlist.getUpdateData());
  132. //저장전 질문코드를 담아 놓아서 저장후 조회에 사용한다.
  133. model.setValue("/root/send/qestcd", model.getValue( "/root/main/envestbanswlist[1]/qestcd"));
  134. if ( submit("TXMMB01202")) {
  135. model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[" +grd_envestblist.row+"]/qestcd" ));
  136. submit ( "TRMMB01202" );
  137. }
  138. ]]>
  139. </script>
  140. </button>
  141. <line id="line3" class="line_1" style="x1:750px; y1:40px; x2:1183px; y2:40px; "/>
  142. <line id="line4" class="line_3" style="x1:750px; y1:780px; x2:1183px; y2:780px; "/>
  143. <button id="button1" class="btn2_letter2" style="left:703px; top:18px; width:42px; height:19px; ">
  144. <caption>저장</caption>
  145. <script type="javascript" ev:event="DOMActivate">
  146. <![CDATA[
  147. model.setValue("/root/send/envestb", grd_envestblist.getUpdateData());
  148. if ( submit("TXMMB01201") ) {
  149. fInitialize();
  150. }
  151. ]]>
  152. </script>
  153. </button>
  154. <datagrid id="grd_envestblist" nodeset="/root/main/envestblist" visibility="visible" caption="사용여부^종류^환경설정 질문^질문참고사항^질문코드^질문분류코드" colsep="^" colwidth="55, 70, 300, 300, 0, 0" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:45px; width:748px; height:734px; text-align:center; ">
  155. <col disabled="false" ref="qestuseflag" type="combo">
  156. <choices>
  157. <item>
  158. <label>Y</label>
  159. <value>Y</value>
  160. </item>
  161. <item>
  162. <label>N</label>
  163. <value>N</value>
  164. </item>
  165. </choices>
  166. </col>
  167. <col imemode="alpha" ref="qestkindcd" type="combo" style="text-align:center; ">
  168. <choices>
  169. <item>
  170. <label>공통</label>
  171. <value>00</value>
  172. </item>
  173. <item>
  174. <label>처방</label>
  175. <value>10</value>
  176. </item>
  177. <item>
  178. <label>진단</label>
  179. <value>20</value>
  180. </item>
  181. <item>
  182. <label>기록</label>
  183. <value>30</value>
  184. </item>
  185. </choices>
  186. </col>
  187. <col imemode="hangul" ref="qestnm" type="input" style="text-align:center; "/>
  188. <col imemode="hangul" ref="qestremfact" type="input"/>
  189. <col ref="qestcd"/>
  190. <col ref="qestclscd"/>
  191. <script type="javascript" ev:event="xforms-value-changed">
  192. <![CDATA[
  193. ]]>
  194. </script>
  195. <script type="javascript" ev:event="ondblclick">
  196. <![CDATA[
  197. if ( grd_envestblist.row != 0 && event.target != "grd_envestblist" ) {
  198. model.setValue ( "/root/send/qestcd", model.getValue( "/root/main/envestblist[" + grd_envestblist.row + "]/qestcd" ));
  199. submit ( "TRMMB01202" );
  200. }
  201. ]]>
  202. </script>
  203. </datagrid>
  204. <button id="button52" class="btn2_letter3" style="left:593px; top:18px; width:53px; height:19px; ">
  205. <caption>행추가</caption>
  206. <script type="javascript" ev:event="DOMActivate">
  207. <![CDATA[
  208. if ( (grd_envestblist.rows - 1) > 0 ) {
  209. grd_envestblist.insertrow(1);
  210. } else {
  211. grd_envestblist.addRow(false);
  212. grd_envestblist.refresh();
  213. }
  214. model.setValue ( "/root/main/envestblist[1]/qestclscd", cmb_qestclscd.value );
  215. model.setValue ( "/root/main/envestblist[1]/qestuseflag", "Y" );
  216. model.setValue ( "/root/main/envestblist[1]/qestkindcd", "10" );
  217. ]]>
  218. </script>
  219. </button>
  220. <button id="button2" class="btn2_letter3" style="left:648px; top:18px; width:53px; height:19px; ">
  221. <caption>행삭제</caption>
  222. <script type="javascript" ev:event="DOMActivate">
  223. <![CDATA[
  224. fDeleteSelectedRows(grd_envestblist, true);
  225. grd_envestblist.refresh();
  226. ]]>
  227. </script>
  228. </button>
  229. <button id="button3" class="btn2_letter3" style="left:1029px; top:18px; width:53px; height:19px; ">
  230. <caption>행추가</caption>
  231. <script type="javascript" ev:event="DOMActivate">
  232. <![CDATA[
  233. if(grd_envestblist.row != 0 && grd_envestblist.row != -1){
  234. var gestcd = model.getValue("/root/main/envestblist[" + grd_envestblist.row + "]/qestcd");
  235. grd_envestbanswlist.addRow(true, true);
  236. grd_envestbanswlist.col = grd_envestbanswlist.colRef("answval");
  237. grd_envestbanswlist.editCell();
  238. var checkval = model.getValue("/root/main/envestbanswlist[baseanswvalflag='Y'/baseanswvalflag");
  239. if(checkval == "Y"){
  240. model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/baseanswvalflag", "N");
  241. }else{
  242. model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/baseanswvalflag", "Y");
  243. }
  244. model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/qestcd", gestcd);
  245. model.setValue("/root/main/envestbanswlist[" + grd_envestbanswlist.row + "]/qestclscd", cmb_qestclscd.value);
  246. }else{
  247. messageBox("선택된 질문이", "I004");
  248. return;
  249. }
  250. ]]>
  251. </script>
  252. </button>
  253. <button id="button4" class="btn2_letter3" style="left:1084px; top:18px; width:53px; height:19px; ">
  254. <caption>행삭제</caption>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. fDeleteSelectedRows(grd_envestbanswlist, true);
  258. grd_envestbanswlist.refresh();
  259. ]]>
  260. </script>
  261. </button>
  262. <select1 id="cmb_qestclscd" ref="/root/main/qestclscd" appearance="minimal" style="left:140px; top:19px; width:100px; height:19px; ">
  263. <choices>
  264. <item>
  265. <label>의사</label>
  266. <value>D</value>
  267. </item>
  268. <item>
  269. <label>간호사</label>
  270. <value>N</value>
  271. </item>
  272. <item>
  273. <label>기타</label>
  274. <value>E</value>
  275. </item>
  276. </choices>
  277. <script type="javascript" ev:event="xforms-value-changed">
  278. <![CDATA[
  279. fInitialize()
  280. ]]>
  281. </script>
  282. </select1>
  283. <datagrid id="grd_envestbanswlist" nodeset="/root/main/envestbanswlist" caption="코드^기본답안^답안명^질문코드^질문분류코드^답안코드old" colsep="^" colwidth="60, 60, 290, 0, 0, 0" defaultrows="0" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:750px; top:45px; width:433px; height:734px; ">
  284. <col ref="answval" type="input" style="text-align:center; "/>
  285. <col ref="baseanswvalflag" type="combo" style="text-align:center; vertical-align:top; ">
  286. <choices>
  287. <item>
  288. <label>Y</label>
  289. <value>Y</value>
  290. </item>
  291. <item>
  292. <label>N</label>
  293. <value>N</value>
  294. </item>
  295. </choices>
  296. </col>
  297. <col ref="answvalnm" type="input" style="text-align:center; "/>
  298. <col ref="qestcd"/>
  299. <col ref="qestclscd"/>
  300. <col ref="answvalold" type="output"/>
  301. </datagrid>
  302. </group>
  303. <caption id="cpt_title" class="tit_1" style="left:0px; top:0px; width:163px; height:14px; ">환경설정 등록</caption>
  304. </group>
  305. </xhtml:body>
  306. </xhtml:html>