SMLQF10600_핵의학QC물질관리.xrw 15 KB

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