123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLQF00600_QC물질관리.xrw
- * 설 명 : QC물질관리
- * 설 계 자 : (주)에이씨케이 -
- * 작 성 자 : (주)에이씨케이 - 윤재한
- * 작 성 일 : 2007.11.01
- * 수정이력 :
- * 기 타 :
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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/>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <getmatlist>
- <matcd/>
- <levlcd/>
- <matrfromdd/>
- <matrtodd/>
- <matrnm/>
- <windt/>
- <lotno/>
- <oclotno/>
- <prodcmpy/>
- <proddt/>
- <levlnm/>
- <matrifcd/>
- <validd/>
- </getmatlist>
- </main>
- <send>
- <matdata/>
- <codeflag/>
- <userdeptcd/>
- <refflag/>
- <searchflag/>
- <searchtext/>
- </send>
- <init>
- </init>
- <hidden>
- <refflag/>
- <searchflag/>
- <searchtext/>
- <temp/>
- </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="TXLQF00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0000"/>
- <submission id="TRLQF00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getmatlist"/>
- <submission id="TXLQF00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- </model>
- <script type="javascript">
- <![CDATA[
- //초기화
- function fSetInit() {
-
- model.setValue("/root/send/codeflag", "0000|");
- submit("TRLZZ00101", false);
-
- model.makeValue("/root/send/basecdid", "M");
- model.setValue("/root/send/codeflag", "0501|");
- submit("TRLZZ00101"); //사용자 부서별로 레벨코드 조회하기 위해 0000과 0501따로 조회
-
- model.setValue("/root/hidden/refflag", "1");
- model.setValue("/root/hidden/searchflag", "1");
- model.setValue("/root/hidden/searchtext", "");
-
- grd_matlist.colHidden(4) = true;
-
- model.removeNodeset("/root/main/getmatlist");
-
- fGetMatList();
- }
-
- //조회
- function fGetMatList() {
- model.setValue("/root/send/refflag", model.getValue("/root/hidden/refflag"));
- model.setValue("/root/send/searchflag", model.getValue("/root/hidden/searchflag"));
- model.setValue("/root/send/searchtext", model.getValue("/root/hidden/searchtext").toUpperCase());
- model.setValue("/root/send/userdeptcd", "M");
-
- submit("TRLQF00601");
-
- grd_matlist.isReadOnly(1, 1, grd_matlist.rows-1, 4) = true; //물질코드~ 사용종료일자까지 비활성화
-
-
- }
-
- //행추가
- function fAddRow(){
- grd_matlist.addrow();
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrfromdd", getCurrentDate());
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrtodd","99991231");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/windt", getCurrentDate());
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/lotno","-");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/validd","99991231");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/prodcmpy","-");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/proddt","19000101");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrifcd","-");
-
- grd_matlist.bottomRow = grd_matlist.rows;
- }
-
- //물질변경
- function fAddRow2(){
-
- copyNodeListType("/root/hidden/temp", "/root/main/getmatlist["+grd_matlist.row+"]", "replace"); //선택항목 임시노드에 복사
- fEndMat(); //선택된항목 물질 종료
-
- grd_matlist.addrow();
- //선택했던 물질 정보 복사
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrcd" , model.getValue("/root/hidden/temp/getmatlist/matrcd"));
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/levlcd" , model.getValue("/root/hidden/temp/getmatlist/levlcd"));
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrnm" , model.getValue("/root/hidden/temp/getmatlist/matrnm"));
- //초기 정보 설정
-
- var fromdate = getCurrentDate().toDate("YYYYMMDD").getAddDate(1)
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrfromdd", fromdate.getDateFormat("YYYYMMDD")); //새로운 물질 시작일자를 다음날로 변경
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrtodd","99991231");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/windt", getCurrentDate());
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/lotno","-");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/validd","99991231");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/prodcmpy","-");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/proddt","19000101");
- model.setValue("/root/main/getmatlist[" + (grd_matlist.rows-1) + "]/matrifcd","-");
-
- grd_matlist.bottomRow = grd_matlist.rows;
- }
-
- //종료
- function fEndMat() {
-
- var todd = model.getValue("/root/main/getmatlist["+grd_matlist.row+"]/matrtodd");
- if(todd < getCurrentDate()){
- alert("이미 종료된 물질입니다.");
- return;
- }
-
- grd_matlist.rowStatus(grd_matlist.row) = 4;
-
- model.setValue("/root/send/matdata", getGridUpdateData(grd_matlist));
- model.setValue("/root/send/userdeptcd", model.getValue("/root/init/LB0000/nm"));
-
- submit("TXLQF00602", false);
-
- fGetMatList();
- }
- //엔터키
- function fKeyEvent(){
- if(event.keyCode == "13"){
- //물질 리스트 조회
- if(event.target =="ipt_searchtext"){
- model.setValue("/root/hidden/searchtext", ipt_searchtext.currentText);
- fGetMatList();
- }
- }
- }
- //저장
- function fInsMat() {
- var row = getNodesetCount("/root/main/getmatlist");
-
- for(i = 1; i <= row; i++) {
- if(grd_matlist.rowStatus(i) == 3 || grd_matlist.rowStatus(i) == 1) {
- if(model.getValue("/root/main/getmatlist["+ i +"]/matrcd") == "") {
- messageBox("QC물질 코드는", "I003");
- return;
- }else if(model.getValue("/root/main/getmatlist["+ i +"]/levlcd") == "") {
- messageBox("레벨코드는", "I003");
- return;
- }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrfromdd") == "") {
- messageBox("사용시작일자는", "I003");
- return;
- }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrnm") == "") {
- messageBox("QC물질명은", "I003");
- return;
- }else if(model.getValue("/root/main/getmatlist["+ i +"]/matrtodd") == "") {
- if(model.getValue("/root/hidden/refflag") =="2") {
- messageBox("사용종료일자는", "I003");
- return;
- } else {
- model.setValue("/root/main/getmatlist["+ i +"]/matrtodd", "99991231");
- }
- }
-
- if(model.getValue("/root/main/getmatlist["+ i +"]/windt") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/windt", getCurrentDate());
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/lotno") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/lotno", "-");
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/oclotno") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/oclotno", "-");
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/prodcmpy") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/prodcmpy", "-");
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/proddt") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/proddt", "19000101");
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/matrifcd") == "") {
- model.setValue("/root/main/getmatlist["+ i +"]/matrifcd", "-");
- }
- if(model.getValue("/root/main/getmatlist["+ i +"]/levlnm") == "") {
- var cd = model.getValue("/root/main/getmatlist["+ i +"]/levlcd");
- model.setValue("/root/main/getmatlist["+ i +"]/levlnm", model.getValue("/root/init/LB0501[cd = '"+ cd +"']/etc01"));
- }
- }
- }
-
- model.setValue("/root/send/matdata", getGridUpdateData(grd_matlist));
- model.setValue("/root/send/userdeptcd", "M");
-
- submit("TXLQF00601");
-
- fGetMatList();
- }
- ]]>
- </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:0px; y1:70px; x2:1194px; y2:70px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">QC물질 목록</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:9px; 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[
- fGetMatList();
- ]]>
- </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:8px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>사용자료</label>
- <value>1</value>
- </item>
- <item>
- <label>전체자료</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(model.getValue("/root/hidden/refflag") == "2") {
- grd_matlist.colHidden(4) = false;
- } else {
- grd_matlist.colHidden(4) = true;
- }
- fGetMatList();
- model.refresh();
- ]]>
- </script>
- </select1>
- <input id="ipt_searchtext" ref="/root/hidden/searchtext" class="input_s_button" style="left:973px; top:9px; width:120px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fKeyEvent();
- ]]>
- </script>
- </input>
- <caption id="caption7" class="search_name" style="left:760px; top:10px; width:86px; height:17px; ">검색구분 :</caption>
- <select1 id="cmb_searchflag" ref="/root/hidden/searchflag" class="combo_search" appearance="minimal" style="left:850px; top:9px; width:120px; height:19px; ">
- <choices>
- <item>
- <label>물질코드</label>
- <value>1</value>
- </item>
- <item>
- <label>물질명</label>
- <value>2</value>
- </item>
- </choices>
- </select1>
- </group>
- <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; ">
- <col ref="matrcd" type="input" maxlength="10"/>
- <col ref="levlcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/LB0501">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="matrfromdd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="matrtodd" type="outputdate" format="yyyy-mm-dd"/>
- <col ref="matrnm" type="input"/>
- <col ref="windt" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="lotno" type="input"/>
- <col ref="oclotno" type="input"/>
- <col ref="validd" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="prodcmpy" type="input"/>
- <col ref="proddt" type="inputdate" format="yyyy-mm-dd"/>
- <col ref="levlnm" type="input"/>
- <col ref="matrifcd" type="input"/>
- </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_letter2" style="left:1029px; top:49px; width:42px; height:19px; ">
- <caption>종료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fEndMat();
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter4" style="left:1074px; top:49px; width:64px; height:19px; ">
- <caption>물질변경</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAddRow2();
- ]]>
- </script>
- </button>
- </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[
- fInsMat();
- ]]>
- </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; ">QC물질관리</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|