SPPAO01800_현금영수증기준관리.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPPAO01800_현금영수증기준관리.xrw
  4. * 설 명 : 현금영수증기준을 관리한다.
  5. * 기 타 :
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>현금영수증기준관리</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <patinfo>
  16. <patinfolist>
  17. <pid/>
  18. <hngnm/>
  19. </patinfolist>
  20. </patinfo>
  21. <cashbaseinfo>
  22. <cashbase>
  23. <qualcnfmflag/>
  24. <qualcnfmno/>
  25. <remfact/>
  26. </cashbase>
  27. </cashbaseinfo>
  28. </main>
  29. <send>
  30. <qualcnfmflag/>
  31. <qualcnfmno/>
  32. <remfact/>
  33. <pid/>
  34. </send>
  35. <hidden>
  36. <session/>
  37. </hidden>
  38. <source>
  39. <srchcond/>
  40. <pid/>
  41. </source>
  42. <init_pam>
  43. <init>
  44. <P0032list>
  45. <P0032>
  46. <cdid/>
  47. <cdnm/>
  48. </P0032>
  49. </P0032list>
  50. </init>
  51. </init_pam>
  52. </root>
  53. </instance>
  54. <script type="javascript" ev:event="xforms-ready">
  55. <![CDATA[
  56. // 원무공통코드 조회
  57. pamfGetCodeList(new Array("P0032"), new Array("/root/init_pam/init/P0032list"));
  58. if (checkOpener())
  59. {
  60. setParameter("SPPAO01800_RTN","");
  61. var SPPAO01800_PID = opener.javascript.getParameter("SPPAO01800_PID");
  62. model.setValue("/root/main/patinfo/patinfolist/pid" , SPPAO01800_PID);
  63. model.refresh();
  64. event.keyCode = "13";
  65. ipt_pid.dispatch("onkeypress");
  66. setParameter("SPPAO01800_PID","");
  67. }
  68. if(isNull(rdo_qualcnfmflag.value)){
  69. rdo_qualcnfmflag.value = 1;
  70. rdo_qualcnfmflag.refresh();
  71. }
  72. ]]>
  73. </script>
  74. <submission id="TRPAO01801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/cashbaseinfo"/>
  75. <submission id="TXPAO01801" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  76. <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/source" resultref="/root/main/patinfo"/>
  77. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  78. </model>
  79. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  80. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  81. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  83. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  84. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  86. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  87. <script type="javascript">
  88. <![CDATA[
  89. //환자별 현금영수증 기준 내역 조회
  90. function fSearch() {
  91. //환자번호 세팅
  92. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid") );
  93. submit("TRPAO01801");
  94. model.resetInstanceNode("/root/send");
  95. model.copyNode("/root/send","/root/main/cashbaseinfo/cashbase");
  96. model.makeNode("/root/send/qualcnfmflag");
  97. model.makeNode("/root/send/qualcnfmno");
  98. model.makeNode("/root/send/remfact");
  99. model.makeNode("/root/send/pid");
  100. model.setFocus("ipt_qualcnfmno");
  101. model.refresh();
  102. }
  103. ]]>
  104. </script>
  105. </xhtml:head>
  106. <xhtml:body pagewidth="500" pageheight="180" guideline="1,653;1,653;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  107. <group id="grp_btn" scroll="auto" style="left:0px; top:130px; width:474px; height:27px; ">
  108. <button id="btn_cancel" class="btn4_letter2" style="left:414px; top:4px; width:56px; height:22px; ">
  109. <caption>저장</caption>
  110. <script type="javascript" ev:event="DOMActivate">
  111. <![CDATA[
  112. // ICPos 단말기의 경우 저장된 카드번호 사용불가(카드인식으로만 사용)
  113. if (model.getValue("/root/send/qualcnfmflag") == "3"
  114. && model.getValue("/root/init_pam/init/P0032list/P0032[cdid = '200']/cdnm") == "KOCES_IC") {
  115. messageBox("IC단말기의 경우 저장된 카드번호는 사용불가입니다.\r\nIC단말기에서 카드리딩/번호입력하세요!!", "E000");
  116. return false;
  117. }
  118. if(isNull(rdo_qualcnfmflag.value)){
  119. messageBox("신분확인구분이 선택되어 있지 않습니다.", "E000");
  120. return
  121. }
  122. if(isNull(ipt_qualcnfmno.value)){
  123. messageBox("신분확인번호가 입력되지 않았습니다.", "E000");
  124. return
  125. }
  126. model.setValue("/root/send/pid", model.getValue("/root/main/patinfo/patinfolist/pid") );
  127. if(submit("TXPAO01801")){
  128. messageBox("저장완료", "I");
  129. }
  130. ]]>
  131. </script>
  132. </button>
  133. <line id="line88" class="line_6" style="x1:0px; y1:0px; x2:470px; y2:0px; "/>
  134. <button id="button1" class="btn4_letter2" style="left:355px; top:4px; width:56px; height:22px; ">
  135. <caption>선택</caption>
  136. <script type="javascript" ev:event="DOMActivate">
  137. <![CDATA[
  138. if (checkOpener())
  139. {
  140. if ( model.getValue("/root/send/qualcnfmno").getTrim() == "" ) {
  141. opener.javascript.setParameter("SPPAO01800_RTN","N");
  142. // ICPos의 경우 카드번호는 단말기에서 입력하도록 처리
  143. } else if (model.getValue("/root/send/qualcnfmflag") == "3"
  144. && model.getValue("/root/init_pam/init/P0032list/P0032[cdid = '200']/cdnm") == "KOCES_IC") {
  145. messageBox("IC단말기의 경우 저장된 카드번호는 사용불가입니다.\r\nIC단말기에서 카드리딩/번호입력하세요!!", "E000");
  146. opener.javascript.setParameter("SPPAO01800_RTN","Y");
  147. opener.javascript.setParameter("SPPAO01800_qualcnfmflag", model.getValue("/root/send/qualcnfmflag") );
  148. opener.javascript.setParameter("SPPAO01800_qualcnfmno", "" );
  149. } else {
  150. opener.javascript.setParameter("SPPAO01800_RTN","Y");
  151. opener.javascript.setParameter("SPPAO01800_qualcnfmflag", model.getValue("/root/send/qualcnfmflag") );
  152. opener.javascript.setParameter("SPPAO01800_qualcnfmno", model.getValue("/root/send/qualcnfmno") );
  153. }
  154. window.close();
  155. }
  156. ]]>
  157. </script>
  158. </button>
  159. </group>
  160. <group id="group2" style="left:0px; top:0px; width:474px; height:130px; ">
  161. <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:139px; height:13px; ">현금영수증 기준관리</caption>
  162. <line id="line3" class="line_2" style="x1:0px; y1:78px; x2:465px; y2:78px; "/>
  163. <line id="line12" class="line_1" style="x1:0px; y1:26px; x2:465px; y2:26px; "/>
  164. <caption id="caption6" class="cell_1" style="left:0px; top:80px; width:113px; height:23px; vertical-align:middle; ">신분확인번호</caption>
  165. <line id="line1" class="line_2" style="x1:0px; y1:102px; x2:465px; y2:102px; "/>
  166. <caption id="caption3" class="cell_1" style="left:0px; top:55px; width:113px; height:23px; vertical-align:middle; ">신분확인구분</caption>
  167. <caption id="caption7" class="cell_1" style="left:0px; top:104px; width:113px; height:23px; vertical-align:middle; ">참고사항</caption>
  168. <input id="ipt_qualcnfmno" ref="/root/send/qualcnfmno" class="input_default" style="left:115px; top:81px; width:210px; height:19px; ">
  169. <script type="javascript" ev:event="onkeypress">
  170. <![CDATA[
  171. if (event.keyCode == "13") {
  172. //현금영수증 선택시
  173. model.setValue("/root/send/qualcnfmno", ipt_qualcnfmno.currentText);
  174. if ((ipt_qualcnfmno.currentText).length >18) {
  175. //16자리보다 크면,
  176. // "="이 있으면, swipe
  177. if ( (ipt_qualcnfmno.currentText).indexOf("=") >0 ) {
  178. var vSwipeData = "";
  179. var vCardno_array = "";
  180. var vCardno = "";
  181. //vSwipeData = model.getValue("/root/hidden/com/card_cardno");
  182. vSwipeData = ipt_qualcnfmno.currentText;
  183. // swipe 시 첫글자에 ?
  184. if ( vSwipeData.indexOf("?") >= 0 ) {
  185. vSwipeData = (vSwipeData).substr(1,37);
  186. }
  187. if ( vSwipeData.indexOf("/") >= 0 ) {
  188. vSwipeData = (vSwipeData).substr(1,37);
  189. }
  190. vSwipeData = vSwipeData.getRightPad(40, " ");
  191. // model.setValue("/root/hidden/com/swipedata", vSwipeData );
  192. vCardno_array = vSwipeData.split("=");
  193. vCardno = vCardno_array[0];
  194. // swipe 시 첫글자에 ?
  195. if ( vCardno.indexOf("?") >= 0 ) {
  196. vCardno = (vCardno).substr(1,16);
  197. }
  198. //유효일자
  199. var vValiterm = (vCardno_array[1]).substr(0,4);
  200. model.setValue("/root/send/qualcnfmno", vCardno);
  201. // model.setValue("/root/hidden/com/keyinptflag","S");
  202. //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  203. model.setValue("/root/send/qualcnfmflag","3");
  204. //현금영수증일때는 할부개월에 법인/개인구분(개인:00 사업자:01)
  205. // model.setValue("/root/hidden/com/card_allotmm",model.getValue("/root/hidden/com/cash_indinstflag") );
  206. model.refresh();
  207. // model.setFocus("ipt_cashamt");
  208. }
  209. }
  210. else if ((ipt_qualcnfmno.currentText).length ==16 || (ipt_qualcnfmno.currentText).length ==15 || (ipt_qualcnfmno.currentText).length ==18) {
  211. var vSwipeData = "";
  212. vSwipeData = model.getValue("/root/send/qualcnfmno")+"=";
  213. vSwipeData = vSwipeData.getRightPad(40, " ");
  214. // model.setValue("/root/hidden/com/swipedata",vSwipeData);
  215. // model.setValue("/root/hidden/com/keyinptflag","S");
  216. //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  217. model.setValue("/root/send/qualcnfmflag","3");
  218. model.refresh();
  219. // model.setFocus("ipt_cashamt");
  220. }
  221. else {
  222. //16자리보다 작으면, 주민번호 혹은 전화번호 사업장번호
  223. var vSwipeData = "";
  224. vSwipeData = model.getValue("/root/send/qualcnfmno")+"=";
  225. vSwipeData = vSwipeData.getRightPad(40, " ");
  226. // model.setValue("/root/hidden/com/swipedata",vSwipeData);
  227. // model.setValue("/root/hidden/com/keyinptflag","K");
  228. //현금영수증확인구분(1.주민,2.전화,3.카드,4.사업자)
  229. //길이가 13자리이면,주민번호
  230. if ( (model.getValue("/root/send/qualcnfmno")).length==13 ) {
  231. model.setValue("/root/send/qualcnfmflag","1");
  232. }
  233. else {
  234. //앞 3자리 010,011,016,017,018,019 이면 전화
  235. if ( (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "010" ||
  236. (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "011" ||
  237. (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "016" ||
  238. (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "017" ||
  239. (model.getValue("/root/send/qualcnfmno")).substr(0,4) == "0130" ||
  240. (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "018" ||
  241. (model.getValue("/root/send/qualcnfmno")).substr(0,3) == "019"
  242. ) {
  243. model.setValue("/root/send/qualcnfmflag","2");
  244. }
  245. else {
  246. //16자리 길이 미만일 때 13자리 주민번호 제외 후 핸드폰 앞자리 체크 나머지는 사업장
  247. model.setValue("/root/send/qualcnfmflag","4");
  248. // model.setValue("/root/hidden/com/cash_indinstflag","01"); //지출증빙
  249. }
  250. } //length ==13
  251. model.refresh();
  252. model.setFocus("ipt_cashamt");
  253. }//lenth ==16
  254. }
  255. ]]>
  256. </script>
  257. </input>
  258. <select1 id="rdo_qualcnfmflag" ref="/root/send/qualcnfmflag" appearance="full" cols="4" rows="1" vcellspacing="5" overflow="visible" style="left:115px; top:55px; width:346px; height:20px; border-style:none; ">
  259. <choices>
  260. <item>
  261. <label>주민번호</label>
  262. <value>1</value>
  263. </item>
  264. <item>
  265. <label>전화번호</label>
  266. <value>2</value>
  267. </item>
  268. <item>
  269. <label>카드번호</label>
  270. <value>3</value>
  271. </item>
  272. <item>
  273. <label>사업자번호</label>
  274. <value>4</value>
  275. </item>
  276. </choices>
  277. <script type="javascript" ev:event="xforms-select">
  278. <![CDATA[
  279. if (model.getValue("/root/send/qualcnfmflag") == "1" ) {
  280. //주민번호 선택시, 환자의 주민번호 기본세팅
  281. model.setValue("/root/send/qualcnfmno", model.getValue("/root/main/patinfo/patinfolist/rrgstno1") +
  282. model.getValue("/root/main/patinfo/patinfolist/rrgstno2")
  283. );
  284. }
  285. else {
  286. model.setValue("/root/send/qualcnfmno","");
  287. }
  288. model.refresh();
  289. ]]>
  290. </script>
  291. </select1>
  292. <input id="input1" ref="/root/send/remfact" class="input_default" style="left:115px; top:105px; width:345px; height:19px; "/>
  293. <line id="line2" class="line_3" style="x1:0px; y1:126px; x2:465px; y2:126px; "/>
  294. <line id="line4" class="line_2" style="x1:0px; y1:52px; x2:465px; y2:52px; "/>
  295. <caption id="caption2" class="cell_1" style="left:0px; top:31px; width:113px; height:23px; vertical-align:middle; ">등록번호/이름</caption>
  296. <output id="opt_emplnm" ref="/root/main/patinfo/patinfolist/hngnm" class="output_fix" style="left:231px; top:31px; width:84px; height:19px; text-align:center; "/>
  297. <input id="ipt_pid" ref="/root/main/patinfo/patinfolist/pid" class="input_s_essential" navindex="1" maxlength="10" appearance="input" style="left:115px; top:32px; width:92px; height:19px; ">
  298. <script type="javascript" ev:event="onkeypress">
  299. <![CDATA[
  300. if (event.keyCode == "8") {
  301. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  302. model.resetInstanceNode("/root/send");
  303. model.makeNode("/root/send/qualcnfmflag");
  304. model.makeNode("/root/send/qualcnfmno");
  305. model.makeNode("/root/send/remfact");
  306. model.makeNode("/root/send/pid");
  307. model.resetInstanceNode("/root/main/cashbaseinfo/cashbase");
  308. model.refresh();
  309. }
  310. if(event.keyCode == "13") {
  311. vcheck_pid = ipt_pid.currentText;
  312. //환자번호 null체크
  313. if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
  314. messageBox("환자등록번호가 입력되지","E007");
  315. return;
  316. }
  317. //환자번호 조건으로 인적정보 조회
  318. model.setValue("/root/source/srchcond", "1");
  319. model.setValue("/root/source/pid", ipt_pid.currentText);
  320. //환자기본정보 node clear
  321. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  322. model.resetInstanceNode("/root/main/cashbaseinfo/cashbase");
  323. model.resetInstanceNode("/root/send");
  324. model.makeNode("/root/send/qualcnfmflag");
  325. model.makeNode("/root/send/qualcnfmno");
  326. model.makeNode("/root/send/remfact");
  327. model.makeNode("/root/send/pid");
  328. //환자등록번호 체크
  329. if(submit("TRPMC02500")){
  330. var vcheck_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  331. if (vcheck_pid == null || vcheck_pid == "" || vcheck_pid == " " || vcheck_pid == "-") {
  332. //조회내역 체크
  333. messageBox("존재하지 않는 등록번호","E008");//E008=입니다
  334. return;
  335. }
  336. //조회되는 항목들 clear
  337. fSearch(); //조회(현금영수증기준)
  338. }
  339. else {
  340. messageBox("존재하지 않는 등록번호","E008");//E008=입니다
  341. model.setFocus("ipt_pid");
  342. model.refresh();
  343. return;
  344. }
  345. }//End if(event.keyCode == "13") {
  346. ]]>
  347. </script>
  348. <script type="javascript" ev:event="xforms-next">
  349. <![CDATA[
  350. ]]>
  351. </script>
  352. </input>
  353. <button id="btn_pid" class="icon_search" navindex="-1" style="left:211px; top:33px; width:16px; height:16px; ">
  354. <caption/>
  355. <script type="javascript" ev:event="DOMActivate">
  356. <![CDATA[
  357. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
  358. ]]>
  359. </script>
  360. </button>
  361. </group>
  362. </xhtml:body>
  363. </xhtml:html>