123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMSDT06700.사회사업 기부금실적.xrw
- * 설 명 : 사회사업 기부금실적
- * 작 성 자 : 박성호
- * 작 성 일 : 2008.11.19
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <deciinfo>
- <decilist>
- <flagnm/>
- <contribpatcnt/>
- <contribamt/>
- <contribpatamt/>
- <decipatcnt/>
- <deciamt/>
- <patamt/>
- </decilist>
- </deciinfo>
- <expsinfo>
- <expslist>
- <flagnm/>
- <supppatcnt/>
- <suppamt/>
- </expslist>
- </expsinfo>
- <search>
- <fromdd/>
- <todd/>
- <fromentryy/>
- <fromendyy/>
- <toendyy/>
- <toentryy/>
- <flag/>
- <ioflag/>
- <achivflag>C1</achivflag>
- </search>
- </main>
- <send>
- <search/>
- </send>
- <init>
- <ioflag>
- <A0563/>
- </ioflag>
- <ioflag1>
- <C0029>
- </C0029>
- </ioflag1>
- </init>
- <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/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRSDT06701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/deciinfo"/>
- <submission id="TRSDT06702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" replace="instance" resultref="/root/main/expsinfo"/>
- </model>
- <script type="javascript">
- <![CDATA[
- /**========================================================================================================================================
- * 조회기간 그리드초기화
- =========================================================================================================================================*/
- function fInit(){
- model.removeNodeset("/root/main/deciinfo/decilist");
- cmb_sumflag.select(0);
-
- // 공통코드 목록 가져오기(입원/외래)
- zbcfGetCodeList(new Array("A0563", "C0029"), new Array("/root/init/ioflag", "/root/init/ioflag1") , true);
- // 입원/외래
- addComboItem("cmb_ioflag", "", "", "above");
-
- var currentDate = getCurrentDate();
- var LastDate=currentDate.toDate().getAddDate(-1,"M").getDateFormat();
- var LastDateYM=LastDate.substr(0,6);
-
- model.setValue("/root/main/search/fromdd" ,LastDateYM );
- model.setValue("/root/main/search/todd" ,LastDateYM );
-
- var CurrentDateYY=currentDate.substring(0,4);
- model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
- model.makeValue("/root/main/search/toentryy",CurrentDateYY);
-
- // 그리드초기화
- model.removeNodeset(grd_list.nodeset);
-
- model.refresh();
- }
- /**========================================================================================================================================
- * 조회
- =========================================================================================================================================*/
- function fSearch(){
- //var fromdd = model.getValue("/root/main/search/fromdd") +"01";
- /*
- if (cmb_sumflag.value == "1")
- {
- var fromdd = model.getValue("/root/main/search/fromdd");
- var todd = model.getValue("/root/main/search/fromdd");
- }
- else if (cmb_sumflag.value == "2")
- {
- var fromdd = model.getValue("/root/main/search/fromdd");
- var todd = model.getValue("/root/main/search/fromdd");
- }
- else
- {
- var fromdd = model.getValue("/root/main/search/fromentryy");
- }
- */
-
- var fromdd = model.getValue("/root/main/search/fromdd");
- var todd = model.getValue("/root/main/search/todd");
- var fromentryy = model.getValue("/root/main/search/fromentryy");
- var toentryy = model.getValue("/root/main/search/toentryy");
-
- var frommonth = model.getValue("/root/main/search/fromdd") + "01";
- var tomonth = model.getValue("/root/main/search/todd") + "01";
- var fromyear = model.getValue("/root/main/search/fromentryy") + "0101";
- var toyear = model.getValue("/root/main/search/toentryy") + "0101";
-
-
- var ioflag = model.getValue("/root/main/search/ioflag");
- var flag = model.getValue("/root/main/search/flag");
-
- if (flag == "2")
- {
- //alert(fromentryy);
- //alert(toentryy);
- if( ! isValidDateTime( fromyear, 'YYYYMMDD') || ! isValidDateTime( toyear, 'YYYYMMDD') ){
- messageBox("입력하신 일자구분이 정확한 날짜타입이 아닙니다.", "I999", "");
- model.setFocus("ipt_fromentryy");
- return;
- }
-
- if( getDateInterval(fromyear, toyear) > 1825 ){
- messageBox("조회기간은 최대5년까지 할 수 있습니다.", "I999", "");
- model.setFocus("ipt_toentryy");
- return;
- }
- if( getDateInterval(fromyear, toyear) < 0 ){
- messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "I999", "");
- model.setFocus("ipt_fromentryy");
- return;
- }
- }
- else
- {
- if( ! isValidDateTime( fromdd, 'YYYYMM') || ! isValidDateTime(todd, 'YYYYMM') ){
- messageBox("입력하신 일자구분이 정확한 날짜타입이 아닙니다.", "I999", "");
- model.setFocus("ipt_fromdd");
- return;
- }
-
- if( getDateInterval(frommonth, tomonth) > 365 ){
- messageBox("조회기간은 최대1년까지 할 수 있습니다..", "I999", "");
- model.setFocus("ipt_todd");
- return;
- }
- if( getDateInterval(frommonth, tomonth) < 0 ){
- messageBox("일자구분에서 시작일자가 종료일자보다 미래일자 입니다. 확인하세요!", "I999", "");
- model.setFocus("ipt_fromdd");
- return;
- }
-
- }
-
- model.removeNodeset("/root/send/search");
-
- model.makeValue("/root/send/search/flag", flag);
- model.makeValue("/root/send/search/ioflag", ioflag);
-
- model.makeValue("/root/send/search/fromdd", fromdd);
- model.makeValue("/root/send/search/todd", todd);
- model.makeValue("/root/send/search/fromentryy", fromentryy);
- model.makeValue("/root/send/search/toentryy", toentryy);
-
- //grid merge
- /*
- grd_list.mergeCells = "bycolrec";
- grd_list.mergeCol(0) = true;
- grd_list.mergeCol(1) = true;
- grd_list.mergeCol(2) = false;
- grd_list.mergeCol(3) = false;
- grd_list.mergeCol(4) = false;
- grd_list.mergeCol(5) = false;
- grd_list.mergeCol(6) = false;
- grd_list.mergeCol(7) = false;
- grd_list.mergeCol(8) = false;
- grd_list.mergeCol(9) = false;
- grd_list.mergeCol(10) = false;
- grd_list.mergeCol(11) = false;
- grd_list.mergeCol(12) = false;
- */
-
- var achivflag = model.getValue("/root/main/search/achivflag");
- model.makeValue("/root/send/search/achivflag", achivflag);
-
- // 결정사항
- if (achivflag == "C1")
- {
- if (submit("TRSDT06701") == true)
- {
- var sumflag = model.getValue("/root/main/search/flag");
-
- if (sumflag == "1")
- {
- fGetDeciResult();
- }
-
- }
- else
- {
- messageBox("조회를", "E009");
- }
- }
- else
- {
- if (submit("TRSDT06702") == true)
- {
- var sumflag = model.getValue("/root/main/search/flag");
- if (sumflag == "1")
- {
- fGetExpsResult();
- }
- }
- else
- {
- messageBox("조회를", "E009");
- }
- }
- }
-
- function fGetDeciResult(){
- if(grd_list.rows - grd_list.fixedRows >1){
- var sStat = 0;
- var insRow = grd_list.rows;
- grd_list.addRow(insRow, false);
- grd_list.valueMatrix(insRow, grd_list.colRef("flagnm") ) = "전기간대비실적비교";
-
- for(var i= grd_list.colRef("contribpatcnt"); i<= grd_list.colRef("patamt"); i++){
- var bfResult = eval(grd_list.valueMatrix(insRow -1 , i));
- var sSum = eval(grd_list.valueMatrix(insRow-2, i));
-
- sStat = eval(sSum)- eval(bfResult) ;
- grd_list.valueMatrix(insRow, i ) = eval(sStat);
- //alert("sSum "+ sSum +"bfResult " + bfResult + "sStat " + sStat);
- }
- }else{
- model.removeNodeset("/root/main/deciinfo/decilist");
- }
- model.refresh();
- }
-
- function fGetExpsResult(){
- if(grd_exps.rows - grd_exps.fixedRows >1){
- var sStat = 0;
- var insRow = grd_exps.rows;
- grd_exps.addRow(insRow, false);
- grd_exps.valueMatrix(insRow, grd_exps.colRef("flagnm") ) = "전기간대비실적비교";
-
- for(var i= grd_exps.colRef("supppatcnt"); i<= grd_exps.colRef("suppamt"); i++){
- var bfResult = eval(grd_exps.valueMatrix(insRow -1 , i));
- var sSum = eval(grd_exps.valueMatrix(insRow-2, i));
-
- sStat = eval(sSum)- eval(bfResult) ;
- grd_exps.valueMatrix(insRow, i ) = eval(sStat);
- //alert("sSum "+ sSum +"bfResult " + bfResult + "sStat " + sStat);
- }
- }else{
- model.removeNodeset("/root/main/expsinfo/expslist");
- }
- model.refresh();
- }
- /**========================================================================================================================================
- * 엑셀저장 버튼 클릭시
- =========================================================================================================================================*/
- function fExcel() {
-
- var achivflag = model.getValue("/root/main/search/achivflag");
-
- if (achivflag == "C1")
- {
- if (grd_list.rows <= 3) {
- messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
- return;
- }
-
- var fileName = window.fileDialog("save", ",", false, "사회사업 기부금결정실적", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_list.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
-
- }
- else
- {
- if (grd_exps.rows <= 3) {
- messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
- return;
- }
-
- var fileName = window.fileDialog("save", ",", false, "사회사업 기부금지출실적", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_exps.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- }
-
-
- }
-
- function fComSelect()
- {
- var CurrentDate=getCurrentDate();
- if(cmb_sumflag.value=='1')
- {
- ipt_fromdd.visible=true;
- ipt_todd.visible=true;
- ipt_fromentryy.visible=false;
- ipt_toentryy.visible=false;
- cap1.visible=true;
- caption1.visible=true;
- caption2.visible=false;
-
- /*
- var CurrentDateYM=CurrentDate.substr(0,6);
-
- model.makeValue("/root/main/search/fromdd",CurrentDateYM);
- model.makeValue("/root/main/search/todd",CurrentDateYM);
-
- model.removeNodeset("/root/main/search/entryy");
- */
- }
- else
- {
- ipt_fromdd.visible=false;
- ipt_todd.visible=false;
- ipt_fromentryy.visible=true;
- ipt_toentryy.visible=true;
- cap1.visible=true;
- caption1.visible=false;
- caption2.visible=true;
-
- /*
- var CurrentDateYY=CurrentDate.substring(0,4);
- model.makeValue("/root/main/search/fromentryy",CurrentDateYY);
- model.makeValue("/root/main/search/toentryy",CurrentDateYY);
-
- model.removeNodeset("/root/main/search/fromdd");
- model.removeNodeset("/root/main/search/todd");
- */
- }
- //model.removeNodeset("/root/send/reqdata");
- //model.makeNode("/root/send/reqdata");
- model.refresh();
-
- }
-
- // 실적 구분
- function fAchivflagChagne(){
- // 접수환자실적 A1, 상담환자실적 A2
- if(rdo_achivflag.value == 'C1'){
- model.removeNodeset("/root/main/deciinfo/decilist");
- model.toggle("case1");
- //cmb_ioflag.choices.itemset.attribute("nodeset") = "/root/init/ioflag/A0563";
- cap_list.attribute("text") = "사회사업 기부금결정실적";
- cmb_ioflag.select(0);
-
- }else{
- model.removeNodeset("/root/main/expsinfo/expslist");
- model.toggle("case2");
- cmb_ioflag.select(0);
-
- //cmb_ioflag.choices.itemset.attribute("nodeset") = "/root/init/ioflag1/C0029";
- cap_list.attribute("text") = "사회사업 기부금지출실적";
- // 입원/외래
- //addComboItem("cmb_ioflag", "", "", "above");
- }
- model.refresh();
-
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:224px; height:14px; ">사회사업 기부금실적</caption>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <line id="line37" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- <button id="btn_search0" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInit();
- ]]>
- </script>
- </button>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <line id="line1" class="line_1" style="x1:0px; y1:73px; x2:1190px; y2:72px; "/>
- <group id="group4" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
- <line id="line2" style="x1:1113px; y1:7px; x2:1113px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="cap1" style="left:915px; top:8px; width:25px; height:20px; text-align:center; ">~</caption>
- <caption id="caption1" class="search_name" style="left:740px; top:10px; width:100px; height:17px; ">조회기간 :</caption>
- <caption id="caption2" class="search_name" style="left:739px; top:10px; width:100px; height:17px; ">조회년도:</caption>
- <caption id="caption23" class="search_name" style="left:515px; top:10px; width:86px; height:17px; ">조회구분 :</caption>
- <select1 id="cmb_ioflag" ref="/root/main/search/ioflag" navindex="1" appearance="minimal" style="left:390px; top:8px; width:85px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/ioflag1/C0029">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <select1 id="cmb_sumflag" ref="/root/main/search/flag" navindex="1" appearance="minimal" style="left:610px; top:8px; width:100px; 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[
- fComSelect();
- ]]>
- </script>
- </select1>
- <input id="ipt_fromdd" ref="/root/main/search/fromdd" class="input_search" inputtype="date" format="yyyy-mm" style="left:832px; top:8px; width:73px; height:19px; "/>
- <input id="ipt_todd" ref="/root/main/search/todd" class="input_search" inputtype="date" format="yyyy-mm" style="left:945px; top:8px; width:73px; height:19px; "/>
- <input id="ipt_fromentryy" ref="/root/main/search/fromentryy" class="input_search" inputtype="date" format="yyyy" style="left:832px; top:8px; width:58px; height:19px; "/>
- <input id="ipt_toentryy" ref="/root/main/search/toentryy" class="input_search" inputtype="date" format="yyyy" style="left:946px; top:8px; width:58px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:290px; top:10px; width:93px; height:17px; ">입원/외래 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="rdo_achivflag" ref="/root/main/search/achivflag" overflow="visible" appearance="full" cols="4" rows="1" style="left:30px; top:8px; width:245px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>기부금 결정실적</label>
- <value>C1</value>
- </item>
- <item>
- <label>기부금 지출실적</label>
- <value>C2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fAchivflagChagne();
- ]]>
- </script>
- </select1>
- </group>
- <button id="btn_excel" class="btn2_letter4" style="left:1127px; top:51px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExcel();
- ]]>
- </script>
- </button>
- <switch id="switch1" style="left:0px; top:75px; width:1195px; height:665px; ">
- <case id="case1" selected="true">
- <datagrid id="grd_list" nodeset="/root/main/deciinfo/decilist" class="datagrid1" caption="구분^기부자수^기부금액^기부자1인당
평균금액^사회사업
기부금 지원결정환자수^사회사업
기부금 결정액^환자1인당
기부금 결정액|구분^기부자수^기부금액^기부자1인당
평균금액^사회사업
기부금 지원결정환자수^사회사업
기부금 결정액^환자1인당
기부금 결정액" colsep="^" colwidth="200, 150, 150, 150, 150, 150, 150" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:0px; width:1193px; height:663px; text-align:center; ">
- <col ref="flagnm" style="text-align:center; "/>
- <col ref="contribpatcnt" format="(-)#,###" style="text-align:center; "/>
- <col ref="contribamt" format="(-)#,###" style="text-align:center; "/>
- <col ref="contribpatamt" format="(-)#,###" style="text-align:center; "/>
- <col ref="decipatcnt" format="(-)#,###" style="text-align:center; "/>
- <col ref="deciamt" format="(-)#,###" style="text-align:center; "/>
- <col ref="patamt" format="(-)#,###" style="text-align:center; "/>
- </datagrid>
- </case>
- <case id="case2">
- <datagrid id="grd_exps" nodeset="/root/main/expsinfo/expslist" class="datagrid1" caption="구분^사회사업
기부금 지원환자수^사회사업
기부금 지출액|구분^사회사업
기부금 지원환자수^사회사업
기부금 지출액" colsep="^" colwidth="230, 230, 230" dataheight="25" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:0px; width:1193px; height:663px; text-align:center; ">
- <col ref="flagnm" style="text-align:center; "/>
- <col ref="supppatcnt" format="(-)#,###" style="text-align:center; "/>
- <col ref="suppamt" format="(-)#,###" style="text-align:center; "/>
- </datagrid>
- </case>
- </switch>
- <caption id="cap_list" class="tit_2" style="left:0px; top:55px; width:217px; height:14px; ">사회사업 기부금실적</caption>
- </group>
- </xhtml:body>
- </xhtml:html>
|