123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLLF00100_계검사계코드관리.xrw
- * 설 명 : 검사시행부서코드관리 조회 및 등록
- * 설 계 자 : (주)에이씨케이 -
- * 작 성 자 : (주)에이씨케이 - 박정은
- * 작 성 일 : 2007.04.10
- * 수정이력 : 2007.07.27 박정은 lastupdtdt 수정함
- * 기 타 :
- -->
- <?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>검사시행부서코드관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root>
- <main>
- <flag>
- <cond1>2</cond1>
- </flag>
- <sectlist>
- <sectfromdd/>
- <secttodd/>
- <sectcd/>
- <sectnm/>
- <sectscrnnm/>
- <sectabbrnm/>
- <sectprntnm/>
- <sectlblnm/>
- </sectlist>
- <tsectlist>
- <tsectfromdd/>
- <tsecttodd/>
- <sectcd/>
- <tsectcd/>
- <tsectnm/>
- <tsectscrnnm/>
- <tsectabbrnm/>
- <tsectprntnm/>
- <tsectlblnm/>
- </tsectlist>
- <MSG/>
- <getUsernm/>
- </main>
- <send>
- <refgbn/>
- <sectcd/>
- <sectdata/>
- <tsectdata/>
- <deptflag/>
- <codeflag/>
- </send>
- <init>
- </init>
- <hidden>
- <ref>
- <refgbn>1</refgbn>
- </ref>
- <deptflagcd/>
- </hidden>
- </root>
- </instance>
- <script src="../../../com/commonweb/js/common.js" type="javascript"/>
- <script src="../../../com/commonweb/js/dateHelper.js" type="javascript"/>
- <script src="../../../com/commonweb/js/tfHelper.js" type="javascript"/>
- <!-- 계코드 조회-->
- <submission id="TRLLF10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/sectlist"/>
- <!-- 검사계코드 조회-->
- <submission id="TRLLF10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tsectlist"/>
- <!-- 계코드 수정,등록-->
- <!-- 검사계코드 수정,등록-->
- <submission id="TXLLF10101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/sectlist"/>
- <submission id="TXLLF10102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/tsectlist"/>
- <!--<submission id="TRLZZ00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/getUsernm"/>-->
- <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init"/>
- <script ev:event="xforms-ready" type="javascript">
- <![CDATA[
- // 권한 설정
- //var auth = model.getValue("/root/properties/auth");
- //checkAuth(auth);
- //btn_save.disabled = !checkAuth("X") ;
-
- // 초기정보 조회
- model.setValue("/root/send/codeflag", "0000|"); // 0000= 유저과플래그
- submit("TRLZZ00101");
-
- model.removeNodeset("/root/main/sectlist");
- model.removeNodeset("/root/main/tsectlist");
- model.refresh();
-
- fSetHddentodd();
-
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
- //조회구분에 따라 상용종료일 숨기기
- function fSetHddentodd(){
- if(cmb_refgbn.value == "1"){
- grd_sect.colHidden(2) = true;
- grd_tsect.colHidden(2) = true;
- }else if(cmb_refgbn.value =="2"){
- grd_sect.colHidden(2) = false;
- grd_tsect.colHidden(2) = false;
- }
- }
-
- // 행추가 버튼
- /*function fInsRowAdd(pGridId) {
- pGridId.addRow();
-
- }
- */
- // 시행부서코드목록 행추가
- function fSetSectRowAdd(){
-
- grd_sect.addRow();
- grd_sect.rowStatus(0) = 1;
- var today = getCurrentDate();
- model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectfromdd", today);
- model.setValue("/root/main/sectlist["+grd_sect.row+"]/secttodd", "99991231");
- model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectabbrnm", "-");
- model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectprntnm", "-");
- model.setValue("/root/main/sectlist["+grd_sect.row+"]/sectlblnm", "-");
-
-
- model.removeNodeset("/root/main/tsectlist");
- grd_tsect.refresh();
- }
-
-
- // 시행부서 상세코드목록 행추가
- function fSetTsectRowAdd(){
-
- grd_tsect.addRow();
- var today = getCurrentDate();
-
- model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectfromdd", today);
- model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsecttodd", "99991231");
- model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectabbrnm", "-");
- model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectprntnm", "-");
- model.setValue("/root/main/tsectlist["+(grd_tsect.row-1)+"]/tsectlblnm", "-");
-
- }
-
- // 상세 행추가시 계 널값 체크
- function fGetSectNull(){
-
- var msg = "";
- var nullyn = "true";
- var sectRow = grd_sect.row;
-
-
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectlblnm")==""){
- msg = "[계라벨명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectprntnm")==""){
- msg = "[계출력명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectabbrnm")==""){
- msg = "[계약어명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectscrnnm")==""){
- msg = "[계화면명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectnm")==""){
- msg = "[계명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectcd")==""){
- msg = "[계코드] 는 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/secttodd")==""){
- msg = "[사용종료일] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/sectlist["+sectRow+"]/sectfromdd")==""){
- msg = "[사용시작일] 은 " ;
- nullyn = "false";
- }
-
- if(nullyn == "false"){
- messageBox(msg, "I003", "");
- }
- return nullyn;
- }
-
- // 초기화 버튼
- function fSetInit() {
- //model.reset();
- model.removeNodeset("/root/main/sectlist");
- model.removeNodeset("/root/main/tsectlist");
- model.refresh();
- }
-
- // 계리스트 조회
- function fGetSectTsect(){
- grd_sect.rebuildstyle();
-
- model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- submit("TRLLF10101"); // 계 리스트 조회
-
- var gbn = model.getValue("/root/hidden/ref/refgbn");
- var today = getCurrentDate();
-
- // 전체조회일때 종료된 데이터 배경색 바꾸기
- if(gbn=="2"){
- setRowStyle("grd_sect", "0", today, "secttodd", "small");
- }
-
- // 계리스트 존재시 검사계 자동조회
- if(grd_sect.rows > 0){
- grd_sect.row = 1;
- fGetTsect(1);
- }
- }
-
- // 검사계 리스트 조회
- function fGetTsect(sectRow){
- grd_tsect.allStyle("all", "background-color") = "#FFFFFF";
-
- var cdd = model.getValue("/root/main/sectlist["+sectRow+"]/sectcd");
-
- model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
- model.setValue("/root/send/sectcd", cdd);
-
- submit("TRLLF10102");
-
- setRowStyle("grd_tsect", "0", getCurrentDate(), "tsecttodd", "small");
- }
-
- // 저장버튼 클릭시
- function fExeSectTsect(){
-
- //var sectdata = grd_sect.getUpdateData();
- var sectdata = getGridUpdateData(grd_sect);
- var row = grd_sect.row;
- var today = getCurrentDate();
-
- var tsectRow = grd_tsect.rows;
- var sectcd = model.getValue("/root/main/sectlist["+grd_sect.row+"]/sectcd");
-
- if(tsectRow <3){
- //alert("시행부서 상세 코드 정보를 입력하십시오.");
- messageBox("시행부서 상세 코드 정보를 ", "C001");
- return;
- }
- //계 정보 등록
- model.setValue("/root/send/sectdata", sectdata);
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- submit("TXLLF10101");
-
- // 검사계 정보 등록
- //var tsectdata = grd_tsect.getUpdateData();
- var tsectdata = getGridUpdateData(grd_tsect);
-
- model.setValue("/root/send/sectcd", sectcd);
- model.setValue("/root/send/tsectdata", tsectdata);
- model.setValue("/root/send/deptflag", model.getValue("/root/init/LB0000/nm"));
-
- submit("TXLLF10102");
-
- var gbn = model.getValue("/root/hidden/ref/refgbn");
-
- // 전체조회일때 종료된 데이터 배경색 바꾸기
- /*
- if(gbn=="2"){
- // 계
- for(i=1; i<=grd_sect.rows; i++){
- grd_sect.rowStyle(i, "data", "background-color") = "#FFFFFF";
-
- if(model.getValue("/root/main/sectlist["+i+"]/secttodd") < today){
- grd_sect.rowStyle(i, "data", "background-color") = "#f3e1bf";
- //setRowStyle(grd_tube , "background-color" , "1" , i ); -- common js
- }
-
- }
-
- // 계검사계
- for(j=1; j<= grd_tsect.rows; j++){
- grd_tsect.rowStyle(i, "data", "background-color") = "#FFFFFF";
-
- if(model.getValue("/root/main/tsectlist["+j+"]/tsecttodd") < today){
- grd_tsect.rowStyle(j, "data", "background-color") = "#f3e1bf";
- }
- }
- }*/
-
- }
-
-
-
- // Null 체크
- function fNullCheck(){
-
- var msg = "";
- var nullyn = "true";
-
- if(grd_tsect.rows <3){
- //alert("시행부서 상세 코드 정보를 입력하십시오.");
- messageBox("시행부서 상세 코드 정보를 ", "C001");
- return;
- }
-
- for(i=1; i<grd_tsect.rows; i++ ){
- //if(grd_tsect.rowStatus(i) == 3 || grd_tsect.rowStatus(i) == 1){
-
-
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectlblnm")==""){
- msg = "[검사계라벨명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectprntnm")==""){
- msg = "[검사계출력명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectabbrnm")==""){
- msg = "[검사계약어명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectscrnnm")==""){
- msg = "[검사계화면명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectnm")==""){
- msg = "[검사계명] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectcd")==""){
- msg = "[검사계코드] 는 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsecttodd")==""){
- msg = "[사용종료일] 은 " ;
- nullyn = "false";
- }
-
- if(model.getValue("/root/main/tsectlist["+i+"]/tsectfromdd")==""){
- msg = "[사용시작일] 은 " ;
- nullyn = "false";
- }
-
-
- //}
- if(nullyn == "false"){
- messageBox(msg, "I003", "");
- }
- return nullyn;
-
- }
-
- }
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">검사시행부서코드관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
- <group id="group2" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0; width:1195px; height:35px; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90; height:17px; ">조회구분 :</caption>
- <line id="line11" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:57px; height:22px; ">
- <caption>조회</caption>
- <script ev:event="DOMActivate" type="javascript">
- <![CDATA[
- // 계코드 조회
- fGetSectTsect();
- ]]>
- </script>
- </button>
- <select1 id="cmb_refgbn" ref="/root/hidden/ref/refgbn" class="combo_s_essential" appearance="minimal" style="left:108px; top:8px; width:150px; height:19px; ">
- <choices>
- <item>
- <label>사용코드</label>
- <value>1</value>
- </item>
- <item>
- <label>전체코드</label>
- <value>2</value>
- </item>
- </choices>
- <script ev:event="xforms-select" type="javascript">
- <![CDATA[
- fSetHddentodd();
- ]]>
- </script>
- </select1>
- </group>
- <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:134px; height:14px; ">시행부서코드목록</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:495px; y2:70px; "/>
- <line id="line1" class="line_1" style="x1:500px; y1:70px; x2:1194px; y2:70px; "/>
- <caption id="caption3" class="tit_2" style="left:505px; top:55px; width:147px; height:14px; ">시행부서상세코드목록</caption>
- <datagrid id="grd_sect" nodeset="/root/main/sectlist" caption="사용시작일^사용종료일^계코드^계명^계명(화면)^계명(약어)^계명(출력)^계명(라벨)^표시순서" colwidth="85, 85, 50, 70, 90, 80, 80, 80, 60" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:0px; top:75px; width:495px; height:669px; ">
- <col ref="sectfromdd" type="inputdate"/>
- <col ref="secttodd" type="inputdate"/>
- <col ref="sectcd" type="input"/>
- <col ref="sectnm" type="input"/>
- <col ref="sectscrnnm" type="input"/>
- <col ref="sectabbrnm" type="input"/>
- <col ref="sectprntnm" type="input"/>
- <col ref="sectlblnm" type="input"/>
- <script ev:event="onclick" type="javascript">
- <![CDATA[
- // 검사계코드 리스트 조회
- fGetTsect(grd_sect.row);
- ]]>
- </script>
- <script ev:event="onaftersort" type="javascript">
- <![CDATA[
- grd_sect.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_tsect" nodeset="/root/main/tsectlist" caption="사용시작일^사용종료일^검사계코드^검사계코드^검사계명^검사계명(화면)^검사계명(약어)^검사계명(출력)^검사계명(라벨)^계표시순서^검사계표시순서|사용시작일^사용종료일^계^검사계^검사계명^검사계명(화면)^검사계명(약어)^검사계명(출력)^검사계명(라벨)^계표시순서^검사계표시순서" colwidth="85, 85, 33, 38, 60, 90, 90, 90, 90, 60, 60" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:500px; top:75px; width:695px; height:669px; ">
- <col ref="tsectfromdd" type="inputdate"/>
- <col ref="tsecttodd" type="inputdate"/>
- <col ref="sectcd"/>
- <col ref="tsectcd" type="input"/>
- <col ref="tsectnm" type="input"/>
- <col ref="tsectscrnnm" type="input"/>
- <col ref="tsectabbrnm" type="input"/>
- <col ref="tsectprntnm" type="input"/>
- <col ref="tsectlblnm" type="input"/>
- <script ev:event="onaftersort" type="javascript">
- <![CDATA[
- grd_tsect.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_addnew1" class="btn2_letter3" style="left:442px; top:49px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script ev:event="DOMActivate" type="javascript">
- <![CDATA[
- fSetSectRowAdd();
- ]]>
- </script>
- </button>
- <button id="btn_addnew2" class="btn2_letter3" style="left:1142px; top:49px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script ev:event="DOMActivate" type="javascript">
- <![CDATA[
-
- if(fGetSectNull()=="true"){
- fSetTsectRowAdd();
-
- }
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script ev:event="DOMActivate" type="javascript">
- <![CDATA[
- fSetInit();
-
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script ev:event="DOMActivate" type="javascript">
- <![CDATA[
-
- if(fNullCheck()=="true"){
- fExeSectTsect();
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|