SMAVT00400_보관장소관리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMAVT00400.xrw
  4. * 설 명 : 조직은행 보관장소관리
  5. * 설 계 자 : 손승현
  6. * 작 성 자 : 손승현
  7. * 작 성 일 : 2010.08.23
  8. * 수정이력 : 2010.08.23 손승현 신규
  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>보관장소 관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <roomlist>
  20. <item>
  21. <roomno/>
  22. <a/>
  23. <b/>
  24. <c/>
  25. <d/>
  26. <e/>
  27. <f/>
  28. <g/>
  29. <h/>
  30. </item>
  31. </roomlist>
  32. <keprmprt>
  33. <item/>
  34. </keprmprt>
  35. </main>
  36. <send>
  37. <srchroom/>
  38. <srchgraftno/>
  39. <srchpid/>
  40. <srchhngnm/>
  41. <srchpartseq/>
  42. <srchpartcode/>
  43. <req>
  44. <room/>
  45. <graftno/>
  46. <pid/>
  47. <hngnm/>
  48. <partseq/>
  49. <partcode/>
  50. </req>
  51. <sgraftno/>
  52. <spartseq/>
  53. </send>
  54. <init>
  55. <comboptcdlst>
  56. <item>
  57. <partcode/>
  58. <partname/>
  59. </item>
  60. </comboptcdlst>
  61. <codedata>
  62. <popupmenu>
  63. <item>
  64. <name>조직 들어내기</name>
  65. <func>fsetTissueOut</func>
  66. </item>
  67. </popupmenu>
  68. </codedata>
  69. </init>
  70. <hidden>
  71. <item/>
  72. </hidden>
  73. </root>
  74. </instance>
  75. <script type="javascript" ev:event="xforms-ready">
  76. <![CDATA[
  77. fGetComboInit();
  78. btn_save.visible = false;
  79. // Param 설정
  80. if (checkOpener()) {
  81. model.setValue("/root/send/srchgraftno", opener.javascript.getParameter("SMAVT00400_GRAFTNO") );
  82. model.setValue("/root/send/srchpid", opener.javascript.getParameter("SMAVT00400_PID") );
  83. model.setValue("/root/send/srchhngnm", opener.javascript.getParameter("SMAVT00400_HNGNM") );
  84. model.setValue("/root/send/srchpartseq", opener.javascript.getParameter("SMAVT00400_PARTSEQ") );
  85. model.setValue("/root/send/srchpartcode", opener.javascript.getParameter("SMAVT00400_PARTCODE") );
  86. model.setValue("/root/send/srchroom", opener.javascript.getParameter("SMAVT00400_ROOM") );
  87. model.refresh();
  88. btn_save.visible = true;
  89. }
  90. // 보관내용 List
  91. fGetRoomList();
  92. ]]>
  93. </script>
  94. <script type="javascript">
  95. <![CDATA[
  96. /**
  97. * 콤보 초기화
  98. */
  99. function fGetComboInit() {
  100. // 부위콤보 List
  101. model.removeNodeset("/root/init/comboptcdlst/item");
  102. model.refresh();
  103. submit("TRAVB00002");
  104. }
  105. /**
  106. * 보관장소 리스트 조회
  107. */
  108. function fGetRoomList(){
  109. model.removeNodeset("/root/main/roomlist/item");
  110. model.refresh();
  111. var ret = submit("TRAVT00401");
  112. return ret;
  113. }
  114. /**
  115. * 부위별 보관소 저장
  116. */
  117. function fSetRoomSave(grd_tmp){
  118. var vCol = grd_tmp.col;
  119. var vRow = grd_tmp.row;
  120. var vRoom1 = grd_roomlist.valueMatrix(0, grd_roomlist.col) + grd_roomlist.valueMatrix(grd_roomlist.row,1);
  121. var vRoom2 = model.getValue("/root/send/srchroom");
  122. var vValue1 = model.getValue("/root/send/srchgraftno") + "-" + model.getValue("/root/send/srchpartseq") + "\n" +
  123. model.getValue("/root/send/srchpid") + "(" + model.getValue("/root/send/srchhngnm") + ")" + "\n" +
  124. cmb_partcode.label;
  125. var vValue2 = grd_tmp.valueMatrix(vRow, vCol);
  126. if (vCol == 1) {
  127. messageBox("보관장소가 잘못", "E005", "보관장소를 정확하게 선택하십시오.");
  128. return false;
  129. }
  130. if (vValue2 != "" && vValue1 != vValue2) {
  131. messageBox("이미 보관장소를 사용중", "I009");
  132. return
  133. }
  134. if ( vRoom2 != "" && vRoom1 != vRoom2 ) {
  135. if ( messageBox("기존에 저장되어 있는 보관장소가 있습니다. ","Q003") != 6 ) {
  136. return false;
  137. }
  138. }
  139. var ret = false;
  140. if ( messageBox("보관장소정보를","Q002")==6 ) {
  141. model.setValue("/root/send/srchroom", vRoom1);
  142. model.refresh();
  143. ret = submit("TXAVT00401");
  144. }
  145. return ret;
  146. }
  147. //2011.01.20 c y w 저장된 조직 빼기.
  148. function fsetTissueOut(){
  149. var text = grd_roomlist.valueMatrix(grd_roomlist.row, grd_roomlist.col);
  150. model.setValue("/root/send/sgraftno", text.substring(0,10));
  151. model.setValue("/root/send/spartseq", text.substring(11,12));
  152. if( submit("TRAVT00402") ){
  153. model.setValue("/root/send/req/room" , "");
  154. model.setValue("/root/send/req/pid" , model.getValue("/root/main/keprmprt/item/pid"));
  155. model.setValue("/root/send/req/graftno" , model.getValue("/root/main/keprmprt/item/graftno"));
  156. model.setValue("/root/send/req/hngnm" , model.getValue("/root/main/keprmprt/item/hngnm"));
  157. model.setValue("/root/send/req/partseq" , model.getValue("/root/main/keprmprt/item/partseq"));
  158. model.setValue("/root/send/req/partcode" , model.getValue("/root/main/keprmprt/item/partcode"));
  159. if ( messageBox("보관장소정보를","Q002")==6 ) {
  160. model.setValue("/root/send/srchroom", "");
  161. model.refresh();
  162. if( submit("TXAVT00402") ){
  163. fGetRoomList();
  164. model.removeNodeset("/root/main/keprmprt/item");
  165. }
  166. }
  167. }
  168. return;
  169. }
  170. ]]>
  171. </script>
  172. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  173. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  174. <script type="javascript" src="../../../ast/tissuebankbaseweb/js/tissuebankcombolist.js"/>
  175. <submission id="TRAVB00001"/>
  176. <submission id="TRAVB00002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/comboptcdlst"/>
  177. <submission id="TRAVT00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ptcdlst"/>
  178. <submission id="TXAVT00401" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/hidden"/>
  179. <submission id="TXAVT00402" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  180. <submission id="TRAVT00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/keprmprt"/>
  181. </model>
  182. </xhtml:head>
  183. <xhtml:body guideline="1,1195;" ref="tissuemcd" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  184. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  185. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  186. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  187. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  188. <button id="btn_sea" class="btn1_letter2" style="left:1125px; top:7px; width:56px; height:22px; ">
  189. <caption>조회</caption>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. fGetRoomList();
  193. ]]>
  194. </script>
  195. </button>
  196. <caption id="lbl_graftno" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">Graft No :</caption>
  197. <input id="ipt_graftno" ref="/root/send/srchgraftno" class="input_search" disabled="true" style="left:103px; top:8px; width:80px; height:19px; "/>
  198. <caption id="lbl_pid" class="search_name" style="left:205px; top:9px; width:90px; height:17px; ">등록번호 :</caption>
  199. <input id="ipt_pid" ref="/root/send/srchpid" class="input_search" disabled="true" style="left:290px; top:8px; width:100px; height:19px; "/>
  200. <input id="ipt_hngnm" ref="/root/send/srchhngnm" class="input_search" disabled="true" style="left:395px; top:8px; width:100px; height:19px; "/>
  201. <caption id="lbl_part" class="search_name" style="left:520px; top:9px; width:90px; height:17px; ">부 위 :</caption>
  202. <input id="ipt_partseq" ref="/root/send/srchpartseq" class="input_search" disabled="true" style="left:605px; top:8px; width:45px; height:19px; "/>
  203. <select1 id="cmb_partcode" ref="/root/send/srchpartcode" class="combo_search" disabled="true" appearance="minimal" style="left:655px; top:8px; width:295px; height:19px; ">
  204. <choices>
  205. <itemset nodeset="/root/init/comboptcdlst/item">
  206. <label ref="partname"/>
  207. <value ref="partcode"/>
  208. </itemset>
  209. </choices>
  210. </select1>
  211. <input id="ipt_room" ref="/root/send/srchroom" class="input_search" disabled="true" style="left:955px; top:8px; width:45px; height:19px; "/>
  212. </group>
  213. <caption id="caption1" class="tit_2" style="left:5px; top:62px; width:120px; height:13px; ">보관장소 관리</caption>
  214. <line id="line1" class="line_1" style="x1:3px; y1:80px; x2:1194px; y2:81px; "/>
  215. <datagrid id="grd_roomlist" nodeset="/root/main/roomlist/item" autoresize="true" caption="No.^A^B^C^D^E^F^G^H" colsep="^" colwidth="40, 138, 138, 138, 138, 138, 138, 138, 138" focuscolor="#00ff00" mergecellsfixedrows="never" rowheader="update" rowsep="|" selectionmode="free" style="left:0px; top:90px; width:1191px; height:650px; ">
  216. <col ref="roomno" type="output" style="text-align:center; "/>
  217. <col ref="a" style="text-align:left; "/>
  218. <col ref="b" style="text-align:left; "/>
  219. <col ref="c" style="text-align:left; "/>
  220. <col ref="d" style="text-align:left; "/>
  221. <col ref="e" style="text-align:left; "/>
  222. <col ref="f" style="text-align:left; "/>
  223. <col ref="g" style="text-align:left; "/>
  224. <col ref="h" style="text-align:left; "/>
  225. <script type="javascript" ev:event="ondblclick">
  226. <![CDATA[
  227. if (model.getValue("/root/send/srchgraftno") != "") {
  228. if ( fSetRoomSave(grd_roomlist) == true ) {
  229. opener.model.setValue("/root/main/partinfo/item/keeproom", model.getValue("/root/send/srchroom") );
  230. opener.model.refresh();
  231. window.close();
  232. }
  233. }
  234. ]]>
  235. </script>
  236. <script type="javascript" ev:event="onmousedown">
  237. <![CDATA[
  238. if (model.getValue("/root/send/srchgraftno") == "") {
  239. setPopupMenu("grd_roomlist", false, "/root/init/codedata/popupmenu/item", "name", "func");
  240. }
  241. ]]>
  242. </script>
  243. <script type="javascript" ev:event="DOMFocusOut">
  244. <![CDATA[
  245. initPopupMenu();
  246. ]]>
  247. </script>
  248. </datagrid>
  249. <button id="btn_excsave" class="btn2_letter4" style="left:1125px; top:57px; width:64px; height:19px; ">
  250. <caption>엑셀저장</caption>
  251. <script type="javascript" ev:event="DOMActivate">
  252. <![CDATA[
  253. // 2010.12.14 c y w 엑셀 저장 기능 추가
  254. var filename = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls");
  255. if (filename != "") {
  256. grd_roomlist.saveExcel(filename);
  257. }
  258. ]]>
  259. </script>
  260. </button>
  261. </group>
  262. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  263. <button id="btn_save" class="btn4_letter2" visibility="hidden" style="left:1138px; top:5px; width:56px; height:22px; ">
  264. <caption>저장</caption>
  265. <script type="javascript" ev:event="DOMActivate">
  266. <![CDATA[
  267. if (model.getValue("/root/send/srchgraftno") != "") {
  268. if ( fSetRoomSave(grd_roomlist) == true ) {
  269. opener.model.setValue("/root/main/partinfo/item/keeproom", model.getValue("/root/send/srchroom") );
  270. opener.model.refresh();
  271. window.close();
  272. }
  273. }
  274. ]]>
  275. </script>
  276. </button>
  277. <button id="btn_prt" class="btn6_letter2" style="left:4px; top:4px; width:56px; height:22px; ">
  278. <caption>출력</caption>
  279. <script type="javascript" ev:event="DOMActivate">
  280. <![CDATA[
  281. if( grd_roomlist.rows > 1 ){
  282. exeReportPreview("RPAVT00400", "XMLSTR" , "" , "" , "false" , "", "", "", "", "false");
  283. }
  284. ]]>
  285. </script>
  286. </button>
  287. </group>
  288. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  289. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:13px; ">조직은행 보관장소관리</caption>
  290. </group>
  291. </xhtml:body>
  292. </xhtml:html>