123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?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 xmlns="">
- <main>
- <codeinfo>
- <codelist>
- <cdid/>
- <cdnm/>
- <detldesc/>
- <useyn/>
- <cntlcd1/>
- <cntlcd2/>
- <grupcdid/>
- </codelist>
- </codeinfo>
- </main>
- <send>
- <reqdata>
- <grupcdid/>
- <srcd/>
- <gb/>
- </reqdata>
- </send>
- <senddata>
- <execdata>
- <codelist/>
- </execdata>
- </senddata>
- <popdata>
- <cdgrupid/>
- </popdata>
- <init/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-model-destruct">
- <![CDATA[
- //window.close();
- ]]>
- </script>
- <submission id="TRRWC02202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/codeinfo"/>
- <submission id="TXRWC02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/senddata/execdata" resultref="/root/hidden"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../ast/tumorelctweb/js/combolist.js"/>
- <script type="javascript">
- <![CDATA[
- function readfunc(){ // 해당 조건에 대한 사용자 권한내역을 조회한다.
- if (model.getValue("/root/send/reqdata/grupcdid") == ""){
- messageBox("구분코드를 선택한 후 조회하시기 바랍니다.", "E999", "");
- return;
- }
- model.removeNodeset("/root/main/codeinfo/codelist");
- btn_save.disabled = false;
- if (submit("TRRWC02202")){
- }
- model.refresh();
- }
- function datacheck(){
- var scdid1 = "";
- var scdid2 = "";
- for (var i = 1; i < datagrid1.rows; i ++){
- if (model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdid") == ""){
- messageBox("코드는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- /*
- if (model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdnm") == ""){
- messageBox("코드명은 필수 입력항목입니다.", "E999", "");
- return false;
- }
- */
- scdid1 = model.getValue("/root/main/codeinfo/codelist[" + i + "]/cdid");
- var k = i + 1;
- for (var j = k; j < datagrid1.rows; j++){
- scdid2 = model.getValue("/root/main/codeinfo/codelist[" + j + "]/cdid");
- if (i != j){
- if (scdid1 == scdid2){
- messageBox(j + "번째에서 중복된 자료가 존재합니다", "E999", "");
- return false;
- }
- }
- }
- }
- return true;
- }
- function ExecData(){
- var update = getGridUpdateData(datagrid1);
- model.setValue("/root/senddata/execdata/codelist", update);
- if (submit("TXRWC02201")){
- readfunc();
- }
- }
- function isDate(str) { // 날짜 형식에 대한 적합여부 체크
- if (str == "") return true; // 빈건 체크안함
- if (trim(str) == "") return true; // 빈건 체크안함
- if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
- if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
-
- var yy = new Number(str.substring(0, 4));
- var mm = new Number(str.substring(4, 6)) - 1;
- var dd = new Number(str.substring(6, 8));
- var date = new Date(yy, mm, dd);
- //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
- if (yy != date.getFullYear() ||
- mm != date.getMonth() ||
- dd != date.getDate()) {
- return false; // 존재하지 않는 날짜
- }
-
- return true; // 존재하는 날짜
- }
- function trim(data){ // 문자에 대한 TRIM 작업
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="895px" pageheight="580px" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:252px; height:14px; ">기준코드관리</caption>
- <shape id="rectangle1" appearance="roundrect" style="left:3px; top:18px; width:867px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption11" class="search_name" visibility="hidden" style="left:404px; top:26px; width:94px; height:17px; ">코드명검색:</caption>
- <input id="input13" ref="/root/send/reqdata/srcd" class="input_search" visibility="hidden" style="left:506px; top:25px; width:109px; height:19px; "/>
- <button id="btn_sea" class="btn1_letter2" style="left:797px; top:24px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- readfunc();
- ]]>
- </script>
- </button>
- <line id="line6" style="x1:687px; y1:24px; x2:687px; y2:46px; border-color:#ffe4bb; border-left-style:solid; "/>
- <line id="line7" class="line_1" style="x1:3px; y1:81px; x2:868px; y2:81px; "/>
- <datagrid id="datagrid1" nodeset="/root/main/codeinfo/codelist" autoresize="true" caption="코드^코드명^코드상세정보^사용여부^구분1^구분2^caption1" colsep="^" colwidth="101, 198, 316, 72, 74, 65, 39" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:3px; top:85px; width:867px; height:450px; ">
- <col disabled="true" ref="cdid" type="input" maxlength="10" style="text-align:center; "/>
- <col ref="cdnm" type="input" style="text-align:left; "/>
- <col ref="detldesc" type="input"/>
- <col ref="useyn" type="combo">
- <choices>
- <item>
- <label>사용</label>
- <value>Y</value>
- </item>
- <item>
- <label>사용안함</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="cntlcd1" type="input"/>
- <col ref="cntlcd2" type="input"/>
- <col ref="grupcdid" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /*
- var scol = datagrid1.col;
- datagrid1.col = scol;
- datagrid1.dispatch("onentercell");
- datagrid1.editCell();
- */
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- datagrid1.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption4" class="tit_2" style="left:3px; top:65px; width:113px; height:13px; ">코드별 상세정보</caption>
- <button id="btn_grdadd" class="btn2_letter3" style="left:759px; top:61px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (model.getValue("/root/send/reqdata/grupcdid") == ""){
- messageBox("구분코드를 선택한 후 작업하시기 바랍니다.", "E999", "");
- return;
- }
- datagrid1.addRow();
- var irow = datagrid1.row;
- model.setValue("/root/main/codeinfo/codelist[" + irow + "]/grupcdid", model.getValue("/root/send/reqdata/grupcdid"));
- //model.setValue("/root/main/codeinfo/codelist[" + irow + "]/useyn", "Y");
- model.setFocus("datagrid1");
- datagrid1.row = irow;
- datagrid1.col = 1;
- datagrid1.dispatch("onentercell");
- datagrid1.editCell();
- datagrid1.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_grddel" class="btn2_letter3" style="left:814px; top:61px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- datagrid1.deleteRow(datagrid1.row);
- ]]>
- </script>
- </button>
- <button id="button27" class="btn2_letter3" visibility="hidden" style="left:704px; top:61px; width:53px; height:19px; ">
- <caption>행복사</caption>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:816px; top:540px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (datacheck() == false){
- return;
- }
- ExecData();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_3" style="x1:3px; y1:536px; x2:868px; y2:536px; "/>
- <caption id="caption2" class="search_name" style="left:24px; top:26px; width:63px; height:17px; ">구분:</caption>
- <select1 id="combo1" ref="/root/send/reqdata/grupcdid" appearance="minimal" style="left:86px; top:25px; width:309px; height:19px; ">
- <choices>
- <item>
- <label>보조비계좌관리</label>
- <value>A0001</value>
- </item>
- <item>
- <label>원가비용코드</label>
- <value>A0003</value>
- </item>
- <item>
- <label>프로젝트별코드관리</label>
- <value>A0004</value>
- </item>
- <item>
- <label>관리항목 필수입력 계정과목</label>
- <value>A0005</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (model.getValue("/root/send/reqdata/grupcdid") == "A0004"){
- caption3.visible = true;
- combo2.visible = true;
- btn_grdadd.disabled = false;
- btn_grddel.disabled = false;
- btn_save.disabled = false;
- model.refresh();
- }else{
- caption3.visible = false;
- combo2.visible = false;
- btn_grdadd.disabled = false;
- btn_grddel.disabled = false;
- btn_save.disabled = false;
- readfunc();
- }
- ]]>
- </script>
- </select1>
- <caption id="caption3" class="search_name" visibility="hidden" style="left:625px; top:26px; width:64px; height:17px; ">구분:</caption>
- <select1 id="combo2" ref="/root/send/reqdata/gb" visibility="hidden" appearance="minimal" style="left:685px; top:25px; width:85px; height:19px; ">
- <choices>
- <item>
- <label>전체</label>
- <value/>
- </item>
- <item>
- <label>A</label>
- <value>A</value>
- </item>
- <item>
- <label>B</label>
- <value>B</value>
- </item>
- <item>
- <label>C</label>
- <value>C</value>
- </item>
- <item>
- <label>D</label>
- <value>D</value>
- </item>
- </choices>
- </select1>
- </xhtml:body>
- </xhtml:html>
|