SMLLF01200_검사표시순서관리.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF01200_검사표시순서관리.xrw
  4. * 설 명 : 검사표시순서관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 송요셉
  7. * 작 성 일 : 2006.12.21
  8. * 수정이력 :
  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/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <seqlist>
  20. <tclscd/>
  21. <tclsnm/>
  22. <tclskind/>
  23. <prcpdispseq/>
  24. <rsltdispseq/>
  25. </seqlist>
  26. <tclslist>
  27. <chk/>
  28. <tclscd/>
  29. <tclsnm/>
  30. <tclskind/>
  31. <prcpdispseq/>
  32. <rsltdispseq/>
  33. </tclslist>
  34. </main>
  35. <send>
  36. <codeflag/>
  37. <testlrgcd/>
  38. <testmdlcd/>
  39. <data1/>
  40. <userdeptflagcd/>
  41. </send>
  42. <init>
  43. </init>
  44. <hidden>
  45. <ref>
  46. <testlrgcd>00</testlrgcd>
  47. <testmdlcd>00</testmdlcd>
  48. <seqradio>1</seqradio>
  49. <numrow/>
  50. <startnum/>
  51. </ref>
  52. <seqlist>
  53. <tclscd/>
  54. <tclsnm/>
  55. <tclskind/>
  56. <prcpdispseq/>
  57. <rsltdispseq/>
  58. </seqlist>
  59. <search>
  60. <selectgbn>1</selectgbn>
  61. </search>
  62. <select01/>
  63. <select02/>
  64. </hidden>
  65. </root>
  66. </instance>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  69. <script type="javascript" ev:event="xforms-model-construct-done">
  70. <![CDATA[
  71. tclslist.fixedcellcheckbox(0,1)=true;
  72. model.setValue("/root/send/codeflag", "0104|0102|0000|0111|0106|"); //0104 대분류 0102 중분류
  73. submit("TRLZZ00101");
  74. model.setValue("/root/send/userdeptflagcd", model.getValue("/root/init/LB0000/nm"));
  75. model.setValue("/root/hidden/ref/seqradio", "2");
  76. //fviewlist();
  77. fSelectGbn();
  78. model.setValue("/root/hidden/search/selectgbn","1");
  79. model.refresh();
  80. ]]>
  81. </script>
  82. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/codeflag" replace="instance" resultref="/root/LB"/>
  83. <submission id="TRLLF01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tclslist"/>
  84. <submission id="TXLLF01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" replace="instance"/>
  85. </model>
  86. <script type="javascript">
  87. <![CDATA[
  88. function fGettclslist(){
  89. model.removeNodeset("/root/main/seqlist");
  90. model.removeNodeset("/root/main/tclslist");
  91. model.makeValue("/root/send/selectgbn", model.getValue("/root/hidden/search/selectgbn"));
  92. model.setValue("/root/send/testlrgcd", model.getValue("/root/hidden/select01"));
  93. model.setValue("/root/send/testmdlcd", model.getValue("/root/hidden/select02"));
  94. submit("TRLLF01201");
  95. }
  96. function fdatemove(){
  97. var equaldata = true;
  98. var row = seqlist.rows;
  99. for(i=1;i< tclslist.rows;i++){
  100. equaldata = true;
  101. if(model.getValue("/root/main/tclslist["+i+"]/chk") == 'Y'){
  102. for(j=1 ; j<seqlist.rows ; j++){
  103. if(model.getValue("/root/main/tclslist["+i+"]/tclscd") == model.getValue("/root/main/seqlist["+j+"]/tclscd")){
  104. equaldata = false;
  105. }
  106. }
  107. if(equaldata == false){
  108. alert(model.getValue("/root/main/tclslist["+i+"]/tclsnm")+" 항목은 이미 선택되었습니다.");
  109. }
  110. else{
  111. seqlist.addRow(false);
  112. model.makeNode("/root/main/seqlist["+row+"]/tclscd");
  113. model.makeNode("/root/main/seqlist["+row+"]/tclsnm");
  114. model.makeNode("/root/main/seqlist["+row+"]/spccd");
  115. model.makeNode("/root/main/seqlist["+row+"]/spcnm");
  116. model.makeNode("/root/main/seqlist["+row+"]/tclskind");
  117. model.setValue("/root/main/seqlist["+row+"]/tclscd",model.getValue("/root/main/tclslist["+i+"]/tclscd"));
  118. model.setValue("/root/main/seqlist["+row+"]/tclsnm",model.getValue("/root/main/tclslist["+i+"]/tclsnm"));
  119. model.setValue("/root/main/seqlist["+row+"]/tclskind",model.getValue("/root/main/tclslist["+i+"]/tclskind"));
  120. //model.setValue("/root/main/seqlist["+row+"]/prcpdispseq",model.getValue("/root/main/tclslist["+i+"]/prcpdispseq"));
  121. //model.setValue("/root/main/seqlist["+row+"]/rsltdispseq",model.getValue("/root/main/tclslist["+i+"]/rsltdispseq"));
  122. row++;
  123. }
  124. }
  125. tclslist.rowStatus(i)=0;
  126. model.setValue("/root/main/tclslist["+i+"]/chk", "N");
  127. }
  128. seqlist.refresh();
  129. }
  130. function fInsRowdel(i) {
  131. if(i==1){
  132. var row = seqlist.row;
  133. seqlist.deleteItem(row);
  134. }
  135. else{
  136. model.removeNodeset("/root/main/seqlist");
  137. seqlist.rebuild();
  138. }
  139. }
  140. function fExeEqmtSave() {
  141. for(i=1;i<seqlist.rows ; i++){
  142. seqlist.rowStatus(i) = 2;
  143. }
  144. model.setValue("/root/send/data1", seqlist.getUpdateData());
  145. submit("TXLLF01201");
  146. fGettclslist();
  147. fInsRowdel(2);
  148. }
  149. function ftestcombo(){
  150. var CD = model.getValue("/root/hidden/ref/testlrgcd");
  151. if(CD == "00"){
  152. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  153. model.setvalue("/root/hidden/ref/testmdlcd" , "00");
  154. testmdlcd.disabled = true;
  155. }
  156. else{
  157. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102[cd= '00' or etc01='"+ CD +"']";
  158. model.setvalue("/root/hidden/ref/testmdlcd" , "00");
  159. testmdlcd.disabled = false;
  160. }
  161. testmdlcd.refresh();
  162. }
  163. function fviewlist() {
  164. if(model.getValue("/root/hidden/ref/seqradio")=="1"){
  165. seqlist.colHidden(4) = false;
  166. seqlist.colHidden(5) = true;
  167. }
  168. else{
  169. seqlist.colHidden(4) = true;
  170. seqlist.colHidden(5) = false;
  171. }
  172. model.refresh();
  173. }
  174. function fvalmove(){
  175. if(event.keyCode == "13"){
  176. var inputval = parseInt(input1.currentText);
  177. var setrow = seqlist.row;
  178. if(setrow == -1){
  179. alert("이동할 행을 선택하십시오");
  180. return;
  181. }
  182. if(inputval > 0 && inputval < seqlist.rows){
  183. if(setrow<=inputval){
  184. model.copyNode("/root/hidden/seqlist" , "/root/main/seqlist["+setrow+"]");
  185. seqlist.insertRow(inputval,"below", false);
  186. model.copyNode("/root/main/seqlist["+seqlist.row+"]", "/root/hidden/seqlist");
  187. seqlist.deleteItem(setrow);
  188. }
  189. else{
  190. model.copyNode("/root/hidden/seqlist" , "/root/main/seqlist["+setrow+"]");
  191. seqlist.insertRow(inputval,"below", false);
  192. model.copyNode("/root/main/seqlist["+(inputval+1)+"]", "/root/main/seqlist["+(inputval)+"]");
  193. model.copyNode("/root/main/seqlist["+(inputval)+"]", "/root/hidden/seqlist");
  194. seqlist.deleteItem(setrow+1);
  195. }
  196. seqlist.rebuild();
  197. seqlist.row = inputval;
  198. }
  199. else{
  200. alert("행범위가 알맞지 않습니다.");
  201. }
  202. }
  203. }
  204. function fuprow(){
  205. if(seqlist.row==1){
  206. alert("첫번째 행입니다.")
  207. }
  208. else{
  209. seqlist.insertRow(seqlist.row,"below", false);
  210. model.copyNode("/root/main/seqlist["+seqlist.row+"]","/root/main/seqlist["+(seqlist.row-2)+"]");
  211. seqlist.deleteItem(seqlist.row-2);
  212. }
  213. }
  214. function fdownrow(){
  215. if((seqlist.row+1)==seqlist.rows){
  216. alert("마지막 행입니다.");
  217. }
  218. else{
  219. model.copyNode("/root/hidden/seqlist" , "/root/main/seqlist["+(seqlist.row)+"]");
  220. model.copyNode("/root/main/seqlist["+(seqlist.row)+"]" , "/root/main/seqlist["+(seqlist.row+1)+"]");
  221. model.copyNode("/root/main/seqlist["+(seqlist.row+1)+"]", "/root/hidden/seqlist");
  222. var num = seqlist.row
  223. seqlist.rebuild();
  224. seqlist.row=num+1;
  225. }
  226. }
  227. function fsetseq(){
  228. if(event.keyCode == "13"){
  229. var inputval = input2.currentText;
  230. if(model.getValue("/root/hidden/ref/seqradio")=='1'){
  231. for(i=1; i<seqlist.rows; i++){
  232. model.setValue("/root/main/seqlist["+i+"]/prcpdispseq", inputval);
  233. inputval++;
  234. }
  235. }
  236. else{
  237. for(i=1; i<seqlist.rows; i++){
  238. model.setValue("/root/main/seqlist["+i+"]/rsltdispseq", inputval);
  239. inputval++;
  240. }
  241. }
  242. }
  243. }
  244. function fSelectGbn(){
  245. //검사분류 선택
  246. if(cmb_selectgbn.value == "1"){
  247. //첫번째 콤보에 대분류 셋팅
  248. testlrgcd.choices.itemset.attribute("nodeset") = "/root/init/LB0104";
  249. //두번째 콤보에 중분류 셋팅
  250. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  251. }
  252. //시행부서 선택
  253. else if(cmb_selectgbn.value == "2"){
  254. //첫번째 콤보에 계코드 셋팅
  255. testlrgcd.choices.itemset.attribute("nodeset") = "/root/init/LB0111";
  256. //두번째 콤보에 검사계코드 셋팅
  257. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0106";
  258. }
  259. model.setvalue("/root/hidden/select01", "00");
  260. model.setvalue("/root/hidden/select02", "00");
  261. testlrgcd.refresh();
  262. testmdlcd.refresh();
  263. }
  264. //첫번째 콤보 선택시, 두번째 콤보 셋팅
  265. function fSetSelect02(){
  266. var select01 = model.getvalue("/root/hidden/select01");
  267. //검사분류선택
  268. if(cmb_selectgbn.value == "1"){
  269. if(select01 == "00"){
  270. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102";
  271. }
  272. else{
  273. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0102[cd= '00' or etc01='"+ select01 +"']";
  274. }
  275. //model.setValue("/root/hidden/select01" , "00");
  276. testmdlcd.refresh();
  277. }
  278. //시행부서 선택
  279. else if(cmb_selectgbn.value == "2"){
  280. if(select01 == "00"){
  281. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0106";
  282. }
  283. else{
  284. testmdlcd.choices.itemset.attribute("nodeset") = "/root/init/LB0106[cd= '00' or etc01='"+ select01 +"']";
  285. }
  286. //model.setValue("/root/hidden/select02" , "00");
  287. testmdlcd.refresh();
  288. }
  289. }
  290. ]]>
  291. </script>
  292. </xhtml:head>
  293. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  294. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  295. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:595px; y2:70px; "/>
  296. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">권한목록</caption>
  297. <caption id="caption3" class="tit_2" style="left:665px; top:55px; width:131px; height:14px; ">권한목록</caption>
  298. <line id="line2" class="line_1" style="x1:665px; y1:70px; x2:1194px; y2:70px; "/>
  299. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  300. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  301. <line id="line3" class="line_4" style="x1:1113px; y1:7px; x2:1113px; y2:29px; "/>
  302. <button id="button3" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
  303. <caption>조회</caption>
  304. <script type="javascript" ev:event="DOMActivate">
  305. <![CDATA[
  306. fGettclslist();
  307. ]]>
  308. </script>
  309. </button>
  310. <select1 id="seqradio" ref="/root/hidden/ref/seqradio" visibility="hidden" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:80px; top:10px; width:160px; height:13px; border-style:none; ">
  311. <choices>
  312. <item>
  313. <label>처방순서</label>
  314. <value>1</value>
  315. </item>
  316. <item>
  317. <label>결과순서</label>
  318. <value>2</value>
  319. </item>
  320. </choices>
  321. <script type="javascript" ev:event="xforms-value-changed">
  322. <![CDATA[
  323. //fviewlist();
  324. ]]>
  325. </script>
  326. </select1>
  327. <select1 id="cmb_selectgbn" ref="/root/hidden/search/selectgbn" class="combo_search" visibility="visible" appearance="minimal" style="left:685px; top:10px; width:90px; height:19px; ">
  328. <choices>
  329. <item>
  330. <label>검사분류</label>
  331. <value>1</value>
  332. </item>
  333. <item>
  334. <label>시행부서</label>
  335. <value>2</value>
  336. </item>
  337. </choices>
  338. <script type="javascript" ev:event="xforms-select">
  339. <![CDATA[
  340. fSelectGbn();
  341. ]]>
  342. </script>
  343. </select1>
  344. </group>
  345. <button id="button1" class="btn2_letter3" style="left:475px; top:49px; width:53px; height:19px; ">
  346. <caption>행삭제</caption>
  347. <script type="javascript" ev:event="DOMActivate">
  348. <![CDATA[
  349. fInsRowdel(1);
  350. ]]>
  351. </script>
  352. </button>
  353. <button id="button102" class="icon_left" style="left:617px; top:380px; width:26px; height:19px; ">
  354. <caption/>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. fdatemove();
  358. ]]>
  359. </script>
  360. </button>
  361. <datagrid id="seqlist" nodeset="/root/main/seqlist" caption="검사코드^검사명^검사구분^처방순서^결과순서" colsep="^" colwidth="100, 250, 122, 100, 100" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:595px; height:667px; ">
  362. <col ref="tclscd"/>
  363. <col ref="tclsnm"/>
  364. <col ref="tclskind"/>
  365. <col ref="prcpdispseq" type="input" visibility="hidden"/>
  366. <col ref="rsltdispseq" type="input"/>
  367. <script type="javascript" ev:event="onaftersort">
  368. <![CDATA[
  369. seqlist.gridToInstance();
  370. ]]>
  371. </script>
  372. </datagrid>
  373. <datagrid id="tclslist" nodeset="/root/main/tclslist" caption="^검사코드^검사명^검사구분^처방순서^결과순서" colsep="^" colwidth="30, 100, 250, 126, 50, 50" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:665px; top:75px; width:529px; height:667px; ">
  374. <col checkvalue="Y,N" ref="chk" type="checkbox"/>
  375. <col ref="tclscd"/>
  376. <col ref="tclsnm"/>
  377. <col ref="tclskind"/>
  378. <col ref="prcpdispseq"/>
  379. <col ref="rsltdispseq"/>
  380. <script type="javascript" ev:event="onaftersort">
  381. <![CDATA[
  382. tclslist.gridToInstance();
  383. ]]>
  384. </script>
  385. </datagrid>
  386. <button id="button104" class="icon_top" style="left:95px; top:50px; width:26px; height:19px; ">
  387. <caption/>
  388. <script type="javascript" ev:event="onclick">
  389. <![CDATA[
  390. fuprow();
  391. ]]>
  392. </script>
  393. </button>
  394. <button id="button105" class="icon_bottom" style="left:125px; top:50px; width:26px; height:19px; ">
  395. <caption/>
  396. <script type="javascript" ev:event="onclick">
  397. <![CDATA[
  398. fdownrow();
  399. ]]>
  400. </script>
  401. </button>
  402. <input id="input1" ref="/root/hidden/ref/numrow" style="left:155px; top:50px; width:70px; height:19px; ">
  403. <script type="javascript" ev:event="onkeypress">
  404. <![CDATA[
  405. fvalmove();
  406. ]]>
  407. </script>
  408. </input>
  409. <caption id="caption5" style="left:320px; top:50px; width:55px; height:19px; text-align:center; ">시작번호</caption>
  410. <input id="input2" ref="/root/hidden/ref/startnum" style="left:375px; top:50px; width:70px; height:19px; ">
  411. <script type="javascript" ev:event="onkeypress">
  412. <![CDATA[
  413. fsetseq();
  414. ]]>
  415. </script>
  416. </input>
  417. <button id="button117" class="btn2_letter4" style="left:531px; top:49px; width:64px; height:19px; ">
  418. <caption>전체삭제</caption>
  419. <script type="javascript" ev:event="DOMActivate">
  420. <![CDATA[
  421. fInsRowdel(2);
  422. ]]>
  423. </script>
  424. </button>
  425. </group>
  426. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  427. <button id="button5" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  428. <caption>초기화</caption>
  429. <script type="javascript" ev:event="onclick">
  430. <![CDATA[
  431. model.reset();
  432. ]]>
  433. </script>
  434. </button>
  435. <button id="button11" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  436. <caption>저장</caption>
  437. <script type="javascript" ev:event="DOMActivate">
  438. <![CDATA[
  439. fExeEqmtSave();
  440. ]]>
  441. </script>
  442. </button>
  443. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  444. </group>
  445. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  446. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사표시순서관리</caption>
  447. </group>
  448. <select1 id="testlrgcd" ref="/root/hidden/select01" appearance="minimal" itemcount="10" style="left:785px; top:60px; width:150px; height:19px; ">
  449. <choices>
  450. <itemset nodeset="/root/init/LB0104">
  451. <label ref="nm"/>
  452. <value ref="cd"/>
  453. </itemset>
  454. </choices>
  455. <script type="javascript" ev:event="xforms-value-changed">
  456. <![CDATA[
  457. fSetSelect02();
  458. ]]>
  459. </script>
  460. </select1>
  461. <select1 id="testmdlcd" ref="/root/hidden/select02" appearance="minimal" itemcount="10" style="left:945px; top:60px; width:150px; height:19px; ">
  462. <choices>
  463. <itemset nodeset="/root/init/LB0102">
  464. <label ref="nm"/>
  465. <value ref="cd"/>
  466. </itemset>
  467. </choices>
  468. <script type="javascript" ev:event="xforms-value-changed">
  469. <![CDATA[
  470. fGettclslist();
  471. //fviewlist();
  472. ]]>
  473. </script>
  474. </select1>
  475. <caption id="caption2" class="search_name" style="left:595px; top:59px; width:90px; height:17px; ">검사분류 :</caption>
  476. <caption id="caption4" class="search_name" visibility="hidden" style="left:10px; top:59px; width:65px; height:17px; ">구분 :</caption>
  477. </xhtml:body>
  478. </xhtml:html>