SMADB65000_MedicalZone.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>Medical Zone (약품정보)</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <druginfo>
  11. <codelist>
  12. <dgseq/>
  13. <instcd/>
  14. <dginsdate/>
  15. <dgtitle/>
  16. <dgbigo/>
  17. <filenm/>
  18. <filepath/>
  19. </codelist>
  20. </druginfo>
  21. </main>
  22. <send>
  23. <viewinfo>
  24. <viewlist>
  25. <dgseq/>
  26. <instcd/>
  27. <dginsdate/>
  28. <dgtitle/>
  29. <dgbigo/>
  30. <filenm/>
  31. <filepath/>
  32. </viewlist>
  33. </viewinfo>
  34. <save>
  35. <reqdesc/>
  36. <file/>
  37. </save>
  38. </send>
  39. <tmp>
  40. <datalist>
  41. <maxseq>
  42. <seq/>
  43. <instcd/>
  44. </maxseq>
  45. </datalist>
  46. <viewseq>
  47. <seq/>
  48. <instcd/>
  49. </viewseq>
  50. </tmp>
  51. <hidden>
  52. <file/>
  53. </hidden>
  54. </root>
  55. </instance>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. // model.refresh();
  59. ]]>
  60. </script>
  61. <submission id="TRADB65001" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/send/viewinfo/viewlist"/>
  62. <submission id="TRADB65200" mediatype="multipart/form-data" method="form-data-post" ref="/root/main/druginfo/codelist" resultref="/root/tmp/datalist/viewseq"/>
  63. <submission id="TRADB65000" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/tmp/datalist"/>
  64. <submission id="TRADB65300" mediatype="application/x-www-form-urlencoded" method="form-data-post" ref="/root/hidden/file" resultref="/root/main/filepath"/>
  65. <submission id="TRADB65002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/tmp/viewseq" resultref="/root/main/druginfo/codelist"/>
  66. <submission id="TRADB65003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/druginfo/codelist" resultref="/root/main"/>
  67. <submission id="TRADB65400" mediatype="application/x-www-form-urlencoded" method="form-data-post" ref="/root/tmp/viewseq"/>
  68. </model>
  69. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  73. <script type="javascript" src="../../../ast/pharmacyweb/js/SMADB65000.js"/>
  74. <script type="javascript">
  75. <![CDATA[
  76. function fInitialize() {
  77. //모든 데이타을 claear 셋팅하는 부분
  78. model.setvalue("/root/main/druginfo/codelist/instcd", "" );
  79. model.setvalue("/root/main/druginfo/codelist/dgseq", "" );
  80. model.setvalue("/root/main/druginfo/codelist/dginsdate", "" );
  81. model.setvalue("/root/main/druginfo/codelist/dgtitle", "" );
  82. model.setvalue("/root/main/druginfo/codelist/dgbigo", "" );
  83. model.setvalue("/root/main/druginfo/codelist/filenm", "" );
  84. model.setvalue("/root/main/druginfo/codelist/filepath", "" );
  85. model.setvalue("/root/hidden/file", "" );
  86. model.setvalue("/root/tmp/viewseq/instcd", "" );
  87. model.setvalue("/root/tmp/viewseq/seq", "" );
  88. model.setvalue("/root/main/druginfo/codelist/filepath", "" );
  89. SaveFlag = "Y" ;
  90. submit("TRADB65000");
  91. var work_seq_tmp = model.getValue("/root/tmp/datalist/maxseq/seq");
  92. // alert(work_seq_tmp)
  93. model.setValue("/root/main/druginfo/codelist/dgseq",work_seq_tmp);
  94. model.refresh();
  95. }
  96. function fCheckSaveData() {
  97. /////구분
  98. var inpseq = model.getValue( "/root/tmp/datalist/maxseq/seq");
  99. if ( inpseq == "" ) {
  100. messageBox("신규버튼을 클릭하고 등록하세요!! ","");
  101. /////////저장 데이타 점검 Flag
  102. SaveFlag = 'N' ;
  103. }
  104. var instcd = model.getValue( "/root/main/druginfo/codelist/instcd");
  105. if ( instcd == "" ) {
  106. messageBox("구분를 선택하세요!! ","");
  107. /////////저장 데이타 점검 Flag
  108. SaveFlag = 'N' ;
  109. }
  110. var drugtitle = model.getValue( "/root/main/druginfo/codelist/dgtitle");
  111. if ( drugtitle == "" ) {
  112. messageBox("제목을를 입력하세요!! ","");
  113. /////////저장 데이타 점검 Flag
  114. SaveFlag = 'N' ;
  115. }
  116. var indate = model.getValue( "/root/main/druginfo/codelist/dginsdate" );
  117. if ( indate == "" ) {
  118. messageBox("등록일자를 입력하세요!! ","");
  119. /////////저장 데이타 점검 Flag
  120. SaveFlag = 'N' ;
  121. }
  122. var savefile = model.getValue( "/root/main/druginfo/codelist/filenm");
  123. if ( savefile == "" ) {
  124. messageBox("첨부파일을 등록하세요!! ","");
  125. /////////저장 데이타 점검 Flag
  126. SaveFlag = 'N' ;
  127. }
  128. }
  129. ////////저장루틴
  130. function fSaveData(savemode) {
  131. // alert("savemode : " + savemode)
  132. //alert(savemode);
  133. //----신규 Insert ,update하기
  134. if (savemode == "i"){
  135. submit("TRADB65200"); // 데이타 저장 서브밋
  136. submit("TRADB65001"); // 저장 데이타 조회 서브밋
  137. //----삭제 하기
  138. }else if(savemode == "d"){
  139. // alert("savemode : " + savemode)
  140. submit("TRADB65400");
  141. submit("TRADB65001"); // 저장 데이타 조회 서브밋
  142. }
  143. }
  144. function fupload(){
  145. var files = window.fileDialog("open", ",", false);
  146. var replacepath = "";
  147. if ( files.length <= 0 ) return;
  148. model.makeValue(ipt_updpath.attribute("ref") , files); //전체파일경로와이름을 셋팅
  149. var filename = files.substring(files.lastIndexOf('\\')+1 , files.length ); //파일이름만 나오게 문자정리
  150. model.setValue(inp_savefile.attribute("ref") , filename);
  151. submit("TRADB65300");
  152. model.setValue("/root/main/druginfo/codelist/filepath",model.getValue("/root/main/filepath/filepath"));
  153. ipt_filepath.dispatch("xforms-value-changed");
  154. model.refresh();
  155. }
  156. function fdown(){
  157. var filenm = model.getValue("/root/main/druginfo/codelist/filenm");
  158. var filepath = model.getValue("/root/main/druginfo/codelist/filepath");
  159. //파일명의 확장자만 받아옴
  160. var fileext = filenm.lastIndexOf(".");
  161. var ext = filenm.substring(fileext +1);
  162. //파일을 다운로드 하기 위해 저장할 창을 띄움
  163. var localfile = window.fileDialog("save","|",false,filenm,ext,"All Files(*.*)|*.*");
  164. // var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  165. if (localfile != "") {
  166. model.download(getActionURL("TRADB65003")+"&filepath="+filepath,localfile);
  167. var rtn = messageBox("파일을", "Q004");
  168. if( rtn == 6 ) {
  169. window.exec(localfile);
  170. }
  171. }
  172. }
  173. ]]>
  174. </script>
  175. </xhtml:head>
  176. <xhtml:body pagewidth="900px" pageheight="700px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  177. <caption id="caption1" class="tit_1" style="left:5px; top:15px; width:252px; height:13px; ">Medical Zone (약품정보)</caption>
  178. <shape id="rectangle1" appearance="roundrect" style="left:3px; top:35px; width:892px; height:83px; background-color:#fffbf2; border-color:#ffd799; "/>
  179. <caption id="caption11" class="search_name" visibility="visible" style="left:15px; top:70px; width:94px; height:17px; ">등록일자</caption>
  180. <button id="btn_sea" class="btn1_letter2" style="left:835px; top:10px; width:56px; height:22px; ">
  181. <caption>저장</caption>
  182. <script type="javascript" ev:event="DOMActivate">
  183. <![CDATA[
  184. SaveFlag = "Y" ;
  185. //alert ("시작 " + SaveFlag);
  186. fCheckSaveData() ;
  187. //alert ("체크 " + SaveFlag);
  188. if (SaveFlag == "Y") {
  189. fSaveData("i");
  190. fInitialize();
  191. model.refresh();
  192. }
  193. ]]>
  194. </script>
  195. </button>
  196. <line id="line7" class="line_1" style="x1:3px; y1:119px; x2:900px; y2:120px; "/>
  197. <datagrid id="datagrid1" nodeset="/root/send/viewinfo/viewlist" visibility="visible" caption="순번^구분^등록일자^제목^비고^파일명^파일 위치" colsep="^" colwidth="31, 49, 66, 360, 120, 235, 290" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:8px; top:125px; width:890px; height:545px; ">
  198. <col ref="dgseq" type="input" visibility="hidden" maxlength="3" style="text-align:center; "/>
  199. <col ref="instcd" type="output" style="text-align:left; "/>
  200. <col ref="dginsdate" type="input" style="text-align:center; "/>
  201. <col ref="dgtitle" type="input" style="left:166px; top:23px; width:360px; height:23px; text-align:left; "/>
  202. <col ref="dgbigo" type="output" visibility="visible"/>
  203. <col ref="filenm" style="left:734px; top:23px; width:300px; height:23px; "/>
  204. <col ref="filepath" visibility="hidden"/>
  205. <script type="javascript" ev:event="ondblclick">
  206. <![CDATA[
  207. var row = datagrid1.row;
  208. // alert (" 선택 Row " + row);
  209. var instcd = model.getValue("/root/send/viewinfo/viewlist["+row+"]/instcd")
  210. var dgseq = model.getValue("/root/send/viewinfo/viewlist["+row+"]/dgseq")
  211. // alert (" 선택 instcd " + instcd);
  212. // alert (" 선택 dgseq " + dgseq);
  213. model.setvalue("/root/tmp/viewseq/instcd", instcd );
  214. model.setvalue("/root/tmp/viewseq/seq", dgseq );
  215. submit("TRADB65002");
  216. ]]>
  217. </script>
  218. </datagrid>
  219. <button id="btn_save" class="btn4_letter2" style="left:705px; top:10px; width:56px; height:22px; ">
  220. <caption>조회</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. submit("TRADB65001");
  224. //model.setValue("/root/tmp/datalist/viewseq/seq", "" );
  225. model.refresh();
  226. ]]>
  227. </script>
  228. </button>
  229. <caption id="caption2" class="search_name" style="left:240px; top:45px; width:63px; height:17px; ">제목:</caption>
  230. <input id="inp_drugtitle" ref="/root/main/druginfo/codelist/dgtitle" class="input_search" visibility="visible" style="left:305px; top:45px; width:575px; height:19px; "/>
  231. <caption id="caption3" class="search_name" style="left:15px; top:42px; width:63px; height:17px; ">구분:</caption>
  232. <caption id="caption5" class="search_name" style="left:14px; top:94px; width:81px; height:17px; ">첨부파일:</caption>
  233. <select1 id="rad_instcd" ref="/root/main/druginfo/codelist/instcd" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:102px; top:42px; width:120px; height:20px; border-style:none; ">
  234. <choices>
  235. <item>
  236. <label>본원</label>
  237. <value>031</value>
  238. </item>
  239. <item>
  240. <label>칠곡</label>
  241. <value>032</value>
  242. </item>
  243. </choices>
  244. </select1>
  245. <input id="inp_savefile" ref="/root/main/druginfo/codelist/filenm" class="input_search" disabled="true" visibility="visible" style="left:100px; top:93px; width:510px; height:19px; "/>
  246. <button id="button1" class="btn2_letter4" visibility="visible" style="left:615px; top:93px; width:64px; height:19px; ">
  247. <caption>UpLoad</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. fupload();
  251. ]]>
  252. </script>
  253. </button>
  254. <input id="inp_indate" ref="/root/main/druginfo/codelist/dginsdate" class="input_essential" navindex="14" inputtype="date" style="left:100px; top:70px; width:130px; height:19px; "/>
  255. <caption id="caption4" class="search_name" style="left:240px; top:70px; width:63px; height:17px; ">비고:</caption>
  256. <input id="inp_bigo" ref="/root/main/druginfo/codelist/dgbigo" class="input_search" visibility="visible" style="left:305px; top:70px; width:575px; height:19px; "/>
  257. <button id="button2" class="btn4_letter2" style="left:640px; top:10px; width:56px; height:22px; ">
  258. <caption>신규</caption>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. fInitialize();
  262. ]]>
  263. </script>
  264. </button>
  265. <output id="inp_seq" ref="/root/tmp/viewseq/seq" visibility="hidden" appearance="output" style="left:470px; top:10px; width:20px; height:19px; "/>
  266. <output id="input1" ref="/root/main/druginfo/codelist/dgseq" visibility="hidden" appearance="output" style="left:766px; top:93px; width:45px; height:19px; "/>
  267. <output id="ipt_updpath" ref="/root/hidden/file" class="input_search" visibility="hidden" disabled="true" appearance="output" style="left:360px; top:12px; width:35px; height:19px; "/>
  268. <output id="ipt_filepath" ref="/root/main/druginfo/codelist/filepath" class="input_search" visibility="hidden" disabled="true" appearance="output" style="left:400px; top:10px; width:40px; height:19px; "/>
  269. <upload id="upload1" nodeset="/root/hidden/file" style="left:325px; top:15px; width:30px; height:20px; "/>
  270. <button id="button5" class="btn2_letter5" visibility="visible" style="left:682px; top:93px; width:75px; height:19px; ">
  271. <caption>DownLoad</caption>
  272. <script type="javascript" ev:event="DOMActivate">
  273. <![CDATA[
  274. fdown();
  275. ]]>
  276. </script>
  277. </button>
  278. <output id="inp_instcd" ref="/root/tmp/viewseq/instcd" visibility="hidden" appearance="output" style="left:495px; top:10px; width:25px; height:19px; "/>
  279. <output id="output1" ref="/root/tmp/datalist/maxseq/seq" visibility="hidden" appearance="output" style="left:440px; top:10px; width:25px; height:19px; "/>
  280. <button id="button3" class="btn4_letter2" style="left:770px; top:10px; width:56px; height:22px; ">
  281. <caption>삭제</caption>
  282. <script type="javascript" ev:event="DOMActivate">
  283. <![CDATA[
  284. fSaveData("d");
  285. fInitialize();
  286. model.refresh();
  287. ]]>
  288. </script>
  289. </button>
  290. </xhtml:body>
  291. </xhtml:html>