123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <?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/>
- <send>
- </send>
- <sendcard>
- <cardinput>
- <cardnumber/>
- <cardperiod/>
- <cmbcarddivide>00</cmbcarddivide>
- <carddivide/>
- <publishbank/>
- <incomeamt/>
- <entrymode>S</entrymode>
- </cardinput>
- <aprvdd/>
- <aprvtm/>
- <aprvno/>
- </sendcard>
- <init>
- <initlst>
- <P0076list/>
- </initlst>
- </init>
- <hidden>
- <session/>
- </hidden>
- <tmp>
- <appvanif/>
- </tmp>
- </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/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TXPAC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmp"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit(); //초기화
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fInit(){
- fGetUserInfosSampling();
-
- //카드사 리스트를 가져온다
- zbcfGetCodeList(new Array("P0076"), new Array("/root/init/initlst/P0076list"));
- var srchFlag = opener.javascript.getParameter("SPAHA02300_SRCHFLAG");
- model.makeValue("/root/send/cmpycd",opener.javascript.getParameter("SPAHA02300_CMPYCD"));
- if(srchFlag == "Y") {
- fSetCardInfo();
- }else {
- //할부개월
- ipt_allotmm.value = cmb_allotmm.value;
- //입금액 등록
- ipt_cardamt.value = opener.javascript.getParameter("SPAHA02300_INCOMEAMT");
- //카드번호에 포커스이동
- model.setFocus("ipt_cardno");
- }
- }
-
- function fSetCardInfo(){
- rdo_entrymode.value = model.getValue("/root/tmp/keyinptflag"); //입력구분
- ipt_cardno.value = model.getValue("/root/tmp/cardno"); //카드번호
- var valiTerm = model.getValue("/root/tmp/valiterm");
- if(valiTerm == "") {
- fGetCardValiTerm();
- }else {
- ipt_valiterm.value = valiTerm; //유효기간
- }
- cmb_allotmm.value = model.getValue("/root/tmp/allotmm"); //할부개월
- ipt_allotmm.value = cmb_allotmm.value ;
- cmb_cardcmpy.value = model.getValue("/root/tmp/cardcmpycd"); //카드회사
- ipt_cardamt.value = model.getValue("/root/tmp/cardamt"); //카드금액
- ipt_aprvdd.value = model.getValue("/root/tmp/aprvdd"); //승인일자
- ipt_aprvtm.value = model.getValue("/root/tmp/aprvtm"); //승인시간
- ipt_aprvno.value = model.getValue("/root/tmp/aprvno"); //승인번호
- btn_init.disabled = true;
- }
-
- function fGetUserInfosSampling(){
- var sUserInfosS = getUserInfos();
- sUserInfosS = sUserInfosS + "|";
- var UserInfosS_Array = sUserInfosS.split("|");
-
- var userid = UserInfosS_Array[0]; //사용자번호
- var usernm = UserInfosS_Array[1]; //사용자이름
- var posinstcd = UserInfosS_Array[2]; //소속기관코드
- var posinstnm = UserInfosS_Array[3]; //소속기관명
- var posdeptcd = UserInfosS_Array[4]; //소속부서코드
- var posdeptnm = UserInfosS_Array[5]; //소속부서명
-
- model.makeNode("/root/hidden1/session/" + "userid");
- model.makeNode("/root/hidden1/session/" + "usernm");
- model.makeNode("/root/hidden1/session/" + "posinstcd");
- model.makeNode("/root/hidden1/session/" + "posinstnm");
- model.makeNode("/root/hidden1/session/" + "posdeptcd");
- model.makeNode("/root/hidden1/session/" + "posdeptnm")
-
- if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
- if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
-
- model.setValue("/root/hidden1/session/userid" , userid);
- model.setValue("/root/hidden1/session/usernm" , usernm);
- model.setValue("/root/hidden1/session/posinstcd" , posinstcd);
- model.setValue("/root/hidden1/session/posinstnm" , posinstnm);
- model.setValue("/root/hidden1/session/posdeptcd" , posdeptcd);
- model.setValue("/root/hidden1/session/posdeptnm" , posdeptnm);
- model.refresh();
- }
-
- function fCardCnfm(){
- if("" == model.getValue("/root/sendcard/cardinput/cardnusmber")){
- messageBox("카드번호는 필수 입력항목입니다.", "E999", "");
- return;
- }
- //유효기간체크
- if("" == model.getValue("/root/sendcard/cardinput/cardperiod")){
- messageBox("유효기간는 필수 입력항목입니다.", "E999", "");
- return;
- }
- //할부개월 체크
- if("" == model.getValue("/root/sendcard/cardinput/carddivide")){
- messageBox("할부개월는 필수 입력항목입니다.", "E999", "");
- return;
- }
- //결제금액 체크
- if("" == model.getValue("/root/sendcard/cardinput/incomeamt")){
- messageBox("결제금액는 필수 입력항목입니다.", "E999", "");
- return;
- }
- var sdata10 = "";
- var sdata11 = "";
-
- var limitAmt = parseInt(opener.javascript.getParameter("SPAHA02300_LIMITAMT"));
- var selRow = parseInt(opener.javascript.getParameter("SPAHA02300_SELROW"));
- var incomeAmt = parseInt(model.getValue("/root/sendcard/cardinput/incomeamt"));
- if(limitAmt >= incomeAmt){
- if("S" == model.getValue("/root/sendcard/cardinput/entrymode")){
- var cardNo = model.getValue("/root/sendcard/cardinput/cardnumber").split('=');
- sdata10 = cardNo[0].replace(/[^0-9]/,"") + "=" + cardNo[1].replace(/[^0-9]/,"");
- sdata11 = cardNo[0].replace(/[^0-9]/,"");
- }else {
- sdata10 = "";
- sdata11 = model.getValue("/root/sendcard/cardinput/cardnumber");
- }
- }else {
- messageBox("입금액이 없습니다.","E");
- return;
- }
- fAppCardVanData("01" //data1 //vangb van사구분
- ,"11" //data2 //ordergb 거래구분
- ,getCurrentDate() //data3 //mdate 회계일자
- ,model.getValue("/root/send/cmpycd") //data4 //pano 등록번호
- ,"H" //data5 //iogb 입외구분
- ,model.getValue("/root/hidden1/session/posdeptcd") //data6 //deptcode 진료과코드
- ,getCurrentDate() //data7 //diagdate 진료일자
- // ,getCurrentDate()
- ,model.getValue("/root/hidden1/session/userid") //data8 //clientid 수납자
- ,model.getValue("/root/sendcard/cardinput/entrymode") //data9 //entrymode 입력구분
- ,sdata10 //data10 //track2data 트랙data
- ,sdata11 //data11 //cardnumber 카드번호
- ,model.getValue("/root/sendcard/cardinput/cardperiod") //data12 //cardperiod 유효기간
- ,model.getValue("/root/sendcard/cardinput/carddivide") //data13 //carddivide 할부개월수
- ,model.getValue("/root/sendcard/cardinput/incomeamt") //data14 //netamt 금액
- ,"" //data15 //oldappdate 원거래승인일자(취소시)
- ,"" //data16 //oldapptime 원거래승인시간(취소시)
- ,"" //data17 //oldappno 원거래승인번호(취소시)
- );
- if(model.getValue("/root/tmp/appvanif/replystat") != "0000"){
- messageBox("카드승인실패 => "+ model.getValue("/root/tmp/appvanif/cardname") ,"E999","");
- opener.javascript.setParameter("SPAHA02300_APRVFLAG","N");
- return;
- }else{
- //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvno", model.getValue("/root/tmp/appvanif/approvalno"));
- //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvdd", model.getValue("/root/tmp/appvanif/approvaldate"));
- //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvtm", model.getValue("/root/tmp/appvanif/approvaltime"));
- //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvflag", "12");
- //전자서명 처리
- var parm = model.getValue("/root/send/cmpycd") + "▦" + //PID
- model.getValue("/root/sendcard/cardinput/incomeamt") + "▦" + //수납대상금액
- "12" + "▦" + //승인구분
- model.getValue("/root/tmp/appvanif/approvaldate") + "▦" + //승인일자
- model.getValue("/root/tmp/appvanif/approvaltime") + "▦" + //승인시간
- model.getValue("/root/tmp/appvanif/approvalno") + "▦" + //승인번호
- model.getValue("/root/hidden1/session/posinstcd") + "▦" //기관코드
- ;
- setParameter("SPPAO02101_PARM", parm);
- modal("../../../pam/pamcomnweb/xrw/SPPAO02101", "1","400", "400", "SPPAO02101", "", "");
- opener.javascript.setParameter("SPAHA02300_APRVFLAG","Y");
-
- if(model.getValue("/root/sendcard/cardinput/entrymode") == "S") {
- model.makeValue("/root/tmp/appvanif/cardnumber" , sdata10);
- }else {
- model.makeValue("/root/tmp/appvanif/cardnumber" , sdata11);
- }
- model.makeValue("/root/tmp/appvanif/entrymode" , model.getValue("/root/sendcard/cardinput/entrymode"));
- model.makeValue("/root/tmp/appvanif/allotmm" , model.getValue("/root/sendcard/cardinput/cmbcarddivide"));
- model.makeValue("/root/tmp/appvanif/valiterm" , model.getValue("/root/sendcard/cardinput/cardperiod"));
- model.makeValue("/root/tmp/appvanif/cardcmpycd" , model.getValue("/root/sendcard/cardinput/publishbank"));
- model.makeValue("/root/tmp/appvanif/incomeamt" , model.getValue("/root/sendcard/cardinput/incomeamt"));
- parent.model.makeNode("/root/hidden/cardaprv");
- copyNodesetType("/root/hidden/cardaprv", "/root/tmp/appvanif", "replace", parent.model, model);
-
- //전자서명에 실패하더라도, 카드승인을 받았기 때문에, Continue
- //if (getParameter("SPPAO02101_RTN") == "N" || getParameter("SPPAO02101_RTN") == "") return;
- }
- }
-
- function fGetCardValiTerm() {
- if("S" == rdo_entrymode.value) {
- var cardno = ipt_cardno.value
- for(var i=0;i<cardno.length;i++) {
- if("=" == cardno.charAt(i)) {
- ipt_valiterm.value = cardno.substring(i+1,i+5);
- }
- }
- }
- }
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body pagewidth="726" pageheight="140" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:120px; height:110px; ">
- <caption id="caption5" class="tit_2" style="left:5px; top:15px; width:111px; height:13px; ">입력구분</caption>
- <select1 id="rdo_entrymode" ref="/root/sendcard/cardinput/entrymode" appearance="full" vcellspacing="5" overflow="visible" style="left:10px; top:40px; width:100px; height:40px; border-style:none; ">
- <choices>
- <item>
- <label>Swipe</label>
- <value>S</value>
- </item>
- <item>
- <label>Key-In</label>
- <value>K</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- model.setFocus("ipt_cardno");
- ]]>
- </script>
- </select1>
- <shape id="rec_keyinptflag" class="roundrect_example" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:5px; top:33px; width:110px; height:76px; "/>
- </group>
- <group id="group2" style="left:120px; top:1px; width:590px; height:109px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:15px; width:111px; height:14px; ">카드입금</caption>
- <line id="line3" class="line_2" style="x1:0px; y1:57px; x2:590px; y2:57px; "/>
- <line id="line12" class="line_1" style="x1:0px; y1:30px; x2:590px; y2:30px; "/>
- <line id="line1" class="line_2" style="x1:0px; y1:81px; x2:590px; y2:81px; "/>
- <line id="line2" class="line_3" style="x1:0px; y1:106px; x2:590px; y2:106px; "/>
- <caption id="caption2" class="cell_1" style="left:0px; top:35px; width:60px; height:23px; vertical-align:middle; ">카드번호</caption>
- <caption id="caption3" class="cell_1" style="left:0px; top:83px; width:60px; height:23px; vertical-align:middle; ">할부개월</caption>
- <caption id="caption6" class="cell_1" style="left:0px; top:59px; width:60px; height:23px; vertical-align:middle; ">유효기간</caption>
- <caption id="caption7" class="cell_1" style="left:218px; top:59px; width:110px; height:23px; vertical-align:middle; ">결제금액</caption>
- <caption id="caption4" style="left:113px; top:59px; width:65px; height:23px; vertical-align:middle; ">(YY/MM)</caption>
- <input id="ipt_cardno" ref="/root/sendcard/cardinput/cardnumber" class="input_default" style="left:63px; top:36px; width:152px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fGetCardValiTerm();
- ]]>
- </script>
- </input>
- <input id="ipt_valiterm" ref="/root/sendcard/cardinput/cardperiod" class="input_default" maxlength="4" format="99/99" style="left:63px; top:60px; width:47px; height:19px; "/>
- <select1 id="cmb_allotmm" ref="/root/sendcard/cardinput/cmbcarddivide" class="combo_default" appearance="minimal" style="left:63px; top:85px; width:109px; height:19px; ">
- <choices>
- <item>
- <label>일시불</label>
- <value>00</value>
- </item>
- <item>
- <label>1개월</label>
- <value>01</value>
- </item>
- <item>
- <label>2개월</label>
- <value>02</value>
- </item>
- <item>
- <label>3개월</label>
- <value>03</value>
- </item>
- <item>
- <label>4개월</label>
- <value>04</value>
- </item>
- <item>
- <label>5개월</label>
- <value>05</value>
- </item>
- <item>
- <label>6개월</label>
- <value>06</value>
- </item>
- <item>
- <label>7개월</label>
- <value>07</value>
- </item>
- <item>
- <label>8개월</label>
- <value>08</value>
- </item>
- <item>
- <label>9개월</label>
- <value>09</value>
- </item>
- <item>
- <label>10개월</label>
- <value>10</value>
- </item>
- <item>
- <label>11개월</label>
- <value>11</value>
- </item>
- <item>
- <label>12개월</label>
- <value>12</value>
- </item>
- <item>
- <label>13개월</label>
- <value>13</value>
- </item>
- <item>
- <label>14개월</label>
- <value>14</value>
- </item>
- <item>
- <label>15개월</label>
- <value>15</value>
- </item>
- <item>
- <label>16개월</label>
- <value>16</value>
- </item>
- <item>
- <label>17개월</label>
- <value>17</value>
- </item>
- <item>
- <label>18개월</label>
- <value>18</value>
- </item>
- <item>
- <label>19개월</label>
- <value>19</value>
- </item>
- <item>
- <label>20개월</label>
- <value>20</value>
- </item>
- <item>
- <label>21개월</label>
- <value>21</value>
- </item>
- <item>
- <label>22개월</label>
- <value>22</value>
- </item>
- <item>
- <label>23개월</label>
- <value>23</value>
- </item>
- <item>
- <label>24개월</label>
- <value>24</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- ipt_allotmm.value = cmb_allotmm.value;
- ]]>
- </script>
- </select1>
- <input id="ipt_allotmm" ref="/root/sendcard/cardinput/carddivide" class="input_default" maxlength="2" format="99" style="left:175px; top:85px; width:40px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- cmb_allotmm.value = ipt_allotmm.value;
- ]]>
- </script>
- </input>
- <input id="ipt_cardamt" ref="/root/sendcard/cardinput/incomeamt" class="input_default" disabled="true" maxlength="10" format="#,###" style="left:331px; top:61px; width:121px; height:19px; text-align:right; "/>
- <caption id="caption11" class="cell_1" style="left:218px; top:35px; width:110px; height:23px; vertical-align:middle; ">카드회사</caption>
- <select1 id="cmb_cardcmpy" ref="/root/sendcard/cardinput/publishbank" appearance="minimal" style="left:331px; top:36px; width:257px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/initlst/P0076list/P0076">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption10" class="cell_1" style="left:218px; top:83px; width:110px; height:23px; vertical-align:middle; ">승인일시/승인번호</caption>
- <input id="ipt_aprvdd" ref="/root/sendcard/aprvdd" disabled="true" maxlength="8" format="yyyy-mm-dd" style="left:331px; top:84px; width:69px; height:19px; "/>
- <input id="ipt_aprvtm" ref="/root/sendcard/aprvtm" disabled="true" maxlength="6" format="hh:nn:ss" style="left:403px; top:84px; width:59px; height:19px; "/>
- <input id="ipt_aprvno" ref="/root/sendcard/aprvno" disabled="true" maxlength="30" style="left:465px; top:84px; width:123px; height:19px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:109px; width:710px; height:27px; ">
- <button id="btn_cancel" class="btn4_letter2" style="left:654px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(checkOpener()) {
- window.close();
- }
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:595px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(checkOpener()) {
- var srchFlag = opener.javascript.getParameter("SPAHA02300_SRCHFLAG");
- if(srchFlag == "Y"){
-
- }else{
- fCardCnfm();
- }
- window.close();
- }
- ]]>
- </script>
- </button>
- <button id="btn_init" class="btn4_letter3" style="left:524px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.reset();
- model.setFocus("ipt_cardno");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|