123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <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>
- <callerpatinfo>
- <rrgstno1/>
- <rrgstno2/>
- <pid/>
- <status/>
- <check/>
- </callerpatinfo>
- </main>
- </root>
- </instance>
- </model>
- <script type="javascript">
- <![CDATA[
-
- //softpone관련 calltest
- var gTimer;
- var gCallType;
- var gAngenStatus;
-
- /*상담원 상태
- 0 : Ringing
- 1 : 상담원과 통화연결
- 2 : 상담원 대기중
- 3 : 상담원 자리비움
- 4 : Transfer
- 5 : Hold
- 6 : UnHold
- 7 : 업무처리
- 8 : Outgoing Call
- 9 : DisConnect
- A : 로그인
- B : 로그아웃
- C : 큐에 들어간 상태
- D : PDS 대기 상태*/
-
-
- function onLoadPage(){
- //formMain.txtagentStatus.value = cWebCaller.GetAgentStatus();
- input1.value = cWebCaller.GetAgentStatus();
-
- }
-
- function agentStatusChanged(status){
- // formMain.txtagentStatus.value = formMain.txtagentStatus.value + " - " + status;
- // input4.value= input4.value + "-" + status;
- input1.value= status;
-
- JuminNoInfoSet();
-
- model.refresh();
- }
-
-
- /*Call 인입시 전화번호와 고객정보 얻는 이벤트*/
- function custInfoChanged(ani, dnis, uui){
-
- /*현재상태가 벨울림이 아니면 고객정보조회 안함*/
- if (cWebCaller.GetAgentStatus() != "0") return;
- //if (model.getValue("/root/callcenter/status") != "0"){ //return;
-
- /*콜 타입 얻기 - 일반콜=CM_PSTN, PDS콜=CM_PDS*/
- gCallType = cWebCaller.GetCallMediaCode(1);
-
- /* UUI 샘플 --> 6634c906-db96-4aa7-bf53-a125ee6a8ee8|DNIS=7830905|ANI=027613194|CUSTID=00000000|CAMPID=00000000 */
- var jumin = uui;
-
- var no = jumin.indexOf("JUMIN=");
- var pidno = jumin.indexOf("PTID=");
- var end = jumin.indexOf("|CODE=");
- var len1 = end-pidno-5;
-
- /*
- model.alert(no);
- model.alert(pidno);
- model.alert(end);
- model.alert(len1);
- */
- model.resetInstanceNode("/root/main/callerpatinfo");
- //주민번호가 입력되었을 경우
- if(len1 == "0" ){
-
- var str1 = no+6;
- var jumin1 = "";
- var jumin2 = "";
- var juminno = (jumin).substr(str1,13);
-
- jumin1 = (juminno).substr(0,6);
- jumin2 = (juminno).substr(6,12);
-
- /*
- model.alert(juminno);
- model.alert(jumin1);
- model.alert(jumin2);
- */
- model.makeNode("/root/main/callerpatinfo/rrgstno1");
- model.makeNode("/root/main/callerpatinfo/rrgstno2");
-
- model.setValue("/root/main/callerpatinfo/check", "R");
- model.setValue("/root/main/callerpatinfo/rrgstno1", jumin1);
- model.setValue("/root/main/callerpatinfo/rrgstno2", jumin2);
- }else{ //등록번호가 입력되었을 경우
- var str2 = pidno+5;
-
- //var pid = (jumin).substr(str2,str2+len1);
- var pid = (jumin).substr(str2, len1);
-
- model.makeNode("/root/main/callerpatinfo/pid");
-
- model.setValue("/root/main/callerpatinfo/check", "P");
- model.setValue("/root/main/callerpatinfo/pid", pid);
- }
- model.refresh();
- }
-
- //상담원과 통화 연결시 주민번호/등록번호 자동조회
- function JuminNoInfoSet(){
-
- if (model.getValue("/root/main/callerpatinfo/status") == "1"){
-
- if(model.getValue("/root/main/callerpatinfo/check") == "R"){
-
- model.makeNode("/root/main/patinfo/patinfolist/rrgstno1");
- model.makeNode("/root/main/patinfo/patinfolist/rrgstno2");
- opener.model.setValue("/root/main/patinfo/patinfolist/rrgstno1", model.getValue("/root/main/callerpatinfo/rrgstno1"));
- opener.model.setValue("/root/main/patinfo/patinfolist/rrgstno2", model.getValue("/root/main/callerpatinfo/rrgstno2"));
- //opener.model.setFocus("ipt_rrgstno2");
- opener.model.refresh();
-
- opener.javascript.fRgstno2EnterEvent();
-
- model.removenode("/root/main/patinfo/patinfolist");
- //model.resetInstanceNode("/root/main/patinfo/patinfolist");
- /*
- model.setValue("/root/main/callerpatinfo/callerpatinfolist/rrgstno1", model.getValue("/root/callcenter/rrgstno1"));
- model.setValue("/root/main/callerpatinfo/callerpatinfolist/rrgstno2", model.getValue("/root/callcenter/rrgstno2"));
- model.setFocus("ipt_rrgstno2");
- model.refresh();
-
- fRgstno2EnterEvent();
- model.refresh();
- */
- }else if(model.getValue("/root/main/callerpatinfo/check") == "P"){
-
- //model.makeNode("
- //model.setFocus("ipt_pid");
- model.makeNode("/root/main/patinfo/patinfolist/pid");
- opener.model.setValue("/root/main/patinfo/patinfolist/pid", model.getValue("/root/main/callerpatinfo/pid"));
- opener.model.setFocus("ipt_pid");
- opener.model.refresh();
- opener.javascript.fPidEnterEvent();
- //model.setFocus("ipt_pid");
- model.removenode("/root/main/patinfo/patinfolist");
- //model.resetInstanceNode("/root/main/patinfo/patinfolist");
- //fPidEnterEvent();
- //opener.javascript.BaseInfoSet();
-
-
- //model.setValues("/root/main/callerpatinfo/callerpatinfolist/pid", model.getValue("/root/main/callerpatinfo/pid"));
- //opener.javascript.BaseInfoSet();
- //opener.model.refresh();
- /*
- model.setValue("/root/main/callerpatinfo/callerpatinfolist/pid", model.getValue("/root/callcenter/pid"));
- model.setFocus("ipt_pid");
- model.refresh();
-
- fPidEnterEvent();
- model.refresh();
- */
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="20" pageheight="30">
- <object id="cWebCaller" clsid="{84D3389B-A1BC-4794-AD4F-AE7A84611D5D}" style="left:30px; top:35px; width:30px; height:25px; ">
- <script type="javascript" ev:event="GetEventonCustInfoChanged(ani, dnis, uui)">
- <![CDATA[
- //opener.javascript.custInfoChanged(ani, dnis, uui);
- custInfoChanged(ani, dnis, uui);
- ]]>
- </script>
- <script type="javascript" ev:event="GetEventonAgentStatusChanged(status)">
- <![CDATA[
- //opener.javascript.agentStatusChanged(status);
- agentStatusChanged(status);
- ]]>
- </script>
- </object>
- <input id="input1" ref="/root/main/callerpatinfo/status" style="left:6px; top:0px; width:75px; height:20px; "/>
- <input id="input2" ref="/root/main/callerpatinfo/rrgstno1" style="left:5px; top:25px; width:90px; height:20px; "/>
- <input id="input3" ref="/root/main/callerpatinfo/rrgstno2" style="left:5px; top:50px; width:90px; height:20px; "/>
- <input id="input4" ref="/root/main/callerpatinfo/pid" style="left:5px; top:75px; width:90px; height:20px; "/>
- </xhtml:body>
- </xhtml:html>
|