SMLLF00800_검사소견코드관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF00800_검사소견코드관리.xrw
  4. * 설 명 : 검사소견코드관리
  5. * 설 계 자 : (주)에이씨케이 - 윤재한
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 : 2007.07.10
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <gettestcmtlist>
  20. <cmtcd/>
  21. <cmtcnts/>
  22. <cmtdispseq/>
  23. <cmtdetlcnts/>
  24. <cmtcd2/>
  25. <tsectcd/>
  26. </gettestcmtlist>
  27. <getcmtdetlcnts>
  28. <cmtdetlcnts/>
  29. </getcmtdetlcnts>
  30. </main>
  31. <send>
  32. <sectcd/>
  33. <tsectcd/>
  34. <codeflag/>
  35. <grddata/>
  36. <cmtcd/>
  37. <cmtcnts/>
  38. <cmtdetlcnts/>
  39. <cdc/>
  40. </send>
  41. <hidden>
  42. <ref>
  43. <sectcd>00</sectcd>
  44. <tsectcd>
  45. <cd>00</cd>
  46. <nm/>
  47. </tsectcd>
  48. </ref>
  49. <detl>
  50. <cmtdetlcnts/>
  51. </detl>
  52. <LB0106>
  53. <cd>99</cd>
  54. <nm>[99] 자동소견</nm>
  55. <chk/>
  56. <etc01>-</etc01>
  57. <etc02/>
  58. <etc03>13</etc03>
  59. <etc04>1</etc04>
  60. <ect05/>
  61. </LB0106>
  62. </hidden>
  63. </root>
  64. </instance>
  65. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  66. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  67. <submission id="TRLLF00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/gettestcmtlist"/>
  68. <submission id="TXLLF00801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. // 초기정보 조회
  72. model.setValue("/root/send/codeflag", "0111|0106|"); //0111 시행부서=계=
  73. submit("TRLZZ00101");
  74. tsectC = getNodesetCount("/root/init/LB0106");
  75. model.makeNode("/root/init/LB0106["+ (parseInt(tsectC)+1) +"]");
  76. copyNodeType("/root/init/LB0106["+ (parseInt(tsectC)+1) +"]", "/root/hidden/LB0106");
  77. //핵의학이라면
  78. if(getNodesetCount("/root/init/LB0111[cd='N']") > 0){
  79. model.setValue("/root/hidden/ref/sectcd", "N");
  80. model.setValue("/root/hidden/ref/tsectcd/cd", "NR");
  81. }
  82. model.refresh();
  83. ]]>
  84. </script>
  85. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0111"/>
  86. </model>
  87. <script type="javascript">
  88. <![CDATA[
  89. //초기화
  90. function fSetInit() {
  91. model.reset();
  92. }
  93. //시행부서 검사계 초기정보 조회
  94. function fSetSect(){
  95. var etc = model.getvalue("/root/hidden/ref/sectcd");
  96. if(etc == "00"){
  97. cmb_TsectCd.choices.itemset.attribute("nodeset") = "/root/init/LB0106";
  98. model.setvalue("/root/hidden/ref/tsectcd/cd" , "00");
  99. }
  100. else{
  101. model.setvalue("/root/hidden/ref/tsectcd/cd" , "00");
  102. cmb_TsectCd.choices.itemset.attribute("nodeset") = "/root/init/LB0106[cd= '00' or etc01='"+ etc +"']";
  103. }
  104. cmb_TsectCd.refresh();
  105. }
  106. //행추가
  107. function fInsRowAdd(pGridId) {
  108. pGridId.additem();
  109. }
  110. //행삭제
  111. function fInsRowDel() {
  112. grd_TestCmtList.rowStatus(grd_TestCmtList.row) = 4;
  113. //grd_TestCmtList.deleteItem(grd_TestCmtList.row); //행삭제
  114. }
  115. //조회
  116. function fGetTestCmtList() {
  117. model.setValue("/root/send/sectcd", model.getValue("/root/hidden/ref/sectcd")); //시행부서
  118. model.setValue("/root/send/tsectcd", model.getValue("/root/hidden/ref/tsectcd/cd")); //시행부서상세
  119. submit("TRLLF00801");
  120. //소견상세내용 자동 조회
  121. fGetCmtDetlCnts("1");
  122. }
  123. //소견상세내용조회
  124. function fGetCmtDetlCnts(row) {
  125. if(row != "1") {
  126. row = grd_TestCmtList.row;
  127. }
  128. model.setValue("/root/hidden/detl/cmtdetlcnts", model.getValue("/root/main/gettestcmtlist["+row+"]/cmtdetlcnts"));
  129. tar_CmtDetlCnts.refresh();
  130. }
  131. //저장
  132. function fExeTestCmtList() {
  133. var ecd = model.getValue("/root/hidden/ref/tsectcd/cd");
  134. model.setValue("/root/send/grddata", grd_TestCmtList.getUpdateData());
  135. if(ecd == "00" && grd_TestCmtList.rowStatus(grd_TestCmtList.row) == 3) {
  136. alert("시행부서 검사계가 선택되지 않았습니다.\n시행부서 검사계를 선택하여 주세요.");
  137. return;
  138. } else if(grd_TestCmtList.textmatrix(grd_TestCmtList.row, 1) == ""){
  139. alert("소견코드를 입력하지 않았습니다.\n소견코드를 입력하세요.");
  140. } else if(grd_TestCmtList.textmatrix(grd_TestCmtList.row, 2) == ""){
  141. alert("소견내용을 입력하지 않았습니다.\n소견내용를 입력하세요.");
  142. } else if(grd_TestCmtList.textmatrix(grd_TestCmtList.row, 3) == ""){
  143. alert("표시순서를 입력하지 않았습니다.\n표시순서를 입력하세요.");
  144. } else if(tar_CmtDetlCnts.currentText == "") {
  145. alert("소견상세내용을 입력하지 않았습니다.\n소견상세내용을 입력하세요.");
  146. } else{
  147. for( i = 1; i < grd_TestCmtList.rows; i++)
  148. {
  149. if(grd_TestCmtList.rowStatus(grd_TestCmtList.row) == 3) {
  150. model.setValue("/root/main/gettestcmtlist["+ i +"]/tsectcd", ecd);
  151. }
  152. }
  153. model.setValue("/root/send/grddata", grd_TestCmtList.getUpdateData());
  154. submit("TXLLF00801");
  155. //검사소견목록 자동 조회
  156. fGetTestCmtList();
  157. }
  158. }
  159. //소견상세내용을 그리드에 복사
  160. function fSetEditCmt(){
  161. var ecd = model.getValue("/root/hidden/ref/tsectcd/cd");
  162. if(tar_CmtDetlCnts.oldValue == "" && grd_TestCmtList.rowStatus(grd_TestCmtList.row) == 3){
  163. grd_TestCmtList.rowStatus(grd_TestCmtList.row) = 3;
  164. }else {
  165. grd_TestCmtList.rowStatus(grd_TestCmtList.row) = 2;
  166. }
  167. model.setValue("/root/main/gettestcmtlist["+ grd_TestCmtList.row +"]/cmtdetlcnts", tar_CmtDetlCnts.currentText);//소견상세내용
  168. if(ecd != "00") {
  169. model.setValue("/root/main/gettestcmtlist["+ grd_TestCmtList.row +"]/tsectcd", model.getValue("/root/hidden/ref/tsectcd/cd"));//시행부서
  170. }
  171. }
  172. ]]>
  173. </script>
  174. </xhtml:head>
  175. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  176. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  177. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:635px; y2:70px; "/>
  178. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">검사소견목록</caption>
  179. <button id="button2" class="btn2_letter3" style="left:581px; top:50px; width:53px; height:19px; ">
  180. <caption>행추가</caption>
  181. <script type="javascript" ev:event="DOMActivate">
  182. <![CDATA[
  183. fInsRowAdd(grd_TestCmtList);
  184. ]]>
  185. </script>
  186. </button>
  187. <button id="button1" class="btn2_letter3" style="left:525px; top:50px; width:53px; height:20px; ">
  188. <caption>행삭제</caption>
  189. <script type="javascript" ev:event="DOMActivate">
  190. <![CDATA[
  191. fInsRowDel();
  192. ]]>
  193. </script>
  194. </button>
  195. <datagrid id="grd_TestCmtList" nodeset="/root/main/gettestcmtlist" caption="소견코드^소견내용^표시순서^상세내용^cmtcd2^tsectcd" colsep="^" colwidth="80, 447, 70, 0, 0, 0" dataheight="23" defaultrows="1" explorerbar="sortshow" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:635px; height:669px; ">
  196. <col ref="cmtcd" type="input" style="text-align:center; "/>
  197. <col ref="cmtcnts" type="input"/>
  198. <col ref="cmtdispseq" type="input" style="text-align:center; "/>
  199. <col ref="cmtdetlcnts" type="input"/>
  200. <col ref="cmtcd2"/>
  201. <col ref="tsectcd"/>
  202. <script type="javascript" ev:event="onclick">
  203. <![CDATA[
  204. fGetCmtDetlCnts();
  205. ]]>
  206. </script>
  207. <script type="javascript" ev:event="onaftersort">
  208. <![CDATA[
  209. grd_TestCmtList.gridToInstance();
  210. ]]>
  211. </script>
  212. </datagrid>
  213. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  214. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  215. <line id="line3" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  216. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  217. <button id="btn_Ref" class="btn1_letter2" style="left:1123px; top:8px; width:56px; height:22px; ">
  218. <caption>조회</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. fGetTestCmtList();
  222. ]]>
  223. </script>
  224. </button>
  225. <select1 id="cmb_SectCd" ref="/root/hidden/ref/sectcd" class="combo_s_essential" appearance="minimal" itemcount="10" style="left:108px; top:8px; width:162px; height:19px; ">
  226. <choices>
  227. <itemset nodeset="/root/init/LB0111">
  228. <label ref="nm"/>
  229. <value ref="cd"/>
  230. </itemset>
  231. </choices>
  232. <script type="javascript" ev:event="xforms-value-changed">
  233. <![CDATA[
  234. fSetSect();
  235. ]]>
  236. </script>
  237. </select1>
  238. <select1 id="cmb_TsectCd" ref="/root/hidden/ref/tsectcd/cd" class="combo_s_essential" appearance="minimal" itemcount="10" style="left:275px; top:8px; width:162px; height:19px; ">
  239. <choices>
  240. <itemset nodeset="/root/init/LB0106">
  241. <label ref="nm"/>
  242. <value ref="cd"/>
  243. </itemset>
  244. </choices>
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. fGetTestCmtList();
  248. ]]>
  249. </script>
  250. </select1>
  251. </group>
  252. <caption id="caption3" class="tit_2" style="left:645px; top:55px; width:131px; height:13px; ">소견상세내용</caption>
  253. <line id="line2" class="line_1" style="x1:640px; y1:70px; x2:1190px; y2:70px; "/>
  254. <textarea id="tar_CmtDetlCnts" ref="/root/hidden/detl/cmtdetlcnts" style="left:640px; top:75px; width:550px; height:669px; ">
  255. <script type="javascript" ev:event="xforms-value-changed">
  256. <![CDATA[
  257. fSetEditCmt();
  258. ]]>
  259. </script>
  260. </textarea>
  261. </group>
  262. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  263. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  264. <button id="btn_Save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  265. <caption>저장</caption>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. fExeTestCmtList();
  269. ]]>
  270. </script>
  271. </button>
  272. <button id="btn_Init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  273. <caption>초기화</caption>
  274. <script type="javascript" ev:event="DOMActivate">
  275. <![CDATA[
  276. fSetInit();
  277. ]]>
  278. </script>
  279. </button>
  280. </group>
  281. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  282. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사소견코드관리</caption>
  283. </group>
  284. </xhtml:body>
  285. </xhtml:html>