Нет описания

CallRecord.html 40KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>通话记录管理</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../css/bootstrap-select.css" />
  10. <link rel="stylesheet" href="../css/Table/table1.css" />
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <style>
  13. body {
  14. font-family: "微软雅黑";
  15. font-size: 14px;
  16. }
  17. /* ul li {
  18. list-style: none;
  19. float: left;
  20. } */
  21. .fr {
  22. float: right;
  23. }
  24. .fl {
  25. float: right;
  26. }
  27. /*标头*/
  28. .th-box {
  29. width: 100%;
  30. padding: 5px;
  31. border-bottom: 1px solid #e7eaec;
  32. }
  33. .sc_btn {
  34. width: 100px;
  35. color: #fff;
  36. font-size: 12px;
  37. margin-left: 15px;
  38. box-sizing: border-box;
  39. background: #00a1cb;
  40. padding: 6px 10px;
  41. outline: none;
  42. border-width: 0px;
  43. border-style: initial;
  44. border-color: initial;
  45. border-image: initial;
  46. border-radius: 3px;
  47. margin-top: 5px;
  48. text-align: center;
  49. }
  50. .photo {
  51. /*background-color: #FFF;
  52. background-image: none;*/
  53. border: 1px solid #e5e6e7;
  54. border-radius: 1px;
  55. color: inherit;
  56. padding: 6px 12px;
  57. }
  58. .selects {
  59. background-color: #FFF;
  60. background-image: none;
  61. border: 1px solid #e5e6e7;
  62. border-radius: 1px;
  63. color: inherit;
  64. padding: 6px 12px;
  65. }
  66. #Select:focus {
  67. outline: none;
  68. border-color: #00BFFF;
  69. }
  70. input:focus {
  71. outline: none;
  72. border-color: #00BFFF;
  73. }
  74. .spiner-example {
  75. position: absolute;
  76. top: 50%;
  77. left: 50%;
  78. z-index: 111;
  79. margin-left: -85px;
  80. margin-top: -100px;
  81. display: none;
  82. }
  83. .sk-spinner-three-bounce {
  84. width: 170px !important;
  85. }
  86. .sk-spinner p {
  87. display: inline-block;
  88. font-size: 18px;
  89. margin-left: 10px;
  90. }
  91. .gjsu ul {
  92. overflow: hidden;
  93. }
  94. .gjsu ul li {
  95. width: 50%;
  96. margin-bottom: 5px;
  97. padding-top: 10px;
  98. }
  99. .selects {
  100. width: 105px;
  101. }
  102. .tc {
  103. margin-top: 30px;
  104. text-align: center;
  105. }
  106. #sqzx th {
  107. padding: 5px 8px 5px 0;
  108. text-align: center;
  109. width: 6%;
  110. }
  111. #sqzx td {
  112. padding: 6px 0 5px 10px;
  113. width: 18%;
  114. }
  115. .nameJustified {
  116. width: 5em;
  117. display: inline-block;
  118. text-align: justify;
  119. text-align-last: justify;
  120. }
  121. .dropdown-menu li {
  122. width: 100%;
  123. }
  124. .operation {
  125. white-space: nowrap;
  126. }
  127. .Min-width{
  128. width: 48%;
  129. display: inline-block;
  130. margin: 0;
  131. }
  132. </style>
  133. </head>
  134. <body class="gray-bg">
  135. <div class="wrapper wrapper-content animated fadeInRight">
  136. <div class="daoHang clearfix">
  137. <div class="dhLeft">
  138. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a
  139. href="javaScript:;">话务管理</a>&gt;<a href="" class="nowPosition">通话记录查询</a></sapn>
  140. </div>
  141. <div class="dhRight">
  142. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  143. </div>
  144. </div>
  145. <div class="th-box">
  146. <div class="box_content">
  147. <table id="sqzx" style="width: 100%" border="0">
  148. <tbody>
  149. <tr>
  150. <th>电话号码:</th>
  151. <td><input id="tel" class="form-control" type="text" /></td>
  152. <th>呼叫状态:</th>
  153. <td>
  154. <select id="ss_hjzt" class="callstate form-control">
  155. <option value="">全部</option>
  156. <option value="0">未接通</option>
  157. <option value="1">已接通</option>
  158. <option value="2">接通未达</option>
  159. <option value="3">主动放弃</option>
  160. <option value="4">自主完成</option>
  161. </select>
  162. </td>
  163. <th><span class="nameJustified">分机号:</span></th>
  164. <td>
  165. <input id="extnumber" class="form-control" type="text" />
  166. </td>
  167. <th>呼出方向:</th>
  168. <td>
  169. <select id="ss_hcfx" class="form-control calltype">
  170. <option value="">全部</option>
  171. <option value="0">呼入</option>
  172. <option value="1">呼出</option>
  173. <option value="3">呼出回访</option>
  174. </select>
  175. </td>
  176. </tr>
  177. <tr>
  178. <th>呼叫类型:</th>
  179. <td>
  180. <select id="ss_HJLX" class="form-control calltype">
  181. <option value="">全部</option>
  182. <option value="1">正常通话</option>
  183. <option value="2">转移</option>
  184. <option value="3">三方通话</option>
  185. </select>
  186. </td>
  187. <th>是否回访:</th>
  188. <td>
  189. <select id="sf_hf" class="form-control calltype">
  190. <option value="">全部</option>
  191. <option value="2">是</option>
  192. <option value="0">否</option>
  193. </select>
  194. </td>
  195. <th>受话坐席:</th>
  196. <td class="maxWidthSelect">
  197. <select id="seat" class="selectpicker show-tick form-control" multiple data-live-search="true"></select>
  198. </td>
  199. <th>通话类型:</th>
  200. <td>
  201. <select id="callType" class="form-control callstate">
  202. <option value="">全部</option>
  203. </select>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th>电话类别:</th>
  208. <td>
  209. <select class="form-control" id="phoneType">
  210. <option value="">请选择</option>
  211. </select>
  212. </td>
  213. <th>查询类型:</th>
  214. <td>
  215. <select id="islike" class="form-control" name="select">
  216. <option value="1">模糊查询</option>
  217. <option value="0">精确查询</option>
  218. </select>
  219. </td>
  220. <th><span class="nameJustified">时间:</span></th>
  221. <td colspan="3">
  222. <input id="start" class="photo x-color laydate-icon" type="text" autocomplete="off" /> -
  223. <input id="end" class="photo x-color laydate-icon" type="text" autocomplete="off" />
  224. <a class="sc_btn Ss">搜索</a>
  225. <a class="sc_btn exportFile">导出</a>
  226. </td>
  227. </tr>
  228. <tr>
  229. <th><span class="nameJustified">坐席组:</span></th>
  230. <td>
  231. <select id="agentGroup" class="form-control" name="select">
  232. <option value="">请选择</option>
  233. </select>
  234. </td>
  235. <th><span class="nameJustified">未接通:</span></th>
  236. <td>
  237. <select id="notconnected" class="form-control" name="select">
  238. <option value="">请选择</option>
  239. <option value="1">呼入至今未接通</option>
  240. </select>
  241. </td>
  242. <th>是否回拨</th>
  243. <td>
  244. <select id="callback" class="form-control" name="select">
  245. <option value="">请选择</option>
  246. <option value="1">已回拨</option>
  247. <option value="2">未回拨</option>
  248. </select>
  249. </td>
  250. </tr>
  251. <tr>
  252. <th><span>等待时长:</span></th>
  253. <td >
  254. <input id="WaitTime" class="form-control Min-width" type="text"placeholder="输入数字,单位s"/>
  255. <select id="WaitTimeState" class="form-control Min-width" name="select">
  256. <option value="">等于</option>
  257. <option value="1">大于</option>
  258. <option value="2">小于</option>
  259. </select>
  260. </td>
  261. <th><span>满意度:</span></th>
  262. <td >
  263. <select id="myd" class="form-control" name="select">
  264. <option value="">请选择</option>
  265. <option value="0">未评价</option>
  266. <option value="1">满意</option>
  267. <option value="2">一般</option>
  268. <option value="3">不满意</option>
  269. </select>
  270. </td>
  271. <th><span>电话方式:</span></th>
  272. <td >
  273. <select id="Business" class="form-control" name="select">
  274. <option value="">请选择</option>
  275. <option value="2">市民咨询</option>
  276. <option value="3">营商环境</option>
  277. <option value="4">市长信箱</option>
  278. </select>
  279. </td>
  280. </tr>
  281. </tbody>
  282. </table>
  283. </div>
  284. </div>
  285. <div style="width: 100%;padding: 10px;">
  286. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  287. <thead>
  288. <tr>
  289. <th data-field="" data-align="center" data-formatter="Code">编号</th>
  290. <th data-field="CallNumber" data-align="center" data-formatter="phoneTableHtml">电话号码</th>
  291. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  292. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  293. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  294. <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
  295. <th data-field="TypeName" data-align="center">通话类型</th>
  296. <th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>
  297. <th data-field="UserCode" data-align="center">坐席工号</th>
  298. <th data-field="UserName1" data-align="center">坐席姓名</th>
  299. <th data-field="ExtNumber" data-align="center">分机号</th>
  300. <th data-field="BeginTime" data-align="center">开始时间</th>
  301. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  302. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  303. <th data-field="EndTime" data-align="center">结束时间</th>
  304. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  305. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  306. <th data-field="WaitTime" data-align="center">等待时长</th>
  307. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  308. <th data-field="PhoneType" data-align="center">电话类别</th>
  309. <th data-field="TransferCall" data-align="center">转接号码</th>
  310. <th data-field="Business" data-align="center" data-formatter="formatBusinessType">电话方式</th>
  311. <th data-field="Callback" data-align="center" data-formatter="formatCallback">是否回拨</th>
  312. <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
  313. <th data-field="CallId" data-align="center" data-formatter="operationFormatter">操作</th>
  314. </tr>
  315. </thead>
  316. </table>
  317. <!--高级搜索框-->
  318. </div>
  319. </div>
  320. <!--下载框-->
  321. <div class="t-shade">
  322. <div class="shade_k">
  323. <div class="shade_title">
  324. <span>录音播放<srong class="cknum"></srong></span>
  325. <span class="setwin"><a>x</a></span>
  326. </div>
  327. <div class="shade_content">
  328. <div class="Ly_box audiojs">
  329. </div>
  330. <div class="boxCon LY_box">
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. <script src="../js/bootstrap-select.js"></script>
  336. <script src="../My97DatePicker/WdatePicker.js"></script>
  337. <script src="../css/laydate/laydate.js"></script>
  338. <!-- <script src="../js/main.js"></script> -->
  339. <script src="../js/guid.js"></script>
  340. <script src="../js/sm2/sm2.js"></script>
  341. <script src="../js/sm2/decrypt.js"></script>
  342. <!--<script src="../js/contabs.min.js"></script>-->
  343. <script>
  344. var stype = 1;
  345. var seatlist = [];
  346. $(document).ready(function () {
  347. laydate.skin('blue');
  348. laydate({
  349. elem: '#start',
  350. event: 'focus',
  351. istime: true,
  352. format: 'YYYY-MM-DD hh:mm:ss'
  353. });
  354. laydate({
  355. elem: '#end',
  356. event: 'focus',
  357. istime: true,
  358. format: 'YYYY-MM-DD hh:mm:ss'
  359. });
  360. $("#start").val(helper.DateFormat.getNowDate()+" 00:00:00")
  361. $("#end").val(helper.DateFormat.getNowDate()+" 23:59:59")
  362. /*获取选中行对象*/
  363. $('#list').on("click-row.bs.table", function (e, row, ele) {
  364. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  365. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  366. });
  367. $(".setwin").click(function () {
  368. $(".t-shade").removeClass("cx");
  369. $('audio')[0].pause();
  370. });
  371. //获取通话类型
  372. GetCallTypeList();
  373. //获取坐席
  374. getAgentGroup($("#agentGroup"));
  375. //获取坐席
  376. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  377. token: $.cookie("token")
  378. }, function (result) {
  379. if (result.state.toLowerCase() == "success") {
  380. seatlist = result.data;
  381. bindseat($("#seat"));
  382. }
  383. });
  384. // 电话类别
  385. getPhoneType($("#phoneType"));
  386. //搜索
  387. $(".Ss").click(function () {
  388. stype = 1;
  389. initTable();
  390. });
  391. //高级搜索s
  392. $(".Gj").click(function () {
  393. var a = "WdatePicker()";
  394. layer.open({
  395. type: 1,
  396. title: '高级搜索',
  397. area: ['50%', '55%'], //宽高
  398. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  399. '<li class="active"><a href="#">参数信息</a></li> ' +
  400. '</ul>' +
  401. '<ul>' +
  402. '<li>' +
  403. '<label for="">电话号码:</label>' +
  404. '<input type="text" id="ss_tel" class="photo"/>' +
  405. '</li>' +
  406. '<li>' +
  407. '<label for="">坐席工号:</label>' +
  408. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  409. '</li>' +
  410. '<li>' +
  411. '<label for="">开始时间:</label>' +
  412. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  413. '</li>' +
  414. '<li>' +
  415. '<label for="">呼叫状态:</label>' +
  416. '<select id="ss_hjzt" class="selects callstate">' +
  417. '<option value="">全部</option>' +
  418. '<option value="0">未接通</option>' +
  419. '<option value="1">已接通</option>' +
  420. '<option value="2">黑名单拒接</option>' +
  421. '</select>' +
  422. '</li>' +
  423. '<li>' +
  424. '<label for="">结束时间:</label>' +
  425. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  426. '</li>' +
  427. '<li>' +
  428. '<label for="">呼出方向:</label>' +
  429. '<select id="ss_hcfx" class=" selects calltype">' +
  430. '<option value="">全部</option>' +
  431. '<option value="0">呼入</option>' +
  432. '<option value="1">呼出</option>' +
  433. '</select>' +
  434. '</li>' +
  435. '</ul>' +
  436. '<div class=" add_time tc">' +
  437. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  438. '</div>' +
  439. '</div>'
  440. });
  441. bindseat($("#ss_seat"));
  442. //获取通话记录列表
  443. $("#tc").click(function () {
  444. stype = 2;
  445. initTable();
  446. var index = layer.index; //获取当前弹层的索引号
  447. layer.close(index); //关闭当前弹层
  448. });
  449. });
  450. initTable();
  451. })
  452. function bindseat(obj) {
  453. obj.empty();
  454. obj.append('<option value="">全部</option>');
  455. $(seatlist).each(function (i, n) {
  456. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  457. obj.selectpicker({
  458. noneSelectedText: '请选择' //默认显示内容
  459. });
  460. obj.selectpicker('refresh');
  461. })
  462. }
  463. /*
  464. 监听坐席数据变化
  465. 选中全部时候,取消其他选项
  466. clickedIndex:索引
  467. isSelected:是否选中
  468. previousValue:选中前的值
  469. */
  470. $("#seat").on("changed.bs.select", function (event, clickedIndex, isSelected, previousValue) {
  471. if (previousValue.indexOf("全部") == -1) {
  472. if (clickedIndex == 0) {
  473. $("#seat").selectpicker("deselectAll");
  474. $("#seat").val("");
  475. $("#seat").selectpicker('refresh');
  476. }
  477. } else {
  478. if (clickedIndex != 0) {
  479. $("#seat").selectpicker("deselectAll");
  480. $("#seat").val("");
  481. $("#seat").selectpicker('refresh');
  482. }
  483. }
  484. })
  485. function initTable() {
  486. //先销毁表格
  487. $('#list').bootstrapTable('destroy');
  488. //初始化表格,动态从服务器加载数据
  489. $("#list").bootstrapTable({
  490. method: "get", //使用get请求到服务器获取数据
  491. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  492. contentType: "application/x-www-form-urlencoded",
  493. striped: true, //表格显示条纹
  494. pagination: true, //启动分页
  495. pageSize: 10, //每页显示的记录数
  496. pageNumber: 1, //当前第几页
  497. pageList: [10, 20, 50, 100], //记录数可选列表
  498. search: false, //是否启用查询
  499. showColumns: false, //显示下拉框勾选要显示的列
  500. showRefresh: false, //显示刷新按钮
  501. sidePagination: "server", //表示服务端请求
  502. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  503. //设置为limit可以获取limit, offset, search, sort, order
  504. queryParamsType: "undefined",
  505. queryParams: function queryParams(params) { //设置查询参数
  506. var param = {
  507. page: params.pageNumber,
  508. pagesize: params.pageSize,
  509. token: $.cookie("token")
  510. };
  511. var usercode_ = $("#seat").val(); //坐席
  512. var usercodeID = "";
  513. if (usercode_ != null) {
  514. $(usercode_).each(function (i, n) {
  515. var obj1 = "";
  516. obj1 = n + ",";
  517. usercodeID += obj1;
  518. });
  519. usercodeID = usercodeID.slice(0, -1);
  520. } else {
  521. usercodeID = "";
  522. }
  523. var WaitTimeState = $("#WaitTimeState").val()
  524. if(WaitTimeState ==="1"){
  525. param.morewaitTime = $("#WaitTime").val(); // 大于waitTime时长
  526. } else if(WaitTimeState ==="2"){
  527. param.lesswaitTime = $("#WaitTime").val(); // 小于waitTime时长
  528. } else{
  529. param.WaitTime = $("#WaitTime").val(); // 等待时长
  530. }
  531. if (stype == '1') {
  532. param.usercode = usercodeID;
  533. param.phone = $("#tel").val().replace(/\s+/g, "");
  534. param.starttime = $("#start").val();
  535. param.endtime = $("#end").val();
  536. param.callstate = $("#ss_hjzt").val();
  537. param.calltype = $("#ss_hcfx").val();
  538. param.type = $("#callType").val(); //type=通话类型
  539. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  540. param.tasktype = $("#sf_hf").val(); //呼叫类型
  541. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  542. param.phoneType = $("#phoneType").val();
  543. param.islike = $("#islike").val(); // 查询类型
  544. param.group = $("#agentGroup").val(); // 坐席组
  545. param.notconnected = $("#notconnected").val(); // 未接通
  546. param.callback = $("#callback").val(); // 是否回拨
  547. param.myd = $("#myd").val()
  548. param.Business = $("#Business").val()
  549. } else if (stype == '2') {
  550. param.usercode = $("#ss_seat").val();
  551. param.tel = $("#ss_tel").val();
  552. param.callstate = $("#ss_hjzt").val();
  553. param.calltype = $("#ss_hcfx").val();
  554. param.starttime = $("#ss_kssj").val();
  555. param.endtime = $("#ss_jssj").val();
  556. param.type = $("#callType").val(); //type=通话类型
  557. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  558. param.tasktype = $("#sf_hf").val(); //呼叫类型
  559. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  560. param.phoneType = $("#phoneType").val();
  561. param.islike = $("#islike").val(); // 查询类型
  562. param.group = $("#agentGroup").val(); // 坐席组
  563. param.notconnected = $("#notconnected").val(); // 未接通
  564. param.callback = $("#callback").val(); // 是否回拨
  565. param.myd = $("#myd").val()
  566. param.Business = $("#Business").val()
  567. }
  568. return param;
  569. },
  570. onLoadSuccess: function () { //加载成功时执行
  571. //layer.msg("加载成功");
  572. },
  573. onLoadError: function () { //加载失败时执行
  574. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  575. }
  576. });
  577. }
  578. //音频
  579. function setCode(val) {
  580. if (val) {
  581. return '<div class="imgs">' +
  582. '<img src="../img/vice.png" alt="" onclick="helper.luyin.view(this)" item="' + val + '" />' +
  583. '</div>';
  584. } else {
  585. return '';
  586. }
  587. }
  588. //编号
  589. function Code(val, row, index) {
  590. return index + 1;
  591. }
  592. // 电话号码
  593. function formatterCallNum(val, row) {
  594. var phoneNumber
  595. if (val.length === 12) {
  596. phoneNumber = val.slice(1)
  597. } else if (val.length === 13) {
  598. phoneNumber = val.slice(2)
  599. } else {
  600. phoneNumber = val
  601. }
  602. return '<div class="imgs" ><p class="" onclick="viewList(\'' + phoneNumber + '\')" >' + phoneNumber +
  603. '</p></div>';
  604. }
  605. function phoneTableHtml(val, row){
  606. return '<a onclick="phoneTableClick(this ,\'' +row.CallNumberShow+'\')"> ' + val + '</a>'
  607. }
  608. // 查看列表
  609. function viewList(phoneNumber) {
  610. // layer.open({
  611. // type: 2,
  612. // content: "./CallRecordList.html?phoneNumber=" + phoneNumber, //iframe的url,no代表不显示滚动条
  613. // title: '通话记录',
  614. // area: ['90%', '90%'], //宽高
  615. // });
  616. }
  617. //方向呼出
  618. function callType(val) {
  619. if (val == 0) {
  620. return '<div class="imgs">呼入</div>';
  621. } else {
  622. return '<div class="imgs">呼出</div>';
  623. }
  624. }
  625. //满意度
  626. function MYD(val, row) {
  627. var html = '';
  628. switch (val + '') {
  629. case '0':
  630. html = '未评价';
  631. break;
  632. case '1':
  633. html = '满意';
  634. if (row.CallState == 0) {
  635. html = '';
  636. }
  637. break;
  638. case '2':
  639. html = '一般';
  640. break;
  641. case '3':
  642. html = '不满意';
  643. break;
  644. }
  645. return html;
  646. }
  647. function states(val, row) {
  648. if (val == 0) { //CallState
  649. if(row.CallType == 0){ //呼入
  650. if(row.Business==1||row.Business==4){
  651. return '<div class="imgs">自主完成</div>';
  652. }else if( !row.UserCode){
  653. return '<div class="imgs">主动放弃</div>';
  654. }else{
  655. return '<div class="imgs">未接通</div>';
  656. }
  657. }else{
  658. return '<div class="imgs">未接通</div>';
  659. }
  660. } else if (val == 1) {
  661. return '<div class="imgs">已接通</div>';
  662. } else if (val == 2) {
  663. return '<div class="imgs">接通未达</div>';
  664. }
  665. }
  666. function ActionType(val) {
  667. if (val == 2) {
  668. return '<div class="imgs">转移</div>';
  669. } else if (val == 3) {
  670. return '<div class="imgs">三方通话</div>';
  671. } else {
  672. return '<div class="imgs">正常通话</div>';
  673. }
  674. }
  675. //处理
  676. function isDeal(val) {
  677. if (val == 0) {
  678. return '<div >未处理</div>';
  679. } else {
  680. return '<div >已处理</div>';
  681. }
  682. }
  683. function ftime(val) {
  684. if (val) {
  685. return helper.DateFormat.getFormatTime(val);
  686. } else {
  687. return '';
  688. }
  689. }
  690. // 回拨
  691. function formatCallback(val, row) {
  692. if (val) {
  693. return "已回拨";
  694. } else if(row.CallType ===0&&row.CallState ===0){
  695. return "未回拨";
  696. }
  697. }
  698. //格式化工单号
  699. function formatWorkOrderNum(val, row) {
  700. if (row.CallType ===0) {
  701. if (val == null || val == '') {
  702. var callNumber = decryptFn(row.CallNumberShow)
  703. return '<a class="xg" onclick="addWorkOrder(\'' + row.CallRecordsId + '\',\'' +callNumber+'\')" title="添加工单">添加工单</a>';
  704. } else {
  705. return '<a class="xg" onclick="ckxq(\'' + val + '\')" title="点击查看工单详情">' + val + '</a>';
  706. }
  707. }
  708. }
  709. function formatBusinessType(val, row){
  710. if (row.CallType ===0) {
  711. if (val ===2) {
  712. return '市民咨询'
  713. } else if (val ===3) {
  714. return '营商环境'
  715. } else if (val ===4) {
  716. return '市长信箱'
  717. }else {
  718. return '市民咨询'
  719. }
  720. }
  721. }
  722. // 操作
  723. function operationFormatter(val, row) {
  724. // CallType ===0呼入 row.CallState ===0 未接通
  725. if (row.CallState ===0&&row.CallType ===0) {
  726. if (row.Callback) {
  727. return '<a class="operation" onclick="callbackRecord(\'' + row.CallId + '\')" title="">回拨记录</a>'
  728. } else {
  729. var callNumber = decryptFn(row.CallNumberShow)
  730. return '<a class="operation" onclick="backDial(\'' + callNumber + '\',\'' + row.CallId +'\')" title="">回拨</a>'
  731. }
  732. }
  733. }
  734. //获取通话类型
  735. function GetCallTypeList() {
  736. $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
  737. id: 45,
  738. token: $.cookie("token")
  739. }, function (result) {
  740. if (result.state.toLowerCase() == "success") {
  741. var callTypeList = result.data;
  742. $('#callType').empty();
  743. $('#callType').append('<option value="">全部</option>');
  744. $(callTypeList).each(function (i, n) {
  745. $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value +
  746. '</option>');
  747. })
  748. }
  749. })
  750. }
  751. // 坐席
  752. function getAgentGroup(obj) {
  753. obj.empty();
  754. obj.append(
  755. '<option selected="selected" value="">请选择</option>'
  756. );
  757. $.getJSON(
  758. huayi.config.callcenter_url +
  759. "Dictionary/GetDicValueListById", {
  760. token: $.cookie("token"),
  761. id: 2522,
  762. },
  763. function (data) {
  764. if (data.state.toLowerCase() == "success") {
  765. var content = data.data;
  766. $(content).each(function (i, n) {
  767. $(
  768. "<option value='" +
  769. n.F_Value +
  770. "'>" +
  771. n.F_Value +
  772. "</option>"
  773. ).appendTo(obj);
  774. });
  775. }
  776. }
  777. );
  778. }
  779. // 查看工单详情
  780. function ckxq(str) {
  781. if (str) {
  782. layer.open({
  783. type: 2,
  784. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  785. title: '工单详情',
  786. area: ['100%', '100%'], //宽高
  787. });
  788. }
  789. }
  790. // 添加工单
  791. function addWorkOrder(CallRecordsId,CallNumber) {
  792. if (CallRecordsId) {
  793. layer.open({
  794. type: 2,
  795. content: "../Appeal/AddAppeal.html?CallRecordsId=" + CallRecordsId+"&callerNum="+CallNumber , //iframe的url,no代表不显示滚动条
  796. title: '工单详情',
  797. area: ['100%', '100%'], //宽高
  798. });
  799. }
  800. }
  801. // 外呼
  802. function backDial(phoneNumber, callId) {
  803. $.ajax({
  804. type: "get",
  805. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  806. async: true,
  807. dataType: "json",
  808. data: {
  809. token: $.cookie("token"),
  810. phone: phoneNumber,
  811. },
  812. success: function (result) {
  813. if (result.state.toLowerCase() == "success") {
  814. top.callbackState = true
  815. var guid = uuid();
  816. top.obj.Type = "MakeCall";
  817. top.obj.DestinationNumber = result.data.phone;
  818. top.obj.Header = result.data.fix;
  819. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:回访外呼
  820. top.obj.TaskPhoneID = callId; //回访的电话ID
  821. top.obj.TaskID = guid; //回访记录编号
  822. top.obj.Callee = phoneNumber; //被叫号码
  823. top.obj.Caller = $.cookie("extno"); //操作人分机号
  824. top.Send();
  825. }
  826. },
  827. });
  828. }
  829. // 更新外呼记录前
  830. function beforeUpdateCallOut (callId) {
  831. $.ajax({
  832. type: "get",
  833. url: huayi.config.callcenter_url + "Callrecords/UpdateCallback",
  834. async: true,
  835. dataType: "json",
  836. data: {
  837. token: $.cookie("token"),
  838. callid: callId,
  839. },
  840. success: function (result) {
  841. if (result.state.toLowerCase() == "success") {
  842. }
  843. },
  844. });
  845. }
  846. // 更新外呼记录后
  847. function afterUpdateCallOut (callId) {
  848. $.ajax({
  849. type: "get",
  850. url: huayi.config.callcenter_url + "Callrecords/UpdateCallbackid",
  851. async: true,
  852. dataType: "json",
  853. data: {
  854. token: $.cookie("token"),
  855. callid: callId,
  856. p_callid: callId,
  857. },
  858. success: function (result) {
  859. if (result.state.toLowerCase() == "success") {
  860. }
  861. },
  862. });
  863. }
  864. // 回拨记录
  865. function callbackRecord(callId) {
  866. layer.open({
  867. type: 2,
  868. content: "./callbackRecordList.html?callId=" + callId, //iframe的url,no代表不显示滚动条
  869. title: '回拨记录',
  870. area: ['100%', '100%'], //宽高
  871. });
  872. }
  873. //电话类别
  874. function getPhoneType(obj) {
  875. obj.empty();
  876. $("<option value=''>请选择</option>").appendTo(obj);
  877. $.ajax({
  878. type: "get",
  879. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  880. dataType: "json",
  881. async: true,
  882. data: {
  883. "token": $.cookie("token"),
  884. id: 2498,
  885. },
  886. success: function (data) {
  887. if (data.state.toLowerCase() == "success") {
  888. var content = data.data;
  889. $(content).each(function (i, n) {
  890. $("<option value='" + n.F_Value + "'>" + n.F_Remark + "</option>")
  891. .appendTo(obj);
  892. })
  893. }
  894. }
  895. });
  896. }
  897. $(".exportFile").click(function () {
  898. var usercode_ = $("#seat").val(); //坐席
  899. var usercodeID = "";
  900. if (usercode_ != null) {
  901. $(usercode_).each(function (i, n) {
  902. var obj1 = "";
  903. obj1 = n + ",";
  904. usercodeID += obj1;
  905. });
  906. usercodeID = usercodeID.slice(0, -1);
  907. } else {
  908. usercodeID = "";
  909. }
  910. var usercode = usercodeID;
  911. var phone = $("#tel").val();
  912. var starttime = $("#start").val();
  913. var endtime = $("#end").val();
  914. var callstate = $("#ss_hjzt").val();
  915. var calltype = $("#ss_hcfx").val();
  916. var type = $("#callType").val(); //type=通话类型
  917. var actiontype = $("#ss_HJLX").val(); //呼叫类型
  918. var tasktype = $("#sf_hf").val(); //呼叫类型
  919. var extnumber = $("#extnumber").val();
  920. var phoneType = $("#phoneType").val();
  921. var islike = $("#islike").val(); // 查询类型
  922. var notconnected = $("#notconnected").val(); // 未接通
  923. var url = huayi.config.callcenter_url + "Callrecords/GetList?token=" + $.cookie("token") +
  924. "&isdc=1";
  925. url += "&usercode=" + usercode + "&phone=" + phone + "&starttime=" + starttime + "&endtime=" +
  926. endtime + "&callstate=" + callstate + "&calltype=" + calltype + "&type=" + type +
  927. "&actiontype=" + actiontype + "&tasktype=" + tasktype + "&extnumber=" + extnumber +
  928. "&phoneType=" + phoneType + "&islike=" + islike + "&notconnected=" + notconnected;
  929. window.location.href = url;
  930. })
  931. document.onkeydown = function (e) { // 回车提交表单
  932. var theEvent = window.event || e;
  933. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  934. if (code == 13) {
  935. initTable();
  936. }
  937. }
  938. </script>
  939. </body>
  940. </html>