SMADB65000_MedicalZone$.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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. </viewlist>
  32. </viewinfo>
  33. <save>
  34. <reqdesc/>
  35. <file/>
  36. </save>
  37. </send>
  38. <tmp>
  39. <datalist>
  40. <maxseq>
  41. <seq/>
  42. </maxseq>
  43. </datalist>
  44. </tmp>
  45. </root>
  46. </instance>
  47. <script type="javascript" ev:event="xforms-ready">
  48. <![CDATA[
  49. // model.removeNodeset("/root/main/codeinfo/codelist");
  50. // btn_grdadd.disabled = true;
  51. // btn_grddel.disabled = true;
  52. // btn_save.disabled = true;
  53. // if (model.getValue("/root/popdata/cdgrupid") != ""){
  54. // model.setValue("/root/send/reqdata/cdgrupid", model.getValue("/root/popdata/cdgrupid"));
  55. // btn_grdadd.disabled = false;
  56. // btn_grddel.disabled = false;
  57. // btn_save.disabled = false;
  58. // readfunc();
  59. // }
  60. model.refresh();
  61. ]]>
  62. </script>
  63. <script type="javascript" ev:event="xforms-model-destruct">
  64. <![CDATA[
  65. window.close();;
  66. ]]>
  67. </script>
  68. <submission id="TXADB04011" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata" resultref="/root/hidden"/>
  69. <submission id="TRADB65001" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/send/viewinfo/viewlist"/>
  70. <submission id="TRADB65200" mediatype="multipart/form-data" method="form-data-post" ref="/root/main/druginfo" resultref="/root/send/viewinfo/viewlist"/>
  71. <submission id="TRADB65000" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/tmp/datalist"/>
  72. </model>
  73. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. <script type="javascript" src="../../../ast/pharmacyweb/js/SMADB65000.js"/>
  78. <script type="javascript">
  79. <![CDATA[
  80. function fInitialize() {
  81. //모든 데이타을 claear 셋팅하는 부분
  82. model.setValue(rad_instcd.attribute("ref"), "" );
  83. model.setValue(inp_drugtitle.attribute("ref"), "" );
  84. model.setValue(inp_indate.attribute("ref"), "" );
  85. model.setValue(inp_bigo.attribute("ref"), "" );
  86. model.setValue(inp_savefile.attribute("ref"), "" );
  87. SaveFlag = "Y" ;
  88. submit("TRADB65000");
  89. var work_seq_tmp = model.getValue("/root/tmp/datalist/maxseq/seq");
  90. // alert(work_seq_tmp)
  91. model.setValue("/root/main/druginfo/codelist/dgseq",work_seq_tmp);
  92. model.refresh();
  93. }
  94. function fCheckSaveData() {
  95. /////구분
  96. var inpseq = model.getValue( "/root/tmp/datalist/maxseq/seq");
  97. if ( inpseq == "" ) {
  98. messageBox("신규버튼을 클릭하고 등록하세요!! ","");
  99. /////////저장 데이타 점검 Flag
  100. SaveFlag = 'N' ;
  101. }
  102. var instcd = model.getValue( "/root/main/druginfo/codelist/instcd");
  103. if ( instcd == "" ) {
  104. messageBox("구분를 선택하세요!! ","");
  105. /////////저장 데이타 점검 Flag
  106. SaveFlag = 'N' ;
  107. }
  108. var drugtitle = model.getValue( "/root/main/druginfo/codelist/dgtitle");
  109. if ( drugtitle == "" ) {
  110. messageBox("제목을를 입력하세요!! ","");
  111. /////////저장 데이타 점검 Flag
  112. SaveFlag = 'N' ;
  113. }
  114. var indate = model.getValue( "/root/main/druginfo/codelist/dginsdate" );
  115. if ( indate == "" ) {
  116. messageBox("등록일자를 입력하세요!! ","");
  117. /////////저장 데이타 점검 Flag
  118. SaveFlag = 'N' ;
  119. }
  120. var savefile = model.getValue( "/root/main/druginfo/codelist/filenm");
  121. if ( savefile == "" ) {
  122. messageBox("첨부파일을 등록하세요!! ","");
  123. /////////저장 데이타 점검 Flag
  124. SaveFlag = 'N' ;
  125. }
  126. }
  127. ////////저장루틴
  128. function fSaveData(savemode) {
  129. //alert(savemode);
  130. //----신규 Insert ,update하기
  131. if (savemode == "i"){
  132. submit("TRADB65200"); // 데이타 저장 서브밋
  133. submit("TRADB65001"); // 저장 데이타 조회 서브밋
  134. //----삭제 하기
  135. }else if(savemode == "d"){
  136. submit("TXRPS00300");
  137. submit("TXRPS00400");
  138. }
  139. }
  140. function fupload(){
  141. var files = window.fileDialog("open", ",", false);
  142. var replacepath = "";
  143. if ( files.length <= 0 ) return;
  144. model.makeValue(ipt_updpath.attribute("ref") , files); //전체파일경로와이름을 셋팅
  145. var filename = files.substring(files.lastIndexOf('\\')+1 , files.length ); //파일이름만 나오게 문자정리
  146. model.setValue(inp_savefile.attribute("ref") , filename);
  147. // submit("TXRWC03002");
  148. if(model.getValue("/root/main/filepath[1]/filepath") != ""){
  149. model.setValue("/root/main/manualdetl/manualdetllist/filepath"+flag,model.getValue("/root/main/filepath[1]/filepath"));
  150. }
  151. ipt_filepath.dispatch("xforms-value-changed");
  152. model.refresh();
  153. }
  154. function fdown(flag){
  155. var filepath = model.getValue("/root/main/manualdetl/manualdetllist/filepath"+flag);
  156. var filenm = model.getValue("/root/main/manualdetl/manualdetllist/filenm"+flag);
  157. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  158. if (localfile != "") {
  159. model.download(getActionURL("TRRWC03003")+"&filepath="+filepath,localfile);
  160. var rtn = messageBox("파일을", "Q004");
  161. if( rtn == 6 ) {
  162. window.exec(localfile);
  163. }
  164. }
  165. }
  166. ]]>
  167. </script>
  168. </xhtml:head>
  169. <xhtml:body pagewidth="900px" pageheight="700px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  170. <caption id="caption1" class="tit_1" style="left:5px; top:15px; width:252px; height:13px; ">Medical Zone (약품정보)</caption>
  171. <shape id="rectangle1" appearance="roundrect" style="left:3px; top:35px; width:817px; height:83px; background-color:#fffbf2; border-color:#ffd799; "/>
  172. <caption id="caption11" class="search_name" visibility="visible" style="left:15px; top:70px; width:94px; height:17px; ">등록일자</caption>
  173. <button id="btn_sea" class="btn1_letter2" style="left:825px; top:90px; width:56px; height:22px; ">
  174. <caption>저장</caption>
  175. <script type="javascript" ev:event="DOMActivate">
  176. <![CDATA[
  177. SaveFlag = "Y" ;
  178. //alert ("시작 " + SaveFlag);
  179. fCheckSaveData() ;
  180. //alert ("체크 " + SaveFlag);
  181. if (SaveFlag == "Y") {
  182. fSaveData("i");
  183. fInitialize();
  184. model.refresh();
  185. }
  186. ]]>
  187. </script>
  188. </button>
  189. <line id="line7" class="line_1" style="x1:3px; y1:119px; x2:900px; y2:120px; "/>
  190. <datagrid id="datagrid1" nodeset="/root/send/viewinfo/viewlist" visibility="visible" caption="순번^구분^등록일자^제목^비고^파일명^파일 위치" colsep="^" colwidth="31, 49, 66, 360, 208, 167, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:5px; top:125px; width:895px; height:570px; ">
  191. <col ref="dgseq" type="input" maxlength="3" style="text-align:center; "/>
  192. <col ref="instcd" type="input" style="text-align:left; "/>
  193. <col ref="dginsdate" type="input" style="text-align:center; "/>
  194. <col ref="dgtitle" type="input" style="text-align:left; "/>
  195. <col ref="dgbigo" type="output" visibility="visible"/>
  196. <col ref="filenm" style="left:734px; top:23px; width:167px; height:23px; "/>
  197. <col/>
  198. <script type="javascript" ev:event="xforms-value-changed">
  199. <![CDATA[
  200. /*
  201. var scol = datagrid1.col;
  202. datagrid1.col = scol;
  203. datagrid1.dispatch("onentercell");
  204. datagrid1.editCell();
  205. */
  206. ]]>
  207. </script>
  208. </datagrid>
  209. <button id="btn_save" class="btn4_letter2" style="left:825px; top:35px; width:56px; height:22px; ">
  210. <caption>조회</caption>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. submit("TRADB65001");
  214. model.setValue(inp_seq.attribute("ref"), "" );
  215. model.refresh();
  216. ]]>
  217. </script>
  218. </button>
  219. <caption id="caption2" class="search_name" style="left:240px; top:45px; width:63px; height:17px; ">제목:</caption>
  220. <input id="inp_drugtitle" ref="/root/main/druginfo/codelist/dgtitle" class="input_search" visibility="visible" style="left:305px; top:45px; width:505px; height:19px; "/>
  221. <caption id="caption3" class="search_name" style="left:15px; top:42px; width:63px; height:17px; ">구분:</caption>
  222. <caption id="caption5" class="search_name" style="left:14px; top:94px; width:81px; height:17px; ">첨부파일:</caption>
  223. <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; ">
  224. <choices>
  225. <item>
  226. <label>본원</label>
  227. <value>031</value>
  228. </item>
  229. <item>
  230. <label>칠곡</label>
  231. <value>032</value>
  232. </item>
  233. </choices>
  234. </select1>
  235. <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; "/>
  236. <button id="button1" class="btn2_letter4" visibility="visible" style="left:615px; top:93px; width:64px; height:19px; ">
  237. <caption>첨부파일</caption>
  238. <script type="javascript" ev:event="DOMActivate">
  239. <![CDATA[
  240. fupload();
  241. ]]>
  242. </script>
  243. </button>
  244. <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; "/>
  245. <caption id="caption4" class="search_name" style="left:240px; top:70px; width:63px; height:17px; ">비고:</caption>
  246. <input id="inp_bigo" ref="/root/main/druginfo/codelist/dgbigo" class="input_search" visibility="visible" style="left:305px; top:70px; width:505px; height:19px; "/>
  247. <upload id="upload1" nodeset="/root/send/save/file" filecount="5" filesize="10485760" validate="true" style="left:87px; top:349px; width:15px; height:15px; "/>
  248. <button id="button2" class="btn4_letter2" style="left:826px; top:63px; width:56px; height:22px; ">
  249. <caption>신규</caption>
  250. <script type="javascript" ev:event="DOMActivate">
  251. <![CDATA[
  252. fInitialize();
  253. ]]>
  254. </script>
  255. </button>
  256. <input id="inp_seq" ref="/root/tmp/datalist/maxseq/seq" style="left:765px; top:15px; width:45px; height:19px; "/>
  257. <input id="input1" ref="/root/main/druginfo/codelist/dgseq" style="left:761px; top:93px; width:45px; height:19px; "/>
  258. <input id="ipt_updpath" ref="/root/main/druginfo/codelist/filepath" class="input_search" disabled="true" visibility="hidden" style="left:680px; top:95px; width:35px; height:19px; "/>
  259. <input id="ipt_filepath" ref="/root/main/druginfo/codelist/filepath" class="input_search" disabled="true" visibility="hidden" style="left:720px; top:95px; width:30px; height:19px; "/>
  260. </xhtml:body>
  261. </xhtml:html>