123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLQF00900_QC Lot 관리.xrw
- * 설 명 : QC물질관리
- * 설 계 자 :
- * 작 성 자 :
- * 작 성 일 : 2008.12.12
- * 수정이력 :
- * 기 타 :
- -->
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>Lot 관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <lotlist>
- <matrcd/>
- <matrkindcd/>
- <matrnm/>
- <matrfromdd/>
- <matrtodd/>
- <validd/>
- <lotno/>
- <eqmtcd/>
- <userdeptcd/>
- <todd/>
- </lotlist>
- <detllotlist>
- <chk/>
- <testcd/>
- <testnm/>
- <reaglot/>
- <calilot/>
- <contlot/>
- </detllotlist>
- </main>
- <send>
- <lotdata/>
- <codeflag/>
- <userdeptcd/>
- <refflag/>
- <execdept/>
- <eqmtcd/>
- <matrkindcd/>
- <basecdid/>
- <matrcd/>
- <matrtodd/>
- <testlist/>
- <lotno/>
- <matrfromdd/>
- </send>
- <init>
- </init>
- <hidden>
- <refflag>1</refflag>
- <execdept>00</execdept>
- <eqmtcd>00</eqmtcd>
- <matrkindcd>00</matrkindcd>
- </hidden>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0000"/>
- <submission id="TRLQF00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/lotlist"/>
- <submission id="TRLQF00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/detllotlist"/>
- <submission id="TXLQF00901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- <submission id="TXLQF00902" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- </model>
- <script type="javascript">
- <![CDATA[
- //초기화
- function fSetInit() {
-
- model.removeNodeset("/root/main/lotlist");
- model.removeNodeset("/root/main/detllotlist");
- model.setValue("/root/send/codeflag", "0000|0111|0701|"); // 0111:시행부서계 0701: 장비코드
- submit("TRLZZ00101");
-
- grd_detllotlist.fixedcellcheckbox(0, 1) = true;
- grd_detllotlist.fixedcellischeck(0, 1) = false;
- }
-
- //장비코드설정
- function fSetEqmtCd(){
- model.removeNodeset("/root/main/lotlist");
- grd_lotlist.rebuild();
-
- model.removeNodeset("/root/init/LB0701");
-
- var execdept = model.getValue("/root/hidden/execdept");
- model.setValue("/root/send/basecdid", execdept); //검사실구분 코드(장비코드앞자리)
- model.setValue("/root/send/codeflag","0701|");
- model.setValue("/root/send/eqmtcd", '00');
-
- submit("TRLZZ00101");
- }
-
- //조회
- function fGetLotList() {
- if(cbo_eqmtList.value == "00"){
- messageBox("장비를", "C002");
- return;
- }
- model.removeNodeset("/root/main/detllotlist");
-
- model.setValue("/root/send/refflag" , model.getValue("/root/hidden/refflag"));
- model.setValue("/root/send/eqmtcd" , model.getValue("/root/hidden/eqmtcd"));
- model.setValue("/root/send/matrkindcd" , model.getValue("/root/hidden/matrkindcd"));
- model.setValue("/root/send/userdeptcd", model.getValue("/root/init/LB0000/nm"));
-
- submit("TRLQF00901");
-
- grd_lotlist.isReadOnly(1, 1, grd_lotlist.rows-1, 2) = true; //Lot코드 비활성화
-
- }
-
- //행추가
- function fAddRow(){
- if(cbo_eqmtList.value == "00"){
- alert("장비를 선택 후 진행하세요");
- return;
- }
- grd_lotlist.addrow();
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrfromdd" , getCurrentDate().toDate("YYYYMMDD").getAddDate(1).getDateFormat("YYYYMMDD"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrtodd" , "99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/todd" , "99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/validd" , "99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/eqmtcd" , model.getValue("/root/hidden/eqmtcd"));
-
- fGetDetlLotList();
- }
-
- //Lot변경
- function fAddRow2(){
-
- var row = grd_lotlist.row;
- if(row == -1){
- alert("Lot 변경할 항목을 선택하세요");
- return;
- }
- model.setValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrtodd", getCurrentDate());
-
- fEndLot(); //선택된항목 Lot 종료
-
- grd_lotlist.addrow();
- //선택했던 물질 정보 복사
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/eqmtcd" , model.getValue("/root/send/eqmtcd"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrcd" , model.getValue("/root/main/lotlist[" + row + "]/matrcd"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrkindcd" , model.getValue("/root/main/lotlist[" + row + "]/matrkindcd"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrnm" , model.getValue("/root/main/lotlist[" + row + "]/matrnm"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrfromdd" , getCurrentDate().toDate("YYYYMMDD").getAddDate(1).getDateFormat("YYYYMMDD"));
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrtodd" , "99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/todd" , "99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/validd" , "99991231");
- //초기 정보 설정
- /*
- var fromdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(1)
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrfromdd", fromdate.getDateFormat("YYYYMMDD")); //새로운 물질 시작일자를 다음날로 변경
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrtodd","99991231");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/windt", getCurrentDate());
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/lotno","-");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/prodcmpy","-");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/proddt","19000101");
- model.setValue("/root/main/lotlist[" + (grd_lotlist.rows-1) + "]/matrifcd","-");*/
- fGetDetlLotList();
- }
-
- //종료
- function fEndLot() {
- var row = grd_lotlist.row;
- if(row == -1){
- alert("Lot 종료할 항목을 선택하세요");
- return;
- }
-
- var todd = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrtodd");
- if(todd < getCurrentDate()){
- alert("이미 종료된 Lot입니다.");
- return;
- }
- grd_lotlist.rowStatus(grd_lotlist.row) = 4;
-
- model.setValue("/root/main/lotlist[" + grd_lotlist.row + "]/eqmtcd" , model.getValue("/root/send/eqmtcd"));
- model.setValue("/root/main/lotlist[" + grd_lotlist.row + "]/userdeptcd" , model.getValue("/root/init/LB0000/nm"));
- model.setValue("/root/send/lotdata" , getGridUpdateData(grd_lotlist));
-
- submit("TXLQF00902", false);
-
- fGetLotList();
- }
-
- //저장
- function fSetLotList() {
-
- var b = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrcd");
- var c = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrkindcd");
- var d = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrnm");
- var e = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrfromdd");
- var f = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrtodd");
- var g = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/validd");
- var h = model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/lotno");
-
- if(b == "" || c == "" || d == "" || e == "" || f == "" || g == "" || h == "" ){
- alert("모든 항목은 필수 입력입니다");
- return;
- }
-
- grd_lotlist.clearStatus();
- grd_lotlist.rowStatus(grd_lotlist.row) = 1;
-
- var testcd = "";
- var count = model.getXPathValue('count(/root/main/detllotlist[chk="1"])');
-
- if(count == 0){
- alert("Lot별 검사항목에 선택된 항목이 없습니다");
- return;
- }else{
- //저장할놈들 체크 (선택된항목 중 다른 Lot에 선택된 항목들과 중복되지 않게 하기 위함)
- for(i = 1; i < grd_detllotlist.rows; i++){
- if(model.getValue("/root/main/detllotlist[" + i + "]/chk") == 1){ //선택된놈들중
- //rowStyle가 지정되지 않은놈들 중(rowStyle가 지정된 항목은 선택된 항목의Lot에 등록되어있는놈들임)
- //Lot구분이 0(Reagent)이면 Lot별 검사항목 의 Reagent Lot란에 등록된게 있다면
- if(grd_detllotlist.rowstyle( i, "data", "background-color") == "" && c == 0 && model.getValue("/root/main/detllotlist[" + i + "]/reaglot") != ""){
- alert("이미 다른 Reagent Lot에 등록되어 있는 항목입니다\n등록하시려면 기존 Lot에서 항목 제외 후 다시 등록하세요");
- grd_detllotlist.row = i;
- return;
- //Lot구분이 1(Calibrator)이면 Lot별 검사항목 의 Calibrator Lot란에 등록된게 있다면
- }else if(grd_detllotlist.rowstyle( i, "data", "background-color") == "" && c == 1 && model.getValue("/root/main/detllotlist[" + i + "]/calilot") != ""){
- alert("이미 다른 Calibrator Lot에 등록되어 있는 항목입니다\n등록하시려면 기존 Lot에서 항목 제외 후 다시 등록하세요");
- grd_detllotlist.row = i;
- return;
- }
- //문제없다면 저장할 검사코드 담아버려~
- testcd += model.getValue("/root/main/detllotlist[" + i + "]/testcd") + "▦";
- }
- }
- }
-
- model.setValue("/root/main/lotlist[" + grd_lotlist.row + "]/eqmtcd" , model.getValue("/root/send/eqmtcd"));
- model.setValue("/root/main/lotlist[" + grd_lotlist.row + "]/userdeptcd" , model.getValue("/root/init/LB0000/nm"));
- model.setValue("/root/send/testlist" , testcd);
- model.setValue("/root/send/lotdata" , getGridUpdateData(grd_lotlist));
-
-
- submit("TXLQF00901", false);
- grd_lotlist.clearStatus();
- model.removeNodeset("/root/main/detllotlist");
- fGetLotList();
-
- }
-
- function fGetDetlLotList(){
- grd_detllotlist.rebuildStyle();
- grd_detllotlist.fixedcellischeck(0, 1) = false;
-
- model.setValue("/root/send/matrcd" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrcd"));
- model.setValue("/root/send/eqmtcd" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/eqmtcd"));
- model.setValue("/root/send/matrtodd" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/todd"));
- model.setValue("/root/send/matrfromdd" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrfromdd"));
- model.setValue("/root/send/matrkindcd" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/matrkindcd"));
- model.setValue("/root/send/lotno" , model.getValue("/root/main/lotlist[" + grd_lotlist.row + "]/lotno"));
-
- submit("TRLQF00902");
- setRowStyle( "grd_detllotlist" , "1" , "1" , "chk" , "equal" );
- model.refresh();
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
- <line id="line1" class="line_1" style="x1:1px; y1:70px; x2:640px; y2:70px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">QC Lot 목록</caption>
- <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
- <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
- <caption id="caption5" class="search_name" style="left:15px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
- <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:57px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetLotList();
- ]]>
- </script>
- </button>
- <line id="line3" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
- <select1 id="cmb_refflag" ref="/root/hidden/refflag" class="combo_s_essential" appearance="minimal" style="left:106px; top:9px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>사용자료</label>
- <value>1</value>
- </item>
- <item>
- <label>전체자료</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- <select1 id="cbo_execDept" ref="/root/hidden/execdept" class="combo_s_essential" appearance="minimal" style="left:365px; top:9px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0111">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fSetEqmtCd();
- ]]>
- </script>
- </select1>
- <select1 id="cbo_eqmtList" ref="/root/hidden/eqmtcd" class="combo_s_essential" appearance="minimal" style="left:595px; top:9px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/LB0701">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.removeNodeset("/root/main/lotlist");
- model.removeNodeset("/root/main/detllotlist");
- model.refresh();
- ]]>
- </script>
- </select1>
- <caption id="caption7" class="search_name" style="left:760px; top:10px; width:90px; height:17px; ">Lot 구분 :</caption>
- <select1 id="cmb_searchflag" ref="/root/hidden/matrkindcd" class="combo_search" appearance="minimal" style="left:850px; top:9px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>-전체-</label>
- <value>00</value>
- </item>
- <item>
- <label>[0]Reagent Lot</label>
- <value>0</value>
- </item>
- <item>
- <label>[1]Calibrator Lot</label>
- <value>1</value>
- </item>
- </choices>
- </select1>
- <caption id="caption3" class="search_name" style="left:285px; top:10px; width:86px; height:17px; ">검사실 :</caption>
- <caption id="caption4" class="search_name" style="left:530px; top:10px; width:70px; height:17px; ">장비 :</caption>
- </group>
- <datagrid id="grd_lotlist" nodeset="/root/main/lotlist" caption="Lot 코드^Lot 구분^Lot 명칭^사용시작일자^사용종료일자^종료키^Expire Date^Lot번호^장비코드^부서코드" colsep="^" colwidth="80, 100, 100, 90, 90, 60, 90, 80, 50, 50" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:640px; height:665px; ">
- <col ref="matrcd" type="input" maxlength="10"/>
- <col ref="matrkindcd" type="combo">
- <choices>
- <item>
- <label>[0]Reagent Lot</label>
- <value>0</value>
- </item>
- <item>
- <label>[1]Calibrator Lot</label>
- <value>1</value>
- </item>
- </choices>
- </col>
- <col ref="matrnm" type="input"/>
- <col ref="matrfromdd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="matrtodd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="todd" type="output" visibility="hidden"/>
- <col ref="validd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="lotno" type="input"/>
- <col ref="eqmtcd" type="output" visibility="hidden"/>
- <col ref="userdeptcd" type="output" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(isDataCell() && grd_lotlist.rowStatus(grd_lotlist.row) != 1 && grd_lotlist.rowStatus(grd_lotlist.row) != 3){
- fGetDetlLotList();
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_addrow" class="btn2_letter3" style="left:1141px; top:49px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAddRow();
- ]]>
- </script>
- </button>
- <button id="btn_end" class="btn2_letter4" style="left:1008px; top:49px; width:64px; height:19px; ">
- <caption>Lot 종료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fEndLot();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter4" style="left:1074px; top:49px; width:64px; height:19px; ">
- <caption>Lot 변경</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAddRow2();
- ]]>
- </script>
- </button>
- <datagrid id="grd_detllotlist" nodeset="/root/main/detllotlist" caption="^검사코드^검사명^Reagent Lot^Calibrator Lot^Control Material Lot" colsep="^" colwidth="25, 70, 130, 150, 150, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:642px; top:75px; width:552px; height:665px; ">
- <col checkvalue="1,0" ref="chk" type="checkbox"/>
- <col ref="testcd" type="output"/>
- <col ref="testnm" type="output"/>
- <col ref="reaglot" type="output"/>
- <col ref="calilot" type="output"/>
- <col ref="contlot" type="output" visibility="hidden"/>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:629px; top:55px; width:138px; height:13px; ">Lot별 검사항목</caption>
- <line id="line4" class="line_1" style="x1:642px; y1:70px; x2:1194px; y2:70px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_init" class="btn4_letter3" style="left:1127px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.reload();
- ]]>
- </script>
- </button>
- <line id="line2" class="line_2" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:1068px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetLotList();
- ]]>
- </script>
- </button>
- </group>
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">Lot 관리</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|