UU跑腿标准版

default.aspx 55KB

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