SPPMB02200_소프트폰연동.xrw 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <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">
  3. <xhtml:head>
  4. <xhtml:title>소프트폰연동</xhtml:title>
  5. <model id="model1">
  6. <instance id="instance1">
  7. <root xmlns="">
  8. <main>
  9. <callerpatinfo>
  10. <rrgstno1/>
  11. <rrgstno2/>
  12. <pid/>
  13. <status/>
  14. <check/>
  15. </callerpatinfo>
  16. </main>
  17. </root>
  18. </instance>
  19. </model>
  20. <script type="javascript">
  21. <![CDATA[
  22. //softpone관련 calltest
  23. var gTimer;
  24. var gCallType;
  25. var gAngenStatus;
  26. /*상담원 상태
  27. 0 : Ringing
  28. 1 : 상담원과 통화연결
  29. 2 : 상담원 대기중
  30. 3 : 상담원 자리비움
  31. 4 : Transfer
  32. 5 : Hold
  33. 6 : UnHold
  34. 7 : 업무처리
  35. 8 : Outgoing Call
  36. 9 : DisConnect
  37. A : 로그인
  38. B : 로그아웃
  39. C : 큐에 들어간 상태
  40. D : PDS 대기 상태*/
  41. function onLoadPage(){
  42. //formMain.txtagentStatus.value = cWebCaller.GetAgentStatus();
  43. input1.value = cWebCaller.GetAgentStatus();
  44. }
  45. function agentStatusChanged(status){
  46. // formMain.txtagentStatus.value = formMain.txtagentStatus.value + " - " + status;
  47. // input4.value= input4.value + "-" + status;
  48. input1.value= status;
  49. JuminNoInfoSet();
  50. model.refresh();
  51. }
  52. /*Call 인입시 전화번호와 고객정보 얻는 이벤트*/
  53. function custInfoChanged(ani, dnis, uui){
  54. /*현재상태가 벨울림이 아니면 고객정보조회 안함*/
  55. if (cWebCaller.GetAgentStatus() != "0") return;
  56. //if (model.getValue("/root/callcenter/status") != "0"){ //return;
  57. /*콜 타입 얻기 - 일반콜=CM_PSTN, PDS콜=CM_PDS*/
  58. gCallType = cWebCaller.GetCallMediaCode(1);
  59. /* UUI 샘플 --> 6634c906-db96-4aa7-bf53-a125ee6a8ee8|DNIS=7830905|ANI=027613194|CUSTID=00000000|CAMPID=00000000 */
  60. var jumin = uui;
  61. var no = jumin.indexOf("JUMIN=");
  62. var pidno = jumin.indexOf("PTID=");
  63. var end = jumin.indexOf("|CODE=");
  64. var len1 = end-pidno-5;
  65. /*
  66. model.alert(no);
  67. model.alert(pidno);
  68. model.alert(end);
  69. model.alert(len1);
  70. */
  71. model.resetInstanceNode("/root/main/callerpatinfo");
  72. //주민번호가 입력되었을 경우
  73. if(len1 == "0" ){
  74. var str1 = no+6;
  75. var jumin1 = "";
  76. var jumin2 = "";
  77. var juminno = (jumin).substr(str1,13);
  78. jumin1 = (juminno).substr(0,6);
  79. jumin2 = (juminno).substr(6,12);
  80. /*
  81. model.alert(juminno);
  82. model.alert(jumin1);
  83. model.alert(jumin2);
  84. */
  85. model.makeNode("/root/main/callerpatinfo/rrgstno1");
  86. model.makeNode("/root/main/callerpatinfo/rrgstno2");
  87. model.setValue("/root/main/callerpatinfo/check", "R");
  88. model.setValue("/root/main/callerpatinfo/rrgstno1", jumin1);
  89. model.setValue("/root/main/callerpatinfo/rrgstno2", jumin2);
  90. }else{ //등록번호가 입력되었을 경우
  91. var str2 = pidno+5;
  92. //var pid = (jumin).substr(str2,str2+len1);
  93. var pid = (jumin).substr(str2, len1);
  94. model.makeNode("/root/main/callerpatinfo/pid");
  95. model.setValue("/root/main/callerpatinfo/check", "P");
  96. model.setValue("/root/main/callerpatinfo/pid", pid);
  97. }
  98. model.refresh();
  99. }
  100. //상담원과 통화 연결시 주민번호/등록번호 자동조회
  101. function JuminNoInfoSet(){
  102. if (model.getValue("/root/main/callerpatinfo/status") == "1"){
  103. if(model.getValue("/root/main/callerpatinfo/check") == "R"){
  104. model.makeNode("/root/main/patinfo/patinfolist/rrgstno1");
  105. model.makeNode("/root/main/patinfo/patinfolist/rrgstno2");
  106. opener.model.setValue("/root/main/patinfo/patinfolist/rrgstno1", model.getValue("/root/main/callerpatinfo/rrgstno1"));
  107. opener.model.setValue("/root/main/patinfo/patinfolist/rrgstno2", model.getValue("/root/main/callerpatinfo/rrgstno2"));
  108. //opener.model.setFocus("ipt_rrgstno2");
  109. opener.model.refresh();
  110. opener.javascript.fRgstno2EnterEvent();
  111. model.removenode("/root/main/patinfo/patinfolist");
  112. //model.resetInstanceNode("/root/main/patinfo/patinfolist");
  113. /*
  114. model.setValue("/root/main/callerpatinfo/callerpatinfolist/rrgstno1", model.getValue("/root/callcenter/rrgstno1"));
  115. model.setValue("/root/main/callerpatinfo/callerpatinfolist/rrgstno2", model.getValue("/root/callcenter/rrgstno2"));
  116. model.setFocus("ipt_rrgstno2");
  117. model.refresh();
  118. fRgstno2EnterEvent();
  119. model.refresh();
  120. */
  121. }else if(model.getValue("/root/main/callerpatinfo/check") == "P"){
  122. //model.makeNode("
  123. //model.setFocus("ipt_pid");
  124. model.makeNode("/root/main/patinfo/patinfolist/pid");
  125. opener.model.setValue("/root/main/patinfo/patinfolist/pid", model.getValue("/root/main/callerpatinfo/pid"));
  126. opener.model.setFocus("ipt_pid");
  127. opener.model.refresh();
  128. opener.javascript.fPidEnterEvent();
  129. //model.setFocus("ipt_pid");
  130. model.removenode("/root/main/patinfo/patinfolist");
  131. //model.resetInstanceNode("/root/main/patinfo/patinfolist");
  132. //fPidEnterEvent();
  133. //opener.javascript.BaseInfoSet();
  134. //model.setValues("/root/main/callerpatinfo/callerpatinfolist/pid", model.getValue("/root/main/callerpatinfo/pid"));
  135. //opener.javascript.BaseInfoSet();
  136. //opener.model.refresh();
  137. /*
  138. model.setValue("/root/main/callerpatinfo/callerpatinfolist/pid", model.getValue("/root/callcenter/pid"));
  139. model.setFocus("ipt_pid");
  140. model.refresh();
  141. fPidEnterEvent();
  142. model.refresh();
  143. */
  144. }
  145. }
  146. }
  147. ]]>
  148. </script>
  149. </xhtml:head>
  150. <xhtml:body pagewidth="20" pageheight="30">
  151. <object id="cWebCaller" clsid="{84D3389B-A1BC-4794-AD4F-AE7A84611D5D}" style="left:30px; top:35px; width:30px; height:25px; ">
  152. <script type="javascript" ev:event="GetEventonCustInfoChanged(ani, dnis, uui)">
  153. <![CDATA[
  154. //opener.javascript.custInfoChanged(ani, dnis, uui);
  155. custInfoChanged(ani, dnis, uui);
  156. ]]>
  157. </script>
  158. <script type="javascript" ev:event="GetEventonAgentStatusChanged(status)">
  159. <![CDATA[
  160. //opener.javascript.agentStatusChanged(status);
  161. agentStatusChanged(status);
  162. ]]>
  163. </script>
  164. </object>
  165. <input id="input1" ref="/root/main/callerpatinfo/status" style="left:6px; top:0px; width:75px; height:20px; "/>
  166. <input id="input2" ref="/root/main/callerpatinfo/rrgstno1" style="left:5px; top:25px; width:90px; height:20px; "/>
  167. <input id="input3" ref="/root/main/callerpatinfo/rrgstno2" style="left:5px; top:50px; width:90px; height:20px; "/>
  168. <input id="input4" ref="/root/main/callerpatinfo/pid" style="left:5px; top:75px; width:90px; height:20px; "/>
  169. </xhtml:body>
  170. </xhtml:html>