Nessuna descrizione

CallRecord.html 41KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  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. <th><span>工单编号:</span></th>
  281. <td>
  282. <input id="worknumber" class="form-control" type="text" />
  283. </td>
  284. </tr>
  285. </tbody>
  286. </table>
  287. </div>
  288. </div>
  289. <div style="width: 100%;padding: 10px;">
  290. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  291. <thead>
  292. <tr>
  293. <th data-field="" data-align="center" data-formatter="Code">编号</th>
  294. <th data-field="CallNumber" data-align="center" data-formatter="phoneTableHtml">电话号码</th>
  295. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  296. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  297. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  298. <th data-field="ActionType" data-formatter="ActionType" data-align="center">呼叫类型</th>
  299. <th data-field="TypeName" data-align="center">通话类型</th>
  300. <th data-field="MYD" data-align="center" data-formatter="MYD">满意度</th>
  301. <th data-field="UserCode" data-align="center">坐席工号</th>
  302. <th data-field="UserName1" data-align="center">坐席姓名</th>
  303. <th data-field="ExtNumber" data-align="center">分机号</th>
  304. <th data-field="BeginTime" data-align="center">开始时间</th>
  305. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  306. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  307. <th data-field="EndTime" data-align="center">结束时间</th>
  308. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  309. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  310. <th data-field="WaitTime" data-align="center">等待时长</th>
  311. <th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>
  312. <th data-field="PhoneType" data-align="center">电话类别</th>
  313. <th data-field="TransferCall" data-align="center">转接号码</th>
  314. <th data-field="Business" data-align="center" data-formatter="formatBusinessType">电话方式</th>
  315. <th data-field="Callback" data-align="center" data-formatter="formatCallback">是否回拨</th>
  316. <th data-field="WorkOrderId" data-align="center" data-formatter="formatWorkOrderNum">工单号</th>
  317. <th data-field="CallId" data-align="center" data-formatter="operationFormatter">操作</th>
  318. </tr>
  319. </thead>
  320. </table>
  321. <!--高级搜索框-->
  322. </div>
  323. </div>
  324. <!--下载框-->
  325. <div class="t-shade">
  326. <div class="shade_k">
  327. <div class="shade_title">
  328. <span>录音播放<srong class="cknum"></srong></span>
  329. <span class="setwin"><a>x</a></span>
  330. </div>
  331. <div class="shade_content">
  332. <div class="Ly_box audiojs">
  333. </div>
  334. <div class="boxCon LY_box">
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. <script src="../js/bootstrap-select.js"></script>
  340. <script src="../My97DatePicker/WdatePicker.js"></script>
  341. <script src="../css/laydate/laydate.js"></script>
  342. <!-- <script src="../js/main.js"></script> -->
  343. <script src="../js/guid.js"></script>
  344. <script src="../js/sm2/sm2.js"></script>
  345. <script src="../js/sm2/decrypt.js"></script>
  346. <!--<script src="../js/contabs.min.js"></script>-->
  347. <script>
  348. var stype = 1;
  349. var seatlist = [];
  350. $(document).ready(function () {
  351. laydate.skin('blue');
  352. laydate({
  353. elem: '#start',
  354. event: 'focus',
  355. istime: true,
  356. format: 'YYYY-MM-DD hh:mm:ss'
  357. });
  358. laydate({
  359. elem: '#end',
  360. event: 'focus',
  361. istime: true,
  362. format: 'YYYY-MM-DD hh:mm:ss'
  363. });
  364. $("#start").val(helper.DateFormat.getNowDate()+" 00:00:00")
  365. $("#end").val(helper.DateFormat.getNowDate()+" 23:59:59")
  366. /*获取选中行对象*/
  367. $('#list').on("click-row.bs.table", function (e, row, ele) {
  368. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  369. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  370. });
  371. $(".setwin").click(function () {
  372. $(".t-shade").removeClass("cx");
  373. $('audio')[0].pause();
  374. });
  375. //获取通话类型
  376. GetCallTypeList();
  377. //获取坐席
  378. getAgentGroup($("#agentGroup"));
  379. //获取坐席
  380. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  381. token: $.cookie("token")
  382. }, function (result) {
  383. if (result.state.toLowerCase() == "success") {
  384. seatlist = result.data;
  385. bindseat($("#seat"));
  386. }
  387. });
  388. // 电话类别
  389. getPhoneType($("#phoneType"));
  390. //搜索
  391. $(".Ss").click(function () {
  392. stype = 1;
  393. initTable();
  394. });
  395. //高级搜索s
  396. $(".Gj").click(function () {
  397. var a = "WdatePicker()";
  398. layer.open({
  399. type: 1,
  400. title: '高级搜索',
  401. area: ['50%', '55%'], //宽高
  402. content: ' <div class="gjsu"><ul class="nav nav-tabs">' +
  403. '<li class="active"><a href="#">参数信息</a></li> ' +
  404. '</ul>' +
  405. '<ul>' +
  406. '<li>' +
  407. '<label for="">电话号码:</label>' +
  408. '<input type="text" id="ss_tel" class="photo"/>' +
  409. '</li>' +
  410. '<li>' +
  411. '<label for="">坐席工号:</label>' +
  412. '<select name="" id="ss_seat" class="selects usercode"></select>' +
  413. '</li>' +
  414. '<li>' +
  415. '<label for="">开始时间:</label>' +
  416. ' <input type="text" id="ss_kssj" class="photo"onClick="' + a + '"/>' +
  417. '</li>' +
  418. '<li>' +
  419. '<label for="">呼叫状态:</label>' +
  420. '<select id="ss_hjzt" class="selects callstate">' +
  421. '<option value="">全部</option>' +
  422. '<option value="0">未接通</option>' +
  423. '<option value="1">已接通</option>' +
  424. '<option value="2">黑名单拒接</option>' +
  425. '</select>' +
  426. '</li>' +
  427. '<li>' +
  428. '<label for="">结束时间:</label>' +
  429. '<input type="text" id="ss_jssj" class="photo" onClick="' + a + '"/>' +
  430. '</li>' +
  431. '<li>' +
  432. '<label for="">呼出方向:</label>' +
  433. '<select id="ss_hcfx" class=" selects calltype">' +
  434. '<option value="">全部</option>' +
  435. '<option value="0">呼入</option>' +
  436. '<option value="1">呼出</option>' +
  437. '</select>' +
  438. '</li>' +
  439. '</ul>' +
  440. '<div class=" add_time tc">' +
  441. '<button type="button" class="btn sc_btn Block " id="tc">保&nbsp;&nbsp;存</button>' +
  442. '</div>' +
  443. '</div>'
  444. });
  445. bindseat($("#ss_seat"));
  446. //获取通话记录列表
  447. $("#tc").click(function () {
  448. stype = 2;
  449. initTable();
  450. var index = layer.index; //获取当前弹层的索引号
  451. layer.close(index); //关闭当前弹层
  452. });
  453. });
  454. initTable();
  455. })
  456. function bindseat(obj) {
  457. obj.empty();
  458. obj.append('<option value="">全部</option>');
  459. $(seatlist).each(function (i, n) {
  460. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  461. obj.selectpicker({
  462. noneSelectedText: '请选择' //默认显示内容
  463. });
  464. obj.selectpicker('refresh');
  465. })
  466. }
  467. /*
  468. 监听坐席数据变化
  469. 选中全部时候,取消其他选项
  470. clickedIndex:索引
  471. isSelected:是否选中
  472. previousValue:选中前的值
  473. */
  474. $("#seat").on("changed.bs.select", function (event, clickedIndex, isSelected, previousValue) {
  475. if (previousValue.indexOf("全部") == -1) {
  476. if (clickedIndex == 0) {
  477. $("#seat").selectpicker("deselectAll");
  478. $("#seat").val("");
  479. $("#seat").selectpicker('refresh');
  480. }
  481. } else {
  482. if (clickedIndex != 0) {
  483. $("#seat").selectpicker("deselectAll");
  484. $("#seat").val("");
  485. $("#seat").selectpicker('refresh');
  486. }
  487. }
  488. })
  489. function initTable() {
  490. //先销毁表格
  491. $('#list').bootstrapTable('destroy');
  492. //初始化表格,动态从服务器加载数据
  493. $("#list").bootstrapTable({
  494. method: "get", //使用get请求到服务器获取数据
  495. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  496. contentType: "application/x-www-form-urlencoded",
  497. striped: true, //表格显示条纹
  498. pagination: true, //启动分页
  499. pageSize: 10, //每页显示的记录数
  500. pageNumber: 1, //当前第几页
  501. pageList: [10, 20, 50, 100], //记录数可选列表
  502. search: false, //是否启用查询
  503. showColumns: false, //显示下拉框勾选要显示的列
  504. showRefresh: false, //显示刷新按钮
  505. sidePagination: "server", //表示服务端请求
  506. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  507. //设置为limit可以获取limit, offset, search, sort, order
  508. queryParamsType: "undefined",
  509. queryParams: function queryParams(params) { //设置查询参数
  510. var param = {
  511. page: params.pageNumber,
  512. pagesize: params.pageSize,
  513. token: $.cookie("token")
  514. };
  515. var usercode_ = $("#seat").val(); //坐席
  516. var usercodeID = "";
  517. if (usercode_ != null) {
  518. $(usercode_).each(function (i, n) {
  519. var obj1 = "";
  520. obj1 = n + ",";
  521. usercodeID += obj1;
  522. });
  523. usercodeID = usercodeID.slice(0, -1);
  524. } else {
  525. usercodeID = "";
  526. }
  527. var WaitTimeState = $("#WaitTimeState").val()
  528. if(WaitTimeState ==="1"){
  529. param.morewaitTime = $("#WaitTime").val(); // 大于waitTime时长
  530. } else if(WaitTimeState ==="2"){
  531. param.lesswaitTime = $("#WaitTime").val(); // 小于waitTime时长
  532. } else{
  533. param.WaitTime = $("#WaitTime").val(); // 等待时长
  534. }
  535. if (stype == '1') {
  536. param.usercode = usercodeID;
  537. param.phone = $("#tel").val().replace(/\s+/g, "");
  538. param.starttime = $("#start").val();
  539. param.endtime = $("#end").val();
  540. param.callstate = $("#ss_hjzt").val();
  541. param.calltype = $("#ss_hcfx").val();
  542. param.type = $("#callType").val(); //type=通话类型
  543. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  544. param.tasktype = $("#sf_hf").val(); //呼叫类型
  545. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  546. param.phoneType = $("#phoneType").val();
  547. param.islike = $("#islike").val(); // 查询类型
  548. param.group = $("#agentGroup").val(); // 坐席组
  549. param.notconnected = $("#notconnected").val(); // 未接通
  550. param.callback = $("#callback").val(); // 是否回拨
  551. param.myd = $("#myd").val()
  552. param.Business = $("#Business").val()
  553. param.workOrderId = $("#worknumber").val()
  554. } else if (stype == '2') {
  555. param.usercode = $("#ss_seat").val();
  556. param.tel = $("#ss_tel").val();
  557. param.callstate = $("#ss_hjzt").val();
  558. param.calltype = $("#ss_hcfx").val();
  559. param.starttime = $("#ss_kssj").val();
  560. param.endtime = $("#ss_jssj").val();
  561. param.type = $("#callType").val(); //type=通话类型
  562. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  563. param.tasktype = $("#sf_hf").val(); //呼叫类型
  564. param.extnumber = $("#extnumber").val().replace(/\s+/g, "");
  565. param.phoneType = $("#phoneType").val();
  566. param.islike = $("#islike").val(); // 查询类型
  567. param.group = $("#agentGroup").val(); // 坐席组
  568. param.notconnected = $("#notconnected").val(); // 未接通
  569. param.callback = $("#callback").val(); // 是否回拨
  570. param.myd = $("#myd").val()
  571. param.Business = $("#Business").val()
  572. param.workOrderId = $("#worknumber").val()
  573. }
  574. return param;
  575. },
  576. onLoadSuccess: function () { //加载成功时执行
  577. //layer.msg("加载成功");
  578. },
  579. onLoadError: function () { //加载失败时执行
  580. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  581. }
  582. });
  583. }
  584. //音频
  585. function setCode(val) {
  586. if (val) {
  587. return '<div class="imgs">' +
  588. '<img src="../img/vice.png" alt="" onclick="helper.luyin.view(this)" item="' + val + '" />' +
  589. '</div>';
  590. } else {
  591. return '';
  592. }
  593. }
  594. //编号
  595. function Code(val, row, index) {
  596. return index + 1;
  597. }
  598. // 电话号码
  599. function formatterCallNum(val, row) {
  600. var phoneNumber
  601. if (val.length === 12) {
  602. phoneNumber = val.slice(1)
  603. } else if (val.length === 13) {
  604. phoneNumber = val.slice(2)
  605. } else {
  606. phoneNumber = val
  607. }
  608. return '<div class="imgs" ><p class="" onclick="viewList(\'' + phoneNumber + '\')" >' + phoneNumber +
  609. '</p></div>';
  610. }
  611. function phoneTableHtml(val, row){
  612. return '<a onclick="phoneTableClick(this ,\'' +row.CallNumberShow+'\')"> ' + val + '</a>'
  613. }
  614. // 查看列表
  615. function viewList(phoneNumber) {
  616. // layer.open({
  617. // type: 2,
  618. // content: "./CallRecordList.html?phoneNumber=" + phoneNumber, //iframe的url,no代表不显示滚动条
  619. // title: '通话记录',
  620. // area: ['90%', '90%'], //宽高
  621. // });
  622. }
  623. //方向呼出
  624. function callType(val) {
  625. if (val == 0) {
  626. return '<div class="imgs">呼入</div>';
  627. } else {
  628. return '<div class="imgs">呼出</div>';
  629. }
  630. }
  631. //满意度
  632. function MYD(val, row) {
  633. var html = '';
  634. switch (val + '') {
  635. case '0':
  636. html = '未评价';
  637. break;
  638. case '1':
  639. html = '满意';
  640. if (row.CallState == 0) {
  641. html = '';
  642. }
  643. break;
  644. case '2':
  645. html = '一般';
  646. break;
  647. case '3':
  648. html = '不满意';
  649. break;
  650. }
  651. return html;
  652. }
  653. function states(val, row) {
  654. if (val == 0) { //CallState
  655. if(row.CallType == 0){ //呼入
  656. if(row.Business==1||row.Business==4){
  657. return '<div class="imgs">自主完成</div>';
  658. }else if( !row.UserCode){
  659. return '<div class="imgs">主动放弃</div>';
  660. }else{
  661. return '<div class="imgs">未接通</div>';
  662. }
  663. }else{
  664. return '<div class="imgs">未接通</div>';
  665. }
  666. } else if (val == 1) {
  667. return '<div class="imgs">已接通</div>';
  668. } else if (val == 2) {
  669. return '<div class="imgs">接通未达</div>';
  670. }
  671. }
  672. function ActionType(val) {
  673. if (val == 2) {
  674. return '<div class="imgs">转移</div>';
  675. } else if (val == 3) {
  676. return '<div class="imgs">三方通话</div>';
  677. } else {
  678. return '<div class="imgs">正常通话</div>';
  679. }
  680. }
  681. //处理
  682. function isDeal(val) {
  683. if (val == 0) {
  684. return '<div >未处理</div>';
  685. } else {
  686. return '<div >已处理</div>';
  687. }
  688. }
  689. function ftime(val) {
  690. if (val) {
  691. return helper.DateFormat.getFormatTime(val);
  692. } else {
  693. return '';
  694. }
  695. }
  696. // 回拨
  697. function formatCallback(val, row) {
  698. if (val) {
  699. return "已回拨";
  700. } else if(row.CallType ===0&&row.CallState ===0){
  701. return "未回拨";
  702. }
  703. }
  704. //格式化工单号
  705. function formatWorkOrderNum(val, row) {
  706. if (row.CallType ===0) {
  707. if (val == null || val == '') {
  708. var callNumber = decryptFn(row.CallNumberShow)
  709. return '<a class="xg" onclick="addWorkOrder(\'' + row.CallRecordsId + '\',\'' +callNumber+'\')" title="添加工单">添加工单</a>';
  710. } else {
  711. return '<a class="xg" onclick="ckxq(\'' + val + '\')" title="点击查看工单详情">' + val + '</a>';
  712. }
  713. }
  714. }
  715. function formatBusinessType(val, row){
  716. if (row.CallType ===0) {
  717. if (val ===2) {
  718. return '市民咨询'
  719. } else if (val ===3) {
  720. return '营商环境'
  721. } else if (val ===4) {
  722. return '市长信箱'
  723. }else {
  724. return '市民咨询'
  725. }
  726. }
  727. }
  728. // 操作
  729. function operationFormatter(val, row) {
  730. // CallType ===0呼入 row.CallState ===0 未接通
  731. if (row.CallState ===0&&row.CallType ===0) {
  732. if (row.Callback) {
  733. return '<a class="operation" onclick="callbackRecord(\'' + row.CallId + '\')" title="">回拨记录</a>'
  734. } else {
  735. var callNumber = decryptFn(row.CallNumberShow)
  736. return '<a class="operation" onclick="backDial(\'' + callNumber + '\',\'' + row.CallId +'\')" title="">回拨</a>'
  737. }
  738. }
  739. }
  740. //获取通话类型
  741. function GetCallTypeList() {
  742. $.getJSON(huayi.config.callcenter_url + 'Dictionary/GetDicValueListById', {
  743. id: 45,
  744. token: $.cookie("token")
  745. }, function (result) {
  746. if (result.state.toLowerCase() == "success") {
  747. var callTypeList = result.data;
  748. $('#callType').empty();
  749. $('#callType').append('<option value="">全部</option>');
  750. $(callTypeList).each(function (i, n) {
  751. $('#callType').append('<option value="' + n.F_ValueId + '">' + n.F_Value +
  752. '</option>');
  753. })
  754. }
  755. })
  756. }
  757. // 坐席
  758. function getAgentGroup(obj) {
  759. obj.empty();
  760. obj.append(
  761. '<option selected="selected" value="">请选择</option>'
  762. );
  763. $.getJSON(
  764. huayi.config.callcenter_url +
  765. "Dictionary/GetDicValueListById", {
  766. token: $.cookie("token"),
  767. id: 2522,
  768. },
  769. function (data) {
  770. if (data.state.toLowerCase() == "success") {
  771. var content = data.data;
  772. $(content).each(function (i, n) {
  773. $(
  774. "<option value='" +
  775. n.F_Value +
  776. "'>" +
  777. n.F_Value +
  778. "</option>"
  779. ).appendTo(obj);
  780. });
  781. }
  782. }
  783. );
  784. }
  785. // 查看工单详情
  786. function ckxq(str) {
  787. if (str) {
  788. layer.open({
  789. type: 2,
  790. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  791. title: '工单详情',
  792. area: ['100%', '100%'], //宽高
  793. });
  794. }
  795. }
  796. // 添加工单
  797. function addWorkOrder(CallRecordsId,CallNumber) {
  798. if (CallRecordsId) {
  799. layer.open({
  800. type: 2,
  801. content: "../Appeal/AddAppeal.html?CallRecordsId=" + CallRecordsId+"&callerNum="+CallNumber+"&isaddorder=1" , //iframe的url,no代表不显示滚动条
  802. title: '工单详情',
  803. area: ['100%', '100%'], //宽高
  804. });
  805. }
  806. }
  807. // 外呼
  808. function backDial(phoneNumber, callId) {
  809. layer.open({
  810. type: 2,
  811. content: "./callbackRecordOldList.html?phoneNumber=" + phoneNumber, //iframe的url,no代表不显示滚动条
  812. title: '历史工单和记录',
  813. area: ['100%', '100%'], //宽高
  814. });
  815. console.log(phoneNumber)
  816. $.ajax({
  817. type: "get",
  818. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  819. async: true,
  820. dataType: "json",
  821. data: {
  822. token: $.cookie("token"),
  823. phone: phoneNumber,
  824. },
  825. success: function (result) {
  826. if (result.state.toLowerCase() == "success") {
  827. console.log(result.data.phone)
  828. top.callbackState = true
  829. var guid = uuid();
  830. top.obj.Type = "MakeCall";
  831. top.obj.DestinationNumber = result.data.phone;
  832. top.obj.Header = result.data.fix;
  833. top.obj.TaskType = "2"; //0:拨号外呼;1:未接来电外呼;2:回访外呼
  834. top.obj.TaskPhoneID = callId; //回访的电话ID
  835. top.obj.TaskID = guid; //回访记录编号
  836. top.obj.Callee = phoneNumber; //被叫号码
  837. top.obj.Caller = $.cookie("extno"); //操作人分机号
  838. top.Send();
  839. }
  840. },
  841. });
  842. }
  843. // 更新外呼记录前
  844. function beforeUpdateCallOut (callId) {
  845. $.ajax({
  846. type: "get",
  847. url: huayi.config.callcenter_url + "Callrecords/UpdateCallback",
  848. async: true,
  849. dataType: "json",
  850. data: {
  851. token: $.cookie("token"),
  852. callid: callId,
  853. },
  854. success: function (result) {
  855. if (result.state.toLowerCase() == "success") {
  856. }
  857. },
  858. });
  859. }
  860. // 更新外呼记录后
  861. function afterUpdateCallOut (callId) {
  862. $.ajax({
  863. type: "get",
  864. url: huayi.config.callcenter_url + "Callrecords/UpdateCallbackid",
  865. async: true,
  866. dataType: "json",
  867. data: {
  868. token: $.cookie("token"),
  869. callid: callId,
  870. p_callid: callId,
  871. },
  872. success: function (result) {
  873. if (result.state.toLowerCase() == "success") {
  874. }
  875. },
  876. });
  877. }
  878. // 回拨记录
  879. function callbackRecord(callId) {
  880. layer.open({
  881. type: 2,
  882. content: "./callbackRecordList.html?callId=" + callId, //iframe的url,no代表不显示滚动条
  883. title: '回拨记录',
  884. area: ['100%', '100%'], //宽高
  885. });
  886. }
  887. //电话类别
  888. function getPhoneType(obj) {
  889. obj.empty();
  890. $("<option value=''>请选择</option>").appendTo(obj);
  891. $.ajax({
  892. type: "get",
  893. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  894. dataType: "json",
  895. async: true,
  896. data: {
  897. "token": $.cookie("token"),
  898. id: 2498,
  899. },
  900. success: function (data) {
  901. if (data.state.toLowerCase() == "success") {
  902. var content = data.data;
  903. $(content).each(function (i, n) {
  904. $("<option value='" + n.F_Value + "'>" + n.F_Remark + "</option>")
  905. .appendTo(obj);
  906. })
  907. }
  908. }
  909. });
  910. }
  911. $(".exportFile").click(function () {
  912. var usercode_ = $("#seat").val(); //坐席
  913. var usercodeID = "";
  914. if (usercode_ != null) {
  915. $(usercode_).each(function (i, n) {
  916. var obj1 = "";
  917. obj1 = n + ",";
  918. usercodeID += obj1;
  919. });
  920. usercodeID = usercodeID.slice(0, -1);
  921. } else {
  922. usercodeID = "";
  923. }
  924. var usercode = usercodeID;
  925. var phone = $("#tel").val();
  926. var starttime = $("#start").val();
  927. var endtime = $("#end").val();
  928. var callstate = $("#ss_hjzt").val();
  929. var calltype = $("#ss_hcfx").val();
  930. var type = $("#callType").val(); //type=通话类型
  931. var actiontype = $("#ss_HJLX").val(); //呼叫类型
  932. var tasktype = $("#sf_hf").val(); //呼叫类型
  933. var extnumber = $("#extnumber").val();
  934. var phoneType = $("#phoneType").val();
  935. var islike = $("#islike").val(); // 查询类型
  936. var notconnected = $("#notconnected").val(); // 未接通
  937. var workOrderId = $("#worknumber").val()
  938. var url = huayi.config.callcenter_url + "Callrecords/GetList?token=" + $.cookie("token") +
  939. "&isdc=1";
  940. url += "&usercode=" + usercode + "&phone=" + phone + "&starttime=" + starttime + "&endtime=" +
  941. endtime + "&callstate=" + callstate + "&calltype=" + calltype + "&type=" + type +
  942. "&actiontype=" + actiontype + "&tasktype=" + tasktype + "&extnumber=" + extnumber +
  943. "&phoneType=" + phoneType + "&islike=" + islike + "&notconnected=" + notconnected+"&workOrderId="+ workOrderId;
  944. window.location.href = url;
  945. })
  946. document.onkeydown = function (e) { // 回车提交表单
  947. var theEvent = window.event || e;
  948. var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  949. if (code == 13) {
  950. initTable();
  951. }
  952. }
  953. </script>
  954. </body>
  955. </html>