Aucune description

CallRecord.html 43KB

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