SMLLF10600_계산결과수식정의.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF01600_계산결과수식정의.xrw
  4. * 설 명 : 사유코드관리
  5. * 설 계 자 : (주)에이씨케이 - 박정은
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.05.09
  8. * 수정이력 : 2007-08-01 박정은 코드인스펙션
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>사유코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <calflist>
  20. <tclscd/>
  21. <spccd/>
  22. <tclsnm/>
  23. <acptcnt/>
  24. <acpt01/>
  25. <acpt02/>
  26. <acpt03/>
  27. <acpt04/>
  28. <acpt05/>
  29. <acpt06/>
  30. <acpt07/>
  31. <acpt08/>
  32. <acpt09/>
  33. <acpt10/>
  34. <apptclscd/>
  35. <apptestcnt/>
  36. <calformkind/>
  37. <calformcnts/>
  38. <spcnm/>
  39. </calflist>
  40. <return_nm>
  41. <nm/>
  42. <r_tclsnm/>
  43. </return_nm>
  44. </main>
  45. <send>
  46. <resncdkind/>
  47. <calfdata/>
  48. <codeflag/>
  49. <selectgbn/>
  50. <tsectcd/>
  51. <sectcd/>
  52. <testlrgcd/>
  53. <testmdlcd/>
  54. <t_tclscd/>
  55. <t_spccd/>
  56. </send>
  57. <init>
  58. </init>
  59. <hidden>
  60. <ref>
  61. <refgbn>01</refgbn>
  62. </ref>
  63. <selectgbn>1</selectgbn>
  64. <select01/>
  65. <select02/>
  66. </hidden>
  67. </root>
  68. </instance>
  69. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" ev:event="xforms-ready">
  72. <![CDATA[
  73. // 사유코드 그리드 초기화
  74. model.setValue("/root/send/codeflag", "0117|0104|0102|0111|0106|"); // 0117 사유코드관리
  75. submit("TRLZZ00101");
  76. model.removeNodeset("/root/main/calflist");
  77. grd_calf.refresh();
  78. fSelectGbn();
  79. ]]>
  80. </script>
  81. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0117"/>
  82. <submission id="TRLLF01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/calflist"/>
  83. <submission id="TXLLF01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/resnlist"/>
  84. <submission id="TXLLF01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/calflist"/>
  85. <submission id="TRLLF01601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/return_nm"/>
  86. </model>
  87. <script type="javascript">
  88. <![CDATA[
  89. var tmpCalstr = "";
  90. function fSelectGbn(){
  91. //검사분류 선택
  92. if(cmb_selectgbn.value == "1"){
  93. //첫번째 콤보에 대분류 셋팅
  94. cmb_select01.choices.itemset.attribute("nodeset") = "/root/init/LB0104";
  95. //두번째 콤보에 중분류 셋팅
  96. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  97. }
  98. //시행부서 선택
  99. else if(cmb_selectgbn.value == "2"){
  100. //첫번째 콤보에 계코드 셋팅
  101. cmb_select01.choices.itemset.attribute("nodeset") = "/root/init/LB0111";
  102. //두번째 콤보에 검사계코드 셋팅
  103. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0106";
  104. }
  105. model.setvalue("/root/hidden/select01", "00");
  106. model.setvalue("/root/hidden/select02", "00");
  107. cmb_select01.refresh();
  108. cmb_select02.refresh();
  109. }
  110. //첫번째 콤보 선택시, 두번째 콤보 셋팅
  111. function fSetSelect02(){
  112. var select01 = model.getvalue("/root/hidden/select01");
  113. //검사분류선택
  114. if(cmb_selectgbn.value == "1"){
  115. if(select01 == "00"){
  116. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  117. }
  118. else{
  119. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0102[cd= '00' or etc01='"+ select01 +"']";
  120. }
  121. model.setValue("/root/hidden/select02" , "00");
  122. cmb_select02.refresh();
  123. }
  124. //시행부서 선택
  125. else if(cmb_selectgbn.value == "2"){
  126. if(select01 == "00"){
  127. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0106";
  128. }
  129. else{
  130. cmb_select02.choices.itemset.attribute("nodeset") = "/root/init/LB0106[cd= '00' or etc01='"+ select01 +"']";
  131. }
  132. model.setValue("/root/hidden/select02" , "00");
  133. cmb_select02.refresh();
  134. }
  135. }
  136. function fcalfList(){
  137. //조회구분 검사분류 선택시
  138. if(cmb_selectgbn.value == "1"){
  139. model.setValue("/root/send/testlrgcd" , model.getValue("/root/hidden/select01"));
  140. model.setValue("/root/send/testmdlcd" , model.getValue("/root/hidden/select02"));
  141. }
  142. //조회구분 시행부서 선택시
  143. else if(cmb_selectgbn.value == "2"){
  144. model.setValue("/root/send/sectcd" , model.getValue("/root/hidden/select01"));
  145. model.setValue("/root/send/tsectcd" , model.getValue("/root/hidden/select02"));
  146. }
  147. model.setValue("/root/send/selectgbn", cmb_selectgbn.value);
  148. submit("TRLLF01501");
  149. }
  150. // 계산수식목록 초기값 조회
  151. function fGetResnCd(){
  152. }
  153. // 행추가
  154. function fInsRowAdd() {
  155. grd_calf.addRow();
  156. grd_calf.topRow = grd_calf.rows;
  157. }
  158. function fExeCancel() {
  159. //model.reset();
  160. model.removeNodeset("/root/main/resnlist");
  161. model.refresh();
  162. }
  163. // 사유코드유형 설정
  164. function fSetResnkind(){
  165. var rCol = grd_calf.col;
  166. if(model.getValue("/root/main/resnlist["+grd_rsn.row+"]/resncdkind")== ""){
  167. if(rCol == "2"){
  168. model.setValue("/root/main/resnlist["+grd_rsn.row+"]/resncdkind", model.getValue("/root/main/resnlist["+grd_rsn.row+"]/resncd").substr(0,2));
  169. }
  170. }
  171. }
  172. // 사유코드 수정, 등록
  173. function fExecalf(){
  174. if(grd_calf.rows < 2){
  175. alert("저장 할 내용이 없습니다." ); // 할 수 없습니다.
  176. return;
  177. }
  178. var grdcalf = getGridUpdateData(grd_calf);
  179. model.setValue("/root/send/calfdata", grdcalf);
  180. model.refresh();
  181. submit("TXLLF01501");
  182. //model.reset();
  183. model.removeNodeset("/root/init");
  184. model.removeNodeset("/root/main/calflist");
  185. alert("저장되었습니다");
  186. fcalfList();
  187. }
  188. ]]>
  189. </script>
  190. </xhtml:head>
  191. <xhtml:body guideline="2,451;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  192. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1181px; height:744; ">
  193. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1180px; y2:70px; "/>
  194. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:183px; height:14px; ">검사항목별 수식정의 리스트</caption>
  195. <datagrid id="grd_calf" nodeset="/root/main/calflist" caption="검사코드^검사명^검체코드^검체명^인수개수^인수1^인수2^인수3^인수4^인수5^인수6^인수7^인수8^인수9^인수10^적용검사분류코드^적용검사개수^계산형식^계산식내용^숨길꺼seq" colwidth="65, 165, 65, 90, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 110, 60, 60, 150, 0" dataheight="30" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="40" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1180px; height:385px; ">
  196. <col ref="tclscd" type="input"/>
  197. <col ref="tclsnm"/>
  198. <col ref="spccd" type="input" style="text-align:center; "/>
  199. <col ref="spcnm"/>
  200. <col ref="acptcnt" type="input" style="text-align:center; "/>
  201. <col ref="acpt01" type="input"/>
  202. <col ref="acpt02" type="input"/>
  203. <col ref="acpt03" type="input"/>
  204. <col ref="acpt04" type="input"/>
  205. <col ref="acpt05" type="input"/>
  206. <col ref="acpt06" type="input"/>
  207. <col ref="acpt07" type="input"/>
  208. <col ref="acpt08" type="input"/>
  209. <col ref="acpt09" type="input"/>
  210. <col ref="acpt10" type="input"/>
  211. <col ref="apptclscd" type="input"/>
  212. <col ref="apptestcnt" visibility="hidden"/>
  213. <col ref="calformkind" visibility="hidden"/>
  214. <col ref="calformcnts" visibility="hidden"/>
  215. <col ref="resndispseq"/>
  216. <script type="javascript" ev:event="onkeypress">
  217. <![CDATA[
  218. if(event.keyCode == "13"){
  219. if(grd_calf.col == 1){
  220. var ftclscd = grd_calf.textmatrix(grd_calf.row,grd_calf.col);
  221. // model.setValue("/root/main/calflist["+grd_calf.row+"]/tclscd", ftclscd);
  222. model.setValue("/root/send/t_spccd", "" );
  223. model.setValue("/root/send/t_tclscd", ftclscd );
  224. submit("TRLLF01601");
  225. //alert(model.getValue("/root/main/r_tclsnm"));
  226. model.setValue("/root/main/calflist["+grd_calf.row+"]/tclsnm", model.getValue("/root/main/return_nm/nm"));
  227. }else if(grd_calf.col == 3){
  228. var fspccd = grd_calf.textmatrix(grd_calf.row,grd_calf.col);
  229. // model.setValue("/root/main/calflist["+grd_calf.row+"]/tclscd", ftclscd);
  230. model.setValue("/root/send/t_tclscd", "" );
  231. model.setValue("/root/send/t_spccd", fspccd );
  232. submit("TRLLF01601");
  233. //alert(model.getValue("/root/main/r_tclsnm"));
  234. model.setValue("/root/main/calflist["+grd_calf.row+"]/spcnm", model.getValue("/root/main/return_nm/nm"));
  235. }
  236. model.refresh();
  237. }
  238. ]]>
  239. </script>
  240. <script type="javascript" ev:event="onclick">
  241. <![CDATA[
  242. if(grd_calf.row > 0){
  243. textarea1.attribute("ref") = "/root/main/calflist["+ grd_calf.row +"]/calformcnts";
  244. }else{
  245. textarea1.attribute("ref") = "";
  246. }
  247. textarea1.refresh();
  248. ]]>
  249. </script>
  250. </datagrid>
  251. <group id="group1" style="left:0px; top:10px; width:1180px; height:35px; ">
  252. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1170px; height:35px; "/>
  253. <line id="line3" class="line_4" style="x1:1088px; y1:7px; x2:1080px; y2:29px; "/>
  254. <caption id="caption2" class="search_name" style="left:610px; top:10px; width:90px; height:17px; ">조회구분 :</caption>
  255. <button id="btn_Ref" class="btn1_letter2" style="left:1093px; top:7px; width:56px; height:22px; ">
  256. <caption>조회</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. fcalfList();
  260. ]]>
  261. </script>
  262. </button>
  263. <select1 id="cmb_selectgbn" ref="/root/hidden/selectgbn" class="combo_search" appearance="minimal" style="left:705px; top:9px; width:90px; height:19px; ">
  264. <choices>
  265. <item>
  266. <label>검사분류</label>
  267. <value>1</value>
  268. </item>
  269. <item>
  270. <label>시행부서</label>
  271. <value>2</value>
  272. </item>
  273. </choices>
  274. <script type="javascript" ev:event="xforms-select">
  275. <![CDATA[
  276. fSelectGbn();
  277. ]]>
  278. </script>
  279. </select1>
  280. <select1 id="cmb_select01" ref="/root/hidden/select01" class="combo_s_essential" appearance="minimal" style="left:800px; top:9px; width:110px; height:19px; ">
  281. <choices>
  282. <itemset nodeset="/root/init/LB0111">
  283. <label ref="nm"/>
  284. <value ref="cd"/>
  285. </itemset>
  286. </choices>
  287. <script type="javascript" ev:event="xforms-value-changed">
  288. <![CDATA[
  289. fSetSelect02();
  290. ]]>
  291. </script>
  292. </select1>
  293. <select1 id="cmb_select02" ref="/root/hidden/select02" class="combo_s_essential" appearance="minimal" style="left:915px; top:9px; width:153px; height:19px; ">
  294. <choices>
  295. <itemset nodeset="/root/init/LB0106">
  296. <label ref="nm"/>
  297. <value ref="cd"/>
  298. </itemset>
  299. </choices>
  300. <script type="javascript" ev:event="xforms-select">
  301. <![CDATA[
  302. fcalfList();
  303. ]]>
  304. </script>
  305. </select1>
  306. </group>
  307. <button id="btn_addrow" class="btn2_letter3" style="left:1112px; top:49px; width:53px; height:19px; ">
  308. <caption>행추가</caption>
  309. <script type="javascript" ev:event="DOMActivate">
  310. <![CDATA[
  311. fInsRowAdd();
  312. ]]>
  313. </script>
  314. </button>
  315. <caption id="caption3" class="tit_2" style="left:5px; top:470px; width:183px; height:13px; ">검사항목별 수식</caption>
  316. <textarea id="textarea1" style="left:0px; top:490px; width:1179px; height:225px; ">
  317. <script type="javascript" ev:event="DOMFocusIn">
  318. <![CDATA[
  319. if( grd_calf.row > 0 ){
  320. tmpCalstr = textarea1.value
  321. }
  322. ]]>
  323. </script>
  324. <script type="javascript" ev:event="DOMFocusOut">
  325. <![CDATA[
  326. if( grd_calf.row > 0){
  327. if(tmpCalstr != textarea1.value && grd_calf.rowStatus(grd_calf.row) == 0){
  328. grd_calf.addStatus(grd_calf.row, "update");
  329. }
  330. }
  331. ]]>
  332. </script>
  333. </textarea>
  334. <line id="line2" class="line_1" style="x1:0px; y1:485px; x2:1179px; y2:485px; "/>
  335. </group>
  336. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1180px; height:27px; ">
  337. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1179px; y2:25px; "/>
  338. <button id="btn_save" class="btn4_letter2" style="left:1028px; top:3px; width:56px; height:22px; ">
  339. <caption>저장</caption>
  340. <script type="javascript" ev:event="DOMActivate">
  341. <![CDATA[
  342. fExecalf();
  343. ]]>
  344. </script>
  345. </button>
  346. <button id="btn_clear" class="btn4_letter3" style="left:1087px; top:3px; width:68px; height:22px; ">
  347. <caption>초기화</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. fExeCancel();
  351. ]]>
  352. </script>
  353. </button>
  354. </group>
  355. <group id="group2" style="left:0px; top:0px; width:1165px; height:13px; ">
  356. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">계산결과 검사항목별 수식정의 관리</caption>
  357. </group>
  358. </xhtml:body>
  359. </xhtml:html>