SMLLF10400_통합용기코드관리.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF10400_통합용기코드관리.xrw
  4. * 설 명 : 통합용기코드 조회 및 등록
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 -
  7. * 작 성 일 :
  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>통합용기코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <tubelist>
  20. <tubefromdd/>
  21. <tubetodd/>
  22. <tubecd/>
  23. <tubenm/>
  24. <tubescrnnm/>
  25. <tubeabbrnm/>
  26. <tubeprntnm/>
  27. <tubelblnm/>
  28. <tubevol/>
  29. <tubeunit/>
  30. </tubelist>
  31. <msg/>
  32. <orgimg>
  33. <orgimg/>
  34. <orgwidt/>
  35. <orght/>
  36. </orgimg>
  37. <imginfo>
  38. <fileinfo/>
  39. <fileinfoO/>
  40. </imginfo>
  41. <view>
  42. <imgrslt/>
  43. <imgwidt/>
  44. <imght/>
  45. <orgimg/>
  46. <orgwidt/>
  47. <orght/>
  48. </view>
  49. </main>
  50. <send>
  51. <refgbn/>
  52. <searchgbn/>
  53. <text/>
  54. <grdtube/>
  55. <codeflag/>
  56. <deptflag/>
  57. <tubecd/>
  58. <imgicon/>
  59. <imgorg/>
  60. <imgicon2/>
  61. <imgorg2/>
  62. </send>
  63. <init>
  64. </init>
  65. <hidden>
  66. <ref>
  67. <refgbn>1</refgbn>
  68. <searchgbn>1</searchgbn>
  69. <searchnm/>
  70. </ref>
  71. <updt/>
  72. </hidden>
  73. <temp/>
  74. </root>
  75. </instance>
  76. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  78. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  79. <!-- 조회 -->
  80. <submission id="TRLLF10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tubelist"/>
  81. <!-- 등록,수정 -->
  82. <submission id="TXLLF10401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp"/>
  83. <!-- 검색 -->
  84. <submission id="TRLLF10402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tubelist"/>
  85. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
  86. <script type="javascript" ev:event="xforms-ready">
  87. <![CDATA[
  88. // 초기정보 조회
  89. model.setValue("/root/send/codeflag", "0000|"); // 0000= 유저과플래그
  90. submit("TRLZZ00101");
  91. grd_tube.deleteRow(1);
  92. fSettodd();
  93. ]]>
  94. </script>
  95. </model>
  96. <script type="javascript">
  97. <![CDATA[
  98. // 조회구분에 따라 사용종료일자 숨기기
  99. function fSettodd(){
  100. var gbn = model.getValue("/root/hidden/ref/refgbn");
  101. if(gbn == "1"){
  102. // 사용가능자료
  103. grd_tube.colHidden(2) = true;
  104. }else{
  105. // 전체자료
  106. grd_tube.colHidden(2) = false;
  107. }
  108. }
  109. // 행추가
  110. function fInsRowAdd(pGridId) {
  111. pGridId.addRow();
  112. // 오늘날짜
  113. var dt = getCurrentDate();
  114. model.setValue("/root/main/tubelist["+grd_tube.row+"]/tubefromdd", dt);
  115. model.setValue("/root/main/tubelist["+grd_tube.row+"]/tubetodd", "99991231");
  116. model.setValue("/root/main/tubelist["+grd_tube.row+"]/tubeabbrnm", "-");
  117. model.setValue("/root/main/tubelist["+grd_tube.row+"]/tubeprntnm", "-");
  118. model.setValue("/root/main/tubelist["+grd_tube.row+"]/tubelblnm", "-");
  119. }
  120. // 초기화
  121. function fSetInit() {
  122. model.removeNodeset("/root/main/tubelist");
  123. model.refresh();
  124. }
  125. // 용기정보 조회
  126. function fGetTubeList(){
  127. model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
  128. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  129. submit("TRLLF10401"); // 용기 리스트 조회
  130. fSetTubeTodd();
  131. }
  132. // 용기정보 등록,수정l
  133. function fSetTubeInfo(){
  134. var grddata = grd_tube.getUpdateData();
  135. model.setValue("/root/send/grdtube", grddata);
  136. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  137. if(submit("TXLLF10401")==true){ // 용기 정보 수정
  138. fGetTubeList();
  139. }
  140. }
  141. // 검색
  142. function fGetTubeSrch(){
  143. model.setValue("/root/send/searchgbn", model.getValue("/root/hidden/ref/searchgbn"));
  144. model.setValue("/root/send/text", model.getValue("/root/hidden/ref/searchnm").toUpperCase());
  145. model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
  146. submit("TRLLF10402");
  147. fSetTubeTodd();
  148. //model.refresh();
  149. }
  150. // 종료된 용기 정보 다른색으로 보여주기
  151. function fSetTubeTodd(){
  152. var tDay = getCurrentDate();
  153. setRowStyle("grd_tube", "0", tDay, "tubetodd", "small");
  154. }
  155. // Null 체크
  156. function fNullCheck(){
  157. var msg = "";
  158. var nullyn = "true";
  159. for(i=1; i<grd_tube.rows; i++ ){
  160. //alert(grd_tube.rowStatus(i));
  161. if((grd_tube.rowStatus(i) == 3) || (grd_tube.rowStatus(i) == 1) ||(grd_tube.rowStatus(i) == 2)){
  162. if(model.getValue("/root/main/tubelist["+i+"]/tubecd")==""){
  163. msg = "[용기코드] 는 " ;
  164. messageBox(msg, "I003", "");
  165. return "false";
  166. }
  167. if(model.getValue("/root/main/tubelist["+i+"]/tubefromdd")==""){
  168. msg = "[용기시용시작일] 은 " ;
  169. messageBox(msg, "I003", "");
  170. return "false";
  171. }
  172. if(model.getValue("/root/main/tubelist["+i+"]/tubetodd")==""){
  173. msg = "[용기시용종료일] 은 " ;
  174. messageBox(msg, "I003", "");
  175. return "false";
  176. }
  177. if(model.getValue("/root/main/tubelist["+i+"]/tubenm")==""){
  178. msg = "[용기명] 은 " ;
  179. messageBox(msg, "I003", "");
  180. return "false";
  181. }
  182. if(model.getValue("/root/main/tubelist["+i+"]/tubescrnnm")==""){
  183. msg = "[용기화면명] 은 " ;
  184. messageBox(msg, "I003", "");
  185. return "false";
  186. }
  187. return nullyn;
  188. }
  189. }
  190. }
  191. ]]>
  192. </script>
  193. </xhtml:head>
  194. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  195. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  196. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1190px; y2:70px; "/>
  197. <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:131px; height:13px; ">용기코드상세내역</caption>
  198. <datagrid id="grd_tube" nodeset="/root/main/tubelist" caption="사용시작일자^사용종료일자^용기코드^용기명^용기명(화면)^용기명(약어)^용기명(출력)^용기명(라벨)^용량^단위" colwidth="90, 90, 60, 120, 80, 80, 80, 80, 50, 50, 60, 103, 0, 0,0" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:0px; top:75px; width:1190px; height:646px; ">
  199. <col ref="tubefromdd" type="inputdate" format="yyyy-mm-dd"/>
  200. <col ref="tubetodd" type="inputdate" format="yyyy-mm-dd"/>
  201. <col ref="tubecd" type="input"/>
  202. <col ref="tubenm" type="input"/>
  203. <col ref="tubescrnnm" type="input"/>
  204. <col ref="tubeabbrnm" type="input"/>
  205. <col ref="tubeprntnm" type="input"/>
  206. <col ref="tubelblnm" type="input"/>
  207. <col ref="tubevol" type="input" style="text-align:right; "/>
  208. <col ref="tubeunit" type="input" style="text-align:left; "/>
  209. <script type="javascript" ev:event="onaftersort">
  210. <![CDATA[
  211. grd_tube.gridToInstance();
  212. ]]>
  213. </script>
  214. </datagrid>
  215. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  216. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1194px; height:35px; "/>
  217. <line id="line11" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  218. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  219. <line id="line14" class="line_4" style="x1:273px; y1:6px; x2:273px; y2:28px; "/>
  220. <caption id="caption4" class="search_name" style="left:737px; top:9px; width:90px; height:17px; ">검색구분 :</caption>
  221. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  222. <caption>검색</caption>
  223. <script type="javascript" ev:event="DOMActivate">
  224. <![CDATA[
  225. // 검색버튼
  226. fGetTubeSrch();
  227. ]]>
  228. </script>
  229. </button>
  230. <button id="btn_search" class="btn1_letter2" style="left:288px; top:7px; width:56px; height:22px; ">
  231. <caption>조회</caption>
  232. <script type="javascript" ev:event="DOMActivate">
  233. <![CDATA[
  234. // 조회버튼
  235. fGetTubeList();
  236. ]]>
  237. </script>
  238. </button>
  239. <input id="ipt_text" ref="/root/hidden/ref/searchnm" class="input_search" style="left:983px; top:8px; width:110px; height:19px; "/>
  240. <select1 id="cmb_searchgbn" ref="/root/hidden/ref/searchgbn" class="combo_search" appearance="minimal" style="left:830px; top:8px; width:150px; height:19px; ">
  241. <choices>
  242. <item>
  243. <label>용기코드</label>
  244. <value>1</value>
  245. </item>
  246. <item>
  247. <label>용기명</label>
  248. <value>2</value>
  249. </item>
  250. </choices>
  251. </select1>
  252. <select1 id="cmb_refgbn" ref="/root/hidden/ref/refgbn" class="combo_search" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
  253. <choices>
  254. <item>
  255. <label>사용코드</label>
  256. <value>1</value>
  257. </item>
  258. <item>
  259. <label>전체코드</label>
  260. <value>2</value>
  261. </item>
  262. </choices>
  263. <script type="javascript" ev:event="xforms-value-changed">
  264. <![CDATA[
  265. // 조회구분 선택
  266. fSettodd();
  267. ]]>
  268. </script>
  269. </select1>
  270. </group>
  271. <button id="btn_addrow" class="btn2_letter3" style="left:1137px; top:49px; width:53px; height:19px; ">
  272. <caption>행추가</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. fInsRowAdd(grd_tube);
  276. ]]>
  277. </script>
  278. </button>
  279. </group>
  280. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  281. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  282. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  283. <caption>저장</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. //alert(fNullCheck());
  287. if(fNullCheck()=="true"){
  288. fSetTubeInfo();
  289. }
  290. ]]>
  291. </script>
  292. </button>
  293. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  294. <caption>초기화</caption>
  295. <script type="javascript" ev:event="DOMActivate">
  296. <![CDATA[
  297. fSetInit();
  298. ]]>
  299. </script>
  300. </button>
  301. </group>
  302. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  303. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:155px; height:13px; ">통합용기코드관리</caption>
  304. </group>
  305. </xhtml:body>
  306. </xhtml:html>