Nav apraksta

zhijianpingfen.html 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  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. <link href="../css/Quality/QualityCommon.css" rel="stylesheet" />
  13. <style>
  14. body {
  15. font-family: "微软雅黑";
  16. font-size: 14px;
  17. }
  18. ul li {
  19. list-style: none;
  20. float: left;
  21. }
  22. .fr {
  23. float: right;
  24. }
  25. .fl {
  26. float: right;
  27. }
  28. /*标头*/
  29. .th-box {
  30. width: 100%;
  31. padding: 5px;
  32. border-bottom: 1px solid #e7eaec;
  33. }
  34. .sc_btn {
  35. width: 100px;
  36. color: #fff;
  37. font-size: 12px;
  38. margin-left: 15px;
  39. box-sizing: border-box;
  40. background: #00a1cb;
  41. padding: 6px 10px;
  42. outline: none;
  43. border-width: 0px;
  44. border-style: initial;
  45. border-color: initial;
  46. border-image: initial;
  47. border-radius: 3px;
  48. margin-top: 5px;
  49. text-align: center;
  50. }
  51. .photo {
  52. /*background-color: #FFF;
  53. background-image: none;*/
  54. width: 180px;
  55. border: 1px solid #e5e6e7;
  56. border-radius: 1px;
  57. color: inherit;
  58. padding: 6px 12px;
  59. }
  60. .selects {
  61. background-color: #FFF;
  62. background-image: none;
  63. border: 1px solid #e5e6e7;
  64. border-radius: 1px;
  65. color: inherit;
  66. padding: 6px 12px;
  67. }
  68. #Select:focus {
  69. outline: none;
  70. border-color: #00BFFF;
  71. }
  72. input:focus {
  73. outline: none;
  74. border-color: #00BFFF;
  75. }
  76. .spiner-example {
  77. position: absolute;
  78. top: 50%;
  79. left: 50%;
  80. z-index: 111;
  81. margin-left: -85px;
  82. margin-top: -100px;
  83. display: none;
  84. }
  85. .sk-spinner-three-bounce {
  86. width: 170px !important;
  87. }
  88. .sk-spinner p {
  89. display: inline-block;
  90. font-size: 18px;
  91. margin-left: 10px;
  92. }
  93. .gjsu ul {
  94. overflow: hidden;
  95. }
  96. .gjsu ul li {
  97. width: 50%;
  98. margin-bottom: 5px;
  99. padding-top: 10px;
  100. }
  101. .selects {
  102. width: 105px;
  103. }
  104. .tc {
  105. margin-top: 30px;
  106. text-align: center;
  107. }
  108. #sqzx th {
  109. padding: 5px 8px 5px 0;
  110. text-align: center;
  111. width: 6%;
  112. }
  113. #sqzx td {
  114. padding: 6px 0 5px 10px;
  115. width: 18%;
  116. }
  117. .nameJustified {
  118. width: 5em;
  119. display: inline-block;
  120. text-align: justify;
  121. text-align-last: justify;
  122. }
  123. </style>
  124. </head>
  125. <body class="gray-bg">
  126. <div class="wrapper wrapper-content animated fadeInRight">
  127. <div class="daoHang clearfix">
  128. <div class="dhLeft">
  129. <sapn>
  130. <i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a
  131. href="javaScript:;">质检管理</a>&gt;<a href="" class="nowPosition">质检评分</a>
  132. </sapn>
  133. </div>
  134. <div class="dhRight">
  135. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  136. </div>
  137. </div>
  138. <div class="th-box">
  139. <div class="box_content">
  140. <table id="sqzx" style="width: 100%" border="0">
  141. <tbody>
  142. <tr>
  143. <th>电话号码:</th>
  144. <td><input id="tel" class="form-control" type="text" /></td>
  145. <th><span class="nameJustified">分机号:</span></th>
  146. <td>
  147. <input id="extnumber" class="form-control" type="text" />
  148. </td>
  149. <th>呼出方向:</th>
  150. <td>
  151. <select id="ss_hcfx" class="form-control calltype">
  152. <option value="">全部</option>
  153. <option value="0">呼入</option>
  154. <option value="1">呼出</option>
  155. <option value="3">呼出回访</option>
  156. </select>
  157. </td>
  158. </tr>
  159. <tr>
  160. <th>呼叫类型:</th>
  161. <td>
  162. <select id="ss_HJLX" class="form-control calltype">
  163. <option value="">全部</option>
  164. <option value="1">正常通话</option>
  165. <option value="2">转移</option>
  166. <option value="3">三方通话</option>
  167. </select>
  168. </td>
  169. <th>是否回访:</th>
  170. <td>
  171. <select id="sf_hf" class="form-control calltype">
  172. <option value="">全部</option>
  173. <option value="2">是</option>
  174. <option value="0">否</option>
  175. </select>
  176. </td>
  177. <th>受话坐席:</th>
  178. <td>
  179. <select class="selectpicker show-tick form-control" multiple id="seat">
  180. <option value="">全部</option>
  181. </select>
  182. </td>
  183. </tr>
  184. <tr>
  185. <th>电话类别:</th>
  186. <td>
  187. <select class="form-control" id="phoneType">
  188. <option value="">请选择</option>
  189. </select>
  190. </td>
  191. <th>查询类型:</th>
  192. <td>
  193. <select id="islike" class="form-control" name="select">
  194. <option value="1">
  195. 模糊查询
  196. </option>
  197. <option value="0">
  198. 精确查询
  199. </option>
  200. </select>
  201. </td>
  202. <th><span class="nameJustified">时间:</span></th>
  203. <td colspan="3">
  204. <input id="start" class="photo x-color laydate-icon" type="text" /> - <input id="end"
  205. class="photo x-color laydate-icon" type="text" />
  206. </td>
  207. </tr>
  208. <tr>
  209. <th>
  210. <a class="sc_btn Ss">搜索</a>
  211. </th>
  212. </tr>
  213. </tbody>
  214. </table>
  215. </div>
  216. </div>
  217. <div style="width: 100%;padding: 10px;">
  218. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  219. <thead>
  220. <tr>
  221. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  222. <th data-field="CallNumber" data-align="center" data-formatter="phoneTableHtml">电话号码</th>
  223. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音质检</th>
  224. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  225. <th data-field="UserCode" data-align="center">坐席工号</th>
  226. <th data-field="UserName1" data-align="center">坐席姓名</th>
  227. <th data-field="ExtNumber" data-align="center">分机号</th>
  228. <!--<th data-field="BeginTime" data-align="center">开始时间</th>-->
  229. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  230. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  231. <!--<th data-field="EndTime" data-align="center">结束时间</th>-->
  232. <th data-field="TalkLongTime" data-align="center" data-formatter="ftime">通话时长</th>
  233. <th data-field="RingLongTime" data-align="center" data-formatter="ftime">振铃时长</th>
  234. <!--<th data-field="LongTime" data-align="center" data-formatter="ftime">总时长</th>-->
  235. <!--<th data-field="PhoneType" data-align="center">电话类别</th>-->
  236. </tr>
  237. </thead>
  238. </table>
  239. <!--高级搜索框-->
  240. </div>
  241. </div>
  242. <div class="t-shade">
  243. <div class="shade_k xqlb">
  244. <div class="shade_title">
  245. <span>录音播放下载及质检<srong class="cknum"></srong></span>
  246. <span class="setwin"><a>x</a></span>
  247. </div>
  248. <div class="shade_content">
  249. <div class="dgxx_table size-13">
  250. <table class="form_table">
  251. <tbody>
  252. <tr>
  253. <th><span>电话号码:</span></th>
  254. <td><span class="zj_phone"></span></td>
  255. <th><span>通话时间:</span></th>
  256. <td><span class="zj_time"></span></td>
  257. </tr>
  258. <tr>
  259. <th><span>呼叫方向:</span></th>
  260. <td><span class="zj_calltype"></span></td>
  261. <th><span>通话时长:</span></th>
  262. <td><span class="zj_talklongtime"></span></td>
  263. </tr>
  264. <tr>
  265. <th><span>坐席工号:</span></th>
  266. <td><span class="zj_usercode"></span></td>
  267. <th><span>坐席姓名:</span></th>
  268. <td><span class="zj_username"></span></td>
  269. </tr>
  270. <tr>
  271. <th><span>听取录音:</span></th>
  272. <td colspan="3">
  273. <div class="play Ly_box">
  274. </div>
  275. </td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. </div>
  280. <!--质检详情列表-->
  281. <div class="divDataItems">
  282. <table class="table table-bordered text-center table-hover" style="width: 100%;">
  283. <thead>
  284. <tr class="thead_title">
  285. <td style="background-color: #D5EDFE;">分类</td>
  286. <td style="background-color: #D5EDFE;">指标</td>
  287. <td style="background-color: #D5EDFE;">分值</td>
  288. <td style="background-color: #D5EDFE;">评分</td>
  289. </tr>
  290. </thead>
  291. <tbody id="tbody"></tbody>
  292. <tfoot id="tfoot">
  293. </tfoot>
  294. </table>
  295. <div class="add_btn" style="text-align: center;">
  296. <input type="button" class="btns" value="提交" onclick="SaveData()" />
  297. </div>
  298. </div>
  299. </div>
  300. <input type="hidden" class="Thid" />
  301. </div>
  302. </div>
  303. <script src="../js/bootstrap-select.js"></script>
  304. <script src="../My97DatePicker/WdatePicker.js"></script>
  305. <script src="../css/laydate/laydate.js"></script>
  306. <script src="../js/sm2/sm2.js"></script>
  307. <script src="../js/sm2/decrypt.js"></script>
  308. <script>
  309. var stype = 1;
  310. var seatlist = [];
  311. $(document).ready(function () {
  312. laydate.skin('blue');
  313. laydate({
  314. elem: '#start',
  315. event: 'focus',
  316. istime: true,
  317. format: 'YYYY-MM-DD hh:mm:ss'
  318. });
  319. laydate({
  320. elem: '#end',
  321. event: 'focus',
  322. istime: true,
  323. format: 'YYYY-MM-DD hh:mm:ss'
  324. });
  325. /*获取选中行对象*/
  326. $('#list').on("click-row.bs.table", function (e, row, ele) {
  327. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  328. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  329. $(".zj_phone").text(row.CallNumber);
  330. $(".zj_time").text(row.TalkStartTime);
  331. $(".zj_calltype").text(row.CallType == 0 ? "呼入" : "呼出");
  332. $(".zj_talklongtime").text(row.TalkLongTime + "秒");
  333. $(".zj_usercode").text(row.UserCode);
  334. $(".zj_username").text(row.UserName1);
  335. $('.Thid').val(row.CallRecordsId);
  336. });
  337. $(".setwin").click(function () {
  338. $(".t-shade").removeClass("cx");
  339. $('audio')[0].pause();
  340. });
  341. //获取坐席
  342. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  343. token: $.cookie("token")
  344. }, function (result) {
  345. if (result.state.toLowerCase() == "success") {
  346. seatlist = result.data;
  347. bindseat($("#seat"));
  348. }
  349. });
  350. // 电话类别
  351. getPhoneType($("#phoneType"));
  352. //搜索
  353. $(".Ss").click(function () {
  354. stype = 1;
  355. initTable();
  356. });
  357. initTable();
  358. })
  359. function bindseat(obj) {
  360. obj.empty();
  361. obj.append('<option value="">全部</option>');
  362. $(seatlist).each(function (i, n) {
  363. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  364. obj.selectpicker({
  365. noneSelectedText: '请选择' //默认显示内容
  366. });
  367. obj.selectpicker('refresh');
  368. })
  369. }
  370. function initTable() {
  371. //先销毁表格
  372. $('#list').bootstrapTable('destroy');
  373. //初始化表格,动态从服务器加载数据
  374. $("#list").bootstrapTable({
  375. method: "get", //使用get请求到服务器获取数据
  376. url: huayi.config.callcenter_url + "QCManage/GetNoQCList", //获取数据的Servlet地址
  377. contentType: "application/x-www-form-urlencoded",
  378. striped: true, //表格显示条纹
  379. pagination: true, //启动分页
  380. pageSize: 10, //每页显示的记录数
  381. pageNumber: 1, //当前第几页
  382. pageList: [10, 20, 50, 100], //记录数可选列表
  383. search: false, //是否启用查询
  384. showColumns: false, //显示下拉框勾选要显示的列
  385. showRefresh: false, //显示刷新按钮
  386. sidePagination: "server", //表示服务端请求
  387. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  388. //设置为limit可以获取limit, offset, search, sort, order
  389. queryParamsType: "undefined",
  390. queryParams: function queryParams(params) { //设置查询参数
  391. var param = {
  392. page: params.pageNumber,
  393. pagesize: params.pageSize,
  394. token: $.cookie("token")
  395. };
  396. var usercode_ = $("#seat").val(); //坐席
  397. var usercodeID = "";
  398. if (usercode_ != null) {
  399. $(usercode_).each(function (i, n) {
  400. var obj1 = "";
  401. obj1 = n + ",";
  402. usercodeID += obj1;
  403. });
  404. usercodeID = usercodeID.slice(0, -1);
  405. } else {
  406. usercodeID = "";
  407. }
  408. param.usercode = usercodeID;
  409. param.phone = $("#tel").val();
  410. param.starttime = $("#start").val();
  411. param.endtime = $("#end").val();
  412. param.callstate = $("#ss_hjzt").val();
  413. param.calltype = $("#ss_hcfx").val();
  414. param.tasktype = $("#sf_hf").val();
  415. param.actiontype = $("#ss_HJLX").val(); //呼叫类型
  416. param.extnumber = $("#extnumber").val();
  417. param.phoneType = $("#phoneType").val();
  418. param.islike = $("#islike").val(); // 查询类型
  419. return param;
  420. },
  421. onLoadSuccess: function () { //加载成功时执行
  422. //layer.msg("加载成功");
  423. },
  424. onLoadError: function () { //加载失败时执行
  425. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  426. }
  427. });
  428. }
  429. function phoneTableHtml(val, row){
  430. return '<a onclick="phoneTableClick(this ,\'' +row.CallNumberShow+'\')"> ' + val + '</a>'
  431. }
  432. //音频
  433. function setCode(val, row) {
  434. if (val) {
  435. return '<div class="imgs" style:"cursor: pointer;">' +
  436. '<img src="../img/vice.png" alt="" onclick="ck(this,' + row.CallRecordsId + ')" item="' + val +
  437. '" />' +
  438. '</div>';
  439. } else {
  440. return '';
  441. }
  442. }
  443. //编号
  444. function Code(val, row, index) {
  445. return index + 1;
  446. }
  447. //方向呼出
  448. function callType(val) {
  449. if (val == 0) {
  450. return '<div class="imgs">呼入</div>';
  451. } else {
  452. return '<div class="imgs">呼出</div>';
  453. }
  454. }
  455. function ActionType(val) {
  456. if (val == 2) {
  457. return '<div class="imgs">转移</div>';
  458. } else if (val == 3) {
  459. return '<div class="imgs">三方通话</div>';
  460. } else {
  461. return '<div class="imgs">正常通话</div>';
  462. }
  463. }
  464. //处理
  465. function isDeal(val) {
  466. if (val == 0) {
  467. return '<div >未处理</div>';
  468. } else {
  469. return '<div >已处理</div>';
  470. }
  471. }
  472. function ftime(val) {
  473. if (val) {
  474. return helper.DateFormat.getFormatTime(val);
  475. } else {
  476. return '';
  477. }
  478. }
  479. //电话类别
  480. function getPhoneType(obj) {
  481. obj.empty();
  482. $("<option value=''>请选择</option>").appendTo(obj);
  483. $.ajax({
  484. type: "get",
  485. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  486. dataType: "json",
  487. async: true,
  488. data: {
  489. "token": $.cookie("token"),
  490. id: 2498,
  491. },
  492. success: function (data) {
  493. if (data.state == "success") {
  494. var content = data.data;
  495. $(content).each(function (i, n) {
  496. $("<option value='" + n.F_Value + "'>" + n.F_Value + "</option>")
  497. .appendTo(obj);
  498. })
  499. }
  500. }
  501. });
  502. }
  503. function ck(val, id) {
  504. Xq(id);
  505. $(".t-shade").addClass("cx");
  506. $(".xqlb").addClass("cx");
  507. var path = $(val).attr("item");
  508. $(".Ly_box").empty();
  509. $('<audio style="width:100%;"class=" " src="' + path + '" loop="loop" controls="controls"></audio>')
  510. .appendTo(".Ly_box");
  511. }
  512. function Xq(zjID) {
  513. $.ajax({
  514. type: "get",
  515. url: huayi.config.callcenter_url + "QCManage/GetIndexList",
  516. dataType: 'json',
  517. async: true,
  518. data: {
  519. id: zjID,
  520. token: $.cookie("token")
  521. },
  522. success: function (data) {
  523. if (data.state = "success") {
  524. var content = data.data;
  525. $("#tbody").empty();
  526. $("#tfoot").empty();
  527. $(content).each(function (i, n) {
  528. if (n.Rowspan > 1) {
  529. $('<tr>' +
  530. '<td rowspan="' + (n.Rowspan + 1) + '">' + n.Qcname +
  531. '</td>' +
  532. '</tr>').appendTo($("#tbody"));
  533. } else {
  534. if (n.Colspan > 1) {
  535. $('<tr>' +
  536. '<td colspan="2">' + n.Qcname + '</td>' +
  537. '<td >' + n.Qcscore + '</td>' +
  538. '<td class="Total"><input type="text" class="Input" readonly="readonly"/></td>' +
  539. '</tr>').appendTo("#tfoot");
  540. } else {
  541. $('<tr>' +
  542. (n.TypeName ? '<td >' + n.TypeName + '</td>' : '') +
  543. '<td rowspan="' + n.Rowspan + '">' + n.Qcname +
  544. '</td>' +
  545. '<td >' + n.Qcscore + '</td>' +
  546. '<td ><input type="text" qc="' + n.Qcscore +
  547. '" qcid="' + n.Qcid + '" class="txtInput"/></td>' +
  548. '</tr>').appendTo("#tbody").find(".txtInput").keyup(
  549. function () {
  550. if (!(/^[0-9]*$/.test($(this).val()))) {
  551. $(this).val("");
  552. }
  553. if ($(this).val() * 1 > $(this).attr("qc") * 1) {
  554. $(this).val($(this).attr("qc") * 1);
  555. }
  556. Count = 0;
  557. $('.txtInput').each(function (i, n) {
  558. if ($(n).val()) {
  559. Count = Count * 1 + $(n).val() * 1;
  560. }
  561. })
  562. $(".Input").val(Count);
  563. });
  564. }
  565. }
  566. })
  567. }
  568. }
  569. });
  570. }
  571. function SaveData() {
  572. var json = [];
  573. var ispf = 1;
  574. $('.txtInput').each(function (i, n) {
  575. if (!$(n).val()) {
  576. ispf = 0;
  577. return false;
  578. }
  579. var jobj = {};
  580. jobj.Id = $(n).attr("qcid");
  581. jobj.Score = $(n).attr("qc");
  582. jobj.QCScore = $(n).val();
  583. json.push(jobj);
  584. })
  585. if (!ispf) {
  586. layer.confirm('请输入评分!', {
  587. btn: ['确定']
  588. });
  589. return;
  590. }
  591. $.ajax({
  592. type: "post",
  593. url: huayi.config.callcenter_url + "/QCManage/SaveData",
  594. dataType: 'json',
  595. data: {
  596. id: $(".Thid").val(), ///通话ID
  597. json: JSON.stringify(json),
  598. token: $.cookie("token")
  599. },
  600. success: function (data) {
  601. if (data.state == "success") {
  602. layer.msg('提交成功!');
  603. initTable();
  604. $(".t-shade").removeClass("cx");
  605. $('audio')[0].pause();
  606. }
  607. }
  608. });
  609. }
  610. </script>
  611. </body>
  612. </html>