SPADT63502_전광판리모콘.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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. <main>
  10. <drugnoinfo>
  11. <item>
  12. <drugno/>
  13. <updatedt/>
  14. <dispflag/>
  15. </item>
  16. <drugnolist>
  17. <item>
  18. <drugno/>
  19. <dispflag/>
  20. <lastupdtdt/>
  21. <max/>
  22. </item>
  23. <newyn>
  24. <cnt/>
  25. </newyn>
  26. </drugnolist>
  27. </drugnoinfo>
  28. <drugnopanlist>
  29. <item1>
  30. <drugno1/>
  31. <drugno2/>
  32. <drugno3/>
  33. <drugno4/>
  34. <drugno5/>
  35. <drugno6/>
  36. <drugno7/>
  37. <drugno8/>
  38. </item1>
  39. <item1>
  40. <drugno1/>
  41. <drugno2/>
  42. <drugno3/>
  43. <drugno4/>
  44. <drugno5/>
  45. <drugno6/>
  46. <drugno7/>
  47. <drugno8/>
  48. </item1>
  49. <item1>
  50. <drugno1/>
  51. <drugno2/>
  52. <drugno3/>
  53. <drugno4/>
  54. <drugno5/>
  55. <drugno6/>
  56. <drugno7/>
  57. <drugno8/>
  58. </item1>
  59. <item1>
  60. <drugno1/>
  61. <drugno2/>
  62. <drugno3/>
  63. <drugno4/>
  64. <drugno5/>
  65. <drugno6/>
  66. <drugno7/>
  67. <drugno8/>
  68. </item1>
  69. <item1>
  70. <drugno1/>
  71. <drugno2/>
  72. <drugno3/>
  73. <drugno4/>
  74. <drugno5/>
  75. <drugno6/>
  76. <drugno7/>
  77. <drugno8/>
  78. </item1>
  79. <item1>
  80. <drugno1/>
  81. <drugno2/>
  82. <drugno3/>
  83. <drugno4/>
  84. <drugno5/>
  85. <drugno6/>
  86. <drugno7/>
  87. <drugno8/>
  88. </item1>
  89. <item1>
  90. <drugno1/>
  91. <drugno2/>
  92. <drugno3/>
  93. <drugno4/>
  94. <drugno5/>
  95. <drugno6/>
  96. <drugno7/>
  97. <drugno8/>
  98. </item1>
  99. </drugnopanlist>
  100. </main>
  101. <send>
  102. <data>
  103. <drugdd/>
  104. <drugno/>
  105. <allyn/>
  106. </data>
  107. <req>
  108. <drugdd/>
  109. <drugno/>
  110. <ioflag/>
  111. <drugstat/>
  112. <dispflag/>
  113. <dispcnts/>
  114. <inputtm/>
  115. <userid/>
  116. <stocdeptcd/>
  117. <instcd/>
  118. <srchrcvflag/>
  119. <srchdrugmngtyn/>
  120. <pid/>
  121. </req>
  122. </send>
  123. <init>
  124. <drugInput/>
  125. </init>
  126. <hidden>
  127. <item>
  128. <count/>
  129. <delFlag/>
  130. <sound/>
  131. </item>
  132. <cnfrresult/>
  133. </hidden>
  134. </root>
  135. </instance>
  136. <submission id="TRADT01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/drugnoinfo/drugnolist"/>
  137. <submission id="TXADT00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/hidden/item"/>
  138. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  139. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  140. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  141. <script type="javascript">
  142. <![CDATA[
  143. var gTimer = null;
  144. var gTimerMsg = null;
  145. function fAlert(){
  146. alert("전광판 표시 한계를 넘었습니다. \n 임의 삭제 또는 투약 완료로 전광판 숫자를 줄여 주세요.");
  147. }
  148. // 리스트 조회
  149. function fGetDrugNo(){
  150. submit("TRADT01201",false);
  151. var total = 0;
  152. var colcnt = 0;
  153. var z = 1;
  154. for(var a = 0; a < drugList.rows; a++) {
  155. for(var b = 0; b < drugList.cols; b++) {
  156. drugList.valueMatrix(a,b) = "";
  157. }
  158. }
  159. total = getNodesetCount("/root/main/drugnoinfo/drugnolist/item");
  160. colcnt = total/7;
  161. for(var j = 0; j < colcnt; j++) {
  162. for(var i = 0; i < 7; i++) {
  163. if(z <= total) {
  164. drugList.valueMatrix(i, j) = model.getValue("/root/main/drugnoinfo/drugnolist/item[" + z + "]/drugno");
  165. z++;
  166. }
  167. }
  168. }
  169. drugList.refresh();
  170. //if (gTimer != null) {
  171. // window.clearinterval(gTimer); //TIMER 무조건 초기화
  172. // gTimer = null;
  173. //}
  174. if( total > 56){
  175. alert("전광판 표시 한계(63개)를 넘었습니다. \n 임의 삭제 또는 투약 완료로 전광판 숫자를 줄여 주세요.");
  176. //gTimer = window.setInterval("fGetDrugNo()", 10000);
  177. } else {
  178. //gTimer = window.setInterval("fGetDrugNo()", 6000);
  179. model.setFocus("drugnoInput");
  180. }
  181. //drugnoInput.selectionText;
  182. // if(status != "del") {
  183. // fNuCall();
  184. // }
  185. // if(getChildUID("SMADT01200") != "") {
  186. // window.children.item("SMADT01200").model.dispatch("fGetSearch");
  187. // }
  188. }
  189. // }
  190. // 삭제 시 처리
  191. function fSubmitDrugStat(drugstat){
  192. var selrow = 0;
  193. var predrugstat = ""; // 이전처방상태
  194. if (drugList.rows > 0 && drugList.row <= 0)
  195. selrow = 1;
  196. else selrow = drugList.row;
  197. if(model.getValue("/root/init/drugInput") == "") {
  198. /*멀티삭제
  199. for(var i = 0; i < drugList.selectedCells.length; i++) {
  200. // 전송정보
  201. model.setValue("/root/send/req/drugdd" , getCurrentDate());
  202. model.setValue("/root/send/req/drugno" , drugList.valueMatrix(drugList.selectedCells.item(i).row,drugList.selectedCells.item(i).col) );
  203. model.setValue("/root/send/req/drugstat" , "P");
  204. model.setValue("/root/send/req/userid" , getUserId());
  205. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  206. // 전광판처리
  207. if ( drugstat =="P" && model.getValue("/root/send/req/drugno") != ""){
  208. model.setValue("/root/send/req/dispflag", "P");
  209. model.setValue("/root/send/req/inputtm", getCurrentTime());
  210. //전광판 데이터
  211. submit("TXADT00702");
  212. }
  213. }
  214. */
  215. } else {
  216. // 전송정보
  217. model.setValue("/root/send/req/drugdd" , getCurrentDate());
  218. model.setValue("/root/send/req/drugno" , model.getValue("/root/init/drugInput"));
  219. model.setValue("/root/send/req/drugstat" , "P");
  220. model.setValue("/root/send/req/userid" , getUserId());
  221. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  222. // 전광판처리
  223. if ( drugstat =="P" && model.getValue("/root/send/req/drugno") != ""){
  224. model.setValue("/root/send/req/dispflag", "P");
  225. model.setValue("/root/send/req/inputtm", getCurrentTime());
  226. //전광판 데이터
  227. submit("TXADT00702", false);
  228. model.setValue("/root/init/drugInput", "");
  229. drugnoInput.refresh();
  230. drugList.refresh();
  231. }
  232. }
  233. }
  234. function fNuCall(drugno){
  235. // alert("drugno = " + drugno);
  236. // var max_drugno = drugno;
  237. // var max_drugno2;
  238. // var soundStat = "";
  239. //
  240. // alert("aa = " +max_drugno);
  241. // alert("aa = " +max_drugno.length);
  242. // if(max_drugno.length == 1 ){
  243. // max_drugno2 = "000"+max_drugno;
  244. // } else if (max_drugno.length == 2 ){
  245. // max_drugno2 = "00"+max_drugno;
  246. // } else if (max_drugno.length == 3 ){
  247. // max_drugno2 = "0"+max_drugno;
  248. // } else if (max_drugno.length == 4 || max_drugno.length == 5 ){
  249. // max_drugno2 = max_drugno;
  250. // }
  251. // if(soundStat == "A" ){
  252. // alert("max_drugno2 = " +max_drugno2);
  253. // if (max_drugno2.length != 5){
  254. // for (var i = max_drugno2.length; i > 0; i--){
  255. //// // 5번째 자리는 당분간 생략
  256. //// if(i = 5){
  257. //// var OOOOO = max_drugno.substring(0,i-1)+"0000.wav";
  258. //// alert("5 = "+OOOOO)
  259. //// }
  260. // if(i == 4){
  261. // var OOOO = max_drugno2.substring(0,1)+"000.wav";
  262. // snd2 = "";
  263. // if(OOOO != "0000.wav"){
  264. // snd2 ="c:\\windows\\media\\"+OOOO;
  265. // }
  266. // }
  267. // if(i == 3 ){
  268. // var OOO = max_drugno2.substring(1,2)+"00.wav";
  269. // snd3 = "";
  270. // if(OOO != "000.wav"){
  271. // snd3 ="c:\\windows\\media\\"+OOO;
  272. // }
  273. // }
  274. // if(i==2){
  275. // var OO = max_drugno2.substring(2,3)+"0.wav";
  276. // snd4 = "";
  277. // if(OO != "00.wav"){
  278. // snd4 ="c:\\windows\\media\\"+OO;
  279. // }
  280. // }
  281. // if(i==1){
  282. // var O = "0"+max_drugno2.substring(3,4)+".wav";
  283. // snd5 = "";
  284. // if(O != "00.wav"){
  285. // snd5 ="c:\\windows\\media\\"+O;
  286. // }
  287. // }
  288. // }//for
  289. //snd1 ="c:\\windows\\media\\딩동1.wav";
  290. // snd6 ="c:\\windows\\media\\번.wav";
  291. //var intcnt =100;
  292. // call1 = window.setInterval("fCall1()",intcnt);
  293. object1.url = snd1;
  294. // if(OOOO != "0000.wav"){
  295. // intcnt=intcnt+1500;
  296. //// fSleep(500);
  297. // call2 = window.setInterval("fCall2()",intcnt);
  298. // }
  299. // if(OOO != "000.wav"){
  300. // intcnt=intcnt+1500;
  301. //// fSleep(550);
  302. // call3 = window.setInterval("fCall3()",intcnt);
  303. // }
  304. // if(OO != "00.wav"){
  305. // intcnt=intcnt+1000;
  306. //// fSleep(600);
  307. // call4 = window.setInterval("fCall4()",intcnt);
  308. // }
  309. // if(O != "00.wav"){
  310. // intcnt=intcnt+1000;
  311. //// fSleep(650);
  312. // call5 = window.setInterval("fCall5()",intcnt);
  313. // }
  314. // intcnt=intcnt+1000;
  315. //// fSleep(700);
  316. // call6 = window.setInterval("fCall6()",intcnt);
  317. // }
  318. // }
  319. }
  320. function fCall1(){
  321. object1.url = snd1;
  322. window.clearInterval(call1);
  323. }
  324. function fCall2(){
  325. object2.url = snd2;
  326. window.clearInterval(call2);
  327. }
  328. function fCall3(){
  329. object3.url = snd3;
  330. window.clearInterval(call3);
  331. }
  332. function fCall4(){
  333. object4.url = snd4;
  334. window.clearInterval(call4);
  335. }
  336. function fCall5(){
  337. object5.url = snd5;
  338. window.clearInterval(call5);
  339. }
  340. function fCall6(){
  341. object6.url = snd6;
  342. window.clearInterval(call6);
  343. }
  344. function fSleep(numberMillis) {
  345. var now = new Date();
  346. var exitTime = now.getTime() + numberMillis;
  347. while (true) {
  348. now = new Date();
  349. if (now.getTime() > exitTime)
  350. return;
  351. }
  352. }
  353. ]]>
  354. </script>
  355. <script type="javascript" ev:event="xforms-ready">
  356. <![CDATA[
  357. //open("SMADT01200","2","-1","-1","SMADT01200","","","","true");
  358. //open("SMADT01200",2,0,0,"SMADT01200","/root/source","/root/target", "width:1900; height:600; sysmenu:hidden; min:visible; max:true; resize:true; caption:hidden;" , false, "x");
  359. model.setValue("/root/send/data/drugdd", getCurrentDate());
  360. model.setValue("/root/send/data/allyn", "Y");
  361. // model.getValue("/root/hidden/item/sound","/root/hidden/item/sound");
  362. fGetDrugNo();
  363. model.setValue("/root/send/data/allyn", "N");
  364. drugList.refresh();
  365. //1분=60000
  366. ]]>
  367. </script>
  368. <script type="javascript" ev:event="xforms-model-destruct">
  369. <![CDATA[
  370. if ( gTimer !=null ) {
  371. window.clearinterval(gTimer);
  372. }
  373. if ( gTimerMsg !=null ){
  374. window.clearinterval(gTimerMsg);
  375. }
  376. ]]>
  377. </script>
  378. </model>
  379. </xhtml:head>
  380. <xhtml:body pagewidth="520" pageheight="280" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  381. <group id="group3" scroll="auto" style="left:0px; top:0px; width:500px; height:250px; ">
  382. <caption id="caption1" class="tit_2" style="left:5px; top:7px; width:100px; height:14px; ">전광판 리모콘</caption>
  383. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:481px; y2:25px; "/>
  384. <datagrid id="drugList" nodeset="/root/main/drugnopanlist/item1" colsep="|" colwidth="60, 60, 60, 60, 60, 60, 60, 60" dataheight="28" defaultrows="7" ellipsis="true" extendlastcol="noscroll" rowheight="23" rowsep="|" selectionmode="free" style="left:0px; top:30px; width:483px; height:163px; font-size:14pt; font-weight:bold; text-align:right; ">
  385. <col ref="drugno1" style="text-align:right; "/>
  386. <col ref="drugno2" style="text-align:right; "/>
  387. <col ref="drugno3" style="text-align:right; "/>
  388. <col ref="drugno4" style="text-align:right; "/>
  389. <col ref="drugno5" style="text-align:right; "/>
  390. <col ref="drugno6" style="text-align:right; "/>
  391. <col ref="drugno7" style="text-align:right; "/>
  392. <col ref="drugno8" style="text-align:right; "/>
  393. <script type="javascript" ev:event="onclick">
  394. <![CDATA[
  395. //var row = drugList.row;
  396. //var dispflag = "";
  397. //dispflag = model.getValue("/root/main/drugnoinfo/drugnolist/item["+row+"]/dispflag");
  398. if ( drugList.valueMatrix(drugList.row,drugList.col) > ' ') {
  399. fGetDrugNo();
  400. // if (gTimer != null) { //ihyeo73
  401. // window.clearinterval(gTimer);
  402. // gTimer = null;
  403. // gTimer = window.setInterval("fGetDrugNo()", 6000);
  404. //
  405. // }
  406. }
  407. // if(dispflag != "D" ){
  408. var row = drugList.row + 1;
  409. var col = drugList.col + 1;
  410. model.setValue("/root/init/drugInput" ,model.getValue("/root/main/drugnopanlist/item1["+ row +"]/drugno" + col + ""));
  411. // }
  412. //drugList.refresh();
  413. model.refresh();
  414. ]]>
  415. </script>
  416. <script type="javascript" ev:event="xforms-value-changed">
  417. <![CDATA[
  418. ]]>
  419. </script>
  420. </datagrid>
  421. <caption id="caption22" class="tit_2" style="left:94px; top:209px; width:75px; height:13px; ">투약번호</caption>
  422. <input id="drugnoInput" ref="/root/init/drugInput" class="input_default" maxlength="5" format="######" style="left:176px; top:205px; width:100px; height:19px; ">
  423. <script type="javascript" ev:event="onkeyup">
  424. <![CDATA[
  425. if(event.keyCode == "13"){
  426. setInputNodeCurText();
  427. drugInput.dispatch("DOMActivate");
  428. } else {
  429. if ( model.getValue("/root/init/drugInput") > ' ') {
  430. fGetDrugNo();
  431. //if (gTimer != null) { //ihyeo73
  432. // window.clearinterval(gTimer);
  433. // gTimer = null;
  434. // gTimer = window.setInterval("fGetDrugNo()", 5000);
  435. //}
  436. }
  437. }
  438. ]]>
  439. </script>
  440. </input>
  441. <button id="drugInput" class="btn4_letter2" style="left:288px; top:205px; width:56px; height:22px; ">
  442. <caption>입력</caption>
  443. <script type="javascript" ev:event="DOMActivate">
  444. <![CDATA[
  445. //if (gTimer != null) {
  446. // window.clearinterval(gTimer); //TIMER 무조건 초기화
  447. // gTimer = null;
  448. //}
  449. // 전송정보
  450. model.setValue("/root/send/req/drugdd" , getCurrentDate());
  451. model.setValue("/root/send/req/drugno" , model.getValue("/root/init/drugInput"));
  452. model.setValue("/root/send/req/userid" , getUserId());
  453. model.setValue("/root/send/req/instcd" , getUserInfo("dutplceinstcd"));
  454. model.setValue("/root/send/req/dispflag", "U");
  455. model.setValue("/root/send/req/dispcnts", "N");
  456. model.setValue("/root/send/req/inputtm", getCurrentTime());
  457. // model.setValue("/root/hidden/item/sound",selSound.value);
  458. // var z ="F";
  459. // var listCount = getNodesetCount("/root/main/drugnoinfo/drugnolist/item");
  460. //
  461. // if(listCount == 0){
  462. // listCount = 1;
  463. // }
  464. //
  465. // for(i=1; i<=listCount;i++){
  466. // if(model.getValue("/root/init/drugInput") == model.getValue("/root/main/drugnoinfo/drugnolist/item["+i+"]/drugno")){
  467. // z = "F";
  468. // break;
  469. // } else {
  470. // z = "T";
  471. // }
  472. // }
  473. // if(z == "T"){
  474. // fNuCall(model.getValue("/root/init/drugInput"));
  475. // alert("2");
  476. if ( model.getValue("/root/init/drugInput") > ' ' ) {
  477. submit("TXADT00702", false);
  478. }
  479. // } else {
  480. // alert("중복된 데이터가 존재 합니다. \n 다시 한번 확인해 보세요.");
  481. // }
  482. model.setValue("/root/init/drugInput","");
  483. drugnoInput.refresh();
  484. fGetDrugNo();
  485. ]]>
  486. </script>
  487. </button>
  488. <button id="button2" class="btn4_letter2" style="left:356px; top:205px; width:56px; height:22px; ">
  489. <caption>삭제</caption>
  490. <script type="javascript" ev:event="onclick">
  491. <![CDATA[
  492. //if (gTimer != null) {
  493. // window.clearinterval(gTimer); //TIMER 무조건 초기화
  494. // gTimer = null;
  495. //}
  496. fSubmitDrugStat("P");
  497. model.setValue("/root/send/data/allyn", "Y");
  498. fGetDrugNo();
  499. model.setValue("/root/send/data/allyn", "N");
  500. ]]>
  501. </script>
  502. </button>
  503. <button id="btn_cancel" class="btn4_letter2" style="left:421px; top:205px; width:56px; height:22px; ">
  504. <caption>닫기</caption>
  505. <close ev:event="DOMActivate"/>
  506. </button>
  507. </group>
  508. <object id="object1" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  509. <object id="object2" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  510. <object id="object3" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  511. <object id="object4" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  512. <object id="object5" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  513. <object id="object6" clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}" visibility="hidden" style="left:70px; top:105px; width:110px; height:45px; "/>
  514. </xhtml:body>
  515. </xhtml:html>