123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMLBD01500_DM발송관리.xrw
- * 설 명 : DM발송관리
- * 설 계 자 : (주)에이씨케이 -
- * 작 성 자 : (주)에이씨케이 - 박정은
- * 작 성 일 : 2007.12.10
- * 수정이력 :
- * 기 타 :
- -->
- <?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>DM발송관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <dmdelivery>
- <chk/>
- <dnorno/>
- <dnornm/>
- <prcpdd/>
- <lastupdtrid/>
- <homezip/>
- <homeaddr/>
- <refflag/>
- <dmdeliveyn/>
- <dmnotdeliveresn/>
- <dnorseqno/>
- <tnsrpid/>
- <execprcpuniqno/>
- <rrgstno/>
- <refresndesc/>
- </dmdelivery>
- <report>
- <dmrslt>
- <tnsrpid/>
- <dnornm/>
- <homeaddr/>
- <homedetladdr/>
- <hz11/>
- <hz12/>
- <hz13/>
- <hz21/>
- <hz22/>
- <hz23/>
- <lbr101/>
- <lbr102/>
- <lir107/>
- <lir120/>
- <lir123/>
- <lir122/>
- <lhr117/>
- <lcr118/>
- <lcr119/>
- <lhr100/>
- <lhr102/>
- <lhr104/>
- <prcpdd/>
- <refflag/>
- <refresndesc/>
- </dmrslt>
- </report>
- </main>
- <send>
- <refgbn/>
- <fromdd/>
- <todd/>
- <dnornm/>
- <dmyn/>
- <grddata/>
- <pid/>
- <dnorno/>
- <dnorseqno/>
- <uniqno/>
- </send>
- <init>
- </init>
- <hidden>
- <ref>
- <refgbn>1</refgbn>
- <fromdd/>
- <todd/>
- <dnornm/>
- <dmyn>0</dmyn>
- </ref>
- <prtflag/>
- </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/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fSetInit();
- ]]>
- </script>
- <script type="javascript" ev:event="onPrintFinished">
- <![CDATA[
- //개별출력일때 출력버튼 클릭했을때만 발송여부 상태 바꾸기 위해 추가함 _20080902_ 승현
- var prtflag = model.getValue("/root/hidden/prtflag"); //출력구분 1: 개별출력
- if(prtflag == "1"){
- for(i=1; i< grd_dm.rows; i++){
- if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
- model.setValue("/root/main/dmdelivery["+i+"]/dmdeliveyn", "Y");
- grd_dm.rowStatus(i) = 2; // 2= update
- }
- }
- model.setValue("/root/hidden/prtflag", ""); //출력구분 초기화
- fExeDMDelivery();
- }
- ]]>
- </script>
- <submission id="TRLBD01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/dmdelivery"/>
- <submission id="TXLBD01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance"/>
- <submission id="TRLBD01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/report/dmrslt"/>
- </model>
- <script type="javascript">
- <![CDATA[
-
- // 초기화
- function fSetInit(){
- var tDay = getCurrentDate();
- var mDate = getCurrentDate().toDate("YYYYMMDD").getAddDate(-7);
-
- model.setValue("/root/hidden/ref/fromdd", mDate.getDateFormat("YYYYMMDD"));
- model.setValue("/root/hidden/ref/todd", tDay);
-
- fSetRefGbn();
-
- grd_dm.fixedcellcheckbox(0, 1) = true;
- model.removeNodeset("/root/main/dmdelivery");
- grd_dm.rebuild();
-
- model.refresh();
- }
-
- // 조회구분에따라서 변경
- function fSetRefGbn(){
-
- if(model.getValue("/root/hidden/ref/refgbn")=="1"){
- grp_dt.visible = true;
- grp_nm.visible = false;
- }else{
- grp_dt.visible = false;
- grp_nm.visible = true;
- }
-
- }
-
- //조회버튼
- function fGetDMDelivery(){
-
- model.setValue("/root/send/refgbn", model.getValue("/root/hidden/ref/refgbn"));
- model.setValue("/root/send/fromdd", model.getValue("/root/hidden/ref/fromdd"));
- model.setValue("/root/send/todd", model.getValue("/root/hidden/ref/todd"));
- model.setValue("/root/send/dnornm", model.getValue("/root/hidden/ref/dnornm"));
- model.setValue("/root/send/dmyn", model.getValue("/root/hidden/ref/dmyn"));
-
- submit("TRLBD01501");
-
- }
-
- // 엑셀 저장
- function fExeExcel(pGridId) {
-
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != "")
- {
- pGridId.saveExcel(fileName);
- }
-
- }
-
- // 저장버튼
- function fExeDMDelivery(){
-
- var grddata = getGridUpdateData(grd_dm);
-
- model.setValue("/root/send/grddata", grddata);
-
- submit("TXLBD01501");
-
- fGetDMDelivery();
- }
-
-
- // 그리드 내용 변경시 iud 변경
- function fSetGrdStat(){
- if(model.getValue("/root/main/dmdelivery["+grd_dm.row+"]/chk") == "Y"){
- grd_dm.rowstatus(grd_dm.row) = 2;
- }else{
- grd_dm.rowstatus(grd_dm.row) = 0;
- }
-
- }
-
- // 대장출력
- function fPrintDMList(){
- model.removeNodeset("/root/hidden/report");
- var newrow = 1;
-
- for(i=1; i< grd_dm.rows; i++){
-
- if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
- model.makeNode("/root/hidden/report/dmlist["+newrow+"]");
- copyNodeType("/root/hidden/report/dmlist["+newrow+"]", "/root/main/dmdelivery["+i+"]");
-
- newrow ++;
-
- }
- }
- if(newrow < 2){
- messageBox("출력할", "E013");
- return;
- }
- exeReportPreview("RPLBP01501", "XMLSTR" );
-
- }
-
-
- // 개별출력
- function fPrint(){
-
- model.removeNodeset("/root/main/report/dmrslt");
-
- var uniqnoList = "";
- var uniqnoList2 = "";
- for(i=1; i< grd_dm.rows; i++){
- if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
- uniqnoList += "," + model.getValue("/root/main/dmdelivery["+i+"]/execprcpuniqno");
- }
- }
-
- if(uniqnoList == ""){
- messageBox("출력할", "E013");
- return;
- }
-
- uniqnoList2 = uniqnoList.substr(1, uniqnoList.length);
- model.setValue("/root/send/uniqno", uniqnoList2);
-
- submit("TRLBD01502");
-
- model.setValue("/root/hidden/prtflag", "1"); // 출력 구분 개별출력_20080902_승현 추가
- //alert(model.getValue("/root/main/report/dmrslt[" + 1 + "]/refresndesc"));
- //exeReportPreview("RPLBP01502", "XMLSTR");// 2장으로 나뉜거
- exeReportPreview("RPLBP01503", "XMLSTR"); // 1장에 출력
-
- //↓개별출력일때만 발송여부 발송 상태로 바꾸기 위해 onSaveFinished 이벤트로 보냄 20080902_승현 추가
- /*for(i=1; i< grd_dm.rows; i++){
- if(model.getValue("/root/main/dmdelivery["+i+"]/chk")=="Y"){
- model.setValue("/root/main/dmdelivery["+i+"]/dmdeliveyn", "Y");
- grd_dm.rowStatus(i) = 2; // 2= update
- }
- }
- fExeDMDelivery();
- */
- }
-
- // 엔터키 이벤트
- function fKeyEvent(){
-
- if(event.keyCode == "13"){
-
- if(event.target=="ipt_don"){
- model.setValue("/root/hidden/ref/dnornm", (ipt_don.currentText).toUpperCase());
-
- fGetDMDelivery();
-
- ipt_don.selBegin = 0;
- ipt_don.selEnd = ipt_don.currentText.length;
- }
- }
- }
- ]]>
- </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:131px; height:14px; ">DM발송 대상자</caption>
- <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:1195px; height:35px; "/>
- <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[
- fGetDMDelivery();
- ]]>
- </script>
- </button>
- <line id="line11" class="line_4" style="x1:1108px; y1:6px; x2:1108px; y2:28px; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
- <select1 id="cmb_srchflag" ref="/root/hidden/ref/dmyn" class="combo_search" appearance="minimal" style="left:880px; top:8px; width:110px; height:19px; ">
- <choices>
- <item>
- <label>-전 체-</label>
- <value>0</value>
- </item>
- <item>
- <label>미발송</label>
- <value>N</value>
- </item>
- <item>
- <label>발 송</label>
- <value>Y</value>
- </item>
- </choices>
- </select1>
- <caption id="caption4" class="search_name" style="left:767px; top:9px; width:107px; height:17px; ">DM발송여부 :</caption>
- <select1 id="radio1" ref="/root/hidden/ref/refgbn" appearance="full" cellspacing="20" cols="2" overflow="visible" style="left:105px; top:9px; width:160px; height:15px; border-style:none; ">
- <choices>
- <item>
- <label>검사일자</label>
- <value>1</value>
- </item>
- <item>
- <label>공여자명</label>
- <value>2</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fSetRefGbn();
- ]]>
- </script>
- </select1>
- <group id="grp_dt" visibility="visible" style="left:285px; top:3px; width:208px; height:30px; color:transparent; background-color:#fffbf2; ">
- <input id="input8" ref="/root/hidden/ref/fromdd" class="input_s_essential" inputtype="date" style="left:5px; top:5px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
- <input id="input9" ref="/root/hidden/ref/todd" class="input_s_essential" inputtype="date" style="left:113px; top:5px; width:90px; height:19px; background-image:../../../com/commonweb/images/input_s_essential.gif; "/>
- <caption id="caption11" class="search_n_b" style="left:98px; top:6px; width:12px; height:17px; font-weight:bolder; ">~</caption>
- </group>
- <group id="grp_nm" style="left:285px; top:3px; width:208px; height:30px; color:transparent; background-color:#fffbf2; ">
- <input id="ipt_don" ref="/root/hidden/ref/dnornm" class="input_search" style="left:5px; top:5px; width:198px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- fKeyEvent();
- ]]>
- </script>
- </input>
- </group>
- </group>
- <button id="btn_rowadd" class="btn2_letter4" style="left:1130px; top:49px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeExcel(grd_dm);
- ]]>
- </script>
- </button>
- <datagrid id="grd_dm" nodeset="/root/main/dmdelivery" caption="^공여자명^공여자 주민번호^검사일자^판정의^우편번호^주소^적합여부^부적합사유^발송여부^미발송사유^tnsrpid^uniqno^dnorno^dnorseqno" colwidth="32, 75, 94, 80, 80, 70, 280, 70, 150, 70, 150, 0, 0, 0, 0" dataheight="23" defaultrows="1" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:669px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="dnornm"/>
- <col ref="rrgstno"/>
- <col ref="prcpdd" format="yyyy-mm-dd"/>
- <col ref="lastupdtrid"/>
- <col ref="homezip"/>
- <col ref="homeaddr"/>
- <col ref="refflag"/>
- <col ref="refresndesc"/>
- <col ref="dmdeliveyn" type="combo">
- <choices>
- <item>
- <label>미발송</label>
- <value>N</value>
- </item>
- <item>
- <label>발 송</label>
- <value>Y</value>
- </item>
- </choices>
- </col>
- <col ref="dmnotdeliveresn" type="input"/>
- <col ref="tnsrpid" visibility="hidden"/>
- <col ref="execprcpuniqno" visibility="hidden"/>
- <col ref="dnorno" visibility="hidden"/>
- <col ref="dnorseqno" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSetGrdStat();
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_dm.gridToInstance();
- ]]>
- </script>
- </datagrid>
- </group>
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">DM 발송 관리</caption>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetInit();
-
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fExeDMDelivery();
- ]]>
- </script>
- </button>
- <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_print" class="btn6_letter4" style="left:0px; top:3px; width:72px; height:22px; ">
- <caption>개별출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrint();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn6_letter4" style="left:83px; top:3px; width:80px; height:22px; ">
- <caption>대장출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fPrintDMList();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|