1. 呼叫弹屏
1.1. API方法定义
定义哪些功能方法需要实现以下方法,实现位置"系统管理>自定义程序设计>标准类>常用程序>主程序"
css
*{
margin: 0 0 0 0;
padding: 0 0 0 0;
}
.menuunslt {width:82px;color:white;font-size:14px;padding-top:1px;}
.menuslt
{
width:82px;
color:#174f70;
font-size:14px;
font-weight:normal;
background-color:white;
padding-top:1px;
BACKGROUND-REPEAT:repeat-x;
}
.itemover
{
width:82px;
color:white;
background-color:ffae4b;
font-size:14px;
padding-top:1px;
BACKGROUND-REPEAT:repeat-x;
}
.box-shadow{
-webkit-box-shadow: 0 0 50px #F5F5FF;
-moz-box-shadow: 0 0 50px #F5F5FF;
box-shadow: 0 0 50px #F5F5FF;
}
.callcenterocx
{
height: 61px;
position: fixed;
right: -910px;
background: #e05c55;
color: #fff;
font-size: 14px;
bottom:10px;
z-index: 100000000000000000001;
WIDTH: 770px;
OVERFLOW: hidden;
}
.callcenterjs
{
height: 417px;
position: fixed;
right: -936px;;
background: #e05c55;
color: #fff;
font-size: 14px;
top: 20%;
z-index: 100000000000000000001;
}
.swither
{
width: 30px;
height: 111px;
position: relative;
right: 0;
background: #e05c55;
color: #fff;
float: left;
font-size: 14px;
z-index: 100000000000000000001;
cursor:pointer;
}
.arrow{display:none;}
b{
margin-top: -12px;
left: 6px;
width: 0;
position: absolute;
top: 50%;
height: 0;
overflow: hidden;
font-size: 0;
line-height: 0;
border-width: 10px;
border-color: transparent transparent transparent #e05c55;
border-style: dashed dashed dashed solid;
}
.title{
padding-top: 22px;
width: 27px;
line-height: 17px;
text-align: center;
}
.ocx{
position: relative;
float: left;
display: inline;
width: 906px;
padding-top: 0px;
height: 100%;
background: rgb(228, 233, 233);
}
.ocxjs{
position: relative;
float: left;
display: inline;
width: 285px;
padding-top: 0px;
height: 100%;
background: rgb(228, 233, 233);
}
.ocx table{
margin-top: 20;
}
javascript
var REQ_URL = '';//服务器接口地址
//机器唯一标识
var MACHINE_SN= '';
var cc_insterfaceUser = "",
cc_insterfaceUserpass = "",
cc_loginStatus = "",
cc_phoneNo = "";
if(!!_pobj2.user.cu_ccphonenumber&&_pobj2.user.cu_ccphonenumber!=="")
cc_phoneNo = _pobj2.user.cu_ccphonenumber;
cc_phonePass= "",
cc_lastCallNo = "",
cc_lastRingNo = "",
cc_lastconfrenceRoomNo = '',
cc_lastpopwindow = "";
var agentPassWord="111111";
var callBarUserRoles="10,12,27";
var ftpDirectory="";
var ftpPassWord="";
var ftpServerIP="HTTP://media.jhdz.org:9999/media/{vccid}/";
var ftpServerPort=21;
var ftpUser="test";
var main_ext_js="/JVccBar/scripts/japp.js";
var ocxstyle="lightRed";
var outCallCrmID=396;
var serverIP="192.168.15.8";
var sipPassWord="00000000";
var sipPort=5066;
var testCallNo="null" ;
var vccid="888888";
var crtqueuelisthide = "";
var crtqueuelistshow = "";
var crtagentstatus ="";
var crttimelength = "";
var CallData = "";
var calllogbizid = 274;//创建呼叫历史单的bizid
//设置在线时长
function cc_setAgentTimeLength(){
$("#subframe")[0].contentWindow.setAgentTimeLength();
}
//设置作息状态
function cc_setAgentStatus(){
$("#subframe")[0].contentWindow.getAgentStatus();
}
function popinfo(caller){
cc_lastpopwindow = top.go2("/commons/prg_115?mobile="+caller);
loading(false);
}
function switcher(order){
var dom= $("#callcenter");
if(dom.hasClass("opened"))
{
if(document.all){
$(dom).css({ "right": "-300px" }).removeClass("opened");
}
else{
$(dom).css({ "right": "-336px" }).removeClass("opened");
}
}
else{
$(dom).css({ "right": "0px" }).addClass("opened");
}
}
function addPhoneBar(){
$(document.body).append(
"<div id=\"call_bar_\" style=\"z-index: 9999999999;position: fixed; bottom: 10px; right: 10px; display:block;\">"
+"<i onclick=\"popinfo()\" title=\"填写表单\" class=\"iconfont icon-XT-017\" aria-hidden=\"true\" style=\"font-size: 34px;color: #c0de54;border: 4px solid;position: absolute;bottom: 80px;width: 60px;height: 60px;right: -1px;line-height: 60px;text-align: center;border-radius: 15px;cursor: pointer;\"></i>"
+"<img src=\"/images/call_bar.png\" title=\"电话功能\" style=\"cursor:pointer;width: 60px;height: 60px;\" onclick=\"switcher()\" ></div>"
+"<div class=\"callcenterjs box-shadow\" id=\"callcenter\" ><div id=\"ocx\" class=\"ocxjs\">"
+"<iframe id=\"subframe\" height=\"100%\" marginHeight=\"0\" src=\"\" frameBorder=\"0\" width=\"100%\" marginWidth=\"0\" scrolling=\"yes\"></iframe></div></div>");
}
//初始化
function cc_init() {
$("#callcenter").addClass("callcenterjs");//chrome,firefox
$("#callcenter iframe").attr("src","/commons/prg_116");
}
//保持
function cc_hold() {
$("#subframe")[0].contentWindow.hold();
}
//接回(取消保持)
function cc_retrieveHold() {
$("#subframe")[0].contentWindow.retrieveHold();
}
//复位
function cc_forcreset() {
$("#subframe")[0].contentWindow.forcreset();
}
//转出
function cc_transferOut(){
$("#subframe")[0].contentWindow.transferOut();
}
//咨询第三方
function cc_consult(){
$("#subframe")[0].contentWindow.consult();
}
//转移第三方
function cc_transfer(){
$("#subframe")[0].contentWindow.transfer();
}
//创建会议
function cc_conference(){
$("#subframe")[0].contentWindow.conference();
}
//置忙
function cc_setBusy(){
$("#subframe")[0].contentWindow.setBusy();
}
//置闲
function cc_setIdle(){
$("#subframe")[0].contentWindow.setIdle();
}
//重拨
function cc_recall(){
$("#subframe")[0].contentWindow.recall();
}
//静音
function cc_mute(){
$("#subframe")[0].contentWindow.mute();
}
//开始录音(DestAgentID 目标座席工号|fileName 文件名:为空时,自动生成文件名)
function cc_startRecord(destAgentID, fileName){
$("#subframe")[0].contentWindow.startRecord();
}
//停止录音(DestAgentID 目标座席工号)
function cc_endRecord(destAgentID){
$("#subframe")[0].contentWindow.endRecord(destAgentID);
}
//本机接听电话(咨询类型:0:不录音,1:录音)
function cc_answer(consulttype) {
$("#subframe")[0].contentWindow.answer(consulttype);
}
//本机直接拨打电话
function cc_dialByBar(callnum) {
$("#subframe")[0].contentWindow.dialByBar(callnum);
}
//本机挂断电话
function cc_disconnect() {
$("#subframe")[0].contentWindow.disconnect();
}
function togglewindow() {}
//登入
function cc_login() {}
//登出
function cc_logout() {}
//订阅分机
function cc_subscribe() {}
//呼叫号码
function cc_callExt() {}
//监听
function cc_eavesdrop() {}
//密语
function cc_whisper() {}
//强插
function cc_bargein() {}
//强拆
function cc_fhangup() {}
//邀请人员
function cc_confInvite() {}
//只有设置了cc分机号的才执行
if (_pobj2.cc_phoneNo > "") {
addPhoneBar();
cc_init();
}
1.2. 弹屏框架模板
实现位置"系统管理>自定义程序设计>自定义程序类>添加"呼叫弹屏">添加"呼叫弹屏主框架"
html代码
<!-- 搜索 -->
<div id="div_top_bar" class="ebs_top_bar f16" style="color:#fff;height:45px;margin-top: 15px;">
<div style="float: left;padding-left: 20px;">
<div class="input-group form-search" style="padding-top:0px;float:right;margin-top:10px">
<input type="text" class="form-control input-sm hideinnerbutton" id="ed_search" onkeyup="keyup(event,this)" style="border-radius:16px 16px 16px 16px;width: 200px;border:1px solid #3a97de!important;padding-left: 15px;padding-right:12px;" placeholder="客户电话号码"/><button id="bt_search" onclick="dosearch()" type="button" class="btn btn-primary btn-sm" style="background-color:#f5f5f5;color:#666;width: 57px;height:30px;"><span class="glyphicon glyphicon-search"></span></button>
</div>
</div>
<div onclick="neworder(258,'',0,0,this)" style="text-align: center;line-height: 45px;width: 50px;height: 45px;background-position: center;cursor: pointer;float: left;margin-left: 20px;" title="新建">
新建
</div>
<div style="float: left;width: 150px;height: 45px;margin-left: 50px;" id="nav_bar">
<div onclick="_pobj2.cc_answer()" style="width: 50px;height: 45px;float: left;padding-left: 12px;">
<span style="background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAkxJREFUeNrMmItxwjAMhoHrAOkG3qAZATZgBHcDNqg7Ad3A3QA2yAihE4QNwgaufaccOsUP2TGlvtORA9l8sa1fstfGmNV/bJvIb9raaK1hjGPAnH9nTVlrF5G5GfOYNvemAj7YQm2wJhn9Z5aCcm201iQG6gCiGmAKKmfWVvACe2tHeCHaOsZLzsC0iTdRsCTSM5MOuOWCpaAM+KwKTXlmUKbApOE3Edn8IyzVIeDnZqkn4+1jYCoDTGdEpfYANgQuuKy5YCYw0BjxVwm4wRcQmwLp8wnnK9i7tTP57cPaCQn1zdoOPl0T4DMT2G3GbPXMcG9hv9G+2If+75YuZVMZikZjbI9qonEzuegTUEMCyu2xU0ACZCQSRWj/Tg6HBJjKyJW9J0B05CW1b0ZxpIwLxFUn1L0hGUCS/Yj7ZaUkTiIXsJy4jwgsKQ2EgQbBKrLepYlcR2Z6DGQR3Ofgqy5UpUTeMwDwcuI9fvQJ7Je1a0RcT0wR/kTPW/T8g54Fer5QAX8hA95AvbuI6mvwibUzgruS7xsPzHXmH1iKY2JJ5YISqLi09iXaP4dL5bvxWXApB06Cl88A41a43LJbgiSJGmBcuC7xh5pkBVUDjAs3TsrNPBYOtA4rAcs5uAwgOVuSP9mzXbIxc05VuU1NxcK68LZnDxmgecBFj1P+3aaw8xkOFJcHgLmXvW0WDHABuO+KUPcTVCVB3DOyBCei2yWbP5ZfdQ2o2mC4EtZLoB4FhgGPiQu94N1FqVyUXCu4SvYNVa5TceitmH8FGAACKcDxcc9CdAAAAABJRU5ErkJggg==);background-repeat: no-repeat;width: 20px;height: 20px;background-position: center;MARGIN-TOP: 14PX;cursor: pointer;float: left;background-size: cover;" title="应答"></span>
</div>
<div onclick="_pobj2.cc_hangupCall()" style="width: 50px;height: 45px;float: left;padding-left: 12px;">
<span style="background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zz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Y+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAi5JREFUeNrs101rVVcUxvHfvSatsdoXxDdQMVqR0mmLUpAWcaDSj1Ad+jl04EQnzvwGIlgcCB05kCK2k1IQSy2mxklFVHyr0STGm8eBSwnBmKO5vgzOA5t92Oectf5nr73X2qeTxIeorg9ULVgL1oL1UYP9MDLwBu+sxhPcQw/D2IRgrPoe/sdVfIZJPOgn2KJysg17cBcrsBjfYAIPsRZfYwjXcB3/4Tw+wniNDWEUN3EDd+Zy3Jkj868vYzuwD5/g+xn3H2BZw4+frg+6XWG+jvs1mz/jbBOwlQV1BF8W3Oa3sA6nK+yjOI5fcaFC/kxJnrdvkxzMM03m3Wkiyekku2awvADbmeS31zR4p/rpJI/q+laSm28AN5XkQpK9ST5OopNkGL9jVcMwnMNSnMaZWmsb8FWtvb+wvEK1Cd/VBtjewPY/OICTirKJziY5lmRtkm6Sz2dOfbVukiVJls0aG0jyU5KTDfz8nWSNJD80ePhJkh9fAvI6bbB8Tc/jq5dka7fy0nyaqF2zEE3hciXnV6mHqW6liPn0uFLHQrUBnXmeGcftbsNFP14laKFa0aDaTOJet2rfXBqr/pcGIWiiURyqbH9xhv3ZIR8bwJpZN27gD3yKEZyqbdwPjeBwVZVB7K6IrcPGGn+M3kDlGDiBS3UqOFoF/Iuqcf36lZqo9mfZ/7fy4PKC2l8zppNkS9XDKwX2PjVcZ8Qrnfa/sgVrwVqwFqwFa8FasL7q6QA0NqDb+Y+feQAAAABJRU5ErkJggg==);background-repeat: no-repeat;width: 24px;height: 24px;background-size: cover;background-position: center;cursor: pointer;float: left;MARGIN-TOP: 14PX;background-size: cover;" title="挂断"></span>
</div>
</div>
<div id="agentStatusBar" style="color: rgb(255, 255, 255);float:right;height: 45px;line-height: 45px;font-size:11px">
<div style="float: left;margin-right: 20px;">
坐席状态:<span id="agentstatus"></span>
</div>
<div style="float: left;margin-right: 20px;">
在线时长:<span id="timelength"></span>
</div>
<div style="float: left;margin-right: 20px;">
<span id="queuelists"><span id="queuelistshow"></span><span id="queuelisthide"></span></span>
</div>
<div style="float: left;margin-right: 20px;">
客户按键:<span id="CallData"></span>
</div>
</div>
</div>
<div class="content" style="width: 100%;">
<!--弹出框-->
<div id="pop" class="pop">
<iframe id="EditView" marginwidth="0" marginheight="0" frameborder="0" width="100%" style="height: 100%;text-align;text-align:center;"></iframe>
</div><!--弹框按钮-->
<div id="pop_btn" class="glyphicon glyphicon-chevron-right" style="float: left;top: 0px;"></div>
<div id="move" class="move">
<div style="height:215px;">
<div id="POSVIP" style="width: 100%;height: 215px;overflow-y: scroll;float: left;">
<table cellspacing="0" cellpadding="0" border="0" id="tb_POSVIP" class="tablesimple b0 excel" style="WIDTH:100%;border-left-width: 0px;" autopagesize="0" pagesize="100" pagecount="1">
<tbody name="title">
<tr class="firstRow">
<td nowrap="" name="order" style="width:40px;">
序
</td>
<td nowrap="" name="" align="center" style="width:120px;">
操作
</td>
<td nowrap="" name="ord_no" align="center" style="width:200px;">
单号
</td>
<td nowrap="" name="ord_date" align="center" style="width:200px;">
日期
</td>
<td nowrap="" name="ord_type" align="center" style="width:100px;">
类型
</td>
<td nowrap="" name="ord_creator" align="center" style="width:100px;">
处理人
</td>
<td nowrap="" name="ord_status" align="center" style="width:100px;">
状态
</td>
<td nowrap="" name="ord_zxmd" align="center">
摘要
</td>
</tr>
</tbody>
<tbody name="details" style="DISPLAY:none">
<tr value="{ord_id}" cardno="{ord_no}">
<td align="center" nowrap="">
{order}
</td>
<td nowrap="" align="center">
<a href="javascript:void(0)" onclick="showmebiz({ord_bizid} ,{ord_id})">查看</a><span>|</span><a href="javascript:void(0)" onclick="neworder(258,'biz',{ord_bizid} ,{ord_id},this)">继续</a>
</td>
<td nowrap="" name="ord_no">
{ord_no}
</td>
<td nowrap="" name="ord_date" fmt="yyyy-mm-dd hh:nn">
{ord_date}
</td>
<td nowrap="" name="ord_type">
{ord_type}
</td>
<td nowrap="" name="ord_creator">
{ord_creator}
</td>
<td nowrap="" name="ord_status">
{ord_status}
</td>
<td nowrap="" name="ord_zxmd">
{ord_zxmd}
</td>
</tr>
</tbody>
</table>
<div id="tb_POSVIP_pageinfo" multi="1" class="info" style="padding-top:10px;padding-bottom:10px;padding-left:40px;padding-right:40px;"></div>
</div>
</div><!-- 二级标题 -->
<div class="ebs_top_bar f16" style="color:#fff;height:30px;">
<div class="navbar-header" id="sub_title" style="margin-left: 20px;line-height: 30px;">
咨询历史
</div>
</div><!--咨询历史信息-->
<div id="history" class="history" style="height: 610px;">
<iframe id="ReadOnlyView" marginwidth="0" marginheight="0" frameborder="0" width="100%" scrolling="yes" style="height: 100%;"></iframe>
</div>
</div>
</div>
Css代码
body {
margin: 0;
padding: 0;
overflow-y: hidden;
}
#nav_bar>div {
background: none;
}
#nav_bar>div:hover {
background: #7c69e4;
}
#pop {
width: 50%;
z-index: 100;
display: none;
background: white;
overflow-y: hidden;
float: left;
height: 870px;
}
#pop_btn {
display: inline-block;
color: #424851;
cursor: pointer;
z-index: 200;
line-height: 56;
background-color: #cfcfcf;
width: 1%;
float:left;
height: 878px;
text-align:center;
font-size:10px;
}
#move {
width: 99%;
overflow-y: hidden;
overflow-x: auto;
float: left;
height: 870px;
}
JavaScript代码
$(function () {
$("body").css("height", $(document).height()-15+'px');
console.log($(document).height());
$("#pop_btn").click(function () {//点击扩展按钮将展出框徐徐展出
var val = $(this).attr("class");
if (val == "glyphicon glyphicon-chevron-right") {
$("#pop").animate({ width: "toggle" }, 500, function () {
$("#pop_btn").removeClass("glyphicon-chevron-right");
$("#pop_btn").addClass("glyphicon-chevron-left");
});
$("#move").animate({width: "49%" }, 500);
$("#EditView").contents().find("body").css("overflow-y","hidden");
} else {//点击扩展按钮将展出框徐徐收回
$("#pop").animate({ width: "toggle" ,display: "none"}, 500);
$("#pop_btn").removeClass("glyphicon-chevron-left");
$("#pop_btn").addClass("glyphicon-chevron-right");
$("#pop_btn").animate({ left: "0px" }, 500);
$("#move").animate({ width: "99%" }, 500);
}
});
});
function neworder(bizid1,stype1,sbizid1,sordids1,obj) {
loading(true);
var founderror = "";
runsql4xml("order_" + bizid1 + "_newbiz", { bizid: bizid1, stype: stype1, sbizid: sbizid1, sordids: sordids1, sord2tag: 0, sord2id: 0,returndatasets: 2, newordid: 0, jbid: 0 }, function (iseof, data1, dsname1) {
if (!iseof) {
if ($flds.indexOf("errorinfo") >= 0) { alert("出错了|" + $f[_errorinfo]); founderror = true; } else {
var newordid = $f[0];
if (!founderror) {
window.document.getElementById("EditView").src = "/order/biztop.htm?crmid=" + bizid1 + "&ordid=" + newordid + "&cap1="+ tohex("新建")+" & back=0";
var val = $("#pop_btn").attr("class");
if (val == "glyphicon glyphicon-chevron-right") {
$("#pop").animate({ width: "toggle" }, 500, function () {
$("#pop_btn").removeClass("glyphicon-chevron-right");
$("#pop_btn").addClass("glyphicon-chevron-left");
});
$("#move").animate({ width: "49%" }, 500);
$("#EditView").contents().find("body").css("overflow-y","hidden");
}
loading(false);
}
}
}
});
}
function keyup(e,obj){
if(!!e&&e.key=="Enter"&&obj.id =="ed_search") {
e.cancelBubble = true;
e.preventDefault();
e.stopImmediatePropagation();
dosearch();
}
}
function dosearch(){
var mobile = $("#ed_search").val();
var objx = $("#div_top_bar div.active")[0];
clickmenuitem(mobile);
neworder(258,'',0,0,this);
}
function setWidthHeigth(){
var width = screen.availWidth-120;
$("#SCORE,#ORDER,#ACCOUNT").width(width);
}
function clickmenuitem(mobile1)
{
var mobile = mobile1?mobile1:$("#ed_search").val();
mytable("tb_POSVIP","CALLCENTER_GETHISTORY&mobile="+mobile,null,10,20);
autoclientheight() ;
}
function showmebiz(crmid,ordid){
$(".selected").removeClass("selected");
$("#tr_"+ordid).addClass("selected");
window.document.getElementById("ReadOnlyView").src="/order/biz.htm?crmid="+crmid+"&ordid="+ordid;
}
$(document).ready(function(){
var mobile = queryParams("mobile");
_pobj2.crtagentstatus = $("#agentstatus");
_pobj2.crttimelength = $("#timelength");
_pobj2.crtqueuelisthide =$("#queuelisthide");
_pobj2.crtqueuelistshow =$("#queuelistshow");
_pobj2.CallData = $("#CallData");
$("#ed_search").val(mobile);
setWidthHeigth();
dosearch();
_pobj2.cc_setAgentTimeLength();
_pobj2.cc_setAgentStatus();
});
sql查询咨询历史记录
USE [ebs2java]
GO
/****** Object: StoredProcedure [dbo].[cc_desk_gethistory] Script Date: 2018/11/22 15:37:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[cc_desk_gethistory]
-- Add the parameters for the stored procedure here
@pagesize int,
@pagecount int ,
@mobile nvarchar(50)
AS
BEGIN
SET NOCOUNT ON;
if(@mobile = '') return;
--t1 查询有多少个
select count(*) cnt from order_261
where ord_no not like '%临%' and ord_khdh like '%'+@mobile+'%'
--t2 查询所有id值
select ord_id from order_261
where ord_no not like '%临%' and ord_khdh like '%'+@mobile+'%'
--t3 查询客户【咨询历史】信息
select top (@pagesize) ord_no,ord_date,ord_type,ord_zxmd,ord_creator,ord_status,ord_id,261 as ord_bizid
from order_261
where ord_no not like '%临%' and ord_khdh like '%'+@mobile+'%'
order by ord_date desc
set nocount off
END
1.3. API方法和弹屏框架模板关联
。。。