SMZWT00110_AWT 구문관리(개인별).xrw 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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. <send>
  10. <sentensetype>S</sentensetype>
  11. <keyword/>
  12. <sentense/>
  13. <awttype>P</awttype>
  14. <userid/>
  15. </send>
  16. <save>
  17. </save>
  18. <main>
  19. <awtlist/>
  20. </main>
  21. <temp>
  22. <awtlist/>
  23. </temp>
  24. </root>
  25. </instance>
  26. <submission id="TRZWT00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/awtlist"/>
  27. <submission id="TXZWT00200" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save" replace="instance"/>
  28. </model>
  29. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  30. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  31. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  32. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  33. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  34. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  35. <json/>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. //model.setValue("/root/send/awttype", getViewer("sysMessage").window.javascript.fGetUserAwtGrpCd()); 이윤주 막음
  39. model.removenode("/root/main/awtlist");
  40. model.makeNode("/root/main/awtlist");
  41. if (model.getValue("/root/send/awttype") == "C") {
  42. button1.disabled = true;
  43. button2.disabled = true;
  44. button3.disabled = true;
  45. button4.disabled = true;
  46. button5.disabled = true;
  47. } else {
  48. button1.disabled = false;
  49. button2.disabled = false;
  50. button3.disabled = false;
  51. button4.disabled = false;
  52. button5.disabled = false;
  53. }
  54. model.refresh();
  55. if (!submit("TRZWT00100"))
  56. return;
  57. grd_awtlist.clearStatus();
  58. if (model.getValue("/root/send/sentensetype") == "W") {
  59. grd_awtlist.valueMatrix(0, 1) = "단어";
  60. grd_awtlist.colHidden(2) = true;
  61. cpt_usetxt.visible = false;
  62. } else {
  63. grd_awtlist.valueMatrix(0, 1) = "약어";
  64. grd_awtlist.colHidden(2) = false;
  65. cpt_usetxt.visible = true;
  66. }
  67. var cnt = getNodesetCount("/root/main/awtlist/item");
  68. if( cnt > 0 ){
  69. cpt_cnt.value = "( " + cnt + " 건 )";
  70. cpt_cnt.visible = true;
  71. }else{
  72. cpt_cnt.visible = false;
  73. }
  74. grd_awtlist.resizeCells();
  75. model.refresh();
  76. ]]>
  77. </script>
  78. </xhtml:head>
  79. <xhtml:body pagewidth="930" pageheight="700">
  80. <group id="grd_main" style="left:0px; top:0px; width:905px; height:40px; vertical-align:top; ">
  81. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:905px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  82. <input id="ipt_pKeyword" ref="/root/send/keyword" class="input_search" style="left:405px; top:11px; width:115px; height:19px; "/>
  83. <caption id="caption8" class="search_name" style="left:10px; top:12px; width:60px; height:17px; ">유형 :</caption>
  84. <select1 id="radio1" ref="/root/send/sentensetype" class="radio_search" appearance="full" cols="2" overflow="visible" style="left:75px; top:12px; width:95px; height:20px; border-style:none; ">
  85. <choices>
  86. <item>
  87. <label>단어</label>
  88. <value>W</value>
  89. </item>
  90. <item>
  91. <label>구문</label>
  92. <value>S</value>
  93. </item>
  94. </choices>
  95. <script type="javascript" ev:event="xforms-value-changed">
  96. <![CDATA[
  97. if (model.getValue("/root/send/sentensetype") == "W") {
  98. grd_awtlist.valueMatrix(0, 1) = "단어";
  99. grd_awtlist.colHidden(2) = true;
  100. cpt_usetxt.visible = false;
  101. } else {
  102. grd_awtlist.valueMatrix(0, 1) = "약어";
  103. grd_awtlist.colHidden(2) = false;
  104. cpt_usetxt.visible = true;
  105. }
  106. model.removenode("/root/main/awtlist");
  107. model.makeNode("/root/main/awtlist");
  108. model.refresh();
  109. if (!submit("TRZWT00100"))
  110. return;
  111. grd_awtlist.clearStatus();
  112. if (model.getValue("/root/send/sentensetype") == "W") {
  113. grd_awtlist.valueMatrix(0, 1) = "단어";
  114. grd_awtlist.colHidden(2) = true;
  115. cpt_usetxt.visible = false;
  116. } else {
  117. grd_awtlist.valueMatrix(0, 1) = "약어";
  118. grd_awtlist.colHidden(2) = false;
  119. cpt_usetxt.visible = true;
  120. }
  121. var cnt = getNodesetCount("/root/main/awtlist/item");
  122. if( cnt > 0 ){
  123. cpt_cnt.value = "( " + cnt + " 건 )";
  124. cpt_cnt.visible = true;
  125. }else{
  126. cpt_cnt.visible = false;
  127. }
  128. grd_awtlist.resizeCells();
  129. model.refresh();
  130. ]]>
  131. </script>
  132. </select1>
  133. <select1 id="rdo_awt" ref="/root/send/awttype" class="radio_search" appearance="full" cols="3" overflow="visible" style="left:180px; top:12px; width:100px; height:20px; border-style:none; ">
  134. <choices>
  135. <item>
  136. <label>개인</label>
  137. <value>P</value>
  138. </item>
  139. <item>
  140. <label>공용</label>
  141. <value>C</value>
  142. </item>
  143. </choices>
  144. <script type="javascript" ev:event="xforms-value-changed">
  145. <![CDATA[
  146. model.removenode("/root/main/awtlist");
  147. model.makeNode("/root/main/awtlist");
  148. model.refresh();
  149. if (model.getValue("/root/send/awttype") == "C") {
  150. button1.disabled = true;
  151. button2.disabled = true;
  152. button3.disabled = true;
  153. button4.disabled = true;
  154. button5.disabled = true;
  155. } else {
  156. button1.disabled = false;
  157. button2.disabled = false;
  158. button3.disabled = false;
  159. button4.disabled = false;
  160. button5.disabled = false;
  161. }
  162. if (!submit("TRZWT00100"))
  163. return;
  164. grd_awtlist.clearStatus();
  165. if (model.getValue("/root/send/sentensetype") == "W") {
  166. grd_awtlist.valueMatrix(0, 1) = "단어";
  167. grd_awtlist.colHidden(2) = true;
  168. cpt_usetxt.visible = false;
  169. } else {
  170. grd_awtlist.valueMatrix(0, 1) = "약어";
  171. grd_awtlist.colHidden(2) = false;
  172. cpt_usetxt.visible = true;
  173. }
  174. var cnt = getNodesetCount("/root/main/awtlist/item");
  175. if( cnt > 0 ){
  176. cpt_cnt.value = "( " + cnt + " 건 )";
  177. cpt_cnt.visible = true;
  178. }else{
  179. cpt_cnt.visible = false;
  180. }
  181. grd_awtlist.resizeCells();
  182. model.refresh();
  183. ]]>
  184. </script>
  185. </select1>
  186. <caption id="caption1" class="search_name" style="left:280px; top:12px; width:125px; height:17px; ">단어 또는 약어 :</caption>
  187. <caption id="caption2" class="search_name" style="left:530px; top:12px; width:135px; height:17px; ">구문 안의 단어 :</caption>
  188. <input id="input1" ref="/root/send/sentense" class="input_search" style="left:655px; top:11px; width:160px; height:19px; "/>
  189. <button id="btn_search" class="btn1_letter2" style="left:840px; top:10px; width:56px; height:22px; ">
  190. <caption>조회</caption>
  191. <script type="javascript" ev:event="DOMActivate">
  192. <![CDATA[
  193. model.removenode("/root/main/awtlist");
  194. model.makeNode("/root/main/awtlist");
  195. model.refresh();
  196. if (!submit("TRZWT00100"))
  197. return;
  198. grd_awtlist.clearStatus();
  199. if (model.getValue("/root/send/sentensetype") == "W") {
  200. grd_awtlist.valueMatrix(0, 1) = "단어";
  201. grd_awtlist.colHidden(2) = true;
  202. cpt_usetxt.visible = false;
  203. } else {
  204. grd_awtlist.valueMatrix(0, 1) = "약어";
  205. grd_awtlist.colHidden(2) = false;
  206. cpt_usetxt.visible = true;
  207. }
  208. var cnt = getNodesetCount("/root/main/awtlist/item");
  209. if( cnt > 0 ){
  210. cpt_cnt.value = "( " + cnt + " 건 )";
  211. cpt_cnt.visible = true;
  212. }else{
  213. cpt_cnt.visible = false;
  214. }
  215. grd_awtlist.resizeCells();
  216. model.refresh();
  217. ]]>
  218. </script>
  219. </button>
  220. <line id="line13" style="x1:831px; y1:10px; x2:831px; y2:31px; border-color:#ffe4bb; border-left-style:solid; "/>
  221. </group>
  222. <datagrid id="grd_awtlist" nodeset="/root/main/awtlist/item" allowuserresize="true" autoresize="true" autosizemouse="true" caption="단어^구문" colwidth="141, 611, 100, 100, 100" dataheight="25" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:0px; top:74px; width:905px; height:590px; border-color:#808080; ">
  223. <col ref="keyword" type="input"/>
  224. <col ref="sentense" type="input"/>
  225. <col ref="sentensetype" type="input" visibility="hidden"/>
  226. <col ref="awttype" type="input" visibility="hidden"/>
  227. <col ref="userid" type="input" visibility="hidden"/>
  228. <col ref="awtseq" visibility="hidden"/>
  229. <col ref="backkeyword" visibility="hidden"/>
  230. <script type="javascript" ev:event="onaftersort">
  231. <![CDATA[
  232. grd_awtlist.gridToInstance();
  233. ]]>
  234. </script>
  235. <script type="javascript" ev:event="DOMFocusOut">
  236. <![CDATA[
  237. // 이미 입력되어있는 약어와 같은지 체크
  238. var keyword = model.getValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/keyword");
  239. if( keyword != "" ){
  240. var NodeCnt = 0;
  241. for( var i = 1; i <= grd_awtlist.rows - grd_awtlist.fixedRows ; i++ ){
  242. if( keyword == model.getValue("/root/main/awtlist/item[" + i + "]/keyword") ){
  243. NodeCnt++;
  244. }
  245. }
  246. if( NodeCnt > 1 ){
  247. messageBox("[" + keyword + "] 동일한" + grd_awtlist.valueMatrix(0, 2) + "가 존재합니다." , "C999");
  248. model.setValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/keyword", "");
  249. return;
  250. }
  251. }
  252. model.refresh();
  253. ]]>
  254. </script>
  255. </datagrid>
  256. <button id="button5" class="btn2_letter4" visibility="hidden" style="left:672px; top:46px; width:64px; height:19px; ">
  257. <caption>엑셀입력</caption>
  258. <script type="javascript" ev:event="DOMActivate">
  259. <![CDATA[
  260. var fileName = window.fileDialog("open", "", false);
  261. if(fileName==""){
  262. return;
  263. }
  264. grd_awtlist.loadExcel(fileName);
  265. grd_awtlist.deleteRow(1);
  266. ]]>
  267. </script>
  268. </button>
  269. <button id="button1" class="btn2_letter4" visibility="hidden" style="left:606px; top:46px; width:64px; height:19px; ">
  270. <caption>엑셀저장</caption>
  271. <script type="javascript" ev:event="DOMActivate">
  272. <![CDATA[
  273. var fileName = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인 두번째 테스트
  274. if (fileName != "")
  275. {
  276. grd_awtlist.saveExcel(fileName);
  277. }
  278. ]]>
  279. </script>
  280. </button>
  281. <button id="button2" class="btn5_letter3" disabled="true" style="left:738px; top:46px; width:53px; height:19px; ">
  282. <caption>행추가</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. grd_awtlist.addRow();
  286. model.makeValue("/root/main/awtlist/item[" + grd_awtlist.row + "]/sentense", "구문을 \n입력해주세요.");
  287. grd_awtlist.editCell();
  288. ]]>
  289. </script>
  290. </button>
  291. <button id="button3" class="btn5_letter3" disabled="true" style="left:793px; top:46px; width:53px; height:19px; ">
  292. <caption>행삭제</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. var row = grd_awtlist.row;
  296. var rowStatus = grd_awtlist.rowStatus(row);
  297. if( rowStatus == 1 ){
  298. grd_awtlist.deleteRow(row);
  299. }else if( rowStatus == 0 ){
  300. grd_awtlist.rowStatus(row) = 4;
  301. }
  302. model.refresh();
  303. ]]>
  304. </script>
  305. </button>
  306. <button id="button4" class="btn4_letter2" disabled="true" style="left:850px; top:45px; width:56px; height:22px; ">
  307. <caption>저장</caption>
  308. <script type="javascript" ev:event="DOMActivate">
  309. <![CDATA[
  310. var cnt = 0;
  311. for (var i = 1; i <= grd_awtlist.rows-grd_awtlist.fixedRows; i++) {
  312. cnt = 0;
  313. if (model.getValue("/root/send/sentensetype") == "W"){
  314. model.setValue("/root/main/awtlist/item[" + i + "]/sentense", model.getValue("/root/main/awtlist/item[" + i + "]/keyword"));
  315. }
  316. if(model.getValue("/root/send/sentensetype") == "S"){
  317. if( model.getValue("/root/main/awtlist/item[" + i + "]/keyword") == "" ){
  318. messageBox("빈 값으로 단어를 저장할 수 없습니다.【 " + i + "번째 】", "C999");
  319. return;
  320. }
  321. if( model.getValue("/root/main/awtlist/item[" + i + "]/sentense") == "" ){
  322. messageBox("빈 값으로 구문을 저장할 수 없습니다. \n【 " + i + "번째 단어 : " + model.getValue("/root/main/awtlist/item[" + i + "]/keyword") + " 】", "C999");
  323. return;
  324. }
  325. }
  326. model.setValue("/root/main/awtlist/item[" + i + "]/awttype", model.getValue("/root/send/awttype"));
  327. model.setValue("/root/main/awtlist/item[" + i + "]/sentensetype", model.getValue("/root/send/sentensetype"));
  328. for(var j = 1; j <= grd_awtlist.rows-grd_awtlist.fixedRows; j++){
  329. if( model.getValue("/root/main/awtlist/item[" + i + "]/keyword") == model.getValue("/root/main/awtlist/item[" + j + "]/keyword")){
  330. cnt++;
  331. }
  332. }
  333. if( cnt > 1 ){
  334. messageBox("[" + model.getValue("/root/main/awtlist/item[" + i + "]/keyword") + "] 동일한 " + grd_awtlist.valueMatrix(0, 2) + "가 존재합니다." , "C999");
  335. return;
  336. }
  337. }
  338. // if( messageBox("AWT 단어/구문을 저장","Q002") == 6){
  339. model.setValue("/root/save", grd_awtlist.getUpdateData());
  340. if (submit("TXZWT00200")) {
  341. alert("저장되었습니다.");
  342. btn_search.dispatch("DOMActivate");
  343. } else {
  344. alert("저장에 실패하였습니다.");
  345. return;
  346. }
  347. ]]>
  348. </script>
  349. </button>
  350. <caption id="caption5" style="left:15px; top:670px; width:260px; height:15px; font-weight:bold; color:#ff0000; ">셀내에서 한줄띄움은 Ctrl+Enter 입니다.</caption>
  351. <caption id="caption4" style="left:270px; top:670px; width:235px; height:15px; font-weight:bold; ">단어는 최대 2000개까지 표시됩니다.</caption>
  352. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:905px; y2:70px; "/>
  353. <caption id="cpt_usetxt" style="left:5px; top:50px; width:515px; height:15px; font-weight:bold; color:#0000ff; ">※ 사용법 : 기록화면에서 약어를 입력하신 후 F10을 누르시면 구문이 COPY됩니다.</caption>
  354. <button id="button6" class="btn2_letter3" visibility="hidden" style="left:510px; top:46px; width:53px; height:19px; ">
  355. <caption>도움말</caption>
  356. <script type="javascript" ev:event="DOMActivate">
  357. <![CDATA[
  358. getHelpPage();
  359. ]]>
  360. </script>
  361. </button>
  362. <caption id="cpt_cnt" style="left:815px; top:670px; width:90px; height:15px; font-weight:bold; text-align:right; "/>
  363. <button id="button7" style="left:615px; top:670px; width:20px; height:10px; ">
  364. <caption/>
  365. <script type="javascript" ev:event="DOMActivate">
  366. <![CDATA[
  367. getHelpPage();
  368. ]]>
  369. </script>
  370. </button>
  371. </xhtml:body>
  372. </xhtml:html>