SPAHA02300_미수카드승인.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>미수카드승인</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main/>
  10. <send>
  11. </send>
  12. <sendcard>
  13. <cardinput>
  14. <cardnumber/>
  15. <cardperiod/>
  16. <cmbcarddivide>00</cmbcarddivide>
  17. <carddivide/>
  18. <publishbank/>
  19. <incomeamt/>
  20. <entrymode>S</entrymode>
  21. </cardinput>
  22. <aprvdd/>
  23. <aprvtm/>
  24. <aprvno/>
  25. </sendcard>
  26. <init>
  27. <initlst>
  28. <P0076list/>
  29. </initlst>
  30. </init>
  31. <hidden>
  32. <session/>
  33. </hidden>
  34. <tmp>
  35. <appvanif/>
  36. </tmp>
  37. </root>
  38. </instance>
  39. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  40. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  43. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  44. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  45. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  46. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  47. <submission id="TXPAC00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/tmp"/>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fInit(); //초기화
  51. model.refresh();
  52. ]]>
  53. </script>
  54. <script type="javascript">
  55. <![CDATA[
  56. function fInit(){
  57. fGetUserInfosSampling();
  58. //카드사 리스트를 가져온다
  59. zbcfGetCodeList(new Array("P0076"), new Array("/root/init/initlst/P0076list"));
  60. var srchFlag = opener.javascript.getParameter("SPAHA02300_SRCHFLAG");
  61. model.makeValue("/root/send/cmpycd",opener.javascript.getParameter("SPAHA02300_CMPYCD"));
  62. if(srchFlag == "Y") {
  63. fSetCardInfo();
  64. }else {
  65. //할부개월
  66. ipt_allotmm.value = cmb_allotmm.value;
  67. //입금액 등록
  68. ipt_cardamt.value = opener.javascript.getParameter("SPAHA02300_INCOMEAMT");
  69. //카드번호에 포커스이동
  70. model.setFocus("ipt_cardno");
  71. }
  72. }
  73. function fSetCardInfo(){
  74. rdo_entrymode.value = model.getValue("/root/tmp/keyinptflag"); //입력구분
  75. ipt_cardno.value = model.getValue("/root/tmp/cardno"); //카드번호
  76. var valiTerm = model.getValue("/root/tmp/valiterm");
  77. if(valiTerm == "") {
  78. fGetCardValiTerm();
  79. }else {
  80. ipt_valiterm.value = valiTerm; //유효기간
  81. }
  82. cmb_allotmm.value = model.getValue("/root/tmp/allotmm"); //할부개월
  83. ipt_allotmm.value = cmb_allotmm.value ;
  84. cmb_cardcmpy.value = model.getValue("/root/tmp/cardcmpycd"); //카드회사
  85. ipt_cardamt.value = model.getValue("/root/tmp/cardamt"); //카드금액
  86. ipt_aprvdd.value = model.getValue("/root/tmp/aprvdd"); //승인일자
  87. ipt_aprvtm.value = model.getValue("/root/tmp/aprvtm"); //승인시간
  88. ipt_aprvno.value = model.getValue("/root/tmp/aprvno"); //승인번호
  89. btn_init.disabled = true;
  90. }
  91. function fGetUserInfosSampling(){
  92. var sUserInfosS = getUserInfos();
  93. sUserInfosS = sUserInfosS + "|";
  94. var UserInfosS_Array = sUserInfosS.split("|");
  95. var userid = UserInfosS_Array[0]; //사용자번호
  96. var usernm = UserInfosS_Array[1]; //사용자이름
  97. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  98. var posinstnm = UserInfosS_Array[3]; //소속기관명
  99. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  100. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  101. model.makeNode("/root/hidden1/session/" + "userid");
  102. model.makeNode("/root/hidden1/session/" + "usernm");
  103. model.makeNode("/root/hidden1/session/" + "posinstcd");
  104. model.makeNode("/root/hidden1/session/" + "posinstnm");
  105. model.makeNode("/root/hidden1/session/" + "posdeptcd");
  106. model.makeNode("/root/hidden1/session/" + "posdeptnm")
  107. if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
  108. if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "012";
  109. model.setValue("/root/hidden1/session/userid" , userid);
  110. model.setValue("/root/hidden1/session/usernm" , usernm);
  111. model.setValue("/root/hidden1/session/posinstcd" , posinstcd);
  112. model.setValue("/root/hidden1/session/posinstnm" , posinstnm);
  113. model.setValue("/root/hidden1/session/posdeptcd" , posdeptcd);
  114. model.setValue("/root/hidden1/session/posdeptnm" , posdeptnm);
  115. model.refresh();
  116. }
  117. function fCardCnfm(){
  118. if("" == model.getValue("/root/sendcard/cardinput/cardnusmber")){
  119. messageBox("카드번호는 필수 입력항목입니다.", "E999", "");
  120. return;
  121. }
  122. //유효기간체크
  123. if("" == model.getValue("/root/sendcard/cardinput/cardperiod")){
  124. messageBox("유효기간는 필수 입력항목입니다.", "E999", "");
  125. return;
  126. }
  127. //할부개월 체크
  128. if("" == model.getValue("/root/sendcard/cardinput/carddivide")){
  129. messageBox("할부개월는 필수 입력항목입니다.", "E999", "");
  130. return;
  131. }
  132. //결제금액 체크
  133. if("" == model.getValue("/root/sendcard/cardinput/incomeamt")){
  134. messageBox("결제금액는 필수 입력항목입니다.", "E999", "");
  135. return;
  136. }
  137. var sdata10 = "";
  138. var sdata11 = "";
  139. var limitAmt = parseInt(opener.javascript.getParameter("SPAHA02300_LIMITAMT"));
  140. var selRow = parseInt(opener.javascript.getParameter("SPAHA02300_SELROW"));
  141. var incomeAmt = parseInt(model.getValue("/root/sendcard/cardinput/incomeamt"));
  142. if(limitAmt >= incomeAmt){
  143. if("S" == model.getValue("/root/sendcard/cardinput/entrymode")){
  144. var cardNo = model.getValue("/root/sendcard/cardinput/cardnumber").split('=');
  145. sdata10 = cardNo[0].replace(/[^0-9]/,"") + "=" + cardNo[1].replace(/[^0-9]/,"");
  146. sdata11 = cardNo[0].replace(/[^0-9]/,"");
  147. }else {
  148. sdata10 = "";
  149. sdata11 = model.getValue("/root/sendcard/cardinput/cardnumber");
  150. }
  151. }else {
  152. messageBox("입금액이 없습니다.","E");
  153. return;
  154. }
  155. fAppCardVanData("01" //data1 //vangb van사구분
  156. ,"11" //data2 //ordergb 거래구분
  157. ,getCurrentDate() //data3 //mdate 회계일자
  158. ,model.getValue("/root/send/cmpycd") //data4 //pano 등록번호
  159. ,"H" //data5 //iogb 입외구분
  160. ,model.getValue("/root/hidden1/session/posdeptcd") //data6 //deptcode 진료과코드
  161. ,getCurrentDate() //data7 //diagdate 진료일자
  162. // ,getCurrentDate()
  163. ,model.getValue("/root/hidden1/session/userid") //data8 //clientid 수납자
  164. ,model.getValue("/root/sendcard/cardinput/entrymode") //data9 //entrymode 입력구분
  165. ,sdata10 //data10 //track2data 트랙data
  166. ,sdata11 //data11 //cardnumber 카드번호
  167. ,model.getValue("/root/sendcard/cardinput/cardperiod") //data12 //cardperiod 유효기간
  168. ,model.getValue("/root/sendcard/cardinput/carddivide") //data13 //carddivide 할부개월수
  169. ,model.getValue("/root/sendcard/cardinput/incomeamt") //data14 //netamt 금액
  170. ,"" //data15 //oldappdate 원거래승인일자(취소시)
  171. ,"" //data16 //oldapptime 원거래승인시간(취소시)
  172. ,"" //data17 //oldappno 원거래승인번호(취소시)
  173. );
  174. if(model.getValue("/root/tmp/appvanif/replystat") != "0000"){
  175. messageBox("카드승인실패 => "+ model.getValue("/root/tmp/appvanif/cardname") ,"E999","");
  176. opener.javascript.setParameter("SPAHA02300_APRVFLAG","N");
  177. return;
  178. }else{
  179. //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvno", model.getValue("/root/tmp/appvanif/approvalno"));
  180. //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvdd", model.getValue("/root/tmp/appvanif/approvaldate"));
  181. //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvtm", model.getValue("/root/tmp/appvanif/approvaltime"));
  182. //model.setValue("/root/main/list/rcptdtl/cardlist[" + i + "]/aprvflag", "12");
  183. //전자서명 처리
  184. var parm = model.getValue("/root/send/cmpycd") + "▦" + //PID
  185. model.getValue("/root/sendcard/cardinput/incomeamt") + "▦" + //수납대상금액
  186. "12" + "▦" + //승인구분
  187. model.getValue("/root/tmp/appvanif/approvaldate") + "▦" + //승인일자
  188. model.getValue("/root/tmp/appvanif/approvaltime") + "▦" + //승인시간
  189. model.getValue("/root/tmp/appvanif/approvalno") + "▦" + //승인번호
  190. model.getValue("/root/hidden1/session/posinstcd") + "▦" //기관코드
  191. ;
  192. setParameter("SPPAO02101_PARM", parm);
  193. modal("../../../pam/pamcomnweb/xrw/SPPAO02101", "1","400", "400", "SPPAO02101", "", "");
  194. opener.javascript.setParameter("SPAHA02300_APRVFLAG","Y");
  195. if(model.getValue("/root/sendcard/cardinput/entrymode") == "S") {
  196. model.makeValue("/root/tmp/appvanif/cardnumber" , sdata10);
  197. }else {
  198. model.makeValue("/root/tmp/appvanif/cardnumber" , sdata11);
  199. }
  200. model.makeValue("/root/tmp/appvanif/entrymode" , model.getValue("/root/sendcard/cardinput/entrymode"));
  201. model.makeValue("/root/tmp/appvanif/allotmm" , model.getValue("/root/sendcard/cardinput/cmbcarddivide"));
  202. model.makeValue("/root/tmp/appvanif/valiterm" , model.getValue("/root/sendcard/cardinput/cardperiod"));
  203. model.makeValue("/root/tmp/appvanif/cardcmpycd" , model.getValue("/root/sendcard/cardinput/publishbank"));
  204. model.makeValue("/root/tmp/appvanif/incomeamt" , model.getValue("/root/sendcard/cardinput/incomeamt"));
  205. parent.model.makeNode("/root/hidden/cardaprv");
  206. copyNodesetType("/root/hidden/cardaprv", "/root/tmp/appvanif", "replace", parent.model, model);
  207. //전자서명에 실패하더라도, 카드승인을 받았기 때문에, Continue
  208. //if (getParameter("SPPAO02101_RTN") == "N" || getParameter("SPPAO02101_RTN") == "") return;
  209. }
  210. }
  211. function fGetCardValiTerm() {
  212. if("S" == rdo_entrymode.value) {
  213. var cardno = ipt_cardno.value
  214. for(var i=0;i<cardno.length;i++) {
  215. if("=" == cardno.charAt(i)) {
  216. ipt_valiterm.value = cardno.substring(i+1,i+5);
  217. }
  218. }
  219. }
  220. }
  221. ]]>
  222. </script>
  223. </model>
  224. </xhtml:head>
  225. <xhtml:body pagewidth="726" pageheight="140" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  226. <group id="group1" style="left:0px; top:0px; width:120px; height:110px; ">
  227. <caption id="caption5" class="tit_2" style="left:5px; top:15px; width:111px; height:13px; ">입력구분</caption>
  228. <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; ">
  229. <choices>
  230. <item>
  231. <label>Swipe</label>
  232. <value>S</value>
  233. </item>
  234. <item>
  235. <label>Key-In</label>
  236. <value>K</value>
  237. </item>
  238. </choices>
  239. <script type="javascript" ev:event="xforms-select">
  240. <![CDATA[
  241. model.setFocus("ipt_cardno");
  242. ]]>
  243. </script>
  244. </select1>
  245. <shape id="rec_keyinptflag" class="roundrect_example" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:5px; top:33px; width:110px; height:76px; "/>
  246. </group>
  247. <group id="group2" style="left:120px; top:1px; width:590px; height:109px; ">
  248. <caption id="caption1" class="tit_2" style="left:5px; top:15px; width:111px; height:14px; ">카드입금</caption>
  249. <line id="line3" class="line_2" style="x1:0px; y1:57px; x2:590px; y2:57px; "/>
  250. <line id="line12" class="line_1" style="x1:0px; y1:30px; x2:590px; y2:30px; "/>
  251. <line id="line1" class="line_2" style="x1:0px; y1:81px; x2:590px; y2:81px; "/>
  252. <line id="line2" class="line_3" style="x1:0px; y1:106px; x2:590px; y2:106px; "/>
  253. <caption id="caption2" class="cell_1" style="left:0px; top:35px; width:60px; height:23px; vertical-align:middle; ">카드번호</caption>
  254. <caption id="caption3" class="cell_1" style="left:0px; top:83px; width:60px; height:23px; vertical-align:middle; ">할부개월</caption>
  255. <caption id="caption6" class="cell_1" style="left:0px; top:59px; width:60px; height:23px; vertical-align:middle; ">유효기간</caption>
  256. <caption id="caption7" class="cell_1" style="left:218px; top:59px; width:110px; height:23px; vertical-align:middle; ">결제금액</caption>
  257. <caption id="caption4" style="left:113px; top:59px; width:65px; height:23px; vertical-align:middle; ">(YY/MM)</caption>
  258. <input id="ipt_cardno" ref="/root/sendcard/cardinput/cardnumber" class="input_default" style="left:63px; top:36px; width:152px; height:19px; ">
  259. <script type="javascript" ev:event="xforms-value-changed">
  260. <![CDATA[
  261. fGetCardValiTerm();
  262. ]]>
  263. </script>
  264. </input>
  265. <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; "/>
  266. <select1 id="cmb_allotmm" ref="/root/sendcard/cardinput/cmbcarddivide" class="combo_default" appearance="minimal" style="left:63px; top:85px; width:109px; height:19px; ">
  267. <choices>
  268. <item>
  269. <label>일시불</label>
  270. <value>00</value>
  271. </item>
  272. <item>
  273. <label>1개월</label>
  274. <value>01</value>
  275. </item>
  276. <item>
  277. <label>2개월</label>
  278. <value>02</value>
  279. </item>
  280. <item>
  281. <label>3개월</label>
  282. <value>03</value>
  283. </item>
  284. <item>
  285. <label>4개월</label>
  286. <value>04</value>
  287. </item>
  288. <item>
  289. <label>5개월</label>
  290. <value>05</value>
  291. </item>
  292. <item>
  293. <label>6개월</label>
  294. <value>06</value>
  295. </item>
  296. <item>
  297. <label>7개월</label>
  298. <value>07</value>
  299. </item>
  300. <item>
  301. <label>8개월</label>
  302. <value>08</value>
  303. </item>
  304. <item>
  305. <label>9개월</label>
  306. <value>09</value>
  307. </item>
  308. <item>
  309. <label>10개월</label>
  310. <value>10</value>
  311. </item>
  312. <item>
  313. <label>11개월</label>
  314. <value>11</value>
  315. </item>
  316. <item>
  317. <label>12개월</label>
  318. <value>12</value>
  319. </item>
  320. <item>
  321. <label>13개월</label>
  322. <value>13</value>
  323. </item>
  324. <item>
  325. <label>14개월</label>
  326. <value>14</value>
  327. </item>
  328. <item>
  329. <label>15개월</label>
  330. <value>15</value>
  331. </item>
  332. <item>
  333. <label>16개월</label>
  334. <value>16</value>
  335. </item>
  336. <item>
  337. <label>17개월</label>
  338. <value>17</value>
  339. </item>
  340. <item>
  341. <label>18개월</label>
  342. <value>18</value>
  343. </item>
  344. <item>
  345. <label>19개월</label>
  346. <value>19</value>
  347. </item>
  348. <item>
  349. <label>20개월</label>
  350. <value>20</value>
  351. </item>
  352. <item>
  353. <label>21개월</label>
  354. <value>21</value>
  355. </item>
  356. <item>
  357. <label>22개월</label>
  358. <value>22</value>
  359. </item>
  360. <item>
  361. <label>23개월</label>
  362. <value>23</value>
  363. </item>
  364. <item>
  365. <label>24개월</label>
  366. <value>24</value>
  367. </item>
  368. </choices>
  369. <script type="javascript" ev:event="xforms-select">
  370. <![CDATA[
  371. ipt_allotmm.value = cmb_allotmm.value;
  372. ]]>
  373. </script>
  374. </select1>
  375. <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; ">
  376. <script type="javascript" ev:event="xforms-value-changed">
  377. <![CDATA[
  378. cmb_allotmm.value = ipt_allotmm.value;
  379. ]]>
  380. </script>
  381. </input>
  382. <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; "/>
  383. <caption id="caption11" class="cell_1" style="left:218px; top:35px; width:110px; height:23px; vertical-align:middle; ">카드회사</caption>
  384. <select1 id="cmb_cardcmpy" ref="/root/sendcard/cardinput/publishbank" appearance="minimal" style="left:331px; top:36px; width:257px; height:19px; ">
  385. <choices>
  386. <itemset nodeset="/root/init/initlst/P0076list/P0076">
  387. <label ref="cdnm"/>
  388. <value ref="cdid"/>
  389. </itemset>
  390. </choices>
  391. </select1>
  392. <caption id="caption10" class="cell_1" style="left:218px; top:83px; width:110px; height:23px; vertical-align:middle; ">승인일시/승인번호</caption>
  393. <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; "/>
  394. <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; "/>
  395. <input id="ipt_aprvno" ref="/root/sendcard/aprvno" disabled="true" maxlength="30" style="left:465px; top:84px; width:123px; height:19px; "/>
  396. </group>
  397. <group id="group3" scroll="auto" style="left:0px; top:109px; width:710px; height:27px; ">
  398. <button id="btn_cancel" class="btn4_letter2" style="left:654px; top:5px; width:56px; height:22px; ">
  399. <caption>취소</caption>
  400. <script type="javascript" ev:event="DOMActivate">
  401. <![CDATA[
  402. if(checkOpener()) {
  403. window.close();
  404. }
  405. ]]>
  406. </script>
  407. </button>
  408. <button id="button1" class="btn4_letter2" style="left:595px; top:5px; width:56px; height:22px; ">
  409. <caption>확인</caption>
  410. <script type="javascript" ev:event="DOMActivate">
  411. <![CDATA[
  412. if(checkOpener()) {
  413. var srchFlag = opener.javascript.getParameter("SPAHA02300_SRCHFLAG");
  414. if(srchFlag == "Y"){
  415. }else{
  416. fCardCnfm();
  417. }
  418. window.close();
  419. }
  420. ]]>
  421. </script>
  422. </button>
  423. <button id="btn_init" class="btn4_letter3" style="left:524px; top:5px; width:68px; height:22px; ">
  424. <caption>초기화</caption>
  425. <script type="javascript" ev:event="DOMActivate">
  426. <![CDATA[
  427. model.reset();
  428. model.setFocus("ipt_cardno");
  429. ]]>
  430. </script>
  431. </button>
  432. </group>
  433. </xhtml:body>
  434. </xhtml:html>