市长热线演示版

default.aspx 50KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="HySoft.BaseCallCenter.Web._default" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>鹤壁12345市长热线</title>
  6. <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="../scripts/ui/js/ligerBuild.min.js" type="text/javascript"></script>
  9. <script src="../scripts/function.js" type="text/javascript"></script>
  10. <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
  11. <link href="../images/style.css" rel="stylesheet" type="text/css" />
  12. <script type="text/javascript" src="seatformjs/ocxopt.js"></script>
  13. <script src="seatformjs/formopt.js" type="text/javascript"></script>
  14. <script type="text/javascript">
  15. /*
  16. 操作ligerui控件 左侧菜单及tab页面操作
  17. */
  18. //框架操作
  19. var tab = null;
  20. var accordion = null;
  21. var tree = null;
  22. $(function () {
  23. //页面布局
  24. $("#global_layout").ligerLayout({ leftWidth: 180, height: '100%', topHeight: 65, bottomHeight: 24, allowTopResize: false, allowBottomResize: false, allowLeftCollapse: true, onHeightChanged: f_heightChanged });
  25. var height = $(".l-layout-center").height();
  26. //Tab
  27. $("#framecenter").ligerTab({ height: height });
  28. //左边导航面板
  29. $("#global_left_nav").ligerAccordion({ height: height - 25, speed: null });
  30. $(".l-link").hover(function () {
  31. $(this).addClass("l-link-over");
  32. }, function () {
  33. $(this).removeClass("l-link-over");
  34. });
  35. //快捷菜单
  36. var menu = $.ligerMenu({
  37. width: 120, items:
  38. [
  39. { text: '管理首页', click: itemclick },
  40. { text: '修改密码', click: itemclick },
  41. { line: true },
  42. { text: '关闭菜单', click: itemclick }
  43. ]
  44. });
  45. $("#tab-tools-nav").bind("click", function () {
  46. var offset = $(this).offset(); //取得事件对象的位置
  47. menu.show({ top: offset.top + 27, left: offset.left - 120 });
  48. return false;
  49. });
  50. InitTree();
  51. tab = $("#framecenter").ligerGetTabManager();
  52. accordion = $("#global_left_nav").ligerGetAccordionManager();
  53. $("#pageloading_bg,#pageloading").hide();
  54. });
  55. function InitTree() {
  56. var HdModuleFunIdCount = $("#HdModuleFunIdCount").val();
  57. for (var i = 1; i <= HdModuleFunIdCount; i++) {
  58. $("#tree" + i.toString() + "").ligerTree({
  59. checkbox: false,
  60. nodeWidth: 135,
  61. onClick: function (node) {
  62. if (!node.data.url) return;
  63. var tabid = $(node.target).attr("tabid");
  64. if (!tabid) {
  65. tabid = new Date().getTime();
  66. $(node.target).attr("tabid", tabid)
  67. }
  68. f_addTab("frame_" + node.data.id, node.data.text, node.data.url);
  69. // if (node.data.id == "zxjkgl") {
  70. // f_addTab("zxjkgl", node.data.text, node.data.url);
  71. // }
  72. // else {
  73. // f_addTab(tabid, node.data.text, node.data.url);
  74. // }
  75. }
  76. });
  77. }
  78. }
  79. //快捷菜单回调函数
  80. function itemclick(item) {
  81. switch (item.text) {
  82. case "管理首页":
  83. f_addTab('home', '管理中心', 'center.aspx');
  84. break;
  85. case "快捷导航":
  86. //调用函数
  87. break;
  88. case "修改密码":
  89. ChangePwd();
  90. break;
  91. default:
  92. //关闭窗口
  93. break;
  94. }
  95. }
  96. function ChangePwd() {
  97. //testfun();
  98. //f_addTab('manager_pwd', '修改密码', 'rightsmanage/userpsdedit.aspx');
  99. var ResetPass = document.getElementById("hfUserId").value;
  100. OpenWindowShow('sysmanage/userResetPasswod.aspx?ResetPass=' + ResetPass, '修改密码', 500, 380);
  101. }
  102. function OpenWindowShow(Url, Title, Width, Height) {
  103. $.ligerDialog.open({
  104. title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true, buttons: [
  105. { text: '关闭', onclick: function (item, dialog) { dialog.close(); } }
  106. ], isResize: true
  107. });
  108. }
  109. function f_heightChanged(options) {
  110. if (tab)
  111. tab.addHeight(options.diff);
  112. if (accordion && options.middleHeight - 24 > 0)
  113. accordion.setHeight(options.middleHeight - 24);
  114. }
  115. //添加Tab,可传3个参数
  116. function f_addTab(tabid, text, url, iconcss) {
  117. if (!tab.isTabItemExist(tabid)) {
  118. if (arguments.length == 4) {
  119. tab.addTabItem({ tabid: tabid, text: text, url: url, iconcss: iconcss });
  120. } else {
  121. tab.addTabItem({ tabid: tabid, text: text, url: url });
  122. }
  123. }
  124. else {
  125. tab.selectTabItem(tabid);
  126. }
  127. }
  128. //删除Tab,通过tabid
  129. function f_removeTab(tabid) {
  130. if (tab.isTabItemExist(tabid)) {
  131. tab.removeTabItem(tabid);
  132. }
  133. }
  134. //提示Dialog并关闭Tab
  135. function f_errorTab(tit, msg) {
  136. $.ligerDialog.open({
  137. isDrag: false,
  138. allowClose: false,
  139. type: 'error',
  140. title: tit,
  141. content: msg,
  142. buttons: [{
  143. text: '确定',
  144. onclick: function (item, dialog, index) {
  145. //查找当前iframe名称
  146. var itemiframe = "#framecenter .l-tab-content .l-tab-content-item";
  147. var curriframe = "";
  148. $(itemiframe).each(function () {
  149. if ($(this).css("display") != "none") {
  150. curriframe = $(this).attr("tabid");
  151. return false;
  152. }
  153. });
  154. if (curriframe != "") {
  155. tab.removeTabItem(curriframe);
  156. dialog.close();
  157. }
  158. }
  159. }]
  160. });
  161. }
  162. function userExit() {
  163. $.ligerDialog.confirm("确定要退出吗?", "提示信息", function (result) {
  164. if (result) {
  165. try {
  166. if (document.getElementById("txtIsAgent").value == "true") {
  167. OCX_AgentLogOut();
  168. }
  169. }
  170. catch (e) {
  171. }
  172. __doPostBack('lbtnExit', '');
  173. }
  174. });
  175. }
  176. document.oncontextmenu = function (e) { return false; }
  177. </script>
  178. <script type="text/javascript">
  179. //图片操作
  180. //切换头部文件
  181. function backImgOver(num, obj) {
  182. var st = obj.attributes["ostate"].value;
  183. if (st == "1") {
  184. obj.src = "../images/totle/" + num + "1.png";
  185. }
  186. else {
  187. obj.src = "../images/totle/" + num + "3.png";
  188. }
  189. }
  190. function backOutImg(num, obj) {
  191. var st = obj.attributes["ostate"].value;
  192. if (st == "1") {
  193. obj.src = "../images/totle/" + num + "2.png";
  194. }
  195. else {
  196. obj.src = "../images/totle/" + num + "3.png";
  197. }
  198. }
  199. function setLinkStatus(str) {
  200. var imgServerState = document.getElementById("imgServerState");
  201. if (str == "True") {
  202. imgServerState.src = "../images/server1.png";
  203. imgServerState.alt = "签入";
  204. ServerResInfo("服务签入");
  205. }
  206. else {
  207. imgServerState.src = "../images/server0.png";
  208. imgServerState.alt = "未签入";
  209. ServerResInfo("服务未签入");
  210. //AutographJoin();
  211. }
  212. }
  213. function setAgentStatus(str) {
  214. var imgAgentState = document.getElementById("imgAgentState");
  215. switch (str) {
  216. case "离席":
  217. imgAgentState.src = "../images/zx2.png";
  218. imgAgentState.alt = "未登录";
  219. ServerResInfo("坐席未登录");
  220. break;
  221. case "空闲":
  222. imgAgentState.src = "../images/zx1.png";
  223. imgAgentState.alt = "空闲";
  224. ServerResInfo("坐席空闲");
  225. break;
  226. case "忙":
  227. imgAgentState.src = "../images/zx3.png";
  228. imgAgentState.alt = "忙";
  229. ServerResInfo("坐席忙");
  230. break;
  231. case "业务处理":
  232. imgAgentState.src = "../images/zx4.png";
  233. imgAgentState.alt = "业务处理";
  234. ServerResInfo("业务处理");
  235. break;
  236. }
  237. }
  238. function ServerResInfo(res) {
  239. //document.getElementById("spanServerRes").innerHTML = res;
  240. }
  241. //变换图标 挂断转满意度 .外乎。置忙。置闲。三方通话。转移。保持。接回
  242. function Form_setWinfromenble(begd, beMakeCall, bezm, bezx, behy, beTransfer, bebc, bejh, beqr, beqc) {
  243. if (begd == "True") {
  244. OptByName("gd");
  245. }
  246. else {
  247. OptNullByName("gd");
  248. }
  249. if (beMakeCall == "True") {
  250. OptByName("wh");
  251. }
  252. else {
  253. OptNullByName("wh");
  254. }
  255. if (bezm == "True") {//示忙可以用
  256. OptByName("zm");
  257. }
  258. else {
  259. OptNullByName("zm");
  260. }
  261. if (bezx == "True") {//示闲可以用
  262. OptByName("zx");
  263. }
  264. else {
  265. OptNullByName("zx");
  266. }
  267. if (behy == "True") {
  268. OptByName("dfth");
  269. }
  270. else {
  271. OptNullByName("dfth");
  272. }
  273. if (beTransfer == "True") {
  274. OptByName("zy");
  275. }
  276. else {
  277. OptNullByName("zy");
  278. }
  279. if (bebc == "True") {
  280. OptByName("bc");
  281. }
  282. else {
  283. OptNullByName("bc");
  284. }
  285. if (bejh == "True") {
  286. OptByName("jh");
  287. }
  288. else {
  289. OptNullByName("jh");
  290. }
  291. if (beqr == "True") {
  292. OptByName("qr");
  293. }
  294. else {
  295. OptNullByName("qr");
  296. }
  297. if (beqc == "True") {
  298. OptByName("qc");
  299. }
  300. else {
  301. OptNullByName("qc");
  302. }
  303. }
  304. function OptNull() {
  305. document.getElementById("gd").src = "../images/totle/gd3.png";
  306. document.getElementById("wh").src = "../images/totle/wh3.png";
  307. document.getElementById("zm").src = "../images/totle/zm3.png";
  308. document.getElementById("zx").src = "../images/totle/zx3.png";
  309. document.getElementById("dfth").src = "../images/totle/dfth3.png";
  310. document.getElementById("zy").src = "../images/totle/zy3.png";
  311. document.getElementById("bc").src = "../images/totle/bc3.png";
  312. document.getElementById("jh").src = "../images/totle/jh3.png";
  313. document.getElementById("qr").src = "../images/totle/qr3.png";
  314. document.getElementById("qc").src = "../images/totle/qc3.png";
  315. document.getElementById("gd").src = 0;
  316. document.getElementById("wh").src = 0;
  317. document.getElementById("zm").src = 0;
  318. document.getElementById("zx").src = 0;
  319. document.getElementById("dfth").src = 0;
  320. document.getElementById("zy").src = 0;
  321. document.getElementById("bc").src = 0;
  322. document.getElementById("jh").src = 0;
  323. document.getElementById("qr").src = 0;
  324. document.getElementById("qc").src = 0;
  325. document.getElementById("gd").style.cursor = "default";
  326. document.getElementById("wh").style.cursor = "default";
  327. document.getElementById("zm").style.cursor = "default";
  328. document.getElementById("zx").style.cursor = "default";
  329. document.getElementById("dfth").style.cursor = "default";
  330. document.getElementById("zy").style.cursor = "default";
  331. document.getElementById("bc").style.cursor = "default";
  332. document.getElementById("jh").style.cursor = "default";
  333. document.getElementById("qr").style.cursor = "default";
  334. document.getElementById("qc").style.cursor = "default";
  335. }
  336. function OptNullByName(name) {
  337. var obj = document.getElementById(name);
  338. obj.src = "../images/totle/" + name + "3.png";
  339. obj.attributes["ostate"].value = 0;
  340. //obj.ostate = 0;
  341. obj.style.cursor = "default";
  342. }
  343. function OptByName(name) {
  344. var obj = document.getElementById(name);
  345. obj.src = "../images/totle/" + name + "2.png";
  346. obj.attributes["ostate"].value = 1;
  347. //obj.ostate = 1;
  348. obj.style.cursor = "hand";
  349. }
  350. </script>
  351. <script type="text/javascript">
  352. ///转移
  353. function PhoneCallZY(tel) {
  354. try {
  355. var callinphone = document.getElementById("forZYnumber").value;
  356. OCX_TransferToPhone(tel);
  357. }
  358. catch (e) {
  359. $.ligerDialog.error(e.message);
  360. }
  361. }
  362. ///多方通话
  363. function PhoneCallDFTH(tel) {
  364. try {
  365. var callinphone = document.getElementById("forZYnumber").value;
  366. OCX_ThirdParty(tel);
  367. }
  368. catch (e) {
  369. $.ligerDialog.error(e.message);
  370. }
  371. }
  372. ///工单接单时候调用的外呼方法
  373. function PhoneCallOutJD(type, tel, workorderid) {
  374. becallout = true;
  375. becallcome = false;
  376. //添加外呼记录
  377. var userid = document.getElementById("txtAgentId").value;
  378. var usercode = document.getElementById("lblAgentCode").innerHTML;
  379. var username = document.getElementById("lblAgentName").innerHTML;
  380. var extnumber = document.getElementById("lblAgentExt").innerHTML;
  381. username = encodeURI(username);
  382. $.ligerDialog.waitting('开始呼叫...');
  383. $.ajax({
  384. type: 'get',
  385. url: '../telmanage/ajax/telrecords.ashx?action=callout&phone=' + tel + "&workorderid=" + workorderid + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber,
  386. dataType: 'html',
  387. success: function (res) {
  388. try {
  389. var DialIsOK = false;
  390. var arr = res.split('|');
  391. document.getElementById("CallHjbh").value = arr[2];
  392. //成功执行外呼叫
  393. if (arr[0] == "1") { //呼叫内部(座席)电话
  394. //2015-04-20
  395. becallout = true;
  396. becallcome = false;
  397. DialIsOK = OCX_CallOut(5, "", arr[1]);
  398. }
  399. else { //呼叫外部电话
  400. DialIsOK = OCX_CallOut(5, "", arr[1]);
  401. }
  402. if (DialIsOK != true) {
  403. $.ligerDialog.error('外呼失败');
  404. }
  405. } catch (e) {
  406. $.ligerDialog.error(e.message);
  407. }
  408. $.ligerDialog.closeWaitting();
  409. }
  410. });
  411. }
  412. ///外呼
  413. function PhoneCallOut(type, tel) {
  414. becallout = true;
  415. becallcome = false;
  416. //添加外呼记录
  417. var userid = document.getElementById("txtAgentId").value;
  418. var usercode = document.getElementById("lblAgentCode").innerHTML;
  419. var username = document.getElementById("lblAgentName").innerHTML;
  420. var extnumber = document.getElementById("lblAgentExt").innerHTML;
  421. username = encodeURI(username);
  422. $.ligerDialog.waitting('开始呼叫...');
  423. $.ajax({
  424. type: 'get',
  425. url: '../telmanage/ajax/telrecords.ashx?action=callout&phone=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber,
  426. dataType: 'html',
  427. success: function (res) {
  428. try {
  429. var DialIsOK = false;
  430. var arr = res.split('|');
  431. document.getElementById("CallHjbh").value = arr[2];
  432. //成功执行外呼叫
  433. if (arr[0] == "1") { //呼叫内部(座席)电话
  434. //2015-04-20
  435. becallout = true;
  436. becallcome = false;
  437. DialIsOK = OCX_CallOut(5, "", arr[1]);
  438. }
  439. else { //呼叫外部电话
  440. DialIsOK = OCX_CallOut(5, "", arr[1]);
  441. }
  442. if (DialIsOK != true) {
  443. $.ligerDialog.error('外呼失败');
  444. }
  445. } catch (e) {
  446. $.ligerDialog.error(e.message);
  447. }
  448. $.ligerDialog.closeWaitting();
  449. }
  450. });
  451. }
  452. var hfcallstate = false;
  453. var outtype = "";
  454. function SetCallState(state) {
  455. hfcallstate = state;
  456. }
  457. function GetCallOutHFRes() {
  458. if (hfcallstate) {
  459. hfcallstate = false;
  460. return true;
  461. }
  462. else {
  463. return false;
  464. }
  465. }
  466. ///外呼
  467. function PhoneCallOutHF(type, tel, hfid) {
  468. becallout = true;
  469. becallcome = false;
  470. hfcallstate = false;
  471. outtype = "hf";
  472. //添加外呼记录
  473. var userid = document.getElementById("txtAgentId").value;
  474. var usercode = document.getElementById("lblAgentCode").innerHTML;
  475. var username = document.getElementById("lblAgentName").innerHTML;
  476. var extnumber = document.getElementById("lblAgentExt").innerHTML;
  477. var timeno = new Date().getTime();
  478. username = encodeURI(username);
  479. $.ligerDialog.waitting('开始呼叫...');
  480. $.ajax({
  481. type: 'get',
  482. url: '../telmanage/ajax/telrecords.ashx?action=callouthf&hfid=' + hfid + '&phone=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
  483. dataType: 'html',
  484. success: function (res) {
  485. try {
  486. var DialIsOK = false;
  487. var arr = res.split('|');
  488. document.getElementById("CallHjbh").value = arr[2];
  489. //成功执行外呼叫
  490. if (arr[0] == "1") { //呼叫内部(座席)电话
  491. //2015-04-20
  492. becallout = true;
  493. becallcome = false;
  494. DialIsOK = OCX_CallOut(5, "", arr[1]);
  495. }
  496. else { //呼叫外部电话
  497. DialIsOK = OCX_CallOut(5, "", arr[1]);
  498. }
  499. if (DialIsOK != true) {
  500. $.ligerDialog.error('外呼失败');
  501. }
  502. } catch (e) {
  503. $.ligerDialog.error(e.message);
  504. }
  505. $.ligerDialog.closeWaitting();
  506. }
  507. });
  508. }
  509. function OpenWindowShow1(Url, Title, Width, Height) {
  510. $.ligerDialog.open({
  511. title: Title, url: Url, height: Height, width: Width, isResize: true, modal: true, buttons: [
  512. { text: '关闭', onclick: function (item, dialog) { dialog.close(); AgentFree(); } }
  513. ], isResize: true
  514. });
  515. }
  516. function OptClick(name) {
  517. var obj = document.getElementById(name);
  518. if (obj.attributes["ostate"].value != 0) {
  519. switch (name) {
  520. case "gd":
  521. button_ReleaseAnswer();
  522. //挂断
  523. break;
  524. case "wh":
  525. //外呼先示忙
  526. //AgentBusy();
  527. //otype 1外呼 2转移 3多方通话
  528. OpenWindowShow1('telmanage/calloutopt.aspx?otype=1', '电话外呼', 800, 500);
  529. break;
  530. case "zm":
  531. //示忙
  532. AgentBusy();
  533. break;
  534. case "zx":
  535. AgentFree();
  536. break;
  537. case "dfth":
  538. //多方会话
  539. OpenWindowShow1('telmanage/calloutopt.aspx?otype=3', '多方通话', 800, 500);
  540. break;
  541. case "zy":
  542. //转移
  543. OpenWindowShow1('telmanage/calloutopt.aspx?otype=2', '电话转移', 800, 500);
  544. break;
  545. case "bc":
  546. //保持
  547. button_KeepCall(); //保持方法
  548. break;
  549. case "jh":
  550. //接回
  551. button_GetKeepCall();
  552. break;
  553. case "qr":
  554. //签入
  555. button_QRCall();
  556. break;
  557. case "qc":
  558. //签出
  559. button_QCCall();
  560. break;
  561. }
  562. }
  563. }
  564. //签入
  565. function button_QRCall() {
  566. Init();
  567. }
  568. //签出
  569. function button_QCCall() {
  570. try {
  571. var result = OCX_AgentLogOut();
  572. }
  573. catch (e) {
  574. document.getElementById("spanServerRes").innerHTML = e.message;
  575. }
  576. }
  577. //转移
  578. function ZYhj(callnumber) {
  579. var zyzj = document.getElementById("forZYnumber").value;
  580. if (zyzj != "") {
  581. Form_setWinfromenble("false", "false", "false", "false", "false", "false", "false", "false", "false", "false");
  582. }
  583. else {
  584. alert("转移失败!");
  585. }
  586. }
  587. //释放呼叫 2.1.8
  588. function button_ReleaseAnswer() {//挂机
  589. try {
  590. //MydTransToIVR();
  591. }
  592. catch (e) { }
  593. try {
  594. var rtn = OCX_Hangup();
  595. }
  596. catch (e) { }
  597. }
  598. //满意度
  599. function MydTransToIVR() {
  600. var rtn = OCX_TransferToIVR("8897", "");
  601. }
  602. //座席示忙 2.1.12
  603. function AgentBusy() {
  604. //将座席状态设置为忙态。
  605. var rtn = OCX_SetBusy();
  606. //2014-10-22
  607. becallout = true;
  608. becallcome = false;
  609. }
  610. //座席示闲 2.1.13
  611. function AgentFree() {
  612. //将座席状态设置为闲态。
  613. var rtn = OCX_SetFree();
  614. //2014-10-22
  615. becallout = false;
  616. becallcome = true;
  617. return rtn;
  618. }
  619. //保持呼叫 2.1.17
  620. function button_KeepCall() {
  621. //该方法把座席正在通话的普通语音呼叫保持(只对语音呼叫有效)。
  622. var rtn = OCX_Hold();
  623. }
  624. //取保持 2.1.18
  625. function button_GetKeepCall() {
  626. //查询座席当前保持的所有语音呼叫
  627. var rtn = OCX_UnHold();
  628. }
  629. function buttonCallNew(telNum) {
  630. becallout = true;
  631. becallcome = false;
  632. var strHjbhout = AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=3&tel=" + telNum); //呼叫编号
  633. document.getElementById("CallHjbh").value = strHjbhout;
  634. //判断电话是本地还是外地的
  635. var callNumberNew = "";
  636. var res = _framepage_headframe.getPhone(telNum);
  637. if (res != "") {
  638. callNumberNew = res.value;
  639. }
  640. button_CallOut(callNumberNew, strHjbhout);
  641. }
  642. //外呼事件 2.1.7
  643. function button_CallOut(callnumber, hjbh) {
  644. var res = true;
  645. var cssok = 0;
  646. cssok = OCX_CallOut(5, "", callnumber);
  647. if (cssok == "0") {
  648. res = true;
  649. }
  650. else {
  651. res = false;
  652. }
  653. return res;
  654. }
  655. //修改密码
  656. function updatePwd() {
  657. window.showModalDialog('../SysSettings/UserChangePassword.aspx', window, 'dialogWidth:350px;dialogHeight:200px;status:off;help:no;scrollbas:no;');
  658. }
  659. //重新登录
  660. function resetlogin() {
  661. var bol = window.confirm("确定要重新登录吗?");
  662. if (bol) {
  663. if (document.getElementById("txtIsAgent").value == "true") {
  664. //button_QCCallNew();
  665. }
  666. window.open("../SignIn.aspx", "_top");
  667. }
  668. }
  669. //退出方法
  670. function relogout() {
  671. var bol = window.confirm("确定要退出登录吗?");
  672. if (bol) {
  673. AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=14");
  674. _framepage_headframe.UpdateLoginOutInfo(document.getElementById("hfUserId").value);
  675. top.close();
  676. }
  677. }
  678. </script>
  679. <script type="text/javascript">
  680. //电话操作
  681. var becallout = false; //呼出
  682. var becallcome = true; //来电
  683. var CallOutRecordIsWrite = false; //呼出记录是否已写入
  684. //
  685. var Phone = document.getElementById("Phone");
  686. //测试方法
  687. function testfun() {
  688. fun();
  689. //1000 * 60 * 5 是五分钟
  690. setInterval(fun, 1000 * 15);
  691. }
  692. var i = 0;
  693. function fun() {
  694. i++;
  695. if (i > 3)
  696. { return; }
  697. Form_callCommingCaller('13335140729', '1402107209-5226' + i); //13335140729
  698. }
  699. //20150324薛广兴
  700. var oPopup = window.createPopup();
  701. function PopUpNotify() {
  702. var oPopupBody = oPopup.document.body;
  703. var HTMLBody = document.getElementById("emessagecontent").innerHTML;
  704. oPopupBody.innerHTML = HTMLBody;
  705. }
  706. function popupShow() {
  707. oPopup.show(screen.availWidth - 275, screen.availHeight - 161, 267, 160);
  708. }
  709. function popupHide() {
  710. oPopup.hide();
  711. }
  712. var showLong = null; //计时器,弹出框显示多久后关闭
  713. function showMsg() {
  714. var res;
  715. $.ajax({
  716. async: false,
  717. type: "Post",
  718. url: "default.aspx/Get",
  719. //方法传参的写法一定要对,str为形参的名字,str2为第二个形参的名字
  720. data: "{'id':'" + document.getElementById("UserID").value + "'}",
  721. contentType: "application/json; charset=utf-8",
  722. dataType: "json",
  723. success: function (data) {
  724. var pandaun = data.d;
  725. GetMsg_CallBack(pandaun);
  726. },
  727. error: function (err) {
  728. }
  729. });
  730. }
  731. function show() {
  732. showMsg();
  733. //1000 * 60 * 5 是五分钟
  734. setInterval(showMsg, 1000 * 60 * 5);
  735. }
  736. function GetMsg_CallBack(res) {
  737. if (res != null) {
  738. if (res != "0") {
  739. document.getElementById("countspan").innerHTML = "你有" + res + "个工单未处理。";
  740. PopUpNotify();
  741. popupShow();
  742. if (showLong != null) {
  743. clearTimeout(showLong);
  744. }
  745. showLong = setTimeout(popupHide, 1000 * 30);
  746. }
  747. }
  748. res = null;
  749. }
  750. //初始化页面
  751. function Init() {
  752. //show();
  753. var typed = document.getElementById("HdIswin"); //是否是坐席用户
  754. if (typed.value == "true") {
  755. $.ligerDialog.waitting('电话服务连接中...');
  756. $.ajax({
  757. type: 'get',
  758. url: '../telmanage/ajax/telrecords.ashx?action=insertCallLogs&serverip=' + document.getElementById("txtMostlyAddress").value + '&ctiusercode=' + document.getElementById("txtLabourNo").value,
  759. dataType: 'html',
  760. success: function (res) {
  761. InitPhoneBack();
  762. }
  763. });
  764. }
  765. else {
  766. document.getElementById("spanServerRes").innerHTML = "非坐席登录";
  767. }
  768. }
  769. function InitPhoneBack() {
  770. Initialize();
  771. }
  772. function Initialize() {
  773. try {
  774. //alert("ip" + document.getElementById("txtMostlyAddress").value + "服务器类型" + document.getElementById("ServerType").value + "工号"
  775. // + document.getElementById("txtLabourNo").value + "密码" + document.getElementById("pwd").value + "通讯进程号" + document.getElementById("txtPhoneID").value + "备用ip" + document.getElementById("txtSubordinationAddress").value);
  776. var result = OCX_AgentLogin(document.getElementById("txtMostlyAddress").value, document.getElementById("txtServerPort").value, document.getElementById("txtLabourNo").value, document.getElementById("txtAgentGroup").value, document.getElementById("txtPhoneNum").value);
  777. }
  778. catch (e) {
  779. document.getElementById("spanServerRes").innerHTML = e.message;
  780. }
  781. $.ligerDialog.closeWaitting();
  782. }
  783. </script>
  784. </head>
  785. <body onload="Init();" style="margin: 0px; padding: 0px; overflow: hidden;" scroll="no">
  786. <form id="form1" runat="server">
  787. <!-- 功能模块Id -->
  788. <input id="HdModuleFunIdCount" runat="server" style="display: none;" value="0" /><asp:HiddenField ID="ismonitoring" runat="server" Value="false" />
  789. <asp:HiddenField ID="HdIswin" runat="server" Value="fase" />
  790. <asp:HiddenField ID="UserID" runat="server" Value="fase" />
  791. <asp:HiddenField ID="hfUserId" runat="server" />
  792. <%--(用于初始化用的信息)--%>
  793. <input id="txtMostlyAddress" runat="server" type="hidden" value="192.168.172.50" /><%--(主用CTI服务器IP)--%>
  794. <input id="ServerType" type="hidden" runat="server" value="20" /><%--(服务器类型)--%>
  795. <input id="txtLabourNo" runat="server" type="hidden" value="8011" /><%--<%=Request.Cookies["ID"].Value %>(工号)--%>
  796. <input id="pwd" type="hidden" runat="server" value="000000" /><%--<%=Request.Cookies["ID"].Value %>(密码)--%>
  797. <input id="txtPhoneID" runat="server" type="hidden" value="43" /><%--(通讯进程号)--%>
  798. <input id="txtSubordinationAddress" runat="server" type="hidden" value="192.168.172.50" /><%--(备用CTI服务器IP)--%>
  799. <input id="txtIsAgent" runat="server" style="display: none;" value="" />
  800. <!-- 是否具有话务功能,是否坐席登录 -->
  801. <input id="txtAgentId" runat="server" style="display: none;" value="0" /><!-- 坐席ID -->
  802. <input id="txtAgentName" runat="server" style="display: none;" value="" />
  803. <input id="txtAgentRight" runat="server" style="display: none;" value="" />
  804. <input id="txtAgentGroup" runat="server" style="display: none;" value="10" />
  805. <input id="txtServerPort" runat="server" style="display: none;" value="" />
  806. <!-- 坐席权限 -->
  807. <%--(用于登录的信息)--%>
  808. <input id="SeatType" type="hidden" runat="server" value="4" /><%--<%=Request.Cookies["SkillSet"].Value %>(坐席类型)--%>
  809. <input id="txtPhoneNum" runat="server" type="hidden" value="86010" /><%--<%=Request.Cookies["ExtNum"].Value %>(分机号)--%>
  810. <input id="keepcall" type="hidden" value="" />
  811. <%--(keep号码)--%>
  812. <input id="txtLabourwork" runat="server" type="hidden" value="" /><%--(登录工号)--%>
  813. <input id="passwd" runat="server" type="hidden" value="" /><%--(登录坐席密码)--%>
  814. <input id="hjbh" type="hidden" runat="server" value="" /><%--(外乎呼叫编号)--%>
  815. <input id="CallHjbh" type="hidden" runat="server" value="" /><%--(来电呼叫编号)--%>
  816. <input id="forZYnumber" type="hidden" runat="server" value="" /><%--(用来存储来电号码--%>
  817. <input id="callnum" type="hidden" runat="server" value="" /><%--(来电主叫号码)--%>
  818. <div class="pageloading_bg" id="pageloading_bg">
  819. </div>
  820. <div id="pageloading">
  821. 数据加载中,请稍等...
  822. </div>
  823. <div id="global_layout" class="layout" style="width: 100%">
  824. <!--头部-->
  825. <div position="top">
  826. <div style="width: 100%;" class="header">
  827. <div class="header_box">
  828. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  829. <tr>
  830. <td align="left">
  831. <div style="float: left;">
  832. <a class="logo">Logo</a>
  833. </div>
  834. </td>
  835. <td align="center">
  836. <div style="float: left; padding-top: 5px; font-size: 15pt; color: White; font-weight: bold; padding-left: 10px; padding-left: 10px;"
  837. id="TelToolBar">
  838. <span id="spanTel">
  839. <a style="cursor: pointer">
  840. <img id="gd" ostate="0" src="../images/totle/gd3.png" onclick="OptClick('gd')" onmouseout="backOutImg('gd',this)" onmouseover="backImgOver('gd',this)" />
  841. </a>
  842. <a style="cursor: pointer; margin-left: 5px">
  843. <img id="wh" ostate="0" src="../images/totle/wh3.png" onclick="OptClick('wh')" onmouseout="backOutImg('wh',this)" onmouseover="backImgOver('wh',this)" />
  844. </a>
  845. <a style="cursor: pointer; margin-left: 5px">
  846. <img id="zm" ostate="0" src="../images/totle/zm3.png" onclick="OptClick('zm')" onmouseout="backOutImg('zm',this)" onmouseover="backImgOver('zm',this)" />
  847. </a>
  848. <a style="cursor: pointer; margin-left: 5px">
  849. <img id="zx" ostate="0" src="../images/totle/zx3.png" onclick="OptClick('zx')" onmouseout="backOutImg('zx',this)" onmouseover="backImgOver('zx',this)" />
  850. </a>
  851. <a style="cursor: pointer; margin-left: 5px">
  852. <img id="dfth" ostate="0" src="../images/totle/dfth3.png" onclick="OptClick('dfth')" onmouseout="backOutImg('dfth',this)" onmouseover="backImgOver('dfth',this)" />
  853. </a>
  854. <a style="cursor: pointer; margin-left: 5px">
  855. <img id="zy" ostate="0" src="../images/totle/zy3.png" onclick="OptClick('zy')" onmouseout="backOutImg('zy',this)" onmouseover="backImgOver('zy',this)" />
  856. </a>
  857. <a style="cursor: pointer; margin-left: 5px">
  858. <img id="bc" ostate="0" src="../images/totle/bc3.png" onclick="OptClick('bc')" onmouseout="backOutImg('bc',this)" onmouseover="backImgOver('bc',this)" />
  859. </a>
  860. <a style="cursor: pointer; margin-left: 5px">
  861. <img id="jh" ostate="0" src="../images/totle/jh3.png" onclick="OptClick('jh')" onmouseout="backOutImg('jh',this)" onmouseover="backImgOver('jh',this)" />
  862. </a>
  863. <a style="cursor: pointer;">
  864. <img id="qr" ostate="0" src="../images/totle/qr3.png" onclick="OptClick('qr')" onmouseout="backOutImg('qr',this)" onmouseover="backImgOver('qr',this)" />
  865. </a>
  866. <a style="cursor: pointer;">
  867. <img id="qc" ostate="0" src="../images/totle/qc3.png" onclick="OptClick('qc')" onmouseout="backOutImg('qc',this)" onmouseover="backImgOver('qc',this)" />
  868. </a>
  869. </span>
  870. </div>
  871. </td>
  872. <td align="right">
  873. <div class="header_right">
  874. <span class="member"><b id="userInfo" runat="server"></b></span>工号:<asp:Label ID="lblAgentCode"
  875. runat="server" Text="0000" ForeColor="Red"></asp:Label>
  876. &nbsp;&nbsp; 姓名:<asp:Label ID="lblAgentName" runat="server" Text=""></asp:Label>
  877. <%--&nbsp;&nbsp; 分机号:--%><asp:Label ID="lblAgentExt" runat="server" Text="0000" Style="display: none;" ForeColor="Red"></asp:Label>
  878. <br />
  879. <a href="javascript:f_addTab('home','管理中心','center.aspx')">管理中心</a> | <a href="javascript:ChangePwd();">修改密码</a> |
  880. <asp:LinkButton ID="lbtnExit" runat="server" OnClick="lbtnExit_Click"></asp:LinkButton>
  881. <a style="cursor: pointer" onclick="userExit()">安全退出</a>
  882. </div>
  883. </td>
  884. </tr>
  885. </table>
  886. </div>
  887. </div>
  888. </div>
  889. <!--左边-->
  890. <div position="left" title="管理菜单" id="global_left_nav">
  891. <%=GetFunTree() %>
  892. </div>
  893. <div position="center" id="framecenter" toolsid="tab-tools-nav">
  894. <div tabid="home" title="管理中心" iconcss="tab-icon-home" style="height: 300px">
  895. <iframe frameborder="0" name="sysMain" src="center.aspx"></iframe>
  896. </div>
  897. </div>
  898. <div position="bottom" class="footer">
  899. <div style="float: left; padding-left: 8px;" id="TelState">
  900. <div style="float: left; padding-top: 4px;">
  901. 服务状态:
  902. </div>
  903. <div style="float: left; padding-top: 3px;">
  904. <img id="imgServerState" src="/images/server0.png" alt="未连接" />
  905. </div>
  906. <div style="float: left; padding-top: 3px;">
  907. &nbsp;&nbsp;坐席状态:
  908. </div>
  909. <div style="float: left; padding-top: 3px;">
  910. <img id="imgAgentState" src="/images/zx2.png" alt="未登录" />
  911. </div>
  912. <div style="float: left; padding-top: 3px;">
  913. &nbsp;&nbsp;<span id="spanServerRes" style="color: Red"></span>
  914. </div>
  915. </div>
  916. <div class="copyright" style="float: right; width: ">
  917. <span id="spanIVRInTelCount" style="color: Red;"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copyright
  918. &copy; 河南华谊网络科技有限公司 All Rights Reserved.
  919. </div>
  920. <%-- 20150324薛广兴--%>
  921. <div id="emessagecontent" style="display: none;">
  922. <div style="width: 250px; height: 150px; font-size: 12px; font-family: '宋体'; background: url(images/kkback.gif) repeat-x 0px 0px; text-align: left; padding: 5px; border: 1px solid #8EC6D8;">
  923. <div style="width: 248px; height: 149px; background: url(images/kk_01.gif) repeat-x 0px 0px; border: 1px solid #C9C9C9; float: left;">
  924. <div style="width: 245px; height: 145px;">
  925. <div style="width: 245px; height: 25px; text-align: left; padding: 5px 0px 0px 5px; margin-bottom: 15px; float: left;">
  926. <ul style="height: 18px; color: #E9B709; display: block; list-style-type: none; padding: 0px; margin: 0px;">
  927. <li style="display: inline; list-style-type: none; padding-right: 5px; font-size: 14px; font-weight: bold; width: 150px; padding: 2px 0px 0px 10px; float: left;">提示</li>
  928. <li style="display: inline; list-style-type: none; padding-right: 5px; font-size: 14px; font-weight: bold; width: 9px; height: 9px; padding-top: 2px; float: right;">
  929. <img src="images/close.gif" style="cursor: hand;" onclick="parent.oPopup.hide();"
  930. alt="关闭" />
  931. </li>
  932. </ul>
  933. </div>
  934. <div style="width: 220px; margin: 0px 10px 5px 13px; line-height: 18px;">
  935. <table border="0" cellpadding="0" cellspacing="0" width="230px" height="70px">
  936. <tr>
  937. <td align="center" style="color: Red;">
  938. <b><span id="countspan"></span></b>
  939. </td>
  940. </tr>
  941. </table>
  942. </div>
  943. </div>
  944. </div>
  945. </div>
  946. </div>
  947. <%-- 20150324薛广兴--%>
  948. </div>
  949. </div>
  950. <script type="text/javascript">
  951. function telajaxopt(opturl) {
  952. var r = "";
  953. try {
  954. $.ajax({
  955. type: 'get',
  956. url: opturl,
  957. dataType: 'html',
  958. async: false,
  959. cache: false,
  960. success: function (res) {
  961. r = res;
  962. }
  963. });
  964. }
  965. catch (e) {
  966. $.ligerDialog.error(e.message);
  967. }
  968. return r;
  969. }
  970. //电话操作事件
  971. //话机状态改变事件
  972. function OnPhoneStatusNotify(status) {
  973. try {
  974. var _UserNo = document.getElementById("txtLabourNo").value;
  975. var _CallId = "";
  976. try {
  977. Phone.QueryCallIDOnAgentEx(_UserNo);
  978. for (i = 0; i < Phone.CallIDNum; i++) {
  979. _CallId = Phone.GetCallIDByIdx(i);
  980. // alert(_CallId);
  981. }
  982. Phone.QueryCallInfoEx(_CallId);
  983. }
  984. catch (e) {
  985. }
  986. /*
  987. 0; //振铃
  988. 1; //摘机
  989. 2; //挂机
  990. */
  991. if (status == 0) {
  992. if (becallcome) {
  993. var telphone = Phone.CallInfoEx_Ani;
  994. try {
  995. var userid = document.getElementById("txtAgentId").value;
  996. var usercode = document.getElementById("lblAgentCode").innerHTML;
  997. var username = document.getElementById("lblAgentName").innerHTML;
  998. var extnumber = document.getElementById("lblAgentExt").innerHTML;
  999. //获取呼叫编号
  1000. var callid = telajaxopt("../telmanage/ajax/telrecords.ashx?action=getCallIdByPhone&telphone=" + telphone);
  1001. document.getElementById("CallHjbh").value = callid;
  1002. username = encodeURI(username);
  1003. telajaxopt("../telmanage/ajax/telrecords.ashx?action=zhenlingEvent&callid=" + callid + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber); //更新摘机事件
  1004. } catch (e) {
  1005. }
  1006. Form_callCommingCaller(telphone, callid);
  1007. }
  1008. becallout = false;
  1009. becallcome = true;
  1010. }
  1011. else if (status == 1) {
  1012. //改变按钮图片
  1013. telajaxopt("../telmanage/ajax/telrecords.ashx?action=zhaijiEvent&callid=" + document.getElementById("CallHjbh").value); //更新摘机事件
  1014. Form_setWinfromenble("True", "false", "false", "false", "True", "True", "True", "false", "false", "false");
  1015. setAgentStatus("忙");
  1016. }
  1017. else if (status == 2) {
  1018. telajaxopt("../telmanage/ajax/telrecords.ashx?action=guajiEvent&callid=" + document.getElementById("CallHjbh").value); //更新挂机事件
  1019. Form_setWinfromenble("false", "True", "True", "false", "false", "false", "false", "false", "false", "false");
  1020. setAgentStatus("空闲");
  1021. //2014-10-22
  1022. becallout = false;
  1023. becallcome = true;
  1024. }
  1025. }
  1026. catch (e) {
  1027. $.ligerDialog.error(e.message);
  1028. }
  1029. //document.getElementById("spanServerRes").innerHTML = "状态:" + status;
  1030. }
  1031. //来电弹屏事件
  1032. function Form_callCommingCaller(callerNum, CBnumber) {
  1033. becallout = false;
  1034. becallcome = true;
  1035. document.getElementById("forZYnumber").value = callerNum;
  1036. document.getElementById("callnum").value = callerNum;
  1037. f_addTab('callin_' + CBnumber + callerNum, callerNum + '来电', '../telmanage/callinopt.aspx?callid=' + CBnumber + "&phone=" + callerNum);
  1038. }
  1039. //录音成功
  1040. function Form_callComming(callerNum, parth) {
  1041. telajaxopt("../telmanage/ajax/telrecords.ashx?action=luyinEvent&callid=" + document.getElementById("CallHjbh").value + "&path=" + parth); //录音开始事件
  1042. Form_setWinfromenble("True", "false", "false", "false", "True", "True", "True", "false", "false", "false");
  1043. }
  1044. function getCallerNum() {
  1045. var calnum = document.getElementById("callnum").value;
  1046. return calnum;
  1047. }
  1048. function clearCallerNum() {
  1049. document.getElementById("callnum").value = "";
  1050. }
  1051. function getCallHjbh() {
  1052. var cid = document.getElementById("CallHjbh").value;
  1053. return cid;
  1054. }
  1055. function clearCallHjbh() {
  1056. document.getElementById("CallHjbh").value = "";
  1057. }
  1058. </script>
  1059. <iframe src="iframeocx.aspx" name="iframeocx" frameborder="0" height="0" width="0" style="display: none;"></iframe>
  1060. </form>
  1061. </body>
  1062. </html>