123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?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>조건항목</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <comcd>
- <comcodelist/>
- </comcd>
- <deptcodelist>
- <deptcd/>
- <depthngnm/>
- </deptcodelist>
- <payitem>
- <payitemlist/>
- </payitem>
- </main>
- <target/>
- <init>
- <operator>
- <code>=</code>
- <cdnm>=</cdnm>
- </operator>
- <conector>
- <code>AND</code>
- <cdnm>AND</cdnm>
- <code>OR</code>
- <cdnm>OR</cdnm>
- </conector>
- <cond1>
- <code>Y</code>
- <cdnm>조건값1</cdnm>
- </cond1>
- <cond2>
- <code>Y</code>
- <cdnm>조건값2</cdnm>
- </cond2>
- <condvalu1/>
- <condvalu2/>
- </init>
- <send>
- <captitle/>
- <operator/>
- <conector/>
- <condvalu1/>
- <condvalu2/>
- <condvalu1nm/>
- <condvalu2nm/>
- <code/>
- <cdnm/>
- <cond1/>
- <cond2/>
- <comcdref>
- <cdgrupid/>
- <cdid/>
- <cdnm/>
- <refcond/>
- </comcdref>
- <deptref>
- <refcond/>
- <deptnm/>
- <deptcd/>
- <instcd/>
- <all>Y</all>
- </deptref>
- <payitem>
- <saldfrayflag/>
- <paydeduflag/>
- <getcond/>
- </payitem>
- </send>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSettingControl();
- ]]>
- </script>
- <submission id="TRRPZ00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/comcdref" resultref="/root/main/comcd"/>
- <submission id="TRRPZ00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptref" resultref="/root/main"/>
- <submission id="TRRWZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/payitem" resultref="/root/main/payitem"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fSettingControl()
- {
- var itemkind = model.getValue("/root/target/defaultvalue/itemkind");
- var operator = model.getValue("/root/target/defaultvalue/operator");
- var conector = model.getValue("/root/target/defaultvalue/conector");
- var condvalu1 = model.getValue("/root/target/defaultvalue/condvalu1");
- var condvalu2 = model.getValue("/root/target/defaultvalue/condvalu2");
- var condvalu1nm = model.getValue("/root/target/defaultvalue/condvalu1nm");
- var condvalu2nm = model.getValue("/root/target/defaultvalue/condvalu2nm");
- var itemnm = model.getValue("/root/target/defaultvalue/itemnm");
- var cdtblnm = model.getValue("/root/target/defaultvalue/cdtblnm");
- var colnm= model.getValue("/root/target/defaultvalue/colnm");
- var codeflag = model.getValue("/root/target/defaultvalue/codeflag");
-
- addGridComboItemAll("cmb_operator","<>","<>","above");
- addGridComboItemAll("cmb_operator",">",">","above");
- addGridComboItemAll("cmb_operator",">=",">=","above");
- addGridComboItemAll("cmb_operator","<","<","above");
- addGridComboItemAll("cmb_operator","<=","<=","above");
- addGridComboItemAll("cmb_operator","BETWEEN","BETWEEN","above");
- addGridComboItemAll("cmb_operator","IN","IN","above");
- addGridComboItemAll("cmb_operator","NOT IN","NOT IN","above");
-
- if (operator == null || operator == "") {
- model.setValue(cmb_operator.attribute("ref"),"=");
- }
- else {
- model.setValue(cmb_operator.attribute("ref"),operator);
- }
- model.setValue(ipt_condvalu1.attribute("ref"),condvalu1);
- model.setValue(ipt_condvalu2.attribute("ref"),condvalu2);
- model.setValue(opt_condvalu1nm.attribute("ref"),condvalu1nm);
- model.setValue(opt_condvalu2nm.attribute("ref"),condvalu2nm);
-
- if(conector.length == 0){
- model.setValue(cmb_conector.attribute("ref"),"AND");
- }
- else{
- model.setValue(cmb_conector.attribute("ref"),conector);
- }
- rbo_cond2.disabled = true;
- ipt_condvalu2.disabled = true;
- model.setValue(opt_title.attribute("ref"),itemnm);
- misfGridInit(grd_code);
- misfGridInit(grd_dept);
-
- if(cdtblnm == "ZBCMCODE"){
- grd_dept.attribute("visibility") = "hidden";
- grd_pay.attribute("visibility") = "hidden";
- grd_code.attribute("visibility") = "visible";
- model.setValue("/root/send/comcdref/cdgrupid",codeflag);
- }
- else if(cdtblnm == "ZSDDDEPT"){
- grd_code.attribute("visibility") = "hidden";
- grd_pay.attribute("visibility") = "hidden";
- grd_dept.attribute("visibility") = "visible";
- }
- else if(cdtblnm == "RWCMPYTL"){
- grd_code.attribute("visibility") = "hidden";
- grd_dept.attribute("visibility") = "hidden";
- grd_pay.attribute("visibility") = "visible";
- }
- else{
- grd_dept.attribute("visibility") = "hidden";
- grd_code.attribute("visibility") = "visible";
- if(colnm == "MARYYN"){
- misfGridIUD(grd_code, "A");
- misfGridIUD(grd_code, "A");
- model.setValue(grd_code.attribute("nodeset")+"["+(1)+"]/cdid", "N");
- model.setValue(grd_code.attribute("nodeset")+"["+(1)+"]/cdnm", "미혼");
- model.setValue(grd_code.attribute("nodeset")+"["+(2)+"]/cdid", "Y");
- model.setValue(grd_code.attribute("nodeset")+"["+(2)+"]/cdnm", "결혼");
- }
- else{
- misfGridIUD(grd_code, "A");
- misfGridIUD(grd_code, "A");
- model.setValue(grd_code.attribute("nodeset")+"["+(1)+"]/cdid", "N");
- model.setValue(grd_code.attribute("nodeset")+"["+(1)+"]/cdnm", "해당없음");
- model.setValue(grd_code.attribute("nodeset")+"["+(2)+"]/cdid", "Y");
- model.setValue(grd_code.attribute("nodeset")+"["+(2)+"]/cdnm", "해당");
- }
- }
- grd_code.caption = itemnm + "코드^" + itemnm + "명";
- grd_dept.caption = "기관명^" + itemnm + "코드^" + itemnm + "명";
-
- model.setValue(rbo_cond1.attribute("ref"),"Y");
- model.refresh();
- }
- function fChkReturn(){
- var operator = model.getValue(cmb_operator.attribute("ref"));
- var condvalu1 = model.getValue(ipt_condvalu1.attribute("ref"));
- var condvalu2 = model.getValue(ipt_condvalu2.attribute("ref"));
- var itemkind = model.getValue("/root/target/defaultvalue/itemkind");
-
- condvalu1 = condvalu1.setReplaceWord("'","");
- condvalu2 = condvalu2.setReplaceWord("'","");
-
- if(operator.length == 0){
- messageBox("연산자는","I003");
- model.setFocus("cmb_operator");
- return false;
- }
- if(condvalu1.length == 0){
- messageBox("조건값1은","I003");
- model.setFocus("ipt_condvalu1");
- return false;
- }
-
- if((operator == "BETWEEN") && (condvalu2.length == 0)){
- messageBox("조건값2는","I003");
- model.setFocus("ipt_condvalu2");
- return false;
- }
- model.refresh();
- return true;
- }
- function fSettingCodeFindList(){
- misfGridInit(grd_code);
- misfGridInit(grd_dept);
- var itemkind = model.getValue("/root/target/defaultvalue/itemkind");
- if(itemkind == "CODE"){
- var cdtblnm = model.getValue("/root/target/defaultvalue/cdtblnm");
- if(cdtblnm == "ZBCMCODE"){
-
- if(model.getValue(ipt_cdnm.attribute("ref")).length>0){
- model.setValue("/root/send/comcdref/cdnm",model.getValue(ipt_cdnm.attribute("ref")));
- model.setValue("/root/send/comcdref/refcond","cdnm");
- }
- else{
- model.setValue("/root/send/comcdref/cdid", model.getValue(ipt_code.attribute("ref")));
- model.setValue("/root/send/comcdref/refcond","cdid");
- }
- submit("TRRPZ00301");
- }
- else if(cdtblnm == "ZSDDDEPT"){
- if(model.getValue(ipt_cdnm.attribute("ref")).length>0){
- model.setValue("/root/send/deptref/deptnm",model.getValue(ipt_cdnm.attribute("ref")));
- model.setValue("/root/send/deptref/refcond","deptnm");
- }
- else{
- model.setValue("/root/send/deptref/deptcd", model.getValue(ipt_code.attribute("ref")));
- model.setValue("/root/send/deptref/refcond","deptcd");
- }
- submit("TRRPZ00201");
- }
- else if(cdtblnm == "RWCMPYTL"){
- submit("TRRWZ00101");
- }
- }
- }
- function fSelectDataGrid(){
- var itemkind = model.getValue("/root/target/defaultvalue/itemkind");
- var condvalu1 = model.getValue(ipt_condvalu1.attribute("ref"))
- var condvalu2 = model.getValue(ipt_condvalu2.attribute("ref"))
- var condvalu1nm = model.getValue(opt_condvalu1nm.attribute("ref"))
- var condvalu2nm = model.getValue(opt_condvalu2nm.attribute("ref"))
- var itemnm = model.getValue("/root/target/defaultvalue/itemnm");
- var cdtblnm = model.getValue("/root/target/defaultvalue/cdtblnm");
- var colnm= model.getValue("/root/target/defaultvalue/colnm");
- var operator= model.getValue(cmb_operator.attribute("ref"))
- var condflag1 = model.getValue(rbo_cond1.attribute("ref"));
- var condflag2 = model.getValue(rbo_cond2.attribute("ref"));
- if(operator.length == 0){
- messageBox("연산자는","I003");
- model.setFocus("cmb_operator");
- return false;
- }
-
- if(itemkind == "CODE" && cdtblnm == "ZSDDDEPT"){
- data = model.getValue(grd_dept.attribute("nodeset")+"["+(grd_dept.row - grd_dept.fixedRows + 1)+"]/deptcd");
- datanm = model.getValue(grd_dept.attribute("nodeset")+"["+(grd_dept.row - grd_dept.fixedRows + 1)+"]/depthngnm");
- }
- else if(itemkind == "CODE" && cdtblnm == "RWCMPYTL"){
- data = model.getValue(grd_pay.attribute("nodeset")+"["+(grd_pay.row - grd_pay.fixedRows + 1)+"]/payitemcd");
- datanm = model.getValue(grd_pay.attribute("nodeset")+"["+(grd_pay.row - grd_pay.fixedRows + 1)+"]/prntnm");
- }
- else{
- data = model.getValue(grd_code.attribute("nodeset")+"["+(grd_code.row - grd_code.fixedRows + 1)+"]/cdid");
- datanm = model.getValue(grd_code.attribute("nodeset")+"["+(grd_code.row - grd_code.fixedRows + 1)+"]/cdnm");
- }
-
- if(condflag1 == "Y"){
- fSettingResultData(operator,ipt_condvalu1,opt_condvalu1nm,data,datanm);
- }
- else{
- fSettingResultData(operator,ipt_condvalu2,opt_condvalu2nm,data,datanm);
- }
-
- model.refresh();
- }
- function fSettingResultData(operator,pcondvalu,pcondvalunm,data,datanm){
- if(operator == "IN" || operator == "NOT IN"){
- var valu = model.getValue(pcondvalu.attribute("ref"));
- var valunm = model.getValue(pcondvalunm.attribute("ref"));
- if(valu.length==0)
- {
- model.setValue(pcondvalu.attribute("ref"), "'" + data +"'");
- model.setValue(pcondvalunm.attribute("ref"),"'" + datanm +"'");
- }
- else{
- model.setValue(pcondvalu.attribute("ref"), valu + ",'" + data +"'");
- model.setValue(pcondvalunm.attribute("ref"), valunm + ",'" + datanm +"'");
- }
- }
- else{
- model.setValue(pcondvalu.attribute("ref"), "'" + data+ "'");
- model.setValue(pcondvalunm.attribute("ref"), "'" + datanm+ "'");
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="450" pageheight="560" guideline="1,155;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:10px; top:0px; width:385px; height:110px; ">
- <line id="line30" class="line_2" style="x1:4px; y1:55px; x2:385px; y2:55px; "/>
- <caption id="caption50" class="cell_1" style="left:3px; top:31px; width:56px; height:23px; vertical-align:middle; ">연산자</caption>
- <caption id="caption52" class="cell_1" style="left:3px; top:56px; width:56px; height:23px; vertical-align:middle; ">조건값1</caption>
- <select1 id="cmb_operator" ref="/root/send/operator" appearance="minimal" style="left:60px; top:33px; width:132px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/operator">
- <label ref="code"/>
- <value ref="cdnm"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var operation = model.getValue(cmb_operator.attribute("ref"));
- if(operation == "BETWEEN"){
- rbo_cond2.disabled = false;
- }
- else{
- rbo_cond2.disabled = true;
- model.setValue(rbo_cond1.attribute("ref"),"Y");
- model.setValue(rbo_cond2.attribute("ref"),"");
- model.setValue(opt_condvalu2nm.attribute("ref"),"");
- model.setValue(ipt_condvalu2.attribute("ref"),"");
- rbo_cond1.refresh();
- rbo_cond2.refresh();
- opt_condvalu2nm.refresh();
- ipt_condvalu2.refresh();
- }
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="cell_1" style="left:195px; top:30px; width:56px; height:23px; vertical-align:middle; ">연결자</caption>
- <select1 id="cmb_conector" ref="/root/send/conector" appearance="minimal" style="left:252px; top:33px; width:132px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/conector">
- <label ref="cdnm"/>
- <value ref="code"/>
- </itemset>
- </choices>
- </select1>
- <input id="ipt_condvalu1" ref="/root/send/condvalu1" visibility="hidden" style="left:300px; top:60px; width:70px; height:19px; "/>
- <caption id="caption2" class="cell_1" style="left:3px; top:81px; width:56px; height:23px; vertical-align:middle; ">조건값2</caption>
- <input id="ipt_condvalu2" ref="/root/send/condvalu2" visibility="hidden" style="left:305px; top:85px; width:60px; height:19px; "/>
- <line id="line1" class="line_2" style="x1:4px; y1:80px; x2:385px; y2:80px; "/>
- <line id="line2" class="line_2" style="x1:3px; y1:104px; x2:384px; y2:104px; "/>
- <line id="line3" class="line_1" style="x1:3px; y1:25px; x2:385px; y2:25px; "/>
- <caption id="cap_title" class="tit_2" style="left:2px; top:10px; width:15px; height:13px; vertical-align:middle; "/>
- <output id="opt_title" ref="/root/send/captitle" style="left:12px; top:5px; width:360px; height:19px; font-weight:bold; "/>
- <output id="opt_condvalu1nm" ref="/root/send/condvalu1nm" style="left:60px; top:57px; width:324px; height:19px; "/>
- <output id="opt_condvalu2nm" ref="/root/send/condvalu2nm" style="left:60px; top:84px; width:324px; height:19px; "/>
- </group>
- <group id="group1" scroll="auto" style="left:9px; top:525px; width:386px; height:27px; ">
- <button id="btn_confirm" class="btn4_letter2" style="left:267px; top:2px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(!fChkReturn())return;
-
- var rtnvalue = "operator▦conector▦condvalu1▦condvalu1nm▦condvalu2▦condvalu2nm▩" + cmb_operator.value + "▦" + cmb_conector.value + "▦" +ipt_condvalu1.value+ "▦" + opt_condvalu1nm.value + "▦" + ipt_condvalu2.value + "▦" + opt_condvalu2nm.value +"▩";
- if ( checkOpener() ) {
- opener.javascript.setParameter("SMRPB01702_", rtnvalue);
-
- } else {
- var rtn = messageBox("상위화면을 찾을 수", "E001");
- }
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:324px; top:2px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:384; y2:0px; "/>
- </group>
- <group id="group2" style="left:10px; top:115px; width:385px; height:410px; ">
- <caption id="caption3" class="tit_2" style="left:2px; top:4px; width:144px; height:14px; vertical-align:middle; ">코드검색조건</caption>
- <caption id="caption4" class="cell_1" style="left:3px; top:20px; width:56px; height:23px; vertical-align:middle; ">코드명</caption>
- <input id="ipt_cdnm" ref="/root/send/cdnm" style="left:60px; top:22px; width:190px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption5" class="cell_1" style="left:3px; top:45px; width:56px; height:23px; vertical-align:middle; ">코 드</caption>
- <input id="ipt_code" ref="/root/send/code" style="left:60px; top:47px; width:190px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <select1 id="rbo_cond1" ref="/root/send/cond1" appearance="full" cols="1" overflow="visible" style="left:255px; top:23px; width:71px; height:19px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/cond1">
- <label ref="cdnm"/>
- <value ref="code"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue(rbo_cond2.attribute("ref"),"");
- rbo_cond2.refresh();
- ]]>
- </script>
- </select1>
- <button id="btn_search" class="btn2_letter2" style="left:334px; top:24px; width:42px; height:19px; ">
- <caption>검색</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSettingCodeFindList();
- ]]>
- </script>
- </button>
- <button id="btn_aprv" class="btn2_letter2" style="left:334px; top:44px; width:42px; height:19px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSelectDataGrid();
- ]]>
- </script>
- </button>
- <datagrid id="grd_code" nodeset="/root/main/comcd/comcodelist" caption="코드^코드명" colsep="^" colwidth="100, 262" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:69px; width:382px; height:339px; ">
- <col ref="cdid"/>
- <col ref="cdnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- btn_aprv.dispatch("DOMActivate");
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_dept" nodeset="/root/main/deptcodelist" caption="기관명^코드^코드명" colsep="^" colwidth="100,100, 162" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:69px; width:382px; height:339px; ">
- <col ref="instnm"/>
- <col ref="deptcd"/>
- <col ref="depthngnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- btn_aprv.dispatch("DOMActivate");
- ]]>
- </script>
- </datagrid>
- <select1 id="rbo_cond2" ref="/root/send/cond2" appearance="full" cols="1" overflow="visible" style="left:255px; top:48px; width:71px; height:19px; border-style:none; ">
- <choices>
- <itemset nodeset="/root/init/cond2">
- <label ref="cdnm"/>
- <value ref="code"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue(rbo_cond1.attribute("ref"),"");
- rbo_cond1.refresh();
- ]]>
- </script>
- </select1>
- <datagrid id="grd_pay" nodeset="/root/main/payitem/payitemlist" caption="코드^코드명" colsep="^" colwidth="100, 262" mergecellsfixedrows="bycolrec" rowsep="|" style="left:2px; top:69px; width:382px; height:339px; ">
- <col ref="payitemcd"/>
- <col ref="prntnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- btn_aprv.dispatch("DOMActivate");
- ]]>
- </script>
- </datagrid>
- </group>
- <line id="line4" class="line_1" style="x1:13px; y1:107px; x2:395px; y2:107px; "/>
- </xhtml:body>
- </xhtml:html>
|