SMLQF01200_미생물QC물질관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLQF00600_QC물질관리.xrw
  4. * 설 명 : QC물질관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 윤재한
  7. * 작 성 일 : 2007.11.01
  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/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <getmatlist>
  20. <matcd/>
  21. <levlcd/>
  22. <matrfromdd/>
  23. <matrtodd/>
  24. <matrnm/>
  25. <windt/>
  26. <lotno/>
  27. <oclotno/>
  28. <prodcmpy/>
  29. <proddt/>
  30. <levlnm/>
  31. <matrifcd/>
  32. <validd/>
  33. </getmatlist>
  34. </main>
  35. <send>
  36. <matdata/>
  37. <codeflag/>
  38. <userdeptcd/>
  39. <refflag/>
  40. <searchflag/>
  41. <searchtext/>
  42. </send>
  43. <init>
  44. </init>
  45. <hidden>
  46. <refflag/>
  47. <searchflag/>
  48. <searchtext/>
  49. <temp/>
  50. </hidden>
  51. </root>
  52. </instance>
  53. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  55. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. fSetInit();
  59. ]]>
  60. </script>
  61. <submission id="TXLQF00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  62. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0000"/>
  63. <submission id="TRLQF00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getmatlist"/>
  64. <submission id="TXLQF00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
  65. </model>
  66. <script type="javascript">
  67. <![CDATA[
  68. //초기화
  69. function fSetInit() {
  70. model.setValue("/root/send/codeflag", "0000|");
  71. submit("TRLZZ00101", false);
  72. model.makeValue("/root/send/basecdid", "M");
  73. model.setValue("/root/send/codeflag", "0501|");
  74. submit("TRLZZ00101"); //사용자 부서별로 레벨코드 조회하기 위해 0000과 0501따로 조회
  75. model.setValue("/root/hidden/refflag", "1");
  76. model.setValue("/root/hidden/searchflag", "1");
  77. model.setValue("/root/hidden/searchtext", "");
  78. grd_matlist.colHidden(4) = true;
  79. model.removeNodeset("/root/main/getmatlist");
  80. fGetMatList();
  81. }
  82. //조회
  83. function fGetMatList() {
  84. model.setValue("/root/send/refflag", model.getValue("/root/hidden/refflag"));
  85. model.setValue("/root/send/searchflag", model.getValue("/root/hidden/searchflag"));
  86. model.setValue("/root/send/searchtext", model.getValue("/root/hidden/searchtext").toUpperCase());
  87. model.setValue("/root/send/userdeptcd", "M");
  88. submit("TRLQF00601");
  89. grd_matlist.isReadOnly(1, 1, grd_matlist.rows-1, 4) = true; //물질코드~ 사용종료일자까지 비활성화
  90. }
  91. //행추가
  92. function fAddRow(){
  93. grd_matlist.addrow();
  94. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrfromdd", getCurrentDate());
  95. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrtodd","99991231");
  96. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/windt", getCurrentDate());
  97. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/lotno","-");
  98. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/validd","99991231");
  99. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/prodcmpy","-");
  100. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/proddt","19000101");
  101. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrifcd","-");
  102. grd_matlist.bottomRow = grd_matlist.rows;
  103. }
  104. //물질변경
  105. function fAddRow2(){
  106. copyNodeListType("/root/hidden/temp", "/root/main/getmatlist["+grd_matlist.row+"]", "replace"); //선택항목 임시노드에 복사
  107. fEndMat(); //선택된항목 물질 종료
  108. grd_matlist.addrow();
  109. //선택했던 물질 정보 복사
  110. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrcd" , model.getValue("/root/hidden/temp/getmatlist/matrcd"));
  111. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/levlcd" , model.getValue("/root/hidden/temp/getmatlist/levlcd"));
  112. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrnm" , model.getValue("/root/hidden/temp/getmatlist/matrnm"));
  113. //초기 정보 설정
  114. var fromdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(1)
  115. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrfromdd", fromdate.getDateFormat("YYYYMMDD")); //새로운 물질 시작일자를 다음날로 변경
  116. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrtodd","99991231");
  117. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/windt", getCurrentDate());
  118. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/lotno","-");
  119. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/validd","99991231");
  120. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/prodcmpy","-");
  121. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/proddt","19000101");
  122. model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrifcd","-");
  123. grd_matlist.bottomRow = grd_matlist.rows;
  124. }
  125. //종료
  126. function fEndMat() {
  127. var todd = model.getValue("/root/main/getmatlist["+grd_matlist.row+"]/matrtodd");
  128. if(todd < getCurrentDate()){
  129. alert("이미 종료된 물질입니다.");
  130. return;
  131. }
  132. grd_matlist.rowStatus(grd_matlist.row) = 4;
  133. model.setValue("/root/send/matdata", getGridUpdateData(grd_matlist));
  134. model.setValue("/root/send/userdeptcd", model.getValue("/root/init/LB0000/nm"));
  135. submit("TXLQF00602", false);
  136. fGetMatList();
  137. }
  138. //엔터키
  139. function fKeyEvent(){
  140. if(event.keyCode == "13"){
  141. //물질 리스트 조회
  142. if(event.target =="ipt_searchtext"){
  143. model.setValue("/root/hidden/searchtext", ipt_searchtext.currentText);
  144. fGetMatList();
  145. }
  146. }
  147. }
  148. //저장
  149. function fInsMat() {
  150. var row = getNodesetCount("/root/main/getmatlist");
  151. for(i = 1; i <= row; i++) {
  152. if(grd_matlist.rowStatus(i) == 3 || grd_matlist.rowStatus(i) == 1) {
  153. if(model.getValue("/root/main/getmatlist["+ i +"]/matrcd") == "") {
  154. messageBox("QC물질 코드는", "I003");
  155. return;
  156. }else if(model.getValue("/root/main/getmatlist["+ i +"]/levlcd") == "") {
  157. messageBox("레벨코드는", "I003");
  158. return;
  159. }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrfromdd") == "") {
  160. messageBox("사용시작일자는", "I003");
  161. return;
  162. }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrnm") == "") {
  163. messageBox("QC물질명은", "I003");
  164. return;
  165. }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrtodd") == "") {
  166. if(model.getValue("/root/hidden/refflag") =="2") {
  167. messageBox("사용종료일자는", "I003");
  168. return;
  169. } else {
  170. model.setValue("/root/main/getmatlist["+ i +"]/matrtodd", "99991231");
  171. }
  172. }
  173. if(model.getValue("/root/main/getmatlist["+ i +"]/windt") == "") {
  174. model.setValue("/root/main/getmatlist["+ i +"]/windt", getCurrentDate());
  175. }
  176. if(model.getValue("/root/main/getmatlist["+ i +"]/lotno") == "") {
  177. model.setValue("/root/main/getmatlist["+ i +"]/lotno", "-");
  178. }
  179. if(model.getValue("/root/main/getmatlist["+ i +"]/oclotno") == "") {
  180. model.setValue("/root/main/getmatlist["+ i +"]/oclotno", "-");
  181. }
  182. if(model.getValue("/root/main/getmatlist["+ i +"]/prodcmpy") == "") {
  183. model.setValue("/root/main/getmatlist["+ i +"]/prodcmpy", "-");
  184. }
  185. if(model.getValue("/root/main/getmatlist["+ i +"]/proddt") == "") {
  186. model.setValue("/root/main/getmatlist["+ i +"]/proddt", "19000101");
  187. }
  188. if(model.getValue("/root/main/getmatlist["+ i +"]/matrifcd") == "") {
  189. model.setValue("/root/main/getmatlist["+ i +"]/matrifcd", "-");
  190. }
  191. if(model.getValue("/root/main/getmatlist["+ i +"]/levlnm") == "") {
  192. var cd = model.getValue("/root/main/getmatlist["+ i +"]/levlcd");
  193. model.setValue("/root/main/getmatlist["+ i +"]/levlnm", model.getValue("/root/init/LB0501[cd = '"+ cd +"']/etc01"));
  194. }
  195. }
  196. }
  197. model.setValue("/root/send/matdata", getGridUpdateData(grd_matlist));
  198. model.setValue("/root/send/userdeptcd", "M");
  199. submit("TXLQF00601");
  200. fGetMatList();
  201. }
  202. ]]>
  203. </script>
  204. </xhtml:head>
  205. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  206. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  207. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  208. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">QC물질 목록</caption>
  209. <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  210. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  211. <caption id="caption5" class="search_name" style="left:15px; top:9px; width:86px; height:17px; ">조회구분 :</caption>
  212. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:57px; height:22px; ">
  213. <caption>조회</caption>
  214. <script type="javascript" ev:event="DOMActivate">
  215. <![CDATA[
  216. fGetMatList();
  217. ]]>
  218. </script>
  219. </button>
  220. <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
  221. <select1 id="cmb_refflag" ref="/root/hidden/refflag" class="combo_s_essential" appearance="minimal" style="left:106px; top:8px; width:120px; height:19px; ">
  222. <choices>
  223. <item>
  224. <label>사용자료</label>
  225. <value>1</value>
  226. </item>
  227. <item>
  228. <label>전체자료</label>
  229. <value>2</value>
  230. </item>
  231. </choices>
  232. <script type="javascript" ev:event="xforms-value-changed">
  233. <![CDATA[
  234. if(model.getValue("/root/hidden/refflag") == "2") {
  235. grd_matlist.colHidden(4) = false;
  236. } else {
  237. grd_matlist.colHidden(4) = true;
  238. }
  239. fGetMatList();
  240. model.refresh();
  241. ]]>
  242. </script>
  243. </select1>
  244. <input id="ipt_searchtext" ref="/root/hidden/searchtext" class="input_s_button" style="left:973px; top:9px; width:120px; height:19px; ">
  245. <script type="javascript" ev:event="onkeypress">
  246. <![CDATA[
  247. fKeyEvent();
  248. ]]>
  249. </script>
  250. </input>
  251. <caption id="caption7" class="search_name" style="left:760px; top:10px; width:86px; height:17px; ">검색구분 :</caption>
  252. <select1 id="cmb_searchflag" ref="/root/hidden/searchflag" class="combo_search" appearance="minimal" style="left:850px; top:9px; width:120px; 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. </select1>
  264. </group>
  265. <datagrid id="grd_matlist" nodeset="/root/main/getmatlist" caption="QC물질코드^레벨코드^ 사용시작일자^사용종료일자^QC물질명^입고일자^Lot번호^OnCall Lot번호^Expire Date^제조회사^제조일자^라벨명^IF연동코드" colsep="^" colwidth="150, 95, 90, 90, 180, 90, 100, 100, 90, 100, 100, 0, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:1194px; height:644px; ">
  266. <col ref="matrcd" type="input" maxlength="10"/>
  267. <col ref="levlcd" type="combo">
  268. <choices>
  269. <itemset nodeset="/root/init/LB0501">
  270. <label ref="nm"/>
  271. <value ref="cd"/>
  272. </itemset>
  273. </choices>
  274. </col>
  275. <col ref="matrfromdd" type="inputdate" format="yyyy-mm-dd"/>
  276. <col ref="matrtodd" type="outputdate" format="yyyy-mm-dd"/>
  277. <col ref="matrnm" type="input"/>
  278. <col ref="windt" type="inputdate" format="yyyy-mm-dd"/>
  279. <col ref="lotno" type="input"/>
  280. <col ref="oclotno" type="input"/>
  281. <col ref="validd" type="inputdate" format="yyyy-mm-dd"/>
  282. <col ref="prodcmpy" type="input"/>
  283. <col ref="proddt" type="inputdate" format="yyyy-mm-dd"/>
  284. <col ref="levlnm" type="input"/>
  285. <col ref="matrifcd" type="input"/>
  286. </datagrid>
  287. <button id="btn_addrow" class="btn2_letter3" style="left:1141px; top:49px; width:53px; height:19px; ">
  288. <caption>행추가</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. fAddRow();
  292. ]]>
  293. </script>
  294. </button>
  295. <button id="btn_end" class="btn2_letter2" style="left:1029px; top:49px; width:42px; height:19px; ">
  296. <caption>종료</caption>
  297. <script type="javascript" ev:event="DOMActivate">
  298. <![CDATA[
  299. fEndMat();
  300. model.refresh();
  301. ]]>
  302. </script>
  303. </button>
  304. <button id="button1" class="btn2_letter4" style="left:1074px; top:49px; width:64px; height:19px; ">
  305. <caption>물질변경</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. fAddRow2();
  309. ]]>
  310. </script>
  311. </button>
  312. </group>
  313. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  314. <button id="btn_init" class="btn4_letter3" style="left:1127px; top:5px; width:68px; height:22px; ">
  315. <caption>초기화</caption>
  316. <script type="javascript" ev:event="DOMActivate">
  317. <![CDATA[
  318. window.reload();
  319. ]]>
  320. </script>
  321. </button>
  322. <line id="line2" class="line_2" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  323. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:5px; width:56px; height:22px; ">
  324. <caption>저장</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. fInsMat();
  328. ]]>
  329. </script>
  330. </button>
  331. </group>
  332. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  333. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">QC물질관리</caption>
  334. </group>
  335. </xhtml:body>
  336. </xhtml:html>